/* Metro module 11429; source: modules/guild_templates/AcceptGuildTemplateActionCreators.tsx; dependencies: [4257, 1867, 661, 694, 507, 6947, 2] */ import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */ import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */ import GatewayConnectionStore from '../gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as HTTPUtilsModule from '../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */ import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */ function _fun87485(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11615:6, offset: 0x01fc07be, size: 163 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); object = {acceptGuildTemplate: acceptGuildTemplate}; (FileImportTrackerModule).fileFinishedImporting('modules/guild_templates/AcceptGuildTemplateActionCreators.tsx'); exports.default = object; function acceptGuildTemplate(a0, a1, a2) { // fn#87486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11615:159, offset: 0x01fc0861, size: 111 bytes, params: 4, frame: 14 const env0_0 = a0; const env0_1 = a1; const env0_2 = a2; (Dispatcher).dispatch({type: 'GUILD_TEMPLATE_ACCEPT', code: a0}); const Promise = global.Promise; const value = Object.create(Promise.prototype, {constructor: {value: Promise}}); const promise = new Promise(_fun87487); return promise instanceof Object ? promise : value; function _fun87487(a0, a1) { // fn#87487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11615:238, offset: 0x01fc08d0, size: 147 bytes, params: 3, frame: 18 var environment; const env0_0 = a0; const env0_1 = a1; const value = environment.__proto__; const HTTP = (HTTPUtilsModule).HTTP; const post = HTTP.post; const object = {}; object.url = Endpoints.UNRESOLVED_GUILD_TEMPLATE(env0_0); object.body = {name: require, icon: importDefault}; object.oldFormErrors = true; object.rejectWithError = false; Reflect.apply(post, HTTP, [object]).then(_fun87488, _fun87490); function _fun87488({body}) { // fn#87488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11615:365, offset: 0x01fc0963, size: 167 bytes, params: 2, frame: 16 var environment; const body2 = body; let value = environment.__proto__.__proto__; (Dispatcher).dispatch({type: 'GUILD_TEMPLATE_ACCEPT_SUCCESS', code: env1_0, guild: body}); const gatewayConnectionStoreBinding = GatewayConnectionStore; if (gatewayConnectionStoreBinding.isConnected()) { GuildStore.addConditionalChangeListener(_fun87489); } else { value = require(6947) /* metro dependency 6947: transitionToGuildNative */; value.transitionToGuild(body.id); body2(body); } function _fun87489() { // fn#87489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11615:502, offset: 0x01fc0a0a, size: 98 bytes, params: 1, frame: 13 var transitionToGuild; let value = environment.__proto__.__proto__.__proto__; const guildStoreBinding = GuildStore; const getGuild = guildStoreBinding.getGuild; if (Reflect.apply(getGuild, guildStoreBinding, [body.id]) != null) { value = require(6947) /* metro dependency 6947: transitionToGuildNative */; transitionToGuild = value.transitionToGuild; bodyBinding = body; Reflect.apply(transitionToGuild, value, [bodyBinding.id]); value = environment.__proto__; env1_0(bodyBinding); return false; } } } function _fun87490({body}) { // fn#87490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11615:625, offset: 0x01fc0a6c, size: 80 bytes, params: 2, frame: 13 const value = environment.__proto__.__proto__; (Dispatcher).dispatch({type: 'GUILD_TEMPLATE_ACCEPT_FAILURE', code: env1_0}); require(body); } } } } global.__d(_fun87485, 11429, [4257, 1867, 661, 694, 507, 6947, 2]) /* metro module 11429, dependencies: [4257, 1867, 661, 694, 507, 6947, 2] */;