/* Metro module 56; source: unknown; dependencies: [57, 44, 63, 50] */ function _fun1385(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#1385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:81:6, offset: 0x00c5aea2, size: 219 bytes, params: 8, frame: 20 var r1; var __fbBatchedBridgeConfig; const env0_1 = require; const closure = __fbGenNativeModule; const arrayContains = function(a0, a1) { return a0.indexOf(a1) !== -1; }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(57) /* metro dependency 57 */; global.__fbGenNativeModule = closure; if (global.nativeModuleProxy) { r1 = global.nativeModuleProxy; } else { __fbBatchedBridgeConfig = global.__fbBatchedBridgeConfig; (require(44) /* metro dependency 44 */)(__fbBatchedBridgeConfig, '__fbBatchedBridgeConfig is not set, cannot invoke native modules'); var env0_5 = (require(50) /* metro dependency 50 */).default; (__fbBatchedBridgeConfig.remoteModuleConfig || []).forEach(_fun1396); r1 = {}; } exports.default = r1; } function __fbGenNativeModule(a0, a1) { // fn#1386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:81:106, offset: 0x00c5af7d, size: 309 bytes, params: 3, frame: 20 var value2; var property; var property2; var property3; var object2; const env0_0 = a1; if (a0) { value2 = env0_3(a0, 5); property = value2[0]; property2 = value2[1]; property3 = value2[2]; var env0_2 = value2[3]; var env0_3 = value2[4]; (require(44) /* metro dependency 44 */)(!property.startsWith('RCT') && !property.startsWith('RK'), "Module name prefixes should've been stripped by the native side but wasn't for " + property); if (property2) { object2 = {}; if (property3) { property3.forEach(_fun1387); } global.Object.assign(object2, property2); if (object2.getConstants == null) { object2.getConstants = getConstants_1394; } else { global.console.warn("Unable to define method 'getConstants()' on NativeModule '" + property + "'. NativeModule '" + property + "' already has a constant or method called 'getConstants'. Please remove it."); } return {name: property, module: object2}; } if (property3) { object2 = {}; if (property3) { property3.forEach(_fun1387); } global.Object.assign(object2, property2); if (object2.getConstants == null) { object2.getConstants = getConstants_1394; } else { global.console.warn("Unable to define method 'getConstants()' on NativeModule '" + property + "'. NativeModule '" + property + "' already has a constant or method called 'getConstants'. Please remove it."); } return {name: property, module: object2}; } return {name: property}; } return null; } function _fun1396(a0, a1) { // fn#1396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:81:2040, offset: 0x00c5b438, size: 97 bytes, params: 3, frame: 18 const env0_0 = a1; const value2 = __fbGenNativeModule(a0, a1); if (value2) { if (value2.module) { nativeModuleProxy[value2.name] = value2.module; } else { env0_5(nativeModuleProxy, value2.name, {get: get_1397}); } } } function _fun1387(a0, a1) { // fn#1387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:81:386, offset: 0x00c5b0b2, size: 166 bytes, params: 3, frame: 18 let r2 = env0_2 && arrayContains(env0_2, a1); r2 = !!r2 && r2; let r3 = env0_3 && arrayContains(env0_3, a1); r3 = !!r3 && r3; (require(44) /* metro dependency 44 */)(r2 ? !r3 : !r2, 'Cannot have a method that is both async and a sync hook'); env0_4[a0] = ((a0, a1, a2) => { var r0; var env0_0 = a0; var env0_1 = a1; var env0_2 = a2; r0 = a2 === 'promise' ? _fun1389 : _fun1393; r0.type = a2; return r0; })(require, a1, r2 ? 'promise' : r3 ? 'sync' : 'async'); } function __fbGenNativeModuleGetConstants() { // fn#1394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:81:1496, owner: __fbGenNativeModule.getConstants, offset: 0x00c5b3fa, size: 33 bytes, params: 1, frame: 12 return env0_1 || global.Object.freeze({}); } function get_1397() { // fn#1397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:81:2123, offset: 0x00c5b499, size: 98 bytes, params: 1, frame: 17 const name = env0_1.name; let value = environment.__proto__; const moduleValue = require(44) /* metro dependency 44 */; const binding = env1_0; moduleValue(binding.nativeRequireModuleConfig, "Can't lazily create module without nativeRequireModuleConfig"); value = __fbGenNativeModule(binding.nativeRequireModuleConfig(name), require); return value && value.module; } function genMethod(a0, a1, a2) { // fn#1388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:81:574, offset: 0x00c5b158, size: 51 bytes, params: 4, frame: 4 const env0_0 = a0; const env0_1 = a1; const env0_2 = a2; const r0 = a2 === 'promise' ? promiseMethodWrapper : nonPromiseMethodWrapper; r0.type = a2; return r0; } function promiseMethodWrapper() { // fn#1389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:81:627, owner: genMethod.promiseMethodWrapper, offset: 0x00c5b18b, size: 129 bytes, params: 1, frame: 15 var r2; var value5; const length = arguments.length; const Array = global.Array; const array = new Array(length); const value4 = 0; if (value4 < length) { for (r2 = value4; true; r2 = value5) { array[r2] = arguments[r2]; value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; if (!(value5 < length)) { break; } } } const Error = global.Error; let error = new Error(); const Promise = global.Promise; error = Object.create(Promise.prototype, {constructor: {value: Promise}}); const promise = new Promise(_fun1390); return promise instanceof Object ? promise : error; } function nonPromiseMethodWrapper() { // fn#1393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:81:953, owner: genMethod.nonPromiseMethodWrapper, offset: 0x00c5b297, size: 355 bytes, params: 1, frame: 23 var r0; var r7; var r1; var value5; var property; var value8; var moduleValue; var value11; let value = arguments.length; const Array = global.Array; const array = new Array(value); const value4 = 0; if (value4 < value) { r0 = value4; reducibleLoop1: while (true) { array[r0] = arguments[r0]; value5 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1; if (value5 < value) { r0 = value5; continue reducibleLoop1; } break reducibleLoop1; } } let length = array.length; value = null; reducibleJoin4: while (true) { if (length > value4) { length = array.length; property = array[length - 1]; r7 = property; break reducibleJoin4; } r7 = value; break reducibleJoin4; } length = array.length; reducibleJoin6: while (true) { if (length > 1) { length = array.length; property = array[length - 2]; r1 = property; break reducibleJoin6; } r1 = value; break reducibleJoin6; } const value6 = typeof r7 === 'function'; const value7 = typeof r1 === 'function'; reducibleJoin8: while (true) { if (value7) { value8 = environment.__proto__.__proto__.__proto__; moduleValue = require(44) /* metro dependency 44 */; moduleValue(value6, 'Cannot have a non-function arg after a function arg.'); break reducibleJoin8; } break reducibleJoin8; } const r5 = value6 ? r7 : value; const r6 = value7 ? r1 : value; value = array.slice(value4, array.length - (value6 + value7)); if (importDefault === 'sync') { value11 = environment.__proto__.__proto__.__proto__; property = (require(63) /* metro dependency 63 */).default; return property.callNativeSyncHook(env0_0, require, value, r6, r5); } property = (require(63) /* metro dependency 63 */).default; property.enqueueNativeCall(env0_0, require, value, r6, r5); } function _fun1390(a0, a1) { // fn#1390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:81:767, offset: 0x00c5b20c, size: 89 bytes, params: 3, frame: 20 const env0_0 = a0; const env0_1 = a1; const property = (require(63) /* metro dependency 63 */).default; property.enqueueNativeCall(env1_0, require, env0_0, _fun1391, _fun1392); } function _fun1392(a0) { // fn#1392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:81:849, offset: 0x00c5b265, size: 50 bytes, params: 2, frame: 15 let value = a0; const binding = env1_1; const Object = global.Object; value = Object.assign(binding, value || ({})); return require(value); }