// Module ID: 8946 // Function ID: 8947 // Name: FramesManager // Dependencies: [8690, 1074, 5270, 6725, 8947, 8692, 1241, 573, 2] // Module 8946 (FramesManager) import DispatcherDefault from "Dispatcher" /* 573 */; import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1241 */; import EmbeddedSurfaceType from "EmbeddedSurfaceType" /* 8692 */; import FramesStore from "FramesStore" /* 8690 */; import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 6725 */; require = fn; const Constants = fn(1074); ({ AnalyticEvents: closure_4, RPCCloseCodes: hasOwnProperty } = Constants); const TransportTypes = fn(5270).TransportTypes; class FramesManager extends tmp3 { constructor() { applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target); closure_0 = applyArgumentsResult; applyArgumentsResult.actions = { RPC_APP_DISCONNECTED(arg0) { applyArgumentsResult.handleRPCDisconnect(arg0); }, FRAME_LAUNCH(arg0) { ({ applicationId, analyticsContext } = arg0); const result = applyArgumentsResult(8947).trackFrameSessionStart(applicationId, analyticsContext); }, FRAME_LAUNCH_FAIL(arg0) { ({ applicationId, error, analyticsContext } = arg0); const result = applyArgumentsResult(8947).trackFrameSessionStartFailed(applicationId, error, analyticsContext); }, FRAME_STOP(applicationId) { applyArgumentsResult(8947).trackFrameSessionEnd(applicationId.applicationId); }, VOICE_CHANNEL_SELECT(arg0) { const result = applyArgumentsResult.handleVoiceChannelSelect(arg0); }, CHANNEL_DELETE(channel) { const framesForChannel = FramesStore.getFramesForChannel(channel.channel.id); for (const item10010 of framesForChannel) { let leaveFrameResult = applyArgumentsResult.leaveFrame(item10010.id); continue; } }, CHANNEL_UPDATES(arg0) { for (const item10008 of tmp) { let tmp2 = item10008; let framesForChannel = FramesStore.getFramesForChannel(item10008.id); for (const item10018 of framesForChannel) { if (item10018.applicationId !== tmp2.application_id) { let leaveFrameResult = applyArgumentsResult.leaveFrame(tmp7.id); } continue; } continue; } } }; applyArgumentsResult.handleVoiceChannelSelect = function handleVoiceChannelSelect(currentVoiceChannelId) { currentVoiceChannelId = currentVoiceChannelId.currentVoiceChannelId; if (null != currentVoiceChannelId) { if (currentVoiceChannelId !== currentVoiceChannelId.channelId) { const obj = { type: EmbeddedSurfaceType.EmbeddedSurfaceType.VOICE_CHANNEL, channelId: currentVoiceChannelId }; const framesForSurface = FramesStore.getFramesForSurface(obj); for (const item10018 of framesForSurface) { let leaveFrameResult = applyArgumentsResult.leaveFrame(item10018.id); continue; } } } }; applyArgumentsResult.handleRPCDisconnect = function handleRPCDisconnect(arg0) { ({ reason, source } = arg0); if (null != reason) { if (source.type === TransportTypes.POST_MESSAGE) { const frameByIframeId = FramesStore.getFrameByIframeId(source.iframeId); if (null != frameByIframeId) { applyArgumentsResult.leaveFrame(frameByIframeId.id); if (reason.code !== constants2.CLOSE_NORMAL) { const obj4 = { rpc_close_code: null, rpc_message: null, application_id: null }; ({ code: obj2.rpc_close_code, message: obj2.rpc_message } = reason); obj4.application_id = frameByIframeId.applicationId; AnalyticsUtilsDefault.track(constants.ACTIVITY_CLOSED_RPC_ERROR, obj4); const result = obj3.showRPCDisconnectErrorUI(reason); } obj3 = applyArgumentsResult; } } } }; return applyArgumentsResult; } } FramesManager.prototype["leaveFrame"] = function leaveFrame(frameId) { const frame = FramesStore.getFrame(frameId); if (null != frame) { ({ applicationId: obj2.applicationId, id: obj2.frameId } = frame); DispatcherDefault.dispatch({ type: "FRAME_STOP", applicationId: null, frameId: null }); const obj3 = { type: "FRAME_STOP", applicationId: null, frameId: null }; } }; FramesManager.displayName = "FramesManager"; const size = fn(2); let result = size.fileFinishedImporting("modules/frames/FramesManager.tsx"); export default FramesManager;