/* Metro module 5110; source: stores/ConnectedAppsStore.tsx; dependencies: [6, 7, 15, 17, 18, 22, 566, 694, 2] */ import ClassCallCheck from '../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */ import CreateClass from '../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */ import PossibleConstructorReturn from '../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */ import Module00017 from '../by-id/module-00017.js'; /* Metro dependency 17 */ import Inherits from '../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */ import Module00022 from '../by-id/module-00022.js'; /* Metro dependency 22 */ import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ function _fun44660(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:6, offset: 0x01176628, size: 305 bytes, params: 8, frame: 18 const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let env0_7 = {}; const Store = (Flux).Store; let value = _fun44664(Store); value.displayName = 'ConnectedAppsStore'; value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {OVERLAY_INITIALIZE: function({connectedApps}) { var object = {}; copyDataProperties(object, connectedApps, object); env0_7 = object; }, RPC_APP_CONNECTED: RPC_APP_CONNECTED_44673, RPC_APP_AUTHENTICATED: RPC_APP_AUTHENTICATED, RPC_APP_DISCONNECTED: RPC_APP_DISCONNECTED_44675}); (FileImportTrackerModule).fileFinishedImporting('stores/ConnectedAppsStore.tsx'); exports.default = value; function _isNativeReflectConstruct_44661() { // fn#44661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:148, offset: 0x01176759, 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_44661_isNativeReflectConstruct = function() { return !!result; })(); } function _fun44664(a0) { // fn#44664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:356, offset: 0x011767b7, size: 164 bytes, params: 2, frame: 16 const ConnectedAppsStore2 = ConnectedAppsStore; Inherits(ConnectedAppsStore2, a0); return CreateClass(ConnectedAppsStore2, [{key: 'isConnected', value: value_44666}, {key: 'isChildConnected', value: value_44667}, {key: 'connections', get: get_44669}, {key: 'getApplication', value: value_44670}, {key: 'getAllConnections', value: value_44671}]); function ConnectedAppsStore() { // fn#44665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:368, offset: 0x00c6223c, size: 113 bytes, params: 1, frame: 20 const value = environment.__proto__; env1_2(this, ConnectedAppsStore); const value3 = env1_5(ConnectedAppsStore); return env1_4(this, _isNativeReflectConstruct_44661() ? global.Reflect.construct(value3, arguments, env1_5(this).constructor) : value3.apply(this, arguments)); } function value_44666(a0) { // fn#44666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:677, offset: 0x0117685b, size: 22 bytes, params: 2, frame: 2 return env1_7[a0] != null; } function value_44667(a0) { // fn#44667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:739, offset: 0x01176871, size: 61 bytes, params: 2, frame: 13 var environment; var r0; var Object; var values; const env0_0 = a0; let value = a0 != null; if (value) { Object = global.Object; values = Object.values; value = environment.__proto__; value = Reflect.apply(values, Object, [env1_7]); value = value.some(_fun44668); r0 = value; } else { r0 = value; } return r0; function _fun44668({parentId}) { // fn#44668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:790, offset: 0x011768ae, size: 22 bytes, params: 2, frame: 2 return parentId === env0_0; } } function get_44669() { // fn#44669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:835, offset: 0x011768c4, size: 41 bytes, params: 1, frame: 12 return (Module00022).values(env1_7); } function value_44670(a0) { // fn#44670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:901, offset: 0x0103ab8e, size: 16 bytes, params: 2, frame: 2 return env1_7[a0]; } function value_44671() { // fn#44671, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1 return env1_7; } } function RPC_APP_CONNECTED_44673({application}) { // fn#44673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:1153, offset: 0x0117690c, size: 141 bytes, params: 2, frame: 6 let id = application.id; if (id == null) { return false; } id = application.id; if (env0_7[id] == null) { env0_7[id] = {count: 0, id: application.id, parentId: application.parentId, name: application.name, icon: application.icon, coverImage: application.coverImage, authenticated: false}; } const property = env0_7[id]; const count = property.count; property.count = typeof count === 'bigint' ? count + 1n : +count + 1; } function RPC_APP_AUTHENTICATED({application}) { // fn#44674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:1391, offset: 0x01176999, size: 73 bytes, params: 2, frame: 5 if (application.id != null && env0_7[application.id] != null) { env0_7[application.id].authenticated = true; } } function RPC_APP_DISCONNECTED_44675({application}) { // fn#44675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5288:1516, offset: 0x011769e2, size: 116 bytes, params: 2, frame: 5 var binding; var property; var count; let id = application.id; if (id != null && env0_7[application.id] != null) { binding = env0_7; id = application.id; property = binding[id]; count = property.count; property.count = typeof count === 'bigint' ? count - 1n : +count - 1; binding = env0_7; id = application.id; count = binding[id].count; if (count === 0) { delete env0_7[application.id]; } } } } global.__d(_fun44660, 5110, [6, 7, 15, 17, 18, 22, 566, 694, 2]) /* metro module 5110, dependencies: [6, 7, 15, 17, 18, 22, 566, 694, 2] */;