/* Metro module 8358; source: modules/interaction_components/LocalInteractionComponentStateStore.tsx; dependencies: [6, 7, 15, 17, 18, 8359, 566, 694, 2] */ function _fun66556(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:6, offset: 0x01c00a99, size: 498 bytes, params: 8, frame: 20 const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_0 = importDefault(6) /* metro dependency 6 */; const env0_1 = importDefault(7) /* metro dependency 7 */; const env0_2 = importDefault(15) /* metro dependency 15 */; const env0_3 = importDefault(17) /* metro dependency 17 */; const env0_4 = importDefault(18) /* metro dependency 18 */; let value = importDefault(8359) /* metro dependency 8359: LimitedMap */; value = new value(196606); value = importDefault(8359) /* metro dependency 8359: LimitedMap */; value = new value(196606); value = importDefault(8359) /* metro dependency 8359: LimitedMap */; value = new value(196606); const Store = (importDefault(566) /* metro dependency 566: flux */).Store; _fun66562(Store).displayName = 'LocalInteractionComponentStateStore'; value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: LOGOUT_66567, QUEUE_INTERACTION_COMPONENT_STATE: QUEUE_INTERACTION_COMPONENT_STATE, SET_INTERACTION_COMPONENT_STATE: function({rootContainerId, componentId, state}) { setComponentState(rootContainerId, componentId, state); }, MESSAGE_DELETE: MESSAGE_DELETE_66570, MESSAGE_UPDATE: MESSAGE_UPDATE_66571, INTERACTION_SUCCESS: INTERACTION_SUCCESS_66572, INTERACTION_FAILURE: INTERACTION_FAILURE_66573, CLEAR_INTERACTION_MODAL_STATE: CLEAR_INTERACTION_MODAL_STATE}); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/LocalInteractionComponentStateStore.tsx'); exports.default = value; } function _isNativeReflectConstruct_66557() { // fn#66557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:148, offset: 0x01c00c8b, 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_66557_isNativeReflectConstruct = function() { return !!result; })(); } function setComponentState(a0, a1, a2) { // fn#66560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:412, offset: 0x01c00ced, size: 101 bytes, params: 4, frame: 15 var r3; var map; let binding = env0_5; const value2 = binding.get(a0); if (value2 != null) { r3 = value2; } else { map = new global.Map(); } r3.set(a1, a2); env0_5.set(a0, r3); binding = env0_6; env0_6 = typeof binding === 'bigint' ? binding + 1n : +binding + 1; } function deleteStatesForMessageId(a0) { // fn#66561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:509, offset: 0x01c00d52, size: 83 bytes, params: 2, frame: 13 let binding = env0_7; const value2 = binding.get(a0); if (value2 != null) { env0_8.delete(value2); } env0_7.delete(a0); env0_5.delete(a0); binding = env0_6; env0_6 = typeof binding === 'bigint' ? binding + 1n : +binding + 1; } function _fun66562(a0) { // fn#66562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:616, offset: 0x01c00da5, size: 126 bytes, params: 2, frame: 16 const closure = LocalInteractionComponentStateStore; env0_4(closure, a0); return env0_1(closure, [{key: 'getInteractionComponentStates', value: value_66564}, {key: 'getInteractionComponentStateVersion', value: value_66565}, {key: 'getInteractionComponentState', value: value_66566}]); } function LOGOUT_66567() { // fn#66567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:1352, offset: 0x01c00e60, size: 60 bytes, params: 1, frame: 10 let binding = env0_5; binding.clear(); env0_7.clear(); env0_8.clear(); binding = env0_6; env0_6 = typeof binding === 'bigint' ? binding + 1n : +binding + 1; } function QUEUE_INTERACTION_COMPONENT_STATE({messageId, nonce, componentId, state}) { // fn#66568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:1443, offset: 0x01c00e9c, size: 84 bytes, params: 2, frame: 19 let binding = env0_7; binding.set(messageId, nonce); binding = env0_8; binding.set(nonce, {messageId: messageId, componentId: componentId}); setComponentState(messageId, componentId, state); } function MESSAGE_DELETE_66570({id}) { // fn#66570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:1763, offset: 0x01c00f16, size: 45 bytes, params: 2, frame: 12 const binding = env0_5; if (binding.has(id)) { deleteStatesForMessageId(id); return undefined; } return false; } function MESSAGE_UPDATE_66571({message}) { // fn#66571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:1866, offset: 0x01c00f43, size: 66 bytes, params: 2, frame: 13 if (message.id != null) { var binding = env0_5; if (binding.has(message.id)) { deleteStatesForMessageId(message.id); return undefined; } } return false; } function INTERACTION_SUCCESS_66572({nonce}) { // fn#66572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:1997, offset: 0x01c00f85, size: 92 bytes, params: 2, frame: 13 if (nonce == null) { return false; } let binding = env0_8; const value2 = binding.get(nonce); if (value2 == null) { return false; } env0_7.delete(value2.messageId); env0_8.delete(nonce); binding = env0_6; env0_6 = typeof binding === 'bigint' ? binding + 1n : +binding + 1; } function INTERACTION_FAILURE_66573({nonce}) { // fn#66573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:2156, offset: 0x01c00fe1, size: 136 bytes, params: 2, frame: 14 if (nonce == null) { return false; } let binding = env0_8; const value2 = binding.get(nonce); if (value2 == null) { return false; } const componentId = value2.componentId; const messageId = value2.messageId; const value3 = env0_5.get(messageId); if (value3 != null) { if (value3.has(componentId)) { value3.delete(componentId); if (value3.size === 0) { env0_5.delete(messageId); } binding = env0_6; env0_6 = typeof binding === 'bigint' ? binding + 1n : +binding + 1; } } } function CLEAR_INTERACTION_MODAL_STATE({customId}) { // fn#66574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:2448, offset: 0x01c01069, size: 41 bytes, params: 2, frame: 12 let binding = env0_5; binding.delete(customId); binding = env0_6; env0_6 = typeof binding === 'bigint' ? binding + 1n : +binding + 1; } function value_66566(a0, a1) { // fn#66566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:1175, offset: 0x01c00e23, size: 61 bytes, params: 3, frame: 13 var r0; let value = environment.__proto__; value = env1_5.get(a0); const value2 = null; if (value2 == value) { r0 = value2; } else { value = value.get(a1); r0 = value2 != value ? value : value2; } return r0; }