/* Metro module 10655; source: modules/frames/FramesManager.tsx; dependencies: [7, 6, 15, 17, 18, 8065, 661, 8097, 8101, 683, 4860, 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 FramesStore from './FramesStore.tsx'; /* Metro dependency 8065 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */ import * as EmbeddedActivitiesManagerModule from '../activities/EmbeddedActivitiesManager.tsx'; /* Metro dependency 8097 */ import * as PendingFrameLaunchModule from '../activities/utils/pendingFrameLaunch.tsx'; /* Metro dependency 8101 */ function _fun81954(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10841:6, offset: 0x01ee56da, size: 270 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ConstantsModule; const env0_9 = value.AnalyticEvents; const env0_10 = value.RPCCloseCodes; value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */; value = _fun81958(value); value.displayName = 'FramesManager'; (FileImportTrackerModule).fileFinishedImporting('modules/frames/FramesManager.tsx'); exports.default = value; function _isNativeReflectConstruct_81955() { // fn#81955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10841:205, offset: 0x01ee57e8, size: 98 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_81955_isNativeReflectConstruct = function() { return !!result; })(); } function _fun81958(a0) { // fn#81958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10841:404, offset: 0x01ee584a, size: 42 bytes, params: 2, frame: 14 const FramesManager2 = FramesManager; Inherits(FramesManager2, a0); return CreateClass(FramesManager2); function FramesManager(a0) { // fn#81959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10841:416, offset: 0x01ee5874, size: 201 bytes, params: 2, frame: 20 var r0; var Reflect; let value = copyRestArgs(0, undefined); let binding = env1_4; binding(this, FramesManager); const items2 = []; arraySpread(items2, value, 0, items2); value = env1_6(FramesManager); binding = env1_5; if (_isNativeReflectConstruct_81955()) { Reflect = global.Reflect; value = Reflect.construct(value, items2, env1_6(this).constructor); r0 = value; } else { value = value.apply(this, items2); r0 = value; } value = binding(this, r0); value.actions = {RPC_APP_DISCONNECTED: RPC_APP_DISCONNECTED_81960, FRAME_LAUNCH: FRAME_LAUNCH_81961, FRAME_LAUNCH_FAIL: FRAME_LAUNCH_FAIL_81962, FRAME_STOP: FRAME_STOP_81963}; value.handleRPCDisconnect = handleRPCDisconnect_81964; return value; function FramesManagerRPC_APP_DISCONNECTED(a0) { // fn#81960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10841:673, owner: FramesManager.RPC_APP_DISCONNECTED, offset: 0x01ee593d, size: 25 bytes, params: 2, frame: 11 env0_0.handleRPCDisconnect(a0); } function FramesManagerFRAME_LAUNCH({applicationId}) { // fn#81961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10841:716, owner: FramesManager.FRAME_LAUNCH, offset: 0x01ee5956, size: 46 bytes, params: 2, frame: 12 const value = environment.__proto__.__proto__; (EmbeddedActivitiesManagerModule).trackFrameSessionStart(applicationId); } function FramesManagerFRAME_LAUNCH_FAIL({applicationId}) { // fn#81962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10841:791, owner: FramesManager.FRAME_LAUNCH_FAIL, offset: 0x01ee5984, size: 46 bytes, params: 2, frame: 12 const value = environment.__proto__.__proto__; (PendingFrameLaunchModule).discardPendingFrameLaunch(applicationId); } function FramesManagerFRAME_STOP({applicationId}) { // fn#81963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10841:862, owner: FramesManager.FRAME_STOP, offset: 0x01ee59b2, size: 46 bytes, params: 2, frame: 12 const value = environment.__proto__.__proto__; (EmbeddedActivitiesManagerModule).trackFrameSessionEnd(applicationId); } function FramesManagerHandleRPCDisconnect({reason, application}) { // fn#81964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10841:940, owner: FramesManager.handleRPCDisconnect, offset: 0x01ee59e0, size: 207 bytes, params: 2, frame: 18 var value; var defaultImport; const id = application.id; if (id != null) { if (reason != null) { value = environment.__proto__.__proto__; if (FramesStore.getConnectedFrame()?.applicationId === id) { env0_0.leaveFrame({applicationId: id}); if (reason.code !== RPCCloseCodes.CLOSE_NORMAL) { defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; defaultImport.track(AnalyticEvents.ACTIVITY_CLOSED_RPC_ERROR, {rpc_close_code: reason.code, rpc_message: reason.message, application_id: id}); env0_0.showRPCDisconnectErrorUI(reason); } } } } } } } } global.__d(_fun81954, 10655, [7, 6, 15, 17, 18, 8065, 661, 8097, 8101, 683, 4860, 2]) /* metro module 10655, dependencies: [7, 6, 15, 17, 18, 8065, 661, 8097, 8101, 683, 4860, 2] */;