129 lines
5.5 KiB
TypeScript
129 lines
5.5 KiB
TypeScript
/* Metro module 15173; source: stores/RegionStore.tsx; dependencies: [6, 7, 15, 17, 18, 1867, 22, 566, 694, 2] */
|
|
function _fun115928(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:6, offset: 0x024751ad, size: 315 bytes, params: 8, frame: 18
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const env0_9 = {};
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
let value = _fun115932(Store);
|
|
value.displayName = 'RegionStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOAD_REGIONS: LOAD_REGIONS,
|
|
GUILD_DELETE: GUILD_DELETE_115943});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/RegionStore.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_115929() { // fn#115929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:159, offset: 0x024752e8, 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_115929_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun115932(a0) { // fn#115932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:374, offset: 0x0247534a, size: 205 bytes, params: 2, frame: 16
|
|
const closure = RegionStore;
|
|
env0_6(closure, a0);
|
|
return env0_3(closure, [{key: 'initialize', value: function() {
|
|
this.waitFor(GuildStore);
|
|
}}, {key: 'getOptimalRegion', value: value_115935}, {key: 'getOptimalRegionId', value: function() {
|
|
var value = a0;
|
|
value = this.getOptimalRegion(value !== undefined ? value : null);
|
|
var value2 = null;
|
|
return value2 != value ? value.id : value2;
|
|
}}, {key: 'getRandomRegion', value: value_115938}, {key: 'getRandomRegionId', value: function() {
|
|
var value = a0;
|
|
value = this.getRandomRegion(value !== undefined ? value : null);
|
|
var value2 = null;
|
|
return value2 != value ? value.id : value2;
|
|
}}, {key: 'getRegions', value: value_115940}]);
|
|
}
|
|
|
|
function LOAD_REGIONS(a0) { // fn#115941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:1304, offset: 0x02475540, size: 87 bytes, params: 2, frame: 16
|
|
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
|
if (a0.guildId != null) {
|
|
env0_9[a0.guildId] = defaultImport.sortBy(a0.regions, function(a0) {
|
|
return a0.name;
|
|
});
|
|
}
|
|
}
|
|
|
|
function GUILD_DELETE_115943({guild}) { // fn#115943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:1427, offset: 0x02475597, size: 28 bytes, params: 2, frame: 2
|
|
delete env0_9[guild.id];
|
|
}
|
|
|
|
function value_115935() { // fn#115935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:718, offset: 0x02475417, size: 99 bytes, params: 1, frame: 15
|
|
var environment;
|
|
var r1;
|
|
var r0;
|
|
var value3;
|
|
var value4;
|
|
let value = a0;
|
|
value = this.getRegions(value !== undefined ? value : null);
|
|
const value2 = null;
|
|
if (value2 != value) {
|
|
value3 = value.find(function(a0) {
|
|
return a0.optimal;
|
|
});
|
|
if (value2 != value3) {
|
|
r1 = value3;
|
|
} else {
|
|
value4 = environment.__proto__;
|
|
value = (importDefault(22) /* metro dependency 22 */).sample(value);
|
|
r1 = value;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_115938() { // fn#115938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:977, offset: 0x024754b0, size: 70 bytes, params: 1, frame: 14
|
|
var r0;
|
|
var value3;
|
|
let value = a0;
|
|
value = this.getRegions(value !== undefined ? value : null);
|
|
const value2 = null;
|
|
if (value2 != value) {
|
|
value3 = environment.__proto__;
|
|
value = (importDefault(22) /* metro dependency 22 */).sample(value);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_115940(a0) { // fn#115940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15370:1188, offset: 0x02475521, size: 31 bytes, params: 2, frame: 3
|
|
return a0 != null ? env1_9[a0] : env1_8;
|
|
}
|
|
|