/* Metro module 172; source: unknown; dependencies: [] */ function _fun2521(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#2521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:197:6, offset: 0x00c82b55, size: 133 bytes, params: 8, frame: 5 const closure = function() { }; const exports_25232 = exports_2523; const reject = function(a0, a1) { a0._y = 2; a0._z = a1; if (exports_2523._C) { exports_2523._C(a0, a1); } finale(a0); }; const Handler = function(a0, a1, a2) { var value = a0; var value2 = a1; var value3 = null; this.onFulfilled = typeof value !== 'function' ? value3 : value; this.onRejected = typeof value2 !== 'function' ? value3 : value2; this.promise = a2; }; const env0_1 = {}; module.exports = exports_25232; exports_25232._B = null; exports_25232._C = null; exports_25232._D = closure; exports_25232.prototype.then = then_2534; function exports_2523(a0) { // fn#2523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:197:78, offset: 0x00c82bda, size: 155 bytes, params: 2, frame: 13 if (typeof this !== 'object') { throw new global.TypeError('Promises must be constructed via new'); } if (typeof a0 !== 'function') { throw new global.TypeError("Promise constructor's argument is not a function"); } this._x = 0; this._y = 0; this._z = null; this._A = null; if (a0 !== _D) { doResolve(a0, this); } } function handle(a0, a1) { // fn#2524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:197:353, offset: 0x00c82c75, size: 206 bytes, params: 3, frame: 15 var r3; var r2; var r0; var _z; const value = a0; let _y = value._y; if (_y !== 3) { r2 = value; } else { r3 = value; reducibleLoop1: while (true) { _z = r3._z; _y = _z._y; if (_y === 3) { r3 = _z; continue reducibleLoop1; } r2 = _z; break reducibleLoop1; } } let _B = exports_2523._B; reducibleJoin4: while (true) { if (_B) { exports_2523Binding = exports_2523; _B = exports_2523Binding._B; Reflect.apply(_B, exports_2523Binding, [r2]); break reducibleJoin4; } break reducibleJoin4; } if (r2._y === 0) { if (r2._x === 0) { r2._x = 1; r2._A = a1; r0 = undefined; } else if (r2._x === 1) { r2._x = 2; r2._A = [r2._A, a1]; r0 = undefined; } else { r2._A.push(a1); r0 = undefined; } return r0; } ((a0, a1) => { var env0_0 = a0; var env0_1 = a1; global.setImmediate(_fun2526); })(r2, a1); function handleResolved(a0, a1) { // fn#2525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:197:529, owner: handle.handleResolved, offset: 0x00c82d43, size: 38 bytes, params: 3, frame: 11 const env0_0 = a0; const env0_1 = a1; global.setImmediate(_fun2526); function _fun2526() { // fn#2526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:197:572, offset: 0x00c82d69, size: 251 bytes, params: 1, frame: 15 var r5; var value2; var value3; var value4; var error; var value5; var binding; var value6; const r4 = env0_0._y === 1 ? require.onFulfilled : require.onRejected; if (r4 !== null) { try { value4 = r4(env0_0._z); r5 = value4; } catch (error) { value5 = environment.__proto__.__proto__; error2 = error; binding = env2_1; r5 = binding; } value6 = environment.__proto__.__proto__; if (r5 === env2_1) { reject(require.promise, error2); } else { resolve(require.promise, r5); } } else if (env0_0._y === 1) { value3 = environment.__proto__.__proto__; resolve(require.promise, env0_0._z); } else { value2 = environment.__proto__.__proto__; reject(require.promise, env0_0._z); } } } } function resolve(a0, a1) { // fn#2527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:197:834, offset: 0x00c82e64, size: 252 bytes, params: 3, frame: 15 var r4; var value; var then; var error; var binding; if (a1 === a0) { reject(a0, new global.TypeError('A promise cannot be resolved with itself.')); } else { if (a1) { value = typeof a1; if (value === 'object') { try { then = a1.then; r4 = then; } catch (error) { value = environment; error2 = error; binding = env0_1; r4 = binding; } if (r4 === env0_1) { reject(a0, error2); return undefined; } then = a0.then; if (r4 !== then) { if (typeof r4 === 'function') { doResolve(r4.bind(a1), a0); return undefined; } a0._y = 1; a0._z = a1; finale(a0); return undefined; } if (a1 instanceof exports_2523) { a0._y = 3; a0._z = a1; finale(a0); return undefined; } if (typeof r4 === 'function') { doResolve(r4.bind(a1), a0); return undefined; } a0._y = 1; a0._z = a1; value = environment; finale(a0); return undefined; } if (value !== 'function') { a0._y = 1; a0._z = a1; finale(a0); return undefined; } try { then = a1.then; r4 = then; } catch (error) { value = environment; error2 = error; binding = env0_1; r4 = binding; } if (r4 === env0_1) { reject(a0, error2); return undefined; } then = a0.then; if (r4 !== then) { if (typeof r4 === 'function') { doResolve(r4.bind(a1), a0); return undefined; } a0._y = 1; a0._z = a1; finale(a0); return undefined; } if (a1 instanceof exports_2523) { a0._y = 3; a0._z = a1; finale(a0); return undefined; } if (typeof r4 === 'function') { doResolve(r4.bind(a1), a0); return undefined; } a0._y = 1; a0._z = a1; finale(a0); return undefined; } a0._y = 1; a0._z = a1; finale(a0); } } function finale(a0) { // fn#2529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:197:1318, offset: 0x00c82fa2, size: 133 bytes, params: 2, frame: 15 var r4; var value; var handleBinding; var _A; var length; var value2; reducibleJoin2: while (true) { if (a0._x !== 1) { break reducibleJoin2; } value = environment; handleBinding = handle; _A = a0._A; handleBinding(a0, _A); a0._A = null; break reducibleJoin2; } reducibleJoin6: while (true) { if (a0._x !== 2) { break reducibleJoin6; } _A = a0._A; length = _A.length; value = 0; value2 = environment; if (value < length) { r4 = value; reducibleLoop4: while (true) { handleBinding = handle; _A = a0._A; handleBinding(a0, _A[r4]); value = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1; _A = a0._A; length = _A.length; if (value < length) { r4 = value; continue reducibleLoop4; } break reducibleLoop4; } } a0._A = null; break reducibleJoin6; } } function doResolve(a0, a1) { // fn#2531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:197:1574, offset: 0x00c83065, size: 112 bytes, params: 3, frame: 15 var environment; var r4; var value; var error; var value2; var binding; let env0_0 = a1; const env0_1 = false; try { value = undefined; a0(_fun2532, _fun2533); r4 = value; } catch (error) { value2 = environment; env0_0 = error; binding = env0_1; r4 = binding; } if (!(env0_1 || r4 !== env0_1)) { reject(a1, env0_0); } return value; function _fun2532(a0) { // fn#2532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:197:1674, offset: 0x00c830d5, size: 42 bytes, params: 2, frame: 13 var value2; if (!env0_1) { value2 = environment.__proto__; resolve(require, a0); } } function _fun2533(a0) { // fn#2533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:197:1712, offset: 0x00c830ff, size: 42 bytes, params: 2, frame: 13 var value2; if (!env0_1) { value2 = environment.__proto__; reject(require, a0); } } } function then_2534(a0, a1) { // fn#2534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:197:1867, offset: 0x00c83129, size: 118 bytes, params: 3, frame: 17 if (this.constructor !== exports_2523) { return ((a0, a1, a2) => { var env0_0 = a0; var env0_1 = a1; var env0_2 = a2; var constructor = a0.constructor; var value = Object.create(constructor.prototype, {constructor: {value: constructor}}); var value2 = new constructor(_fun2536); return value2 instanceof Object ? value2 : value; })(this, a0, a1); } const exports_25232 = new exports_2523(_D); handle(this, new Handler(a0, a1, exports_25232)); return exports_25232; function safeThen(a0, a1, a2) { // fn#2535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:197:1918, owner: then_2534.safeThen, offset: 0x00c8319f, size: 55 bytes, params: 4, frame: 11 const env0_0 = a0; const env0_1 = a1; const env0_2 = a2; let constructor = a0.constructor; const value = Object.create(constructor.prototype, {constructor: {value: constructor}}); constructor = new constructor(_fun2536); return constructor instanceof Object ? constructor : value; function _fun2536(a0, a1) { // fn#2536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:197:1969, offset: 0x00c831d6, size: 104 bytes, params: 3, frame: 17 const value = environment.__proto__.__proto__; const exports_25232 = new exports_2523(_D); exports_25232.then(a0, a1); handle(env0_0, new Handler(require, importDefault, exports_25232)); } } } } global.__d(_fun2521, 172, []) /* metro module 172 */;