/* Metro module 13007; source: modules/voice_calls/native/VoiceNotificationManager.android.tsx; dependencies: [15, 17, 18, 57, 6, 7, 27, 1378, 4234, 4492, 1379, 4259, 4294, 3793, 4607, 1878, 661, 697, 13008, 7146, 7145, 10867, 8845, 4805, 1244, 4561, 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 Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import EmbeddedActivitiesStore from '../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */ import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */ import ApplicationStore from '../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */ import MediaEngineStore from '../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */ import RTCConnectionStore from '../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */ import ApplicationStreamingStore from '../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */ import SpeakingStore from '../../../stores/SpeakingStore.tsx'; /* Metro dependency 4607 */ import AndroidVoiceNotificationExperiment from './AndroidVoiceNotificationExperiment.tsx'; /* Metro dependency 13008 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */ import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as ForegroundServiceManagerTypesModule from '../../foreground_service/mobile/ForegroundServiceManagerTypes.tsx'; /* Metro dependency 7146 */ function _fun99197(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:6, offset: 0x021bf5cc, size: 555 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const processColor = (ReactNativeModule).processColor; const BRAND_500 = (Native).unsafe_rawColors.BRAND_500; const env0_19 = processColor(BRAND_500); const GREEN_NEW_40 = (Native).unsafe_rawColors.GREEN_NEW_40; const env0_20 = processColor(GREEN_NEW_40); const RED_NEW_46 = (Native).unsafe_rawColors.RED_NEW_46; const env0_21 = processColor(RED_NEW_46); let value = _fun99201(); value = new value(); value = importDefault(4561) /* metro dependency 4561: LifecycleManager */; value = _fun99213(value); value = new value(); (FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/VoiceNotificationManager.android.tsx'); exports.default = value; function _isNativeReflectConstruct_99198() { // fn#99198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:299, offset: 0x021bf7f7, 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_99198_isNativeReflectConstruct = function() { return !!result; })(); } function _fun99201() { // fn#99201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:629, offset: 0x021bf859, size: 84 bytes, params: 1, frame: 15 return CreateClass(VoiceNotificationManager, [{key: 'initialize', value: function() { RTCConnectionStore.addChangeListener(this.handleVoiceStateChange); MediaEngineStore.addChangeListener(this.handleMediaEngineStateChange); EmbeddedActivitiesStore.addChangeListener(this.handleEmbeddedActivityStateChange); ApplicationStreamingStore.addChangeListener(this.handleApplicationStreamStateChange); SpeakingStore.addChangeListener(this.handleSpeakingStateChange); }}, {key: 'terminate', value: function() { RTCConnectionStore.removeChangeListener(this.handleVoiceStateChange); MediaEngineStore.removeChangeListener(this.handleMediaEngineStateChange); EmbeddedActivitiesStore.removeChangeListener(this.handleEmbeddedActivityStateChange); ApplicationStreamingStore.removeChangeListener(this.handleApplicationStreamStateChange); SpeakingStore.removeChangeListener(this.handleSpeakingStateChange); }}]); function VoiceNotificationManager() { // fn#99202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:650, offset: 0x021bf8ad, size: 187 bytes, params: 1, frame: 14 env1_7(this, VoiceNotificationManager); this.voiceServiceHandlerId = 9000; this.state = {'channelId': null, 'connectionState': null, 'selfMute': false, 'deafened': false, 'isPushToTalk': false, 'embeddedActivity': null, 'isStreaming': false, 'isSpeaking': false, channelId: undefined, connectionState: undefined, embeddedActivity: undefined}; this.handleVoiceStateChange = handleVoiceStateChange; this.handleMediaEngineStateChange = handleMediaEngineStateChange; this.handleEmbeddedActivityStateChange = handleEmbeddedActivityStateChange; this.handleApplicationStreamStateChange = handleApplicationStreamStateChange; this.handleSpeakingStateChange = handleSpeakingStateChange; this.getIcon = getIcon_99208; this.handleUpdate = handleUpdate_99209; this.createAction = function(a0, a1, a2) { return {tag: '' + a1 + a0.id, taskName: a1, title: a2, data: {channelId: a0.id}}; }; function handleVoiceStateChange() { // fn#99203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:924, owner: VoiceNotificationManager.handleVoiceStateChange, offset: 0x021bf968, size: 124 bytes, params: 1, frame: 15 var binding; var handleUpdate; var object; let value = environment.__proto__.__proto__; const rtcConnectionStoreBinding = RTCConnectionStore; value = rtcConnectionStoreBinding.getChannelId(); const state = rtcConnectionStoreBinding.getState(); if (!(env0_0.state.channelId === value && env0_0.state.connectionState === state)) { binding = env0_0; handleUpdate = binding.handleUpdate; object = {}; copyDataProperties(object, binding.state, value); object['channelId'] = value; object['connectionState'] = state; Reflect.apply(handleUpdate, binding, [object]); } } function handleMediaEngineStateChange() { // fn#99204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:1125, owner: VoiceNotificationManager.handleMediaEngineStateChange, offset: 0x021bf9e4, size: 222 bytes, params: 1, frame: 16 var binding; var handleUpdate; var object; let value = environment.__proto__.__proto__; const r6 = MediaEngineStore.isSelfMute() || MediaEngineStore.isSelfMutedTemporarily(); const r5 = MediaEngineStore.isSelfDeaf() || MediaEngineStore.isDeaf(); const mode = MediaEngineStore.getMode(); const PUSH_TO_TALK = InputModes.PUSH_TO_TALK; value = mode === PUSH_TO_TALK; if (!(env0_0.state.selfMute === r6 && env0_0.state.deafened === r5 && env0_0.state.isPushToTalk === value)) { binding = env0_0; handleUpdate = binding.handleUpdate; object = {}; copyDataProperties(object, binding.state, r6); object['selfMute'] = r6; object['deafened'] = r5; object['isPushToTalk'] = value; Reflect.apply(handleUpdate, binding, [object]); } } function handleEmbeddedActivityStateChange() { // fn#99205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:1430, owner: VoiceNotificationManager.handleEmbeddedActivityStateChange, offset: 0x021bfac2, size: 82 bytes, params: 1, frame: 14 var value2; var currentEmbeddedActivity; var binding; var handleUpdate; var object; if (env0_0.state.channelId != null) { value2 = environment.__proto__.__proto__; currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity(); binding = env0_0; handleUpdate = binding.handleUpdate; object = {}; copyDataProperties(object, binding.state, currentEmbeddedActivity); object['embeddedActivity'] = currentEmbeddedActivity; Reflect.apply(handleUpdate, binding, [object]); } } function handleApplicationStreamStateChange() { // fn#99206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:1599, owner: VoiceNotificationManager.handleApplicationStreamStateChange, offset: 0x021bfb14, size: 87 bytes, params: 1, frame: 14 var binding; var handleUpdate; var object; let value = environment.__proto__.__proto__; value = ApplicationStreamingStore.getCurrentUserActiveStream(); value = value != null; if (env0_0.state.isStreaming !== value) { binding = env0_0; handleUpdate = binding.handleUpdate; object = {}; copyDataProperties(object, binding.state, value); object['isStreaming'] = value; Reflect.apply(handleUpdate, binding, [object]); } } function handleSpeakingStateChange() { // fn#99207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:1756, owner: VoiceNotificationManager.handleSpeakingStateChange, offset: 0x021bfb6b, size: 81 bytes, params: 1, frame: 14 var binding; var handleUpdate; var object; let value = environment.__proto__.__proto__; value = SpeakingStore.isCurrentUserSpeaking(); if (env0_0.state.isSpeaking !== value) { binding = env0_0; handleUpdate = binding.handleUpdate; object = {}; copyDataProperties(object, binding.state, value); object['isSpeaking'] = value; Reflect.apply(handleUpdate, binding, [object]); } } function VoiceNotificationManagerGetIcon(a0) { // fn#99208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:1882, owner: VoiceNotificationManager.getIcon, offset: 0x021bfbbc, size: 396 bytes, params: 2, frame: 15 const ServiceNotificationIcon = (ForegroundServiceManagerTypesModule).ServiceNotificationIcon; const config = (AndroidVoiceNotificationExperiment).getConfig({location: 'VoiceNotificationManager'}); if (config.enabled) { return a0.deafened ? [ServiceNotificationIcon.DEAFENED, env2_21] : a0.selfMute ? [ServiceNotificationIcon.MUTED, env2_21] : a0.isSpeaking && config.showSpeakingIcon ? [ServiceNotificationIcon.SPEAKING, env2_20] : a0.isPushToTalk ? [ServiceNotificationIcon.DEFAULT, env2_19] : [ServiceNotificationIcon.IDLE, env2_19]; } const DEFAULT = ServiceNotificationIcon.DEFAULT; return [DEFAULT, env2_19]; } function VoiceNotificationManagerHandleUpdate(a0) { // fn#99209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:2361, owner: VoiceNotificationManager.handleUpdate, offset: 0x021bfd48, size: 1127 bytes, params: 2, frame: 31 var compositeInstanceId; var r12; var binding; var getIcon; var state; var value2; var value3; var binding2; var value4; var value5; var property; var property2; var value6; var property3; var property4; var channelId; var selfMute; var deafened; var embeddedActivity; var isStreaming; var channel; var defaultImport; var defaultImport2; var connectionStatusText; var value8; var moduleValue; var channelName; var object; const intl = (IndexNativeModule).intl; const t = (IndexNativeModule).t; const ServiceNotificationPriority = (ForegroundServiceManagerTypesModule).ServiceNotificationPriority; var createAction; var string; var items2; const ServiceNotificationType = (ForegroundServiceManagerTypesModule).ServiceNotificationType; var defaultImport4; let connectionState = a0.connectionState; if (connectionState != null) { binding = env0_0; getIcon = binding.getIcon; state = binding.state; value2 = Reflect.apply(getIcon, binding, [state]); value3 = environment.__proto__.__proto__; binding2 = env2_6; value4 = undefined; value5 = binding2(value2, 2); property = value5[0]; property2 = value5[1]; getIcon = binding.getIcon; value6 = binding2(Reflect.apply(getIcon, binding, [a0]), 2); property3 = value6[0]; property4 = value6[1]; state = binding.state; channelId = state.channelId; if (channelId !== a0.channelId) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; moduleValue = require(4805) /* metro dependency 4805: useChannelName */; channelName = moduleValue.computeChannelName(channel, UserStore, RelationshipStore); object = {}; object.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object.content = value8 + channelName + r12; object.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object.auxiliaryActions = items2; object.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object.usesGateway = true; object.icon = property3; object.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else { connectionState = env0_0.state.connectionState; if (connectionState !== a0.connectionState) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; moduleValue = require(4805) /* metro dependency 4805: useChannelName */; channelName = moduleValue.computeChannelName(channel, UserStore, RelationshipStore); object = {}; object.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object.content = value8 + channelName + r12; object.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object.auxiliaryActions = items2; object.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object.usesGateway = true; object.icon = property3; object.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else { selfMute = env0_0.state.selfMute; if (selfMute !== a0.selfMute) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; moduleValue = require(4805) /* metro dependency 4805: useChannelName */; channelName = moduleValue.computeChannelName(channel, UserStore, RelationshipStore); object = {}; object.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object.content = value8 + channelName + r12; object.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object.auxiliaryActions = items2; object.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object.usesGateway = true; object.icon = property3; object.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else { deafened = env0_0.state.deafened; if (deafened !== a0.deafened) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; moduleValue = require(4805) /* metro dependency 4805: useChannelName */; channelName = moduleValue.computeChannelName(channel, UserStore, RelationshipStore); object = {}; object.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object.content = value8 + channelName + r12; object.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object.auxiliaryActions = items2; object.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object.usesGateway = true; object.icon = property3; object.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else { embeddedActivity = env0_0.state.embeddedActivity; compositeInstanceId = embeddedActivity == null ? value4 : embeddedActivity.compositeInstanceId; embeddedActivity = a0.embeddedActivity; if (compositeInstanceId !== (embeddedActivity == null ? value4 : embeddedActivity.compositeInstanceId)) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; moduleValue = require(4805) /* metro dependency 4805: useChannelName */; channelName = moduleValue.computeChannelName(channel, UserStore, RelationshipStore); object = {}; object.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object.content = value8 + channelName + r12; object.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object.auxiliaryActions = items2; object.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object.usesGateway = true; object.icon = property3; object.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else { isStreaming = env0_0.state.isStreaming; if (isStreaming !== a0.isStreaming) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; moduleValue = require(4805) /* metro dependency 4805: useChannelName */; channelName = moduleValue.computeChannelName(channel, UserStore, RelationshipStore); object = {}; object.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object.content = value8 + channelName + r12; object.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object.auxiliaryActions = items2; object.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object.usesGateway = true; object.icon = property3; object.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else if (property !== property3) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; moduleValue = require(4805) /* metro dependency 4805: useChannelName */; channelName = moduleValue.computeChannelName(channel, UserStore, RelationshipStore); object = {}; object.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object.content = value8 + channelName + r12; object.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object.auxiliaryActions = items2; object.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object.usesGateway = true; object.icon = property3; object.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else if (property2 !== property4) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; moduleValue = require(4805) /* metro dependency 4805: useChannelName */; channelName = moduleValue.computeChannelName(channel, UserStore, RelationshipStore); object = {}; object.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object.content = value8 + channelName + r12; object.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object.auxiliaryActions = items2; object.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object.usesGateway = true; object.icon = property3; object.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else { env0_0.state = a0; } } } } } } } else { env0_0.state = a0; } } } } function _fun99213(a0) { // fn#99213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:4769, offset: 0x021c02dc, size: 97 bytes, params: 2, frame: 16 const VoiceNotificationLifecycleManager2 = VoiceNotificationLifecycleManager; Inherits(VoiceNotificationLifecycleManager2, a0); return CreateClass(VoiceNotificationLifecycleManager2, [{key: '_initialize', value: value_99215}, {key: '_terminate', value: value_99216}]); function VoiceNotificationLifecycleManager() { // fn#99214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:4781, offset: 0x021c033d, size: 113 bytes, params: 1, frame: 20 const value = environment.__proto__; env1_7(this, VoiceNotificationLifecycleManager); const value3 = env1_4(VoiceNotificationLifecycleManager); return env1_3(this, _isNativeReflectConstruct_99198() ? global.Reflect.construct(value3, arguments, env1_4(this).constructor) : value3.apply(this, arguments)); } function value_99215() { // fn#99215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:5165, offset: 0x021c03ae, size: 21 bytes, params: 1, frame: 9 env1_22.initialize(); } function value_99216() { // fn#99216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:5217, offset: 0x021c03c3, size: 21 bytes, params: 1, frame: 9 env1_22.terminate(); } } } global.__d(_fun99197, 13007, [15, 17, 18, 57, 6, 7, 27, 1378, 4234, 4492, 1379, 4259, 4294, 3793, 4607, 1878, 661, 697, 13008, 7146, 7145, 10867, 8845, 4805, 1244, 4561, 2]) /* metro module 13007, dependencies: [15, 17, 18, 57, 6, 7, 27, 1378, 4234, 4492, 1379, 4259, 4294, 3793, 4607, 1878, 661, 697, 13008, 7146, 7145, 10867, 8845, 4805, 1244, 4561, 2] */;