/* Metro module 15759; source: modules/coded_links/MessageCodedLinkManager.tsx; dependencies: [7, 6, 15, 17, 18, 5, 7069, 4097, 4096, 4101, 15760, 694, 9439, 6932, 11612, 15767, 4860, 2] */ function _fun121023(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15967:6, offset: 0x0253cf26, size: 289 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(7) /* metro dependency 7 */; const env0_4 = importDefault(6) /* metro dependency 6 */; const env0_5 = importDefault(15) /* metro dependency 15 */; const env0_6 = importDefault(17) /* metro dependency 17 */; const env0_7 = importDefault(18) /* metro dependency 18 */; const env0_8 = importDefault(5) /* metro dependency 5 */; const guildTemplateStore = importDefault(7069) /* metro dependency 7069: GuildTemplateStore */; const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */; let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */; value = _fun121034(value); value = new value(); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/coded_links/MessageCodedLinkManager.tsx'); exports.default = value; } function _isNativeReflectConstruct_121024() { // fn#121024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15967:178, offset: 0x0253d047, 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_121024_isNativeReflectConstruct = function() { return !!result; })(); } function resolveMessageCodedLinks({content}) { // fn#121027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15967:371, offset: 0x0253d0a9, size: 82 bytes, params: 2, frame: 13 let value = importDefault(4096) /* metro dependency 4096: findCodedLinks */; value = value(content); if (value != null && value.length !== 0) { value.forEach(_fun121028); } } function _fun121034(a0) { // fn#121034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15967:1904, offset: 0x0253d5ff, size: 42 bytes, params: 2, frame: 14 const closure = MessageCodedLinkManager; env0_7(closure, a0); return env0_3(closure); } function _fun121028({type, code}) { // fn#121028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15967:467, offset: 0x0253d0fb, size: 876 bytes, params: 2, frame: 16 var environment; var moduleValue; var moduleValue2; const value = environment.__proto__; const CodedLinkType = (require(4101) /* metro dependency 4101: CodedLink */).CodedLinkType; const INVITE = CodedLinkType.INVITE; if (INVITE === type) { moduleValue2 = require(15760) /* metro dependency 15760: codedLinkQueue */; moduleValue2.queueMessageLinkFetch(env1_8(_fun121030)); return undefined; } const TEMPLATE = CodedLinkType.TEMPLATE; if (TEMPLATE === type) { moduleValue = require(15760) /* metro dependency 15760: codedLinkQueue */; moduleValue.queueMessageLinkFetch(env1_8(_fun121033)); return undefined; } const BUILD_OVERRIDE = CodedLinkType.BUILD_OVERRIDE; if (BUILD_OVERRIDE === type) { return undefined; } const MANUAL_BUILD_OVERRIDE = CodedLinkType.MANUAL_BUILD_OVERRIDE; if (MANUAL_BUILD_OVERRIDE === type) { return undefined; } const EVENT = CodedLinkType.EVENT; if (EVENT === type) { return undefined; } const CHANNEL_LINK = CodedLinkType.CHANNEL_LINK; if (CHANNEL_LINK === type) { return undefined; } const ACTIVITY_BOOKMARK = CodedLinkType.ACTIVITY_BOOKMARK; if (ACTIVITY_BOOKMARK === type) { return undefined; } const EMBEDDED_ACTIVITY_INVITE = CodedLinkType.EMBEDDED_ACTIVITY_INVITE; if (EMBEDDED_ACTIVITY_INVITE === type) { return undefined; } const GUILD_PRODUCT = CodedLinkType.GUILD_PRODUCT; if (GUILD_PRODUCT === type) { return undefined; } const SERVER_SHOP = CodedLinkType.SERVER_SHOP; if (SERVER_SHOP === type) { return undefined; } const SOCIAL_LAYER_STOREFRONT = CodedLinkType.SOCIAL_LAYER_STOREFRONT; if (SOCIAL_LAYER_STOREFRONT === type) { return undefined; } const SOCIAL_LAYER_STOREFRONT_APP = CodedLinkType.SOCIAL_LAYER_STOREFRONT_APP; if (SOCIAL_LAYER_STOREFRONT_APP === type) { return undefined; } const QUESTS_EMBED = CodedLinkType.QUESTS_EMBED; if (QUESTS_EMBED === type) { return undefined; } const APP_DIRECTORY_STOREFRONT = CodedLinkType.APP_DIRECTORY_STOREFRONT; if (APP_DIRECTORY_STOREFRONT === type) { return undefined; } const APP_DIRECTORY_STOREFRONT_SKU = CodedLinkType.APP_DIRECTORY_STOREFRONT_SKU; if (APP_DIRECTORY_STOREFRONT_SKU === type) { return undefined; } const APP_OAUTH2_LINK = CodedLinkType.APP_OAUTH2_LINK; if (APP_OAUTH2_LINK === type) { return undefined; } const COLLECTIBLES_SHOP = CodedLinkType.COLLECTIBLES_SHOP; if (COLLECTIBLES_SHOP === type) { return undefined; } const EXPERIMENT = CodedLinkType.EXPERIMENT; if (EXPERIMENT === type) { return undefined; } const APP_DIRECTORY_PROFILE = CodedLinkType.APP_DIRECTORY_PROFILE; if (APP_DIRECTORY_PROFILE === type) { (require(11612) /* metro dependency 11612: ApplicationDirectoryActionCreators */).getEmbedApplication(code); return undefined; } const Error = global.Error; throw Error('Unknown coded link type: ' + type); } function MessageCodedLinkManager() { // fn#121035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15967:1916, offset: 0x0253d629, size: 138 bytes, params: 1, frame: 20 env1_4(this, MessageCodedLinkManager); const value3 = env1_6(MessageCodedLinkManager); const value6 = env1_5(this, _isNativeReflectConstruct_121024() ? global.Reflect.construct(value3, [], env1_6(this).constructor) : value3.apply(this, undefined)); (importDefault(15767) /* metro dependency 15767: setupLoadFromMessageManagerHandlers */)(value6, resolveMessageCodedLinks); return value6; } function* _fun121030() { // fn#121030, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15967:565, offset: 0x0253d472, size: 148 bytes, params: 1, frame: 17 var environment; if (true) { value = environment.__proto__.__proto__.__proto__; var binding = env3_10; if (binding.getInvite(env1_0) == null) { binding = env3_1; var binding2 = env3_2; value = binding(binding2[11]); var dispatch = value.dispatch; var binding3 = env1_0; Reflect.apply(dispatch, value, [{type: 'INVITE_RESOLVE', code: binding3}]); value = binding(binding2[12])(binding3); yield value.then(_fun121031); value = undefined; if (false) { return value; } } } } function* _fun121033() { // fn#121033, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15967:931, offset: 0x0253d59f, size: 96 bytes, params: 1, frame: 14 if (true) { value = environment.__proto__.__proto__.__proto__; if (env3_9.getGuildTemplate(env1_0) == null) { value = env3_1(env3_2[13]); yield value.resolveGuildTemplate(env1_0); value = undefined; if (false) { return value; } } } } function _fun121031({invite, code, banned}) { // fn#121031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15967:674, offset: 0x0253d506, size: 142 bytes, params: 2, frame: 15 var value; if (invite != null) { value = environment.__proto__.__proto__.__proto__.__proto__; value = env4_1(env4_2[11]); value.dispatch({type: 'INVITE_RESOLVE_SUCCESS', invite: invite, code: code}); } else { value = environment.__proto__.__proto__.__proto__.__proto__; value = env4_1(env4_2[11]); value.dispatch({type: 'INVITE_RESOLVE_FAILURE', code: code, banned: banned}); } }