Files
discord-decomp/sources/by-id/module-06451.js
T
2026-07-28 01:06:53 +03:00

189 lines
8.4 KiB
JavaScript

/* Metro module 6451; source: unknown; dependencies: [6448, 6450] */
function _fun50642(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#50642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6629:6, offset: 0x0121eccd, size: 123 bytes, params: 8, frame: 18
const value = this;
const env0_0 = require;
if (value && value.__extends) {
}
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
exports.default = _fun50648((require(6448) /* metro dependency 6448 */).default);
function extendStatics_50643(a0, a1) { // fn#50643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6629:77, offset: 0x0121ed48, size: 78 bytes, params: 3, frame: 13
var r3;
var Array;
var value;
const Object = global.Object;
const setPrototypeOf = Object.setPrototypeOf;
if (setPrototypeOf) {
r3 = setPrototypeOf;
} else {
Array = global.Array;
value = Object.create([]);
value = value instanceof Array;
r3 = value && (function(a0, a1) {
a0.__proto__ = a1;
});
}
r3 = !r3 ? function(a0, a1) {
var r3;
var propertyName;
var propertyName2;
var hasOwnProperty;
for (propertyName in a1) {
hasOwnProperty = global.Object.prototype.hasOwnProperty;
if (!hasOwnProperty.call(a1, propertyName)) {
r3 = propertyName2;
continue;
}
a0[propertyName] = a1[propertyName];
r3 = propertyName2;
}
} : r3;
return r3(a0, a1);
}
function _fun50646(a0, a1) { // fn#50646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6629:292, offset: 0x0121ed96, size: 177 bytes, params: 3, frame: 15
var r1;
var value;
var prototype;
var ___5064722;
var TypeError;
var value3;
var typeError;
const env0_0 = a0;
const ___506472 = ___50647;
if (typeof a1 === 'function') {
extendStatics_50643(a0, a1);
if (a1 === null) {
r1 = global.Object.create(a1);
} else {
prototype = a1.prototype;
___506472.prototype = prototype;
prototype = ___506472.prototype;
value = Object.create(prototype, {constructor: {value: ___506472}});
___5064722 = new ___506472();
value = ___5064722 instanceof Object ? ___5064722 : value;
r1 = value;
}
a0.prototype = r1;
} else {
if (a1 !== null) {
TypeError = global.TypeError;
value = global.String(a1);
value = 'Class extends value ' + value;
value3 = Object.create(TypeError.prototype, {constructor: {value: TypeError}});
value += ' is not a constructor or null';
typeError = new TypeError();
value = typeError instanceof Object ? typeError : value3;
throw value;
}
extendStatics_50643(a0, a1);
if (a1 === null) {
r1 = global.Object.create(a1);
} else {
prototype = a1.prototype;
___506472.prototype = prototype;
prototype = ___506472.prototype;
value = Object.create(prototype, {constructor: {value: ___506472}});
___5064722 = new ___506472();
value = ___5064722 instanceof Object ? ___5064722 : value;
r1 = value;
}
a0.prototype = r1;
}
function ___50647() { // fn#50647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6629:426, offset: 0x0121c997, size: 20 bytes, params: 1, frame: 2
this.constructor = env0_0;
}
}
function _fun50648(a0) { // fn#50648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6629:595, offset: 0x0121ee47, size: 143 bytes, params: 2, frame: 14
const env0_0 = a0;
const StickyFooter2 = StickyFooter;
env0_3(StickyFooter2, a0);
StickyFooter2.prototype.onScroll = onScroll_50650;
StickyFooter2.prototype.initStickyParams = function() {
this.stickyType = require(dependencyMap[0]).StickyType.FOOTER;
this.stickyTypeMultiplier = -1;
this.containerPosition = {bottom: this.getWindowCorrection(this.props).endCorrection};
this.bounceScrolling = false;
};
StickyFooter2.prototype.calculateVisibleStickyIndex = calculateVisibleStickyIndex_50652;
StickyFooter2.prototype.getNextYd = function(a0, a1) {
return -1 * (a0 + a1);
};
StickyFooter2.prototype.getCurrentYd = function(a0, a1) {
return -1 * (a0 + a1);
};
StickyFooter2.prototype.getScrollY = function(a0, a1) {
return a1 ? -1 * (a0 + a1) : undefined;
};
StickyFooter2.prototype.hasReachedBoundary = function(a0, a1) {
var r0;
var value = a1 !== undefined;
if (value) {
value = global.Math.round(a0 - a1);
value = value >= 0;
r0 = value;
} else {
r0 = value;
}
return r0;
};
return StickyFooter2;
function StickyFooter(a0, a1) { // fn#50649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6629:607, offset: 0x0121d905, size: 36 bytes, params: 3, frame: 15
const value = this;
return env0_0.call(value, a0, a1) || value;
}
function onScroll_50650(a0) { // fn#50650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6629:721, offset: 0x0121eed6, size: 83 bytes, params: 2, frame: 15
var r2;
let value = a0;
const getWindowCorrection = this.getWindowCorrection;
const endCorrection = Reflect.apply(getWindowCorrection, this, [this.props]).endCorrection;
if (endCorrection) {
this.containerPosition = {bottom: endCorrection};
value -= endCorrection;
r2 = value;
} else {
r2 = value;
}
env0_0.prototype.onScroll.call(this, r2);
}
function calculateVisibleStickyIndex_50652(a0, a1, a2, a3, a4) { // fn#50652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6629:1151, offset: 0x0121ef8e, size: 218 bytes, params: 6, frame: 16
var value;
if (a0) {
if (a2) {
this.bounceScrolling = this.hasReachedBoundary(a3, a4);
if (a2 > a0[a0.length - 1]) {
this.stickyVisiblity = false;
if (this.props.alwaysStickyFooter && a3 === 0) {
this.stickyVisiblity = true;
}
} else if (this.bounceScrolling) {
this.stickyVisiblity = false;
if (this.props.alwaysStickyFooter && a3 === 0) {
this.stickyVisiblity = true;
}
} else {
this.stickyVisiblity = true;
value = environment.__proto__;
value = (require(6450) /* metro dependency 6450 */).default.findValueLargerThanTarget(a0, a2);
if (value) {
this.currentIndex = value.index;
value = value.value;
this.currentStickyIndex = value;
} else {
global.console.log('Footer sticky index calculation gone wrong.');
}
}
}
}
}
}
}
global.__d(_fun50642, 6451, [6448, 6450]) /* metro module 6451, dependencies: [6448, 6450] */;