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

668 lines
30 KiB
JavaScript

/* Metro module 373; source: unknown; dependencies: [57, 6, 7, 15, 17, 102, 18, 99, 100, 147, 374, 358, 375, 377, 348, 44, 117] */
import ClassCallCheck from './module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from './module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from './module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from './module-00017.js'; /* Metro dependency 17 */
import Inherits from './module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00044 from './module-00044.js'; /* Metro dependency 44 */
import Module00057 from './module-00057.js'; /* Metro dependency 57 */
import Module00099 from './module-00099.js'; /* Metro dependency 99 */
import Module00100 from './module-00100.js'; /* Metro dependency 100 */
import Module00102 from './module-00102.js'; /* Metro dependency 102 */
import Module00348 from './module-00348.js'; /* Metro dependency 348 */
import * as Module00117Module from './module-00117.js'; /* Metro dependency 117 */
function _fun5530(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#5530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:6, offset: 0x00cdea2f, size: 410 bytes, params: 8, frame: 19
const env0_0 = require;
const _disconnectAnimatedView2 = function(a0) {
importDefault(dependencyMap[15])(this.__isNative, 'Expected node to be marked as "native"');
var connectedViewTag = a0.connectedViewTag;
if (connectedViewTag != null) {
importDefault(dependencyMap[14]).API.disconnectAnimatedNodeFromView(this.__getNativeTag(),
connectedViewTag);
a0.connectedViewTag = null;
}
};
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = Module00100;
const env0_11 = value('callback');
const env0_12 = value('nodeKeys');
const env0_13 = value('nodes');
const env0_14 = value('props');
const env0_15 = value('target');
const env0_16 = value('connectAnimatedView');
const env0_17 = value('disconnectAnimatedView');
value = importDefault(358) /* metro dependency 358 */;
value = _fun5538(value);
Object = global.Object;
const env0_18 = Object.prototype.hasOwnProperty;
Object = global.Object;
const env0_19 = Object.hasOwn ?? (function(a0, a1) {
return hasOwnProperty.call(a0, a1);
});
exports.default = value;
function _isNativeReflectConstruct_5531() { // fn#5531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:195, offset: 0x00cdebc9, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_5531_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _superPropGet_5534(a0, a1, a2, a3) { // fn#5534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:414, offset: 0x00cdec27, size: 99 bytes, params: 5, frame: 18
let value = a0;
const env0_0 = a2;
value = Module00017(1 & 3 ? value.prototype : value);
value = Module00102(value, a1, a2);
return 2 & 3 ? typeof value !== 'function' ? value : _fun5535 : value;
function _fun5535(a0) { // fn#5535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:513, offset: 0x00c62408, size: 27 bytes, params: 2, frame: 13
return env0_1.apply(importDefault, a0);
}
}
function _connectAnimatedView2(a0) { // fn#5536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:4390, offset: 0x00cdec8a, size: 180 bytes, params: 2, frame: 17
(Module00044)(this.__isNative, 'Expected node to be marked as "native"');
const nodeHandle = Module00117Module.findNodeHandle(a0.instance);
if (nodeHandle == null) {
throw new global.Error('Unable to locate attached view in the native tree');
}
const API = (Module00348).API;
API.connectAnimatedNodeToView(this.__getNativeTag(), nodeHandle);
a0.connectedViewTag = nodeHandle;
}
function _fun5538(a0) { // fn#5538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:683, offset: 0x00cdedb3, size: 298 bytes, params: 2, frame: 16
const AnimatedProps2 = AnimatedProps;
Inherits(AnimatedProps2, a0);
return CreateClass(AnimatedProps2, [{key: '__getValue', value: value_5540}, {key: '__getValueWithStaticProps',
value: value_5541}, {key: '__getNativeAnimatedEventTuples', value: value_5542}, {key: '__getAnimatedValue',
value: value_5543}, {key: '__attach', value: value_5544}, {key: '__detach', value: value_5545}, {key: 'update',
value: value_5546}, {key: '__makeNative', value: value_5547}, {key: 'setNativeView', value: value_5548},
{key: '__restoreDefaultValues', value: value_5549}, {key: '__getNativeConfig', value: value_5550}]);
function AnimatedProps(a0, a1, a2, a3) { // fn#5539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:695, offset: 0x00cdeedd, size: 773 bytes, params: 5, frame: 46
var r13;
var r27;
var style;
var r28;
var property;
var property2;
var defaultImport;
var from;
var value10;
var value11;
var defaultImport2;
var value12;
var push;
var value13;
const value = environment.__proto__;
let binding = env1_4;
const value3 = undefined;
binding(this, AnimatedProps);
let items2 = [a3];
const value4 = env1_7(AnimatedProps);
const value7 = env1_6(this, _isNativeReflectConstruct_5531() ? global.Reflect.construct(value4, items2,
env1_7(this).constructor) : value4.apply(this, items2));
let Object = global.Object;
let defineProperty = Object.defineProperty;
Reflect.apply(defineProperty, Object, [value7, env1_17, {value: _disconnectAnimatedView2}]);
Object = global.Object;
Object.defineProperty(value7, env1_16, {value: _connectAnimatedView2});
Object = global.Object;
defineProperty = Object.defineProperty;
binding = env1_11;
Reflect.apply(defineProperty, Object, [value7, binding, {writable: true, value: value3}]);
Object = global.Object;
defineProperty = Object.defineProperty;
const binding2 = env1_12;
Reflect.apply(defineProperty, Object, [value7, binding2, {writable: true, value: value3}]);
Object = global.Object;
defineProperty = Object.defineProperty;
const binding3 = env1_13;
Reflect.apply(defineProperty, Object, [value7, binding3, {writable: true, value: value3}]);
Object = global.Object;
defineProperty = Object.defineProperty;
const binding4 = env1_14;
Reflect.apply(defineProperty, Object, [value7, binding4, {writable: true, value: value3}]);
Object = global.Object;
Object.defineProperty(value7, env1_15, {'writable': true, 'value': null});
items2 = [];
const items3 = [];
const object = {};
Object = global.Object;
const value8 = Object.keys(a0);
const length = value8.length;
const value9 = 0;
if (value9 < length) {
r13 = value9;
reducibleLoop4: while (true) {
property = value8[r13];
property2 = a0[property];
reducibleJoin19: while (true) {
reducibleJoin7: while (true) {
if (a2 == null) {
break reducibleJoin7;
}
if (env1_19(a2, property)) {
break reducibleJoin7;
}
object[property] = property2;
break reducibleJoin19;
}
if (property === 'style') {
reducibleJoin16: while (true) {
if (typeof property2 !== 'object') {
r27 = value3;
r28 = property2;
break reducibleJoin16;
}
if (property2 != null) {
value11 = (importDefault(147) /* metro dependency 147 */)(property2);
defaultImport2 = importDefault(374) /* metro dependency 374 */;
from = defaultImport2.from;
reducibleJoin15: while (true) {
if (a2 == null) {
style = value3;
break reducibleJoin15;
}
style = a2.style;
break reducibleJoin15;
}
value12 = Reflect.apply(from, defaultImport2, [value11, style, property2]);
r27 = value12;
r28 = value11;
break reducibleJoin16;
}
r27 = value3;
r28 = property2;
break reducibleJoin16;
}
} else {
reducibleJoin10: while (true) {
if (property2 instanceof (importDefault(358) /* metro dependency 358 */)) {
r27 = property2;
break reducibleJoin10;
}
defaultImport = importDefault(375) /* metro dependency 375 */;
from = defaultImport.from;
value10 = Reflect.apply(from, defaultImport, [property2]);
r27 = value10;
break reducibleJoin10;
}
r28 = property2;
}
if (r27 == null) {
object[property] = r28;
break reducibleJoin19;
}
push = items2.push;
Reflect.apply(push, items2, [property]);
push = items3.push;
Reflect.apply(push, items3, [r27]);
object[property] = r27;
break reducibleJoin19;
}
value13 = typeof r13 === 'bigint' ? r13 + 1n : +r13 + 1;
if (value13 < length) {
r13 = value13;
continue reducibleLoop4;
}
break reducibleLoop4;
}
}
const value14 = env1_3([items2, items3, object], 3);
property = value14[value9];
const property3 = value14[1];
const property4 = value14[2];
const binding6 = env1_10;
binding6(value7, binding2)[binding2] = property;
binding6(value7, binding3)[binding3] = property3;
binding6(value7, binding4)[binding4] = property4;
binding6(value7, binding)[binding] = a1;
return value7;
}
function value_5540() { // fn#5540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:1849, offset: 0x00cdf1e2, size: 194 bytes, params: 1, frame: 22
var r3;
var property;
var binding3;
var property2;
var AnimatedEvent;
var __getHandler;
var __getValue;
var value4;
const object = {};
const Object = global.Object;
const keys = Object.keys;
let binding = env1_10;
const binding2 = env1_14;
const value2 = Reflect.apply(keys, Object, [binding(this, binding2)[binding2]]);
const length = value2.length;
const value3 = 0;
if (value3 < length) {
r3 = value3;
while (true) {
property = value2[r3];
binding = env1_10;
binding3 = env1_14;
property2 = binding(this, binding3)[binding3][property];
if (!(property2 instanceof (importDefault(358) /* metro dependency 358 */))) {
AnimatedEvent = (require(377) /* metro dependency 377 */).AnimatedEvent;
if (property2 instanceof AnimatedEvent) {
__getHandler = property2.__getHandler;
object[property] = Reflect.apply(__getHandler, property2, []);
break;
}
object[property] = property2;
break;
}
__getValue = property2.__getValue;
object[property] = Reflect.apply(__getValue, property2, []);
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
if (value4 < length) {
r3 = value4;
continue;
}
break;
}
}
return object;
}
function value_5541(a0) { // fn#5541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:2123, offset: 0x00cdf2a4, size: 366 bytes, params: 2, frame: 36
var r11;
var r23;
var property;
var binding;
var binding2;
var property2;
var AnimatedEvent;
var __getHandler;
var __getValue;
var style;
var value5;
var value6;
var __getValueForStyle;
var value7;
let Object = global.Object;
const value = Object.assign({}, a0);
Object = global.Object;
const value2 = Object.keys(a0);
const length = value2.length;
const value3 = 0;
if (value3 < length) {
r11 = value3;
while (true) {
property = value2[r11];
binding = env1_10;
binding2 = env1_14;
property2 = binding(this, binding2)[binding2][property];
if (property === 'style') {
style = a0.style;
value5 = (importDefault(147) /* metro dependency 147 */)(style);
if (property2 instanceof (importDefault(374) /* metro dependency 374 */)) {
if (value5 == null) {
r23 = {};
} else {
if (value5 !== style) {
r23 = value5;
continue;
}
Object = global.Object;
value6 = Object.assign({}, value5);
r23 = value6;
}
property2.__replaceAnimatedNodeWithValues(r23);
__getValueForStyle = property2.__getValueForStyle;
value[property] = Reflect.apply(__getValueForStyle, property2, [r23]);
break;
}
value[property] = value5;
break;
}
if (property2 instanceof (importDefault(358) /* metro dependency 358 */)) {
__getValue = property2.__getValue;
value[property] = Reflect.apply(__getValue, property2, []);
break;
}
AnimatedEvent = (require(377) /* metro dependency 377 */).AnimatedEvent;
if (property2 instanceof AnimatedEvent) {
__getHandler = property2.__getHandler;
value[property] = Reflect.apply(__getHandler, property2, []);
break;
}
break;
value7 = typeof r11 === 'bigint' ? r11 + 1n : +r11 + 1;
if (value7 < length) {
r11 = value7;
continue;
}
break;
}
}
return value;
}
function value_5542() { // fn#5542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:2617, offset: 0x00cdf412, size: 161 bytes, params: 1, frame: 21
var r2;
var r8;
var property;
var binding3;
var property2;
var AnimatedEvent;
var value4;
var __isNative;
var value5;
const items2 = [];
const Object = global.Object;
const keys = Object.keys;
let binding = env1_10;
const binding2 = env1_14;
const value2 = Reflect.apply(keys, Object, [binding(this, binding2)[binding2]]);
const length = value2.length;
const value3 = 0;
if (value3 < length) {
r2 = value3;
while (true) {
property = value2[r2];
binding = env1_10;
binding3 = env1_14;
property2 = binding(this, binding3)[binding3][property];
AnimatedEvent = (require(377) /* metro dependency 377 */).AnimatedEvent;
value4 = property2 instanceof AnimatedEvent;
if (value4) {
__isNative = property2.__isNative;
r8 = __isNative;
} else {
r8 = value4;
}
if (!r8) {
continue;
}
items2.push([property, property2]);
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < length) {
r2 = value5;
continue;
}
break;
}
}
return items2;
}
function value_5543() { // fn#5543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:2862, offset: 0x00cdf4b3, size: 87 bytes, params: 1, frame: 17
var r1;
var property3;
var property4;
var __getAnimatedValue;
const object = {};
let value = environment.__proto__;
const binding = env1_10;
const binding2 = env1_12;
const property = binding(this, binding2)[binding2];
const binding3 = env1_13;
const property2 = binding(this, binding3)[binding3];
const length = property2.length;
value = 0;
if (value < length) {
for (r1 = value; true; r1 = value) {
property3 = property[r1];
property4 = property2[r1];
__getAnimatedValue = property4.__getAnimatedValue;
object[property3] = Reflect.apply(__getAnimatedValue, property4, []);
value = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
if (!(value < length)) {
break;
}
}
}
return object;
}
function value_5544() { // fn#5544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:3038, offset: 0x00cdf50a, size: 100 bytes, params: 1, frame: 19
var r2;
var property2;
var value3;
const value = environment.__proto__;
const binding = env1_10;
const binding2 = env1_13;
const property = binding(this, binding2)[binding2];
const length = property.length;
const value2 = 0;
if (value2 < length) {
for (r2 = value2; true; r2 = value3) {
property2 = property[r2];
property2.__addChild(this);
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (!(value3 < length)) {
break;
}
}
}
_superPropGet_5534(AnimatedProps, '__attach', this, 3)([]);
}
function value_5545() { // fn#5545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:3202, offset: 0x00cdf56e, size: 199 bytes, params: 1, frame: 19
var r0;
var r2;
var value;
var binding;
var binding2;
var property;
var binding3;
var value2;
var binding4;
var property2;
var __removeChild;
var value5;
const __isNative = this.__isNative;
reducibleJoin2: while (true) {
if (__isNative) {
value = environment.__proto__;
binding = env1_10;
binding2 = env1_15;
property = binding(this, binding2)[binding2];
value = property != null;
r0 = value;
break reducibleJoin2;
}
r0 = __isNative;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
value = environment.__proto__;
binding = env1_10;
binding3 = env1_17;
value2 = binding(this, binding3);
binding4 = env1_15;
value2[binding3](binding(this, binding4)[binding4]);
break reducibleJoin4;
}
break reducibleJoin4;
}
value = environment.__proto__;
binding = env1_10;
const binding5 = env1_15;
binding(this, binding5)[binding5] = null;
const binding6 = env1_13;
property = binding(this, binding6)[binding6];
const length = property.length;
const value4 = 0;
if (value4 < length) {
r2 = value4;
reducibleLoop5: while (true) {
property2 = property[r2];
__removeChild = property2.__removeChild;
Reflect.apply(__removeChild, property2, [this]);
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < length) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
_superPropGet_5534(AnimatedProps, '__detach', this, 3)([]);
}
function value_5546() { // fn#5546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:3449, offset: 0x00cdf635, size: 32 bytes, params: 1, frame: 13
const value = environment.__proto__;
const binding = env1_10;
const binding2 = env1_11;
binding(this, binding2)[binding2]();
}
function value_5547(a0) { // fn#5547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:3510, offset: 0x00cdf655, size: 187 bytes, params: 2, frame: 20
var r1;
var property2;
var __makeNative;
var value3;
var _superPropGet_5534Binding;
var value4;
var value5;
var binding3;
var binding4;
var value6;
var binding5;
let binding = env1_10;
const binding2 = env1_13;
let property = binding(this, binding2)[binding2];
const length = property.length;
const value2 = 0;
if (value2 < length) {
r1 = value2;
reducibleLoop1: while (true) {
property2 = property[r1];
__makeNative = property2.__makeNative;
Reflect.apply(__makeNative, property2, [a0]);
value3 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
if (value3 < length) {
r1 = value3;
continue reducibleLoop1;
}
break reducibleLoop1;
}
}
reducibleJoin5: while (true) {
if (this.__isNative) {
break reducibleJoin5;
}
this.__isNative = true;
_superPropGet_5534Binding = _superPropGet_5534;
value4 = environment;
value5 = _superPropGet_5534Binding(AnimatedProps, '__setPlatformConfig', this, 3);
value5([a0]);
binding = env1_10;
binding3 = env1_15;
property = binding(this, binding3)[binding3];
if (property == null) {
break reducibleJoin5;
}
binding = env1_10;
binding4 = env1_16;
value6 = binding(this, binding4);
binding5 = env1_15;
value6[binding4](binding(this, binding5)[binding5]);
break reducibleJoin5;
}
}
function value_5548(a0) { // fn#5548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:3780, offset: 0x00cdf710, size: 128 bytes, params: 2, frame: 17
var binding3;
var binding4;
var value4;
var binding5;
let binding = env1_10;
const binding2 = env1_15;
const value2 = undefined;
const property = binding(this, binding2)[binding2];
if ((property == null ? value2 : property.instance) !== a0) {
binding = env1_10;
binding3 = env1_15;
binding(this, binding3)[binding3] = {instance: a0, connectedViewTag: null};
if (this.__isNative) {
binding = env1_10;
binding4 = env1_16;
value4 = binding(this, binding4);
binding5 = env1_15;
value4[binding4](binding(this, binding5)[binding5]);
}
}
return value2;
}
function value_5549() { // fn#5549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:3992, offset: 0x00cdf790, size: 68 bytes, params: 1, frame: 12
var value;
var API;
if (this.__isNative) {
value = environment.__proto__;
API = (importDefault(348) /* metro dependency 348 */).API;
API.restoreDefaultValues(this.__getNativeTag());
}
}
function value_5550() { // fn#5550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:414:4133, offset: 0x00cdf7d4, size: 137 bytes, params: 1, frame: 19
var r0;
var property3;
var property4;
var __getNativeTag;
var value4;
const value = this.__getPlatformConfig();
const object = {};
const binding = env1_10;
const binding2 = env1_12;
const property = binding(this, binding2)[binding2];
const binding3 = env1_13;
const property2 = binding(this, binding3)[binding3];
const length = property2.length;
const value3 = 0;
if (value3 < length) {
for (r0 = value3; true; r0 = value4) {
property3 = property[r0];
property4 = property2[r0];
property4.__makeNative(value);
__getNativeTag = property4.__getNativeTag;
object[property3] = Reflect.apply(__getNativeTag, property4, []);
value4 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
if (!(value4 < length)) {
break;
}
}
}
const object2 = {type: 'props', props: object};
object2.debugID = this.__getDebugID();
return object2;
}
}
}
global.__d(_fun5530, 373, [57, 6, 7, 15, 17, 102, 18, 99, 100, 147, 374, 358, 375, 377, 348, 44,
117]) /* metro module 373, dependencies: [57, 6, 7, 15, 17, 102, 18, 99, 100, 147, 374, 358, 375, 377, 348, 44, 117] */;