/* Metro module 558; source: unknown; dependencies: [] */ function _fun6719(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#6719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:608:6, offset: 0x00d06e27, size: 168 bytes, params: 8, frame: 8 const exports_67202 = exports_6720; if (module !== undefined) { module.exports = exports_67202; } let prototype = exports_67202.prototype; const prototype2 = exports_67202.prototype; const closure2 = function(a0, a1) { var r3; var _callbacks = this._callbacks; this._callbacks = _callbacks || ({}); _callbacks = this._callbacks; var value = '$' + a0; r3 = this._callbacks['$' + a0] || []; _callbacks[value] = r3; r3.push(a1); return this; }; prototype2.addEventListener = closure2; prototype.on = closure2; exports_67202.prototype.once = function(a0, a1) { var env0_0 = a0; var env0_1 = a1; var closure = _fun6723; var env0_2 = closure; closure.fn = a1; this.on(a0, closure); return this; }; prototype = exports_67202.prototype; const prototype3 = exports_67202.prototype; const prototype4 = exports_67202.prototype; const prototype5 = exports_67202.prototype; const removeEventListener_67242 = removeEventListener_6724; prototype5.removeEventListener = removeEventListener_67242; prototype4.removeAllListeners = removeEventListener_67242; prototype3.removeListener = removeEventListener_67242; prototype.off = removeEventListener_67242; exports_67202.prototype.emit = emit; exports_67202.prototype.listeners = function(a0) { var property = this._callbacks; this._callbacks = property || ({}); property = this._callbacks; property = property['$' + a0]; return property || []; }; exports_67202.prototype.hasListeners = function(a0) { return !!this.listeners(a0).length; }; function exports_6720(a0) { // fn#6720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:608:31, offset: 0x00d06ecf, size: 63 bytes, params: 2, frame: 9 var propertyName; var prototype2; if (a0) { for (propertyName in exports_6720.prototype) { prototype2 = exports_6720.prototype; a0[propertyName] = prototype2[propertyName]; } return a0; } } function once_6722(a0, a1) { // fn#6722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:608:385, offset: 0x00d06f5a, size: 47 bytes, params: 3, frame: 14 const env0_0 = a0; const env0_1 = a1; const on2 = on; on2.fn = a1; this.on(a0, on2); return this; function on() { // fn#6723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:608:399, owner: once_6722.on, offset: 0x00d06f89, size: 48 bytes, params: 1, frame: 16 this.off(env0_0, on_2); require.apply(this, arguments); } } } function off(a0, a1) { // fn#6724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:608:617, offset: 0x00d06fb9, size: 184 bytes, params: 3, frame: 20 var r8; var length; var property2; var fn; var value2; var splice; this._callbacks = this._callbacks || ({}); const value = 0; if (value == arguments.length) { this._callbacks = {}; } else { var property = this._callbacks['$' + a0]; if (property) { if (arguments.length == 1) { delete this._callbacks['$' + a0]; return this; } length = property.length; if (value < length) { r8 = value; loopExit7: while (true) { property2 = property[r8]; if (property2 === a1) { splice = property.splice; Reflect.apply(splice, property, [r8, 1]); break loopExit7; } fn = property2.fn; if (fn === a1) { splice = property.splice; Reflect.apply(splice, property, [r8, 1]); break loopExit7; } value2 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1; length = property.length; if (value2 < length) { r8 = value2; continue; } break loopExit7; } } length = property.length; if (value === length) { delete this._callbacks['$' + a0]; } return this; } } return this; } function emit(a0) { // fn#6725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:608:989, offset: 0x00d07071, size: 166 bytes, params: 2, frame: 17 var r1; var r2; var value5; var value6; var slice; var value7; var length; var apply; const _callbacks = this._callbacks; reducibleJoin2: while (true) { if (_callbacks) { r1 = _callbacks; break reducibleJoin2; } r1 = {}; break reducibleJoin2; } this._callbacks = r1; const Array = global.Array; let value = 1; const array = new Array(arguments.length - value); let property = this._callbacks['$' + a0]; if (value < arguments.length) { r2 = value; reducibleLoop3: while (true) { value5 = r2 - value; array[value5] = arguments[r2]; value6 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; if (value6 < arguments.length) { r2 = value6; continue reducibleLoop3; } break reducibleLoop3; } } reducibleJoin7: while (true) { if (!property) { break reducibleJoin7; } slice = property.slice; value = 0; value7 = Reflect.apply(slice, property, [value]); length = value7.length; if (!(value < length)) { break reducibleJoin7; } r1 = value; reducibleLoop6: while (true) { property = value7[r1]; apply = property.apply; Reflect.apply(apply, property, [this, array]); value = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1; if (value < length) { r1 = value; continue reducibleLoop6; } break reducibleJoin7; } } return this; } global.__d(_fun6719, 558, []) /* metro module 558 */;