/* Metro module 4297; source: stores/VoiceStateStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 4298, 661, 4299, 22, 1581, 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 Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */ import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import VoiceStateRecord from '../records/VoiceStateRecord.tsx'; /* Metro dependency 4298 */ import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */ import * as CallConstantsModule from '../modules/calls/CallConstants.tsx'; /* Metro dependency 4299 */ function _fun36527(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:6, offset: 0x0108da4b, size: 610 bytes, params: 8, frame: 21 let env0_0 = require; const _arrayLikeToArray_36533 = function(a0, a1) { var r0; var r1; var r2; var value3; var length; var value5; var value = undefined; var value2 = value == null; reducibleJoin2: while (true) { if (value2) { r0 = value2; break reducibleJoin2; } value3 = value > a0.length; r0 = value3; break reducibleJoin2; } reducibleJoin4: while (true) { if (r0) { length = a0.length; r1 = length; break reducibleJoin4; } r1 = value; break reducibleJoin4; } value = (0, global.Array)(r1); var value4 = 0; if (value4 < r1) { r2 = value4; reducibleLoop5: while (true) { value[r2] = a0[r2]; value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; if (value5 < r1) { r2 = value5; continue reducibleLoop5; } break reducibleLoop5; } } return value; }; const makeParticipantPlatformKey = function(a0, a1) { return '' + a0 + ':' + a1; }; const getRecords = function(a0, a1) { var r0; var object; var property = a0[a1]; if (property != null) { r0 = property; } else { object = {}; a0[a1] = object; r0 = object; } return r0; }; const mergeVoiceState = function(a0, a1) { var env0_0 = a1; var updateVoiceStateBinding = updateVoiceState; var userId = a1.userId; return updateVoiceStateBinding(a0, userId, _fun36542); }; const GUILD_DELETE_365432 = GUILD_DELETE_36543; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_16 = {}; const Set = global.Set; const set = new Set(); const Map = global.Map; let map = new Map(); const env0_19 = {}; const env0_20 = {}; const env0_21 = {}; const env0_22 = {}; const Store = (Flux).Store; _fun36546(Store).displayName = 'VoiceStateStore'; map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: CONNECTION_OPEN_36568, CONNECTION_OPEN_SUPPLEMENTAL: CONNECTION_OPEN_SUPPLEMENTAL_36569, OVERLAY_INITIALIZE: OVERLAY_INITIALIZE_36570, VOICE_CHANNEL_SELECT: VOICE_CHANNEL_SELECT_36573, VOICE_STATE_UPDATES: function({voiceStates}) { return voiceStates.reduce(_fun36576, false); }, GUILD_DELETE: GUILD_DELETE_365432, GUILD_CREATE: GUILD_DELETE_365432, CHANNEL_DELETE: function({channel}) { clearCall(channel.id); }, CALL_DELETE: function({channelId}) { clearCall(channelId); }, PASSIVE_UPDATE_V2: PASSIVE_UPDATE_V2_36579, RTC_CONNECTION_PLATFORM: RTC_CONNECTION_PLATFORM}); (FileImportTrackerModule).fileFinishedImporting('stores/VoiceStateStore.tsx'); exports.default = map; function _isNativeReflectConstruct_36528() { // fn#36528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:214, offset: 0x0108dcad, 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_36528_isNativeReflectConstruct = function() { return !!result; })(); } function _createForOfIteratorHelperLoose_36531(a0, a1) { // fn#36531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:407, offset: 0x0108dd0b, size: 370 bytes, params: 3, frame: 20 var r6; var r9; var r5; var value3; var regexp; const env0_0 = a0; const Symbol = global.Symbol; let value = typeof Symbol !== 'undefined'; let r1 = value && a0[global.Symbol.iterator]; r1 = !r1 ? a0['@@iterator'] : r1; if (r1) { value = r1.call(a0); return value.next.bind(value); } const Array = global.Array; if (Array.isArray(a0)) { if (r1) { } return _fun36532; } value = undefined; if (a0) { if (typeof a0 === 'string') { value = _arrayLikeToArray_36533(a0, value); r5 = value; } else { value3 = ({}).toString.call(a0).slice(8, -1); r6 = value3 === 'Object' && a0.constructor; r9 = r6 ? a0.constructor.name : value3; if (r9 === 'Map') { r6 = global.Array.from(a0); } else if (r9 === 'Set') { r6 = global.Array.from(a0); } else if (r9 === 'Arguments') { value = _arrayLikeToArray_36533(a0, value); r6 = value; } else { regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', ''); if (regexp.test(r9)) { value = _arrayLikeToArray_36533(a0, value); r6 = value; } else { r6 = value; } } r5 = r6; } } else { r5 = value; } if (r5) { if (r5) { } return _fun36532; } const TypeError = global.TypeError; throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'); function _fun36532() { // fn#36532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:978, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5 return env0_1 >= env0_0.length ? {done: true} : {done: false, value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]}; } } function clearCall(a0) { // fn#36536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:1501, offset: 0x0108de98, size: 73 bytes, params: 2, frame: 14 const env0_0 = a0; (importDefault(22) /* metro dependency 22 */).each(env0_16[ME] ?? ({}), _fun36537); function _fun36537({channelId}, a1) { // fn#36537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:1567, offset: 0x0108dee1, size: 53 bytes, params: 3, frame: 15 var environment; if (channelId === env0_0) { value = environment.__proto__; updateVoiceState(ME, a1, function() { return null; }); } } } function getOrCreateUsersWithVideo(a0) { // fn#36539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:1628, offset: 0x0108df16, size: 56 bytes, params: 2, frame: 11 return env0_18.get(a0) ?? new global.Set(); } function updateVoiceState(a0, a1, a2) { // fn#36540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:1708, offset: 0x0108df4e, size: 516 bytes, params: 4, frame: 21 var r9; var r7; var items2; var channelId; var orCreateUsersWithVideo; var set; let value = a0; let getRecordsBinding = getRecords; let binding = env0_16; const recordsBinding = getRecordsBinding(binding, value ?? ME); const property = recordsBinding[a1]; const value4 = a2(property); if (property === value4) { items2 = [false, value4, property]; } else { if (property != null) { delete recordsBinding[a1]; channelId = property.channelId; if (channelId != null) { getRecordsBinding = getRecords; binding = env0_19; channelId = property.channelId; delete getRecordsBinding(binding, channelId)[a1]; binding = env0_20; channelId = property.channelId; delete getRecordsBinding(binding, channelId)[a1]; } if (property.sessionId != null) { delete getRecords(env0_21, a1)[property.sessionId]; } r9 = value ?? ME; orCreateUsersWithVideo = getOrCreateUsersWithVideo(r9); if (orCreateUsersWithVideo.has(a1)) { set = new global.Set(); set.delete(a1); if (set.size === 0) { env0_18.delete(r9); } else { env0_18.set(r9, set); } } } if (value4 != null) { recordsBinding[a1] = value4; if (value4.channelId != null) { getRecords(env0_19, value4.channelId)[a1] = value4; if (value4.selfVideo) { getRecords(env0_20, value4.channelId)[a1] = value4; r7 = value ?? ME; value = getOrCreateUsersWithVideo(r7); if (!value.has(a1)) { set = new global.Set(value); set.add(a1); env0_18.set(r7, set); } } } if (value4.sessionId != null) { getRecords(env0_21, a1)[value4.sessionId] = value4; } } items2 = [true, value4, property]; } return items2; } function mergeVoiceState(a0, a1) { // fn#36541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:2444, offset: 0x0108e152, size: 40 bytes, params: 3, frame: 15 const env0_0 = a1; const updateVoiceStateBinding = updateVoiceState; const userId = a1.userId; return updateVoiceStateBinding(a0, userId, _fun36542); function _fun36542(a0) { // fn#36542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:2510, offset: 0x0108e17a, size: 220 bytes, params: 2, frame: 13 if (require.channelId == null) { return null; } const object = {}; object.channelId = require.channelId; object.deaf = require.deaf; object.mute = require.mute; object.requestToSpeakTimestamp = require.requestToSpeakTimestamp; object.selfDeaf = require.selfDeaf; object.selfMute = require.selfMute; object.selfStream = require.selfStream; object.selfVideo = require.selfVideo; object.sessionId = require.sessionId; object.suppress = require.suppress; const userId = require.userId; object.userId = userId; object.discoverable = require.discoverable; object.connectedAt = require.connectedAt; return a0 != null ? a0.merge(object) : new VoiceStateRecord(object); } } function GUILD_CREATE_36543({guild}) { // fn#36543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:2887, offset: 0x0108e256, size: 83 bytes, params: 2, frame: 17 const defaultImport = Module00022; defaultImport.forEach(env0_16[guild.id], function(a0) { var updateVoiceStateBinding = updateVoiceState; var id = guild.id; var userId = a0.userId; updateVoiceStateBinding(id, userId, _fun36545); }); delete env0_16[guild.id]; function _fun36544({userId}) { // fn#36544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:2958, offset: 0x0108e2a9, size: 45 bytes, params: 2, frame: 15 updateVoiceState(guild.id, userId, function() { return null; }); } } function _fun36546(a0) { // fn#36546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:3029, offset: 0x0108e2d6, size: 492 bytes, params: 2, frame: 16 const VoiceStateStore2 = VoiceStateStore; Inherits(VoiceStateStore2, a0); return CreateClass(VoiceStateStore2, [{key: 'getAllVoiceStates', value: value_36548}, {key: 'getVoiceStateVersion', value: value_36549}, {key: 'getVoiceStates', value: value_36550}, {key: 'getVoiceStatesForChannel', value: value_36551}, {key: 'getVideoVoiceStatesForChannel', value: value_36552}, {key: 'getVoiceState', value: function(a0, a1) { return this.getVoiceStates(a0)[a1]; }}, {key: 'getDiscoverableVoiceState', value: function(a0, a1) { var value = this.getVoiceState(a0, a1); var value2 = null; return value2 == value || value.discoverable === false ? value2 : value; }}, {key: 'getVoiceStateForChannel', value: value_36555}, {key: 'getVoiceStateForUser', value: value_36556}, {key: 'getDiscoverableVoiceStateForUser', value: value_36557}, {key: 'getVoiceStateForSession', value: value_36559}, {key: 'getUserVoiceChannelId', value: function(a0, a1) { return this.getVoiceState(a0, a1)?.channelId; }}, {key: 'getCurrentClientVoiceChannelId', value: value_36561}, {key: 'getUsersWithVideo', value: value_36562}, {key: 'isCurrentClientInVoiceChannel', value: value_36563}, {key: 'isInChannel', value: value_36564}, {key: 'hasVideo', value: value_36565}, {key: 'getVoicePlatformForChannel', value: value_36566}, {key: 'userHasBeenMovedVersion', get: get_36567}]); function VoiceStateStore() { // fn#36547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:3041, offset: 0x0108e4c2, size: 113 bytes, params: 1, frame: 20 const value = environment.__proto__; env1_5(this, VoiceStateStore); const value3 = env1_8(VoiceStateStore); return env1_7(this, _isNativeReflectConstruct_36528() ? global.Reflect.construct(value3, arguments, env1_8(this).constructor) : value3.apply(this, arguments)); } function value_36548() { // fn#36548, offset: 0x00df0e94, size: 9 bytes, params: 1, frame: 1 return env1_16; } function value_36549() { // fn#36549, offset: 0x00df0e8b, size: 9 bytes, params: 1, frame: 1 return env1_15; } function value_36550(a0) { // fn#36550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:3447, offset: 0x0108e533, size: 34 bytes, params: 2, frame: 14 return getRecords(env1_16, a0 ?? ME); } function value_36551(a0) { // fn#36551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:3532, offset: 0x0108e555, size: 24 bytes, params: 2, frame: 13 return getRecords(env1_19, a0); } function value_36552(a0) { // fn#36552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:3612, offset: 0x0108e56d, size: 24 bytes, params: 2, frame: 13 return getRecords(env1_20, a0); } function value_36555(a0) { // fn#36555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:3890, offset: 0x0108e5d2, size: 53 bytes, params: 2, frame: 14 let value = a1; const value2 = undefined; const r2 = value !== value2 ? value : env1_3; value = environment.__proto__; value = getRecords(env1_19, a0); return value == null ? value2 : value[r2]; } function value_36556(a0) { // fn#36556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:3993, offset: 0x0108e607, size: 48 bytes, params: 2, frame: 15 const Object = global.Object; const values = Object.values; const value = environment.__proto__; return Reflect.apply(values, Object, [getRecords(env1_21, a0)])[0]; } function value_36557(a0) { // fn#36557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:4094, offset: 0x0108e637, size: 60 bytes, params: 2, frame: 15 var environment; const Object = global.Object; const values = Object.values; const value = environment.__proto__; return Reflect.apply(values, Object, [getRecords(env1_21, a0)]).find(function(a0) { return a0.discoverable !== false; }); } function value_36559(a0, a1) { // fn#36559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:4214, offset: 0x0108e684, size: 52 bytes, params: 3, frame: 16 var r0; var value2; var getRecordsBinding; var value3; var recordsBinding; const value = null; if (value != a1) { value2 = environment.__proto__; getRecordsBinding = getRecords; value3 = undefined; recordsBinding = getRecordsBinding(env1_21, a0); r0 = value == recordsBinding ? value3 : recordsBinding[a1]; } else { r0 = value; } return r0; } function value_36561(a0) { // fn#36561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:4455, offset: 0x0108e6df, size: 72 bytes, params: 2, frame: 14 const voiceState = this.getVoiceState(a0, env1_3); const value3 = null; return value3 != voiceState && value3 != env1_4 ? voiceState.sessionId !== env1_4 ? value3 : voiceState.channelId : value3; } function value_36562(a0) { // fn#36562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:4588, offset: 0x0108e727, size: 32 bytes, params: 2, frame: 12 return env1_18.get(a0) ?? env1_17; } function value_36563() { // fn#36563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:4681, offset: 0x0108e747, size: 51 bytes, params: 1, frame: 6 const value = environment.__proto__; return env1_4 != null && env1_21[env1_3]?.[env1_4] != null; } function value_36564(a0) { // fn#36564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:4776, offset: 0x0108e77a, size: 98 bytes, params: 2, frame: 15 let value = a1; const r2 = value !== undefined ? value : env1_3; if (a0 == null) { return false; } value = this.getVoiceStateForChannel(a0, r2); return value != null && (r2 !== env1_3 || env1_4 != null && value.sessionId === env1_4); } function value_36565(a0) { // fn#36565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:4926, offset: 0x0108e7dc, size: 53 bytes, params: 2, frame: 15 const Object = global.Object; return Object.values(getRecords(env1_20, a0)).length > 0; } function value_36566(a0, a1) { // fn#36566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:5027, offset: 0x0108e811, size: 160 bytes, params: 3, frame: 18 let r0 = env1_4 != null && (env1_21[env1_3] == null || env1_21[env1_3][env1_4] == null ? undefined : env1_21[env1_3][env1_4].channelId); r0 = a1 !== env1_3 ? env1_22[makeParticipantPlatformKey(a1, a0)] : a0 === r0 ? (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? VoicePlatforms.QUEST : VoicePlatforms.MOBILE : env1_22[makeParticipantPlatformKey(a1, a0)]; return r0; } function get_36567() { // fn#36567, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1 return env1_14; } } function CONNECTION_OPEN_36568({user, sessionId}) { // fn#36568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:5354, offset: 0x0108e8b1, size: 99 bytes, params: 2, frame: 13 const r0 = env0_3 != null && env0_3 !== user.id; if (r0) { env0_16 = {}; env0_19 = {}; env0_21 = {}; env0_20 = {}; env0_18.clear(); } const id = user.id; return r0; } function CONNECTION_OPEN_SUPPLEMENTAL_36569() { // fn#36569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:5515, offset: 0x0108e914, size: 45 bytes, params: 1, frame: 9 env0_16 = {}; env0_19 = {}; env0_21 = {}; env0_20 = {}; env0_18.clear(); } function OVERLAY_INITIALIZE_36570({voiceStates, user, sessionId}) { // fn#36570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:5609, offset: 0x0108e941, size: 232 bytes, params: 2, frame: 25 var r5; var r12; var property; var value4; var OVERLAY_INITIALIZE_36570_loop2; var value5; var value6; var value7; var value8; var env0_0; var env0_1; env0_16 = {}; env0_19 = {}; env0_21 = {}; env0_20 = {}; let Object = global.Object; const value2 = Object.entries(voiceStates); let length = value2.length; if (0 < length) { r5 = 0; reducibleLoop1: while (true) { property = value2[r5]; value4 = Module00057(property, 2); env0_0 = value4[0]; property = value4[1]; OVERLAY_INITIALIZE_36570_loop2 = OVERLAY_INITIALIZE_36570_loop; Object = global.Object; value5 = Object.entries(property); length = value5.length; if (0 < length) { r12 = 0; reducibleLoop2: while (true) { property = value5[r12]; value6 = Module00057(property, 2); env0_1 = value6[0]; OVERLAY_INITIALIZE_36570_loop2(value6[1]); value7 = typeof r12 === 'bigint' ? r12 + 1n : +r12 + 1; length = value5.length; if (value7 < length) { r12 = value7; continue reducibleLoop2; } break reducibleLoop2; } } value8 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1; length = value2.length; if (value8 < length) { r5 = value8; continue reducibleLoop1; } break reducibleLoop1; } } env0_3 = user.id; function OVERLAY_INITIALIZE_36570_loop(a0) { // fn#36571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:5789, owner: OVERLAY_INITIALIZE_36570._loop, offset: 0x0108ea29, size: 43 bytes, params: 2, frame: 15 updateVoiceState(a0, env0_1, _fun36572); function _fun36572() { // fn#36572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:5823, offset: 0x0108ea54, size: 36 bytes, params: 1, frame: 11 let value = environment.__proto__.__proto__; const voiceStateRecordBinding = VoiceStateRecord; const binding = env0_0; value = Object.create(voiceStateRecordBinding.prototype, {constructor: {value: voiceStateRecordBinding}}); const voiceStateRecord2 = new voiceStateRecordBinding(binding); return voiceStateRecord2 instanceof Object ? voiceStateRecord2 : value; } } } function VOICE_CHANNEL_SELECT_36573({guildId, channelId}) { // fn#36573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:5951, offset: 0x0108ea78, size: 65 bytes, params: 2, frame: 16 return Module00057(updateVoiceState(guildId, env0_3, _fun36574), 1)[0]; function _fun36574(a0) { // fn#36574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:6038, offset: 0x0108eab9, size: 38 bytes, params: 2, frame: 14 return a0?.set('channelId', channelId); } } function VOICE_STATE_UPDATES_36575({voiceStates}) { // fn#36575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:6117, offset: 0x0108eadf, size: 32 bytes, params: 2, frame: 13 return voiceStates.reduce(_fun36576, false); function _fun36576(a0, a1) { // fn#36576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:6184, offset: 0x0108eaff, size: 141 bytes, params: 3, frame: 17 var r1; var r0; var binding; let value = a0; const value4 = env1_10(mergeVoiceState(a1.guildId, a1), 3); const property = value4[0]; const property2 = value4[1]; const property3 = value4[2]; if (property) { value = a1.sessionId === env1_4; r1 = value && property2 != null; r1 = r1 && property3 != null; r1 = r1 && property3.channelId !== property2.channelId; if (r1) { env1_14 += 1; } binding = env1_15; env1_15 = typeof binding === 'bigint' ? binding + 1n : +binding + 1; value = true; r0 = value; } else { r0 = value; } return r0; } } function PASSIVE_UPDATE_V2_36579(a0) { // fn#36579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:6590, offset: 0x0108ebc1, size: 193 bytes, params: 2, frame: 23 var r3; var r4; var r0; var value5; var mergeVoiceStateBinding; var guildId; var value6; var property; var value7; var value10; var updateVoiceStateBinding; var value11; var value12; var binding; const value2 = _createForOfIteratorHelperLoose_36531(a0.voiceStates); const value3 = value2(); let done = value3.done; const value4 = false; if (done) { r0 = value4; } else { r3 = value4; r4 = value3; reducibleLoop1: while (true) { value5 = r4.value; mergeVoiceStateBinding = mergeVoiceState; guildId = a0.guildId; value6 = mergeVoiceStateBinding(guildId, value5); property = Module00057(value6, 1)[0]; if (!r3) { r3 = property; } value7 = value2(); done = value7.done; if (done) { r0 = r3; break reducibleLoop1; } r4 = value7; continue reducibleLoop1; } } const value8 = _createForOfIteratorHelperLoose_36531(a0.removedVoiceStateUsers); const value9 = value8(); done = value9.done; if (!done) { r3 = value9; reducibleLoop4: while (true) { value10 = r3.value; updateVoiceStateBinding = updateVoiceState; guildId = a0.guildId; updateVoiceStateBinding(guildId, value10, function() { return null; }); value11 = value8(); done = value11.done; value12 = true; if (done) { r0 = value12; break reducibleLoop4; } r3 = value11; continue reducibleLoop4; } } reducibleJoin7: while (true) { if (r0) { binding = env0_15; env0_15 = typeof binding === 'bigint' ? binding + 1n : +binding + 1; break reducibleJoin7; } break reducibleJoin7; } return r0; } function RTC_CONNECTION_PLATFORM({userId, channelId, platform}) { // fn#36581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4469:6955, offset: 0x0108ec82, size: 44 bytes, params: 2, frame: 15 env0_22[makeParticipantPlatformKey(userId, channelId)] = platform; } } function _fun36545() { // fn#36545, offset: 0x00c58c16, size: 4 bytes, params: 1, frame: 1 return null; } global.__d(_fun36527, 4297, [6, 7, 15, 17, 18, 57, 4298, 661, 4299, 22, 1581, 566, 694, 2]) /* metro module 4297, dependencies: [6, 7, 15, 17, 18, 57, 4298, 661, 4299, 22, 1581, 566, 694, 2] */;