95 lines
4.2 KiB
TypeScript
95 lines
4.2 KiB
TypeScript
/* Metro module 9114; source: modules/global_discovery_servers/GlobalDiscoveryServersConstants.tsx; dependencies: [672, 1244, 2] */
|
|
function _fun71413(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9299:6, offset: 0x01d1f118, size: 696 bytes, params: 8, frame: 28
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
object2 = {FEATURED: 'featured', GAMING: 'gaming', MUSIC: 'music', ENTERTAINMENT: 'entertainment', TECH: 'tech',
|
|
EDUCATION: 'education', HUBS: 'hubs'};
|
|
const Set = global.Set;
|
|
const HUBS = object2.HUBS;
|
|
const set = new Set([HUBS]);
|
|
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
|
const MINUTE = Millis.MINUTE;
|
|
const value2 = 10 * MINUTE;
|
|
const object3 = {Clans: -3};
|
|
object3[-3] = 'Clans';
|
|
object3.Hub = -2;
|
|
object3[-2] = 'Hub';
|
|
object3.Communities = -1;
|
|
object3[-1] = 'Communities';
|
|
object3.Activity = 1;
|
|
object3[1] = 'Activity';
|
|
object3.Music = 2;
|
|
object3[2] = 'Music';
|
|
object3.Television = 3;
|
|
object3[3] = 'Television';
|
|
object3.Science = 5;
|
|
object3[5] = 'Science';
|
|
object3.Education = 6;
|
|
object3[6] = 'Education';
|
|
const Activity = object3.Activity;
|
|
const items2 = [Activity];
|
|
const Music = object3.Music;
|
|
items2[1] = Music;
|
|
const Television = object3.Television;
|
|
items2[2] = Television;
|
|
const Science = object3.Science;
|
|
items2[3] = Science;
|
|
const Education = object3.Education;
|
|
items2[4] = Education;
|
|
const env0_2 = ['en-GB'];
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/global_discovery_servers/GlobalDiscoveryServersConstants.tsx');
|
|
exports.DEFAULT_DISCOVERY_CATEGORY_ID = 0;
|
|
exports.OTHER_DISCOVERY_CATEGORY_ID = 13;
|
|
exports.DISCOVERY_ALL_CATEGORIES_ID = -1;
|
|
exports.HUBS_CATEGORY_ID = -2;
|
|
exports.RAPIDASH_GUILDS_CATEGORY_ID = -3;
|
|
exports.GlobalDiscoveryServerTab = object2;
|
|
exports.GlobalDiscoveryServerEntrypoint = {UNKNOWN: 'unknown', GUILDS_BAR: 'guilds_bar', RTC_PANEL: 'rtc_panel',
|
|
PROFILE: 'profile', GAME_LINK: 'game_link', EMBED: 'embed'};
|
|
exports.SEARCH_DISABLED_SERVER_TABS = set;
|
|
exports.EMPTY_GUILD_IDS = [];
|
|
exports.SEARCH_RESULTS_FEATURED_PREFIX = 'f';
|
|
exports.SEARCH_RESULTS_QUERY_PREFIX = 'q';
|
|
exports.SEARCH_RESULTS_CATEGORY_PREFIX = 'c';
|
|
exports.SEARCH_RESULTS_LANGUAGE_CODE_PREFIX = 'l';
|
|
exports.FEATURED_GUILDS_CACHE_DURATION = value2;
|
|
exports.FEATURED_GUILDS_SEARCH_OPTIONS = {categoryId: -1};
|
|
exports.CategoryId = object3;
|
|
exports.DISCOVERY_SIDEBAR_CATEGORIES = items2;
|
|
exports.getLanguageOptions = getLanguageOptions;
|
|
}
|
|
|
|
function getLanguageOptions() { // fn#71414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9299:1456, offset: 0x01d1f3d0, size: 73 bytes, params: 1, frame: 12
|
|
let value = require(1244) /* metro dependency 1244: indexNative */;
|
|
value = value.getLanguages();
|
|
value = value.filter(_fun71415);
|
|
return value.map(_fun71416);
|
|
}
|
|
|
|
function _fun71415({code}) { // fn#71415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9299:1524, offset: 0x01d1f419, size: 30 bytes, params: 2, frame: 11
|
|
const binding = env1_2;
|
|
return !binding.includes(code);
|
|
}
|
|
|
|
function _fun71416(a0) { // fn#71416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9299:1554, offset: 0x01d1f437, size: 107 bytes, params: 2, frame: 17
|
|
var r0;
|
|
var object2;
|
|
var intl;
|
|
let value = a0;
|
|
if (value.code !== 'en-US') {
|
|
r0 = value;
|
|
} else {
|
|
object2 = {};
|
|
copyDataProperties(object2, value, undefined);
|
|
value = environment.__proto__;
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.LQLMGP);
|
|
object2['name'] = value;
|
|
r0 = object2;
|
|
}
|
|
return r0;
|
|
}
|
|
|