/* Metro module 4646; source: stores/GuildAvailabilityStore.tsx; dependencies: [6, 7, 15, 17, 18, 1867, 3, 566, 694, 2] */ import Logger from '../modules/debug/Logger.tsx'; /* Metro dependency 3 */ 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 Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */ import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ function _fun40005(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:6, offset: 0x010f25f6, size: 394 bytes, params: 8, frame: 21 const CONNECTION_OPEN_400092 = CONNECTION_OPEN_40009; const GUILD_CREATE_400102 = GUILD_CREATE_40010; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = Logger; value = new value('GuildAvailabilityStore'); const Set = global.Set; let set = new Set(); const Store = (Flux).Store; _fun40011(Store).displayName = 'GuildAvailabilityStore'; set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: CONNECTION_OPEN_400092, OVERLAY_INITIALIZE: CONNECTION_OPEN_400092, GUILD_UNAVAILABLE: GUILD_UNAVAILABLE, GUILD_DELETE: GUILD_DELETE_40019, GUILD_CREATE: GUILD_CREATE_400102, GUILD_UPDATE: GUILD_CREATE_400102, GUILD_GEO_RESTRICTED: GUILD_GEO_RESTRICTED}); (FileImportTrackerModule).fileFinishedImporting('stores/GuildAvailabilityStore.tsx'); exports.default = set; function _isNativeReflectConstruct_40006() { // fn#40006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:158, offset: 0x010f2780, 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_40006_isNativeReflectConstruct = function() { return !!result; })(); } function CONNECTION_OPEN_40009(a0) { // fn#40009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:406, offset: 0x010f27de, size: 124 bytes, params: 2, frame: 17 var binding; var warn; const Set = global.Set; let unavailableGuilds = a0.unavailableGuilds; const set = new Set(unavailableGuilds); let length = a0.unavailableGuilds.length; if (length > 0) { binding = env0_6; warn = binding.warn; unavailableGuilds = a0.unavailableGuilds; length = unavailableGuilds.length; unavailableGuilds = a0.unavailableGuilds; Reflect.apply(warn, binding, ['' + length + ' guilds are unavailable on connection open: ' + unavailableGuilds]); } } function GUILD_CREATE_40010(a0) { // fn#40010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:606, offset: 0x010f285a, size: 114 bytes, params: 2, frame: 13 var info; let binding = env0_7; const has = binding.has; let guild = a0.guild; let id = guild.id; if (Reflect.apply(has, binding, [id])) { binding = env0_7; guild = a0.guild; id = guild.id; binding.delete(id); binding = env0_6; info = binding.info; guild = a0.guild; id = guild.id; Reflect.apply(info, binding, ['Guild has become available: ' + id]); return undefined; } return false; } function _fun40011(a0) { // fn#40011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:740, offset: 0x010f28cc, size: 162 bytes, params: 2, frame: 16 const GuildAvailabilityStore2 = GuildAvailabilityStore; Inherits(GuildAvailabilityStore2, a0); return CreateClass(GuildAvailabilityStore2, [{key: 'initialize', value: function() { this.waitFor(GuildStore); }}, {key: 'isUnavailable', value: value_40014}, {key: 'totalGuilds', get: get_40015}, {key: 'totalUnavailableGuilds', get: get_40016}, {key: 'unavailableGuilds', get: get_40017}]); function GuildAvailabilityStore() { // fn#40012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:752, offset: 0x00e4046a, size: 113 bytes, params: 1, frame: 20 const value = environment.__proto__; env1_0(this, GuildAvailabilityStore); const value3 = env1_3(GuildAvailabilityStore); return env1_2(this, _isNativeReflectConstruct_40006() ? global.Reflect.construct(value3, arguments, env1_3(this).constructor) : value3.apply(this, arguments)); } function value_40014(a0) { // fn#40014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1136, offset: 0x010f296e, size: 31 bytes, params: 2, frame: 12 var r0; let value = a0 != null; if (value) { value = environment.__proto__; value = env1_7.has(a0); r0 = value; } else { r0 = value; } return r0; } function get_40015() { // fn#40015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1198, offset: 0x010f298d, size: 32 bytes, params: 1, frame: 10 return GuildStore.getGuildCount() + env1_7.size; } function get_40016() { // fn#40016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1277, offset: 0x010f29ad, size: 14 bytes, params: 1, frame: 1 return env1_7.size; } function get_40017() { // fn#40017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1333, offset: 0x010f29bb, size: 27 bytes, params: 1, frame: 11 const Array = global.Array; return Array.from(env1_7); } } function GUILD_UNAVAILABLE(a0) { // fn#40018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1540, offset: 0x010f29d6, size: 167 bytes, params: 2, frame: 21 let binding = env0_7; if (binding.has(a0.guildId)) { return false; } const guild = GuildStore.getGuild(a0.guildId); const name = guild != null && guild.name != null ? guild.name : '???'; binding = env0_6; binding.warn('Guild has gone unavailable: ' + a0.guildId + ' (' + name + ')'); binding = env0_7; binding.add(a0.guildId); } function GUILD_DELETE_40019(a0) { // fn#40019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1763, offset: 0x010f2a7d, size: 51 bytes, params: 2, frame: 11 if (a0.guild.unavailable !== true) { env0_7.delete(a0.guild.id); } } function GUILD_GEO_RESTRICTED(a0) { // fn#40020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4824:1912, offset: 0x010f2ab0, size: 55 bytes, params: 2, frame: 13 const binding = env0_7; if (binding.has(a0.guildId)) { env0_7.delete(a0.guildId); return undefined; } return false; } } global.__d(_fun40005, 4646, [6, 7, 15, 17, 18, 1867, 3, 566, 694, 2]) /* metro module 4646, dependencies: [6, 7, 15, 17, 18, 1867, 3, 566, 694, 2] */;