This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,25 +1,29 @@
/* Metro module 9622; source: utils/AnalyticsFeedItemSeenActionCreators.tsx; dependencies: [694, 2] */
import Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun75460(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9808:6, offset: 0x01dadf71, size: 125 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/AnalyticsFeedItemSeenActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/AnalyticsFeedItemSeenActionCreators.tsx');
exports.markAnalyticsFeedItemSeen = markAnalyticsFeedItemSeen;
exports.markAnalyticsFeedItemUnseen = markAnalyticsFeedItemUnseen;
exports.flushAnalyticsFeedItems = flushAnalyticsFeedItems;
function markAnalyticsFeedItemSeen(a0, a1, a2) { // fn#75461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9808:199, offset: 0x01dadfee, size: 71 bytes, params: 4, frame: 13
(Dispatcher).dispatch({type: 'ANALYTICS_FEED_ITEM_SEEN', id: a0,
feedItemId: a1, timestampMillis: a2});
}
function markAnalyticsFeedItemUnseen(a0, a1, a2) { // fn#75462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9808:360, offset: 0x01dae035, size: 71 bytes, params: 4, frame: 13
(Dispatcher).dispatch({type: 'ANALYTICS_FEED_ITEM_UNSEEN', id: a0,
feedItemId: a1, timestampMillis: a2});
}
function flushAnalyticsFeedItems(a0, a1) { // fn#75463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9808:521, offset: 0x01dae07c, size: 63 bytes, params: 3, frame: 13
(Dispatcher).dispatch({type: 'ANALYTICS_FEED_FLUSH', id: a0,
force: a1});
}
}
function markAnalyticsFeedItemSeen(a0, a1, a2) { // fn#75461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9808:199, offset: 0x01dadfee, size: 71 bytes, params: 4, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ANALYTICS_FEED_ITEM_SEEN', id: a0,
feedItemId: a1, timestampMillis: a2});
}
function markAnalyticsFeedItemUnseen(a0, a1, a2) { // fn#75462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9808:360, offset: 0x01dae035, size: 71 bytes, params: 4, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ANALYTICS_FEED_ITEM_UNSEEN', id: a0,
feedItemId: a1, timestampMillis: a2});
}
function flushAnalyticsFeedItems(a0, a1) { // fn#75463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9808:521, offset: 0x01dae07c, size: 63 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ANALYTICS_FEED_FLUSH', id: a0,
force: a1});
}
global.__d(_fun75460, 9622, [694, 2]) /* metro module 9622, dependencies: [694, 2] */;
File diff suppressed because it is too large. Load diff
+6 -2
View File
@@ -1,6 +1,10 @@
/* Metro module 12846; source: utils/AnalyticsSchema.tsx; dependencies: [661, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun98000(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#98000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13036:6, offset: 0x02198b00, size: 55 bytes, params: 8, frame: 12
(require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/AnalyticsSchema.tsx');
(ConstantsModule).AnalyticEvents;
(FileImportTrackerModule).fileFinishedImporting('utils/AnalyticsSchema.tsx');
}
global.__d(_fun98000, 12846, [661, 2]) /* metro module 12846, dependencies: [661, 2] */;
+249 -241
View File
@@ -1,6 +1,18 @@
/* Metro module 683; source: utils/AnalyticsUtils.tsx; dependencies: [29, 31, 684, 691, 661, 12845, 4238, 1873, 682, 480, 12843, 1216, 694, 5256, 1244, 12, 491, 2, 12846] */
import ObjectWithoutProperties from '../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import DeveloperOptionsStore from '../stores/DeveloperOptionsStore.tsx'; /* Metro dependency 691 */
import Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as AnalyticsUtilsModule from '../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as Module00491Module from '../by-id/module-00491.js'; /* Metro dependency 491 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as ImpressionStoreModule from '../modules/app_analytics/ImpressionStore.tsx'; /* Metro dependency 684 */
import * as ApplicationConstantsModule from '../modules/applications/ApplicationConstants.tsx'; /* Metro dependency 4238 */
import * as CommonSentryInitUtilsModule from '../modules/errors/CommonSentryInitUtils.tsx'; /* Metro dependency 12843 */
import * as AccessibilityConstantsModule from '../modules/a11y/AccessibilityConstants.tsx'; /* Metro dependency 12845 */
function _fun8281(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#8281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:6, offset: 0x00d3dfba, size: 2592 bytes, params: 8, frame: 36
var object2;
var r9;
var value6;
var generateLaunchSignature;
@@ -14,25 +26,15 @@ function _fun8281(global, require, importDefault, importAll, module, exports, de
return typeof a0 === 'string' ? {source: a0} : {source_page: a0.page, source_section: a0.section,
source_object: a0.object, source_object_type: a0.objectType, source_promotion_id: a0.promotionId};
};
const closure2 = addBreadcrumb;
const closure3 = expandEventProperties;
const closure4 = debugLogEvent;
const addBreadcrumb2 = addBreadcrumb;
const expandEventProperties2 = expandEventProperties;
const debugLogEvent2 = debugLogEvent;
const env0_4 = ['location'];
const env0_5 = ['source'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_6 = importDefault(29) /* metro dependency 29 */;
let value = importAll(31) /* metro dependency 31 */;
const impressionStoreModule = require(684) /* metro dependency 684: ImpressionStore */;
const env0_7 = impressionStoreModule.setDebugTrackedData;
const env0_8 = impressionStoreModule.getLocation;
const developerOptionsStore = importDefault(691) /* metro dependency 691: DeveloperOptionsStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const AnalyticEvents = constantsModule.AnalyticEvents;
const env0_10 = constantsModule.AnalyticsObjectTypes;
const env0_11 = constantsModule.AnalyticsSections;
const env0_12 = (require(12845) /* metro dependency 12845: AccessibilityConstants */).AccessibilityFeatureFlags;
const env0_13 = (require(4238) /* metro dependency 4238: ApplicationConstants */).ApplicationTypes;
let value = ReactModule;
const AnalyticEvents = ConstantsModule.AnalyticEvents;
value = value.createContext({location: {}});
let env0_14 = {};
const env0_16 = global.performance.now();
@@ -44,73 +46,72 @@ function _fun8281(global, require, importDefault, importAll, module, exports, de
} else {
r9 = null;
}
const analyticsUtilsModule = importAll(480) /* metro dependency 480: AnalyticsUtils */;
analyticsUtilsModule.extendSuperProperties({launch_signature: r9});
AnalyticsUtilsModule.extendSuperProperties({launch_signature: r9});
const env0_18 = [];
object2 = {};
object = {};
const APP_OPENED = AnalyticEvents.APP_OPENED;
object2[APP_OPENED] = {throttlePeriod: 300000, throttleKeys: function() {
object[APP_OPENED] = {throttlePeriod: 300000, throttleKeys: function() {
return [];
}};
const APP_BACKGROUND = AnalyticEvents.APP_BACKGROUND;
object2[APP_BACKGROUND] = {throttlePeriod: 120000, throttleKeys: function() {
object[APP_BACKGROUND] = {throttlePeriod: 120000, throttleKeys: function() {
return [];
}};
const ACK_MESSAGES = AnalyticEvents.ACK_MESSAGES;
object2[ACK_MESSAGES] = _fun8290;
object[ACK_MESSAGES] = _fun8290;
const GUILD_VIEWED = AnalyticEvents.GUILD_VIEWED;
object2[GUILD_VIEWED] = {throttlePeriod: 900000, throttleKeys: function(a0) {
object[GUILD_VIEWED] = {throttlePeriod: 900000, throttleKeys: function(a0) {
return [a0.guild_id, a0.is_pending];
}};
const FRIENDS_LIST_VIEWED = AnalyticEvents.FRIENDS_LIST_VIEWED;
object2[FRIENDS_LIST_VIEWED] = {throttlePeriod: 900000, throttleKeys: function({tab_opened}) {
object[FRIENDS_LIST_VIEWED] = {throttlePeriod: 900000, throttleKeys: function({tab_opened}) {
return [tab_opened];
}};
const NOW_PLAYING_CARD_HOVERED = AnalyticEvents.NOW_PLAYING_CARD_HOVERED;
object2[NOW_PLAYING_CARD_HOVERED] = {throttlePeriod: 900000, throttleKeys: function({tab_opened}) {
object[NOW_PLAYING_CARD_HOVERED] = {throttlePeriod: 900000, throttleKeys: function({tab_opened}) {
return [tab_opened];
}};
const START_SPEAKING = AnalyticEvents.START_SPEAKING;
object2[START_SPEAKING] = {throttlePeriod: 900000, throttleKeys: function({server}) {
object[START_SPEAKING] = {throttlePeriod: 900000, throttleKeys: function({server}) {
return [server];
}};
const START_LISTENING = AnalyticEvents.START_LISTENING;
object2[START_LISTENING] = {throttlePeriod: 900000, throttleKeys: function({server}) {
object[START_LISTENING] = {throttlePeriod: 900000, throttleKeys: function({server}) {
return [server];
}};
const ACTIVITY_UPDATED = AnalyticEvents.ACTIVITY_UPDATED;
object2[ACTIVITY_UPDATED] = {'throttlePeriod': 60000, 'throttleKeys': null, 'deduplicate': true,
object[ACTIVITY_UPDATED] = {'throttlePeriod': 60000, 'throttleKeys': null, 'deduplicate': true,
throttleKeys: function({application_id}) {
return [application_id];
}};
const CHANNEL_OPENED = AnalyticEvents.CHANNEL_OPENED;
object2[CHANNEL_OPENED] = {throttlePeriod: 900000, throttleKeys: function(a0) {
object[CHANNEL_OPENED] = {throttlePeriod: 900000, throttleKeys: function(a0) {
return a0.channel_static_route != null ? [a0.guild_id, a0.channel_static_route,
a0.channel_view] : [a0.channel_id,
a0.channel_view];
}};
const TEXT_IN_VOICE_OPENED = AnalyticEvents.TEXT_IN_VOICE_OPENED;
object2[TEXT_IN_VOICE_OPENED] = {throttlePeriod: 86400000, throttleKeys: function({channel_id}) {
object[TEXT_IN_VOICE_OPENED] = {throttlePeriod: 86400000, throttleKeys: function({channel_id}) {
return [channel_id];
}};
const NOTIFICATION_VIEWED = AnalyticEvents.NOTIFICATION_VIEWED;
object2[NOTIFICATION_VIEWED] = {throttlePeriod: 900000, throttleKeys: function({notif_type}) {
object[NOTIFICATION_VIEWED] = {throttlePeriod: 900000, throttleKeys: function({notif_type}) {
return [notif_type];
}};
const MEMBER_LIST_VIEWED = AnalyticEvents.MEMBER_LIST_VIEWED;
object2[MEMBER_LIST_VIEWED] = {throttlePeriod: 900000, throttleKeys: function({channel_id}) {
object[MEMBER_LIST_VIEWED] = {throttlePeriod: 900000, throttleKeys: function({channel_id}) {
return [channel_id];
}};
const DM_LIST_VIEWED = AnalyticEvents.DM_LIST_VIEWED;
object2[DM_LIST_VIEWED] = {throttlePeriod: 900000, throttleKeys: function({channel_id}) {
object[DM_LIST_VIEWED] = {throttlePeriod: 900000, throttleKeys: function({channel_id}) {
return [channel_id];
}};
const NAV_DRAWER_OPENED = AnalyticEvents.NAV_DRAWER_OPENED;
object2[NAV_DRAWER_OPENED] = {throttlePeriod: 900000, throttleKeys: function() {
object[NAV_DRAWER_OPENED] = {throttlePeriod: 900000, throttleKeys: function() {
return [];
}};
const KEYBOARD_SHORTCUT_USED = AnalyticEvents.KEYBOARD_SHORTCUT_USED;
object2[KEYBOARD_SHORTCUT_USED] = {throttlePeriod: 120000, throttleKeys: function(a0) {
object[KEYBOARD_SHORTCUT_USED] = {throttlePeriod: 120000, throttleKeys: function(a0) {
var r2;
var items = [a0.shortcut_name, a0.location_object];
r2 = a0.source_class_list ?? [];
@@ -118,213 +119,213 @@ function _fun8281(global, require, importDefault, importAll, module, exports, de
return items;
}};
const QUICKSWITCHER_OPENED = AnalyticEvents.QUICKSWITCHER_OPENED;
object2[QUICKSWITCHER_OPENED] = {throttlePeriod: 10000, throttleKeys: function() {
object[QUICKSWITCHER_OPENED] = {throttlePeriod: 10000, throttleKeys: function() {
return [];
}};
const CHAT_INPUT_COMPONENT_VIEWED = AnalyticEvents.CHAT_INPUT_COMPONENT_VIEWED;
object2[CHAT_INPUT_COMPONENT_VIEWED] = {throttlePeriod: 900000, throttleKeys: function({type}) {
object[CHAT_INPUT_COMPONENT_VIEWED] = {throttlePeriod: 900000, throttleKeys: function({type}) {
return [type];
}};
const ROLE_PAGE_VIEWED = AnalyticEvents.ROLE_PAGE_VIEWED;
object2[ROLE_PAGE_VIEWED] = {throttlePeriod: 120000, throttleKeys: function(a0) {
object[ROLE_PAGE_VIEWED] = {throttlePeriod: 120000, throttleKeys: function(a0) {
return [a0.role_id, a0.tab_opened];
}};
const VIDEO_INPUT_INITIALIZED = AnalyticEvents.VIDEO_INPUT_INITIALIZED;
object2[VIDEO_INPUT_INITIALIZED] = {throttlePeriod: 300000, throttleKeys: function() {
object[VIDEO_INPUT_INITIALIZED] = {throttlePeriod: 300000, throttleKeys: function() {
return [];
}};
const AUDIO_INPUT_INITIALIZED = AnalyticEvents.AUDIO_INPUT_INITIALIZED;
object2[AUDIO_INPUT_INITIALIZED] = {throttlePeriod: 300000, throttleKeys: function() {
object[AUDIO_INPUT_INITIALIZED] = {throttlePeriod: 300000, throttleKeys: function() {
return [];
}};
const HUB_ONBOARDING_CAROUSEL_SCROLLED = AnalyticEvents.HUB_ONBOARDING_CAROUSEL_SCROLLED;
object2[HUB_ONBOARDING_CAROUSEL_SCROLLED] = {throttlePeriod: 900000, throttleKeys: function() {
object[HUB_ONBOARDING_CAROUSEL_SCROLLED] = {throttlePeriod: 900000, throttleKeys: function() {
return [];
}};
const HUB_STUDENT_PROMPT_CLICKED = AnalyticEvents.HUB_STUDENT_PROMPT_CLICKED;
object2[HUB_STUDENT_PROMPT_CLICKED] = {throttlePeriod: 900000, throttleKeys: function() {
object[HUB_STUDENT_PROMPT_CLICKED] = {throttlePeriod: 900000, throttleKeys: function() {
return [];
}};
const RPC_SERVER_ERROR_CAUGHT = AnalyticEvents.RPC_SERVER_ERROR_CAUGHT;
object2[RPC_SERVER_ERROR_CAUGHT] = {throttlePeriod: 86400000, throttleKeys: function() {
object[RPC_SERVER_ERROR_CAUGHT] = {throttlePeriod: 86400000, throttleKeys: function() {
return [];
}};
const RPC_COMMAND_SENT = AnalyticEvents.RPC_COMMAND_SENT;
object2[RPC_COMMAND_SENT] = {'throttlePeriod': 86400000, 'throttleKeys': null, 'throttlePercent': 0.001,
object[RPC_COMMAND_SENT] = {'throttlePeriod': 86400000, 'throttleKeys': null, 'throttlePercent': 0.001,
throttleKeys: function(a0) {
return [a0.application_id, a0.command];
}};
const RPC_SUBSCRIPTION_REQUESTED = AnalyticEvents.RPC_SUBSCRIPTION_REQUESTED;
object2[RPC_SUBSCRIPTION_REQUESTED] = {'throttlePeriod': 86400000, 'throttleKeys': null, 'throttlePercent': 0.001,
object[RPC_SUBSCRIPTION_REQUESTED] = {'throttlePeriod': 86400000, 'throttleKeys': null, 'throttlePercent': 0.001,
throttleKeys: function(a0) {
return [a0.application_id, a0.event];
}};
const ACTIVITY_HANDSHAKE = AnalyticEvents.ACTIVITY_HANDSHAKE;
object2[ACTIVITY_HANDSHAKE] = {throttlePeriod: 86400000, throttleKeys: function({application_id}) {
object[ACTIVITY_HANDSHAKE] = {throttlePeriod: 86400000, throttleKeys: function({application_id}) {
return [application_id];
}};
const CHANNEL_BANNER_VIEWED = AnalyticEvents.CHANNEL_BANNER_VIEWED;
object2[CHANNEL_BANNER_VIEWED] = {throttlePeriod: 86400000, throttleKeys: function(a0) {
object[CHANNEL_BANNER_VIEWED] = {throttlePeriod: 86400000, throttleKeys: function(a0) {
return [a0.banner_type, a0.channel_id];
}};
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
const GUILD_HANGOUT_WINDOW = ImpressionNames.GUILD_HANGOUT_WINDOW;
object2[GUILD_HANGOUT_WINDOW] = {throttlePeriod: 86400000, throttleKeys: function(a0) {
object[GUILD_HANGOUT_WINDOW] = {throttlePeriod: 86400000, throttleKeys: function(a0) {
return [a0.channel_id, a0.banner_hash];
}};
const GUILD_HANGOUT_WINDOW_ENTRY_POINT = ImpressionNames.GUILD_HANGOUT_WINDOW_ENTRY_POINT;
object2[GUILD_HANGOUT_WINDOW_ENTRY_POINT] = {throttlePeriod: 86400000, throttleKeys: function(a0) {
object[GUILD_HANGOUT_WINDOW_ENTRY_POINT] = {throttlePeriod: 86400000, throttleKeys: function(a0) {
return [a0.channel_id, a0.media_session_id];
}};
const PREMIUM_UPSELL_VIEWED = AnalyticEvents.PREMIUM_UPSELL_VIEWED;
object2[PREMIUM_UPSELL_VIEWED] = {throttlePeriod: 60000, throttleKeys: function({type}) {
object[PREMIUM_UPSELL_VIEWED] = {throttlePeriod: 60000, throttleKeys: function({type}) {
return [type];
}};
const FORUM_CHANNEL_SEARCHED = AnalyticEvents.FORUM_CHANNEL_SEARCHED;
object2[FORUM_CHANNEL_SEARCHED] = {throttlePeriod: 60000, throttleKeys: function(a0) {
object[FORUM_CHANNEL_SEARCHED] = {throttlePeriod: 60000, throttleKeys: function(a0) {
return [a0.guild_id, a0.channel_id];
}};
const FORUM_CHANNEL_SCROLLED = AnalyticEvents.FORUM_CHANNEL_SCROLLED;
object2[FORUM_CHANNEL_SCROLLED] = {throttlePeriod: 900000, throttleKeys: function(a0) {
object[FORUM_CHANNEL_SCROLLED] = {throttlePeriod: 900000, throttleKeys: function(a0) {
return [a0.guild_id, a0.channel_id];
}};
const VOICE_CHANNEL_GAME_ACTIVITY_INDICATOR_VIEWED = AnalyticEvents.VOICE_CHANNEL_GAME_ACTIVITY_INDICATOR_VIEWED;
object2[VOICE_CHANNEL_GAME_ACTIVITY_INDICATOR_VIEWED] = {throttlePeriod: 60000, throttleKeys: function({user_id}) {
object[VOICE_CHANNEL_GAME_ACTIVITY_INDICATOR_VIEWED] = {throttlePeriod: 60000, throttleKeys: function({user_id}) {
return [user_id];
}};
const MEDIA_VIEWER_SESSION_COMPLETED = AnalyticEvents.MEDIA_VIEWER_SESSION_COMPLETED;
object2[MEDIA_VIEWER_SESSION_COMPLETED] = {throttlePeriod: 60000, throttleKeys: function() {
object[MEDIA_VIEWER_SESSION_COMPLETED] = {throttlePeriod: 60000, throttleKeys: function() {
return [];
}};
const SUMMARIES_UNREAD_BAR_VIEWED = AnalyticEvents.SUMMARIES_UNREAD_BAR_VIEWED;
object2[SUMMARIES_UNREAD_BAR_VIEWED] = {throttlePeriod: 300000, throttleKeys: function({channel_id}) {
object[SUMMARIES_UNREAD_BAR_VIEWED] = {throttlePeriod: 300000, throttleKeys: function({channel_id}) {
return [channel_id];
}};
const ACTIVITY_CARDS_VIEWED = AnalyticEvents.ACTIVITY_CARDS_VIEWED;
object2[ACTIVITY_CARDS_VIEWED] = {throttlePeriod: 900000, throttleKeys: function(a0) {
object[ACTIVITY_CARDS_VIEWED] = {throttlePeriod: 900000, throttleKeys: function(a0) {
return [a0.context, a0.guild_id];
}};
const GUILD_TOOLTIP_SHOWN = AnalyticEvents.GUILD_TOOLTIP_SHOWN;
object2[GUILD_TOOLTIP_SHOWN] = {throttlePeriod: 900000, throttleKeys: function({guild_id}) {
object[GUILD_TOOLTIP_SHOWN] = {throttlePeriod: 900000, throttleKeys: function({guild_id}) {
return [guild_id];
}};
const ACK_COMMUNITY_MESSAGES = AnalyticEvents.ACK_COMMUNITY_MESSAGES;
object2[ACK_COMMUNITY_MESSAGES] = {throttlePeriod: 900000, throttleKeys: function({channel_id}) {
object[ACK_COMMUNITY_MESSAGES] = {throttlePeriod: 900000, throttleKeys: function({channel_id}) {
return [channel_id];
}};
const REDESIGN_NAV_BAR_CLICKED = AnalyticEvents.REDESIGN_NAV_BAR_CLICKED;
object2[REDESIGN_NAV_BAR_CLICKED] = {throttlePeriod: 900000, throttleKeys: function({tab}) {
object[REDESIGN_NAV_BAR_CLICKED] = {throttlePeriod: 900000, throttleKeys: function({tab}) {
return [tab];
}};
const CHANNEL_LIST_END_REACHED = AnalyticEvents.CHANNEL_LIST_END_REACHED;
object2[CHANNEL_LIST_END_REACHED] = {throttlePeriod: 900000, throttleKeys: function({guild_id}) {
object[CHANNEL_LIST_END_REACHED] = {throttlePeriod: 900000, throttleKeys: function({guild_id}) {
return [guild_id];
}};
const EXPLICIT_MEDIA_REDACTABLE_MESSAGES_LOADED = AnalyticEvents.EXPLICIT_MEDIA_REDACTABLE_MESSAGES_LOADED;
object2[EXPLICIT_MEDIA_REDACTABLE_MESSAGES_LOADED] = {throttlePeriod: 60000, throttleKeys: function(a0) {
object[EXPLICIT_MEDIA_REDACTABLE_MESSAGES_LOADED] = {throttlePeriod: 60000, throttleKeys: function(a0) {
return [a0.guild_id, a0.channel_id];
}};
const LIVE_ACTIVITY_SETTINGS_UPDATED = AnalyticEvents.LIVE_ACTIVITY_SETTINGS_UPDATED;
object2[LIVE_ACTIVITY_SETTINGS_UPDATED] = {throttlePeriod: 3600000, throttleKeys: function() {
object[LIVE_ACTIVITY_SETTINGS_UPDATED] = {throttlePeriod: 3600000, throttleKeys: function() {
return [];
}};
const MEDIA_INPUT_VOLUME_CHANGED = AnalyticEvents.MEDIA_INPUT_VOLUME_CHANGED;
object2[MEDIA_INPUT_VOLUME_CHANGED] = {throttlePeriod: 300000, throttleKeys: function({location_stack}) {
object[MEDIA_INPUT_VOLUME_CHANGED] = {throttlePeriod: 300000, throttleKeys: function({location_stack}) {
return [location_stack];
}};
const MEDIA_OUTPUT_VOLUME_CHANGED = AnalyticEvents.MEDIA_OUTPUT_VOLUME_CHANGED;
object2[MEDIA_OUTPUT_VOLUME_CHANGED] = {throttlePeriod: 300000, throttleKeys: function({location_stack}) {
object[MEDIA_OUTPUT_VOLUME_CHANGED] = {throttlePeriod: 300000, throttleKeys: function({location_stack}) {
return [location_stack];
}};
const APP_DMS_QUICK_LAUNCHER_IMPRESSION = AnalyticEvents.APP_DMS_QUICK_LAUNCHER_IMPRESSION;
object2[APP_DMS_QUICK_LAUNCHER_IMPRESSION] = {throttlePeriod: 900000, throttleKeys: function({channel_id}) {
object[APP_DMS_QUICK_LAUNCHER_IMPRESSION] = {throttlePeriod: 900000, throttleKeys: function({channel_id}) {
return [channel_id];
}};
const USER_VOICE_ACTIVITY_VIEWED = AnalyticEvents.USER_VOICE_ACTIVITY_VIEWED;
object2[USER_VOICE_ACTIVITY_VIEWED] = {'throttlePeriod': 300000, 'throttleKeys': null, 'deduplicate': true,
object[USER_VOICE_ACTIVITY_VIEWED] = {'throttlePeriod': 300000, 'throttleKeys': null, 'deduplicate': true,
throttleKeys: function(a0) {
return [a0.activity_user_id, a0.surface];
}};
const PARTY_VOICE_ACTIVITY_VIEWED = AnalyticEvents.PARTY_VOICE_ACTIVITY_VIEWED;
object2[PARTY_VOICE_ACTIVITY_VIEWED] = {'throttlePeriod': 300000, 'throttleKeys': null, 'deduplicate': true,
object[PARTY_VOICE_ACTIVITY_VIEWED] = {'throttlePeriod': 300000, 'throttleKeys': null, 'deduplicate': true,
throttleKeys: function({voice_channel_id}) {
return [voice_channel_id];
}};
const MEMBER_LIST_SWIPE_PEEK = AnalyticEvents.MEMBER_LIST_SWIPE_PEEK;
object2[MEMBER_LIST_SWIPE_PEEK] = {throttlePeriod: 1000, throttleKeys: function({channel_id}) {
object[MEMBER_LIST_SWIPE_PEEK] = {throttlePeriod: 1000, throttleKeys: function({channel_id}) {
return [channel_id];
}};
const REDACTABLE_MESSAGE_LOADED = AnalyticEvents.REDACTABLE_MESSAGE_LOADED;
object2[REDACTABLE_MESSAGE_LOADED] = {throttlePeriod: 900000, throttleKeys: function(a0) {
object[REDACTABLE_MESSAGE_LOADED] = {throttlePeriod: 900000, throttleKeys: function(a0) {
return [a0.channel_id, a0.message_id];
}};
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
object2[OPEN_MODAL] = _fun8339;
object[OPEN_MODAL] = _fun8339;
const MODERATOR_QUEUE_ACTION = AnalyticEvents.MODERATOR_QUEUE_ACTION;
object2[MODERATOR_QUEUE_ACTION] = {throttlePeriod: 10000, throttleKeys: function({guild_id}) {
object[MODERATOR_QUEUE_ACTION] = {throttlePeriod: 10000, throttleKeys: function({guild_id}) {
return [guild_id];
}};
const NOTIFICATION_PERMISSION_STATUS = AnalyticEvents.NOTIFICATION_PERMISSION_STATUS;
object2[NOTIFICATION_PERMISSION_STATUS] = {throttlePeriod: 43200000, throttleKeys: function(a0) {
object[NOTIFICATION_PERMISSION_STATUS] = {throttlePeriod: 43200000, throttleKeys: function(a0) {
return [a0.os_enabled, a0.notification_authorization_status, a0.foreground_app_enabled,
a0.background_app_enabled];
}};
const SEARCH_BAR_VIEWED = AnalyticEvents.SEARCH_BAR_VIEWED;
object2[SEARCH_BAR_VIEWED] = {throttlePeriod: 3600000, throttleKeys: function({search_type}) {
object[SEARCH_BAR_VIEWED] = {throttlePeriod: 3600000, throttleKeys: function({search_type}) {
return [search_type];
}};
const AD_IDENTIFIER_FETCHED = AnalyticEvents.AD_IDENTIFIER_FETCHED;
object2[AD_IDENTIFIER_FETCHED] = {throttlePeriod: 86400000, throttleKeys: function() {
object[AD_IDENTIFIER_FETCHED] = {throttlePeriod: 86400000, throttleKeys: function() {
return [];
}};
const ACTIVITY_PANEL_SDK_LINK_VIEWED = AnalyticEvents.ACTIVITY_PANEL_SDK_LINK_VIEWED;
object2[ACTIVITY_PANEL_SDK_LINK_VIEWED] = {throttlePeriod: 86400000, throttleKeys: function({application_id}) {
object[ACTIVITY_PANEL_SDK_LINK_VIEWED] = {throttlePeriod: 86400000, throttleKeys: function({application_id}) {
return [application_id];
}};
const LIBDISCORE_SLOW_TIMERS = AnalyticEvents.LIBDISCORE_SLOW_TIMERS;
object2[LIBDISCORE_SLOW_TIMERS] = {throttlePeriod: 3600000, throttleKeys: function() {
object[LIBDISCORE_SLOW_TIMERS] = {throttlePeriod: 3600000, throttleKeys: function() {
return [];
}};
const VIDEO_STREAM_ZOOM_CHANGED = AnalyticEvents.VIDEO_STREAM_ZOOM_CHANGED;
object2[VIDEO_STREAM_ZOOM_CHANGED] = {throttlePeriod: 1000, throttleKeys: function() {
object[VIDEO_STREAM_ZOOM_CHANGED] = {throttlePeriod: 1000, throttleKeys: function() {
return [];
}};
const CACHE_STATS_RECORDED = AnalyticEvents.CACHE_STATS_RECORDED;
object2[CACHE_STATS_RECORDED] = {throttlePeriod: 900000, throttleKeys: function() {
object[CACHE_STATS_RECORDED] = {throttlePeriod: 900000, throttleKeys: function() {
return [];
}};
const getAccessibilityFeatures = function() {
return AccessibilityFeatureFlags.NONE;
};
const analyticsUtilsModule2 = require(480) /* metro dependency 480: AnalyticsUtils */;
const env0_20 = analyticsUtilsModule2.trackMaker({addBreadcrumb: closure2, analyticEventConfigs: object2,
dispatcher: importDefault(694) /* metro dependency 694: Dispatcher */, TRACK_ACTION_NAME: 'TRACK'});
const analyticsUtilsModule2 = AnalyticsUtilsModule;
const env0_20 = analyticsUtilsModule2.trackMaker({addBreadcrumb: addBreadcrumb2, analyticEventConfigs: object,
dispatcher: Dispatcher, TRACK_ACTION_NAME: 'TRACK'});
const env0_22 = {};
const value11 = analyticsUtilsModule2;
const env0_23 = value11.trackMaker({addBreadcrumb: closure2, analyticEventConfigs: object2,
dispatcher: importDefault(694) /* metro dependency 694: Dispatcher */, TRACK_ACTION_NAME: 'TRACK'});
const object3 = {};
copyDataProperties(object3, analyticsUtilsModule, undefined);
const env0_23 = value11.trackMaker({addBreadcrumb: addBreadcrumb2, analyticEventConfigs: object,
dispatcher: Dispatcher, TRACK_ACTION_NAME: 'TRACK'});
const object4 = {};
copyDataProperties(object4, AnalyticsUtilsModule, undefined);
const getCampaignParams = analyticsUtilsModule2.getCampaignParams;
object3['getCampaignParams'] = getCampaignParams;
object3['setSystemAccessibilityFeatures'] = function(a0) {
object4['getCampaignParams'] = getCampaignParams;
object4['setSystemAccessibilityFeatures'] = function(a0) {
env0_19 = a0;
};
object3['expandEventProperties'] = closure3;
object3['track'] = track;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/AnalyticsUtils.tsx');
exports.default = object3;
object4['expandEventProperties'] = expandEventProperties2;
object4['track'] = track_8351;
(FileImportTrackerModule).fileFinishedImporting('utils/AnalyticsUtils.tsx');
exports.default = object4;
exports.AnalyticsContext = value;
exports.launchSignature = r9;
exports.addExtraAnalyticsDecorator = addExtraAnalyticsDecorator;
exports.AnalyticEventConfigs = object2;
exports.AnalyticEventConfigs = object;
exports.expandLocation = closure;
exports.setUTMContext = function(a0) {
env0_14 = a0;
return a0;
};
exports.expandEventProperties = closure3;
exports.debugLogEvent = closure4;
exports.expandEventProperties = expandEventProperties2;
exports.debugLogEvent = debugLogEvent2;
exports.startRecordingAnalyticsEvents = function() {
env0_21 = true;
};
@@ -337,163 +338,170 @@ function _fun8281(global, require, importDefault, importAll, module, exports, de
exports.trackNetworkAction = trackNetworkAction;
exports.getNewAnalyticsLoadId = getNewAnalyticsLoadId;
exports.AnalyticsSchema = importAll(12846) /* metro dependency 12846: AnalyticsSchema */;
}
function addBreadcrumb(a0) { // fn#8284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:6093, offset: 0x00d3ea81, size: 94 bytes, params: 2, frame: 14
const IGNORE_ANALYTICS_BREADCRUMB_EVENTS = (require(12843) /* metro dependency 12843: CommonSentryInitUtils */).IGNORE_ANALYTICS_BREADCRUMB_EVENTS;
if (!IGNORE_ANALYTICS_BREADCRUMB_EVENTS.includes(a0)) {
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).addBreadcrumb({category: 'analytics',
message: a0});
function addBreadcrumb(a0) { // fn#8284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:6093, offset: 0x00d3ea81, size: 94 bytes, params: 2, frame: 14
const IGNORE_ANALYTICS_BREADCRUMB_EVENTS = (CommonSentryInitUtilsModule).IGNORE_ANALYTICS_BREADCRUMB_EVENTS;
if (!IGNORE_ANALYTICS_BREADCRUMB_EVENTS.includes(a0)) {
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).addBreadcrumb({category: 'analytics',
message: a0});
}
}
}
function expandEventProperties(a0) { // fn#8285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:6358, offset: 0x00d3eadf, size: 528 bytes, params: 2, frame: 22
var r8;
var r0;
var object2;
var value2;
var value3;
const r7 = a0 ?? ({});
let location = r7.location;
if (location == null) {
r8 = r7;
} else {
location = r7.location;
value2 = env0_6(r7, env0_4);
object2 = {};
copyDataProperties(object2, value2, undefined);
copyDataProperties(object2, expandLocation(location), undefined);
r8 = object2;
function expandEventProperties(a0) { // fn#8285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:6358, offset: 0x00d3eadf, size: 528 bytes, params: 2, frame: 22
var r8;
var r0;
var object;
var value2;
var value3;
const r7 = a0 ?? ({});
let location = r7.location;
if (location == null) {
r8 = r7;
} else {
location = r7.location;
value2 = ObjectWithoutProperties(r7, env0_4);
object = {};
copyDataProperties(object, value2, undefined);
copyDataProperties(object, expandLocation(location), undefined);
r8 = object;
}
let source = r8.source;
if (source == null) {
r0 = r8;
} else {
source = r8.source;
value3 = ObjectWithoutProperties(r8, env0_5);
object = {};
copyDataProperties(object, value3, undefined);
copyDataProperties(object, expandSource(source), undefined);
r0 = object;
}
r0.client_performance_cpu = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCurrentCPUUsagePercent();
r0.client_performance_memory = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCurrentMemoryUsageKB();
r0.cpu_core_count = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCPUCoreCount();
r0.accessibility_features = getAccessibilityFeatures();
r0.rendered_locale = (require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale;
const Math = global.Math;
r0.uptime_app = Math.floor((global.performance.now() - env0_16) / env0_15);
const processUptime = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getProcessUptime();
if (processUptime != null) {
r0.uptime_process_renderer = global.Math.floor(processUptime);
}
const binding = env0_14;
const utmSource = binding.utmSource;
const utmMedium = binding.utmMedium;
const utmCampaign = binding.utmCampaign;
const utmContent = binding.utmContent;
r0.utm_source = r0.utm_source ?? utmSource;
r0.utm_medium = r0.utm_medium ?? utmMedium;
r0.utm_campaign = r0.utm_campaign ?? utmCampaign;
r0.utm_content = r0.utm_content ?? utmContent;
r0.launch_signature = env0_17;
env0_18.forEach(_fun8286);
return r0;
function _fun8286(a0) { // fn#8286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:7248, offset: 0x00c44018, size: 19 bytes, params: 2, frame: 11
return a0(env0_0);
}
}
let source = r8.source;
if (source == null) {
r0 = r8;
} else {
source = r8.source;
value3 = env0_6(r8, env0_5);
object2 = {};
copyDataProperties(object2, value3, undefined);
copyDataProperties(object2, expandSource(source), undefined);
r0 = object2;
function debugLogEvent(a0, a1) { // fn#8287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:7260, offset: 0x00d3ecef, size: 82 bytes, params: 3, frame: 16
let value = a2;
const r1 = value !== undefined ? value : false;
DeveloperOptionsStore.isLoggingAnalyticsEvents;
value = importAll(12) /* metro dependency 12: LogAggregator */;
const report = value.report;
if (r1) {
Reflect.apply(report, value, ['Analytics', a0, a1]);
} else {
Reflect.apply(report, value, ['Analytics', a0]);
}
}
r0.client_performance_cpu = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCurrentCPUUsagePercent();
r0.client_performance_memory = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCurrentMemoryUsageKB();
r0.cpu_core_count = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getCPUCoreCount();
r0.accessibility_features = getAccessibilityFeatures();
r0.rendered_locale = (require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale;
const Math = global.Math;
r0.uptime_app = Math.floor((global.performance.now() - env0_16) / env0_15);
const processUptime = (importDefault(5256) /* metro dependency 5256: ProcessUtilsNative */).getProcessUptime();
if (processUptime != null) {
r0.uptime_process_renderer = global.Math.floor(processUptime);
function _fun8290({location_object_type}) { // fn#8290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:748, offset: 0x00d3ed41, size: 58 bytes, params: 2, frame: 3
const ACK_MANUAL = AnalyticsObjectTypes.ACK_MANUAL;
return location_object_type === ACK_MANUAL ? undefined : {throttlePeriod: 900000, throttleKeys: function(a0) {
return [a0.guild_id, a0.channel_id, a0.location_section];
}};
}
const binding = env0_14;
const utmSource = binding.utmSource;
const utmMedium = binding.utmMedium;
const utmCampaign = binding.utmCampaign;
const utmContent = binding.utmContent;
r0.utm_source = r0.utm_source ?? utmSource;
r0.utm_medium = r0.utm_medium ?? utmMedium;
r0.utm_campaign = r0.utm_campaign ?? utmCampaign;
r0.utm_content = r0.utm_content ?? utmContent;
r0.launch_signature = env0_17;
env0_18.forEach(_fun8286);
return r0;
}
function debugLogEvent(a0, a1) { // fn#8287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:7260, offset: 0x00d3ecef, size: 82 bytes, params: 3, frame: 16
let value = a2;
const r1 = value !== undefined ? value : false;
DeveloperOptionsStore.isLoggingAnalyticsEvents;
value = importAll(12) /* metro dependency 12: LogAggregator */;
const report = value.report;
if (r1) {
Reflect.apply(report, value, ['Analytics', a0, a1]);
} else {
Reflect.apply(report, value, ['Analytics', a0]);
function _fun8339({type}) { // fn#8339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:4910, offset: 0x00d3f02c, size: 57 bytes, params: 2, frame: 3
const MEDIA_VIEWER = AnalyticsSections.MEDIA_VIEWER;
return type !== MEDIA_VIEWER ? undefined : {throttlePeriod: 60000, throttleKeys: function({type}) {
return [type];
}};
}
}
function _fun8290({location_object_type}) { // fn#8290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:748, offset: 0x00d3ed41, size: 58 bytes, params: 2, frame: 3
const ACK_MANUAL = AnalyticsObjectTypes.ACK_MANUAL;
return location_object_type === ACK_MANUAL ? undefined : {throttlePeriod: 900000, throttleKeys: function(a0) {
return [a0.guild_id, a0.channel_id, a0.location_section];
}};
}
function _fun8339({type}) { // fn#8339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:4910, offset: 0x00d3f02c, size: 57 bytes, params: 2, frame: 3
const MEDIA_VIEWER = AnalyticsSections.MEDIA_VIEWER;
return type !== MEDIA_VIEWER ? undefined : {throttlePeriod: 60000, throttleKeys: function({type}) {
return [type];
}};
}
function track(a0, a1) { // fn#8351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:7739, offset: 0x00d3f0c6, size: 223 bytes, params: 3, frame: 20
var isArray2;
var binding;
let value = a2;
const r6 = value !== undefined ? value : {};
const String = global.String;
value = String(a0);
if (env0_21) {
if (a1 != null) {
isArray2 = global.Array.isArray(env0_22[a0]);
binding = env0_22;
if (isArray2) {
binding[a0].push(a1);
} else {
binding[a0] = [a1];
function track_8351(a0, a1) { // fn#8351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:7739, offset: 0x00d3f0c6, size: 223 bytes, params: 3, frame: 20
var isArray2;
var binding;
let value = a2;
const r6 = value !== undefined ? value : {};
const String = global.String;
value = String(a0);
if (env0_21) {
if (a1 != null) {
isArray2 = global.Array.isArray(env0_22[a0]);
binding = env0_22;
if (isArray2) {
binding[a0].push(a1);
} else {
binding[a0] = [a1];
}
}
}
}
if (r6.throttlePercent != null) {
var Math = global.Math;
if (Math.random() > r6.throttlePercent) {
return global.Promise.resolve();
if (r6.throttlePercent != null) {
var Math = global.Math;
if (Math.random() > r6.throttlePercent) {
return global.Promise.resolve();
}
}
const value4 = expandEventProperties(a1);
debugLogEvent(value, value4, r6.logEventProperties);
return env0_20(a0, value4, {flush: r6.flush, fingerprint: r6.fingerprint});
}
const value4 = expandEventProperties(a1);
debugLogEvent(value, value4, r6.logEventProperties);
return env0_20(a0, value4, {flush: r6.flush, fingerprint: r6.fingerprint});
}
function addExtraAnalyticsDecorator(a0) { // fn#8352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:8245, offset: 0x00d3f1a5, size: 24 bytes, params: 2, frame: 11
env0_18.push(a0);
}
function getAnalyticsEventsRecording() { // fn#8356, offset: 0x00d3f1e3, size: 9 bytes, params: 1, frame: 1
return env0_22;
}
function clearAnalyticsEventsRecording() { // fn#8357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:8749, offset: 0x00d3f1ec, size: 46 bytes, params: 1, frame: 11
const Object = global.Object;
Object.keys(env0_22).forEach(_fun8358);
}
function isGameApplicationType(a0) { // fn#8359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:8858, offset: 0x00d3f22c, size: 39 bytes, params: 2, frame: 4
const GAME = ApplicationTypes.GAME;
return a0 === GAME || a0 === ApplicationTypes.DEPRECATED_GAME;
}
function trackNetworkAction(a0, a1) { // fn#8360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:8955, offset: 0x00d3f253, size: 96 bytes, params: 3, frame: 17
const expandEventPropertiesBinding = expandEventProperties;
let object2 = {};
object2.location = getLocation();
copyDataProperties(object2, a1, undefined);
const value2 = expandEventPropertiesBinding(object2);
const setDebugTrackedDataBinding = setDebugTrackedData;
object2 = {type: 'action'};
copyDataProperties(object2, a1, 'action');
setDebugTrackedDataBinding(a0, object2);
debugLogEvent(a0, value2);
env0_23(a0, value2);
}
function getNewAnalyticsLoadId() { // fn#8361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:9114, offset: 0x00d3f2b3, size: 37 bytes, params: 1, frame: 11
return (require(491) /* metro dependency 491 */).v4();
}
function _fun8358(a0) { // fn#8358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:8814, offset: 0x00d3f21a, size: 18 bytes, params: 2, frame: 2
delete env1_22[a0];
function addExtraAnalyticsDecorator(a0) { // fn#8352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:8245, offset: 0x00d3f1a5, size: 24 bytes, params: 2, frame: 11
env0_18.push(a0);
}
function getAnalyticsEventsRecording() { // fn#8356, offset: 0x00d3f1e3, size: 9 bytes, params: 1, frame: 1
return env0_22;
}
function clearAnalyticsEventsRecording() { // fn#8357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:8749, offset: 0x00d3f1ec, size: 46 bytes, params: 1, frame: 11
const Object = global.Object;
Object.keys(env0_22).forEach(_fun8358);
function _fun8358(a0) { // fn#8358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:8814, offset: 0x00d3f21a, size: 18 bytes, params: 2, frame: 2
delete env1_22[a0];
}
}
function isGameApplicationType(a0) { // fn#8359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:8858, offset: 0x00d3f22c, size: 39 bytes, params: 2, frame: 4
const GAME = ApplicationTypes.GAME;
return a0 === GAME || a0 === ApplicationTypes.DEPRECATED_GAME;
}
function trackNetworkAction(a0, a1) { // fn#8360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:8955, offset: 0x00d3f253, size: 96 bytes, params: 3, frame: 17
const expandEventPropertiesBinding = expandEventProperties;
let object = {};
object.location = getLocation();
copyDataProperties(object, a1, undefined);
const value2 = expandEventPropertiesBinding(object);
const setDebugTrackedDataBinding = setDebugTrackedData;
object = {type: 'action'};
copyDataProperties(object, a1, 'action');
setDebugTrackedDataBinding(a0, object);
debugLogEvent(a0, value2);
env0_23(a0, value2);
}
function getNewAnalyticsLoadId() { // fn#8361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:790:9114, offset: 0x00d3f2b3, size: 37 bytes, params: 1, frame: 11
return (Module00491Module).v4();
}
}
global.__d(_fun8281, 683, [29, 31, 684, 691, 661, 12845, 4238, 1873, 682, 480, 12843, 1216, 694, 5256, 1244, 12,
491, 2,
12846]) /* metro module 683, dependencies: [29, 31, 684, 691, 661, 12845, 4238, 1873, 682, 480, 12843, 1216, 694, 5256, 1244, 12, 491, 2, 12846] */;
+425 -417
View File
@@ -1,6 +1,12 @@
/* Metro module 6873; source: utils/ApplicationAssetUtils.tsx; dependencies: [57, 5, 6874, 661, 44, 507, 694, 3, 1457, 2] */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00044 from '../by-id/module-00044.js'; /* Metro dependency 44 */
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import ApplicationAssetsStore from '../modules/applications/ApplicationAssetsStore.tsx'; /* Metro dependency 6874 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun54417(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:6, offset: 0x01364d47, size: 530 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const _arrayLikeToArray_54420 = function(a0, a1) {
var r0;
@@ -48,7 +54,7 @@ function _fun54417(global, require, importDefault, importAll, module, exports, d
const updateAssets = function() {
return _updateAssets.apply(this, arguments);
};
const closure = getAssetFromImageURL;
const getAssetFromImageURL2 = getAssetFromImageURL;
const closure2 = function() {
return _getAssets.apply(this, arguments);
};
@@ -57,38 +63,33 @@ function _fun54417(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(5) /* metro dependency 5 */;
const applicationAssetsStore = importDefault(6874) /* metro dependency 6874: ApplicationAssetsStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.Endpoints;
const PlatformTypes = constantsModule.PlatformTypes;
const PlatformTypes = ConstantsModule.PlatformTypes;
const env0_8 = RegExp('https:\\/\\/static-cdn\\.jtvnw\\.net\\/previews-ttv\\/live_user_(.+)-\\{width\\}x\\{height\\}.jpg',
'');
const env0_9 = RegExp('https:\\/\\/i\\.ytimg\\.com\\/vi\\/([a-zA-Z0-9_-]+)\\/hqdefault_live\\.jpg', '');
object2 = {};
object = {};
const SPOTIFY = PlatformTypes.SPOTIFY;
object2[SPOTIFY] = {deserialize: function(a0) {
object[SPOTIFY] = {deserialize: function(a0) {
return '' + 'https://i.scdn.co/image/' + (0, global.encodeURIComponent)(a0);
}, serialize: function(a0) {
return a0.split('https://i.scdn.co/image/')[1];
}};
const TWITCH = PlatformTypes.TWITCH;
object2[TWITCH] = {deserialize: function(a0, a1) {
object[TWITCH] = {deserialize: function(a0, a1) {
return 'https://static-cdn.jtvnw.net/previews-ttv/live_user_' + (0,
global.encodeURIComponent)(a0) + '-' + a1[0] + 'x' + a1[1] + '.jpg';
}, serialize: serialize_54448};
const YOUTUBE = PlatformTypes.YOUTUBE;
object2[YOUTUBE] = {deserialize: function(a0) {
object[YOUTUBE] = {deserialize: function(a0) {
return 'https://i.ytimg.com/vi/' + (0, global.encodeURIComponent)(a0) + '/hqdefault_live.jpg';
}, serialize: serialize_54450};
object2['mp'] = {deserialize: deserialize_54451, serialize: function(a0) {
object['mp'] = {deserialize: deserialize_54451, serialize: function(a0) {
return a0;
}};
const Map = global.Map;
const map = new Map();
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ApplicationAssetUtils.tsx');
exports.getAssetFromImageURL = closure;
(FileImportTrackerModule).fileFinishedImporting('utils/ApplicationAssetUtils.tsx');
exports.getAssetFromImageURL = getAssetFromImageURL2;
exports.getAssetImage = getAssetImage;
exports.getAssets = closure2;
exports.fetchAssetIds = closure3;
@@ -103,150 +104,434 @@ function _fun54417(global, require, importDefault, importAll, module, exports, d
}
return items;
};
}
function _createForOfIteratorHelperLoose_54418(a0, a1) { // fn#54418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:177, offset: 0x01364f59, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_54418(a0, a1) { // fn#54418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:177, offset: 0x01364f59, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun54419;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_54420(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun54419;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_54420(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_54420(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_54420(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun54419;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun54419() { // fn#54419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:748, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function _updateAssets() { // fn#54422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:2264, offset: 0x013650cb, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun54424).apply(this, arguments);
function* _fun54424(a0) { // fn#54424, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:2313, offset: 0x01365104, size: 174 bytes, params: 2, frame: 17
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[5]).HTTP;
const get = HTTP.get;
const object = {'url': null, 'oldFormErrors': true, 'rejectWithError': false};
object.url = env2_6.APPLICATION_ASSETS(a0);
yield Reflect.apply(get, HTTP, [object]);
const value3 = undefined;
if (false) {
return value3;
}
const body = value3.body;
const value5 = env2_1(env2_2[6]);
value5.dispatch({type: 'APPLICATION_ASSETS_UPDATE', applicationId: a0, assets: body});
return env2_5.getApplicationAssets(a0);
}
}
function getApplicationAssetsMap(a0) { // fn#54425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:2568, offset: 0x013651b2, size: 95 bytes, params: 2, frame: 15
const applicationAssets = ApplicationAssetsStore.getApplicationAssets(a0);
return applicationAssets == null || global.Date.now() - applicationAssets.lastUpdated > 3600000 ? updateAssets(a0) : global.Promise.resolve(applicationAssets);
}
function getAssetFromImageURL(a0, a1) { // fn#54426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:2750, offset: 0x01365211, size: 72 bytes, params: 3, frame: 16
var r0;
let value = env0_10[a0].serialize(a1);
if (value) {
value = value.toString();
value = '' + a0 + ':' + value;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function _getAssets() { // fn#54428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:2907, offset: 0x01365259, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun54430).apply(this, arguments);
function* _fun54430(a0) { // fn#54430, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:2950, offset: 0x01365292, size: 60 bytes, params: 2, frame: 12
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
value = undefined;
yield env2_16(a0);
const value3 = undefined;
if (false) {
return value3;
}
return value3 == null ? value : value3.assets;
}
}
function _resolveExternalAssets() { // fn#54431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:3059, offset: 0x013652ce, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun54433).apply(this, arguments);
function* _fun54433(a0, a1) { // fn#54433, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:3126, offset: 0x01365307, size: 228 bytes, params: 3, frame: 20
var environment;
var r3;
var value3;
var binding;
var HTTP;
var post;
var object;
var value5;
var done;
var value6;
var url;
var external_asset_path;
var set;
var value7;
if (true) {
if (a1.filter(_fun54434).length !== 0) {
value3 = environment.__proto__.__proto__;
binding = env2_12;
HTTP = env2_0(env2_2[5]).HTTP;
post = HTTP.post;
object = {};
object.url = env2_6.APPLICATION_EXTERNAL_ASSETS(a0);
object.body = {urls: value};
object.oldFormErrors = true;
object.rejectWithError = false;
yield Reflect.apply(post, HTTP, [object]);
value = undefined;
if (false) {
return value;
}
value = binding(value.body);
value5 = value();
done = value5.done;
if (!done) {
r3 = value5;
reducibleLoop5: while (true) {
value6 = r3.value;
url = value6.url;
external_asset_path = value6.external_asset_path;
binding = env2_11;
set = binding.set;
Reflect.apply(set, binding, [url, external_asset_path]);
value7 = value();
done = value7.done;
if (done) {
break reducibleLoop5;
}
r3 = value7;
continue reducibleLoop5;
}
}
}
}
r5 = r6;
function _fun54434(a0) { // fn#54434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:3157, offset: 0x013653eb, size: 35 bytes, params: 2, frame: 13
var r0;
var binding;
let value = a0 != null;
if (value) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_11;
value = binding.get(a0) == null;
r0 = value;
} else {
r0 = value;
}
return r0;
}
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun54419;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function _updateAssets() { // fn#54422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:2264, offset: 0x013650cb, size: 48 bytes, params: 1, frame: 14
return env0_4(_fun54424).apply(this, arguments);
}
function getApplicationAssetsMap(a0) { // fn#54425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:2568, offset: 0x013651b2, size: 95 bytes, params: 2, frame: 15
const applicationAssets = ApplicationAssetsStore.getApplicationAssets(a0);
return applicationAssets == null || global.Date.now() - applicationAssets.lastUpdated > 3600000 ? updateAssets(a0) : global.Promise.resolve(applicationAssets);
}
function getAssetFromImageURL(a0, a1) { // fn#54426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:2750, offset: 0x01365211, size: 72 bytes, params: 3, frame: 16
var r0;
let value = env0_10[a0].serialize(a1);
if (value) {
value = value.toString();
value = '' + a0 + ':' + value;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function _getAssets() { // fn#54428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:2907, offset: 0x01365259, size: 48 bytes, params: 1, frame: 14
return env0_4(_fun54430).apply(this, arguments);
}
function _resolveExternalAssets() { // fn#54431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:3059, offset: 0x013652ce, size: 48 bytes, params: 1, frame: 14
return env0_4(_fun54433).apply(this, arguments);
}
function updateUrlAssetIds(a0, a1) { // fn#54435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:3469, offset: 0x0136540e, size: 156 bytes, params: 3, frame: 23
var r4;
var r5;
var r11;
var r1;
var property;
var binding;
let length = a0.filter(function(a0) {
var r0;
var value = undefined;
r0 = a0 == null ? value : a0.startsWith('http:');
r0 = !r0 ? a0 == null ? value : a0.startsWith('https:') : r0;
return r0;
}).length;
let value = 0;
if (length > value) {
length = a0.length;
if (value < length) {
r4 = value;
r5 = value;
while (true) {
property = a0[r4];
if (property != null) {
binding = env0_11;
value = binding.get(property);
if (value == null) {
r11 = r5;
function updateUrlAssetIds(a0, a1) { // fn#54435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:3469, offset: 0x0136540e, size: 156 bytes, params: 3, frame: 23
var r4;
var r5;
var r11;
var r1;
var property;
var binding;
let length = a0.filter(function(a0) {
var r0;
var value = undefined;
r0 = a0 == null ? value : a0.startsWith('http:');
r0 = !r0 ? a0 == null ? value : a0.startsWith('https:') : r0;
return r0;
}).length;
let value = 0;
if (length > value) {
length = a0.length;
if (value < length) {
r4 = value;
r5 = value;
while (true) {
property = a0[r4];
if (property != null) {
binding = env0_11;
value = binding.get(property);
if (value == null) {
r11 = r5;
break;
}
a1[r4] = getAssetFromImageURL('mp', value);
value = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
r11 = value;
break;
}
a1[r4] = getAssetFromImageURL('mp', value);
value = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
r11 = value;
r11 = r5;
value = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
length = a0.length;
if (value < length) {
r4 = value;
r5 = r11;
continue;
}
r1 = r11;
break;
}
r11 = r5;
value = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
length = a0.length;
if (value < length) {
r4 = value;
r5 = r11;
continue;
}
r1 = r11;
break;
} else {
r1 = value;
}
} else {
r1 = value;
}
} else {
r1 = value;
return r1 === a0.length;
}
return r1 === a0.length;
function _fetchAssetIds() { // fn#54439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:4055, offset: 0x01365596, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun54441).apply(this, arguments);
async function _fun54441(a0, a1) { // fn#54441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:4106, offset: 0x013655d8, size: 402 bytes, params: 3, frame: 27
var environment;
var r9;
let value = a2;
if (false) {
return undefined;
}
const env0_0 = a0;
const env0_1 = a1;
const r11 = value !== undefined ? value : 1;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
env2_1(env2_2[6]).dispatch({type: 'APPLICATION_ASSETS_FETCH', applicationId: a0});
items2 = [];
const value6 = a1.filter(function(a0) {
var r0;
var value = undefined;
r0 = a0 == null ? value : a0.startsWith('http:');
r0 = !r0 ? a0 == null ? value : a0.startsWith('https:') : r0;
return r0;
});
if (value6.length > 0) {
await resolveExternalAssets(a0, value6);
if (false) {
return undefined;
}
}
if (env2_21(a1, items2)) {
env2_1(env2_2[6]).dispatch({type: 'APPLICATION_ASSETS_FETCH_SUCCESS', applicationId: a0});
return items2;
}
await env2_18(a0);
const value9 = undefined;
if (false) {
return value9;
}
const value11 = env2_1(env2_2[6]);
value11.dispatch({type: 'APPLICATION_ASSETS_UPDATE', applicationId: a0, assets: value9});
if (env2_22(a1, items2, value9, r11)) {
value = env2_14(a0);
value = value.then(_fun54444);
r9 = value;
} else {
env2_1(env2_2[6]).dispatch({type: 'APPLICATION_ASSETS_FETCH_SUCCESS', applicationId: a0});
r9 = items2;
}
return r9;
function resolveExternalAssets() { // fn#54443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:4322, offset: 0x0136576a, size: 30 bytes, params: 1, frame: 13
return env3_20.apply(this, arguments);
}
function _fun54444() { // fn#54444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:4686, offset: 0x01365788, size: 40 bytes, params: 1, frame: 15
return env3_23(env0_0, require, env0_2 - 1);
}
}
}
function serialize_54448(a0) { // fn#54448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:1551, offset: 0x01365842, size: 39 bytes, params: 2, frame: 11
const value = a0.match(env0_8);
const value2 = null;
return value2 != value ? value[1] : value2;
}
function serialize_54450(a0) { // fn#54450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:1714, offset: 0x0136589a, size: 39 bytes, params: 2, frame: 11
const value = a0.match(env0_9);
const value2 = null;
return value2 != value ? value[1] : value2;
}
function deserialize_54451(a0) { // fn#54451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:1779, offset: 0x013658c1, size: 300 bytes, params: 2, frame: 17
let value = Module00044;
let GLOBAL_ENV = global.window.GLOBAL_ENV;
let MEDIA_PROXY_ENDPOINT = GLOBAL_ENV.MEDIA_PROXY_ENDPOINT;
value(MEDIA_PROXY_ENDPOINT != null, 'MEDIA_PROXY_ENDPOINT not configured');
const URL = global.URL;
const protocol = global.location.protocol;
GLOBAL_ENV = global.window.GLOBAL_ENV;
MEDIA_PROXY_ENDPOINT = GLOBAL_ENV.MEDIA_PROXY_ENDPOINT;
value = protocol + MEDIA_PROXY_ENDPOINT;
const uRL = new URL(a0);
const value4 = a0.toLowerCase().endsWith('.gif');
const value6 = a0.toLowerCase().endsWith('.webp');
const value8 = a0.toLowerCase().endsWith('.avif');
if (value4 || value8) {
uRL.searchParams.set('format', 'webp');
}
let r0 = value4 || value6;
r0 = !r0 ? value8 : r0;
if (r0) {
uRL.searchParams.set('animated', 'true');
}
return uRL.toString();
}
function getAssetImage(a0, a1, a2) { // fn#54453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:4964, offset: 0x013659ed, size: 610 bytes, params: 4, frame: 34
var r8;
var r13;
var r0;
var r1;
var Array;
var Math;
var max;
var items2;
var value12;
var property;
var property2;
var hasOwnProperty;
let value = a2;
const value2 = a3;
const value3 = undefined;
const r15 = value2 !== value3 ? value2 : 'png';
if (a1 != null) {
if (a1.includes(':')) {
value12 = Module00057(a1.split(':'), 2);
property = value12[0];
property2 = value12[1];
if (property === PlatformTypes.TWITCH) {
if (value == null) {
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('ApplicationAssetUtils');
value.warn('getAssetImage: size must === [number, number] for Twitch');
r1 = value3;
} else if (typeof value === 'number') {
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('ApplicationAssetUtils');
value.warn('getAssetImage: size must === [number, number] for Twitch');
r1 = value3;
} else {
value = env0_10[PlatformTypes.TWITCH].deserialize(property2, value);
r1 = value;
}
r0 = r1;
} else {
hasOwnProperty = global.Object.prototype.hasOwnProperty;
r0 = hasOwnProperty.call(env0_10, property) ? env0_10[property].deserialize(property2) : value3;
}
return r0;
}
}
if (a0 != null) {
if (a1 != null) {
Array = global.Array;
if (Array.isArray(value)) {
Math = global.Math;
max = Math.max;
items2 = [];
arraySpread(items2, value, 0, undefined);
value = apply(max, items2, Math, undefined);
r8 = value;
} else {
r8 = value;
}
value = '';
r13 = typeof r8 !== 'number' ? value : '?size=' + (require(1457) /* metro dependency 1457: ImageLoaderUtils */).getBestMediaProxySize(r8);
if (global.window.GLOBAL_ENV.CDN_HOST != null) {
value = value + global.location.protocol + '//' + global.window.GLOBAL_ENV.CDN_HOST + '/app-assets/' + a0 + '/' + a1 + '.' + r15 + r13;
r0 = value;
} else {
value = value + (require(507) /* metro dependency 507: HTTPUtils */).getAPIBaseURL() + '/applications/' + a0 + '/app-assets/' + a1 + '.' + r15 + r13;
r0 = value;
}
return r0;
}
}
return value3;
}
}
function updateNonUrlAssetIds(a0, a1, a2, a3) { // fn#54437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:3756, offset: 0x013654e9, size: 173 bytes, params: 5, frame: 26
@@ -332,282 +617,5 @@ function updateNonUrlAssetIds(a0, a1, a2, a3) { // fn#54437, source: /ci/build/d
return r0;
}
function _fetchAssetIds() { // fn#54439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:4055, offset: 0x01365596, size: 48 bytes, params: 1, frame: 14
return env0_4(_fun54441).apply(this, arguments);
}
function serialize_54448(a0) { // fn#54448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:1551, offset: 0x01365842, size: 39 bytes, params: 2, frame: 11
const value = a0.match(env0_8);
const value2 = null;
return value2 != value ? value[1] : value2;
}
function serialize_54450(a0) { // fn#54450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:1714, offset: 0x0136589a, size: 39 bytes, params: 2, frame: 11
const value = a0.match(env0_9);
const value2 = null;
return value2 != value ? value[1] : value2;
}
function deserialize_54451(a0) { // fn#54451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:1779, offset: 0x013658c1, size: 300 bytes, params: 2, frame: 17
let value = importDefault(44) /* metro dependency 44 */;
let GLOBAL_ENV = global.window.GLOBAL_ENV;
let MEDIA_PROXY_ENDPOINT = GLOBAL_ENV.MEDIA_PROXY_ENDPOINT;
value(MEDIA_PROXY_ENDPOINT != null, 'MEDIA_PROXY_ENDPOINT not configured');
const URL = global.URL;
const protocol = global.location.protocol;
GLOBAL_ENV = global.window.GLOBAL_ENV;
MEDIA_PROXY_ENDPOINT = GLOBAL_ENV.MEDIA_PROXY_ENDPOINT;
value = protocol + MEDIA_PROXY_ENDPOINT;
const uRL = new URL(a0);
const value4 = a0.toLowerCase().endsWith('.gif');
const value6 = a0.toLowerCase().endsWith('.webp');
const value8 = a0.toLowerCase().endsWith('.avif');
if (value4 || value8) {
uRL.searchParams.set('format', 'webp');
}
let r0 = value4 || value6;
r0 = !r0 ? value8 : r0;
if (r0) {
uRL.searchParams.set('animated', 'true');
}
return uRL.toString();
}
function getAssetImage(a0, a1, a2) { // fn#54453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:4964, offset: 0x013659ed, size: 610 bytes, params: 4, frame: 34
var r8;
var r13;
var r0;
var r1;
var Array;
var Math;
var max;
var items2;
var value12;
var property;
var property2;
var hasOwnProperty;
let value = a2;
const value2 = a3;
const value3 = undefined;
const r15 = value2 !== value3 ? value2 : 'png';
if (a1 != null) {
if (a1.includes(':')) {
value12 = env0_3(a1.split(':'), 2);
property = value12[0];
property2 = value12[1];
if (property === PlatformTypes.TWITCH) {
if (value == null) {
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('ApplicationAssetUtils');
value.warn('getAssetImage: size must === [number, number] for Twitch');
r1 = value3;
} else if (typeof value === 'number') {
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('ApplicationAssetUtils');
value.warn('getAssetImage: size must === [number, number] for Twitch');
r1 = value3;
} else {
value = env0_10[PlatformTypes.TWITCH].deserialize(property2, value);
r1 = value;
}
r0 = r1;
} else {
hasOwnProperty = global.Object.prototype.hasOwnProperty;
r0 = hasOwnProperty.call(env0_10, property) ? env0_10[property].deserialize(property2) : value3;
}
return r0;
}
}
if (a0 != null) {
if (a1 != null) {
Array = global.Array;
if (Array.isArray(value)) {
Math = global.Math;
max = Math.max;
items2 = [];
arraySpread(items2, value, 0, undefined);
value = apply(max, items2, Math, undefined);
r8 = value;
} else {
r8 = value;
}
value = '';
r13 = typeof r8 !== 'number' ? value : '?size=' + (require(1457) /* metro dependency 1457: ImageLoaderUtils */).getBestMediaProxySize(r8);
if (global.window.GLOBAL_ENV.CDN_HOST != null) {
value = value + global.location.protocol + '//' + global.window.GLOBAL_ENV.CDN_HOST + '/app-assets/' + a0 + '/' + a1 + '.' + r15 + r13;
r0 = value;
} else {
value = value + (require(507) /* metro dependency 507: HTTPUtils */).getAPIBaseURL() + '/applications/' + a0 + '/app-assets/' + a1 + '.' + r15 + r13;
r0 = value;
}
return r0;
}
}
return value3;
}
function* _fun54424(a0) { // fn#54424, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:2313, offset: 0x01365104, size: 174 bytes, params: 2, frame: 17
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[5]).HTTP;
const get = HTTP.get;
const object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': false};
object2.url = env2_6.APPLICATION_ASSETS(a0);
yield Reflect.apply(get, HTTP, [object2]);
const value3 = undefined;
if (false) {
return value3;
}
const body = value3.body;
const value5 = env2_1(env2_2[6]);
value5.dispatch({type: 'APPLICATION_ASSETS_UPDATE', applicationId: a0, assets: body});
return env2_5.getApplicationAssets(a0);
}
function* _fun54430(a0) { // fn#54430, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:2950, offset: 0x01365292, size: 60 bytes, params: 2, frame: 12
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
value = undefined;
yield env2_16(a0);
const value3 = undefined;
if (false) {
return value3;
}
return value3 == null ? value : value3.assets;
}
function* _fun54433(a0, a1) { // fn#54433, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:3126, offset: 0x01365307, size: 228 bytes, params: 3, frame: 20
var environment;
var r3;
var value3;
var binding;
var HTTP;
var post;
var object2;
var value5;
var done;
var value6;
var url;
var external_asset_path;
var set;
var value7;
if (true) {
if (a1.filter(_fun54434).length !== 0) {
value3 = environment.__proto__.__proto__;
binding = env2_12;
HTTP = env2_0(env2_2[5]).HTTP;
post = HTTP.post;
object2 = {};
object2.url = env2_6.APPLICATION_EXTERNAL_ASSETS(a0);
object2.body = {urls: value};
object2.oldFormErrors = true;
object2.rejectWithError = false;
yield Reflect.apply(post, HTTP, [object2]);
value = undefined;
if (false) {
return value;
}
value = binding(value.body);
value5 = value();
done = value5.done;
if (!done) {
r3 = value5;
reducibleLoop5: while (true) {
value6 = r3.value;
url = value6.url;
external_asset_path = value6.external_asset_path;
binding = env2_11;
set = binding.set;
Reflect.apply(set, binding, [url, external_asset_path]);
value7 = value();
done = value7.done;
if (done) {
break reducibleLoop5;
}
r3 = value7;
continue reducibleLoop5;
}
}
}
}
}
async function _fun54441(a0, a1) { // fn#54441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:4106, offset: 0x013655d8, size: 402 bytes, params: 3, frame: 27
var environment;
var r9;
let value = a2;
if (false) {
return undefined;
}
const env0_0 = a0;
const env0_1 = a1;
const r11 = value !== undefined ? value : 1;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
env2_1(env2_2[6]).dispatch({type: 'APPLICATION_ASSETS_FETCH', applicationId: a0});
items = [];
const value6 = a1.filter(function(a0) {
var r0;
var value = undefined;
r0 = a0 == null ? value : a0.startsWith('http:');
r0 = !r0 ? a0 == null ? value : a0.startsWith('https:') : r0;
return r0;
});
if (value6.length > 0) {
await resolveExternalAssets(a0, value6);
if (false) {
return undefined;
}
}
if (env2_21(a1, items)) {
env2_1(env2_2[6]).dispatch({type: 'APPLICATION_ASSETS_FETCH_SUCCESS', applicationId: a0});
return items;
}
await env2_18(a0);
const value9 = undefined;
if (false) {
return value9;
}
const value11 = env2_1(env2_2[6]);
value11.dispatch({type: 'APPLICATION_ASSETS_UPDATE', applicationId: a0, assets: value9});
if (env2_22(a1, items, value9, r11)) {
value = env2_14(a0);
value = value.then(_fun54444);
r9 = value;
} else {
env2_1(env2_2[6]).dispatch({type: 'APPLICATION_ASSETS_FETCH_SUCCESS', applicationId: a0});
r9 = items;
}
return r9;
}
function _fun54434(a0) { // fn#54434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:3157, offset: 0x013653eb, size: 35 bytes, params: 2, frame: 13
var r0;
var binding;
let value = a0 != null;
if (value) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_11;
value = binding.get(a0) == null;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function resolveExternalAssets() { // fn#54443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:4322, offset: 0x0136576a, size: 30 bytes, params: 1, frame: 13
return env3_20.apply(this, arguments);
}
function _fun54444() { // fn#54444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7051:4686, offset: 0x01365788, size: 40 bytes, params: 1, frame: 15
return env3_23(env0_0, require, env0_2 - 1);
}
global.__d(_fun54417, 6873, [57, 5, 6874, 661, 44, 507, 694, 3, 1457,
2]) /* metro module 6873, dependencies: [57, 5, 6874, 661, 44, 507, 694, 3, 1457, 2] */;
+371 -366
View File
@@ -1,12 +1,15 @@
/* Metro module 4659; source: utils/AttachmentFile.native.tsx; dependencies: [5, 3, 44, 4650, 4660, 4651, 2] */
import Logger from '../modules/debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun40259(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:6, offset: 0x010fac82, size: 198 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('AttachmentFile');
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/AttachmentFile.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/AttachmentFile.native.tsx');
exports.getAttachmentFile = function() {
return _getAttachmentFile.apply(this, arguments);
};
@@ -14,379 +17,381 @@ function _fun40259(global, require, importDefault, importAll, module, exports, d
return _cancelGetAttachmentFile.apply(this, arguments);
};
exports.fileIsInAppDir = fileIsInAppDir;
}
function _getAttachmentFile() { // fn#40260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:141, offset: 0x010fad48, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun40262).apply(this, arguments);
}
function _cancelGetAttachmentFile() { // fn#40263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:617, offset: 0x010faedd, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun40265).apply(this, arguments);
}
function fileIsInAppDir(a0) { // fn#40268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:1061, offset: 0x010faf57, size: 153 bytes, params: 2, frame: 17
var r0;
var value2;
var property;
var moduleValue;
var appDir;
var value4;
var startsWith;
var moduleValue2;
var appDir2;
var error;
var binding;
let value = a0.replace(RegExp('^file:\\/\\/', ''), '');
try {
value2 = environment;
property = dependencyMap[4];
moduleValue = require(property);
appDir = moduleValue.getAppDir();
value4 = appDir !== '';
if (value4) {
startsWith = value.startsWith;
property = dependencyMap[4];
moduleValue2 = require(property);
appDir2 = moduleValue2.getAppDir();
value = Reflect.apply(startsWith, value, [appDir2]);
r0 = value;
} else {
r0 = value4;
}
} catch (error) {
binding = env0_4;
binding.error('Failed to get app dir', error);
return false;
}
return r0;
}
function* _fun40262(a0, a1) { // fn#40262, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:200, offset: 0x010fad81, size: 348 bytes, params: 3, frame: 24
var r4;
var r5;
var value;
var value2;
var value3;
var binding;
var binding2;
var value4;
var item;
var platform;
var UploadPlatform;
var REACT_NATIVE;
var binding3;
var property;
var value5;
var getFileInfo;
var value6;
var value7;
var value8;
var binding4;
var value9;
var getAttachmentPayload;
var name;
var value10;
var binding5;
var value11;
var getFileSize;
var uri;
var value12;
var value13;
var value14;
var error;
var object2;
var filename;
var value15;
var value16;
exceptionLanding51: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = undefined;
value3 = environment.__proto__.__proto__;
binding = env2_1;
binding2 = env2_2;
value4 = binding(binding2[2]);
item = a0.item;
platform = item.platform;
binding = env2_0;
UploadPlatform = binding(binding2[3]).UploadPlatform;
REACT_NATIVE = UploadPlatform.REACT_NATIVE;
value4(platform === REACT_NATIVE, 'Upload must be in the React Native format');
try {
binding = env2_0;
} catch (error) {
break exceptionLanding51;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding51;
}
try {
property = binding3[4];
} catch (error) {
break exceptionLanding51;
}
try {
value5 = binding(property);
} catch (error) {
break exceptionLanding51;
}
try {
getFileInfo = value5.getFileInfo;
} catch (error) {
break exceptionLanding51;
}
try {
value6 = Reflect.apply(getFileInfo, value5, [a0, a1]);
} catch (error) {
break exceptionLanding51;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding51;
}
if (value8) {
return value7;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding51;
}
try {
binding4 = env2_2;
} catch (error) {
break exceptionLanding51;
}
try {
property = binding4[5];
} catch (error) {
break exceptionLanding51;
}
try {
value9 = binding(property);
} catch (error) {
break exceptionLanding51;
}
try {
getAttachmentPayload = value9.getAttachmentPayload;
} catch (error) {
break exceptionLanding51;
}
try {
name = value7.name;
} catch (error) {
break exceptionLanding51;
}
try {
value10 = Reflect.apply(getAttachmentPayload, value9, [a0, a1, name]);
} catch (error) {
break exceptionLanding51;
}
reducibleJoin24: while (true) {
reduciblePort38: while (true) {
exceptionLanding37: while (true) {
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding37;
function _getAttachmentFile() { // fn#40260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:141, offset: 0x010fad48, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun40262).apply(this, arguments);
function* _fun40262(a0, a1) { // fn#40262, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:200, offset: 0x010fad81, size: 348 bytes, params: 3, frame: 24
var r4;
var r5;
var value;
var value2;
var value3;
var binding;
var binding2;
var value4;
var item;
var platform;
var UploadPlatform;
var REACT_NATIVE;
var binding3;
var property;
var value5;
var getFileInfo;
var value6;
var value7;
var value8;
var binding4;
var value9;
var getAttachmentPayload;
var name;
var value10;
var binding5;
var value11;
var getFileSize;
var uri;
var value12;
var value13;
var value14;
var error;
var object;
var filename;
var value15;
var value16;
exceptionLanding51: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = undefined;
value3 = environment.__proto__.__proto__;
binding = env2_1;
binding2 = env2_2;
value4 = binding(binding2[2]);
item = a0.item;
platform = item.platform;
binding = env2_0;
UploadPlatform = binding(binding2[3]).UploadPlatform;
REACT_NATIVE = UploadPlatform.REACT_NATIVE;
value4(platform === REACT_NATIVE, 'Upload must be in the React Native format');
try {
binding = env2_0;
} catch (error) {
break exceptionLanding51;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding51;
}
try {
property = binding3[4];
} catch (error) {
break exceptionLanding51;
}
try {
value5 = binding(property);
} catch (error) {
break exceptionLanding51;
}
try {
getFileInfo = value5.getFileInfo;
} catch (error) {
break exceptionLanding51;
}
try {
value6 = Reflect.apply(getFileInfo, value5, [a0, a1]);
} catch (error) {
break exceptionLanding51;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding51;
}
if (value8) {
return value7;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding51;
}
try {
binding4 = env2_2;
} catch (error) {
break exceptionLanding51;
}
try {
property = binding4[5];
} catch (error) {
break exceptionLanding51;
}
try {
value9 = binding(property);
} catch (error) {
break exceptionLanding51;
}
try {
getAttachmentPayload = value9.getAttachmentPayload;
} catch (error) {
break exceptionLanding51;
}
try {
name = value7.name;
} catch (error) {
break exceptionLanding51;
}
try {
value10 = Reflect.apply(getAttachmentPayload, value9, [a0, a1, name]);
} catch (error) {
break exceptionLanding51;
}
reducibleJoin24: while (true) {
reduciblePort38: while (true) {
exceptionLanding37: while (true) {
try {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding37;
}
} catch (error) {
break exceptionLanding51;
}
break reducibleJoin24;
}
r4 = value;
break reduciblePort38;
}
try {
object = {};
} catch (error) {
break exceptionLanding51;
}
break reducibleJoin24;
try {
object.file = value7;
} catch (error) {
break exceptionLanding51;
}
try {
uri = value7.uri;
} catch (error) {
break exceptionLanding51;
}
try {
object.uri = uri;
} catch (error) {
break exceptionLanding51;
}
try {
filename = value10.filename;
} catch (error) {
break exceptionLanding51;
}
try {
value15 = filename != null;
} catch (error) {
break exceptionLanding51;
}
value16 = '';
reducibleJoin47: while (true) {
if (value15) {
r5 = filename;
break reducibleJoin47;
}
r5 = value16;
break reducibleJoin47;
}
try {
object.name = r5;
} catch (error) {
break exceptionLanding51;
}
try {
object.fileSize = r4;
} catch (error) {
break exceptionLanding51;
}
return object;
}
r4 = value;
break reduciblePort38;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding51;
}
try {
object2.file = value7;
} catch (error) {
break exceptionLanding51;
}
try {
uri = value7.uri;
} catch (error) {
break exceptionLanding51;
}
try {
object2.uri = uri;
} catch (error) {
break exceptionLanding51;
}
try {
filename = value10.filename;
} catch (error) {
break exceptionLanding51;
}
try {
value15 = filename != null;
} catch (error) {
break exceptionLanding51;
}
value16 = '';
reducibleJoin47: while (true) {
if (value15) {
r5 = filename;
try {
try {
binding5 = env2_2;
} catch (error) {
break exceptionLanding37;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
property = binding5[4];
} catch (error) {
break exceptionLanding37;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
value11 = binding(property);
} catch (error) {
break exceptionLanding37;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
getFileSize = value11.getFileSize;
} catch (error) {
break exceptionLanding37;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
uri = value7.uri;
} catch (error) {
break exceptionLanding37;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
value12 = Reflect.apply(getFileSize, value11, [uri]);
} catch (error) {
break exceptionLanding37;
}
} catch (error) {
break exceptionLanding51;
}
yield value12;
try {
try {
value13 = undefined;
value14 = false;
} catch (error) {
break exceptionLanding37;
}
} catch (error) {
break exceptionLanding51;
}
if (value14) {
return value13;
}
r4 = value13;
try {
object = {};
} catch (error) {
break exceptionLanding51;
}
try {
object.file = value7;
} catch (error) {
break exceptionLanding51;
}
try {
uri = value7.uri;
} catch (error) {
break exceptionLanding51;
}
try {
object.uri = uri;
} catch (error) {
break exceptionLanding51;
}
try {
filename = value10.filename;
} catch (error) {
break exceptionLanding51;
}
try {
value15 = filename != null;
} catch (error) {
break exceptionLanding51;
}
value16 = '';
reducibleJoin47: while (true) {
if (value15) {
r5 = filename;
break reducibleJoin47;
}
r5 = value16;
break reducibleJoin47;
}
r5 = value16;
break reducibleJoin47;
try {
object.name = r5;
} catch (error) {
break exceptionLanding51;
}
try {
object.fileSize = r4;
} catch (error) {
break exceptionLanding51;
}
return object;
}
try {
object2.name = r5;
} catch (error) {
break exceptionLanding51;
}
try {
object2.fileSize = r4;
} catch (error) {
break exceptionLanding51;
}
return object2;
env2_4.error('Failed to get attachment file', error);
return value;
}
try {
try {
binding5 = env2_2;
} catch (error) {
break exceptionLanding37;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
property = binding5[4];
} catch (error) {
break exceptionLanding37;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
value11 = binding(property);
} catch (error) {
break exceptionLanding37;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
getFileSize = value11.getFileSize;
} catch (error) {
break exceptionLanding37;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
uri = value7.uri;
} catch (error) {
break exceptionLanding37;
}
} catch (error) {
break exceptionLanding51;
}
try {
try {
value12 = Reflect.apply(getFileSize, value11, [uri]);
} catch (error) {
break exceptionLanding37;
}
} catch (error) {
break exceptionLanding51;
}
yield value12;
try {
try {
value13 = undefined;
value14 = false;
} catch (error) {
break exceptionLanding37;
}
} catch (error) {
break exceptionLanding51;
}
if (value14) {
return value13;
}
r4 = value13;
try {
object2 = {};
} catch (error) {
break exceptionLanding51;
}
try {
object2.file = value7;
} catch (error) {
break exceptionLanding51;
}
try {
uri = value7.uri;
} catch (error) {
break exceptionLanding51;
}
try {
object2.uri = uri;
} catch (error) {
break exceptionLanding51;
}
try {
filename = value10.filename;
} catch (error) {
break exceptionLanding51;
}
try {
value15 = filename != null;
} catch (error) {
break exceptionLanding51;
}
value16 = '';
reducibleJoin47: while (true) {
if (value15) {
r5 = filename;
break reducibleJoin47;
}
r5 = value16;
break reducibleJoin47;
}
try {
object2.name = r5;
} catch (error) {
break exceptionLanding51;
}
try {
object2.fileSize = r4;
} catch (error) {
break exceptionLanding51;
}
return object2;
}
env2_4.error('Failed to get attachment file', error);
return value;
}
function* _fun40265(a0) { // fn#40265, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:688, offset: 0x010faf16, size: 65 bytes, params: 2, frame: 13
if (true) {
value = environment.__proto__.__proto__;
value = env2_0(env2_2[4]);
yield value.cancelGetFileInfo(a0);
}
function _cancelGetAttachmentFile() { // fn#40263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:617, offset: 0x010faedd, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun40265).apply(this, arguments);
function* _fun40265(a0) { // fn#40265, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:688, offset: 0x010faf16, size: 65 bytes, params: 2, frame: 13
if (true) {
value = environment.__proto__.__proto__;
value = env2_0(env2_2[4]);
yield value.cancelGetFileInfo(a0);
}
}
}
function fileIsInAppDir(a0) { // fn#40268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4837:1061, offset: 0x010faf57, size: 153 bytes, params: 2, frame: 17
var r0;
var value2;
var property;
var moduleValue;
var appDir;
var value4;
var startsWith;
var moduleValue2;
var appDir2;
var error;
var binding;
let value = a0.replace(RegExp('^file:\\/\\/', ''), '');
try {
value2 = environment;
property = dependencyMap[4];
moduleValue = require(property);
appDir = moduleValue.getAppDir();
value4 = appDir !== '';
if (value4) {
startsWith = value.startsWith;
property = dependencyMap[4];
moduleValue2 = require(property);
appDir2 = moduleValue2.getAppDir();
value = Reflect.apply(startsWith, value, [appDir2]);
r0 = value;
} else {
r0 = value4;
}
} catch (error) {
binding = env0_4;
binding.error('Failed to get app dir', error);
return false;
}
return r0;
}
}
global.__d(_fun40259, 4659, [5, 3, 44, 4650, 4660, 4651,
2]) /* metro module 4659, dependencies: [5, 3, 44, 4650, 4660, 4651, 2] */;
+27 -23
View File
@@ -1,33 +1,37 @@
/* Metro module 1355; source: utils/AuthenticationUtils.tsx; dependencies: [692, 1356, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as TokenManagerModule from '../external/discord_common/js/shared/lib/TokenManager.tsx'; /* Metro dependency 692 */
function _fun15565(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#15565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1482:6, offset: 0x00e36297, size: 129 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = getToken_15566;
const getToken_155662 = getToken_15566;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/AuthenticationUtils.tsx');
exports.getToken = closure;
(FileImportTrackerModule).fileFinishedImporting('utils/AuthenticationUtils.tsx');
exports.getToken = getToken_155662;
exports.isAuthenticated = isAuthenticated;
exports.getArtForPath = getArtForPath;
}
function getToken_15566() { // fn#15566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1482:43, offset: 0x00e36318, size: 36 bytes, params: 1, frame: 11
return (importAll(692) /* metro dependency 692: TokenManager */).getToken();
}
function isAuthenticated() { // fn#15567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1482:239, offset: 0x00e3633c, size: 21 bytes, params: 1, frame: 9
return getToken_15566() != null;
}
function getArtForPath(a0) { // fn#15568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1482:307, offset: 0x00e36351, size: 70 bytes, params: 2, frame: 13
var r0;
var regexp;
const value = null;
if (value != a0) {
regexp = RegExp('^\\/developers', '');
r0 = regexp.test(a0) ? require(1356) /* metro dependency 1356 */ : value;
} else {
r0 = value;
function getToken_15566() { // fn#15566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1482:43, offset: 0x00e36318, size: 36 bytes, params: 1, frame: 11
return (TokenManagerModule).getToken();
}
return r0;
function isAuthenticated() { // fn#15567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1482:239, offset: 0x00e3633c, size: 21 bytes, params: 1, frame: 9
return getToken_15566() != null;
}
function getArtForPath(a0) { // fn#15568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1482:307, offset: 0x00e36351, size: 70 bytes, params: 2, frame: 13
var r0;
var regexp;
const value = null;
if (value != a0) {
regexp = RegExp('^\\/developers', '');
r0 = regexp.test(a0) ? require(1356) /* metro dependency 1356 */ : value;
} else {
r0 = value;
}
return r0;
}
}
global.__d(_fun15565, 1355, [692, 1356, 2]) /* metro module 1355, dependencies: [692, 1356, 2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+32 -24
View File
@@ -1,37 +1,45 @@
/* Metro module 3792; source: utils/BasicPermissionUtils.tsx; dependencies: [6, 7, 483, 2] */
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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as BigFlagUtilsModule from '../external/discord_common/js/shared/utils/BigFlagUtils.tsx'; /* Metro dependency 483 */
function _fun28835(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#28835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3919:6, offset: 0x00f8474c, size: 143 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 value = _fun28836();
value.cache = {};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/BasicPermissionUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/BasicPermissionUtils.tsx');
exports.default = value;
}
function _fun28836() { // fn#28836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3919:118, offset: 0x00f847db, size: 106 bytes, params: 1, frame: 16
return CreateClass(BasicPermissionUtils, null, [{key: 'has', value: function(a0, a1) {
return !!(a0 & a1);
}}, {key: 'asBasicFlag', value: value_28839}, {key: 'asBigFlag', value: value_28840}]);
function BasicPermissionUtils() { // fn#28837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3919:139, offset: 0x00c618a4, size: 27 bytes, params: 1, frame: 13
env1_2(this, BasicPermissionUtils);
}
function _fun28836() { // fn#28836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3919:118, offset: 0x00f847db, size: 106 bytes, params: 1, frame: 16
return env0_3(BasicPermissionUtils, null, [{key: 'has', value: function(a0, a1) {
return !!(a0 & a1);
}}, {key: 'asBasicFlag', value: value_28839}, {key: 'asBigFlag', value: value_28840}]);
}
function value_28839(a0) { // fn#28839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3919:280, offset: 0x00f84845, size: 45 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (BigFlagUtilsModule).asUintN(20, a0);
}
function value_28839(a0) { // fn#28839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3919:280, offset: 0x00f84845, size: 45 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (importAll(483) /* metro dependency 483: BigFlagUtils */).asUintN(20, a0);
}
function value_28840(a0) { // fn#28840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3919:346, offset: 0x00f84872, size: 93 bytes, params: 2, frame: 15
var value;
const Object = global.Object;
const hasOwn = Object.hasOwn;
let cache = this.cache;
if (!Reflect.apply(hasOwn, Object, [cache, a0])) {
cache = this.cache;
value = environment.__proto__;
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
cache[a0] = value.deserialize(a0);
}
return this.cache[a0];
}
function value_28840(a0) { // fn#28840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3919:346, offset: 0x00f84872, size: 93 bytes, params: 2, frame: 15
var value;
const Object = global.Object;
const hasOwn = Object.hasOwn;
let cache = this.cache;
if (!Reflect.apply(hasOwn, Object, [cache, a0])) {
cache = this.cache;
value = environment.__proto__;
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
cache[a0] = value.deserialize(a0);
}
return this.cache[a0];
}
global.__d(_fun28835, 3792, [6, 7, 483, 2]) /* metro module 3792, dependencies: [6, 7, 483, 2] */;
+79 -73
View File
@@ -1,11 +1,15 @@
/* Metro module 3817; source: utils/BillingUtils.tsx; dependencies: [5, 482, 3818, 1216, 507, 3824, 2] */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
import SentryUtilsNative from './SentryUtils.native.tsx'; /* Metro dependency 1216 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as HTTPUtilsModule from '../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
function _fun29519(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3944:6, offset: 0x00fc423d, size: 204 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(482) /* metro dependency 482: Constants */).PaymentGateways;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/BillingUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/BillingUtils.tsx');
exports.getLocalizedDisplayMonth = function(a0, a1) {
var Date = global.Date;
var value2 = new Date();
@@ -19,53 +23,79 @@ function _fun29519(global, require, importDefault, importAll, module, exports, d
exports.isExpectedHttpClientError = isExpectedHttpClientError;
exports.captureBillingMessage = captureBillingMessage;
exports.calculateStandardizedUnits = calculateStandardizedUnits;
}
function _createGatewayCheckoutContext() { // fn#29520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3944:134, offset: 0x00fc4309, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun29522).apply(this, arguments);
function* _fun29522(a0) { // fn#29522, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3944:215, offset: 0x00fc4342, size: 118 bytes, params: 2, frame: 14
var paymentGateway;
var value3;
var value4;
var value5;
if (false) {
return undefined;
}
value = null;
if (value != a0) {
paymentGateway = a0.paymentGateway;
value3 = environment.__proto__.__proto__;
if (paymentGateway !== env2_4.BRAINTREE) {
return value;
}
value4 = env2_0(env2_2[2]);
yield value4.collectDeviceData();
value5 = undefined;
if (false) {
return value5;
}
return value != value5 ? {braintree_device_data: value5} : value;
}
return value;
}
function _createGatewayCheckoutContext() { // fn#29520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3944:134, offset: 0x00fc4309, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun29522).apply(this, arguments);
}
function captureBillingException(a0, a1) { // fn#29525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3944:754, offset: 0x00fc4405, size: 110 bytes, params: 3, frame: 17
const value = undefined;
const defaultImport = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
const captureException = defaultImport.captureException;
const object3 = {};
copyDataProperties(object3, a1, undefined);
const object4 = {};
const value2 = a1 == null;
copyDataProperties(object4, value2 ? value : a1.tags, value2);
object4['app_context'] = 'billing';
object3['tags'] = object4;
Reflect.apply(captureException, defaultImport, [a0, object3]);
return value;
}
function isExpectedHttpClientError(a0) { // fn#29526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3944:911, offset: 0x00fc4473, size: 156 bytes, params: 2, frame: 14
var r1;
const HTTPResponseError = (require(507) /* metro dependency 507: HTTPUtils */).HTTPResponseError;
let r0 = a0 instanceof HTTPResponseError && a0.status >= 400 && a0.status < 500;
if (!r0) {
r1 = a0 instanceof (importDefault(3824) /* metro dependency 3824: BillingError */) && a0.status != null;
r1 = r1 && a0.status >= 400;
r1 = r1 && a0.status < 500;
r0 = r1;
}
return r0;
}
function captureBillingMessage(a0, a1) { // fn#29527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3944:1117, offset: 0x00fc450f, size: 110 bytes, params: 3, frame: 17
const value = undefined;
const defaultImport = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
const captureMessage = defaultImport.captureMessage;
const object3 = {};
copyDataProperties(object3, a1, undefined);
const object4 = {};
const value2 = a1 == null;
copyDataProperties(object4, value2 ? value : a1.tags, value2);
object4['app_context'] = 'billing';
object3['tags'] = object4;
Reflect.apply(captureMessage, defaultImport, [a0, object3]);
return value;
function captureBillingException(a0, a1) { // fn#29525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3944:754, offset: 0x00fc4405, size: 110 bytes, params: 3, frame: 17
const value = undefined;
const defaultImport = SentryUtilsNative;
const captureException = defaultImport.captureException;
const object = {};
copyDataProperties(object, a1, undefined);
const object2 = {};
const value2 = a1 == null;
copyDataProperties(object2, value2 ? value : a1.tags, value2);
object2['app_context'] = 'billing';
object['tags'] = object2;
Reflect.apply(captureException, defaultImport, [a0, object]);
return value;
}
function isExpectedHttpClientError(a0) { // fn#29526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3944:911, offset: 0x00fc4473, size: 156 bytes, params: 2, frame: 14
var r1;
const HTTPResponseError = (HTTPUtilsModule).HTTPResponseError;
let r0 = a0 instanceof HTTPResponseError && a0.status >= 400 && a0.status < 500;
if (!r0) {
r1 = a0 instanceof (importDefault(3824) /* metro dependency 3824: BillingError */) && a0.status != null;
r1 = r1 && a0.status >= 400;
r1 = r1 && a0.status < 500;
r0 = r1;
}
return r0;
}
function captureBillingMessage(a0, a1) { // fn#29527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3944:1117, offset: 0x00fc450f, size: 110 bytes, params: 3, frame: 17
const value = undefined;
const defaultImport = SentryUtilsNative;
const captureMessage = defaultImport.captureMessage;
const object = {};
copyDataProperties(object, a1, undefined);
const object2 = {};
const value2 = a1 == null;
copyDataProperties(object2, value2 ? value : a1.tags, value2);
object2['app_context'] = 'billing';
object['tags'] = object2;
Reflect.apply(captureMessage, defaultImport, [a0, object]);
return value;
}
}
function calculateStandardizedUnits(a0, a1) { // fn#29528, offset: 0x00fc457d, size: 182 bytes, params: 3, frame: 6
@@ -92,29 +122,5 @@ function calculateStandardizedUnits(a0, a1) { // fn#29528, offset: 0x00fc457d, s
return 1;
}
function* _fun29522(a0) { // fn#29522, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3944:215, offset: 0x00fc4342, size: 118 bytes, params: 2, frame: 14
var paymentGateway;
var value3;
var value4;
var value5;
if (false) {
return undefined;
}
value = null;
if (value != a0) {
paymentGateway = a0.paymentGateway;
value3 = environment.__proto__.__proto__;
if (paymentGateway !== env2_4.BRAINTREE) {
return value;
}
value4 = env2_0(env2_2[2]);
yield value4.collectDeviceData();
value5 = undefined;
if (false) {
return value5;
}
return value != value5 ? {braintree_device_data: value5} : value;
}
return value;
}
global.__d(_fun29519, 3817, [5, 482, 3818, 1216, 507, 3824,
2]) /* metro module 3817, dependencies: [5, 482, 3818, 1216, 507, 3824, 2] */;
+62 -58
View File
@@ -1,71 +1,75 @@
/* Metro module 3818; source: utils/BraintreeUtils.tsx; dependencies: [3819, 661, 3820, 3823, 1962, 3823, 2] */
import BraintreeStore from '../stores/billing/BraintreeStore.tsx'; /* Metro dependency 3819 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun29529(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3945:6, offset: 0x00fc4633, size: 160 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = getBraintreeSDK;
const getBraintreeSDK2 = getBraintreeSDK;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const braintreeStore = importDefault(3819) /* metro dependency 3819: BraintreeStore */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).PaymentSettings;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/BraintreeUtils.tsx');
exports.getBraintreeSDK = closure;
(FileImportTrackerModule).fileFinishedImporting('utils/BraintreeUtils.tsx');
exports.getBraintreeSDK = getBraintreeSDK2;
exports.collectDeviceData = collectDeviceData;
}
function getBraintreeSDK() { // fn#29530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3945:132, offset: 0x00fc46d3, size: 79 bytes, params: 1, frame: 14
var value;
value = Reflect.apply(require(dependencyMap[2]).importWithRetry, value, [{createPromise: createPromise,
webpackId: dependencyMap[5]}]);
return value.then(function(a0) {
return a0.default;
});
function createPromise() { // fn#29531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3945:205, owner: getBraintreeSDK.createPromise, offset: 0x00fc4722, size: 45 bytes, params: 1, frame: 13
const value = environment.__proto__;
return require(dependencyMap[4])(dependencyMap[3], dependencyMap.paths);
}
function getBraintreeSDK() { // fn#29530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3945:132, offset: 0x00fc46d3, size: 79 bytes, params: 1, frame: 14
var value;
value = Reflect.apply(require(dependencyMap[2]).importWithRetry, value, [{createPromise: createPromise,
webpackId: dependencyMap[5]}]);
return value.then(function(a0) {
return a0.default;
});
}
function getDeviceData(a0) { // fn#29533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3945:273, offset: 0x00fc4759, size: 39 bytes, params: 2, frame: 11
const env0_0 = a0;
return getBraintreeSDK().then(_fun29534);
}
function collectDeviceData() { // fn#29537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3945:524, offset: 0x00fc47cf, size: 65 bytes, params: 1, frame: 12
var r0;
var value;
const client = BraintreeStore.getClient();
if (client == null) {
value = getBraintreeSDK();
value = value.then(_fun29538);
r0 = value;
} else {
r0 = getDeviceData(client);
}
return r0;
}
function createPromise() { // fn#29531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3945:205, owner: getBraintreeSDK.createPromise, offset: 0x00fc4722, size: 45 bytes, params: 1, frame: 13
const value = environment.__proto__;
return require(dependencyMap[4])(dependencyMap[3], dependencyMap.paths);
}
function getDeviceData(a0) { // fn#29533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3945:273, offset: 0x00fc4759, size: 39 bytes, params: 2, frame: 11
const env0_0 = a0;
return getBraintreeSDK().then(_fun29534);
function _fun29534({dataCollector}) { // fn#29534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3945:330, offset: 0x00fc4780, size: 68 bytes, params: 2, frame: 13
let value = dataCollector.create({client: env0_0});
value = value.then(function(a0) {
return a0.deviceData;
});
return value.catch(function() {
return null;
});
}
function _fun29534({dataCollector}) { // fn#29534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3945:330, offset: 0x00fc4780, size: 68 bytes, params: 2, frame: 13
let value = dataCollector.create({client: env0_0});
value = value.then(function(a0) {
return a0.deviceData;
});
return value.catch(function() {
return null;
});
}
}
function collectDeviceData() { // fn#29537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3945:524, offset: 0x00fc47cf, size: 65 bytes, params: 1, frame: 12
var r0;
var value;
const client = BraintreeStore.getClient();
if (client == null) {
value = getBraintreeSDK();
value = value.then(_fun29538);
r0 = value;
} else {
r0 = getDeviceData(client);
}
return r0;
function _fun29538({client}) { // fn#29538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3945:612, offset: 0x00fc4810, size: 80 bytes, params: 2, frame: 13
var environment;
const create = client.create;
let value = environment.__proto__;
const BRAINTREE = PaymentSettings.BRAINTREE;
const KEY = BRAINTREE.KEY;
value = Reflect.apply(create, client, [{authorization: KEY}]);
value = value.then(function(a0) {
return getDeviceData(a0);
});
return value.catch(function() {
return null;
});
}
}
function _fun29538({client}) { // fn#29538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3945:612, offset: 0x00fc4810, size: 80 bytes, params: 2, frame: 13
var environment;
const create = client.create;
let value = environment.__proto__;
const BRAINTREE = PaymentSettings.BRAINTREE;
const KEY = BRAINTREE.KEY;
value = Reflect.apply(create, client, [{authorization: KEY}]);
value = value.then(function(a0) {
return getDeviceData(a0);
});
return value.catch(function() {
return null;
});
}
global.__d(_fun29529, 3818, [3819, 661, 3820, 3823, 1962, 3823,
2]) /* metro module 3818, dependencies: [3819, 661, 3820, 3823, 1962, 3823, 2] */;
+46 -23
View File
@@ -1,4 +1,6 @@
/* Metro module 4221; source: utils/BrowserUtils.tsx; dependencies: [4222, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun34546(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#34546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4392:6, offset: 0x01059299, size: 607 bytes, params: 8, frame: 31
var parseInt;
var version;
@@ -6,11 +8,11 @@ function _fun34546(global, require, importDefault, importAll, module, exports, d
var int2;
var int3;
var int4;
const closure = getChromeVersion;
const closure2 = getElectronVersion;
const closure3 = getFirefoxVersion;
const closure4 = getEdgeVersion;
const closure5 = getSafariVersion;
const getChromeVersion2 = getChromeVersion;
const getElectronVersion2 = getElectronVersion;
const getFirefoxVersion2 = getFirefoxVersion;
const getEdgeVersion2 = getEdgeVersion;
const getSafariVersion2 = getSafariVersion;
const closure6 = function() {
var r0;
var value = a0;
@@ -44,12 +46,12 @@ function _fun34546(global, require, importDefault, importAll, module, exports, d
value = '';
value = parseInt(version ?? value, 10);
}
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/BrowserUtils.tsx');
exports.getChromeVersion = closure;
exports.getElectronVersion = closure2;
exports.getFirefoxVersion = closure3;
exports.getEdgeVersion = closure4;
exports.getSafariVersion = closure5;
(FileImportTrackerModule).fileFinishedImporting('utils/BrowserUtils.tsx');
exports.getChromeVersion = getChromeVersion2;
exports.getElectronVersion = getElectronVersion2;
exports.getFirefoxVersion = getFirefoxVersion2;
exports.getEdgeVersion = getEdgeVersion2;
exports.getSafariVersion = getSafariVersion2;
exports.canUseWebp = canUseWebp_34553;
exports.isSafari = closure6;
exports.isFirefox = function() {
@@ -62,18 +64,39 @@ function _fun34546(global, require, importDefault, importAll, module, exports, d
var navigator = global.window.navigator;
return isSafari(navigator.userAgent) && navigator.mediaCapabilities?.decodingInfo != null;
};
}
function canUseWebp_34553() { // fn#34553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4392:1150, offset: 0x01059567, size: 88 bytes, params: 1, frame: 12
var value;
let r0 = getChromeVersion() !== -1 || getElectronVersion() !== -1;
r0 = !r0 ? getFirefoxVersion() !== -1 : r0;
r0 = !r0 ? getEdgeVersion() !== -1 : r0;
if (!r0) {
value = getSafariVersion();
value = value >= 14;
r0 = value;
function getChromeVersion() { // fn#34547, offset: 0x00c36f09, size: 9 bytes, params: 1, frame: 1
return env0_0;
}
return r0;
function getElectronVersion() { // fn#34548, offset: 0x00c38205, size: 9 bytes, params: 1, frame: 1
return env0_1;
}
function getFirefoxVersion() { // fn#34549, offset: 0x00c36b39, size: 9 bytes, params: 1, frame: 1
return env0_2;
}
function getEdgeVersion() { // fn#34550, offset: 0x00c7c381, size: 9 bytes, params: 1, frame: 1
return env0_3;
}
function getSafariVersion() { // fn#34551, offset: 0x00d16d26, size: 9 bytes, params: 1, frame: 1
return env0_4;
}
function canUseWebp_34553() { // fn#34553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4392:1150, offset: 0x01059567, size: 88 bytes, params: 1, frame: 12
var value;
let r0 = getChromeVersion() !== -1 || getElectronVersion() !== -1;
r0 = !r0 ? getFirefoxVersion() !== -1 : r0;
r0 = !r0 ? getEdgeVersion() !== -1 : r0;
if (!r0) {
value = getSafariVersion();
value = value >= 14;
r0 = value;
}
return r0;
}
}
global.__d(_fun34546, 4221, [4222, 2]) /* metro module 4221, dependencies: [4222, 2] */;
+130 -131
View File
@@ -1,6 +1,10 @@
/* Metro module 8339; source: utils/ChangeLogUtils.tsx; dependencies: [3855, 8340, 6629, 6644, 6645, 6622, 2] */
import Module03855 from '../by-id/module-03855.js'; /* Metro dependency 3855 */
import MarkupUtils from '../modules/markup/MarkupUtils.tsx'; /* Metro dependency 6622 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ChangeLogUtilsModule from './native/ChangeLogUtils.tsx'; /* Metro dependency 8340 */
function _fun66399(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:6, offset: 0x01bf9fea, size: 412 bytes, params: 8, frame: 20
var object2;
let env0_0 = require;
const parseWithClassNameExtraction = function({transformUpperCase = false}) {
var env0_0 = transformUpperCase;
@@ -14,16 +18,9 @@ function _fun66399(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (importDefault(3855) /* metro dependency 3855 */).defaultRules.lheading;
const env0_4 = (importDefault(3855) /* metro dependency 3855 */).defaultRules.heading;
const env0_5 = (importDefault(3855) /* metro dependency 3855 */).defaultRules.link;
const env0_6 = (importDefault(3855) /* metro dependency 3855 */).defaultRules.image;
const env0_7 = (importDefault(3855) /* metro dependency 3855 */).defaultRules.list;
const env0_8 = (importDefault(3855) /* metro dependency 3855 */).defaultRules.blockQuote;
const env0_9 = (importDefault(3855) /* metro dependency 3855 */).defaultRules.paragraph;
const env0_10 = RegExp('\\{(.+?)}', '');
const env0_11 = RegExp('^\\$(\\w+?)\\$', '');
object2 = {getDefaultRules: closure, getSpecialRules: function(a0) {
object = {getDefaultRules: closure, getSpecialRules: function(a0) {
var object = {};
var defaultRules_2Binding = defaultRules_2;
copyDataProperties(object, specialRules(a0), copyDataProperties(object, defaultRules_2Binding(a0),
@@ -35,136 +32,138 @@ function _fun66399(global, require, importDefault, importAll, module, exports, d
copyDataProperties(object, messageRulesBinding(a0), messageRulesBinding);
return object;
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ChangeLogUtils.tsx');
exports.default = object2;
(FileImportTrackerModule).fileFinishedImporting('utils/ChangeLogUtils.tsx');
exports.default = object;
exports.renderChangelogMessageMarkup = renderChangelogMessageMarkup;
}
function parseWithClassNameExtraction({transformUpperCase}) { // fn#66400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:340, offset: 0x01bfa186, size: 32 bytes, params: 2, frame: 3
if (transformUpperCase !== undefined) {
}
return _fun66401;
function _fun66401(a0, a1, a2) { // fn#66401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:411, offset: 0x01bfa1a6, size: 163 bytes, params: 4, frame: 18
const value = environment.__proto__;
const binding = env1_10;
const value2 = 1;
const value3 = binding.exec(a0[value2]);
const value4 = a0[value2].replace(env1_10, '');
const r5 = transformUpperCase ? value4.toUpperCase() : value4;
const object = {};
const value7 = null;
object.className = value7 != value3 ? value3[value2] : value7;
const value8 = 2;
object.level = a0[value8] !== '=' ? value8 : value2;
object.content = (importDefault(3855) /* metro dependency 3855 */).parseInline(a1, r5, a2);
return object;
}
function parseWithClassNameExtraction({transformUpperCase}) { // fn#66400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:340, offset: 0x01bfa186, size: 32 bytes, params: 2, frame: 3
if (transformUpperCase !== undefined) {
}
return _fun66401;
}
function defaultRules(a0) { // fn#66402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:578, offset: 0x01bfa249, size: 1077 bytes, params: 2, frame: 20
var r10;
var r1;
const object7 = {};
copyDataProperties(object7, (require(8340) /* metro dependency 8340: ChangeLogUtils */).baseRules, r10);
const object11 = {};
copyDataProperties(object11, image, r10);
const customRules = (require(8340) /* metro dependency 8340: ChangeLogUtils */).customRules;
if (typeof customRules.image === 'function') {
r1 = customRules.image(a0);
r10 = customRules;
} else {
r1 = customRules.image;
function defaultRules(a0) { // fn#66402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:578, offset: 0x01bfa249, size: 1077 bytes, params: 2, frame: 20
var r10;
var r1;
const object = {};
copyDataProperties(object, (ChangeLogUtilsModule).baseRules, r10);
const object2 = {};
copyDataProperties(object2, image, r10);
const customRules = (ChangeLogUtilsModule).customRules;
if (typeof customRules.image === 'function') {
r1 = customRules.image(a0);
r10 = customRules;
} else {
r1 = customRules.image;
}
copyDataProperties(object2, r1, r10);
object['image'] = object2;
const object3 = {};
copyDataProperties(object3, link, r10);
if (typeof customRules.link === 'function') {
r1 = customRules.link(a0);
r10 = customRules;
} else {
r1 = customRules.link;
}
copyDataProperties(object3, r1, r10);
object['link'] = object3;
const object4 = {};
copyDataProperties(object4, list, r10);
if (typeof customRules.list === 'function') {
r1 = customRules.list(a0);
r10 = customRules;
} else {
r1 = customRules.list;
}
copyDataProperties(object4, r1, r10);
object['list'] = object4;
const object5 = {};
object5.order = (importDefault(6629) /* metro dependency 6629: MarkupTextRule */).order;
object5.match = match_66403;
object5.parse = function(a0, a1, {interpolations}) {
interpolations = interpolations[a0[1]];
return interpolations == null ? {type: 'text', content: a0[0]} : {type: 'interpolation',
renderer: interpolations};
};
object5.react = function(a0) {
return a0.renderer();
};
object['interpolation'] = object5;
const object6 = {};
copyDataProperties(object6, lheading, importDefault);
object6['parse'] = parseWithClassNameExtraction({transformUpperCase: true});
copyDataProperties(object6,
typeof customRules.lheading === 'function' ? customRules.lheading(a0) : customRules.lheading, true);
object['lheading'] = object6;
const object8 = {};
copyDataProperties(object8, heading, true);
copyDataProperties(object8,
typeof customRules.heading === 'function' ? customRules.heading(a0) : customRules.heading, true);
object['heading'] = object8;
const object9 = {};
copyDataProperties(object9, blockQuote, true);
copyDataProperties(object9,
typeof customRules.blockQuote === 'function' ? customRules.blockQuote(a0) : customRules.blockQuote, true);
object['blockQuote'] = object9;
const object10 = {};
copyDataProperties(object10, paragraph, true);
copyDataProperties(object10,
typeof customRules.paragraph === 'function' ? customRules.paragraph(a0) : customRules.paragraph, true);
object['paragraph'] = object10;
return object;
function defaultRulesMatch(a0) { // fn#66403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:1012, owner: defaultRules.match, offset: 0x01bfa67e, size: 23 bytes, params: 2, frame: 11
return env1_11.exec(a0);
}
}
copyDataProperties(object11, r1, r10);
object7['image'] = object11;
const object12 = {};
copyDataProperties(object12, link, r10);
if (typeof customRules.link === 'function') {
r1 = customRules.link(a0);
r10 = customRules;
} else {
r1 = customRules.link;
function specialRules(a0) { // fn#66406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:1748, offset: 0x01bfa6ef, size: 175 bytes, params: 2, frame: 16
const object2 = {};
copyDataProperties(object2, lheading, undefined);
object2['parse'] = parseWithClassNameExtraction({transformUpperCase: false});
const customRules = (ChangeLogUtilsModule).customRules;
copyDataProperties(object2,
typeof customRules.lheading === 'function' ? customRules.lheading(a0) : customRules.lheading, 1);
return {lheading: object2};
}
copyDataProperties(object12, r1, r10);
object7['link'] = object12;
const object13 = {};
copyDataProperties(object13, list, r10);
if (typeof customRules.list === 'function') {
r1 = customRules.list(a0);
r10 = customRules;
} else {
r1 = customRules.list;
function messageRules(a0) { // fn#66407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:1969, offset: 0x01bfa79e, size: 140 bytes, params: 2, frame: 15
const object = {};
copyDataProperties(object, defaultRules_2(a0), undefined);
const object2 = {};
copyDataProperties(object2, (Module03855).defaultRules.newline, object2);
object['newline'] = object2;
object['text'] = importDefault(6629) /* metro dependency 6629: MarkupTextRule */;
object['list'] = importDefault(6644) /* metro dependency 6644: MarkupListRule */;
object['subtext'] = importDefault(6645) /* metro dependency 6645: MarkupSubtextRule */;
return object;
}
copyDataProperties(object13, r1, r10);
object7['list'] = object13;
const object14 = {};
object14.order = (importDefault(6629) /* metro dependency 6629: MarkupTextRule */).order;
object14.match = match_66403;
object14.parse = function(a0, a1, {interpolations}) {
interpolations = interpolations[a0[1]];
return interpolations == null ? {type: 'text', content: a0[0]} : {type: 'interpolation',
renderer: interpolations};
};
object14.react = function(a0) {
return a0.renderer();
};
object7['interpolation'] = object14;
const object15 = {};
copyDataProperties(object15, lheading, importDefault);
object15['parse'] = parseWithClassNameExtraction({transformUpperCase: true});
copyDataProperties(object15,
typeof customRules.lheading === 'function' ? customRules.lheading(a0) : customRules.lheading, true);
object7['lheading'] = object15;
const object16 = {};
copyDataProperties(object16, heading, true);
copyDataProperties(object16,
typeof customRules.heading === 'function' ? customRules.heading(a0) : customRules.heading, true);
object7['heading'] = object16;
const object17 = {};
copyDataProperties(object17, blockQuote, true);
copyDataProperties(object17,
typeof customRules.blockQuote === 'function' ? customRules.blockQuote(a0) : customRules.blockQuote, true);
object7['blockQuote'] = object17;
const object18 = {};
copyDataProperties(object18, paragraph, true);
copyDataProperties(object18,
typeof customRules.paragraph === 'function' ? customRules.paragraph(a0) : customRules.paragraph, true);
object7['paragraph'] = object18;
return object7;
}
function specialRules(a0) { // fn#66406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:1748, offset: 0x01bfa6ef, size: 175 bytes, params: 2, frame: 16
const object = {};
copyDataProperties(object, lheading, undefined);
object['parse'] = parseWithClassNameExtraction({transformUpperCase: false});
const customRules = (require(8340) /* metro dependency 8340: ChangeLogUtils */).customRules;
copyDataProperties(object,
typeof customRules.lheading === 'function' ? customRules.lheading(a0) : customRules.lheading, 1);
return {lheading: object};
}
function renderChangelogMessageMarkup({content}, a1, a2) { // fn#66411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:2404, offset: 0x01bfa88e, size: 108 bytes, params: 4, frame: 18
const object = {'hasSpoilerEmbeds': false, 'hasBailedAst': false};
const defaultImport = MarkupUtils;
object.content = defaultImport.reactParserFor(getDefaultRules(a1))(content, false,
a2 != null ? {changeLog: a2} : {});
return object;
}
function messageRules(a0) { // fn#66407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:1969, offset: 0x01bfa79e, size: 140 bytes, params: 2, frame: 15
const object3 = {};
copyDataProperties(object3, defaultRules_2(a0), undefined);
const object4 = {};
copyDataProperties(object4, (importDefault(3855) /* metro dependency 3855 */).defaultRules.newline, object4);
object3['newline'] = object4;
object3['text'] = importDefault(6629) /* metro dependency 6629: MarkupTextRule */;
object3['list'] = importDefault(6644) /* metro dependency 6644: MarkupListRule */;
object3['subtext'] = importDefault(6645) /* metro dependency 6645: MarkupSubtextRule */;
return object3;
}
function renderChangelogMessageMarkup({content}, a1, a2) { // fn#66411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:2404, offset: 0x01bfa88e, size: 108 bytes, params: 4, frame: 18
const object2 = {'hasSpoilerEmbeds': false, 'hasBailedAst': false};
const defaultImport = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
object2.content = defaultImport.reactParserFor(getDefaultRules(a1))(content, false,
a2 != null ? {changeLog: a2} : {});
return object2;
}
function _fun66401(a0, a1, a2) { // fn#66401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:411, offset: 0x01bfa1a6, size: 163 bytes, params: 4, frame: 18
const value = environment.__proto__;
const binding = env1_10;
const value2 = 1;
const value3 = binding.exec(a0[value2]);
const value4 = a0[value2].replace(env1_10, '');
const r5 = transformUpperCase ? value4.toUpperCase() : value4;
const object2 = {};
const value7 = null;
object2.className = value7 != value3 ? value3[value2] : value7;
const value8 = 2;
object2.level = a0[value8] !== '=' ? value8 : value2;
object2.content = (importDefault(3855) /* metro dependency 3855 */).parseInline(a1, r5, a2);
return object2;
}
function defaultRulesMatch(a0) { // fn#66403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8524:1012, owner: defaultRules.match, offset: 0x01bfa67e, size: 23 bytes, params: 2, frame: 11
return env1_11.exec(a0);
}
global.__d(_fun66399, 8339, [3855, 8340, 6629, 6644, 6645, 6622,
2]) /* metro module 8339, dependencies: [3855, 8340, 6629, 6644, 6645, 6622, 2] */;
+405 -402
View File
@@ -1,4 +1,8 @@
/* Metro module 15936; source: utils/ChannelSortingUtils.tsx; dependencies: [1383, 661, 11879, 5099, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as ChannelRecordModule from '../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
function _fun122953(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:6, offset: 0x0257bdab, size: 217 bytes, params: 8, frame: 19
const closure = function(a0, a1) {
var r0;
@@ -16,108 +20,132 @@ function _fun122953(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelRecordModule = require(1383) /* metro dependency 1383: ChannelRecord */;
const env0_2 = channelRecordModule.isGuildSelectableChannelType;
const env0_3 = channelRecordModule.isGuildVocalChannelType;
const env0_4 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ChannelSortingUtils.tsx');
const env0_4 = (ConstantsModule).ChannelTypes;
(FileImportTrackerModule).fileFinishedImporting('utils/ChannelSortingUtils.tsx');
exports.areTypesInSameSection = closure;
exports.getDropData = getDropData;
exports.getDnDUpdates = getDnDUpdates;
}
function getFirstChannelOfType(a0, a1, a2, a3) { // fn#122955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:283, offset: 0x0257bee3, size: 132 bytes, params: 5, frame: 19
var r4;
var length;
var property;
var areTypesInSameSectionBinding;
var channel;
var type;
var value2;
const env0_0 = a1;
const env0_1 = -1;
a3.find(_fun122956);
if (!(env0_1 < 0)) {
var binding = env0_1;
if (binding >= 0) {
length = a3.length;
if (binding < length) {
r4 = binding;
loopExit3: while (true) {
property = a3[r4];
areTypesInSameSectionBinding = areTypesInSameSection;
channel = property.channel;
type = channel.type;
if (areTypesInSameSectionBinding(type, a2)) {
return property;
}
value2 = r4 + a0;
if (value2 >= 0) {
length = a3.length;
if (value2 < length) {
r4 = value2;
continue;
function getFirstChannelOfType(a0, a1, a2, a3) { // fn#122955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:283, offset: 0x0257bee3, size: 132 bytes, params: 5, frame: 19
var r4;
var length;
var property;
var areTypesInSameSectionBinding;
var channel;
var type;
var value2;
const env0_0 = a1;
const env0_1 = -1;
a3.find(_fun122956);
if (!(env0_1 < 0)) {
var binding = env0_1;
if (binding >= 0) {
length = a3.length;
if (binding < length) {
r4 = binding;
loopExit3: while (true) {
property = a3[r4];
areTypesInSameSectionBinding = areTypesInSameSection;
channel = property.channel;
type = channel.type;
if (areTypesInSameSectionBinding(type, a2)) {
return property;
}
value2 = r4 + a0;
if (value2 >= 0) {
length = a3.length;
if (value2 < length) {
r4 = value2;
continue;
}
break loopExit3;
}
break loopExit3;
}
break loopExit3;
return null;
}
return null;
}
return null;
}
}
return null;
}
return null;
function _fun122956({channel}, a1) { // fn#122956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:343, offset: 0x0257bf67, size: 38 bytes, params: 3, frame: 3
return channel.id === require && true;
}
function getChannelPosition(a0, a1) { // fn#122957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:507, offset: 0x0257bf8d, size: 86 bytes, params: 3, frame: 14
const value = a2;
const env0_0 = a0;
const env0_1 = value !== undefined ? value : false;
if (a0 == null) {
return 0;
}
const env0_2 = null;
a1.filter(_fun122958).find(_fun122959);
return env0_2;
}
function getDropData(a0, a1, a2, a3, a4) { // fn#122961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:918, offset: 0x0257c078, size: 1383 bytes, params: 6, frame: 27
var r6;
var r1;
var id;
var r9;
var r2;
var areTypesInSameSectionBinding;
var channelPosition;
var property;
var getFirstChannelOfTypeBinding;
var firstChannelOfType;
var channel;
var object2;
var channelPosition2;
var firstChannelOfTypeBinding;
var isGuildSelectableChannelTypeBinding;
var channelPosition3;
var firstChannelOfType2;
var channelPosition4;
var firstChannelOfTypeBinding2;
var channelPosition5;
var firstChannelOfType3;
const value = null;
if (value == a0) {
return value;
function getChannelPosition(a0, a1) { // fn#122957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:507, offset: 0x0257bf8d, size: 86 bytes, params: 3, frame: 14
const value = a2;
const env0_0 = a0;
const env0_1 = value !== undefined ? value : false;
if (a0 == null) {
return 0;
}
const env0_2 = null;
a1.filter(_fun122958).find(_fun122959);
return env0_2;
function _fun122958({channel}) { // fn#122958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:593, offset: 0x0257bfe3, size: 65 bytes, params: 2, frame: 15
return env0_0 != null && (env0_1 || areTypesInSameSection(env0_0.type, channel.type));
}
function _fun122959({channel}, a1) { // fn#122959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:669, offset: 0x0257c024, size: 56 bytes, params: 3, frame: 4
return env0_0 != null && channel.id === env0_0.id && true;
}
}
if (value == a2) {
return value;
}
let GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
if (a0.type === GUILD_CATEGORY) {
if (a3 === a1) {
r2 = hoverSameType(a2);
} else if (a3 < a1) {
if (a0.type === a2.type) {
function getDropData(a0, a1, a2, a3, a4) { // fn#122961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:918, offset: 0x0257c078, size: 1383 bytes, params: 6, frame: 27
var r6;
var r1;
var id;
var r9;
var r2;
var areTypesInSameSectionBinding;
var channelPosition;
var property;
var getFirstChannelOfTypeBinding;
var firstChannelOfType;
var channel;
var object;
var channelPosition2;
var firstChannelOfTypeBinding;
var isGuildSelectableChannelTypeBinding;
var channelPosition3;
var firstChannelOfType2;
var channelPosition4;
var firstChannelOfTypeBinding2;
var channelPosition5;
var firstChannelOfType3;
const value = null;
if (value == a0) {
return value;
}
if (value == a2) {
return value;
}
let GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
if (a0.type === GUILD_CATEGORY) {
if (a3 === a1) {
r2 = hoverSameType(a2);
} else if (a3 < a1) {
if (a0.type === a2.type) {
r2 = hoverSameType(a2);
} else if (a3 > a1) {
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
channelPosition5 = getChannelPosition(a2, a4, true);
property = a4[(value != channelPosition5 ? channelPosition5 : 0) + 1];
firstChannelOfType3 = getFirstChannelOfType(-1, a2.id, a0.type, a4);
r2 = value == firstChannelOfType3 || firstChannelOfType3.channel.id === a0.id ? value : value == property ? {referenceId: firstChannelOfType3.channel.id,
parentId: value} : property.channel.type !== GUILD_CATEGORY ? value : {referenceId: firstChannelOfType3.channel.id,
parentId: value};
} else {
r2 = value;
}
} else if (a3 > a1) {
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
channelPosition5 = getChannelPosition(a2, a4, true);
@@ -126,378 +154,353 @@ function getDropData(a0, a1, a2, a3, a4) { // fn#122961, source: /ci/build/disco
r2 = value == firstChannelOfType3 || firstChannelOfType3.channel.id === a0.id ? value : value == property ? {referenceId: firstChannelOfType3.channel.id,
parentId: value} : property.channel.type !== GUILD_CATEGORY ? value : {referenceId: firstChannelOfType3.channel.id,
parentId: value};
} else {
r2 = value;
}
} else if (a3 > a1) {
GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
channelPosition5 = getChannelPosition(a2, a4, true);
property = a4[(value != channelPosition5 ? channelPosition5 : 0) + 1];
firstChannelOfType3 = getFirstChannelOfType(-1, a2.id, a0.type, a4);
r2 = value == firstChannelOfType3 || firstChannelOfType3.channel.id === a0.id ? value : value == property ? {referenceId: firstChannelOfType3.channel.id,
parentId: value} : property.channel.type !== GUILD_CATEGORY ? value : {referenceId: firstChannelOfType3.channel.id,
parentId: value};
r1 = r2;
} else {
r2 = value;
}
r1 = r2;
} else {
areTypesInSameSectionBinding = areTypesInSameSection;
if (areTypesInSameSectionBinding(a0.type, a2.type)) {
r1 = hoverSameType(a2);
} else if (a3 < a1) {
if (a2.type === GUILD_CATEGORY) {
channelPosition4 = getChannelPosition(a2, a4, true);
r9 = value != channelPosition4 ? channelPosition4 : 0;
property = a4[r9 - 1];
getFirstChannelOfTypeBinding = getFirstChannelOfType;
id = a2.id;
firstChannelOfTypeBinding2 = getFirstChannelOfTypeBinding(1, id, a0.type, a4);
if (value == property) {
r9 = {'referenceId': null, 'parentId': null};
} else if (value != firstChannelOfTypeBinding2) {
areTypesInSameSectionBinding = areTypesInSameSection;
channel = property.channel;
if (areTypesInSameSectionBinding(channel.type, a0.type)) {
object2 = {};
channel = firstChannelOfTypeBinding2.channel;
object2.referenceId = channel.id;
areTypesInSameSectionBinding = areTypesInSameSection;
if (areTypesInSameSectionBinding(a0.type, a2.type)) {
r1 = hoverSameType(a2);
} else if (a3 < a1) {
if (a2.type === GUILD_CATEGORY) {
channelPosition4 = getChannelPosition(a2, a4, true);
r9 = value != channelPosition4 ? channelPosition4 : 0;
property = a4[r9 - 1];
getFirstChannelOfTypeBinding = getFirstChannelOfType;
id = a2.id;
firstChannelOfTypeBinding2 = getFirstChannelOfTypeBinding(1, id, a0.type, a4);
if (value == property) {
r9 = {'referenceId': null, 'parentId': null};
} else if (value != firstChannelOfTypeBinding2) {
areTypesInSameSectionBinding = areTypesInSameSection;
channel = property.channel;
object2.parentId = channel.parent_id;
r9 = object2;
} else if (a0.isGuildVocal()) {
isGuildSelectableChannelTypeBinding = isGuildSelectableChannelType;
channel = property.channel;
if (isGuildSelectableChannelTypeBinding(channel.type)) {
object2 = {};
if (areTypesInSameSectionBinding(channel.type, a0.type)) {
object = {};
channel = firstChannelOfTypeBinding2.channel;
object2.referenceId = channel.id;
object.referenceId = channel.id;
channel = property.channel;
object2.parentId = channel.parent_id;
r9 = object2;
object.parentId = channel.parent_id;
r9 = object;
} else if (a0.isGuildVocal()) {
isGuildSelectableChannelTypeBinding = isGuildSelectableChannelType;
channel = property.channel;
if (isGuildSelectableChannelTypeBinding(channel.type)) {
object = {};
channel = firstChannelOfTypeBinding2.channel;
object.referenceId = channel.id;
channel = property.channel;
object.parentId = channel.parent_id;
r9 = object;
} else {
channel = property.channel;
if (channel.isCategory()) {
object = {};
channel = firstChannelOfTypeBinding2.channel;
id = channel.id;
object.referenceId = id;
channel = property.channel;
id = channel.id;
object.parentId = id;
r9 = object;
} else {
r9 = value;
}
}
} else {
channel = property.channel;
if (channel.isCategory()) {
object2 = {};
object = {};
channel = firstChannelOfTypeBinding2.channel;
id = channel.id;
object2.referenceId = id;
object.referenceId = id;
channel = property.channel;
id = channel.id;
object2.parentId = id;
r9 = object2;
object.parentId = id;
r9 = object;
} else {
r9 = value;
}
}
} else {
channel = property.channel;
if (channel.isCategory()) {
object2 = {};
channel = firstChannelOfTypeBinding2.channel;
id = channel.id;
object2.referenceId = id;
channel = property.channel;
id = channel.id;
object2.parentId = id;
r9 = object2;
} else {
r9 = value;
}
r9 = value;
}
r6 = r9;
} else {
r9 = value;
channelPosition3 = getChannelPosition(a2, a4, true);
r6 = value != channelPosition3 ? channelPosition3 : 0;
property = a4[r6 - 1];
firstChannelOfType2 = getFirstChannelOfType(1, a2.id, a0.type, a4);
r6 = value != property || a0.isGuildVocal() ? isGuildSelectableChannelType(a0.type) && value != firstChannelOfType2 && (isGuildSelectableChannelType(property.channel.type) || property.channel.isCategory()) ? {referenceId: firstChannelOfType2.channel.id,
parentId: a2.parent_id} : value : {referenceId: value != firstChannelOfType2 ? firstChannelOfType2.channel.id : value,
parentId: value};
}
r6 = r9;
} else {
channelPosition3 = getChannelPosition(a2, a4, true);
r6 = value != channelPosition3 ? channelPosition3 : 0;
property = a4[r6 - 1];
firstChannelOfType2 = getFirstChannelOfType(1, a2.id, a0.type, a4);
r6 = value != property || a0.isGuildVocal() ? isGuildSelectableChannelType(a0.type) && value != firstChannelOfType2 && (isGuildSelectableChannelType(property.channel.type) || property.channel.isCategory()) ? {referenceId: firstChannelOfType2.channel.id,
parentId: a2.parent_id} : value : {referenceId: value != firstChannelOfType2 ? firstChannelOfType2.channel.id : value,
parentId: value};
}
r1 = r6;
} else if (a2.type === GUILD_CATEGORY) {
channelPosition2 = getChannelPosition(a2, a4, true);
property = a4[(value != channelPosition2 ? channelPosition2 : 0) + 1];
getFirstChannelOfTypeBinding = getFirstChannelOfType;
id = a2.id;
firstChannelOfTypeBinding = getFirstChannelOfTypeBinding(-1, id, a0.type, a4);
if (value != firstChannelOfTypeBinding) {
if (value == property) {
object2 = {};
id = firstChannelOfTypeBinding.channel.id;
object2.referenceId = id;
id = a2.id;
object2.parentId = id;
r6 = object2;
} else {
areTypesInSameSectionBinding = areTypesInSameSection;
channel = property.channel;
if (areTypesInSameSectionBinding(channel.type, a0.type)) {
object2 = {};
channel = firstChannelOfTypeBinding.channel;
object2.referenceId = channel.id;
r1 = r6;
} else if (a2.type === GUILD_CATEGORY) {
channelPosition2 = getChannelPosition(a2, a4, true);
property = a4[(value != channelPosition2 ? channelPosition2 : 0) + 1];
getFirstChannelOfTypeBinding = getFirstChannelOfType;
id = a2.id;
firstChannelOfTypeBinding = getFirstChannelOfTypeBinding(-1, id, a0.type, a4);
if (value != firstChannelOfTypeBinding) {
if (value == property) {
object = {};
id = firstChannelOfTypeBinding.channel.id;
object.referenceId = id;
id = a2.id;
object.parentId = id;
r6 = object;
} else {
areTypesInSameSectionBinding = areTypesInSameSection;
channel = property.channel;
object2.parentId = channel.parent_id;
r6 = object2;
} else if (isGuildSelectableChannelType(a0.type)) {
channel = property.channel;
if (channel.isGuildVocal()) {
object2 = {};
if (areTypesInSameSectionBinding(channel.type, a0.type)) {
object = {};
channel = firstChannelOfTypeBinding.channel;
object2.referenceId = channel.id;
object.referenceId = channel.id;
channel = property.channel;
object2.parentId = channel.parent_id;
r6 = object2;
object.parentId = channel.parent_id;
r6 = object;
} else if (isGuildSelectableChannelType(a0.type)) {
channel = property.channel;
if (channel.isGuildVocal()) {
object = {};
channel = firstChannelOfTypeBinding.channel;
object.referenceId = channel.id;
channel = property.channel;
object.parentId = channel.parent_id;
r6 = object;
} else {
channel = property.channel;
if (channel.isCategory()) {
object = {};
id = firstChannelOfTypeBinding.channel.id;
object.referenceId = id;
id = a2.id;
object.parentId = id;
r6 = object;
} else {
r6 = value;
}
}
} else {
channel = property.channel;
if (channel.isCategory()) {
object2 = {};
object = {};
id = firstChannelOfTypeBinding.channel.id;
object2.referenceId = id;
object.referenceId = id;
id = a2.id;
object2.parentId = id;
r6 = object2;
object.parentId = id;
r6 = object;
} else {
r6 = value;
}
}
} else {
channel = property.channel;
if (channel.isCategory()) {
object2 = {};
id = firstChannelOfTypeBinding.channel.id;
object2.referenceId = id;
id = a2.id;
object2.parentId = id;
r6 = object2;
} else {
r6 = value;
}
}
}
} else {
r6 = value;
}
r1 = r6;
} else {
channelPosition = getChannelPosition(a2, a4, true);
property = a4[(value != channelPosition ? channelPosition : 0) + 1];
firstChannelOfType = getFirstChannelOfType(-1, a2.id, a0.type, a4);
if (value == firstChannelOfType) {
r1 = value;
} else if (a0.isGuildVocal()) {
if (value == property) {
r1 = {referenceId: firstChannelOfType.channel.id, parentId: a2.parent_id};
} else {
channel = property.channel;
if (channel.isCategory()) {
r6 = value;
}
r1 = r6;
} else {
channelPosition = getChannelPosition(a2, a4, true);
property = a4[(value != channelPosition ? channelPosition : 0) + 1];
firstChannelOfType = getFirstChannelOfType(-1, a2.id, a0.type, a4);
if (value == firstChannelOfType) {
r1 = value;
} else if (a0.isGuildVocal()) {
if (value == property) {
r1 = {referenceId: firstChannelOfType.channel.id, parentId: a2.parent_id};
} else {
channel = property.channel;
if (channel.isGuildVocal()) {
object2 = {};
channel = firstChannelOfType.channel;
object2.referenceId = channel.id;
channel = property.channel;
object2.parentId = channel.parent_id;
r1 = object2;
if (channel.isCategory()) {
r1 = {referenceId: firstChannelOfType.channel.id, parentId: a2.parent_id};
} else {
r1 = a0.isCategory() && (value == property || property.channel.isCategory()) ? {referenceId: firstChannelOfType.channel.id,
parentId: value} : value;
channel = property.channel;
if (channel.isGuildVocal()) {
object = {};
channel = firstChannelOfType.channel;
object.referenceId = channel.id;
channel = property.channel;
object.parentId = channel.parent_id;
r1 = object;
} else {
r1 = a0.isCategory() && (value == property || property.channel.isCategory()) ? {referenceId: firstChannelOfType.channel.id,
parentId: value} : value;
}
}
}
} else {
r1 = a0.isCategory() && (value == property || property.channel.isCategory()) ? {referenceId: firstChannelOfType.channel.id,
parentId: value} : value;
}
} else {
r1 = a0.isCategory() && (value == property || property.channel.isCategory()) ? {referenceId: firstChannelOfType.channel.id,
parentId: value} : value;
}
}
return r1;
}
return r1;
}
function getDnDUpdates(a0, a1, a2, a3) { // fn#122962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:3153, offset: 0x0257c5df, size: 441 bytes, params: 5, frame: 24
var r1;
var value;
var getChannelPositionBinding;
var value3;
var value4;
const env0_0 = a0;
const env0_1 = a2;
const env0_4 = [];
let items = [];
const _categories = a3._categories;
const closure = generateUpdates;
if (a0.isCategory()) {
items = [];
arraySpread(items, _categories, 0, undefined);
value = items.slice(1);
getChannelPositionBinding = getChannelPosition;
var env0_2 = getChannelPositionBinding(a0, value);
var env0_3 = getChannelPositionBinding(a1, value);
value = closure(value);
value.unshift(_categories[0]);
r1 = value;
} else {
r1 = items;
}
if (isGuildSelectableChannelType(a0.type)) {
value3 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(r1.length > 0 ? r1 : _categories,
a3, function(a0) {
return isGuildSelectableChannelType(a0.channel.type);
});
getChannelPositionBinding = getChannelPosition;
env0_2 = getChannelPositionBinding(a0, value3);
env0_3 = getChannelPositionBinding(a1, value3);
closure(value3);
} else if (a0.isCategory()) {
value3 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(r1.length > 0 ? r1 : _categories,
a3, _fun122966);
getChannelPositionBinding = getChannelPosition;
env0_2 = getChannelPositionBinding(a0, value3);
env0_3 = getChannelPositionBinding(a1, value3);
closure(value3);
}
if (a0.isGuildVocal()) {
value4 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(r1.length > 0 ? r1 : _categories,
a3, function({channel}) {
return channel.isGuildVocal();
});
getChannelPositionBinding = getChannelPosition;
env0_2 = getChannelPositionBinding(a0, value4);
env0_3 = getChannelPositionBinding(a1, value4);
closure(value4);
} else if (a0.isCategory()) {
value4 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(r1.length > 0 ? r1 : _categories,
a3, _fun122967);
getChannelPositionBinding = getChannelPosition;
env0_2 = getChannelPositionBinding(a0, value4);
env0_3 = getChannelPositionBinding(a1, value4);
closure(value4);
}
value = a0.parent_id !== a2;
if (value) {
value = env0_4.find(_fun122968);
value = value == null;
r1 = value;
} else {
r1 = value;
}
if (r1) {
env0_4.push({id: a0.id, parent_id: a2});
}
return env0_4;
}
function _fun122956({channel}, a1) { // fn#122956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:343, offset: 0x0257bf67, size: 38 bytes, params: 3, frame: 3
return channel.id === require && true;
}
function _fun122958({channel}) { // fn#122958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:593, offset: 0x0257bfe3, size: 65 bytes, params: 2, frame: 15
return env0_0 != null && (env0_1 || areTypesInSameSection(env0_0.type, channel.type));
}
function _fun122959({channel}, a1) { // fn#122959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:669, offset: 0x0257c024, size: 56 bytes, params: 3, frame: 4
return env0_0 != null && channel.id === env0_0.id && true;
}
function generateUpdates(a0) { // fn#122963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:3235, owner: getDnDUpdates.generateUpdates, offset: 0x0257c798, size: 246 bytes, params: 2, frame: 19
var environment;
var r0;
var binding;
var binding2;
var binding3;
var items;
var value7;
var defaultImport;
if (env0_2 == null) {
items = [];
arraySpread(items, a0, 0, a0);
r0 = items;
} else if (env0_3 == null) {
items = [];
arraySpread(items, a0, 0, a0);
r0 = items;
} else {
binding = env0_0;
binding2 = env0_2;
binding3 = env0_3;
r0 = binding2 != null && binding3 != null;
r0 = r0 && a0[binding2] != null;
r0 = r0 && a0[binding2].channel === binding;
r0 = r0 && a0[binding3] != null;
if (r0) {
value7 = environment.__proto__;
defaultImport = importDefault(11879) /* metro dependency 11879: DragAndDropUtils */;
r0 = defaultImport.moveItemFromTo(a0, env0_2, env0_3);
function getDnDUpdates(a0, a1, a2, a3) { // fn#122962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:3153, offset: 0x0257c5df, size: 441 bytes, params: 5, frame: 24
var r1;
var value;
var getChannelPositionBinding;
var value3;
var value4;
const env0_0 = a0;
const env0_1 = a2;
const items3 = [];
let items2 = [];
const _categories = a3._categories;
const generateUpdates2 = generateUpdates;
if (a0.isCategory()) {
items2 = [];
arraySpread(items2, _categories, 0, undefined);
value = items2.slice(1);
getChannelPositionBinding = getChannelPosition;
var env0_2 = getChannelPositionBinding(a0, value);
var env0_3 = getChannelPositionBinding(a1, value);
value = generateUpdates2(value);
value.unshift(_categories[0]);
r1 = value;
} else {
items = [];
arraySpread(items, a0, 0, a0);
r0 = items;
r1 = items2;
}
if (isGuildSelectableChannelType(a0.type)) {
value3 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(r1.length > 0 ? r1 : _categories,
a3, function(a0) {
return isGuildSelectableChannelType(a0.channel.type);
});
getChannelPositionBinding = getChannelPosition;
env0_2 = getChannelPositionBinding(a0, value3);
env0_3 = getChannelPositionBinding(a1, value3);
generateUpdates2(value3);
} else if (a0.isCategory()) {
value3 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(r1.length > 0 ? r1 : _categories,
a3, _fun122966);
getChannelPositionBinding = getChannelPosition;
env0_2 = getChannelPositionBinding(a0, value3);
env0_3 = getChannelPositionBinding(a1, value3);
generateUpdates2(value3);
}
if (a0.isGuildVocal()) {
value4 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(r1.length > 0 ? r1 : _categories,
a3, function({channel}) {
return channel.isGuildVocal();
});
getChannelPositionBinding = getChannelPosition;
env0_2 = getChannelPositionBinding(a0, value4);
env0_3 = getChannelPositionBinding(a1, value4);
generateUpdates2(value4);
} else if (a0.isCategory()) {
value4 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(r1.length > 0 ? r1 : _categories,
a3, _fun122967);
getChannelPositionBinding = getChannelPosition;
env0_2 = getChannelPositionBinding(a0, value4);
env0_3 = getChannelPositionBinding(a1, value4);
generateUpdates2(value4);
}
value = a0.parent_id !== a2;
if (value) {
value = items3.find(_fun122968);
value = value == null;
r1 = value;
} else {
r1 = value;
}
if (r1) {
items3.push({id: a0.id, parent_id: a2});
}
return items3;
function generateUpdates(a0) { // fn#122963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:3235, owner: getDnDUpdates.generateUpdates, offset: 0x0257c798, size: 246 bytes, params: 2, frame: 19
var environment;
var r0;
var binding;
var binding2;
var binding3;
var items2;
var value7;
var defaultImport;
if (env0_2 == null) {
items2 = [];
arraySpread(items2, a0, 0, a0);
r0 = items2;
} else if (env0_3 == null) {
items2 = [];
arraySpread(items2, a0, 0, a0);
r0 = items2;
} else {
binding = env0_0;
binding2 = env0_2;
binding3 = env0_3;
r0 = binding2 != null && binding3 != null;
r0 = r0 && a0[binding2] != null;
r0 = r0 && a0[binding2].channel === binding;
r0 = r0 && a0[binding3] != null;
if (r0) {
value7 = environment.__proto__;
defaultImport = importDefault(11879) /* metro dependency 11879: DragAndDropUtils */;
r0 = defaultImport.moveItemFromTo(a0, env0_2, env0_3);
} else {
items2 = [];
arraySpread(items2, a0, 0, a0);
r0 = items2;
}
}
binding = env0_4;
const concat = binding.concat;
const defaultImport2 = importDefault(11879) /* metro dependency 11879: DragAndDropUtils */;
env0_4 = Reflect.apply(concat, binding, [defaultImport2.calculatePositionDeltas({oldOrdering: a0, newOrdering: r0,
idGetter: function(a0) {
return a0.channel.id;
}, existingPositionGetter: function(a0) {
return a0.channel.position;
}})]);
return r0;
}
}
binding = env0_4;
const concat = binding.concat;
const defaultImport2 = importDefault(11879) /* metro dependency 11879: DragAndDropUtils */;
env0_4 = Reflect.apply(concat, binding, [defaultImport2.calculatePositionDeltas({oldOrdering: a0, newOrdering: r0,
idGetter: function(a0) {
return a0.channel.id;
}, existingPositionGetter: function(a0) {
return a0.channel.position;
}})]);
return r0;
}
function _fun122966({channel}) { // fn#122966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:3762, offset: 0x0257c88e, size: 29 bytes, params: 2, frame: 11
return isGuildSelectableChannelType(channel.type);
function _fun122966({channel}) { // fn#122966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:3762, offset: 0x0257c88e, size: 29 bytes, params: 2, frame: 11
return isGuildSelectableChannelType(channel.type);
}
function _fun122968(a0) { // fn#122968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:4074, offset: 0x0257c8bf, size: 41 bytes, params: 2, frame: 4
var r0;
const value2 = a0.id === env0_0.id;
if (value2) {
a0.parent_id = importDefault;
r0 = true;
} else {
r0 = value2;
}
return r0;
}
}
}
function _fun122967({channel}) { // fn#122967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:3931, offset: 0x0257c8ab, size: 20 bytes, params: 2, frame: 9
return channel.isGuildVocal();
}
function _fun122968(a0) { // fn#122968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16144:4074, offset: 0x0257c8bf, size: 41 bytes, params: 2, frame: 4
var r0;
const value2 = a0.id === env0_0.id;
if (value2) {
a0.parent_id = importDefault;
r0 = true;
} else {
r0 = value2;
}
return r0;
}
global.__d(_fun122953, 15936, [1383, 661, 11879, 5099,
2]) /* metro module 15936, dependencies: [1383, 661, 11879, 5099, 2] */;
File diff suppressed because it is too large. Load diff
+48 -44
View File
@@ -1,9 +1,12 @@
/* Metro module 11012; source: utils/ChatRestrictions.tsx; dependencies: [661, 11013, 1244, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun84369(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11198:6, offset: 0x01f47364, size: 184 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).TOKEN_REGEX;
const items2 = [{check: check, analyticsType: '@Everyone Warning', animation: undefined}];
items2[1] = {check: function(a0) {
var r0;
@@ -18,51 +21,52 @@ function _fun84369(global, require, importDefault, importAll, module, exports, d
}
return r0;
}, analyticsType: 'API Token Warning'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ChatRestrictions.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/ChatRestrictions.tsx');
exports.RESTRICTIONS = items2;
}
function check(a0, a1, a2) { // fn#84370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11198:122, offset: 0x01f4741c, size: 464 bytes, params: 4, frame: 22
var r8;
var value2;
var defaultImport2;
var value3;
var Math;
var pow;
var Math2;
var floor;
var Math3;
var value5;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var object;
if (a2) {
if (a1.getGuildId() == null) {
return false;
}
value2 = (importDefault(11013) /* metro dependency 11013: MentionGuardUtils */).extractEveryoneRole(a0, a1);
if (value2 == null) {
return false;
}
defaultImport2 = importDefault(11013) /* metro dependency 11013: MentionGuardUtils */;
if (defaultImport2.shouldShowEveryoneGuard(value2, a1)) {
value3 = (importDefault(11013) /* metro dependency 11013: MentionGuardUtils */).everyoneMemberCount(value2,
a1);
Math = global.Math;
pow = Math.pow;
Math2 = global.Math;
floor = Math2.floor;
Math3 = global.Math;
value5 = Reflect.apply(pow, Math, [10, Reflect.apply(floor, Math2, [Math3.log10(value3)])]);
r8 = a1.isForumPost() ? t.sYW2cy : a1.isThread() ? t['2YaiQ1'] : t['47E5Rz'];
formatToPlainString = intl.formatToPlainString;
object = {role: value2};
Math = global.Math;
object.count = (Math.trunc(value3 / value5) * value5).toLocaleString();
return {body: Reflect.apply(formatToPlainString, intl, [r8, object]), footer: intl.string(t.mVyrtu)};
function check(a0, a1, a2) { // fn#84370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11198:122, offset: 0x01f4741c, size: 464 bytes, params: 4, frame: 22
var r8;
var value2;
var defaultImport2;
var value3;
var Math;
var pow;
var Math2;
var floor;
var Math3;
var value5;
const t = (IndexNativeModule).t;
const intl = (IndexNativeModule).intl;
var formatToPlainString;
var object2;
if (a2) {
if (a1.getGuildId() == null) {
return false;
}
value2 = (importDefault(11013) /* metro dependency 11013: MentionGuardUtils */).extractEveryoneRole(a0, a1);
if (value2 == null) {
return false;
}
defaultImport2 = importDefault(11013) /* metro dependency 11013: MentionGuardUtils */;
if (defaultImport2.shouldShowEveryoneGuard(value2, a1)) {
value3 = (importDefault(11013) /* metro dependency 11013: MentionGuardUtils */).everyoneMemberCount(value2,
a1);
Math = global.Math;
pow = Math.pow;
Math2 = global.Math;
floor = Math2.floor;
Math3 = global.Math;
value5 = Reflect.apply(pow, Math, [10, Reflect.apply(floor, Math2, [Math3.log10(value3)])]);
r8 = a1.isForumPost() ? t.sYW2cy : a1.isThread() ? t['2YaiQ1'] : t['47E5Rz'];
formatToPlainString = intl.formatToPlainString;
object2 = {role: value2};
Math = global.Math;
object2.count = (Math.trunc(value3 / value5) * value5).toLocaleString();
return {body: Reflect.apply(formatToPlainString, intl, [r8, object2]), footer: intl.string(t.mVyrtu)};
}
}
return false;
}
return false;
}
global.__d(_fun84369, 11012, [661, 11013, 1244, 2]) /* metro module 11012, dependencies: [661, 11013, 1244, 2] */;
+24 -20
View File
@@ -1,33 +1,37 @@
/* Metro module 6797; source: utils/ClipboardUtils.native.tsx; dependencies: [5, 6798, 2] */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
import UseClipboard from '../by-id/module-06798-useClipboard.js'; /* Metro dependency 6798 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun53500(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6975:6, offset: 0x0134dcbd, size: 140 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ClipboardUtils.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/ClipboardUtils.native.tsx');
exports.SUPPORTS_COPY = true;
exports.copy = function() {
return _copy.apply(this, arguments);
};
exports.getString = getString_53505;
}
function _copy() { // fn#53501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6975:106, offset: 0x0134dd49, size: 48 bytes, params: 1, frame: 14
return env0_2(_fun53503).apply(this, arguments);
}
function getString_53505() { // fn#53505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6975:393, offset: 0x0134dde1, size: 37 bytes, params: 1, frame: 11
return (importDefault(6798) /* metro dependency 6798 */).getString();
}
function* _fun53503(a0, a1) { // fn#53503, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6975:139, offset: 0x0134dd82, size: 95 bytes, params: 3, frame: 14
if (true) {
value = environment.__proto__.__proto__;
env2_0(env2_1[1]).setString(a0);
if (a1 != null) {
a1();
function _copy() { // fn#53501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6975:106, offset: 0x0134dd49, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun53503).apply(this, arguments);
function* _fun53503(a0, a1) { // fn#53503, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6975:139, offset: 0x0134dd82, size: 95 bytes, params: 3, frame: 14
if (true) {
value = environment.__proto__.__proto__;
env2_0(env2_1[1]).setString(a0);
if (a1 != null) {
a1();
}
var Promise = global.Promise;
yield Promise.resolve();
}
}
var Promise = global.Promise;
yield Promise.resolve();
}
function getString_53505() { // fn#53505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6975:393, offset: 0x0134dde1, size: 37 bytes, params: 1, frame: 11
return (UseClipboard).getString();
}
}
global.__d(_fun53500, 6797, [5, 6798, 2]) /* metro module 6797, dependencies: [5, 6798, 2] */;
+194 -188
View File
@@ -1,51 +1,197 @@
/* Metro module 4001; source: utils/Color.tsx; dependencies: [57, 6, 7, 2] */
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 Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun32928(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:6, offset: 0x01021fea, size: 191 bytes, params: 8, frame: 19
const closure = hslToRgb_32929;
const hslToRgb_329292 = hslToRgb_32929;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
const env0_1 = importDefault(6) /* metro dependency 6 */;
const env0_2 = importDefault(7) /* metro dependency 7 */;
const env0_3 = RegExp('^#[0-9a-f]{3,8}$', 'i');
const env0_4 = RegExp('^((?:rgb|hsl)a?)\\s*\\(([^)]*)\\)', 'i');
const value = _fun32931();
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/Color.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/Color.tsx');
exports.default = value;
exports.hslToRgb = closure;
}
exports.hslToRgb = hslToRgb_329292;
function hslToRgb_32929({hue, saturation, lightness, alpha}) { // fn#32929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:129, offset: 0x010220a9, size: 357 bytes, params: 2, frame: 19
let value = saturation / 255;
const value2 = lightness / 255;
let Math = global.Math;
value = (1 - Math.abs(2 * value2 - 1)) * value;
Math = global.Math;
const value3 = value * (1 - Math.abs(hue / 60 % 2 - 1));
const env0_0 = value2 - value / 2;
value = (hue < 60 ? [value, value3, 0] : hue < 120 ? [value3, value, 0] : hue < 180 ? [0, value,
value3] : hue < 240 ? [0, value3, value] : hue < 300 ? [value3, 0, value] : [value, 0, value3]).map(_fun32930);
return {red: value[0], green: value[1], blue: value[2], alpha: alpha};
function _fun32930(a0) { // fn#32930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:352, offset: 0x0102220e, size: 41 bytes, params: 2, frame: 12
const Math = global.Math;
return Math.round(255 * (a0 + env0_0));
}
function hslToRgb_32929({hue, saturation, lightness, alpha}) { // fn#32929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:129, offset: 0x010220a9, size: 357 bytes, params: 2, frame: 19
let value = saturation / 255;
const value2 = lightness / 255;
let Math = global.Math;
value = (1 - Math.abs(2 * value2 - 1)) * value;
Math = global.Math;
const value3 = value * (1 - Math.abs(hue / 60 % 2 - 1));
const env0_0 = value2 - value / 2;
value = (hue < 60 ? [value, value3, 0] : hue < 120 ? [value3, value, 0] : hue < 180 ? [0, value,
value3] : hue < 240 ? [0, value3, value] : hue < 300 ? [value3, 0, value] : [value, 0, value3]).map(_fun32930);
return {red: value[0], green: value[1], blue: value[2], alpha: alpha};
}
}
function _fun32931() { // fn#32931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:489, offset: 0x01022237, size: 206 bytes, params: 1, frame: 17
return env0_2(Color, [{key: 'toHexString', value: value_32933}, {key: 'toHSL', value: value_32934},
{key: 'getRelativeLuminance', value: value_32935}], [{key: 'parseString', value: value_32936},
{key: 'parseRgbString', value: function(a0) {
return a0 === 'transparent' ? new Color(0, 0, 0, 0) : this.parseColorFnString(a0);
}}, {key: 'parseHexString', value: value_32938}, {key: 'parseColorFnString', value: value_32939}]);
}
function _fun32931() { // fn#32931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:489, offset: 0x01022237, size: 206 bytes, params: 1, frame: 17
return CreateClass(Color_32932, [{key: 'toHexString', value: value_32933}, {key: 'toHSL', value: value_32934},
{key: 'getRelativeLuminance', value: value_32935}], [{key: 'parseString', value: value_32936},
{key: 'parseRgbString', value: function(a0) {
return a0 === 'transparent' ? new Color_32932(0, 0, 0, 0) : this.parseColorFnString(a0);
}}, {key: 'parseHexString', value: value_32938}, {key: 'parseColorFnString', value: value_32939}]);
function Color_32932(a0, a1, a2, a3) { // fn#32932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:500, offset: 0x01022305, size: 63 bytes, params: 5, frame: 13
env1_1(this, Color_32932);
this.red = a0;
this.green = a1;
this.blue = a2;
this.alpha = a3;
}
function _fun32930(a0) { // fn#32930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:352, offset: 0x0102220e, size: 41 bytes, params: 2, frame: 12
const Math = global.Math;
return Math.round(255 * (a0 + env0_0));
}
function value_32936(a0) { // fn#32936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:1596, offset: 0x0102268c, size: 82 bytes, params: 2, frame: 13
const match = a0.match;
const value = environment.__proto__;
return Reflect.apply(match, a0,
[env1_4]) != null ? this.parseColorFnString(a0) : a0.match(env1_3) != null ? this.parseHexString(a0) : undefined;
}
function value_32938(a0) { // fn#32938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:1848, offset: 0x0102271e, size: 347 bytes, params: 2, frame: 23
var r2;
var r3;
var property;
var property2;
var property3;
var property4;
const match = a0.match;
let value = environment.__proto__;
if (Reflect.apply(match, a0, [env1_3]) == null) {
return undefined;
}
const items2 = [6, 8];
if (items2.includes(a0.length)) {
return undefined;
}
const value3 = a0.replace('#', '');
if (value3.length < 6) {
value = env1_0(value3, 4);
property = value[0];
property2 = value[1];
property3 = value[2];
property4 = value[3];
value = property + property + property2 + property2 + property3 + property3;
if (property4 == null) {
r2 = value;
} else {
value += property4 + property4;
r2 = value;
}
} else {
r2 = value3;
}
value = r2.match(RegExp('.{1,2}', 'g'));
if (value == null) {
return undefined;
}
let parseInt = global.parseInt;
const int = parseInt(value[0], 16);
parseInt = global.parseInt;
const value5 = 1;
const int2 = parseInt(value[value5], 16);
const int3 = global.parseInt(value[2], 16);
if (value[3] != null) {
value = global.parseInt(value[3], 16);
value /= 255;
r3 = value;
} else {
r3 = value5;
}
value = Object.create(Color_32932.prototype, {constructor: {value: Color_32932}});
const color_32932 = new Color_32932(int, int2, int3);
return color_32932 instanceof Object ? color_32932 : value;
}
function value_32939(a0) { // fn#32939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:2194, offset: 0x01022879, size: 342 bytes, params: 2, frame: 25
var environment;
var r1;
var value8;
var property3;
var property4;
var color_32932;
var red;
var green;
var blue;
var alpha;
const match = a0.match;
let value = environment.__proto__;
const value3 = env1_0(Reflect.apply(match, a0, [env1_4]) ?? [], 3);
const value4 = 1;
let property = value3[value4];
const property2 = value3[2];
if (property != null) {
if (property2 != null) {
value8 = property2.split(RegExp('\\s*[,/\\s]\\s*', '')).map(function(a0) {
return a0.replace(',', '').trim();
}).filter(_fun32941).map(_fun32942);
if (property.substr(0, 3) === 'hsl') {
value = hslToRgb_32929({hue: value8[0], saturation: value8[value4], lightness: value8[2],
alpha: value8[3]});
red = value.red;
green = value.green;
blue = value.blue;
alpha = value.alpha;
value = Object.create(Color_32932.prototype, {constructor: {value: Color_32932}});
color_32932 = new Color_32932();
return color_32932 instanceof Object ? color_32932 : value;
}
property = value8[0];
property3 = value8[value4];
property4 = value8[2];
r1 = typeof value8[3] !== 'number' ? value4 : value8[3];
value = Object.create(Color_32932.prototype, {constructor: {value: Color_32932}});
color_32932 = new Color_32932(property);
return color_32932 instanceof Object ? color_32932 : value;
}
}
function _fun32942(a0, a1) { // fn#32942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:2374, offset: 0x010229f1, size: 249 bytes, params: 3, frame: 13
var r1;
var r0;
var value;
let regexp = RegExp('%$', '');
if (regexp.test(a0)) {
if (a1 === 3) {
value = global.parseFloat(a0);
value /= 100;
r1 = value;
} else {
value = global.parseFloat(a0);
value = 255 * value / 100;
r1 = value;
}
r0 = r1;
} else if (Module00057[a1] !== 'h') {
r0 = global.parseFloat(a0);
} else {
regexp = RegExp('turn$', '');
if (regexp.test(a0)) {
value = global.parseFloat(a0);
value = 360 * value;
r0 = value;
} else {
regexp = RegExp('rad$', '');
if (regexp.test(a0)) {
value = global.parseFloat(a0);
value = 57.3 * value;
r0 = value;
} else {
r0 = global.parseFloat(a0);
}
}
}
return r0;
}
}
}
function Color(a0, a1, a2, a3) { // fn#32932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:500, offset: 0x01022305, size: 63 bytes, params: 5, frame: 13
env1_1(this, Color);
this.red = a0;
this.green = a1;
this.blue = a2;
this.alpha = a3;
}
function value_32933() { // fn#32933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:628, offset: 0x01022344, size: 201 bytes, params: 1, frame: 15
@@ -62,19 +208,19 @@ function value_32933() { // fn#32933, source: /ci/build/discord/discord/discord_
}
function value_32934() { // fn#32934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:860, offset: 0x0102240d, size: 307 bytes, params: 1, frame: 24
const object2 = {};
const object = {};
let red = this.red;
object2.red = red;
object.red = red;
let green = this.green;
object2.green = green;
object.green = green;
let blue = this.blue;
object2.blue = blue;
object.blue = blue;
let alpha = this.alpha;
object2.alpha = alpha;
red = object2.red;
green = object2.green;
blue = object2.blue;
alpha = object2.alpha;
object.alpha = alpha;
red = object.red;
green = object.green;
blue = object.blue;
alpha = object.alpha;
const value = red / 255;
const value2 = green / 255;
const value3 = blue / 255;
@@ -106,148 +252,8 @@ function value_32935() { // fn#32935, source: /ci/build/discord/discord/discord_
2.4)) + 0.0722 * (value3 <= 0.03928 ? value3 / 12.92 : global.Math.pow((value3 + 0.055) / 1.055, 2.4));
}
function value_32936(a0) { // fn#32936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:1596, offset: 0x0102268c, size: 82 bytes, params: 2, frame: 13
const match = a0.match;
const value = environment.__proto__;
return Reflect.apply(match, a0,
[env1_4]) != null ? this.parseColorFnString(a0) : a0.match(env1_3) != null ? this.parseHexString(a0) : undefined;
}
function value_32938(a0) { // fn#32938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:1848, offset: 0x0102271e, size: 347 bytes, params: 2, frame: 23
var r2;
var r3;
var property;
var property2;
var property3;
var property4;
const match = a0.match;
let value = environment.__proto__;
if (Reflect.apply(match, a0, [env1_3]) == null) {
return undefined;
}
const items2 = [6, 8];
if (items2.includes(a0.length)) {
return undefined;
}
const value3 = a0.replace('#', '');
if (value3.length < 6) {
value = env1_0(value3, 4);
property = value[0];
property2 = value[1];
property3 = value[2];
property4 = value[3];
value = property + property + property2 + property2 + property3 + property3;
if (property4 == null) {
r2 = value;
} else {
value += property4 + property4;
r2 = value;
}
} else {
r2 = value3;
}
value = r2.match(RegExp('.{1,2}', 'g'));
if (value == null) {
return undefined;
}
let parseInt = global.parseInt;
const int = parseInt(value[0], 16);
parseInt = global.parseInt;
const value5 = 1;
const int2 = parseInt(value[value5], 16);
const int3 = global.parseInt(value[2], 16);
if (value[3] != null) {
value = global.parseInt(value[3], 16);
value /= 255;
r3 = value;
} else {
r3 = value5;
}
value = Object.create(Color.prototype, {constructor: {value: Color}});
const color = new Color(int, int2, int3);
return color instanceof Object ? color : value;
}
function value_32939(a0) { // fn#32939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:2194, offset: 0x01022879, size: 342 bytes, params: 2, frame: 25
var environment;
var r1;
var value8;
var property3;
var property4;
var color;
var red;
var green;
var blue;
var alpha;
const match = a0.match;
let value = environment.__proto__;
const value3 = env1_0(Reflect.apply(match, a0, [env1_4]) ?? [], 3);
const value4 = 1;
let property = value3[value4];
const property2 = value3[2];
if (property != null) {
if (property2 != null) {
value8 = property2.split(RegExp('\\s*[,/\\s]\\s*', '')).map(function(a0) {
return a0.replace(',', '').trim();
}).filter(_fun32941).map(_fun32942);
if (property.substr(0, 3) === 'hsl') {
value = hslToRgb_32929({hue: value8[0], saturation: value8[value4], lightness: value8[2],
alpha: value8[3]});
red = value.red;
green = value.green;
blue = value.blue;
alpha = value.alpha;
value = Object.create(Color.prototype, {constructor: {value: Color}});
color = new Color();
return color instanceof Object ? color : value;
}
property = value8[0];
property3 = value8[value4];
property4 = value8[2];
r1 = typeof value8[3] !== 'number' ? value4 : value8[3];
value = Object.create(Color.prototype, {constructor: {value: Color}});
color = new Color(property);
return color instanceof Object ? color : value;
}
}
}
function _fun32942(a0, a1) { // fn#32942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4159:2374, offset: 0x010229f1, size: 249 bytes, params: 3, frame: 13
var r1;
var r0;
var value;
const binding = env0_0;
let regexp = RegExp('%$', '');
if (regexp.test(a0)) {
if (a1 === 3) {
value = global.parseFloat(a0);
value /= 100;
r1 = value;
} else {
value = global.parseFloat(a0);
value = 255 * value / 100;
r1 = value;
}
r0 = r1;
} else if (binding[a1] !== 'h') {
r0 = global.parseFloat(a0);
} else {
regexp = RegExp('turn$', '');
if (regexp.test(a0)) {
value = global.parseFloat(a0);
value = 360 * value;
r0 = value;
} else {
regexp = RegExp('rad$', '');
if (regexp.test(a0)) {
value = global.parseFloat(a0);
value = 57.3 * value;
r0 = value;
} else {
r0 = global.parseFloat(a0);
}
}
}
return r0;
function _fun32941(a0) { // fn#32941, offset: 0x00c5f3a9, size: 13 bytes, params: 2, frame: 2
return a0 !== '';
}
global.__d(_fun32928, 4001, [57, 6, 7, 2]) /* metro module 4001, dependencies: [57, 6, 7, 2] */;
+458 -453
View File
@@ -1,10 +1,14 @@
/* Metro module 4000; source: utils/ColorUtils.tsx; dependencies: [57, 674, 1244, 3, 4001, 2] */
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import Module00674 from '../by-id/module-00674.js'; /* Metro dependency 674 */
import Color from './Color.tsx'; /* Metro dependency 4001 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun32873(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:6, offset: 0x0102042f, size: 738 bytes, params: 8, frame: 27
var object2;
let env0_0 = require;
let closure = hexToRgb;
const closure2 = hexToRgba;
const closure3 = rgbToHslObject;
const hexToRgb2 = hexToRgb;
const hexToRgba2 = hexToRgba;
const rgbToHslObject2 = rgbToHslObject;
const closure4 = function(a0, a1, a2) {
return 'hsl(' + a0 + ', ' + a1 + '%, ' + a2 + '%)';
};
@@ -19,23 +23,22 @@ function _fun32873(global, require, importDefault, importAll, module, exports, d
var env0_2 = a1 * value / 100;
return '#' + closure(0) + closure(8) + closure(4);
};
const closure6 = hex2rgb2hsv;
const hex2rgb2hsv2 = hex2rgb2hsv;
const hslToRgb_32883 = function(a0, a1, a2) {
return hexToRgb(hslToHex(a0, a1, a2));
};
const closure7 = rawRgbToHsl;
const rawRgbToHsl2 = rawRgbToHsl;
const sortColors = function({hsv}, {hsv}) {
return hsv.s + hsv.v - (hsv.s + hsv.v);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
object2 = {code: "function hexWithOpacity_ColorUtilsTsx1(color,value){if(color.length===7){const alpha=value*255|0;return color+alpha.toString(16).padStart(2,'0').toUpperCase();}const hex=color.charAt(0)==='#'?color.slice(1):color;let r;let g;let b;let a;switch(hex.length){case 3:r=hex.charAt(0);g=hex.charAt(1);b=hex.charAt(2);r+=r;g+=g;b+=b;a=(value*255|0).toString(16).padStart(2,'0').toUpperCase();return'#'+r+g+b+a;case 4:r=hex.charAt(0);g=hex.charAt(1);b=hex.charAt(2);a=hex.charAt(3);r+=r;g+=g;b+=b;a+=a;const alpha4=parseInt(a,16)/255*value;const alpha4Hex=(alpha4*255|0).toString(16).padStart(2,'0').toUpperCase();return'#'+r+g+b+alpha4Hex;case 6:const alpha6=(value*255|0).toString(16).padStart(2,'0').toUpperCase();return'#'+hex+alpha6;case 8:const baseColor='#'+hex.slice(0,6);const existingAlpha=parseInt(hex.slice(6),16)/255;const alpha8=(existingAlpha*value*255|0).toString(16).padStart(2,'0').toUpperCase();return baseColor+alpha8;default:throw new Error('Invalid hex color format');}}"};
object = {code: "function hexWithOpacity_ColorUtilsTsx1(color,value){if(color.length===7){const alpha=value*255|0;return color+alpha.toString(16).padStart(2,'0').toUpperCase();}const hex=color.charAt(0)==='#'?color.slice(1):color;let r;let g;let b;let a;switch(hex.length){case 3:r=hex.charAt(0);g=hex.charAt(1);b=hex.charAt(2);r+=r;g+=g;b+=b;a=(value*255|0).toString(16).padStart(2,'0').toUpperCase();return'#'+r+g+b+a;case 4:r=hex.charAt(0);g=hex.charAt(1);b=hex.charAt(2);a=hex.charAt(3);r+=r;g+=g;b+=b;a+=a;const alpha4=parseInt(a,16)/255*value;const alpha4Hex=(alpha4*255|0).toString(16).padStart(2,'0').toUpperCase();return'#'+r+g+b+alpha4Hex;case 6:const alpha6=(value*255|0).toString(16).padStart(2,'0').toUpperCase();return'#'+hex+alpha6;case 8:const baseColor='#'+hex.slice(0,6);const existingAlpha=parseInt(hex.slice(6),16)/255;const alpha8=(existingAlpha*value*255|0).toString(16).padStart(2,'0').toUpperCase();return baseColor+alpha8;default:throw new Error('Invalid hex color format');}}"};
let value = _fun32888();
object2 = {code: 'function hexToRgbaString_ColorUtilsTsx2(hex,opacity){const{hexToRgba}=this.__closure;const{r:r,g:g,b:b,a:a}=hexToRgba(hex);return"rgba("+r+", "+g+", "+b+", "+(opacity!==null&&opacity!==void 0?opacity:a)+")";}'};
object = {code: 'function hexToRgbaString_ColorUtilsTsx2(hex,opacity){const{hexToRgba}=this.__closure;const{r:r,g:g,b:b,a:a}=hexToRgba(hex);return"rgba("+r+", "+g+", "+b+", "+(opacity!==null&&opacity!==void 0?opacity:a)+")";}'};
let value2 = _fun32890();
object2 = {};
copyDataProperties(object2, {['#1abc9c']: function() {
object = {};
copyDataProperties(object, {['#1abc9c']: function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.fBawRj);
}, ['#2ecc71']: function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t.hvv3QR);
@@ -78,17 +81,17 @@ function _fun32873(global, require, importDefault, importAll, module, exports, d
}, ['#99aab5']: function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['/po5rJ']);
}}, undefined);
object2['#5865f2'] = function() {
object['#5865f2'] = function() {
return require(dependencyMap[2]).intl.string(require(dependencyMap[2]).t['Cn/LJ4']);
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ColorUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/ColorUtils.tsx');
exports.hexWithOpacity = value;
exports.hexToRgb = closure;
exports.hexToRgb = hexToRgb2;
exports.hexToRgbArray = hexToRgbArray;
exports.hexToRgba = closure2;
exports.hexToRgba = hexToRgba2;
exports.hexToRgbaString = value2;
exports.hexOpacityToRgba = hexOpacityToRgba;
exports.rgbToHslObject = closure3;
exports.rgbToHslObject = rgbToHslObject2;
exports.hslToString = closure4;
exports.rgbToHsl = function(a0, a1, a2) {
var value2 = rgbToHslObject(a0, a1, a2);
@@ -105,9 +108,9 @@ function _fun32873(global, require, importDefault, importAll, module, exports, d
exports.hslToHex = closure5;
exports.hexToColorName = hexToColorName;
exports.mixColors = mixColors;
exports.hex2rgb2hsv = closure6;
exports.hex2rgb2hsv = hex2rgb2hsv2;
exports.getComplimentaryPaletteForColor = getComplimentaryPaletteForColor;
exports.rawRgbToHsl = closure7;
exports.rawRgbToHsl = rawRgbToHsl2;
exports.getColorLightnessAdjusted = getColorLightnessAdjusted;
exports.getAccessibleForegroundColor = getAccessibleForegroundColor;
exports.findColorByHsv = function(a0) {
@@ -116,17 +119,409 @@ function _fun32873(global, require, importDefault, importAll, module, exports, d
return value.sort(sortColors)[0].hex;
};
exports.getSaturatedColorHex = getSaturatedColorHex;
exports.interpolateColor = interpolateColor;
}
exports.interpolateColor = interpolateColor_32927;
function hexToRgb(a0) { // fn#32874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:1968, offset: 0x01020711, size: 90 bytes, params: 2, frame: 14
const value = Module00057((Module00674)(a0).rgb(), 3);
return {r: value[0], g: value[1], b: value[2]};
}
function hexToRgb(a0) { // fn#32874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:1968, offset: 0x01020711, size: 90 bytes, params: 2, frame: 14
const value = env0_3((importDefault(674) /* metro dependency 674 */)(a0).rgb(), 3);
return {r: value[0], g: value[1], b: value[2]};
}
function hexToRgba(a0) { // fn#32875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:2052, offset: 0x0102076b, size: 101 bytes, params: 2, frame: 14
const value = Module00057((Module00674)(a0).rgba(), 4);
return {r: value[0], g: value[1], b: value[2], a: value[3]};
}
function hslToHex(a0, a1, a2) { // fn#32878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:3004, offset: 0x01020923, size: 122 bytes, params: 4, frame: 18
const env0_0 = a0;
const env0_1 = a2;
const hslToHexF2 = hslToHexF;
let value = a2 / 100;
const Math = global.Math;
value = Math.min(value, 1 - value);
const env0_2 = a1 * value / 100;
return '#' + hslToHexF2(0) + hslToHexF2(8) + hslToHexF2(4);
function hslToHexF(a0) { // fn#32879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:3064, owner: hslToHex.f, offset: 0x0102099d, size: 163 bytes, params: 2, frame: 20
const value2 = (a0 + env0_0 / 30) % 12;
const binding = env0_2;
let Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
const min = Math2.min;
let value = value2 - 3;
value = Reflect.apply(min, Math2, [value, 9 - value2, 1]);
value = importDefault - binding * Reflect.apply(max, Math, [value, -1]);
Math = global.Math;
value = Math.round(255 * value);
value = value.toString(16);
return value.padStart(2, '0');
}
}
function hex2rgb2hsv(a0) { // fn#32880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:4480, offset: 0x01020a40, size: 358 bytes, params: 2, frame: 26
var r7;
var r6;
var r9;
var value7;
var value8;
var value9;
var value10;
const diffc2 = diffc;
const closure2 = function(a0) {
var Math = global.Math;
return Math.round(100 * a0) / 100;
};
let value = RegExp('^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$', 'i').exec(a0);
if (value == null) {
return null;
}
const value2 = global.parseInt(value[1], 16) / 255;
const value3 = global.parseInt(value[2], 16) / 255;
value = global.parseInt(value[3], 16) / 255;
let Math = global.Math;
const value4 = Math.max(value2, value3, value);
Math = global.Math;
const value5 = value4 - Math.min(value2, value3, value);
const value6 = 0;
if (value6 === value5) {
r6 = value6;
r9 = value6;
} else {
value7 = value5 / value4;
value8 = diffc2(value2);
value9 = diffc2(value3);
value10 = diffc2(value);
r7 = value2 === value4 ? value10 - value9 : value3 === value4 ? 0.3333333333333333 + value8 - value10 : value !== value4 ? value6 : 0.6666666666666666 + value9 - value8;
if (r7 < value6) {
value = r7 + 1;
r6 = value7;
r9 = value;
} else if (r7 > 1) {
value = r7 - 1;
r6 = value7;
r9 = value;
} else {
r6 = value7;
r9 = r7;
}
}
const object = {};
Math = global.Math;
object.h = Math.round(360 * r9);
object.s = closure2(100 * r6);
object.v = closure2(100 * value4);
return object;
function diffc(a0) { // fn#32881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:4709, owner: hex2rgb2hsv.diffc, offset: 0x01020ba6, size: 45 bytes, params: 2, frame: 3
return (env0_0 - a0) / 6 / env0_1 + 0.5;
}
}
function rawHslToRgb(a0, a1, a2) { // fn#32885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:5394, offset: 0x01020cef, size: 250 bytes, params: 4, frame: 22
var r8;
var r2;
var r3;
var r6;
var rawHslToRgbHue2rgb2;
var value6;
var value7;
let value = a2;
const value2 = a0 / 360;
if (a1 === 0) {
r2 = value;
r3 = value;
r6 = value;
} else {
rawHslToRgbHue2rgb2 = rawHslToRgbHue2rgb;
r8 = value < 0.5 ? value * (1 + a1) : value + a1 - value * a1;
value = 2 * value - r8;
value6 = rawHslToRgbHue2rgb2(value, r8, value2 + 0.3333333333333333);
value7 = rawHslToRgbHue2rgb2(value, r8, value2);
value = rawHslToRgbHue2rgb2(value, r8, value2 - 0.3333333333333333);
r2 = value7;
r3 = value6;
r6 = value;
}
value = importDefault(4001) /* metro dependency 4001: Color */;
let Math = global.Math;
const value8 = Math.round(255 * r3);
Math = global.Math;
const value9 = Math.round(255 * r2);
Math = global.Math;
const value10 = Math.round(255 * r6);
const value11 = Object.create(value.prototype, {constructor: {value: value}});
value = new value(value8, value9, value10, 1);
return value instanceof Object ? value : value11;
}
function _fun32888() { // fn#32888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:1111, offset: 0x01020ea5, size: 46 bytes, params: 1, frame: 2
const hexWithOpacity2 = hexWithOpacity;
hexWithOpacity2.__closure = {};
hexWithOpacity2.__workletHash = 1677228068105;
hexWithOpacity2.__initData = env0_4;
return hexWithOpacity2;
}
function _fun32890() { // fn#32890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:2371, offset: 0x0102115b, size: 55 bytes, params: 1, frame: 4
const closure = function(a0, a1) {
var value = a1;
var value3 = hexToRgba(a0);
return 'rgba(' + value3.r + ', ' + value3.g + ', ' + value3.b + ', ' + (value ?? value3.a) + ')';
};
closure.__closure = {hexToRgba: hexToRgba};
closure.__workletHash = 8956046161224;
closure.__initData = env0_5;
return closure;
}
function hexToRgbArray(a0) { // fn#32914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:5993, offset: 0x0102177e, size: 51 bytes, params: 2, frame: 11
const value = hexToRgb(a0);
return [value.r, value.g, value.b];
}
function hexOpacityToRgba(a0, a1) { // fn#32915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:6119, offset: 0x010217b1, size: 82 bytes, params: 3, frame: 23
const value = hexToRgb(a0);
return 'rgba(' + value.r + ', ' + value.g + ', ' + value.b + ', ' + a1 + ')';
}
function hexToColorName(a0, a1) { // fn#32919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:6672, offset: 0x01021910, size: 203 bytes, params: 3, frame: 18
var r1;
var r0;
var intl;
var value;
const property = env0_6[a0];
if (property == null) {
if (a1) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r1 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['7BFCRR'],
{color: a0});
} else {
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('ColorUtils');
value.warn('Role color ' + a0 + ' has not been localized!');
value = 'undefined';
r1 = value;
}
r0 = r1;
} else {
r0 = property();
}
return r0;
}
function mixColors(a0, {red, green, blue, alpha}) { // fn#32920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:6905, offset: 0x010219db, size: 179 bytes, params: 3, frame: 19
let alpha = a0.alpha;
let value = 1 - alpha;
value *= red;
value += alpha * a0.red;
const value4 = (1 - alpha) * green + alpha * a0.green;
const value7 = (1 - alpha) * blue + alpha * a0.blue;
alpha = a0.alpha;
const value8 = alpha + alpha * (1 - a0.alpha);
const defaultImport = Color;
const value10 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
value = new defaultImport(value, value4, value7, value8);
return value instanceof Object ? value : value10;
}
function getComplimentaryPaletteForColor(a0) { // fn#32921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:7137, offset: 0x01021a8e, size: 221 bytes, params: 2, frame: 26
var r5;
var r11;
var value6;
var value7;
var value8;
var r;
var g;
var b;
const value = a1;
const r10 = value !== undefined ? value : 3;
const items2 = [];
const {h, s, l} = rgbToHslObject(a0[0], a0[1], a0[2]);
const r4 = s < 30 ? s + 30 : s;
const r2 = l > 80 ? l - 40 : l;
const r3 = r2 < 20 ? r2 + 15 : r2;
let length = items2.length;
if (length < r10) {
r5 = h;
while (true) {
value6 = r5 - 360 / (r10 + 1);
if (value6 < 0) {
value7 = value6 + 360;
r11 = value7;
} else {
r11 = value6;
}
value8 = hslToRgb_32883(r11, r4, r3);
r = value8.r;
g = value8.g;
b = value8.b;
items2.push([r, g, b]);
length = items2.length;
if (length < r10) {
r5 = r11;
continue;
}
break;
}
}
return items2;
}
function getColorLightnessAdjusted({red, green, blue}, a1) { // fn#32922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:7451, offset: 0x01021b6b, size: 161 bytes, params: 3, frame: 18
const value = a2;
let r2 = value !== undefined ? value : false;
const value2 = rawRgbToHsl(red, green, blue);
const lightness = value2.lightness;
r2 = r2 ? lightness + a1 > 1 ? 0.9 : value2.lightness + a1 : lightness - a1 < 0 ? 0.1 : value2.lightness - a1;
value2.lightness = r2;
return rawHslToRgb(value2.hue, value2.saturation, value2.lightness);
}
function getAccessibleForegroundColor({foreground, background, ratio, saturationFactor}) { // fn#32923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:7699, offset: 0x01021c0c, size: 339 bytes, params: 2, frame: 26
var r1;
var r3;
var r32;
var r9;
var r14;
var value;
var set;
var get;
var value2;
var value6;
var value7;
var value8;
var defaultImport2;
var value9;
var value10;
var alpha;
reducibleJoin2: while (true) {
if (ratio !== undefined) {
break reducibleJoin2;
}
value = 5;
ratio = value;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (saturationFactor !== undefined) {
break reducibleJoin4;
}
value = 1;
saturationFactor = value;
break reducibleJoin4;
}
reducibleJoin6: while (true) {
if (saturationFactor < 1) {
set = foreground.set;
get = foreground.get;
value = Reflect.apply(set, foreground, ['hsl.s', Reflect.apply(get, foreground,
['hsl.s']) * saturationFactor]);
set = background.set;
get = background.get;
value2 = Reflect.apply(set, background, ['hsl.s', Reflect.apply(get, background,
['hsl.s']) * saturationFactor]);
r1 = value;
r3 = value2;
break reducibleJoin6;
}
r1 = foreground;
r3 = background;
break reducibleJoin6;
}
value = r3.luminance();
value = value <= 0.5;
const defaultImport = Module00674;
let contrast = defaultImport.contrast;
if (Reflect.apply(contrast, defaultImport, [r1, r3]) < ratio) {
r32 = r1;
r9 = 0;
reducibleLoop7: while (true) {
get = r32.get;
value6 = Reflect.apply(get, r32, ['hsl.l']);
if (value) {
reducibleJoin12: while (true) {
reducibleJoin14: while (true) {
if (value6 < 0.95) {
set = r32.set;
value8 = Reflect.apply(set, r32, ['hsl.l', value6 + 0.05]);
r14 = value8;
break reducibleJoin12;
}
r1 = r32;
break reducibleJoin14;
}
alpha = r1.alpha;
return Reflect.apply(alpha, r1, [1]);
}
} else {
reducibleJoin12: while (true) {
reducibleJoin14: while (true) {
if (value6 > 0.05) {
set = r32.set;
value7 = Reflect.apply(set, r32, ['hsl.l', value6 - 0.05]);
r14 = value7;
break reducibleJoin12;
}
r1 = r32;
break reducibleJoin14;
}
alpha = r1.alpha;
return Reflect.apply(alpha, r1, [1]);
}
}
defaultImport2 = defaultImport;
contrast = defaultImport2.contrast;
value9 = Reflect.apply(contrast, defaultImport2, [r14, r3]);
value10 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
if (value10 < 10) {
if (value9 < ratio) {
r32 = r14;
r9 = value10;
continue reducibleLoop7;
}
r1 = r14;
break reducibleLoop7;
}
r1 = r14;
break reducibleLoop7;
}
}
return r1.alpha(1);
}
function findColorByHsv(a0) { // fn#32924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:8121, offset: 0x01021d5f, size: 66 bytes, params: 2, frame: 13
let value = a0.slice(0, 3);
value = value.map(_fun32925);
return value.sort(sortColors)[0].hex;
function _fun32925(a0) { // fn#32925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:8173, offset: 0x01021da1, size: 51 bytes, params: 2, frame: 12
const value = environment.__proto__;
return {hex: a0, hsv: hex2rgb2hsv(a0) ?? ({'h': 0, 's': 0, 'v': 0})};
}
}
function getSaturatedColorHex({colorRGB, saturationFactor}) { // fn#32926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:8293, offset: 0x01021dd4, size: 179 bytes, params: 2, frame: 20
var r1;
var value8;
const value = undefined;
saturationFactor = saturationFactor === value ? 1 : saturationFactor;
if (colorRGB == null) {
return colorRGB;
}
const rawRgbToHslBinding = rawRgbToHsl;
let get = colorRGB.get;
const value4 = Reflect.apply(get, colorRGB, ['rgb.r']);
const value5 = colorRGB.get('rgb.g');
get = colorRGB.get;
const value6 = rawRgbToHslBinding(value4, value5, Reflect.apply(get, colorRGB, ['rgb.b']));
if (value6 == null) {
r1 = colorRGB == null ? value : colorRGB.hex();
} else {
value8 = rawHslToRgb(value6.hue, value6.saturation * saturationFactor, value6.lightness);
r1 = value8 == null ? value : value8.toHexString();
}
return r1;
}
function hexToRgba(a0) { // fn#32875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:2052, offset: 0x0102076b, size: 101 bytes, params: 2, frame: 14
const value = env0_3((importDefault(674) /* metro dependency 674 */)(a0).rgba(), 4);
return {r: value[0], g: value[1], b: value[2], a: value[3]};
}
function rgbToHslObject(a0, a1, a2) { // fn#32876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:2654, offset: 0x010207d0, size: 287 bytes, params: 4, frame: 22
@@ -151,78 +546,12 @@ function rgbToHslObject(a0, a1, a2) { // fn#32876, source: /ci/build/discord/dis
r7 = value;
}
value = (value5 + value4) / 2;
const object2 = {h: r7};
const object = {h: r7};
const value10 = 100 * (value8 ? value7 : value6 / (1 - global.Math.abs(2 * value - 1)));
object2.s = Number(value10.toFixed(1));
object.s = Number(value10.toFixed(1));
value = 100 * value;
object2.l = Number(value.toFixed(1));
return object2;
}
function hslToHex(a0, a1, a2) { // fn#32878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:3004, offset: 0x01020923, size: 122 bytes, params: 4, frame: 18
const env0_0 = a0;
const env0_1 = a2;
const closure = hslToHexF;
let value = a2 / 100;
const Math = global.Math;
value = Math.min(value, 1 - value);
const env0_2 = a1 * value / 100;
return '#' + closure(0) + closure(8) + closure(4);
}
function hex2rgb2hsv(a0) { // fn#32880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:4480, offset: 0x01020a40, size: 358 bytes, params: 2, frame: 26
var r7;
var r6;
var r9;
var value7;
var value8;
var value9;
var value10;
const closure = hex2rgb2hsvDiffc;
const closure2 = function(a0) {
var Math = global.Math;
return Math.round(100 * a0) / 100;
};
let value = RegExp('^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$', 'i').exec(a0);
if (value == null) {
return null;
}
const value2 = global.parseInt(value[1], 16) / 255;
const value3 = global.parseInt(value[2], 16) / 255;
value = global.parseInt(value[3], 16) / 255;
let Math = global.Math;
const value4 = Math.max(value2, value3, value);
Math = global.Math;
const value5 = value4 - Math.min(value2, value3, value);
const value6 = 0;
if (value6 === value5) {
r6 = value6;
r9 = value6;
} else {
value7 = value5 / value4;
value8 = closure(value2);
value9 = closure(value3);
value10 = closure(value);
r7 = value2 === value4 ? value10 - value9 : value3 === value4 ? 0.3333333333333333 + value8 - value10 : value !== value4 ? value6 : 0.6666666666666666 + value9 - value8;
if (r7 < value6) {
value = r7 + 1;
r6 = value7;
r9 = value;
} else if (r7 > 1) {
value = r7 - 1;
r6 = value7;
r9 = value;
} else {
r6 = value7;
r9 = r7;
}
}
const object2 = {};
Math = global.Math;
object2.h = Math.round(360 * r9);
object2.s = closure2(100 * r6);
object2.v = closure2(100 * value4);
return object2;
object.l = Number(value.toFixed(1));
return object;
}
function rawRgbToHsl(a0, a1, a2) { // fn#32884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:5081, offset: 0x01020bf7, size: 248 bytes, params: 4, frame: 23
@@ -271,359 +600,6 @@ function rawRgbToHsl(a0, a1, a2) { // fn#32884, source: /ci/build/discord/discor
return {hue: 360 * r4, saturation: r2, lightness: value6, alpha: 1};
}
function rawHslToRgb(a0, a1, a2) { // fn#32885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:5394, offset: 0x01020cef, size: 250 bytes, params: 4, frame: 22
var r8;
var r2;
var r3;
var r6;
var closure;
var value6;
var value7;
let value = a2;
const value2 = a0 / 360;
if (a1 === 0) {
r2 = value;
r3 = value;
r6 = value;
} else {
closure = rawHslToRgbHue2rgb;
r8 = value < 0.5 ? value * (1 + a1) : value + a1 - value * a1;
value = 2 * value - r8;
value6 = closure(value, r8, value2 + 0.3333333333333333);
value7 = closure(value, r8, value2);
value = closure(value, r8, value2 - 0.3333333333333333);
r2 = value7;
r3 = value6;
r6 = value;
}
value = importDefault(4001) /* metro dependency 4001: Color */;
let Math = global.Math;
const value8 = Math.round(255 * r3);
Math = global.Math;
const value9 = Math.round(255 * r2);
Math = global.Math;
const value10 = Math.round(255 * r6);
const value11 = Object.create(value.prototype, {constructor: {value: value}});
value = new value(value8, value9, value10, 1);
return value instanceof Object ? value : value11;
}
function _fun32888() { // fn#32888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:1111, offset: 0x01020ea5, size: 46 bytes, params: 1, frame: 2
const closure = hexWithOpacity;
closure.__closure = {};
closure.__workletHash = 1677228068105;
closure.__initData = env0_4;
return closure;
}
function _fun32890() { // fn#32890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:2371, offset: 0x0102115b, size: 55 bytes, params: 1, frame: 4
const closure = function(a0, a1) {
var value = a1;
var value3 = hexToRgba(a0);
return 'rgba(' + value3.r + ', ' + value3.g + ', ' + value3.b + ', ' + (value ?? value3.a) + ')';
};
closure.__closure = {hexToRgba: hexToRgba};
closure.__workletHash = 8956046161224;
closure.__initData = env0_5;
return closure;
}
function hexToRgbArray(a0) { // fn#32914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:5993, offset: 0x0102177e, size: 51 bytes, params: 2, frame: 11
const value = hexToRgb(a0);
return [value.r, value.g, value.b];
}
function hexOpacityToRgba(a0, a1) { // fn#32915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:6119, offset: 0x010217b1, size: 82 bytes, params: 3, frame: 23
const value = hexToRgb(a0);
return 'rgba(' + value.r + ', ' + value.g + ', ' + value.b + ', ' + a1 + ')';
}
function rgbaToHex(a0, a1, a2, a3) { // fn#32918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:6476, offset: 0x01021882, size: 142 bytes, params: 5, frame: 14
let value = 256 + a0;
value = value.toString(16);
value = value.slice(1);
value = '#' + value;
const value3 = (256 + a1).toString(16);
value += value3.slice(1);
const value5 = (256 + a2).toString(16);
value += value5.slice(1);
const value7 = (256 + a3).toString(16);
return value + value7.slice(1);
}
function hexToColorName(a0, a1) { // fn#32919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:6672, offset: 0x01021910, size: 203 bytes, params: 3, frame: 18
var r1;
var r0;
var intl;
var value;
const property = env0_6[a0];
if (property == null) {
if (a1) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r1 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['7BFCRR'],
{color: a0});
} else {
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('ColorUtils');
value.warn('Role color ' + a0 + ' has not been localized!');
value = 'undefined';
r1 = value;
}
r0 = r1;
} else {
r0 = property();
}
return r0;
}
function mixColors(a0, {red, green, blue, alpha}) { // fn#32920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:6905, offset: 0x010219db, size: 179 bytes, params: 3, frame: 19
let alpha = a0.alpha;
let value = 1 - alpha;
value *= red;
value += alpha * a0.red;
const value4 = (1 - alpha) * green + alpha * a0.green;
const value7 = (1 - alpha) * blue + alpha * a0.blue;
alpha = a0.alpha;
const value8 = alpha + alpha * (1 - a0.alpha);
const defaultImport = importDefault(4001) /* metro dependency 4001: Color */;
const value10 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
value = new defaultImport(value, value4, value7, value8);
return value instanceof Object ? value : value10;
}
function getComplimentaryPaletteForColor(a0) { // fn#32921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:7137, offset: 0x01021a8e, size: 221 bytes, params: 2, frame: 26
var r5;
var r11;
var value6;
var value7;
var value8;
var r;
var g;
var b;
const value = a1;
const r10 = value !== undefined ? value : 3;
const items2 = [];
const {h, s, l} = rgbToHslObject(a0[0], a0[1], a0[2]);
const r4 = s < 30 ? s + 30 : s;
const r2 = l > 80 ? l - 40 : l;
const r3 = r2 < 20 ? r2 + 15 : r2;
let length = items2.length;
if (length < r10) {
r5 = h;
while (true) {
value6 = r5 - 360 / (r10 + 1);
if (value6 < 0) {
value7 = value6 + 360;
r11 = value7;
} else {
r11 = value6;
}
value8 = hslToRgb_32883(r11, r4, r3);
r = value8.r;
g = value8.g;
b = value8.b;
items2.push([r, g, b]);
length = items2.length;
if (length < r10) {
r5 = r11;
continue;
}
break;
}
}
return items2;
}
function getColorLightnessAdjusted({red, green, blue}, a1) { // fn#32922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:7451, offset: 0x01021b6b, size: 161 bytes, params: 3, frame: 18
const value = a2;
let r2 = value !== undefined ? value : false;
const value2 = rawRgbToHsl(red, green, blue);
const lightness = value2.lightness;
r2 = r2 ? lightness + a1 > 1 ? 0.9 : value2.lightness + a1 : lightness - a1 < 0 ? 0.1 : value2.lightness - a1;
value2.lightness = r2;
return rawHslToRgb(value2.hue, value2.saturation, value2.lightness);
}
function getAccessibleForegroundColor({foreground, background, ratio, saturationFactor}) { // fn#32923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:7699, offset: 0x01021c0c, size: 339 bytes, params: 2, frame: 26
var r1;
var r3;
var r32;
var r9;
var r14;
var value;
var set;
var get;
var value2;
var value6;
var value7;
var value8;
var defaultImport2;
var value9;
var value10;
var alpha;
reducibleJoin2: while (true) {
if (ratio !== undefined) {
break reducibleJoin2;
}
value = 5;
ratio = value;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (saturationFactor !== undefined) {
break reducibleJoin4;
}
value = 1;
saturationFactor = value;
break reducibleJoin4;
}
reducibleJoin6: while (true) {
if (saturationFactor < 1) {
set = foreground.set;
get = foreground.get;
value = Reflect.apply(set, foreground, ['hsl.s', Reflect.apply(get, foreground,
['hsl.s']) * saturationFactor]);
set = background.set;
get = background.get;
value2 = Reflect.apply(set, background, ['hsl.s', Reflect.apply(get, background,
['hsl.s']) * saturationFactor]);
r1 = value;
r3 = value2;
break reducibleJoin6;
}
r1 = foreground;
r3 = background;
break reducibleJoin6;
}
value = r3.luminance();
value = value <= 0.5;
const defaultImport = importDefault(674) /* metro dependency 674 */;
let contrast = defaultImport.contrast;
if (Reflect.apply(contrast, defaultImport, [r1, r3]) < ratio) {
r32 = r1;
r9 = 0;
reducibleLoop7: while (true) {
get = r32.get;
value6 = Reflect.apply(get, r32, ['hsl.l']);
if (value) {
reducibleJoin12: while (true) {
reducibleJoin14: while (true) {
if (value6 < 0.95) {
set = r32.set;
value8 = Reflect.apply(set, r32, ['hsl.l', value6 + 0.05]);
r14 = value8;
break reducibleJoin12;
}
r1 = r32;
break reducibleJoin14;
}
alpha = r1.alpha;
return Reflect.apply(alpha, r1, [1]);
}
} else {
reducibleJoin12: while (true) {
reducibleJoin14: while (true) {
if (value6 > 0.05) {
set = r32.set;
value7 = Reflect.apply(set, r32, ['hsl.l', value6 - 0.05]);
r14 = value7;
break reducibleJoin12;
}
r1 = r32;
break reducibleJoin14;
}
alpha = r1.alpha;
return Reflect.apply(alpha, r1, [1]);
}
}
defaultImport2 = defaultImport;
contrast = defaultImport2.contrast;
value9 = Reflect.apply(contrast, defaultImport2, [r14, r3]);
value10 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
if (value10 < 10) {
if (value9 < ratio) {
r32 = r14;
r9 = value10;
continue reducibleLoop7;
}
r1 = r14;
break reducibleLoop7;
}
r1 = r14;
break reducibleLoop7;
}
}
return r1.alpha(1);
}
function findColorByHsv(a0) { // fn#32924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:8121, offset: 0x01021d5f, size: 66 bytes, params: 2, frame: 13
let value = a0.slice(0, 3);
value = value.map(_fun32925);
return value.sort(sortColors)[0].hex;
}
function getSaturatedColorHex({colorRGB, saturationFactor}) { // fn#32926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:8293, offset: 0x01021dd4, size: 179 bytes, params: 2, frame: 20
var r1;
var value8;
const value = undefined;
saturationFactor = saturationFactor === value ? 1 : saturationFactor;
if (colorRGB == null) {
return colorRGB;
}
const rawRgbToHslBinding = rawRgbToHsl;
let get = colorRGB.get;
const value4 = Reflect.apply(get, colorRGB, ['rgb.r']);
const value5 = colorRGB.get('rgb.g');
get = colorRGB.get;
const value6 = rawRgbToHslBinding(value4, value5, Reflect.apply(get, colorRGB, ['rgb.b']));
if (value6 == null) {
r1 = colorRGB == null ? value : colorRGB.hex();
} else {
value8 = rawHslToRgb(value6.hue, value6.saturation * saturationFactor, value6.lightness);
r1 = value8 == null ? value : value8.toHexString();
}
return r1;
}
function interpolateColor(a0, a1, a2) { // fn#32927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:8581, offset: 0x01021e87, size: 355 bytes, params: 4, frame: 24
const parseInt = global.parseInt;
let value = a0.substring(1, 3);
value = parseInt(value, 16);
const int = global.parseInt(a0.substring(3, 5), 16);
const int2 = global.parseInt(a0.substring(5, 7), 16);
const int3 = global.parseInt(a1.substring(1, 3), 16);
const int4 = global.parseInt(a1.substring(3, 5), 16);
const int5 = global.parseInt(a1.substring(5, 7), 16);
let Math = global.Math;
value = Math.round(value + (int3 - value) * a2);
value = value.toString(16);
value = value.padStart(2, '0');
Math = global.Math;
const value4 = Math.round(int + (int4 - int) * a2).toString(16).padStart(2, '0');
Math = global.Math;
return '#' + value + value4 + Math.round(int2 + (int5 - int2) * a2).toString(16).padStart(2, '0');
}
function hslToHexF(a0) { // fn#32879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:3064, owner: hslToHex.f, offset: 0x0102099d, size: 163 bytes, params: 2, frame: 20
const value2 = (a0 + env0_0 / 30) % 12;
const binding = env0_2;
let Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
const min = Math2.min;
let value = value2 - 3;
value = Reflect.apply(min, Math2, [value, 9 - value2, 1]);
value = importDefault - binding * Reflect.apply(max, Math, [value, -1]);
Math = global.Math;
value = Math.round(255 * value);
value = value.toString(16);
return value.padStart(2, '0');
}
function hex2rgb2hsvDiffc(a0) { // fn#32881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:4709, owner: hex2rgb2hsv.diffc, offset: 0x01020ba6, size: 45 bytes, params: 2, frame: 3
return (env0_0 - a0) / 6 / env0_1 + 0.5;
}
function rawHslToRgbHue2rgb(a0, a1, a2) { // fn#32886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:5473, owner: rawHslToRgb.hue2rgb, offset: 0x01020de9, size: 136 bytes, params: 4, frame: 7
var r0;
let value = a0;
@@ -704,8 +680,37 @@ function hexWithOpacity(a0, a1) { // fn#32889, source: /ci/build/discord/discord
throw new Error('Invalid hex color format');
}
function _fun32925(a0) { // fn#32925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:8173, offset: 0x01021da1, size: 51 bytes, params: 2, frame: 12
const value = environment.__proto__;
return {hex: a0, hsv: hex2rgb2hsv(a0) ?? ({'h': 0, 's': 0, 'v': 0})};
function rgbaToHex(a0, a1, a2, a3) { // fn#32918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:6476, offset: 0x01021882, size: 142 bytes, params: 5, frame: 14
let value = 256 + a0;
value = value.toString(16);
value = value.slice(1);
value = '#' + value;
const value3 = (256 + a1).toString(16);
value += value3.slice(1);
const value5 = (256 + a2).toString(16);
value += value5.slice(1);
const value7 = (256 + a3).toString(16);
return value + value7.slice(1);
}
function interpolateColor_32927(a0, a1, a2) { // fn#32927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4158:8581, offset: 0x01021e87, size: 355 bytes, params: 4, frame: 24
const parseInt = global.parseInt;
let value = a0.substring(1, 3);
value = parseInt(value, 16);
const int = global.parseInt(a0.substring(3, 5), 16);
const int2 = global.parseInt(a0.substring(5, 7), 16);
const int3 = global.parseInt(a1.substring(1, 3), 16);
const int4 = global.parseInt(a1.substring(3, 5), 16);
const int5 = global.parseInt(a1.substring(5, 7), 16);
let Math = global.Math;
value = Math.round(value + (int3 - value) * a2);
value = value.toString(16);
value = value.padStart(2, '0');
Math = global.Math;
const value4 = Math.round(int + (int4 - int) * a2).toString(16).padStart(2, '0');
Math = global.Math;
return '#' + value + value4 + Math.round(int2 + (int5 - int2) * a2).toString(16).padStart(2, '0');
}
global.__d(_fun32873, 4000, [57, 674, 1244, 3, 4001,
2]) /* metro module 4000, dependencies: [57, 674, 1244, 3, 4001, 2] */;
+30 -21
View File
@@ -1,32 +1,41 @@
/* Metro module 1239; source: utils/ComponentDispatchUtils.tsx; dependencies: [661, 1240, 3, 1241, 2] */
import Logger from '../modules/debug/Logger.tsx'; /* Metro dependency 3 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as ComponentDispatchUtilsModule from '../external/discord_common/js/shared/utils/ComponentDispatchUtils.tsx'; /* Metro dependency 1241 */
function _fun13906(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1366:6, offset: 0x00df7a3e, size: 260 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).ComponentActionsKeyed;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('ComponentDispatchUtils');
const ComponentDispatcher = (require(1241) /* metro dependency 1241: ComponentDispatchUtils */).ComponentDispatcher;
const ComponentDispatcher = (ComponentDispatchUtilsModule).ComponentDispatcher;
const componentDispatcher = new ComponentDispatcher({'maxListeners': 100, 'enableDevtools': false,
logger: {warn: warn_13907}, devtoolsReporter: devtoolsReporter});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ComponentDispatchUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/ComponentDispatchUtils.tsx');
exports.ComponentDispatcher = ComponentDispatcher;
exports.ComponentDispatch = componentDispatcher;
function warn_13907(a0, a1) { // fn#13907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1366:257, offset: 0x00df7b42, size: 58 bytes, params: 3, frame: 16
const value = copyRestArgs(1, undefined);
const binding = env0_3;
const warn = binding.warn;
const items2 = [a0];
arraySpread(items2, value, 1, a0);
return apply(warn, items2, binding, a0);
}
function devtoolsReporter(a0, a1, a2) { // fn#13908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1366:300, offset: 0x00df7b7c, size: 140 bytes, params: 4, frame: 15
const value = a0;
const Object = global.Object;
(importAll(1240) /* metro dependency 1240: DevtoolsExtension */).reportEvent({type: 'ComponentDispatch',
description: Object.values(ComponentActionsKeyed).find(_fun13909) ?? value, data: {actionData: a1,
fullActionName: value}, durationMs: a2});
function _fun13909(a0) { // fn#13909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1366:376, offset: 0x00df5119, size: 23 bytes, params: 2, frame: 11
return env0_0.startsWith(a0);
}
}
}
function warn_13907(a0, a1) { // fn#13907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1366:257, offset: 0x00df7b42, size: 58 bytes, params: 3, frame: 16
const value = copyRestArgs(1, undefined);
const binding = env0_3;
const warn = binding.warn;
const items2 = [a0];
arraySpread(items2, value, 1, a0);
return apply(warn, items2, binding, a0);
}
function devtoolsReporter(a0, a1, a2) { // fn#13908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1366:300, offset: 0x00df7b7c, size: 140 bytes, params: 4, frame: 15
const value = a0;
const Object = global.Object;
(importAll(1240) /* metro dependency 1240: DevtoolsExtension */).reportEvent({type: 'ComponentDispatch',
description: Object.values(ComponentActionsKeyed).find(_fun13909) ?? value, data: {actionData: a1,
fullActionName: value}, durationMs: a2});
}
global.__d(_fun13906, 1239, [661, 1240, 3, 1241, 2]) /* metro module 1239, dependencies: [661, 1240, 3, 1241, 2] */;
+32 -29
View File
@@ -1,40 +1,43 @@
/* Metro module 7045; source: utils/ContextUtils.tsx; dependencies: [31, 33, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun55945(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7223:6, offset: 0x013b8f8e, size: 125 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importAll(31) /* metro dependency 31 */;
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ContextUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/ContextUtils.tsx');
exports.default = createDefinedContext;
}
function createDefinedContext() { // fn#55946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7223:186, offset: 0x013b900b, size: 58 bytes, params: 1, frame: 13
return [ReactModule.createContext(undefined), createDefinedContextUseContext, function() {
var env0_0 = createDefinedContextUseContext();
return _fun55949;
}];
function createDefinedContextUseContext() { // fn#55947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7223:248, owner: createDefinedContext.useContext, offset: 0x013b9045, size: 69 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = env1_0.useContext(ReactModule);
if (value == null) {
throw new global.Error('Context was used outside of defined provider.');
}
return value;
}
function createDefinedContext() { // fn#55946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7223:186, offset: 0x013b900b, size: 58 bytes, params: 1, frame: 13
return [env0_0.createContext(undefined), createDefinedContextUseContext, function() {
var env0_0 = createDefinedContextUseContext();
return _fun55949;
}];
}
function _fun55948() { // fn#55948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7223:397, offset: 0x013b908a, size: 26 bytes, params: 1, frame: 10
const env0_0 = createDefinedContextUseContext();
return _fun55949;
function _fun55949({children}) { // fn#55949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7223:434, offset: 0x013b90a4, size: 55 bytes, params: 2, frame: 14
const Provider = env1_0.Provider;
return (
<Provider value={env0_0}>
{children}
</Provider>
);
}
}
function createDefinedContextUseContext() { // fn#55947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7223:248, owner: createDefinedContext.useContext, offset: 0x013b9045, size: 69 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = env1_0.useContext(env0_0);
if (value == null) {
throw new global.Error('Context was used outside of defined provider.');
}
return value;
}
function _fun55948() { // fn#55948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7223:397, offset: 0x013b908a, size: 26 bytes, params: 1, frame: 10
const env0_0 = createDefinedContextUseContext();
return _fun55949;
}
function _fun55949({children}) { // fn#55949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7223:434, offset: 0x013b90a4, size: 55 bytes, params: 2, frame: 14
const Provider = env1_0.Provider;
return (
<Provider value={env0_0}>
{children}
</Provider>
);
}
global.__d(_fun55945, 7045, [31, 33, 2]) /* metro module 7045, dependencies: [31, 33, 2] */;
+25 -17
View File
@@ -1,14 +1,14 @@
/* Metro module 16132; source: utils/CreateInstantInviteUtils.tsx; dependencies: [1935, 3784, 661, 2] */
import GuildChannelStore from '../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import PermissionStore from '../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as GuildChannelStoreModule from '../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
function _fun124571(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16340:6, offset: 0x025bd848, size: 173 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildChannelStoreModule = require(1935) /* metro dependency 1935: GuildChannelStore */;
const env0_0 = guildChannelStoreModule.GUILD_SELECTABLE_CHANNELS_KEY;
const env0_1 = guildChannelStoreModule.GUILD_VOCAL_CHANNELS_KEY;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/CreateInstantInviteUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/CreateInstantInviteUtils.tsx');
exports.getInvitableChannelForGuild = function(a0) {
var r4;
var value2 = GuildChannelStore.getChannels(a0);
@@ -17,15 +17,23 @@ function _fun124571(global, require, importDefault, importAll, module, exports,
arraySpread(items, value2[GUILD_VOCAL_CHANNELS_KEY], arraySpread(items, property, 0, r4), r4);
return items.find(_fun124573);
};
function getInvitableChannelForGuild(a0) { // fn#124572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16340:309, offset: 0x025bd8f5, size: 79 bytes, params: 2, frame: 15
const channels = GuildChannelStore.getChannels(a0);
const property = channels[GUILD_SELECTABLE_CHANNELS_KEY];
const items2 = [];
arraySpread(items2, channels[GUILD_VOCAL_CHANNELS_KEY], arraySpread(items2, property, 0, undefined), undefined);
return items2.find(function({channel}) {
return PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, channel);
});
function _fun124573({channel}) { // fn#124573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16340:402, offset: 0x025bd944, size: 39 bytes, params: 2, frame: 13
const permissionStoreBinding = PermissionStore;
const can = permissionStoreBinding.can;
const CREATE_INSTANT_INVITE = Permissions.CREATE_INSTANT_INVITE;
return Reflect.apply(can, permissionStoreBinding, [CREATE_INSTANT_INVITE, channel]);
}
}
}
function getInvitableChannelForGuild(a0) { // fn#124572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16340:309, offset: 0x025bd8f5, size: 79 bytes, params: 2, frame: 15
const channels = GuildChannelStore.getChannels(a0);
const property = channels[GUILD_SELECTABLE_CHANNELS_KEY];
const items2 = [];
arraySpread(items2, channels[GUILD_VOCAL_CHANNELS_KEY], arraySpread(items2, property, 0, undefined), undefined);
return items2.find(function({channel}) {
return PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, channel);
});
}
global.__d(_fun124571, 16132, [1935, 3784, 661, 2]) /* metro module 16132, dependencies: [1935, 3784, 661, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 4488; source: utils/CrossPlatformNativeUtils.native.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun38244(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4666:6, offset: 0x010bae1f, size: 202 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/CrossPlatformNativeUtils.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/CrossPlatformNativeUtils.native.tsx');
exports.default = {clearNavigationHistory: function() {
}, flushDNSCache: function() {
}, flushCookies: function() {
@@ -26,3 +28,4 @@ function _fun38244(global, require, importDefault, importAll, module, exports, d
}};
}
global.__d(_fun38244, 4488, [2]) /* metro module 4488, dependencies: [2] */;
+311 -300
View File
@@ -1,13 +1,22 @@
/* Metro module 3826; source: utils/DateUtils.tsx; dependencies: [1949, 3, 3827, 3829, 1314, 3843, 1244, 694, 3845, 3738, 2] */
import Logger from '../modules/debug/Logger.tsx'; /* Metro dependency 3 */
import Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */
import LocaleStore from '../modules/user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import Module03738 from '../by-id/module-03738.js'; /* Metro dependency 3738 */
import OnTimezoneChangeAndroid from '../modules/date/onTimezoneChange.android.tsx'; /* Metro dependency 3827 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UserSettingsModule from '../modules/user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
function _fun31072(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#31072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:6, offset: 0x00ff2798, size: 577 bytes, params: 8, frame: 27
const env0_0 = require;
const closure = function() {
var Object = global.Object;
};
const closure2 = syncHourCycleToIntlConfig;
const closure3 = differenceInCalendarDays_31076;
const closure4 = dateFormat;
const closure5 = dateStringToMoment;
const syncHourCycleToIntlConfig2 = syncHourCycleToIntlConfig;
const differenceInCalendarDays_310762 = differenceInCalendarDays_31076;
const dateFormat2 = dateFormat;
const dateStringToMoment2 = dateStringToMoment;
const toMoment = function(a0) {
var r0;
var value = a0;
@@ -41,17 +50,17 @@ function _fun31072(global, require, importDefault, importAll, module, exports, d
};
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const value4 = new (importDefault(3) /* metro dependency 3: Logger */)('DateUtils');
const value4 = new (Logger)('DateUtils');
Object = global.Object;
localeStore.addChangeListener(closure);
(importDefault(3827) /* metro dependency 3827: onTimezoneChangeAndroid */)(closure);
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('USER_SETTINGS_PROTO_UPDATE', closure2);
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('CONNECTION_OPEN', closure2);
LocaleStore.addChangeListener(closure);
(OnTimezoneChangeAndroid)(closure);
(Dispatcher).subscribe('USER_SETTINGS_PROTO_UPDATE',
syncHourCycleToIntlConfig2);
(Dispatcher).subscribe('CONNECTION_OPEN', syncHourCycleToIntlConfig2);
object = [{'key': 'days', 'millisecondsInUnit': 86400000}, {'key': 'hours', 'millisecondsInUnit': 3600000},
{'key': 'minutes', 'millisecondsInUnit': 60000}, {'key': 'seconds', 'millisecondsInUnit': 1000}];
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/DateUtils.tsx');
exports.differenceInCalendarDays = closure3;
(FileImportTrackerModule).fileFinishedImporting('utils/DateUtils.tsx');
exports.differenceInCalendarDays = differenceInCalendarDays_310762;
exports.differenceInDays = differenceInDays_31082;
exports.isSameHourMoment = function(a0, a1) {
var r0;
@@ -75,10 +84,10 @@ function _fun31072(global, require, importDefault, importAll, module, exports, d
value = Math.abs(value - a1.valueOf());
return value < a2;
};
exports.dateFormat = closure4;
exports.calendarFormat = calendarFormat;
exports.dateFormat = dateFormat2;
exports.calendarFormat = calendarFormat_31086;
exports.calendarFormatCompact = calendarFormatCompact;
exports.dateStringToMoment = closure5;
exports.dateStringToMoment = dateStringToMoment2;
exports.accessibilityLabelCalendarFormat = accessibilityLabelCalendarFormat;
exports.diffAsUnits = diffAsUnits;
exports.unitsAsStrings = unitsAsStrings;
@@ -86,324 +95,326 @@ function _fun31072(global, require, importDefault, importAll, module, exports, d
exports.getMonthlyProgressPercentage = getMonthlyProgressPercentage;
exports.getDaysRemainingInMonth = getDaysRemainingInMonth;
exports.formatDateForDatetimeLocal = formatDateForDatetimeLocal;
}
function syncHourCycleToIntlConfig() { // fn#31074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:212, offset: 0x00ff29f8, size: 317 bytes, params: 1, frame: 22
var r8;
var r6;
var r12;
var moduleValue;
var supportsSystemDateFormatter;
var value4;
var property;
var value7;
var value8;
var H12;
var H23;
var value9;
let TimestampHourCycle = (require(3829) /* metro dependency 3829: UserSettings */).TimestampHourCycle;
const setting = TimestampHourCycle.getSetting();
TimestampHourCycle = (require(1314) /* metro dependency 1314: preloaded_user_settings */).TimestampHourCycle;
const AUTO = TimestampHourCycle.AUTO;
const value3 = setting !== AUTO;
reducibleJoin2: while (true) {
if (value3) {
moduleValue = require(3843) /* metro dependency 3843: SystemDateFormatterNative */;
supportsSystemDateFormatter = moduleValue.supportsSystemDateFormatter;
value4 = Reflect.apply(supportsSystemDateFormatter, moduleValue, []);
r8 = value4;
function syncHourCycleToIntlConfig() { // fn#31074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:212, offset: 0x00ff29f8, size: 317 bytes, params: 1, frame: 22
var r8;
var r6;
var r12;
var moduleValue;
var supportsSystemDateFormatter;
var value4;
var property;
var value7;
var value8;
var H12;
var H23;
var value9;
let TimestampHourCycle = (UserSettingsModule).TimestampHourCycle;
const setting = TimestampHourCycle.getSetting();
TimestampHourCycle = (require(1314) /* metro dependency 1314: preloaded_user_settings */).TimestampHourCycle;
const AUTO = TimestampHourCycle.AUTO;
const value3 = setting !== AUTO;
reducibleJoin2: while (true) {
if (value3) {
moduleValue = require(3843) /* metro dependency 3843: SystemDateFormatterNative */;
supportsSystemDateFormatter = moduleValue.supportsSystemDateFormatter;
value4 = Reflect.apply(supportsSystemDateFormatter, moduleValue, []);
r8 = value4;
break reducibleJoin2;
}
r8 = value3;
break reducibleJoin2;
}
r8 = value3;
break reducibleJoin2;
}
const Object = global.Object;
const value5 = Object.values((require(1244) /* metro dependency 1244: indexNative */).intl.formatConfig.time);
let length = value5.length;
const value6 = 0;
if (value6 < length) {
r6 = value6;
reducibleLoop3: while (true) {
property = value5[r6];
value7 = property != null;
reducibleJoin5: while (true) {
if (value7) {
value8 = 'hour' in property;
r12 = value8;
const Object = global.Object;
const value5 = Object.values((IndexNativeModule).intl.formatConfig.time);
let length = value5.length;
const value6 = 0;
if (value6 < length) {
r6 = value6;
reducibleLoop3: while (true) {
property = value5[r6];
value7 = property != null;
reducibleJoin5: while (true) {
if (value7) {
value8 = 'hour' in property;
r12 = value8;
break reducibleJoin5;
}
r12 = value7;
break reducibleJoin5;
}
r12 = value7;
break reducibleJoin5;
}
reducibleJoin13: while (true) {
if (r12) {
if (r8) {
TimestampHourCycle = (require(1314) /* metro dependency 1314: preloaded_user_settings */).TimestampHourCycle;
H12 = TimestampHourCycle.H12;
if (setting === H12) {
property.hourCycle = 'h12';
break reducibleJoin13;
reducibleJoin13: while (true) {
if (r12) {
if (r8) {
TimestampHourCycle = (require(1314) /* metro dependency 1314: preloaded_user_settings */).TimestampHourCycle;
H12 = TimestampHourCycle.H12;
if (setting === H12) {
property.hourCycle = 'h12';
break reducibleJoin13;
}
}
}
if (r8) {
TimestampHourCycle = (require(1314) /* metro dependency 1314: preloaded_user_settings */).TimestampHourCycle;
H23 = TimestampHourCycle.H23;
if (setting === H23) {
property.hourCycle = 'h23';
break reducibleJoin13;
if (r8) {
TimestampHourCycle = (require(1314) /* metro dependency 1314: preloaded_user_settings */).TimestampHourCycle;
H23 = TimestampHourCycle.H23;
if (setting === H23) {
property.hourCycle = 'h23';
break reducibleJoin13;
}
}
delete property.hourCycle;
break reducibleJoin13;
}
delete property.hourCycle;
break reducibleJoin13;
}
break reducibleJoin13;
value9 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
length = value5.length;
if (value9 < length) {
r6 = value9;
continue reducibleLoop3;
}
break reducibleLoop3;
}
value9 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
length = value5.length;
if (value9 < length) {
r6 = value9;
continue reducibleLoop3;
}
break reducibleLoop3;
}
}
}
function startOfDay_31075(a0) { // fn#31075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:616, offset: 0x00ff2b35, size: 224 bytes, params: 2, frame: 15
var r4;
var binding;
var date;
const value = a0;
const value2 = a1;
const r1 = !(value2 !== undefined) || value2;
const value4 = typeof value;
let r2 = value4 === 'string' || value4 === 'number';
r2 = !r2 ? value instanceof global.Date : r2;
if (r2) {
r4 = value;
} else {
binding = env0_3;
binding.error('Invalid date given to startOfDay', {d: value});
r4 = new global.Date();
}
const Date = global.Date;
const time = new Date().getTime();
if (r1) {
r4 = time;
} else {
date = date.getTimezoneOffset();
date = time - 60000 * date;
r4 = date;
}
const Math = global.Math;
return Math.floor(r4 / env0_4) * env0_4;
}
function differenceInCalendarDays_31076(a0, a1) { // fn#31076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:865, offset: 0x00ff2c15, size: 62 bytes, params: 3, frame: 17
const Math = global.Math;
const floor = Math.floor;
const startOfDay_31075Binding = startOfDay_31075;
return Reflect.apply(floor, Math, [(startOfDay_31075Binding(a0, false) - startOfDay_31075Binding(a1,
false)) / env0_4]);
}
function dateFormat(a0, a1, a2) { // fn#31077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:961, offset: 0x00ff2c53, size: 179 bytes, params: 4, frame: 22
var r1;
var binding;
var value5;
let value = a2;
value = '' + toMoment(a0).locale() + ':' + a1 + ':' + (value ?? (require(3829) /* metro dependency 3829: UserSettings */).TimestampHourCycle.getSetting());
const property = env0_5[value];
if (property != null) {
r1 = property;
} else {
binding = env0_5;
value5 = (importDefault(3845) /* metro dependency 3845: makeDateFormatter */)(a1);
binding[value] = value5;
r1 = value5;
}
return r1(toDate_31080(a0));
}
function dateStringToMoment(a0) { // fn#31078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:1136, offset: 0x00ff2d06, size: 83 bytes, params: 2, frame: 12
if (a0.length >= 200) {
throw new global.Error('Date string exceeds maximum length');
}
return (importDefault(3738) /* metro dependency 3738 */)(a0);
}
function differenceInDays_31082(a0, a1) { // fn#31082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:1972, offset: 0x00ff2e2c, size: 43 bytes, params: 3, frame: 10
let getTime = a0.getTime;
let value = Reflect.apply(getTime, a0, []);
getTime = a1.getTime;
value -= Reflect.apply(getTime, a1, []);
return value / env0_4;
}
function isSameDay_31084(a0, a1) { // fn#31084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:2189, offset: 0x00ff2eb5, size: 75 bytes, params: 3, frame: 14
var r0;
const Math = global.Math;
const abs = Math.abs;
let value = Number(a0);
value = Reflect.apply(abs, Math, [value - Number(a1)]);
value = value <= env0_4;
if (value) {
value = a0.getDate();
value = value === a1.getDate();
r0 = value;
} else {
r0 = value;
}
return r0;
}
function calendarFormat(a0) { // fn#31086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:2404, offset: 0x00ff2f38, size: 223 bytes, params: 2, frame: 20
var value9;
const value = a1;
const r1 = value !== undefined ? value : false;
const value2 = (importDefault(3738) /* metro dependency 3738 */).localeData();
const value3 = (importDefault(3738) /* metro dependency 3738 */)();
const value5 = differenceInCalendarDays_31076(toDate_31080(a0), value3.toDate());
if (value5 < -1) {
return dateFormat(a0, 'L LT', a2);
}
if (value5 < 0) {
return dateFormat(a0, value2.calendar('lastDay', toMoment(a0), value3), a2);
}
if (value5 < 1) {
value9 = 'sameDay';
function startOfDay_31075(a0) { // fn#31075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:616, offset: 0x00ff2b35, size: 224 bytes, params: 2, frame: 15
var r4;
var binding;
var date;
const value = a0;
const value2 = a1;
const r1 = !(value2 !== undefined) || value2;
const value4 = typeof value;
let r2 = value4 === 'string' || value4 === 'number';
r2 = !r2 ? value instanceof global.Date : r2;
if (r2) {
r4 = value;
} else {
binding = env0_3;
binding.error('Invalid date given to startOfDay', {d: value});
r4 = new global.Date();
}
const Date = global.Date;
const time = new Date().getTime();
if (r1) {
return dateFormat(a0, 'LT', a2);
r4 = time;
} else {
date = date.getTimezoneOffset();
date = time - 60000 * date;
r4 = date;
}
return dateFormat(a0, value2.calendar(value9, toMoment(a0), value3), a2);
const Math = global.Math;
return Math.floor(r4 / env0_4) * env0_4;
}
return dateFormat(a0, value2.calendar(value5 < 2 ? 'nextDay' : 'sameElse', toMoment(a0), value3), a2);
}
function calendarFormatCompact(a0, a1) { // fn#31087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:2753, offset: 0x00ff3017, size: 170 bytes, params: 3, frame: 20
var r0;
var r1;
var calendar;
var value;
const value2 = (importDefault(3738) /* metro dependency 3738 */).localeData();
const value3 = (importDefault(3738) /* metro dependency 3738 */)();
const value5 = differenceInCalendarDays_31076(toDate_31080(a0), value3.toDate());
const dateFormatBinding = dateFormat;
if (value5 === 0) {
r1 = 'LT';
} else {
if (value5 === -1) {
calendar = value2.calendar;
value = toMoment(a0);
value = Reflect.apply(calendar, value2, ['lastDay', value, value3]);
function differenceInCalendarDays_31076(a0, a1) { // fn#31076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:865, offset: 0x00ff2c15, size: 62 bytes, params: 3, frame: 17
const Math = global.Math;
const floor = Math.floor;
const startOfDay_31075Binding = startOfDay_31075;
return Reflect.apply(floor, Math, [(startOfDay_31075Binding(a0, false) - startOfDay_31075Binding(a1,
false)) / env0_4]);
}
function dateFormat(a0, a1, a2) { // fn#31077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:961, offset: 0x00ff2c53, size: 179 bytes, params: 4, frame: 22
var r1;
var binding;
var value5;
let value = a2;
value = '' + toMoment(a0).locale() + ':' + a1 + ':' + (value ?? (require(3829) /* metro dependency 3829: UserSettings */).TimestampHourCycle.getSetting());
const property = env0_5[value];
if (property != null) {
r1 = property;
} else {
binding = env0_5;
value5 = (importDefault(3845) /* metro dependency 3845: makeDateFormatter */)(a1);
binding[value] = value5;
r1 = value5;
}
return r1(toDate_31080(a0));
}
function dateStringToMoment(a0) { // fn#31078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:1136, offset: 0x00ff2d06, size: 83 bytes, params: 2, frame: 12
if (a0.length >= 200) {
throw new global.Error('Date string exceeds maximum length');
}
return (Module03738)(a0);
}
function differenceInDays_31082(a0, a1) { // fn#31082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:1972, offset: 0x00ff2e2c, size: 43 bytes, params: 3, frame: 10
let getTime = a0.getTime;
let value = Reflect.apply(getTime, a0, []);
getTime = a1.getTime;
value -= Reflect.apply(getTime, a1, []);
return value / env0_4;
}
function isSameDay_31084(a0, a1) { // fn#31084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:2189, offset: 0x00ff2eb5, size: 75 bytes, params: 3, frame: 14
var r0;
const Math = global.Math;
const abs = Math.abs;
let value = Number(a0);
value = Reflect.apply(abs, Math, [value - Number(a1)]);
value = value <= env0_4;
if (value) {
value = a0.getDate();
value = value === a1.getDate();
r0 = value;
} else {
r0 = value5 > -7 ? 'dddd' : 'L';
r0 = value;
}
r1 = r0;
return r0;
}
return dateFormatBinding(a0, r1, a1);
}
function accessibilityLabelCalendarFormat(a0) { // fn#31088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:3048, offset: 0x00ff30c1, size: 218 bytes, params: 2, frame: 23
var r0;
var calendar;
var value;
const value2 = (importDefault(3738) /* metro dependency 3738 */).localeData();
const Date = global.Date;
const date = new Date();
const value5 = differenceInCalendarDays_31076(a0, date);
const dateFormatBinding = dateFormat;
const value6 = 'sameElse';
const r7 = value5 < -1 ? value6 : value5 < 0 ? 'lastDay' : value5 < 1 ? 'sameDay' : value5 < 2 ? 'nextDay' : value6;
if (value6 === r7) {
r0 = 'LLL';
} else {
calendar = value2.calendar;
value = (importDefault(3738) /* metro dependency 3738 */)(a0);
value = Reflect.apply(calendar, value2, [r7, value, (importDefault(3738) /* metro dependency 3738 */)(date)]);
r0 = value;
function calendarFormat_31086(a0) { // fn#31086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:2404, offset: 0x00ff2f38, size: 223 bytes, params: 2, frame: 20
var value9;
const value = a1;
const r1 = value !== undefined ? value : false;
const value2 = (Module03738).localeData();
const value3 = (Module03738)();
const value5 = differenceInCalendarDays_31076(toDate_31080(a0), value3.toDate());
if (value5 < -1) {
return dateFormat(a0, 'L LT', a2);
}
if (value5 < 0) {
return dateFormat(a0, value2.calendar('lastDay', toMoment(a0), value3), a2);
}
if (value5 < 1) {
value9 = 'sameDay';
if (r1) {
return dateFormat(a0, 'LT', a2);
}
return dateFormat(a0, value2.calendar(value9, toMoment(a0), value3), a2);
}
return dateFormat(a0, value2.calendar(value5 < 2 ? 'nextDay' : 'sameElse', toMoment(a0), value3), a2);
}
return dateFormatBinding(a0, r0);
}
function diffAsUnits(a0, a1) { // fn#31089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:3332, offset: 0x00ff319b, size: 163 bytes, params: 3, frame: 16
var Number;
let value = a2;
const r2 = value !== undefined ? value : false;
var env0_1;
const object2 = {'days': 0, 'hours': 0, 'minutes': 0};
object2.seconds = r2 ? 1 : 0;
if (!(a0 > a1)) {
if (r2) {
Number = global.Number;
value = Number(a0);
value += 1200;
Number = global.Number;
if (value > Number(a1)) {
return object2;
function calendarFormatCompact(a0, a1) { // fn#31087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:2753, offset: 0x00ff3017, size: 170 bytes, params: 3, frame: 20
var r0;
var r1;
var calendar;
var value;
const value2 = (Module03738).localeData();
const value3 = (Module03738)();
const value5 = differenceInCalendarDays_31076(toDate_31080(a0), value3.toDate());
const dateFormatBinding = dateFormat;
if (value5 === 0) {
r1 = 'LT';
} else {
if (value5 === -1) {
calendar = value2.calendar;
value = toMoment(a0);
value = Reflect.apply(calendar, value2, ['lastDay', value, value3]);
r0 = value;
} else {
r0 = value5 > -7 ? 'dddd' : 'L';
}
r1 = r0;
}
return dateFormatBinding(a0, r1, a1);
}
function accessibilityLabelCalendarFormat(a0) { // fn#31088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:3048, offset: 0x00ff30c1, size: 218 bytes, params: 2, frame: 23
var r0;
var calendar;
var value;
const value2 = (importDefault(3738) /* metro dependency 3738 */).localeData();
const Date = global.Date;
const date = new Date();
const value5 = differenceInCalendarDays_31076(a0, date);
const dateFormatBinding = dateFormat;
const value6 = 'sameElse';
const r7 = value5 < -1 ? value6 : value5 < 0 ? 'lastDay' : value5 < 1 ? 'sameDay' : value5 < 2 ? 'nextDay' : value6;
if (value6 === r7) {
r0 = 'LLL';
} else {
calendar = value2.calendar;
value = (importDefault(3738) /* metro dependency 3738 */)(a0);
value = Reflect.apply(calendar, value2, [r7, value, (importDefault(3738) /* metro dependency 3738 */)(date)]);
r0 = value;
}
return dateFormatBinding(a0, r0);
}
function diffAsUnits(a0, a1) { // fn#31089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:3332, offset: 0x00ff319b, size: 163 bytes, params: 3, frame: 16
var Number;
let value = a2;
const r2 = value !== undefined ? value : false;
var env0_1;
const object = {'days': 0, 'hours': 0, 'minutes': 0};
object.seconds = r2 ? 1 : 0;
if (!(a0 > a1)) {
if (r2) {
Number = global.Number;
value = Number(a0);
value += 1200;
Number = global.Number;
if (value > Number(a1)) {
return object;
}
Number = global.Number;
value = Number(a1);
Number = global.Number;
env0_1 = value - Number(a0);
env0_6.forEach(_fun31090);
return object;
}
Number = global.Number;
value = Number(a1);
Number = global.Number;
env0_1 = value - Number(a0);
env0_6.forEach(_fun31090);
return object2;
}
Number = global.Number;
value = Number(a1);
Number = global.Number;
env0_1 = value - Number(a0);
env0_6.forEach(_fun31090);
return object;
function _fun31090({key, millisecondsInUnit}) { // fn#31090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:3510, offset: 0x00ff323e, size: 80 bytes, params: 2, frame: 15
const binding = env0_0;
const Math = global.Math;
binding[key] = Math.floor(env0_1 / millisecondsInUnit);
env0_1 = env0_1 - env0_0[key] * millisecondsInUnit;
}
}
return object2;
}
function unitsAsStrings(a0, a1) { // fn#31091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:3597, offset: 0x00ff328e, size: 261 bytes, params: 3, frame: 19
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return a0.days > 0 ? intl.formatToPlainString(a1.days, {days: a0.days,
hours: a0.hours}) : a0.hours > 0 ? intl.formatToPlainString(a1.hours, {hours: a0.hours,
minutes: a0.minutes}) : intl.formatToPlainString(a1.minutes, {minutes: global.Math.max(1, a0.minutes)});
}
function getMonthlyProgressPercentage() { // fn#31092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:3932, offset: 0x00ff3393, size: 103 bytes, params: 1, frame: 16
let value = getESTDate();
const Date = global.Date;
const date = new Date(value.getFullYear(), value.getMonth() + 1, 0);
let getDate = date.getDate;
const value7 = Reflect.apply(getDate, date, []);
getDate = value.getDate;
value = Reflect.apply(getDate, value, []) / value7;
return value * 100;
}
function getDaysRemainingInMonth() { // fn#31093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:4098, offset: 0x00ff33fa, size: 96 bytes, params: 1, frame: 16
const eSTDate = getESTDate();
const Date = global.Date;
const date = new Date(eSTDate.getFullYear(), eSTDate.getMonth() + 1, 0);
let getDate = date.getDate;
const value7 = Reflect.apply(getDate, date, []);
getDate = eSTDate.getDate;
return value7 - Reflect.apply(getDate, eSTDate, []);
}
function formatDateForDatetimeLocal(a0) { // fn#31094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:4254, offset: 0x00ff345a, size: 48 bytes, params: 2, frame: 12
var r0;
let value = '';
if (a0 == null) {
r0 = value;
} else {
value = dateStringToMoment(a0);
value = value.format('YYYY-MM-DDTHH:mm');
r0 = value;
function unitsAsStrings(a0, a1) { // fn#31091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:3597, offset: 0x00ff328e, size: 261 bytes, params: 3, frame: 19
const intl = (IndexNativeModule).intl;
return a0.days > 0 ? intl.formatToPlainString(a1.days, {days: a0.days,
hours: a0.hours}) : a0.hours > 0 ? intl.formatToPlainString(a1.hours, {hours: a0.hours,
minutes: a0.minutes}) : intl.formatToPlainString(a1.minutes, {minutes: global.Math.max(1, a0.minutes)});
}
return r0;
}
function _fun31090({key, millisecondsInUnit}) { // fn#31090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:3510, offset: 0x00ff323e, size: 80 bytes, params: 2, frame: 15
const binding = env0_0;
const Math = global.Math;
binding[key] = Math.floor(env0_1 / millisecondsInUnit);
env0_1 = env0_1 - env0_0[key] * millisecondsInUnit;
function getMonthlyProgressPercentage() { // fn#31092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:3932, offset: 0x00ff3393, size: 103 bytes, params: 1, frame: 16
let value = getESTDate();
const Date = global.Date;
const date = new Date(value.getFullYear(), value.getMonth() + 1, 0);
let getDate = date.getDate;
const value7 = Reflect.apply(getDate, date, []);
getDate = value.getDate;
value = Reflect.apply(getDate, value, []) / value7;
return value * 100;
}
function getDaysRemainingInMonth() { // fn#31093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:4098, offset: 0x00ff33fa, size: 96 bytes, params: 1, frame: 16
const eSTDate = getESTDate();
const Date = global.Date;
const date = new Date(eSTDate.getFullYear(), eSTDate.getMonth() + 1, 0);
let getDate = date.getDate;
const value7 = Reflect.apply(getDate, date, []);
getDate = eSTDate.getDate;
return value7 - Reflect.apply(getDate, eSTDate, []);
}
function formatDateForDatetimeLocal(a0) { // fn#31094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3965:4254, offset: 0x00ff345a, size: 48 bytes, params: 2, frame: 12
var r0;
let value = '';
if (a0 == null) {
r0 = value;
} else {
value = dateStringToMoment(a0);
value = value.format('YYYY-MM-DDTHH:mm');
r0 = value;
}
return r0;
}
}
global.__d(_fun31072, 3826, [1949, 3, 3827, 3829, 1314, 3843, 1244, 694, 3845, 3738,
2]) /* metro module 3826, dependencies: [1949, 3, 3827, 3829, 1314, 3843, 1244, 694, 3845, 3738, 2] */;
+118 -114
View File
@@ -1,7 +1,9 @@
/* Metro module 11879; source: utils/DragAndDropUtils.tsx; dependencies: [3, 22, 2] */
import Logger from '../modules/debug/Logger.tsx'; /* Metro dependency 3 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun91135(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12065:6, offset: 0x02053701, size: 197 bytes, params: 8, frame: 21
var object2;
const closure = calculatePositionDeltas;
const calculatePositionDeltas2 = calculatePositionDeltas;
const closure2 = function(a0, a1, a2) {
var property = a0[a1];
var items = [];
@@ -10,137 +12,139 @@ function _fun91135(global, require, importDefault, importAll, module, exports, d
items.splice(a2, 0, property);
return items;
};
const closure3 = getPositionUpdates;
const getPositionUpdates2 = getPositionUpdates;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('DragAndDropUtils');
object2 = {moveItemFromTo: closure2, calculatePositionDeltas: closure, getPositionUpdates: closure3};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/DragAndDropUtils.tsx');
exports.default = object2;
exports.calculatePositionDeltas = closure;
object = {moveItemFromTo: closure2, calculatePositionDeltas: calculatePositionDeltas2,
getPositionUpdates: getPositionUpdates2};
(FileImportTrackerModule).fileFinishedImporting('utils/DragAndDropUtils.tsx');
exports.default = object;
exports.calculatePositionDeltas = calculatePositionDeltas2;
exports.moveItemFromTo = closure2;
exports.getPositionUpdates = closure3;
}
function calculatePositionDeltas({oldOrdering, newOrdering, idGetter, existingPositionGetter, ascending}) { // fn#91136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12065:135, offset: 0x020537c6, size: 341 bytes, params: 2, frame: 27
var r0;
var r7;
var r15;
var r13;
var value;
var value5;
var value6;
var value7;
var value8;
var value9;
var push;
var reverse;
reducibleJoin2: while (true) {
if (ascending !== undefined) {
exports.getPositionUpdates = getPositionUpdates2;
function calculatePositionDeltas({oldOrdering, newOrdering, idGetter, existingPositionGetter, ascending}) { // fn#91136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12065:135, offset: 0x020537c6, size: 341 bytes, params: 2, frame: 27
var r0;
var r7;
var r15;
var r13;
var value;
var value5;
var value6;
var value7;
var value8;
var value9;
var push;
var reverse;
reducibleJoin2: while (true) {
if (ascending !== undefined) {
break reducibleJoin2;
}
value = true;
ascending = value;
break reducibleJoin2;
}
value = true;
ascending = value;
break reducibleJoin2;
}
const length = newOrdering.length;
if (oldOrdering.length !== length) {
env0_2.warn('Arrays are not of the same length!', oldOrdering, newOrdering);
return [];
}
value = oldOrdering.map(idGetter);
value = value.sort();
value = value.join(':');
const value4 = newOrdering.map(idGetter).sort().join(':');
if (value !== value4) {
env0_2.warn('Object IDs in the old ordering and the new ordering are not the same.', value, value4);
return [];
}
const object2 = {};
value = 0;
if (value < length) {
r0 = value;
reducibleLoop5: while (true) {
value5 = idGetter(oldOrdering[r0]);
object2[value5] = existingPositionGetter(oldOrdering[r0]);
value6 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
if (value6 < length) {
r0 = value6;
continue reducibleLoop5;
}
break reducibleLoop5;
const length = newOrdering.length;
if (oldOrdering.length !== length) {
env0_2.warn('Arrays are not of the same length!', oldOrdering, newOrdering);
return [];
}
}
const items2 = [];
if (value < length) {
r7 = value;
reducibleLoop7: while (true) {
value = idGetter(newOrdering[r7]);
reducibleJoin9: while (true) {
if (ascending) {
r15 = r7;
value = oldOrdering.map(idGetter);
value = value.sort();
value = value.join(':');
const value4 = newOrdering.map(idGetter).sort().join(':');
if (value !== value4) {
env0_2.warn('Object IDs in the old ordering and the new ordering are not the same.', value, value4);
return [];
}
const object = {};
value = 0;
if (value < length) {
r0 = value;
reducibleLoop5: while (true) {
value5 = idGetter(oldOrdering[r0]);
object[value5] = existingPositionGetter(oldOrdering[r0]);
value6 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
if (value6 < length) {
r0 = value6;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
const items2 = [];
if (value < length) {
r7 = value;
reducibleLoop7: while (true) {
value = idGetter(newOrdering[r7]);
reducibleJoin9: while (true) {
if (ascending) {
r15 = r7;
break reducibleJoin9;
}
value7 = length - 1 - r7;
r15 = value7;
break reducibleJoin9;
}
value7 = length - 1 - r7;
r15 = value7;
break reducibleJoin9;
}
value8 = object2[value] === r15;
reducibleJoin11: while (true) {
if (value8) {
value9 = existingPositionGetter(newOrdering[r7]) === r15;
r13 = value9;
value8 = object[value] === r15;
reducibleJoin11: while (true) {
if (value8) {
value9 = existingPositionGetter(newOrdering[r7]) === r15;
r13 = value9;
break reducibleJoin11;
}
r13 = value8;
break reducibleJoin11;
}
r13 = value8;
break reducibleJoin11;
}
reducibleJoin13: while (true) {
if (r13) {
reducibleJoin13: while (true) {
if (r13) {
break reducibleJoin13;
}
push = items2.push;
Reflect.apply(push, items2, [{id: value, position: r15}]);
break reducibleJoin13;
}
push = items2.push;
Reflect.apply(push, items2, [{id: value, position: r15}]);
break reducibleJoin13;
value = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
if (value < length) {
r7 = value;
continue reducibleLoop7;
}
break reducibleLoop7;
}
value = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
if (value < length) {
r7 = value;
continue reducibleLoop7;
}
break reducibleLoop7;
}
}
reducibleJoin16: while (true) {
if (ascending) {
reducibleJoin16: while (true) {
if (ascending) {
break reducibleJoin16;
}
reverse = items2.reverse;
Reflect.apply(reverse, items2, []);
break reducibleJoin16;
}
reverse = items2.reverse;
Reflect.apply(reverse, items2, []);
break reducibleJoin16;
return items2;
}
return items2;
}
function getPositionUpdates({objectArray, fromPosition, toPosition, idGetter, existingPositionGetter, ascending}) { // fn#91138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12065:762, offset: 0x02053958, size: 162 bytes, params: 2, frame: 21
var r7;
var value;
ascending = ascending === undefined || ascending;
const Array = global.Array;
if (Array.isArray(objectArray)) {
r7 = objectArray;
} else {
value = importDefault(22) /* metro dependency 22 */;
value = value.values(objectArray);
r7 = value;
function getPositionUpdates({objectArray, fromPosition, toPosition, idGetter, existingPositionGetter, ascending}) { // fn#91138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12065:762, offset: 0x02053958, size: 162 bytes, params: 2, frame: 21
var r7;
var value;
ascending = ascending === undefined || ascending;
const Array = global.Array;
if (Array.isArray(objectArray)) {
r7 = objectArray;
} else {
value = importDefault(22) /* metro dependency 22 */;
value = value.values(objectArray);
r7 = value;
}
const calculatePositionDeltasBinding = calculatePositionDeltas;
const object = {oldOrdering: r7};
object.newOrdering = moveItemFromTo(r7, fromPosition, toPosition);
object.idGetter = idGetter;
object.existingPositionGetter = existingPositionGetter;
object.ascending = ascending;
return calculatePositionDeltasBinding(object);
}
const calculatePositionDeltasBinding = calculatePositionDeltas;
const object2 = {oldOrdering: r7};
object2.newOrdering = moveItemFromTo(r7, fromPosition, toPosition);
object2.idGetter = idGetter;
object2.existingPositionGetter = existingPositionGetter;
object2.ascending = ascending;
return calculatePositionDeltasBinding(object2);
}
global.__d(_fun91135, 11879, [3, 22, 2]) /* metro module 11879, dependencies: [3, 22, 2] */;
+9 -7
View File
@@ -1,18 +1,20 @@
/* Metro module 672; source: utils/Durations.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun8027(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#8027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:722:6, offset: 0x00d32eb4, size: 176 bytes, params: 8, frame: 16
var object2;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {};
object = {};
Object = global.Object;
object2.Millis = Object.freeze({'HALF_SECOND': 500, 'SECOND': 1000, 'MINUTE': 60000, 'HOUR': 3600000,
object.Millis = Object.freeze({'HALF_SECOND': 500, 'SECOND': 1000, 'MINUTE': 60000, 'HOUR': 3600000,
'DAY': 86400000, 'WEEK': 604800000, 'DAYS_30': 2592000000});
Object = global.Object;
object2.Seconds = Object.freeze({'SECOND': 1, 'MINUTE': 60, 'HOUR': 3600, 'DAY': 86400, 'WEEK': 604800,
object.Seconds = Object.freeze({'SECOND': 1, 'MINUTE': 60, 'HOUR': 3600, 'DAY': 86400, 'WEEK': 604800,
'DAYS_30': 2592000});
Object = global.Object;
object2.Minutes = Object.freeze({'MINUTE': 1, 'HOUR': 60, 'DAY': 1440, 'WEEK': 10080, 'DAYS_30': 43200});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/Durations.tsx');
exports.default = object2;
object.Minutes = Object.freeze({'MINUTE': 1, 'HOUR': 60, 'DAY': 1440, 'WEEK': 10080, 'DAYS_30': 43200});
(FileImportTrackerModule).fileFinishedImporting('utils/Durations.tsx');
exports.default = object;
}
global.__d(_fun8027, 672, [2]) /* metro module 672, dependencies: [2] */;
+279 -274
View File
@@ -1,4 +1,9 @@
/* Metro module 4641; source: utils/EmbedUtils.tsx; dependencies: [661, 4642, 21, 1391, 22, 3738, 673, 4627, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as FlagUtilsModule from '../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
import * as EmbedConstantsModule from '../modules/messages/EmbedConstants.tsx'; /* Metro dependency 4642 */
function _fun39903(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:6, offset: 0x010ef3cc, size: 474 bytes, params: 8, frame: 19
var RegExp;
let env0_0 = require;
@@ -14,11 +19,6 @@ function _fun39903(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_3 = constantsModule.MessageEmbedMediaFlags;
const env0_4 = constantsModule.MessageEmbedTypes;
const env0_5 = constantsModule.Permissions;
const env0_6 = (require(4642) /* metro dependency 4642: EmbedConstants */).EMBED_TYPES_WITH_PARSEABLE_FIELDS;
const env0_7 = RegExp('sketchfab', 'i');
const env0_8 = RegExp('^https:\\/\\/sketchfab\\.com', 'i');
const env0_9 = RegExp('youtube|steam|imgur|vimeo|sketchfab|soundcloud|streamable|twitch|vid\\.me|twitter', 'i');
@@ -34,7 +34,7 @@ function _fun39903(global, require, importDefault, importAll, module, exports, d
'');
const env0_15 = RegExp('^https?:\\/\\/(?:canary\\.|ptb\\.|www\\.)?discord(?:app)?\\.com\\/shop\\?(?=.*tab=game-shops)(?=.*applicationId=[0-9]+)(?=.*skuId=[0-9]+)',
'');
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/EmbedUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/EmbedUtils.tsx');
exports.sanitizeEmbed = sanitizeEmbed;
exports.mergeEmbedsOnURL = function(a0) {
var Map = global.Map;
@@ -126,171 +126,146 @@ function _fun39903(global, require, importDefault, importAll, module, exports, d
exports.shouldStripEmbeds = function(a0) {
return a0.content !== '' || a0.messageSnapshots.some(_fun39920);
};
}
function sanitizeMedia({url, proxy_url, width, height, placeholder, placeholder_version, description, flags, content_type}) { // fn#39905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:1031, offset: 0x010ef5c2, size: 186 bytes, params: 2, frame: 20
const object = {url: url, proxyURL: proxy_url, width: width, height: height, placeholder: placeholder,
placeholderVersion: placeholder_version, description: description};
const hasFlag = FlagUtilsModule.hasFlag;
const r7 = flags ?? 0;
const IS_ANIMATED = MessageEmbedMediaFlags.IS_ANIMATED;
object.srcIsAnimated = Reflect.apply(hasFlag, FlagUtilsModule, [r7, IS_ANIMATED]);
object.flags = flags ?? 0;
object.contentType = content_type ?? undefined;
return object;
}
function sanitizeMedia({url, proxy_url, width, height, placeholder, placeholder_version, description, flags, content_type}) { // fn#39905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:1031, offset: 0x010ef5c2, size: 186 bytes, params: 2, frame: 20
const object2 = {url: url, proxyURL: proxy_url, width: width, height: height, placeholder: placeholder,
placeholderVersion: placeholder_version, description: description};
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const hasFlag = flagUtilsModule.hasFlag;
const r7 = flags ?? 0;
const IS_ANIMATED = MessageEmbedMediaFlags.IS_ANIMATED;
object2.srcIsAnimated = Reflect.apply(hasFlag, flagUtilsModule, [r7, IS_ANIMATED]);
object2.flags = flags ?? 0;
object2.contentType = content_type ?? undefined;
return object2;
}
function appendQueryParams(a0, a1) { // fn#39906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:1360, offset: 0x010ef67c, size: 86 bytes, params: 3, frame: 14
const env0_0 = a1;
const URL = global.URL;
const uRL = new URL(a0);
const Object = global.Object;
Object.keys(a1).forEach(_fun39907);
return uRL.toString();
function _fun39907(a0) { // fn#39907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:1440, offset: 0x010ef6d2, size: 39 bytes, params: 2, frame: 13
env0_1.searchParams.set(a0, require[a0]);
}
function appendQueryParams(a0, a1) { // fn#39906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:1360, offset: 0x010ef67c, size: 86 bytes, params: 3, frame: 14
const env0_0 = a1;
const URL = global.URL;
const uRL = new URL(a0);
const Object = global.Object;
Object.keys(a1).forEach(_fun39907);
return uRL.toString();
}
}
function sanitizeEmbed(a0, a1, a2) { // fn#39908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:1557, offset: 0x010ef6f9, size: 1205 bytes, params: 4, frame: 23
var r4;
var r10;
var r8;
var r7;
var r6;
var object6;
var object7;
var object8;
var defaultImport2;
var Date;
var value7;
var date;
var moduleValue;
var object9;
var appendQueryParamsBinding;
var binding;
var value20;
var regexp;
const object10 = {};
var value;
const value2 = undefined;
object10.id = (importDefault(22) /* metro dependency 22 */).uniqueId('embed_');
object10.url = a2.url;
let type = a2.type;
object10.type = type;
object10.rawTitle = a2.title;
object10.rawDescription = a2.description;
object10.referenceId = a2.reference_id;
object10.flags = a2.flags;
object10.contentScanVersion = a2.content_scan_version;
let footer = a2.footer;
if (footer != null) {
object6 = {};
footer = a2.footer;
object6.text = footer.text;
footer = a2.footer;
object6.iconURL = footer.icon_url;
footer = a2.footer;
object6.iconProxyURL = footer.proxy_icon_url;
object10.footer = object6;
}
let author = a2.author;
if (author != null && a2.author.name != null) {
object7 = {};
author = a2.author;
object7.name = author.name;
author = a2.author;
object7.url = author.url;
author = a2.author;
object7.iconURL = author.icon_url;
author = a2.author;
object7.iconProxyURL = author.proxy_icon_url;
object10.author = object7;
}
let provider = a2.provider;
if (provider != null && a2.provider.name != null) {
object8 = {};
provider = a2.provider;
object8.name = provider.name;
provider = a2.provider;
object8.url = provider.url;
object10.provider = object8;
}
let timestamp = a2.timestamp;
if (timestamp != null) {
defaultImport2 = importDefault(3738) /* metro dependency 3738 */;
Date = global.Date;
timestamp = a2.timestamp;
value7 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(timestamp);
object10.timestamp = defaultImport2(date instanceof Object ? date : value7);
}
if (a2.color != null) {
moduleValue = require(673) /* metro dependency 673: ColorUtils */;
object10.color = moduleValue.int2hsl(a2.color, false);
}
let thumbnail = a2.thumbnail;
if (thumbnail != null) {
if (validateSize(a2.thumbnail)) {
type = object10.type;
if (MessageEmbedTypes.ARTICLE === type) {
object10.image = sanitizeMedia(a2.thumbnail);
} else if (MessageEmbedTypes.IMAGE === type) {
object10.image = sanitizeMedia(a2.thumbnail);
} else {
object10.thumbnail = sanitizeMedia(a2.thumbnail);
function sanitizeEmbed(a0, a1, a2) { // fn#39908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:1557, offset: 0x010ef6f9, size: 1205 bytes, params: 4, frame: 23
var r4;
var r10;
var r8;
var r7;
var r6;
var object;
var object2;
var object3;
var defaultImport2;
var Date;
var value7;
var date;
var moduleValue;
var object4;
var appendQueryParamsBinding;
var binding;
var value20;
var regexp;
const object5 = {};
var value;
const value2 = undefined;
object5.id = (importDefault(22) /* metro dependency 22 */).uniqueId('embed_');
object5.url = a2.url;
let type = a2.type;
object5.type = type;
object5.rawTitle = a2.title;
object5.rawDescription = a2.description;
object5.referenceId = a2.reference_id;
object5.flags = a2.flags;
object5.contentScanVersion = a2.content_scan_version;
let footer = a2.footer;
if (footer != null) {
object = {};
footer = a2.footer;
object.text = footer.text;
footer = a2.footer;
object.iconURL = footer.icon_url;
footer = a2.footer;
object.iconProxyURL = footer.proxy_icon_url;
object5.footer = object;
}
let author = a2.author;
if (author != null && a2.author.name != null) {
object2 = {};
author = a2.author;
object2.name = author.name;
author = a2.author;
object2.url = author.url;
author = a2.author;
object2.iconURL = author.icon_url;
author = a2.author;
object2.iconProxyURL = author.proxy_icon_url;
object5.author = object2;
}
let provider = a2.provider;
if (provider != null && a2.provider.name != null) {
object3 = {};
provider = a2.provider;
object3.name = provider.name;
provider = a2.provider;
object3.url = provider.url;
object5.provider = object3;
}
let timestamp = a2.timestamp;
if (timestamp != null) {
defaultImport2 = importDefault(3738) /* metro dependency 3738 */;
Date = global.Date;
timestamp = a2.timestamp;
value7 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(timestamp);
object5.timestamp = defaultImport2(date instanceof Object ? date : value7);
}
if (a2.color != null) {
moduleValue = require(673) /* metro dependency 673: ColorUtils */;
object5.color = moduleValue.int2hsl(a2.color, false);
}
let thumbnail = a2.thumbnail;
if (thumbnail != null) {
if (validateSize(a2.thumbnail)) {
type = object5.type;
if (MessageEmbedTypes.ARTICLE === type) {
object5.image = sanitizeMedia(a2.thumbnail);
} else if (MessageEmbedTypes.IMAGE === type) {
object5.image = sanitizeMedia(a2.thumbnail);
} else {
object5.thumbnail = sanitizeMedia(a2.thumbnail);
}
}
}
}
if (a2.image != null && validateSize(a2.image)) {
object10.image = sanitizeMedia(a2.image);
}
let video = a2.video;
if (video != null) {
thumbnail = object10.thumbnail;
r4 = thumbnail == null && a2.video.proxy_url != null;
r4 = r4 && validateSize(a2.video);
if (r4) {
object9 = {};
video = a2.video;
object9.width = video.width;
video = a2.video;
object9.height = video.height;
appendQueryParamsBinding = appendQueryParams;
video = a2.video;
object9.url = appendQueryParamsBinding(video.proxy_url, {format: 'webp'});
object10.thumbnail = object9;
if (a2.image != null && validateSize(a2.image)) {
object5.image = sanitizeMedia(a2.image);
}
thumbnail = object10.thumbnail;
r4 = thumbnail != null && validateSize(a2.video);
if (r4) {
provider = a2.provider;
video = a2.video;
if (provider == null) {
binding = env0_8;
if (binding.test(video.url)) {
r6 = false;
} else {
value20 = video.proxy_url != null;
if (value20) {
r10 = value20;
} else {
regexp = RegExp('^https:', 'i');
r10 = regexp.test(video.url);
}
r8 = a1 != null && (importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp(a1) < 1492472454139;
if (r8) {
r8 = r10 && provider != null;
r8 = r8 && env0_9.test(provider.name);
r7 = r8;
} else {
r7 = r10;
}
r6 = r7;
}
} else {
binding = env0_7;
if (binding.test(provider.name)) {
r6 = false;
} else {
let video = a2.video;
if (video != null) {
thumbnail = object5.thumbnail;
r4 = thumbnail == null && a2.video.proxy_url != null;
r4 = r4 && validateSize(a2.video);
if (r4) {
object4 = {};
video = a2.video;
object4.width = video.width;
video = a2.video;
object4.height = video.height;
appendQueryParamsBinding = appendQueryParams;
video = a2.video;
object4.url = appendQueryParamsBinding(video.proxy_url, {format: 'webp'});
object5.thumbnail = object4;
}
thumbnail = object5.thumbnail;
r4 = thumbnail != null && validateSize(a2.video);
if (r4) {
provider = a2.provider;
video = a2.video;
if (provider == null) {
binding = env0_8;
if (binding.test(video.url)) {
r6 = false;
@@ -312,124 +287,154 @@ function sanitizeEmbed(a0, a1, a2) { // fn#39908, source: /ci/build/discord/disc
}
r6 = r7;
}
} else {
binding = env0_7;
if (binding.test(provider.name)) {
r6 = false;
} else {
binding = env0_8;
if (binding.test(video.url)) {
r6 = false;
} else {
value20 = video.proxy_url != null;
if (value20) {
r10 = value20;
} else {
regexp = RegExp('^https:', 'i');
r10 = regexp.test(video.url);
}
r8 = a1 != null && (importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp(a1) < 1492472454139;
if (r8) {
r8 = r10 && provider != null;
r8 = r8 && env0_9.test(provider.name);
r7 = r8;
} else {
r7 = r10;
}
r6 = r7;
}
}
}
r4 = r6;
}
if (r4) {
object5.video = sanitizeMedia(a2.video);
}
r4 = r6;
}
if (r4) {
object10.video = sanitizeMedia(a2.video);
}
}
if (EMBED_TYPES_WITH_PARSEABLE_FIELDS.has(object10.type)) {
object10.fields = (a2.fields ?? []).map(function({name, value, inline}) {
return {rawName: name, rawValue: value, inline: inline};
});
} else {
object10.fields = [];
}
if (a2.components != null) {
value = require(4627) /* metro dependency 4627: InteractionComponentUtils */;
value = value.transformComponents(a2.components);
object10.components = value.length > 0 ? value : value2;
}
return object10;
}
function mergeEmbedsOnURL(a0) { // fn#39910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:3299, offset: 0x010efbd4, size: 62 bytes, params: 2, frame: 12
const Map = global.Map;
const map = new Map();
a0.forEach(_fun39911);
return [];
}
function isEmbedInline({image, video, type, author, rawTitle}) { // fn#39913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:3846, offset: 0x010efd3b, size: 104 bytes, params: 2, frame: 8
var r2;
var r1;
var value2;
let r0 = image != null || video != null;
if (r0) {
value2 = type === MessageEmbedTypes.GIFV;
if (value2) {
r1 = value2;
if (EMBED_TYPES_WITH_PARSEABLE_FIELDS.has(object5.type)) {
object5.fields = (a2.fields ?? []).map(function({name, value, inline}) {
return {rawName: name, rawValue: value, inline: inline};
});
} else {
r2 = type !== MessageEmbedTypes.RICH && author == null;
r2 = r2 && rawTitle == null;
r1 = r2;
object5.fields = [];
}
r0 = r1;
}
return r0;
}
function isServerShopArticleEmbed(a0) { // fn#39914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:4012, offset: 0x010efda3, size: 88 bytes, params: 2, frame: 14
const type = a0.type;
const ARTICLE = MessageEmbedTypes.ARTICLE;
return type === ARTICLE && a0.url != null && (env0_11.test(a0.url) || env0_10.test(a0.url));
}
function isCollectiblesShopArticleEmbed(a0) { // fn#39915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:4154, offset: 0x010efdfb, size: 63 bytes, params: 2, frame: 13
const type = a0.type;
const ARTICLE = MessageEmbedTypes.ARTICLE;
return type === ARTICLE && a0.url != null && env0_12.test(a0.url);
}
function isSocialLayerStorefrontArticleEmbed(a0) { // fn#39916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:4290, offset: 0x010efe3a, size: 110 bytes, params: 2, frame: 15
var r1;
var binding;
const type = a0.type;
const ARTICLE = MessageEmbedTypes.ARTICLE;
let r0 = type === ARTICLE && a0.url != null;
if (r0) {
binding = env0_14;
r1 = binding.test(a0.url) || env0_13.test(a0.url);
r1 = !r1 ? env0_15.test(a0.url) : r1;
r0 = r1;
}
return r0;
}
function canEmbedLinks(a0, a1) { // fn#39918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:4693, offset: 0x010eff0a, size: 61 bytes, params: 3, frame: 13
return a0.isPrivate() ? !a0.isManaged() : a1.can(Permissions.EMBED_LINKS, a0);
}
function shouldStripEmbeds(a0) { // fn#39919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:4801, offset: 0x010eff47, size: 45 bytes, params: 2, frame: 12
return a0.content !== '' || a0.messageSnapshots.some(function(a0) {
return a0.message.content !== '' || a0.message.attachments.length > 0;
});
}
function _fun39907(a0) { // fn#39907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:1440, offset: 0x010ef6d2, size: 39 bytes, params: 2, frame: 13
env0_1.searchParams.set(a0, require[a0]);
}
function _fun39911(a0) { // fn#39911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:3365, offset: 0x010efc12, size: 185 bytes, params: 2, frame: 15
var binding;
var value2;
var images;
if (a0.url != null) {
binding = env0_0;
value2 = binding.get(a0.url);
if (value2 == null) {
binding = env0_1;
binding.push(a0);
binding = env0_0;
binding.set(a0.url, a0);
return undefined;
if (a2.components != null) {
value = require(4627) /* metro dependency 4627: InteractionComponentUtils */;
value = value.transformComponents(a2.components);
object5.components = value.length > 0 ? value : value2;
}
if (a0.image != null) {
images = value2.images;
if (images == null) {
value2.images = [];
if (value2.image != null) {
images = value2.images;
images.push(value2.image);
return object5;
}
function mergeEmbedsOnURL(a0) { // fn#39910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:3299, offset: 0x010efbd4, size: 62 bytes, params: 2, frame: 12
const Map = global.Map;
const map = new Map();
a0.forEach(_fun39911);
return [];
function _fun39911(a0) { // fn#39911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:3365, offset: 0x010efc12, size: 185 bytes, params: 2, frame: 15
var binding;
var value2;
var images;
if (a0.url != null) {
binding = env0_0;
value2 = binding.get(a0.url);
if (value2 == null) {
binding = env0_1;
binding.push(a0);
binding = env0_0;
binding.set(a0.url, a0);
return undefined;
}
if (a0.image != null) {
images = value2.images;
if (images == null) {
value2.images = [];
if (value2.image != null) {
images = value2.images;
images.push(value2.image);
}
}
images = value2.images;
images.push(a0.image);
}
} else {
env0_1.push(a0);
}
images = value2.images;
images.push(a0.image);
}
} else {
env0_1.push(a0);
}
function isEmbedInline({image, video, type, author, rawTitle}) { // fn#39913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:3846, offset: 0x010efd3b, size: 104 bytes, params: 2, frame: 8
var r2;
var r1;
var value2;
let r0 = image != null || video != null;
if (r0) {
value2 = type === MessageEmbedTypes.GIFV;
if (value2) {
r1 = value2;
} else {
r2 = type !== MessageEmbedTypes.RICH && author == null;
r2 = r2 && rawTitle == null;
r1 = r2;
}
r0 = r1;
}
return r0;
}
function isServerShopArticleEmbed(a0) { // fn#39914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:4012, offset: 0x010efda3, size: 88 bytes, params: 2, frame: 14
const type = a0.type;
const ARTICLE = MessageEmbedTypes.ARTICLE;
return type === ARTICLE && a0.url != null && (env0_11.test(a0.url) || env0_10.test(a0.url));
}
function isCollectiblesShopArticleEmbed(a0) { // fn#39915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:4154, offset: 0x010efdfb, size: 63 bytes, params: 2, frame: 13
const type = a0.type;
const ARTICLE = MessageEmbedTypes.ARTICLE;
return type === ARTICLE && a0.url != null && env0_12.test(a0.url);
}
function isSocialLayerStorefrontArticleEmbed(a0) { // fn#39916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:4290, offset: 0x010efe3a, size: 110 bytes, params: 2, frame: 15
var r1;
var binding;
const type = a0.type;
const ARTICLE = MessageEmbedTypes.ARTICLE;
let r0 = type === ARTICLE && a0.url != null;
if (r0) {
binding = env0_14;
r1 = binding.test(a0.url) || env0_13.test(a0.url);
r1 = !r1 ? env0_15.test(a0.url) : r1;
r0 = r1;
}
return r0;
}
function canEmbedLinks(a0, a1) { // fn#39918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:4693, offset: 0x010eff0a, size: 61 bytes, params: 3, frame: 13
return a0.isPrivate() ? !a0.isManaged() : a1.can(Permissions.EMBED_LINKS, a0);
}
function shouldStripEmbeds(a0) { // fn#39919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:4801, offset: 0x010eff47, size: 45 bytes, params: 2, frame: 12
return a0.content !== '' || a0.messageSnapshots.some(function(a0) {
return a0.message.content !== '' || a0.message.attachments.length > 0;
});
}
}
function _fun39920(a0) { // fn#39920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4819:4878, offset: 0x010eff74, size: 48 bytes, params: 2, frame: 3
return a0.message.content !== '' || a0.message.attachments.length > 0;
}
global.__d(_fun39903, 4641, [661, 4642, 21, 1391, 22, 3738, 673, 4627,
2]) /* metro module 4641, dependencies: [661, 4642, 21, 1391, 22, 3738, 673, 4627, 2] */;
File diff suppressed because it is too large. Load diff
+163 -159
View File
@@ -1,19 +1,23 @@
/* Metro module 7171; source: utils/EmojiUtilsPlatformed.native.tsx; dependencies: [57, 5, 27, 3798, 4092, 477, 22, 1423, 7172, 1475, 4000, 7211, 7216, 2] */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import TwemojiNpm from '../external/node_modules/.pnpm/@[email protected]/node_modules/@discordapp/twemoji/dist/twemoji.npm.js'; /* Metro dependency 3798 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as PlatformUtilsModule from './PlatformUtils.tsx'; /* Metro dependency 477 */
import * as BurstReactionFirstSendActionSheetModule from '../components_native/reactions/BurstReactionFirstSendActionSheet.tsx'; /* Metro dependency 7211 */
function _fun57583(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:6, offset: 0x013e9948, size: 263 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const closure = getURL;
const getURL2 = getURL;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(5) /* metro dependency 5 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.NativeModules;
const env0_6 = value.processColor;
const twemojiNpm = importDefault(3798) /* metro dependency 3798: twemojiNpm */;
object2 = {};
object2.getURL = (importDefault(7216) /* metro dependency 7216: MemoizerUtils */).makeMemoizer(closure);
object2.filterUnsupportedEmojis = function(a0) {
object = {};
object.getURL = (importDefault(7216) /* metro dependency 7216: MemoizerUtils */).makeMemoizer(getURL2);
object.filterUnsupportedEmojis = function(a0) {
var r0;
var value = a0;
if (require(dependencyMap[5]).isAndroid()) {
@@ -24,172 +28,172 @@ function _fun57583(global, require, importDefault, importAll, module, exports, d
}
return r0;
};
object2.applyPlatformToThemedEmojiColorPalette = applyPlatformToThemedEmojiColorPalette;
object2.getEmojiColors = function() {
object.applyPlatformToThemedEmojiColorPalette = applyPlatformToThemedEmojiColorPalette;
object.getEmojiColors = function() {
return _getEmojiColors_57585.apply(this, arguments);
};
object2.triggerFullscreenAnimation = triggerFullscreenAnimation;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/EmojiUtilsPlatformed.native.tsx');
exports.default = object2;
}
function getURL(a0) { // fn#57584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:171, offset: 0x013e9a4f, size: 108 bytes, params: 2, frame: 14
var r0;
var value;
if (a0 == null) {
value = twemojiNpm.convert.toCodePoint(a0);
value = 'asset:/emoji-' + value + '.png';
r0 = value;
} else {
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
if (value) {
value = twemojiNpm.convert.toCodePoint(a0);
object.triggerFullscreenAnimation = triggerFullscreenAnimation;
(FileImportTrackerModule).fileFinishedImporting('utils/EmojiUtilsPlatformed.native.tsx');
exports.default = object;
function getURL(a0) { // fn#57584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:171, offset: 0x013e9a4f, size: 108 bytes, params: 2, frame: 14
var r0;
var value;
if (a0 == null) {
value = TwemojiNpm.convert.toCodePoint(a0);
value = 'asset:/emoji-' + value + '.png';
r0 = value;
} else {
r0 = '';
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
if (value) {
value = TwemojiNpm.convert.toCodePoint(a0);
value = 'asset:/emoji-' + value + '.png';
r0 = value;
} else {
r0 = '';
}
}
return r0;
}
return r0;
}
function _getEmojiColors_57585() { // fn#57585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:277, offset: 0x013e9abb, size: 48 bytes, params: 1, frame: 14
return env0_4(_fun57587).apply(this, arguments);
}
function _getEmojiColors_57585() { // fn#57585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:277, offset: 0x013e9abb, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun57587).apply(this, arguments);
function* _fun57587(a0) { // fn#57587, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:330, offset: 0x013e9af4, size: 285 bytes, params: 2, frame: 18
var environment;
var r6;
var binding;
var value4;
let value = undefined;
if (false) {
return value;
}
const id = a0.id;
let name = a0.name;
if (id != null) {
value = environment.__proto__.__proto__;
value = env2_1(env2_2[7]);
value = value.getEmojiURL({'id': null, 'size': 32, 'animated': false, id: id});
r6 = value;
} else {
value = environment.__proto__.__proto__;
value = env2_8(name);
r6 = value;
}
if (r6 !== '') {
value = environment.__proto__.__proto__;
binding = env2_0;
value = undefined;
value4 = binding(env2_2[9]);
yield value4.getPaletteForAvatar(r6);
} else {
value = environment.__proto__.__proto__;
var ImageManager = env2_5.ImageManager;
var getEmojiBase64 = ImageManager.getEmojiBase64;
name = a0.name;
var EMOJI_IN_ANIMATION_SIZE = env2_0(env2_2[8]).EMOJI_IN_ANIMATION_SIZE;
yield Reflect.apply(getEmojiBase64, ImageManager, [name, EMOJI_IN_ANIMATION_SIZE]);
if (false) {
return undefined;
}
value = 'data:image/png;base64,' + value;
r6 = value;
value = environment.__proto__.__proto__;
binding = env2_0;
value = undefined;
value4 = binding(env2_2[9]);
yield value4.getPaletteForAvatar(r6);
}
const value5 = undefined;
if (false) {
return value5;
}
return value5 == null ? value : value5.map(_fun57588);
function _fun57588(a0) { // fn#57588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:620, offset: 0x013e9c11, size: 76 bytes, params: 2, frame: 17
const value = environment.__proto__.__proto__.__proto__;
const value2 = env3_3(a0, 3);
return env3_0(env3_2[10]).rgbToHex(value2[0], value2[1], value2[2]);
}
function filterUnsupportedEmojis(a0) { // fn#57589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:787, offset: 0x013e9c5d, size: 84 bytes, params: 2, frame: 15
var r0;
let value = a0;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
r0 = value;
} else {
value = (importDefault(22) /* metro dependency 22 */).filter(value, _fun57590);
r0 = value;
}
return r0;
}
function applyPlatformToThemedEmojiColorPalette({palette, shouldProcessMobileColors}) { // fn#57591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:1452, offset: 0x013e9ec3, size: 275 bytes, params: 2, frame: 19
var accentColor;
var backgroundColor;
var highlightColor;
var opacity;
var LIGHT;
var DARK;
var object4;
var object5;
var processColorBinding;
var object6;
shouldProcessMobileColors = !(shouldProcessMobileColors === undefined) && shouldProcessMobileColors;
if (shouldProcessMobileColors) {
if (palette == null) {
return palette;
}
LIGHT = palette.LIGHT;
DARK = palette.DARK;
object4 = {};
object5 = {};
processColorBinding = processColor;
accentColor = LIGHT?.accentColor;
object5.accentColor = processColorBinding(accentColor);
processColorBinding = processColor;
backgroundColor = LIGHT?.backgroundColor;
object5.backgroundColor = processColorBinding(backgroundColor);
processColorBinding = processColor;
highlightColor = LIGHT?.highlightColor;
object5.highlightColor = processColorBinding(highlightColor);
opacity = LIGHT?.opacity;
object5.opacity = opacity;
object4.LIGHT = object5;
object6 = {};
processColorBinding = processColor;
accentColor = DARK?.accentColor;
object6.accentColor = processColorBinding(accentColor);
processColorBinding = processColor;
backgroundColor = DARK?.backgroundColor;
object6.backgroundColor = processColorBinding(backgroundColor);
processColorBinding = processColor;
highlightColor = DARK?.highlightColor;
object6.highlightColor = processColorBinding(highlightColor);
opacity = DARK?.opacity;
object6.opacity = opacity;
object4.DARK = object6;
return object4;
}
return palette;
}
function triggerFullscreenAnimation({channelId, messageId, emoji}) { // fn#57593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:2087, offset: 0x013e9fd6, size: 72 bytes, params: 2, frame: 15
const burstReactionFirstSendActionSheetModule = require(7211) /* metro dependency 7211: BurstReactionFirstSendActionSheet */;
burstReactionFirstSendActionSheetModule.openBurstReactionFirstSendActionSheet({channelId: channelId,
messageId: messageId, emoji: emoji});
}
}
function* _fun57587(a0) { // fn#57587, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:330, offset: 0x013e9af4, size: 285 bytes, params: 2, frame: 18
var environment;
var r6;
var binding;
var value4;
let value = undefined;
if (false) {
return value;
}
const id = a0.id;
let name = a0.name;
if (id != null) {
value = environment.__proto__.__proto__;
value = env2_1(env2_2[7]);
value = value.getEmojiURL({'id': null, 'size': 32, 'animated': false, id: id});
r6 = value;
} else {
value = environment.__proto__.__proto__;
value = env2_8(name);
r6 = value;
}
if (r6 !== '') {
value = environment.__proto__.__proto__;
binding = env2_0;
value = undefined;
value4 = binding(env2_2[9]);
yield value4.getPaletteForAvatar(r6);
} else {
value = environment.__proto__.__proto__;
var ImageManager = env2_5.ImageManager;
var getEmojiBase64 = ImageManager.getEmojiBase64;
name = a0.name;
var EMOJI_IN_ANIMATION_SIZE = env2_0(env2_2[8]).EMOJI_IN_ANIMATION_SIZE;
yield Reflect.apply(getEmojiBase64, ImageManager, [name, EMOJI_IN_ANIMATION_SIZE]);
if (false) {
return undefined;
function filterUnsupportedEmojis(a0) { // fn#57589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:787, offset: 0x013e9c5d, size: 84 bytes, params: 2, frame: 15
var r0;
let value = a0;
if (PlatformUtilsModule.isAndroid()) {
r0 = value;
} else {
value = (importDefault(22) /* metro dependency 22 */).filter(value, _fun57590);
r0 = value;
}
value = 'data:image/png;base64,' + value;
r6 = value;
value = environment.__proto__.__proto__;
binding = env2_0;
value = undefined;
value4 = binding(env2_2[9]);
yield value4.getPaletteForAvatar(r6);
return r0;
function _fun57590({unicodeVersion}) { // fn#57590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:870, offset: 0x013e9cb1, size: 530 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = require(4092) /* metro dependency 4092: DeviceUtils */;
value = value.getSystemVersionMajor();
const systemVersionMinor = (require(4092) /* metro dependency 4092: DeviceUtils */).getSystemVersionMinor();
return !(unicodeVersion > 8) || (unicodeVersion === 9 ? value > 10 || value === 10 && systemVersionMinor >= 2 : unicodeVersion === 10 ? value > 11 || value === 11 && systemVersionMinor >= 1 : unicodeVersion === 11 ? value > 12 || value === 12 && systemVersionMinor >= 1 : unicodeVersion === 12 || unicodeVersion === 12.1 ? value > 13 || value === 13 && systemVersionMinor >= 2 : unicodeVersion === 13 ? value > 14 || value === 14 && systemVersionMinor >= 2 : unicodeVersion === 13.1 ? value > 14 || value === 14 && systemVersionMinor >= 5 : unicodeVersion === 14 ? value > 15 || value === 15 && systemVersionMinor >= 4 : unicodeVersion === 15 ? value > 16 || value === 16 && systemVersionMinor >= 4 : unicodeVersion === 15.1 ? value > 17 || value === 17 && systemVersionMinor >= 4 : !(unicodeVersion !== 16) && (value > 18 || value === 18 && systemVersionMinor >= 4));
}
}
const value5 = undefined;
if (false) {
return value5;
function applyPlatformToThemedEmojiColorPalette({palette, shouldProcessMobileColors}) { // fn#57591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:1452, offset: 0x013e9ec3, size: 275 bytes, params: 2, frame: 19
var accentColor;
var backgroundColor;
var highlightColor;
var opacity;
var LIGHT;
var DARK;
var object;
var object2;
var processColorBinding;
var object3;
shouldProcessMobileColors = !(shouldProcessMobileColors === undefined) && shouldProcessMobileColors;
if (shouldProcessMobileColors) {
if (palette == null) {
return palette;
}
LIGHT = palette.LIGHT;
DARK = palette.DARK;
object = {};
object2 = {};
processColorBinding = processColor;
accentColor = LIGHT?.accentColor;
object2.accentColor = processColorBinding(accentColor);
processColorBinding = processColor;
backgroundColor = LIGHT?.backgroundColor;
object2.backgroundColor = processColorBinding(backgroundColor);
processColorBinding = processColor;
highlightColor = LIGHT?.highlightColor;
object2.highlightColor = processColorBinding(highlightColor);
opacity = LIGHT?.opacity;
object2.opacity = opacity;
object.LIGHT = object2;
object3 = {};
processColorBinding = processColor;
accentColor = DARK?.accentColor;
object3.accentColor = processColorBinding(accentColor);
processColorBinding = processColor;
backgroundColor = DARK?.backgroundColor;
object3.backgroundColor = processColorBinding(backgroundColor);
processColorBinding = processColor;
highlightColor = DARK?.highlightColor;
object3.highlightColor = processColorBinding(highlightColor);
opacity = DARK?.opacity;
object3.opacity = opacity;
object.DARK = object3;
return object;
}
return palette;
}
return value5 == null ? value : value5.map(_fun57588);
}
function _fun57590({unicodeVersion}) { // fn#57590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:870, offset: 0x013e9cb1, size: 530 bytes, params: 2, frame: 15
let value = environment.__proto__;
value = require(4092) /* metro dependency 4092: DeviceUtils */;
value = value.getSystemVersionMajor();
const systemVersionMinor = (require(4092) /* metro dependency 4092: DeviceUtils */).getSystemVersionMinor();
return !(unicodeVersion > 8) || (unicodeVersion === 9 ? value > 10 || value === 10 && systemVersionMinor >= 2 : unicodeVersion === 10 ? value > 11 || value === 11 && systemVersionMinor >= 1 : unicodeVersion === 11 ? value > 12 || value === 12 && systemVersionMinor >= 1 : unicodeVersion === 12 || unicodeVersion === 12.1 ? value > 13 || value === 13 && systemVersionMinor >= 2 : unicodeVersion === 13 ? value > 14 || value === 14 && systemVersionMinor >= 2 : unicodeVersion === 13.1 ? value > 14 || value === 14 && systemVersionMinor >= 5 : unicodeVersion === 14 ? value > 15 || value === 15 && systemVersionMinor >= 4 : unicodeVersion === 15 ? value > 16 || value === 16 && systemVersionMinor >= 4 : unicodeVersion === 15.1 ? value > 17 || value === 17 && systemVersionMinor >= 4 : !(unicodeVersion !== 16) && (value > 18 || value === 18 && systemVersionMinor >= 4));
}
function triggerFullscreenAnimation({channelId, messageId, emoji}) { // fn#57593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:2087, offset: 0x013e9fd6, size: 72 bytes, params: 2, frame: 15
BurstReactionFirstSendActionSheetModule.openBurstReactionFirstSendActionSheet({channelId: channelId,
messageId: messageId, emoji: emoji});
}
function _fun57588(a0) { // fn#57588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7349:620, offset: 0x013e9c11, size: 76 bytes, params: 2, frame: 17
const value = environment.__proto__.__proto__.__proto__;
const value2 = env3_3(a0, 3);
return env3_0(env3_2[10]).rgbToHex(value2[0], value2[1], value2[2]);
}
global.__d(_fun57583, 7171, [57, 5, 27, 3798, 4092, 477, 22, 1423, 7172, 1475, 4000, 7211, 7216,
2]) /* metro module 7171, dependencies: [57, 5, 27, 3798, 4092, 477, 22, 1423, 7172, 1475, 4000, 7211, 7216, 2] */;
+27 -24
View File
@@ -1,33 +1,36 @@
/* Metro module 12844; source: utils/ErrorCommonUtils.tsx; dependencies: [694, 571, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun97997(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13034:6, offset: 0x0219874a, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ErrorCommonUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/ErrorCommonUtils.tsx');
exports.getUpdatedOptions = getUpdatedOptions;
}
function getUpdatedOptions(a0) { // fn#97998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13034:172, offset: 0x021987b1, size: 189 bytes, params: 2, frame: 19
var r4;
var object4;
const object6 = {};
copyDataProperties(object6, a0, undefined);
const object7 = {};
copyDataProperties(object7, a0?.extra, undefined);
const object8 = {};
if ((importDefault(694) /* metro dependency 694: Dispatcher */)._currentDispatchActionType != null) {
object4 = {};
object4.currentAction = (importDefault(694) /* metro dependency 694: Dispatcher */)._currentDispatchActionType;
r4 = object4;
} else {
r4 = {};
function getUpdatedOptions(a0) { // fn#97998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13034:172, offset: 0x021987b1, size: 189 bytes, params: 2, frame: 19
var r4;
var object;
const object2 = {};
copyDataProperties(object2, a0, undefined);
const object3 = {};
copyDataProperties(object3, a0?.extra, undefined);
const object5 = {};
if ((importDefault(694) /* metro dependency 694: Dispatcher */)._currentDispatchActionType != null) {
object = {};
object.currentAction = (importDefault(694) /* metro dependency 694: Dispatcher */)._currentDispatchActionType;
r4 = object;
} else {
r4 = {};
}
copyDataProperties(object5, r4, 0);
value = require(571) /* metro dependency 571: LastFewActions */;
value = value.serialize();
object5['lastFewActions'] = value;
copyDataProperties(object3, object5, 0);
object2['extra'] = object3;
return object2;
}
copyDataProperties(object8, r4, 0);
value = require(571) /* metro dependency 571: LastFewActions */;
value = value.serialize();
object8['lastFewActions'] = value;
copyDataProperties(object7, object8, 0);
object6['extra'] = object7;
return object6;
}
global.__d(_fun97997, 12844, [694, 571, 2]) /* metro module 12844, dependencies: [694, 571, 2] */;
+45 -42
View File
@@ -1,56 +1,59 @@
/* Metro module 7362; source: utils/ErrorUtils.tsx; dependencies: [7363, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun59318(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7540:6, offset: 0x016e5989, size: 116 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ErrorUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/ErrorUtils.tsx');
exports.getUnderlyingIOSError = getUnderlyingIOSError;
exports.serializeError = serializeError;
}
function getUnderlyingIOSExceptionRecursively(a0) { // fn#59319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7540:44, offset: 0x016e59fd, size: 69 bytes, params: 2, frame: 13
let userInfo = a0.userInfo;
let NSUnderlyingError = userInfo.NSUnderlyingError;
if (NSUnderlyingError == null) {
return a0.userInfo.NSLocalizedDescription;
function getUnderlyingIOSExceptionRecursively(a0) { // fn#59319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7540:44, offset: 0x016e59fd, size: 69 bytes, params: 2, frame: 13
let userInfo = a0.userInfo;
let NSUnderlyingError = userInfo.NSUnderlyingError;
if (NSUnderlyingError == null) {
return a0.userInfo.NSLocalizedDescription;
}
const getUnderlyingIOSExceptionRecursivelyBinding = getUnderlyingIOSExceptionRecursively;
userInfo = a0.userInfo;
NSUnderlyingError = userInfo.NSUnderlyingError;
const underlyingIOSExceptionRecursivelyBinding = getUnderlyingIOSExceptionRecursivelyBinding(NSUnderlyingError);
if (underlyingIOSExceptionRecursivelyBinding != null) {
return underlyingIOSExceptionRecursivelyBinding;
}
userInfo = a0.userInfo;
return userInfo.NSLocalizedDescription;
}
const getUnderlyingIOSExceptionRecursivelyBinding = getUnderlyingIOSExceptionRecursively;
userInfo = a0.userInfo;
NSUnderlyingError = userInfo.NSUnderlyingError;
const underlyingIOSExceptionRecursivelyBinding = getUnderlyingIOSExceptionRecursivelyBinding(NSUnderlyingError);
if (underlyingIOSExceptionRecursivelyBinding != null) {
return underlyingIOSExceptionRecursivelyBinding;
function getUnderlyingIOSError(a0) { // fn#59320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7540:395, offset: 0x016e5a42, size: 42 bytes, params: 2, frame: 12
var r0;
var value;
var value2;
var value3;
var error;
try {
value = environment;
value = getUnderlyingIOSExceptionRecursively(a0);
value2 = null;
value3 = value2 != value;
r0 = value3 ? value : value2;
} catch (error) {
return null;
}
return r0;
}
userInfo = a0.userInfo;
return userInfo.NSLocalizedDescription;
}
function getUnderlyingIOSError(a0) { // fn#59320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7540:395, offset: 0x016e5a42, size: 42 bytes, params: 2, frame: 12
var r0;
var value;
var value2;
var value3;
var error;
try {
value = environment;
value = getUnderlyingIOSExceptionRecursively(a0);
value2 = null;
value3 = value2 != value;
r0 = value3 ? value : value2;
} catch (error) {
return null;
function serializeError(a0) { // fn#59321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7540:544, offset: 0x016e5a6c, size: 156 bytes, params: 2, frame: 15
let value = a0;
const Boolean = global.Boolean;
const r2 = Boolean(value) ? value : new global.Error('unknown error');
const r4 = typeof r2 === 'object' ? r2 : new global.Error(global.String(r2));
const JSON = global.JSON;
const stringify = JSON.stringify;
value = require(7363) /* metro dependency 7363 */;
return Reflect.apply(stringify, JSON, [value.normalizeToSize(r4)]);
}
return r0;
}
function serializeError(a0) { // fn#59321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7540:544, offset: 0x016e5a6c, size: 156 bytes, params: 2, frame: 15
let value = a0;
const Boolean = global.Boolean;
const r2 = Boolean(value) ? value : new global.Error('unknown error');
const r4 = typeof r2 === 'object' ? r2 : new global.Error(global.String(r2));
const JSON = global.JSON;
const stringify = JSON.stringify;
value = require(7363) /* metro dependency 7363 */;
return Reflect.apply(stringify, JSON, [value.normalizeToSize(r4)]);
}
global.__d(_fun59318, 7362, [7363, 2]) /* metro module 7362, dependencies: [7363, 2] */;
+412 -406
View File
@@ -1,6 +1,10 @@
/* Metro module 4112; source: utils/ExperimentUtils.tsx; dependencies: [57, 4107, 4108, 4106, 22, 2] */
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import ExperimentStore from '../modules/experiments/ExperimentStore.tsx'; /* Metro dependency 4107 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ExperimentConstantsModule from '../modules/experiments/ExperimentConstants.tsx'; /* Metro dependency 4108 */
function _fun33764(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:6, offset: 0x0103afc8, size: 253 bytes, params: 8, frame: 20
var object2;
let env0_0 = require;
const _arrayLikeToArray_33767 = function(a0, a1) {
var r0;
@@ -72,12 +76,7 @@ function _fun33764(global, require, importDefault, importAll, module, exports, d
};
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const experimentConstantsModule = require(4108) /* metro dependency 4108: ExperimentConstants */;
const env0_5 = experimentConstantsModule.ExperimentTypes;
const env0_6 = experimentConstantsModule.ExperimentBuckets;
object2 = {getFirstEligibleUserExperiment: closure, isInExperimentBucket: isInExperimentBucket,
object = {getFirstEligibleUserExperiment: closure, isInExperimentBucket: isInExperimentBucket,
experimentDescriptorEquals: experimentDescriptorEquals,
trackExposureToFirstEligibleUserExperiment: trackExposureToFirstEligibleUserExperiment,
getExperimentBucketName: getExperimentBucketName, getRecentExperimentBuckets: function(a0, a1) {
@@ -85,83 +84,151 @@ function _fun33764(global, require, importDefault, importAll, module, exports, d
var Object = global.Object;
return Object.entries(a0).reduce(_fun33774, {});
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ExperimentUtils.tsx');
exports.default = object2;
}
function _createForOfIteratorHelperLoose_33765(a0, a1) { // fn#33765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:173, offset: 0x0103b0c5, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
(FileImportTrackerModule).fileFinishedImporting('utils/ExperimentUtils.tsx');
exports.default = object;
function _createForOfIteratorHelperLoose_33765(a0, a1) { // fn#33765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:173, offset: 0x0103b0c5, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun33766;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_33767(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun33766;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_33767(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_33767(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_33767(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun33766;
}
return _fun33766;
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun33766() { // fn#33766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:744, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function isInExperimentBucket(a0, a1) { // fn#33769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:1363, offset: 0x0103b292, size: 32 bytes, params: 3, frame: 11
return ExperimentStore.getUserExperimentBucket(a0) === a1;
}
function isInExperimentBucket(a0, a1) { // fn#33769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:1363, offset: 0x0103b292, size: 32 bytes, params: 3, frame: 11
return ExperimentStore.getUserExperimentBucket(a0) === a1;
}
function experimentDescriptorEquals(a0, a1) { // fn#33770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:1466, offset: 0x0103b2b2, size: 224 bytes, params: 3, frame: 14
var type;
var value;
var USER;
if (a0 != null) {
if (a0 === a1) {
return true;
}
function experimentDescriptorEquals(a0, a1) { // fn#33770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:1466, offset: 0x0103b2b2, size: 224 bytes, params: 3, frame: 14
var type;
var value;
var USER;
if (a0 != null) {
if (a0 === a1) {
return true;
}
if (a0 != null) {
if (a0 == null) {
if (a0 == null) {
return true;
}
if (a1 == null) {
return true;
}
type = a0.type;
if (type !== a1.type) {
return false;
}
if (a0.bucket !== a1.bucket) {
return false;
}
if (a0.revision !== a1.revision) {
return false;
}
type = a0.type;
USER = ExperimentTypes.USER;
if (type !== USER) {
return true;
}
type = a1.type;
USER = ExperimentTypes.USER;
if (type === USER) {
value = importDefault(22) /* metro dependency 22 */;
return value.isEqual(a0.context, a1.context);
}
return true;
}
if (a1 == null) {
return false;
}
if (a0 == null) {
return true;
}
if (a1 == null) {
return true;
}
type = a0.type;
if (type !== a1.type) {
return false;
}
if (a0.bucket !== a1.bucket) {
return false;
}
if (a0.revision !== a1.revision) {
return false;
}
type = a0.type;
USER = ExperimentTypes.USER;
if (type !== USER) {
return true;
}
type = a1.type;
USER = ExperimentTypes.USER;
if (type === USER) {
value = importDefault(22) /* metro dependency 22 */;
return value.isEqual(a0.context, a1.context);
}
return true;
}
if (a1 != null) {
return false;
}
if (a0 == null) {
if (a0 == null) {
return true;
@@ -222,79 +289,79 @@ function experimentDescriptorEquals(a0, a1) { // fn#33770, source: /ci/build/dis
value = importDefault(22) /* metro dependency 22 */;
return value.isEqual(a0.context, a1.context);
}
return true;
}
if (a1 != null) {
return false;
}
if (a0 == null) {
if (a0 == null) {
return true;
}
} else {
if (a1 == null) {
return true;
}
type = a0.type;
if (type !== a1.type) {
return false;
}
if (a0.bucket !== a1.bucket) {
return false;
}
if (a0.revision !== a1.revision) {
return false;
}
type = a0.type;
USER = ExperimentTypes.USER;
if (type !== USER) {
if (a0 === a1) {
return true;
}
type = a1.type;
USER = ExperimentTypes.USER;
if (type === USER) {
value = importDefault(22) /* metro dependency 22 */;
return value.isEqual(a0.context, a1.context);
if (a0 != null) {
if (a0 == null) {
if (a0 == null) {
return true;
}
if (a1 == null) {
return true;
}
type = a0.type;
if (type !== a1.type) {
return false;
}
if (a0.bucket !== a1.bucket) {
return false;
}
if (a0.revision !== a1.revision) {
return false;
}
type = a0.type;
USER = ExperimentTypes.USER;
if (type !== USER) {
return true;
}
type = a1.type;
USER = ExperimentTypes.USER;
if (type === USER) {
value = importDefault(22) /* metro dependency 22 */;
return value.isEqual(a0.context, a1.context);
}
return true;
}
if (a1 == null) {
return false;
}
if (a0 == null) {
return true;
}
if (a1 == null) {
return true;
}
type = a0.type;
if (type !== a1.type) {
return false;
}
if (a0.bucket !== a1.bucket) {
return false;
}
if (a0.revision !== a1.revision) {
return false;
}
type = a0.type;
USER = ExperimentTypes.USER;
if (type !== USER) {
return true;
}
type = a1.type;
USER = ExperimentTypes.USER;
if (type === USER) {
value = importDefault(22) /* metro dependency 22 */;
return value.isEqual(a0.context, a1.context);
}
return true;
}
if (a1 != null) {
return false;
}
return true;
}
if (a1 == null) {
return false;
}
if (a0 == null) {
return true;
}
if (a1 == null) {
return true;
}
type = a0.type;
if (type !== a1.type) {
return false;
}
if (a0.bucket !== a1.bucket) {
return false;
}
if (a0.revision !== a1.revision) {
return false;
}
type = a0.type;
USER = ExperimentTypes.USER;
if (type !== USER) {
return true;
}
type = a1.type;
USER = ExperimentTypes.USER;
if (type === USER) {
value = importDefault(22) /* metro dependency 22 */;
return value.isEqual(a0.context, a1.context);
}
} else {
if (a1 == null) {
return true;
}
if (a0 === a1) {
return true;
}
if (a0 != null) {
if (a0 == null) {
if (a0 == null) {
return true;
@@ -355,293 +422,232 @@ function experimentDescriptorEquals(a0, a1) { // fn#33770, source: /ci/build/dis
value = importDefault(22) /* metro dependency 22 */;
return value.isEqual(a0.context, a1.context);
}
return true;
}
if (a1 != null) {
return false;
}
if (a0 == null) {
if (a0 == null) {
return true;
}
if (a1 == null) {
return true;
}
type = a0.type;
if (type !== a1.type) {
return false;
}
if (a0.bucket !== a1.bucket) {
return false;
}
if (a0.revision !== a1.revision) {
return false;
}
type = a0.type;
USER = ExperimentTypes.USER;
if (type !== USER) {
return true;
}
type = a1.type;
USER = ExperimentTypes.USER;
if (type === USER) {
value = importDefault(22) /* metro dependency 22 */;
return value.isEqual(a0.context, a1.context);
}
return true;
}
if (a1 == null) {
return false;
}
if (a0 == null) {
return true;
}
if (a1 == null) {
return true;
}
type = a0.type;
if (type !== a1.type) {
return false;
}
if (a0.bucket !== a1.bucket) {
return false;
}
if (a0.revision !== a1.revision) {
return false;
}
type = a0.type;
USER = ExperimentTypes.USER;
if (type !== USER) {
return true;
}
type = a1.type;
USER = ExperimentTypes.USER;
if (type === USER) {
value = importDefault(22) /* metro dependency 22 */;
return value.isEqual(a0.context, a1.context);
return true;
}
function trackExposureToFirstEligibleUserExperiment(a0) { // fn#33771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:1862, offset: 0x0103b392, size: 85 bytes, params: 2, frame: 15
var value3;
var property;
var property2;
const firstEligibleUserExperiment = getFirstEligibleUserExperiment(a0);
if (firstEligibleUserExperiment != null) {
value3 = Module00057(firstEligibleUserExperiment, 2);
property = value3[0];
property2 = value3[1];
(require(4106) /* metro dependency 4106: ExperimentManager */).trackExposureToExperiment(property, property2);
return property2;
}
}
return true;
}
function trackExposureToFirstEligibleUserExperiment(a0) { // fn#33771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:1862, offset: 0x0103b392, size: 85 bytes, params: 2, frame: 15
var value3;
var property;
var property2;
const firstEligibleUserExperiment = getFirstEligibleUserExperiment(a0);
if (firstEligibleUserExperiment != null) {
value3 = env0_3(firstEligibleUserExperiment, 2);
property = value3[0];
property2 = value3[1];
(require(4106) /* metro dependency 4106: ExperimentManager */).trackExposureToExperiment(property, property2);
return property2;
function getExperimentBucketName(a0) { // fn#33772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:2071, offset: 0x0103b3e7, size: 75 bytes, params: 2, frame: 13
const CONTROL = ExperimentBuckets.CONTROL;
return a0 === CONTROL ? 'Control' : a0 === ExperimentBuckets.NOT_ELIGIBLE ? 'Not Eligible' : 'Treatment ' + a0;
}
}
function getExperimentBucketName(a0) { // fn#33772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:2071, offset: 0x0103b3e7, size: 75 bytes, params: 2, frame: 13
const CONTROL = ExperimentBuckets.CONTROL;
return a0 === CONTROL ? 'Control' : a0 === ExperimentBuckets.NOT_ELIGIBLE ? 'Not Eligible' : 'Treatment ' + a0;
}
function getRecentExperimentBuckets(a0, a1) { // fn#33773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:2217, offset: 0x0103b432, size: 52 bytes, params: 3, frame: 13
const env0_0 = a1;
const Object = global.Object;
return Object.entries(a0).reduce(_fun33774, {});
}
function _fun33774(a0, a1) { // fn#33774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:2291, offset: 0x0103b466, size: 254 bytes, params: 3, frame: 22
var r1;
var r3;
var r4;
var item3;
var value3;
var split;
var value5;
var binding;
var property;
var property2;
var slice;
var Date;
var concat;
var prototype;
var date;
var error;
var CONTROL;
const iterator = a1[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
let value = undefined;
const value2 = item2 === value;
const r2 = value2 ? value : item;
reducibleJoin3: while (true) {
if (value2) {
r1 = value;
r3 = item2;
r4 = value2;
break reducibleJoin3;
}
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = value;
r3 = item3;
r4 = value3;
break reducibleJoin3;
}
r1 = item;
r3 = item3;
r4 = value3;
break reducibleJoin3;
}
reducibleJoin5: while (true) {
if (r4) {
break reducibleJoin5;
}
r3.return();
break reducibleJoin5;
}
reducibleJoin8: while (true) {
reduciblePort38: while (true) {
exceptionLanding37: while (true) {
function getRecentExperimentBuckets(a0, a1) { // fn#33773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:2217, offset: 0x0103b432, size: 52 bytes, params: 3, frame: 13
const env0_0 = a1;
const Object = global.Object;
return Object.entries(a0).reduce(_fun33774, {});
function _fun33774(a0, a1) { // fn#33774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4277:2291, offset: 0x0103b466, size: 254 bytes, params: 3, frame: 22
var r1;
var r3;
var r4;
var item3;
var value3;
var split;
var value5;
var binding;
var property;
var property2;
var slice;
var Date;
var concat;
var prototype;
var date;
var error;
var CONTROL;
const iterator = a1[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
let value = undefined;
const value2 = item2 === value;
const r2 = value2 ? value : item;
reducibleJoin3: while (true) {
if (value2) {
r1 = value;
r3 = item2;
r4 = value2;
break reducibleJoin3;
}
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = value;
r3 = item3;
r4 = value3;
break reducibleJoin3;
}
r1 = item;
r3 = item3;
r4 = value3;
break reducibleJoin3;
}
reducibleJoin5: while (true) {
if (r4) {
break reducibleJoin5;
}
r3.return();
break reducibleJoin5;
}
reducibleJoin8: while (true) {
reduciblePort38: while (true) {
exceptionLanding37: while (true) {
try {
split = r2.split;
} catch (error) {
break exceptionLanding37;
}
break reducibleJoin8;
}
value = false;
r3 = value;
break reduciblePort38;
}
reducibleJoin40: while (true) {
if (r3) {
value = environment.__proto__;
CONTROL = ExperimentBuckets.CONTROL;
value = r1 > CONTROL;
r3 = value;
break reducibleJoin40;
}
break reducibleJoin40;
}
reducibleJoin42: while (true) {
if (r3) {
a0[r2] = r1;
break reducibleJoin42;
}
break reducibleJoin42;
}
return a0;
}
try {
value5 = Reflect.apply(split, r2, ['-']);
} catch (error) {
break exceptionLanding37;
}
try {
binding = env1_3;
} catch (error) {
break exceptionLanding37;
}
try {
value = binding(value5, 2);
} catch (error) {
break exceptionLanding37;
}
try {
property = value[0];
} catch (error) {
break exceptionLanding37;
}
try {
property2 = value[1];
} catch (error) {
break exceptionLanding37;
}
try {
value = property2 == null;
} catch (error) {
break exceptionLanding37;
}
if (value) {
value = false;
r3 = value;
} else {
try {
split = r2.split;
slice = property2.slice;
} catch (error) {
break exceptionLanding37;
}
try {
value = Reflect.apply(slice, property2, [0, 2]);
} catch (error) {
break exceptionLanding37;
}
try {
Date = global.Date;
} catch (error) {
break exceptionLanding37;
}
try {
} catch (error) {
break exceptionLanding37;
}
try {
} catch (error) {
break exceptionLanding37;
}
try {
value = Reflect.apply(concat, '', [property, '-', value, '-01']);
} catch (error) {
break exceptionLanding37;
}
try {
prototype = Date.prototype;
} catch (error) {
break exceptionLanding37;
}
try {
} catch (error) {
break exceptionLanding37;
}
try {
date = new Date(value);
} catch (error) {
break exceptionLanding37;
}
try {
value = date instanceof Object ? date : undefined;
} catch (error) {
break exceptionLanding37;
}
try {
value = value > require;
} catch (error) {
break exceptionLanding37;
}
break reducibleJoin8;
}
value = false;
r3 = value;
break reduciblePort38;
}
reducibleJoin40: while (true) {
if (r3) {
value = environment.__proto__;
CONTROL = ExperimentBuckets.CONTROL;
value = r1 > CONTROL;
r3 = value;
}
reducibleJoin40: while (true) {
if (r3) {
value = environment.__proto__;
CONTROL = ExperimentBuckets.CONTROL;
value = r1 > CONTROL;
r3 = value;
break reducibleJoin40;
}
break reducibleJoin40;
}
break reducibleJoin40;
}
reducibleJoin42: while (true) {
if (r3) {
a0[r2] = r1;
reducibleJoin42: while (true) {
if (r3) {
a0[r2] = r1;
break reducibleJoin42;
}
break reducibleJoin42;
}
break reducibleJoin42;
return a0;
}
return a0;
}
try {
value5 = Reflect.apply(split, r2, ['-']);
} catch (error) {
break exceptionLanding37;
}
try {
binding = env1_3;
} catch (error) {
break exceptionLanding37;
}
try {
value = binding(value5, 2);
} catch (error) {
break exceptionLanding37;
}
try {
property = value[0];
} catch (error) {
break exceptionLanding37;
}
try {
property2 = value[1];
} catch (error) {
break exceptionLanding37;
}
try {
value = property2 == null;
} catch (error) {
break exceptionLanding37;
}
if (value) {
value = false;
r3 = value;
} else {
try {
slice = property2.slice;
} catch (error) {
break exceptionLanding37;
}
try {
value = Reflect.apply(slice, property2, [0, 2]);
} catch (error) {
break exceptionLanding37;
}
try {
Date = global.Date;
} catch (error) {
break exceptionLanding37;
}
try {
} catch (error) {
break exceptionLanding37;
}
try {
} catch (error) {
break exceptionLanding37;
}
try {
value = Reflect.apply(concat, '', [property, '-', value, '-01']);
} catch (error) {
break exceptionLanding37;
}
try {
prototype = Date.prototype;
} catch (error) {
break exceptionLanding37;
}
try {
} catch (error) {
break exceptionLanding37;
}
try {
date = new Date(value);
} catch (error) {
break exceptionLanding37;
}
try {
value = date instanceof Object ? date : undefined;
} catch (error) {
break exceptionLanding37;
}
try {
value = value > require;
} catch (error) {
break exceptionLanding37;
}
r3 = value;
}
reducibleJoin40: while (true) {
if (r3) {
value = environment.__proto__;
CONTROL = ExperimentBuckets.CONTROL;
value = r1 > CONTROL;
r3 = value;
break reducibleJoin40;
}
break reducibleJoin40;
}
reducibleJoin42: while (true) {
if (r3) {
a0[r2] = r1;
break reducibleJoin42;
}
break reducibleJoin42;
}
return a0;
}
global.__d(_fun33764, 4112, [57, 4107, 4108, 4106, 22,
2]) /* metro module 4112, dependencies: [57, 4107, 4108, 4106, 22, 2] */;
+178 -174
View File
@@ -1,11 +1,14 @@
/* Metro module 11218; source: utils/FileManagerUtils.android.tsx; dependencies: [5, 3, 1279, 2] */
import Logger from '../modules/debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun85744(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11404:6, offset: 0x01f7a792, size: 219 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('FileManagerUtils');
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/FileManagerUtils.android.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/FileManagerUtils.android.tsx');
exports.writeFile = writeFile;
exports.moveFile = moveFile;
exports.removeFile = removeFile;
@@ -13,182 +16,183 @@ function _fun85744(global, require, importDefault, importAll, module, exports, d
exports.readFile = function() {
return _readFile.apply(this, arguments);
};
}
function _readFile() { // fn#85745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11404:143, offset: 0x01f7a86d, size: 50 bytes, params: 1, frame: 14
return env0_2(_fun85747).apply(this, arguments);
}
function writeFile(a0, a1, a2, a3) { // fn#85748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11404:655, offset: 0x01f7a9d4, size: 128 bytes, params: 5, frame: 19
var r0;
var value;
if ((importDefault(1279) /* metro dependency 1279: NativeFileModule */) == null) {
r0 = undefined;
} else {
value = importDefault(1279) /* metro dependency 1279: NativeFileModule */;
value = value.writeFile(a0, a1, a2, a3);
value = value.then(function(a0) {
return 'file:' + a0;
});
r0 = value;
}
r0 = r0 ?? global.Promise.reject("RTNFileManager doesn't exist?");
return r0;
}
function moveFile(a0, a1, a2) { // fn#85750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11404:840, offset: 0x01f7aa71, size: 102 bytes, params: 4, frame: 17
var r0;
var value;
if ((importDefault(1279) /* metro dependency 1279: NativeFileModule */) == null) {
r0 = undefined;
} else {
value = importDefault(1279) /* metro dependency 1279: NativeFileModule */;
value = value.moveFile(a0, a1, a2);
r0 = value;
}
r0 = r0 ?? global.Promise.reject(false);
return r0;
}
function removeFile(a0, a1) { // fn#85751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11404:969, offset: 0x01f7aad7, size: 98 bytes, params: 3, frame: 15
var r0;
var value;
if ((importDefault(1279) /* metro dependency 1279: NativeFileModule */) == null) {
r0 = undefined;
} else {
value = importDefault(1279) /* metro dependency 1279: NativeFileModule */;
value = value.removeFile(a0, a1);
r0 = value;
}
r0 = r0 ?? global.Promise.reject(false);
return r0;
}
function clearFolder(a0, a1) { // fn#85752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11404:1099, offset: 0x01f7ab39, size: 98 bytes, params: 3, frame: 15
var r0;
var value;
if ((importDefault(1279) /* metro dependency 1279: NativeFileModule */) == null) {
r0 = undefined;
} else {
value = importDefault(1279) /* metro dependency 1279: NativeFileModule */;
value = value.clearFolder(a0, a1);
r0 = value;
}
r0 = r0 ?? global.Promise.reject(false);
return r0;
}
function* _fun85747(a0, a1, a2) { // fn#85747, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11404:184, offset: 0x01f7a8aa, size: 298 bytes, params: 4, frame: 22
var r6;
var r2;
var value5;
var value6;
var binding2;
var property;
var value10;
var readFile;
var value11;
var value12;
var value13;
var value14;
var value15;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_0;
const value3 = binding(env2_1[2]);
const value4 = null;
if (value4 == value3) {
r2 = value4;
} else {
if (a0 === 'cache') {
value6 = env2_0(env2_1[2]);
r6 = value6.getConstants().CacheDirPath;
} else {
value5 = env2_0(env2_1[2]);
r6 = value5.getConstants().DocumentsDirPath;
function _readFile() { // fn#85745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11404:143, offset: 0x01f7a86d, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun85747).apply(this, arguments);
function* _fun85747(a0, a1, a2) { // fn#85747, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11404:184, offset: 0x01f7a8aa, size: 298 bytes, params: 4, frame: 22
var r6;
var r2;
var value5;
var value6;
var binding2;
var property;
var value10;
var readFile;
var value11;
var value12;
var value13;
var value14;
var value15;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_0;
const value3 = binding(env2_1[2]);
const value4 = null;
if (value4 == value3) {
r2 = value4;
} else {
if (a0 === 'cache') {
value6 = env2_0(env2_1[2]);
r6 = value6.getConstants().CacheDirPath;
} else {
value5 = env2_0(env2_1[2]);
r6 = value5.getConstants().DocumentsDirPath;
}
r2 = r6;
}
if (value4 == r2) {
return value4;
}
const value7 = env2_0(env2_1[2]);
yield value7.fileExists(r2 + '/' + a1);
const value8 = undefined;
if (false) {
return value8;
}
if (!value8) {
return value4;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
try {
binding2 = env2_1;
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
try {
property = binding2[2];
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
try {
value10 = binding(property);
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
try {
readFile = value10.readFile;
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
try {
value11 = r2 + '/';
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
try {
value12 = value11 + a1;
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
try {
value13 = Reflect.apply(readFile, value10, [value12, a2]);
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
yield value13;
try {
value14 = undefined;
value15 = false;
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
return value15 ? value14 : value14;
}
r2 = r6;
}
if (value4 == r2) {
return value4;
function writeFile(a0, a1, a2, a3) { // fn#85748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11404:655, offset: 0x01f7a9d4, size: 128 bytes, params: 5, frame: 19
var r0;
var value;
if ((importDefault(1279) /* metro dependency 1279: NativeFileModule */) == null) {
r0 = undefined;
} else {
value = importDefault(1279) /* metro dependency 1279: NativeFileModule */;
value = value.writeFile(a0, a1, a2, a3);
value = value.then(function(a0) {
return 'file:' + a0;
});
r0 = value;
}
r0 = r0 ?? global.Promise.reject("RTNFileManager doesn't exist?");
return r0;
}
const value7 = env2_0(env2_1[2]);
yield value7.fileExists(r2 + '/' + a1);
const value8 = undefined;
if (false) {
return value8;
function moveFile(a0, a1, a2) { // fn#85750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11404:840, offset: 0x01f7aa71, size: 102 bytes, params: 4, frame: 17
var r0;
var value;
if ((importDefault(1279) /* metro dependency 1279: NativeFileModule */) == null) {
r0 = undefined;
} else {
value = importDefault(1279) /* metro dependency 1279: NativeFileModule */;
value = value.moveFile(a0, a1, a2);
r0 = value;
}
r0 = r0 ?? global.Promise.reject(false);
return r0;
}
if (!value8) {
return value4;
function removeFile(a0, a1) { // fn#85751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11404:969, offset: 0x01f7aad7, size: 98 bytes, params: 3, frame: 15
var r0;
var value;
if ((importDefault(1279) /* metro dependency 1279: NativeFileModule */) == null) {
r0 = undefined;
} else {
value = importDefault(1279) /* metro dependency 1279: NativeFileModule */;
value = value.removeFile(a0, a1);
r0 = value;
}
r0 = r0 ?? global.Promise.reject(false);
return r0;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
function clearFolder(a0, a1) { // fn#85752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11404:1099, offset: 0x01f7ab39, size: 98 bytes, params: 3, frame: 15
var r0;
var value;
if ((importDefault(1279) /* metro dependency 1279: NativeFileModule */) == null) {
r0 = undefined;
} else {
value = importDefault(1279) /* metro dependency 1279: NativeFileModule */;
value = value.clearFolder(a0, a1);
r0 = value;
}
r0 = r0 ?? global.Promise.reject(false);
return r0;
}
try {
binding2 = env2_1;
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
try {
property = binding2[2];
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
try {
value10 = binding(property);
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
try {
readFile = value10.readFile;
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
try {
value11 = r2 + '/';
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
try {
value12 = value11 + a1;
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
try {
value13 = Reflect.apply(readFile, value10, [value12, a2]);
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
yield value13;
try {
value14 = undefined;
value15 = false;
} catch (error) {
binding = env2_3;
binding.error('Failed to read file from disk', error);
return value4;
}
return value15 ? value14 : value14;
}
global.__d(_fun85744, 11218, [5, 3, 1279, 2]) /* metro module 11218, dependencies: [5, 3, 1279, 2] */;
+71 -67
View File
@@ -1,83 +1,87 @@
/* Metro module 4136; source: utils/FileSizeUtils.tsx; dependencies: [1244, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun34338(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#34338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4307:6, offset: 0x01053560, size: 151 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = formatSize;
const formatSize2 = formatSize;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = {'useKibibytes': false, 'showDecimalForGB': true, 'useSpace': true};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/FileSizeUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/FileSizeUtils.tsx');
exports.BYTE_IN_KB = 1024;
exports.KB_IN_MB = 1024;
exports.formatSize = closure;
exports.formatSize = formatSize2;
exports.formatKbSize = formatKbSize;
}
function formatSize(a0) { // fn#34339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4307:155, offset: 0x010535f7, size: 332 bytes, params: 2, frame: 19
var useSpace;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
let value = a1;
let r0 = value !== undefined ? value : env0_3;
let useKibibytes = r0.useKibibytes;
value = 1000;
const r7 = useKibibytes ? env0_2 : value;
useKibibytes = r0.useKibibytes;
const r1 = useKibibytes ? 1024 : value;
let Math = global.Math;
value = Math.ceil(a0 / r7);
if (value < r1) {
function formatSize(a0) { // fn#34339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4307:155, offset: 0x010535f7, size: 332 bytes, params: 2, frame: 19
var useSpace;
const intl = (IndexNativeModule).intl;
var formatToPlainString;
const t = (IndexNativeModule).t;
let value = a1;
let r0 = value !== undefined ? value : env0_3;
let useKibibytes = r0.useKibibytes;
value = 1000;
const r7 = useKibibytes ? env0_2 : value;
useKibibytes = r0.useKibibytes;
const r1 = useKibibytes ? 1024 : value;
let Math = global.Math;
value = Math.ceil(a0 / r7);
if (value < r1) {
useSpace = r0.useSpace;
formatToPlainString = intl.formatToPlainString;
r0 = useSpace ? Reflect.apply(formatToPlainString, intl, [t.cS889N,
{size: value}]) : Reflect.apply(formatToPlainString, intl, [t.pIn7Af, {size: value}]);
return r0;
}
value /= r1;
const showDecimalForGB = r0.showDecimalForGB;
Math = global.Math;
const round = Math.round;
const r8 = showDecimalForGB ? Reflect.apply(round, Math, [10 * value]) / 10 : Reflect.apply(round, Math, [value]);
useSpace = r0.useSpace;
formatToPlainString = intl.formatToPlainString;
r0 = useSpace ? Reflect.apply(formatToPlainString, intl, [t.cS889N,
{size: value}]) : Reflect.apply(formatToPlainString, intl, [t.pIn7Af, {size: value}]);
return useSpace ? Reflect.apply(formatToPlainString, intl, [t.yhEXX7,
{size: r8}]) : Reflect.apply(formatToPlainString, intl, [t.TbMX9D, {size: r8}]);
}
function formatKbSize(a0) { // fn#34340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4307:727, offset: 0x01053743, size: 229 bytes, params: 2, frame: 19
var useSpace;
var intl;
var formatToPlainString;
var t;
var kEk9pr;
var object;
var bTzRR6;
let value = a1;
const r4 = value !== undefined ? value : env0_3;
let useKibibytes = r4.useKibibytes;
value = 1000;
const value3 = a0 / (useKibibytes ? 1024 : value);
useKibibytes = r4.useKibibytes;
let r0 = useKibibytes ? env0_2 : value;
if (value3 / r0 >= 1) {
r0 = formatSize(value3, r4);
} else {
useSpace = r4.useSpace;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (useSpace) {
bTzRR6 = t.bTzRR6;
object = {};
object.size = global.Math.ceil(value3);
r0 = Reflect.apply(formatToPlainString, intl, [bTzRR6, object]);
} else {
kEk9pr = t.kEk9pr;
object = {};
object.size = global.Math.ceil(value3);
r0 = Reflect.apply(formatToPlainString, intl, [kEk9pr, object]);
}
}
return r0;
}
value /= r1;
const showDecimalForGB = r0.showDecimalForGB;
Math = global.Math;
const round = Math.round;
const r8 = showDecimalForGB ? Reflect.apply(round, Math, [10 * value]) / 10 : Reflect.apply(round, Math, [value]);
useSpace = r0.useSpace;
formatToPlainString = intl.formatToPlainString;
return useSpace ? Reflect.apply(formatToPlainString, intl, [t.yhEXX7,
{size: r8}]) : Reflect.apply(formatToPlainString, intl, [t.TbMX9D, {size: r8}]);
}
function formatKbSize(a0) { // fn#34340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4307:727, offset: 0x01053743, size: 229 bytes, params: 2, frame: 19
var useSpace;
var intl;
var formatToPlainString;
var t;
var kEk9pr;
var object2;
var bTzRR6;
let value = a1;
const r4 = value !== undefined ? value : env0_3;
let useKibibytes = r4.useKibibytes;
value = 1000;
const value3 = a0 / (useKibibytes ? 1024 : value);
useKibibytes = r4.useKibibytes;
let r0 = useKibibytes ? env0_2 : value;
if (value3 / r0 >= 1) {
r0 = formatSize(value3, r4);
} else {
useSpace = r4.useSpace;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (useSpace) {
bTzRR6 = t.bTzRR6;
object2 = {};
object2.size = global.Math.ceil(value3);
r0 = Reflect.apply(formatToPlainString, intl, [bTzRR6, object2]);
} else {
kEk9pr = t.kEk9pr;
object2 = {};
object2.size = global.Math.ceil(value3);
r0 = Reflect.apply(formatToPlainString, intl, [kEk9pr, object2]);
}
}
return r0;
}
global.__d(_fun34338, 4136, [1244, 2]) /* metro module 4136, dependencies: [1244, 2] */;
+243 -230
View File
@@ -1,4 +1,14 @@
/* Metro module 4655; source: utils/FileUtils.tsx; dependencies: [1867, 1878, 661, 1880, 22, 4656, 4657, 3802, 4136, 1244, 2] */
import GuildStore from '../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PremiumUtils from './PremiumUtils.tsx'; /* Metro dependency 3802 */
import Module04656 from '../by-id/module-04656.js'; /* Metro dependency 4656 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as FileSizeUtilsModule from './FileSizeUtils.tsx'; /* Metro dependency 4136 */
import * as FileUploadPowerupHoldoutExperimentModule from '../modules/premium/powerups/experiments/FileUploadPowerupHoldoutExperiment.tsx'; /* Metro dependency 4657 */
function _fun40174(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:6, offset: 0x010f8628, size: 928 bytes, params: 8, frame: 28
const env0_0 = require;
const _arrayLikeToArray_40177 = function(a0, a1) {
@@ -50,15 +60,13 @@ function _fun40174(global, require, importDefault, importAll, module, exports, d
var value2 = new File([a0], a1, {type: a2});
return value2 instanceof Object ? value2 : value;
};
const closure2 = classifyFileName;
const closure3 = maxFileSize;
const closure4 = getUploadFileSizeSum;
const closure5 = getMaxRequestSize;
const classifyFileName2 = classifyFileName;
const maxFileSize2 = maxFileSize;
const getUploadFileSizeSum2 = getUploadFileSizeSum;
const getMaxRequestSize2 = getMaxRequestSize;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const GuildFeatures = value.GuildFeatures;
const env0_6 = value.MAX_ATTACHMENT_SIZE;
value = require(1880) /* metro dependency 1880: PremiumConstants */;
@@ -87,254 +95,259 @@ function _fun40174(global, require, importDefault, importAll, module, exports, d
items2[1] = [MAX_FILE_SIZE_100_MB, MAX_GUILD_FILE_SIZE_100_MB];
const MAX_FILE_SIZE_50_MB = GuildFeatures.MAX_FILE_SIZE_50_MB;
items2[2] = [MAX_FILE_SIZE_50_MB, MAX_GUILD_FILE_SIZE_50_MB];
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/FileUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/FileUtils.tsx');
exports.transformNativeFile = transformNativeFile;
exports.makeFile = closure;
exports.classifyFile = function(a0) {
return classifyFileName(a0.name, a0.type);
};
exports.classifyFileName = closure2;
exports.classifyFileName = classifyFileName2;
exports.sizeString = sizeString;
exports.maxFileSize = closure3;
exports.maxFileSize = maxFileSize2;
exports.anyFileTooLarge = anyFileTooLarge;
exports.getUploadFileSizeSum = closure4;
exports.getUploadFileSizeSum = getUploadFileSizeSum2;
exports.uploadSumTooLarge = function(a0) {
var value2 = getUploadFileSizeSum(a0);
getMaxRequestSize();
return value2 > 524288000;
};
exports.getMaxRequestSize = closure5;
exports.getMaxRequestSize = getMaxRequestSize2;
exports.fileUploadLimitRoadblockDescription = fileUploadLimitRoadblockDescription;
}
function _createForOfIteratorHelperLoose_40175(a0, a1) { // fn#40175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:315, offset: 0x010f89c8, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_40175(a0, a1) { // fn#40175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:315, offset: 0x010f89c8, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun40176;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_40177(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun40176;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_40177(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_40177(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_40177(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun40176;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function classifyFileName(a0, a1) { // fn#40179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:2148, offset: 0x010f8b75, size: 120 bytes, params: 3, frame: 16
let env0_0 = a0;
const env0_1 = a1;
env0_0 = a0?.toLowerCase() ?? '';
value = Reflect.apply((importDefault(22) /* metro dependency 22 */).find, value, [env0_8, _fun40180]);
return value != null ? value.klass : 'unknown';
}
function maxFileSize(a0) { // fn#40181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:2469, offset: 0x010f8c55, size: 118 bytes, params: 2, frame: 16
const userMaxFileSize = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).getUserMaxFileSize(UserStore.getCurrentUser());
if (a0 == null) {
return userMaxFileSize;
}
const guild = GuildStore.getGuild(a0);
const r3 = guild != null ? getGuildMaxFileSize(guild) : MAX_ATTACHMENT_SIZE;
const Math = global.Math;
return Math.max(r3, userMaxFileSize);
}
function getUploadFileSizeSum(a0) { // fn#40184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:2852, offset: 0x010f8db7, size: 70 bytes, params: 2, frame: 16
var r2;
var r3;
var r0;
var value4;
var size;
var value5;
var value6;
const value = _createForOfIteratorHelperLoose_40175(a0);
const value2 = value();
let done = value2.done;
const value3 = 0;
if (done) {
r0 = value3;
} else {
r2 = value3;
for (r3 = value2; true; r3 = value6) {
value4 = r3.value;
size = value4.size;
value5 = r2 + size;
value6 = value();
done = value6.done;
if (done) {
r0 = value5;
break;
}
r2 = value5;
}
}
return r0;
}
function getMaxRequestSize() { // fn#40185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:2977, offset: 0x010f8dfd, size: 40 bytes, params: 1, frame: 9
const currentUser = UserStore.getCurrentUser();
if (currentUser != null) {
currentUser.isStaff();
}
return 524288000;
}
function transformNativeFile(a0, a1) { // fn#40186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:3146, offset: 0x010f8e25, size: 77 bytes, params: 3, frame: 17
var r0;
var makeFileBinding;
var buffer;
var filename;
let value = a0;
const value2 = a1;
const File = global.File;
if (value instanceof File) {
r0 = value;
} else {
makeFileBinding = makeFile;
buffer = value.data.buffer;
filename = value.filename;
value = 'text/plain';
value = makeFileBinding(buffer, filename, value2 ?? value);
r0 = value;
}
return r0;
}
function sizeString(a0) { // fn#40188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:3419, offset: 0x010f8e90, size: 41 bytes, params: 2, frame: 11
return (importDefault(4656) /* metro dependency 4656 */).filesize(a0);
}
function anyFileTooLarge(a0, a1) { // fn#40189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:3516, offset: 0x010f8eb9, size: 62 bytes, params: 3, frame: 12
const env0_0 = maxFileSize(a1);
const Array = global.Array;
return Array.from(a0).some(_fun40190);
}
function fileUploadLimitRoadblockDescription({guildId, onClick, maxSize}) { // fn#40192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:3835, offset: 0x010f8f31, size: 204 bytes, params: 2, frame: 20
const fileSizeUtilsModule = require(4136) /* metro dependency 4136: FileSizeUtils */;
let formatSize = fileSizeUtilsModule.formatSize;
const value4 = Reflect.apply(formatSize, fileSizeUtilsModule,
[(maxSize ?? maxFileSize(guildId)) / 1024, {useKibibytes: true}]);
const moduleValue2 = fileSizeUtilsModule;
formatSize = moduleValue2.formatSize;
let value = MAX_PREMIUM_TIER_2_ATTACHMENT_SIZE / 1024;
value = Reflect.apply(formatSize, moduleValue2, [value, {useKibibytes: true}]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.format((require(1244) /* metro dependency 1244: indexNative */).t.tRuxk9, {maxSize: value4,
premiumMaxSize: value, onClick: onClick});
}
function _fun40180(a0) { // fn#40180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:2261, offset: 0x010f8bed, size: 104 bytes, params: 2, frame: 14
var r0;
if (a0.reType == null) {
r0 = a0.reName != null && env0_0 !== '';
r0 = r0 && a0.reName.test(env0_0);
} else if (require != null) {
r0 = a0.reType.test(require);
} else {
r0 = a0.reName != null && env0_0 !== '';
r0 = r0 && a0.reName.test(env0_0);
}
return r0;
}
function getGuildMaxFileSize(a0) { // fn#40182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:2600, owner: maxFileSize.getGuildMaxFileSize, offset: 0x010f8ccb, size: 99 bytes, params: 2, frame: 15
const env0_0 = a0;
const FileUploadPowerupHoldoutExperiment = (require(4657) /* metro dependency 4657: FileUploadPowerupHoldoutExperiment */).FileUploadPowerupHoldoutExperiment;
const getConfig = FileUploadPowerupHoldoutExperiment.getConfig;
const env0_1 = Reflect.apply(getConfig, FileUploadPowerupHoldoutExperiment,
[{location: 'getGuildMaxFileSize'}]).enabled;
return env1_9.reduce(_fun40183, MAX_ATTACHMENT_SIZE);
}
function _fun40190({size}) { // fn#40190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:3594, offset: 0x010f8ef7, size: 21 bytes, params: 2, frame: 2
return size > env0_0;
}
function _fun40183(a0, a1) { // fn#40183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:2751, offset: 0x010f8d2e, size: 137 bytes, params: 3, frame: 16
var r0;
var r1;
var r2;
var item3;
var value4;
const value = a0;
const iterator = a1[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = undefined;
const value3 = item2 === value2;
const r5 = value3 ? value2 : item;
if (value3) {
r0 = item2;
r1 = value3;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value4 = item3 === value2;
if (value4) {
r0 = item3;
r1 = value4;
r2 = value2;
} else {
r0 = item3;
r1 = value4;
r2 = item;
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun40176;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun40176() { // fn#40176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:886, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
if (!r1) {
r0.return();
function classifyFileName(a0, a1) { // fn#40179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:2148, offset: 0x010f8b75, size: 120 bytes, params: 3, frame: 16
let env0_0 = a0;
const env0_1 = a1;
env0_0 = a0?.toLowerCase() ?? '';
value = Reflect.apply((importDefault(22) /* metro dependency 22 */).find, value, [env0_8, _fun40180]);
return value != null ? value.klass : 'unknown';
function _fun40180(a0) { // fn#40180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:2261, offset: 0x010f8bed, size: 104 bytes, params: 2, frame: 14
var r0;
if (a0.reType == null) {
r0 = a0.reName != null && env0_0 !== '';
r0 = r0 && a0.reName.test(env0_0);
} else if (require != null) {
r0 = a0.reType.test(require);
} else {
r0 = a0.reName != null && env0_0 !== '';
r0 = r0 && a0.reName.test(env0_0);
}
return r0;
}
}
return enabled && r5 === GuildFeatures.MAX_FILE_SIZE_250_MB ? value : env0_0.features.has(r5) && r2 > value ? r2 : value;
function maxFileSize(a0) { // fn#40181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:2469, offset: 0x010f8c55, size: 118 bytes, params: 2, frame: 16
const userMaxFileSize = (PremiumUtils).getUserMaxFileSize(UserStore.getCurrentUser());
if (a0 == null) {
return userMaxFileSize;
}
const guild = GuildStore.getGuild(a0);
const r3 = guild != null ? getGuildMaxFileSize(guild) : MAX_ATTACHMENT_SIZE;
const Math = global.Math;
return Math.max(r3, userMaxFileSize);
function getGuildMaxFileSize(a0) { // fn#40182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:2600, owner: maxFileSize.getGuildMaxFileSize, offset: 0x010f8ccb, size: 99 bytes, params: 2, frame: 15
const env0_0 = a0;
const FileUploadPowerupHoldoutExperiment = (FileUploadPowerupHoldoutExperimentModule).FileUploadPowerupHoldoutExperiment;
const getConfig = FileUploadPowerupHoldoutExperiment.getConfig;
const env0_1 = Reflect.apply(getConfig, FileUploadPowerupHoldoutExperiment,
[{location: 'getGuildMaxFileSize'}]).enabled;
return env1_9.reduce(_fun40183, MAX_ATTACHMENT_SIZE);
function _fun40183(a0, a1) { // fn#40183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:2751, offset: 0x010f8d2e, size: 137 bytes, params: 3, frame: 16
var r0;
var r1;
var r2;
var item3;
var value4;
const value = a0;
const iterator = a1[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = undefined;
const value3 = item2 === value2;
const r5 = value3 ? value2 : item;
if (value3) {
r0 = item2;
r1 = value3;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value4 = item3 === value2;
if (value4) {
r0 = item3;
r1 = value4;
r2 = value2;
} else {
r0 = item3;
r1 = value4;
r2 = item;
}
}
if (!r1) {
r0.return();
}
return enabled && r5 === GuildFeatures.MAX_FILE_SIZE_250_MB ? value : env0_0.features.has(r5) && r2 > value ? r2 : value;
}
}
}
function getUploadFileSizeSum(a0) { // fn#40184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:2852, offset: 0x010f8db7, size: 70 bytes, params: 2, frame: 16
var r2;
var r3;
var r0;
var value4;
var size;
var value5;
var value6;
const value = _createForOfIteratorHelperLoose_40175(a0);
const value2 = value();
let done = value2.done;
const value3 = 0;
if (done) {
r0 = value3;
} else {
r2 = value3;
for (r3 = value2; true; r3 = value6) {
value4 = r3.value;
size = value4.size;
value5 = r2 + size;
value6 = value();
done = value6.done;
if (done) {
r0 = value5;
break;
}
r2 = value5;
}
}
return r0;
}
function getMaxRequestSize() { // fn#40185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:2977, offset: 0x010f8dfd, size: 40 bytes, params: 1, frame: 9
const currentUser = UserStore.getCurrentUser();
if (currentUser != null) {
currentUser.isStaff();
}
return 524288000;
}
function transformNativeFile(a0, a1) { // fn#40186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:3146, offset: 0x010f8e25, size: 77 bytes, params: 3, frame: 17
var r0;
var makeFileBinding;
var buffer;
var filename;
let value = a0;
const value2 = a1;
const File = global.File;
if (value instanceof File) {
r0 = value;
} else {
makeFileBinding = makeFile;
buffer = value.data.buffer;
filename = value.filename;
value = 'text/plain';
value = makeFileBinding(buffer, filename, value2 ?? value);
r0 = value;
}
return r0;
}
function sizeString(a0) { // fn#40188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:3419, offset: 0x010f8e90, size: 41 bytes, params: 2, frame: 11
return (Module04656).filesize(a0);
}
function anyFileTooLarge(a0, a1) { // fn#40189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:3516, offset: 0x010f8eb9, size: 62 bytes, params: 3, frame: 12
const env0_0 = maxFileSize(a1);
const Array = global.Array;
return Array.from(a0).some(_fun40190);
function _fun40190({size}) { // fn#40190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:3594, offset: 0x010f8ef7, size: 21 bytes, params: 2, frame: 2
return size > env0_0;
}
}
function fileUploadLimitRoadblockDescription({guildId, onClick, maxSize}) { // fn#40192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4833:3835, offset: 0x010f8f31, size: 204 bytes, params: 2, frame: 20
let formatSize = FileSizeUtilsModule.formatSize;
const value4 = Reflect.apply(formatSize, FileSizeUtilsModule,
[(maxSize ?? maxFileSize(guildId)) / 1024, {useKibibytes: true}]);
formatSize = FileSizeUtilsModule.formatSize;
let value = MAX_PREMIUM_TIER_2_ATTACHMENT_SIZE / 1024;
value = Reflect.apply(formatSize, FileSizeUtilsModule, [value, {useKibibytes: true}]);
const intl = (IndexNativeModule).intl;
return intl.format((IndexNativeModule).t.tRuxk9, {maxSize: value4,
premiumMaxSize: value, onClick: onClick});
}
}
global.__d(_fun40174, 4655, [1867, 1878, 661, 1880, 22, 4656, 4657, 3802, 4136, 1244,
2]) /* metro module 4655, dependencies: [1867, 1878, 661, 1880, 22, 4656, 4657, 3802, 4136, 1244, 2] */;
+117 -113
View File
@@ -1,143 +1,147 @@
/* Metro module 8787; source: utils/FriendsUtils.tsx; dependencies: [57, 661, 1244, 44, 683, 8788, 2] */
import Module00044 from '../by-id/module-00044.js'; /* Metro dependency 44 */
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun68710(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8972:6, offset: 0x01c59942, size: 253 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = validateDiscordTag;
const closure2 = humanizeAbortCode;
const validateDiscordTag2 = validateDiscordTag;
const humanizeAbortCode2 = humanizeAbortCode;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.AbortCodes;
const env0_5 = constantsModule.AnalyticEvents;
const env0_6 = RegExp('^\\d+$', '');
const env0_7 = RegExp('^(.+?@.+?\\..+?|.+?#\\d{4})$', '');
const env0_8 = RegExp('^[a-zA-Z0-9_\\\\.]+$', '');
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/FriendsUtils.tsx');
exports.validateDiscordTag = closure;
(FileImportTrackerModule).fileFinishedImporting('utils/FriendsUtils.tsx');
exports.validateDiscordTag = validateDiscordTag2;
exports.isValidDiscordTag = isValidDiscordTag;
exports.humanizeAbortCode = closure2;
exports.humanizeAbortCode = humanizeAbortCode2;
exports.humanizeAbortCodeForA11y = humanizeAbortCodeForA11y;
}
function validateDiscordTag(a0) { // fn#68711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8972:214, offset: 0x01c59a3f, size: 338 bytes, params: 2, frame: 23
var r0;
var value5;
var property;
var property2;
var defaultImport;
var track;
var FRIEND_REQUEST_FAILED;
var object2;
var length;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
let binding = env0_8;
const value2 = binding.test(a0);
const value3 = null;
if (value2) {
r0 = value3;
} else if (a0.includes('#')) {
binding = env0_7;
if (binding.test(a0)) {
function validateDiscordTag(a0) { // fn#68711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8972:214, offset: 0x01c59a3f, size: 338 bytes, params: 2, frame: 23
var r0;
var value5;
var property;
var property2;
var defaultImport;
var track;
var FRIEND_REQUEST_FAILED;
var object;
var length;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
let binding = env0_8;
const value2 = binding.test(a0);
const value3 = null;
if (value2) {
r0 = value3;
} else if (a0.includes('#')) {
binding = env0_7;
if (binding.test(a0)) {
r0 = value3;
} else {
value5 = Module00057(a0.split('#'), 2);
property = value5[0];
property2 = value5[1];
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
FRIEND_REQUEST_FAILED = AnalyticEvents.FRIEND_REQUEST_FAILED;
object = {reason: 'Invalid Username', query: a0};
length = (value3 != property2 ? property2 : '').length;
object.discrim_len = length;
length = property.length;
object.username_len = length;
object.is_email_like = (importDefault(8788) /* metro dependency 8788: ValidationUtils */).isEmail(a0);
object.is_invite_like = (importDefault(8788) /* metro dependency 8788: ValidationUtils */).isInvite(a0);
object.is_num_only = env0_6.test(a0);
Reflect.apply(track, defaultImport, [FRIEND_REQUEST_FAILED, object]);
r0 = intl.string(t.paDJBM);
}
} else {
value5 = env0_3(a0.split('#'), 2);
value5 = Module00057(a0.split('#'), 2);
property = value5[0];
property2 = value5[1];
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
FRIEND_REQUEST_FAILED = AnalyticEvents.FRIEND_REQUEST_FAILED;
object2 = {reason: 'Invalid Username', query: a0};
object = {reason: 'Invalid Username', query: a0};
length = (value3 != property2 ? property2 : '').length;
object2.discrim_len = length;
object.discrim_len = length;
length = property.length;
object2.username_len = length;
object2.is_email_like = (importDefault(8788) /* metro dependency 8788: ValidationUtils */).isEmail(a0);
object2.is_invite_like = (importDefault(8788) /* metro dependency 8788: ValidationUtils */).isInvite(a0);
object2.is_num_only = env0_6.test(a0);
Reflect.apply(track, defaultImport, [FRIEND_REQUEST_FAILED, object2]);
object.username_len = length;
object.is_email_like = (importDefault(8788) /* metro dependency 8788: ValidationUtils */).isEmail(a0);
object.is_invite_like = (importDefault(8788) /* metro dependency 8788: ValidationUtils */).isInvite(a0);
object.is_num_only = env0_6.test(a0);
Reflect.apply(track, defaultImport, [FRIEND_REQUEST_FAILED, object]);
r0 = intl.string(t.paDJBM);
}
} else {
value5 = env0_3(a0.split('#'), 2);
property = value5[0];
property2 = value5[1];
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
FRIEND_REQUEST_FAILED = AnalyticEvents.FRIEND_REQUEST_FAILED;
object2 = {reason: 'Invalid Username', query: a0};
length = (value3 != property2 ? property2 : '').length;
object2.discrim_len = length;
length = property.length;
object2.username_len = length;
object2.is_email_like = (importDefault(8788) /* metro dependency 8788: ValidationUtils */).isEmail(a0);
object2.is_invite_like = (importDefault(8788) /* metro dependency 8788: ValidationUtils */).isInvite(a0);
object2.is_num_only = env0_6.test(a0);
Reflect.apply(track, defaultImport, [FRIEND_REQUEST_FAILED, object2]);
r0 = intl.string(t.paDJBM);
return r0;
}
return r0;
}
function humanizeAbortCode(a0, a1) { // fn#68712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8972:639, offset: 0x01c59b91, size: 608 bytes, params: 3, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const RELATIONSHIP_INCOMING_DISABLED = AbortCodes.RELATIONSHIP_INCOMING_DISABLED;
if (RELATIONSHIP_INCOMING_DISABLED === a0) {
return intl.format(t.Oxe6Ur, {discordTag: a1});
}
const TOO_MANY_FRIENDS = AbortCodes.TOO_MANY_FRIENDS;
if (TOO_MANY_FRIENDS === a0) {
return intl.string(t.tnBalD);
}
const RELATIONSHIP_ALREADY_FRIENDS = AbortCodes.RELATIONSHIP_ALREADY_FRIENDS;
if (RELATIONSHIP_ALREADY_FRIENDS === a0) {
return intl.string(t.VNLneq);
}
const USER_QUARANTINED = AbortCodes.USER_QUARANTINED;
if (USER_QUARANTINED === a0) {
return intl.string(t.EouHwv);
}
const USER_FRIEND_REQUEST_LIMITED_ACCESS = AbortCodes.USER_FRIEND_REQUEST_LIMITED_ACCESS;
if (USER_FRIEND_REQUEST_LIMITED_ACCESS === a0) {
return intl.string(t.EouHwv);
}
const TOO_MANY_BLOCKED_USERS = AbortCodes.TOO_MANY_BLOCKED_USERS;
if (TOO_MANY_BLOCKED_USERS === a0) {
return intl.string(t.sIGo1i);
}
const TOO_MANY_PENDING_OUTGOING = AbortCodes.TOO_MANY_PENDING_OUTGOING;
if (TOO_MANY_PENDING_OUTGOING === a0) {
return intl.string(t.k1K15p);
}
const RELATIONSHIP_INCOMING_BLOCKED = AbortCodes.RELATIONSHIP_INCOMING_BLOCKED;
if (RELATIONSHIP_INCOMING_BLOCKED !== a0) {
if (AbortCodes.RELATIONSHIP_INVALID_SELF !== a0) {
if (AbortCodes.RELATIONSHIP_INVALUD_USER_BOT !== a0) {
AbortCodes.RELATIONSHIP_INVALID_DISCORD_TAG;
function humanizeAbortCode(a0, a1) { // fn#68712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8972:639, offset: 0x01c59b91, size: 608 bytes, params: 3, frame: 16
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const RELATIONSHIP_INCOMING_DISABLED = AbortCodes.RELATIONSHIP_INCOMING_DISABLED;
if (RELATIONSHIP_INCOMING_DISABLED === a0) {
return intl.format(t.Oxe6Ur, {discordTag: a1});
}
const TOO_MANY_FRIENDS = AbortCodes.TOO_MANY_FRIENDS;
if (TOO_MANY_FRIENDS === a0) {
return intl.string(t.tnBalD);
}
const RELATIONSHIP_ALREADY_FRIENDS = AbortCodes.RELATIONSHIP_ALREADY_FRIENDS;
if (RELATIONSHIP_ALREADY_FRIENDS === a0) {
return intl.string(t.VNLneq);
}
const USER_QUARANTINED = AbortCodes.USER_QUARANTINED;
if (USER_QUARANTINED === a0) {
return intl.string(t.EouHwv);
}
const USER_FRIEND_REQUEST_LIMITED_ACCESS = AbortCodes.USER_FRIEND_REQUEST_LIMITED_ACCESS;
if (USER_FRIEND_REQUEST_LIMITED_ACCESS === a0) {
return intl.string(t.EouHwv);
}
const TOO_MANY_BLOCKED_USERS = AbortCodes.TOO_MANY_BLOCKED_USERS;
if (TOO_MANY_BLOCKED_USERS === a0) {
return intl.string(t.sIGo1i);
}
const TOO_MANY_PENDING_OUTGOING = AbortCodes.TOO_MANY_PENDING_OUTGOING;
if (TOO_MANY_PENDING_OUTGOING === a0) {
return intl.string(t.k1K15p);
}
const RELATIONSHIP_INCOMING_BLOCKED = AbortCodes.RELATIONSHIP_INCOMING_BLOCKED;
if (RELATIONSHIP_INCOMING_BLOCKED !== a0) {
if (AbortCodes.RELATIONSHIP_INVALID_SELF !== a0) {
if (AbortCodes.RELATIONSHIP_INVALUD_USER_BOT !== a0) {
AbortCodes.RELATIONSHIP_INVALID_DISCORD_TAG;
}
}
}
return intl.string(t.paDJBM);
}
return intl.string(t.paDJBM);
}
function isValidDiscordTag(a0) { // fn#68713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8972:1510, offset: 0x01c59df1, size: 25 bytes, params: 2, frame: 11
return validateDiscordTag(a0) == null;
}
function humanizeAbortCodeForA11y(a0, a1) { // fn#68714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8972:1641, offset: 0x01c59e0a, size: 145 bytes, params: 3, frame: 18
var r0;
var intl;
const value2 = humanizeAbortCode(a0, a1);
const RELATIONSHIP_INCOMING_DISABLED = AbortCodes.RELATIONSHIP_INCOMING_DISABLED;
if (a0 !== RELATIONSHIP_INCOMING_DISABLED) {
r0 = value2;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['ihb+UW'],
{discordTag: a1});
function isValidDiscordTag(a0) { // fn#68713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8972:1510, offset: 0x01c59df1, size: 25 bytes, params: 2, frame: 11
return validateDiscordTag(a0) == null;
}
(importDefault(44) /* metro dependency 44 */)(typeof r0 === 'string', 'abortCode should be a string for a11y');
return r0;
function humanizeAbortCodeForA11y(a0, a1) { // fn#68714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8972:1641, offset: 0x01c59e0a, size: 145 bytes, params: 3, frame: 18
var r0;
var intl;
const value2 = humanizeAbortCode(a0, a1);
const RELATIONSHIP_INCOMING_DISABLED = AbortCodes.RELATIONSHIP_INCOMING_DISABLED;
if (a0 !== RELATIONSHIP_INCOMING_DISABLED) {
r0 = value2;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['ihb+UW'],
{discordTag: a1});
}
(Module00044)(typeof r0 === 'string', 'abortCode should be a string for a11y');
return r0;
}
}
global.__d(_fun68710, 8787, [57, 661, 1244, 44, 683, 8788,
2]) /* metro module 8787, dependencies: [57, 661, 1244, 44, 683, 8788, 2] */;
+16 -13
View File
@@ -1,4 +1,6 @@
/* Metro module 1944; source: utils/FunctionUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun21582(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2071:6, offset: 0x00ef45fc, size: 122 bytes, params: 8, frame: 17
const closure = function(a0, a1) {
var r0;
@@ -37,7 +39,7 @@ function _fun21582(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/FunctionUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/FunctionUtils.tsx');
exports.areArraysShallowlyEqual = closure;
exports.cachedFunction = function(a0) {
var env0_0 = a0;
@@ -71,17 +73,18 @@ function _fun21582(global, require, importDefault, importAll, module, exports, d
}
return false;
};
function cachedFunction(a0) { // fn#21584, offset: 0x00ef46c9, size: 26 bytes, params: 2, frame: 3
const env0_0 = a0;
return _fun21585;
function _fun21585(a0) { // fn#21585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2071:439, offset: 0x00ef46e3, size: 77 bytes, params: 2, frame: 16
const value = copyRestArgs(0, undefined);
env0_2 = !areArraysShallowlyEqual(env0_1, value) ? apply(env0_0, [], undefined, arraySpread([], value, 0,
undefined)) : env0_2;
return env0_2;
}
}
}
function cachedFunction(a0) { // fn#21584, offset: 0x00ef46c9, size: 26 bytes, params: 2, frame: 3
const env0_0 = a0;
return _fun21585;
}
function _fun21585(a0) { // fn#21585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2071:439, offset: 0x00ef46e3, size: 77 bytes, params: 2, frame: 16
const value = copyRestArgs(0, undefined);
env0_2 = !areArraysShallowlyEqual(env0_1, value) ? apply(env0_0, [], undefined, arraySpread([], value, 0,
undefined)) : env0_2;
return env0_2;
}
global.__d(_fun21582, 1944, [2]) /* metro module 1944, dependencies: [2] */;
+17 -14
View File
@@ -1,4 +1,7 @@
/* Metro module 9819; source: utils/GIFPickerUtils.tsx; dependencies: [661, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun76911(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10005:6, offset: 0x01de93a4, size: 160 bytes, params: 8, frame: 20
const closure = function(a0) {
return a0 === 'Klipy';
@@ -8,8 +11,7 @@ function _fun76911(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/GIFPickerUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/GIFPickerUtils.tsx');
exports.isKlipyProvider = closure;
exports.shouldUseAnimatedWebPThumbnail = closure2;
exports.getGIFThumbnailForFavorite = function(a0) {
@@ -25,17 +27,18 @@ function _fun76911(global, require, importDefault, importAll, module, exports, d
}
};
exports.calculateAnalyticsMetadata = calculateAnalyticsMetadata;
function calculateAnalyticsMetadata(a0, a1, a2) { // fn#76915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10005:630, offset: 0x01de9495, size: 209 bytes, params: 4, frame: 19
let value = a2;
const value2 = null;
const r1 = value2 != a1 ? {[a1]: 1} : {};
const {offset, limit, results, totalResults} = value2 != value ? value : {};
const GIF = SearchTypes.GIF;
value = 1;
const Object = global.Object;
return {search_type: GIF, load_id: a0, limit: limit, offset: offset,
page: value2 != limit && value2 != offset ? global.Math.floor(offset / limit) + value : value, total_results: totalResults, page_results: value2 != results ? results : value2, num_modifiers: Object.keys(r1).length, modifiers: r1};
}
}
function calculateAnalyticsMetadata(a0, a1, a2) { // fn#76915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10005:630, offset: 0x01de9495, size: 209 bytes, params: 4, frame: 19
let value = a2;
const value2 = null;
const r1 = value2 != a1 ? {[a1]: 1} : {};
const {offset, limit, results, totalResults} = value2 != value ? value : {};
const GIF = SearchTypes.GIF;
value = 1;
const Object = global.Object;
return {search_type: GIF, load_id: a0, limit: limit, offset: offset,
page: value2 != limit && value2 != offset ? global.Math.floor(offset / limit) + value : value, total_results: totalResults, page_results: value2 != results ? results : value2, num_modifiers: Object.keys(r1).length, modifiers: r1};
}
global.__d(_fun76911, 9819, [661, 2]) /* metro module 9819, dependencies: [661, 2] */;
+4 -1
View File
@@ -1,8 +1,10 @@
/* Metro module 6871; source: utils/GameUtils.native.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun54401(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7049:6, offset: 0x01364b99, size: 232 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/GameUtils.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/GameUtils.native.tsx');
exports.default = {waitSubscribed: function() {
var Promise = global.Promise;
return Promise.resolve();
@@ -46,3 +48,4 @@ function _fun54401(global, require, importDefault, importAll, module, exports, d
}};
}
global.__d(_fun54401, 6871, [2]) /* metro module 6871, dependencies: [2] */;
File diff suppressed because it is too large. Load diff
+4 -1
View File
@@ -1,11 +1,13 @@
/* Metro module 1360; source: utils/GlobalUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun15586(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#15586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1487:6, offset: 0x00e36c4f, size: 185 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const GLOBAL_ENV = global.window.GLOBAL_ENV;
const PROJECT_ENV = GLOBAL_ENV.PROJECT_ENV;
const result = PROJECT_ENV === 'development';
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/GlobalUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/GlobalUtils.tsx');
exports.isDiscordFrontendDevelopment = function() {
return false;
};
@@ -32,3 +34,4 @@ function _fun15586(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun15586, 1360, [2]) /* metro module 1360, dependencies: [2] */;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+202 -196
View File
@@ -1,4 +1,9 @@
/* Metro module 1942; source: utils/GuildRoleRecordUtils.tsx; dependencies: [1419, 1939, 483, 673, 1941, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as BigFlagUtilsModule from '../external/discord_common/js/shared/utils/BigFlagUtils.tsx'; /* Metro dependency 483 */
import * as PlainRecordModule from '../lib/PlainRecord.tsx'; /* Metro dependency 1419 */
import * as GuildRoleRecordModule from '../records/GuildRoleRecord.tsx'; /* Metro dependency 1939 */
function _fun21569(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2069:6, offset: 0x00ef3e63, size: 269 bytes, params: 8, frame: 22
const env0_0 = require;
const _arrayLikeToArray_21572 = function(a0, a1) {
@@ -65,25 +70,21 @@ function _fun21569(global, require, importDefault, importAll, module, exports, d
}
return object;
};
const closure2 = fromServer_21574;
const fromServer_215742 = fromServer_21574;
const closure3 = function(a0) {
return constructInPlace(GuildRoleRecordTypeTag, a0);
};
const closure4 = fromSerialized;
const fromSerialized2 = fromSerialized;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const plainRecordModule = require(1419) /* metro dependency 1419: PlainRecord */;
const env0_3 = plainRecordModule.constructInPlace;
const env0_4 = plainRecordModule.objectIsPlainRecordOfType;
const env0_5 = (require(1939) /* metro dependency 1939: GuildRoleRecord */).GuildRoleRecordTypeTag;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/GuildRoleRecordUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/GuildRoleRecordUtils.tsx');
exports.isGuildRoleRecord = function(a0) {
return objectIsPlainRecordOfType(GuildRoleRecordTypeTag, a0);
};
exports.fromServerArray = closure;
exports.fromServer = closure2;
exports.fromServer = fromServer_215742;
exports.constructGuildRoleInPlace = closure3;
exports.fromSerialized = closure4;
exports.fromSerialized = fromSerialized2;
exports.fromSyncOperation = fromSyncOperation;
exports.fromSerializedPartition = function(a0, a1) {
var propertyName;
@@ -110,218 +111,223 @@ function _fun21569(global, require, importDefault, importAll, module, exports, d
}
return object;
};
}
function _createForOfIteratorHelperLoose_21570(a0, a1) { // fn#21570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2069:196, offset: 0x00ef3f70, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_21570(a0, a1) { // fn#21570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2069:196, offset: 0x00ef3f70, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun21571;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_21572(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun21571;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_21572(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_21572(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_21572(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun21571;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun21571() { // fn#21571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2069:767, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun21571;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function fromServer_21574(a0, a1) { // fn#21574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2069:1251, offset: 0x00ef412d, size: 371 bytes, params: 3, frame: 19
var r6;
var moduleValue2;
var value;
const constructGuildRoleInPlaceBinding = constructGuildRoleInPlace;
const object2 = {};
object2.id = a1.id;
object2.name = a1.name;
object2.guildId = a0;
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
object2.permissions = bigFlagUtilsModule.deserialize(a1.permissions);
object2.mentionable = a1.mentionable;
object2.position = a1.position;
let color = a1.color;
object2.color = color;
color = a1.color;
const value2 = null;
const value3 = 0;
if (value3 === color) {
r6 = value2;
} else {
moduleValue2 = require(673) /* metro dependency 673: ColorUtils */;
r6 = moduleValue2.int2hex(a1.color);
}
object2.colorString = r6;
const colors = a1.colors;
object2.colors = value2 != colors ? colors : value2;
if (value2 != a1.colors) {
value = require(1941) /* metro dependency 1941: EnhancedRoleColorUtils */;
value = value.extractColorStringsFromServerColors(a1.colors);
r6 = value;
} else {
r6 = value2;
}
object2.colorStrings = r6;
object2.hoist = a1.hoist;
const managed = a1.managed;
object2.managed = value2 != managed && managed;
const tags = a1.tags;
object2.tags = value2 != tags ? tags : {};
object2.icon = a1.icon;
object2.unicodeEmoji = a1.unicode_emoji;
const flags = a1.flags;
object2.flags = value2 != flags ? flags : value3;
const description = a1.description;
object2.description = value2 != description ? description : value2;
object2.version = a1.version;
return constructGuildRoleInPlaceBinding(object2);
}
function fromSerialized(a0, a1) { // fn#21576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2069:1894, offset: 0x00ef42b8, size: 385 bytes, params: 3, frame: 18
var r5;
var moduleValue2;
var value;
const constructGuildRoleInPlaceBinding = constructGuildRoleInPlace;
const object2 = {};
object2.id = a1.id;
object2.name = a1.name;
object2.guildId = a0;
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
object2.permissions = bigFlagUtilsModule.deserialize(a1.permissions);
object2.mentionable = a1.mentionable;
object2.position = a1.position;
let color = a1.color;
object2.color = color;
color = a1.color;
const value2 = null;
if (value2 != color) {
if (a1.color === 0) {
r5 = value2;
function fromServer_21574(a0, a1) { // fn#21574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2069:1251, offset: 0x00ef412d, size: 371 bytes, params: 3, frame: 19
var r6;
var moduleValue2;
var value;
const constructGuildRoleInPlaceBinding = constructGuildRoleInPlace;
const object = {};
object.id = a1.id;
object.name = a1.name;
object.guildId = a0;
object.permissions = BigFlagUtilsModule.deserialize(a1.permissions);
object.mentionable = a1.mentionable;
object.position = a1.position;
let color = a1.color;
object.color = color;
color = a1.color;
const value2 = null;
const value3 = 0;
if (value3 === color) {
r6 = value2;
} else {
moduleValue2 = require(673) /* metro dependency 673: ColorUtils */;
r5 = moduleValue2.int2hex(a1.color);
r6 = moduleValue2.int2hex(a1.color);
}
} else {
r5 = value2;
object.colorString = r6;
const colors = a1.colors;
object.colors = value2 != colors ? colors : value2;
if (value2 != a1.colors) {
value = require(1941) /* metro dependency 1941: EnhancedRoleColorUtils */;
value = value.extractColorStringsFromServerColors(a1.colors);
r6 = value;
} else {
r6 = value2;
}
object.colorStrings = r6;
object.hoist = a1.hoist;
const managed = a1.managed;
object.managed = value2 != managed && managed;
const tags = a1.tags;
object.tags = value2 != tags ? tags : {};
object.icon = a1.icon;
object.unicodeEmoji = a1.unicode_emoji;
const flags = a1.flags;
object.flags = value2 != flags ? flags : value3;
const description = a1.description;
object.description = value2 != description ? description : value2;
object.version = a1.version;
return constructGuildRoleInPlaceBinding(object);
}
object2.colorString = r5;
const colors = a1.colors;
object2.colors = value2 != colors ? colors : value2;
if (value2 != a1.colors) {
value = require(1941) /* metro dependency 1941: EnhancedRoleColorUtils */;
value = value.extractColorStringsFromServerColors(a1.colors);
r5 = value;
} else {
r5 = value2;
function fromSerialized(a0, a1) { // fn#21576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2069:1894, offset: 0x00ef42b8, size: 385 bytes, params: 3, frame: 18
var r5;
var moduleValue2;
var value;
const constructGuildRoleInPlaceBinding = constructGuildRoleInPlace;
const object = {};
object.id = a1.id;
object.name = a1.name;
object.guildId = a0;
object.permissions = BigFlagUtilsModule.deserialize(a1.permissions);
object.mentionable = a1.mentionable;
object.position = a1.position;
let color = a1.color;
object.color = color;
color = a1.color;
const value2 = null;
if (value2 != color) {
if (a1.color === 0) {
r5 = value2;
} else {
moduleValue2 = require(673) /* metro dependency 673: ColorUtils */;
r5 = moduleValue2.int2hex(a1.color);
}
} else {
r5 = value2;
}
object.colorString = r5;
const colors = a1.colors;
object.colors = value2 != colors ? colors : value2;
if (value2 != a1.colors) {
value = require(1941) /* metro dependency 1941: EnhancedRoleColorUtils */;
value = value.extractColorStringsFromServerColors(a1.colors);
r5 = value;
} else {
r5 = value2;
}
object.colorStrings = r5;
object.hoist = a1.hoist;
const managed = a1.managed;
object.managed = value2 != managed && managed;
const tags = a1.tags;
object.tags = value2 != tags ? tags : {};
object.icon = a1.icon;
object.unicodeEmoji = a1.unicodeEmoji;
const flags = a1.flags;
object.flags = value2 != flags ? flags : 0;
const description = a1.description;
object.description = value2 != description ? description : value2;
object.version = a1.version;
return constructGuildRoleInPlaceBinding(object);
}
object2.colorStrings = r5;
object2.hoist = a1.hoist;
const managed = a1.managed;
object2.managed = value2 != managed && managed;
const tags = a1.tags;
object2.tags = value2 != tags ? tags : {};
object2.icon = a1.icon;
object2.unicodeEmoji = a1.unicodeEmoji;
const flags = a1.flags;
object2.flags = value2 != flags ? flags : 0;
const description = a1.description;
object2.description = value2 != description ? description : value2;
object2.version = a1.version;
return constructGuildRoleInPlaceBinding(object2);
}
function fromSyncOperation(a0, a1, a2) { // fn#21578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2069:2803, offset: 0x00ef4451, size: 183 bytes, params: 4, frame: 19
var r4;
var value4;
var value5;
var value8;
var id;
var value9;
if (a1.op === 'full_sync') {
return fromServerArray(a0, a1.items);
}
const object2 = {};
copyDataProperties(object2, a2, undefined);
const value2 = _createForOfIteratorHelperLoose_21570(a1.deletes);
const value3 = value2();
let done = value3.done;
if (!done) {
r4 = value3;
reducibleLoop2: while (true) {
value4 = r4.value;
delete object2[value4];
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop2;
function fromSyncOperation(a0, a1, a2) { // fn#21578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2069:2803, offset: 0x00ef4451, size: 183 bytes, params: 4, frame: 19
var r4;
var value4;
var value5;
var value8;
var id;
var value9;
if (a1.op === 'full_sync') {
return fromServerArray(a0, a1.items);
}
const object = {};
copyDataProperties(object, a2, undefined);
const value2 = _createForOfIteratorHelperLoose_21570(a1.deletes);
const value3 = value2();
let done = value3.done;
if (!done) {
r4 = value3;
reducibleLoop2: while (true) {
value4 = r4.value;
delete object[value4];
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop2;
}
r4 = value5;
continue reducibleLoop2;
}
r4 = value5;
continue reducibleLoop2;
}
}
const value6 = _createForOfIteratorHelperLoose_21570(a1.writes);
const value7 = value6();
done = value7.done;
if (!done) {
r4 = value7;
reducibleLoop4: while (true) {
value8 = r4.value;
id = value8.id;
object2[id] = fromServer_21574(a0, value8);
value9 = value6();
done = value9.done;
if (done) {
break reducibleLoop4;
const value6 = _createForOfIteratorHelperLoose_21570(a1.writes);
const value7 = value6();
done = value7.done;
if (!done) {
r4 = value7;
reducibleLoop4: while (true) {
value8 = r4.value;
id = value8.id;
object[id] = fromServer_21574(a0, value8);
value9 = value6();
done = value9.done;
if (done) {
break reducibleLoop4;
}
r4 = value9;
continue reducibleLoop4;
}
r4 = value9;
continue reducibleLoop4;
}
return object;
}
return object2;
}
global.__d(_fun21569, 1942, [1419, 1939, 483, 673, 1941,
2]) /* metro module 1942, dependencies: [1419, 1939, 483, 673, 1941, 2] */;
+199 -190
View File
@@ -1,4 +1,6 @@
/* Metro module 1940; source: utils/GuildRoleUtils.tsx; dependencies: [21, 673, 1941, 1942, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun21555(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2067:6, offset: 0x00ef377c, size: 185 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_21558 = function(a0, a1) {
@@ -44,244 +46,251 @@ function _fun21555(global, require, importDefault, importAll, module, exports, d
}
return value;
};
const closure = compareGuildRoles;
const compareGuildRoles2 = compareGuildRoles;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/GuildRoleUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/GuildRoleUtils.tsx');
exports.sortGuildRoleRecords = function(a0) {
a0.sort(compareGuildRoles);
return a0;
};
exports.compareGuildRoles = closure;
exports.compareGuildRoles = compareGuildRoles2;
exports.doesRoleSortHigher = doesRoleSortHigher;
exports.sortInviteRoles = sortInviteRoles;
exports.inviteRoleToDisplayData = inviteRoleToDisplayData;
exports.filterRoleDeletes = filterRoleDeletes;
}
function _createForOfIteratorHelperLoose_21556(a0, a1) { // fn#21556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2067:46, offset: 0x00ef3835, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_21556(a0, a1) { // fn#21556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2067:46, offset: 0x00ef3835, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun21557;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_21558(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun21557;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_21558(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_21558(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_21558(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun21557;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun21557() { // fn#21557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2067:617, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun21557;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function compareGuildRoles(a0, a1) { // fn#21559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2067:956, offset: 0x00ef39a7, size: 179 bytes, params: 3, frame: 17
var r1;
var r0;
var value;
const guildId = a0.guildId;
let id = a0.id;
if (id === guildId) {
id = a1.id;
value = 1;
if (id !== guildId) {
r1 = value;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(a0.id, a1.id);
r1 = value;
}
r0 = r1;
} else {
id = a1.id;
value = -1;
}
function compareGuildRoles(a0, a1) { // fn#21559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2067:956, offset: 0x00ef39a7, size: 179 bytes, params: 3, frame: 17
var r1;
var r0;
var value;
const guildId = a0.guildId;
let id = a0.id;
if (id === guildId) {
r0 = value;
} else {
if (a0.position !== a1.position) {
r1 = a1.position - a0.position;
id = a1.id;
value = 1;
if (id !== guildId) {
r1 = value;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(a0.id, a1.id);
r1 = value;
}
r0 = r1;
} else {
id = a1.id;
value = -1;
if (id === guildId) {
r0 = value;
} else {
if (a0.position !== a1.position) {
r1 = a1.position - a0.position;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(a0.id, a1.id);
r1 = value;
}
r0 = r1;
}
}
return r0;
}
return r0;
}
function doesRoleSortHigher(a0, a1) { // fn#21561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2067:1406, offset: 0x00ef3a71, size: 29 bytes, params: 3, frame: 13
return compareGuildRoles(a0, a1) < 0;
}
function sortInviteRoles(a0, a1) { // fn#21562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2067:1491, offset: 0x00ef3a8e, size: 84 bytes, params: 3, frame: 15
var r0;
var value;
if (a0.position !== a1.position) {
r0 = a1.position - a0.position;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(a0.id, a1.id);
r0 = value;
function doesRoleSortHigher(a0, a1) { // fn#21561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2067:1406, offset: 0x00ef3a71, size: 29 bytes, params: 3, frame: 13
return compareGuildRoles(a0, a1) < 0;
}
return r0;
}
function inviteRoleToDisplayData(a0, a1) { // fn#21563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2067:1629, offset: 0x00ef3ae2, size: 197 bytes, params: 3, frame: 15
var r3;
var moduleValue;
var moduleValue2;
const object2 = {};
object2.id = a1.id;
object2.name = a1.name;
object2.guildId = a0;
const color = a1.color;
const value = null;
if (color === 0) {
r3 = value;
} else {
moduleValue = require(673) /* metro dependency 673: ColorUtils */;
r3 = moduleValue.int2hex(a1.color);
function sortInviteRoles(a0, a1) { // fn#21562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2067:1491, offset: 0x00ef3a8e, size: 84 bytes, params: 3, frame: 15
var r0;
var value;
if (a0.position !== a1.position) {
r0 = a1.position - a0.position;
} else {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(a0.id, a1.id);
r0 = value;
}
return r0;
}
object2.colorString = r3;
if (value != a1.colors) {
moduleValue2 = require(1941) /* metro dependency 1941: EnhancedRoleColorUtils */;
r3 = moduleValue2.extractColorStringsFromServerColors(a1.colors);
} else {
r3 = value;
}
object2.colorStrings = r3;
const icon = a1.icon;
object2.icon = value != icon ? icon : value;
const unicode_emoji = a1.unicode_emoji;
object2.unicodeEmoji = value != unicode_emoji ? unicode_emoji : value;
return object2;
}
function filterRoleDeletes(a0, a1) { // fn#21564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2067:1953, offset: 0x00ef3ba7, size: 208 bytes, params: 3, frame: 21
var r3;
var r4;
var value3;
var done;
var value4;
var value5;
var value8;
var id;
var moduleValue;
var fromServer;
var value9;
let value = a2;
const value2 = a3;
reducibleJoin2: while (true) {
if (value !== undefined) {
function inviteRoleToDisplayData(a0, a1) { // fn#21563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2067:1629, offset: 0x00ef3ae2, size: 197 bytes, params: 3, frame: 15
var r3;
var moduleValue;
var moduleValue2;
const object = {};
object.id = a1.id;
object.name = a1.name;
object.guildId = a0;
const color = a1.color;
const value = null;
if (color === 0) {
r3 = value;
} else {
moduleValue = require(673) /* metro dependency 673: ColorUtils */;
r3 = moduleValue.int2hex(a1.color);
}
object.colorString = r3;
if (value != a1.colors) {
moduleValue2 = require(1941) /* metro dependency 1941: EnhancedRoleColorUtils */;
r3 = moduleValue2.extractColorStringsFromServerColors(a1.colors);
} else {
r3 = value;
}
object.colorStrings = r3;
const icon = a1.icon;
object.icon = value != icon ? icon : value;
const unicode_emoji = a1.unicode_emoji;
object.unicodeEmoji = value != unicode_emoji ? unicode_emoji : value;
return object;
}
function filterRoleDeletes(a0, a1) { // fn#21564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2067:1953, offset: 0x00ef3ba7, size: 208 bytes, params: 3, frame: 21
var r3;
var r4;
var value3;
var done;
var value4;
var value5;
var value8;
var id;
var moduleValue;
var fromServer;
var value9;
let value = a2;
const value2 = a3;
reducibleJoin2: while (true) {
if (value !== undefined) {
r3 = value;
break reducibleJoin2;
}
r3 = [];
break reducibleJoin2;
}
r3 = [];
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (value2 !== undefined) {
r4 = value2;
reducibleJoin4: while (true) {
if (value2 !== undefined) {
r4 = value2;
break reducibleJoin4;
}
r4 = [];
break reducibleJoin4;
}
r4 = [];
break reducibleJoin4;
}
if (r4.length + r3.length === 0) {
return a1;
}
const object2 = {};
copyDataProperties(object2, a1, undefined);
reducibleJoin8: while (true) {
if (r4 == null) {
break reducibleJoin8;
if (r4.length + r3.length === 0) {
return a1;
}
value = environment;
value = _createForOfIteratorHelperLoose_21556(r4);
value3 = value();
done = value3.done;
if (done) {
break reducibleJoin8;
}
r4 = value3;
reducibleLoop7: while (true) {
value4 = r4.value;
delete object2[value4];
value5 = value();
done = value5.done;
const object = {};
copyDataProperties(object, a1, undefined);
reducibleJoin8: while (true) {
if (r4 == null) {
break reducibleJoin8;
}
value = environment;
value = _createForOfIteratorHelperLoose_21556(r4);
value3 = value();
done = value3.done;
if (done) {
break reducibleJoin8;
}
r4 = value5;
continue reducibleLoop7;
}
}
const value6 = _createForOfIteratorHelperLoose_21556(r3);
const value7 = value6();
done = value7.done;
if (!done) {
r3 = value7;
reducibleLoop9: while (true) {
value8 = r3.value;
id = value8.id;
moduleValue = importAll(1942) /* metro dependency 1942: GuildRoleRecordUtils */;
fromServer = moduleValue.fromServer;
object2[id] = Reflect.apply(fromServer, moduleValue, [a0, value8]);
value9 = value6();
done = value9.done;
if (done) {
break reducibleLoop9;
r4 = value3;
reducibleLoop7: while (true) {
value4 = r4.value;
delete object[value4];
value5 = value();
done = value5.done;
if (done) {
break reducibleJoin8;
}
r4 = value5;
continue reducibleLoop7;
}
r3 = value9;
continue reducibleLoop9;
}
const value6 = _createForOfIteratorHelperLoose_21556(r3);
const value7 = value6();
done = value7.done;
if (!done) {
r3 = value7;
reducibleLoop9: while (true) {
value8 = r3.value;
id = value8.id;
moduleValue = importAll(1942) /* metro dependency 1942: GuildRoleRecordUtils */;
fromServer = moduleValue.fromServer;
object[id] = Reflect.apply(fromServer, moduleValue, [a0, value8]);
value9 = value6();
done = value9.done;
if (done) {
break reducibleLoop9;
}
r3 = value9;
continue reducibleLoop9;
}
}
return object;
}
return object2;
}
global.__d(_fun21555, 1940, [21, 673, 1941, 1942,
2]) /* metro module 1940, dependencies: [21, 673, 1941, 1942, 2] */;
+123 -117
View File
@@ -1,140 +1,146 @@
/* Metro module 6592; source: utils/GuildUtils.tsx; dependencies: [1867, 1878, 1393, 672, 6593, 3995, 1244, 2] */
import Durations from './Durations.tsx'; /* Metro dependency 672 */
import Module01393 from '../by-id/module-01393.js'; /* Metro dependency 1393 */
import GuildStore from '../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UserUtilsModule from './UserUtils.tsx'; /* Metro dependency 3995 */
function _fun51866(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:6, offset: 0x012e6708, size: 254 bytes, params: 8, frame: 21
var object2;
const env0_0 = require;
const closure = getGuildNameSuggestion;
const getGuildNameSuggestion2 = getGuildNameSuggestion;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = importDefault(1393) /* metro dependency 1393 */;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
let value = Module01393;
const Millis = (Durations).Millis;
const MINUTE = Millis.MINUTE;
value = new value({maxAge: 1 * MINUTE});
object2 = {getGuildNameSuggestion: closure, requestMembers: requestMembers};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/GuildUtils.tsx');
exports.default = object2;
exports.getGuildNameSuggestion = closure;
}
object = {getGuildNameSuggestion: getGuildNameSuggestion2, requestMembers: requestMembers};
(FileImportTrackerModule).fileFinishedImporting('utils/GuildUtils.tsx');
exports.default = object;
exports.getGuildNameSuggestion = getGuildNameSuggestion2;
function requestMembersDebounced(a0, a1, a2) { // fn#51867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:167, offset: 0x012e6806, size: 85 bytes, params: 4, frame: 14
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
if (env0_4 != null) {
global.clearTimeout(env0_4);
}
env0_4 = global.setTimeout(_fun51868, 200);
function _fun51868() { // fn#51868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:246, offset: 0x012e685b, size: 232 bytes, params: 1, frame: 18
var environment;
var Array;
var value2;
var guild;
var push;
var value4;
var guildIds;
var items2;
var value6;
var defaultImport;
const pushGuild2 = pushGuild;
const items3 = [];
const items4 = items3;
if (items4 == null) {
push = items3.push;
value4 = environment.__proto__;
guildIds = GuildStore.getGuildIds();
items2 = [];
arraySpread(items2, guildIds, 0, undefined);
apply(push, items2, items3, undefined);
} else {
Array = global.Array;
if (Array.isArray(items4)) {
items4.forEach(_fun51870);
} else {
value2 = environment.__proto__;
guild = GuildStore.getGuild(items4);
if (guild != null) {
pushGuild2(guild);
}
}
}
if (items3.length > 0) {
value6 = environment.__proto__;
defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
defaultImport.requestMembers(items3, require.toLocaleLowerCase(), importDefault);
}
function pushGuild({id}) { // fn#51869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:260, offset: 0x012e6943, size: 29 bytes, params: 2, frame: 11
env0_0.push(id);
}
function requestMembersDebounced(a0, a1, a2) { // fn#51867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:167, offset: 0x012e6806, size: 85 bytes, params: 4, frame: 14
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
if (env0_4 != null) {
global.clearTimeout(env0_4);
}
env0_4 = global.setTimeout(_fun51868, 200);
}
function _fun51870(a0) { // fn#51870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:369, offset: 0x012e6960, size: 45 bytes, params: 2, frame: 11
let value = environment.__proto__.__proto__;
value = GuildStore.getGuild(a0);
if (value != null) {
pushGuild(value);
}
}
function getCachedResults(a0, a1) { // fn#51871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:534, offset: 0x012e698d, size: 93 bytes, params: 3, frame: 16
let value = a0;
const value2 = '';
value = value2 + (value ?? value2) + ':' + a1;
const value4 = env0_7.get(value);
if (value4 != null) {
return value4;
}
env0_7.set(value, true);
}
}
function getGuildNameSuggestion(a0) { // fn#51872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:637, offset: 0x012e69ea, size: 182 bytes, params: 2, frame: 20
var r0;
var intl;
const name = (importAll(3995) /* metro dependency 3995: UserUtils */).getName(UserStore.getCurrentUser());
const value4 = '';
if (name == null) {
r0 = value4;
} else if (name.length === 0) {
r0 = value4;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Y6Qfju,
{username: a0 == null ? name : a0.truncateUsername ? name.slice(0, 20) : name});
}
return r0;
}
function requestMembers(a0, a1) { // fn#51873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:909, offset: 0x012e6aa0, size: 151 bytes, params: 3, frame: 19
var r1;
let value = a2;
const env0_0 = a1;
const r3 = value !== undefined ? value : 10;
const Array = global.Array;
value = Array.isArray(a0);
const items2 = [];
if (value) {
a0.forEach(_fun51874);
r1 = false;
} else {
r1 = getCachedResults(a0, a1) == null && true;
function getCachedResults(a0, a1) { // fn#51871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:534, offset: 0x012e698d, size: 93 bytes, params: 3, frame: 16
let value = a0;
const value2 = '';
value = value2 + (value ?? value2) + ':' + a1;
const value4 = env0_7.get(value);
if (value4 != null) {
return value4;
}
env0_7.set(value, true);
}
if (items2.length > 0) {
function getGuildNameSuggestion(a0) { // fn#51872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:637, offset: 0x012e69ea, size: 182 bytes, params: 2, frame: 20
var r0;
var intl;
const name = (UserUtilsModule).getName(UserStore.getCurrentUser());
const value4 = '';
if (name == null) {
r0 = value4;
} else if (name.length === 0) {
r0 = value4;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Y6Qfju,
{username: a0 == null ? name : a0.truncateUsername ? name.slice(0, 20) : name});
}
return r0;
}
function requestMembers(a0, a1) { // fn#51873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:909, offset: 0x012e6aa0, size: 151 bytes, params: 3, frame: 19
var r1;
let value = a2;
const env0_0 = a1;
const r3 = value !== undefined ? value : 10;
const Array = global.Array;
value = Array.isArray(a0);
const items2 = [];
if (value) {
requestMembersDebounced(items2, a1, r3);
a0.forEach(_fun51874);
r1 = false;
} else {
r1 = getCachedResults(a0, a1) == null && true;
}
if (items2.length > 0) {
if (value) {
requestMembersDebounced(items2, a1, r3);
} else if (r1) {
requestMembersDebounced(a0, a1, r3);
}
} else if (r1) {
requestMembersDebounced(a0, a1, r3);
}
} else if (r1) {
requestMembersDebounced(a0, a1, r3);
}
}
function _fun51868() { // fn#51868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:246, offset: 0x012e685b, size: 232 bytes, params: 1, frame: 18
var environment;
var Array;
var value2;
var guild;
var push;
var value4;
var guildIds;
var items2;
var value6;
var defaultImport;
const closure = pushGuild;
const items3 = [];
const env0_0 = items3;
if (env0_0 == null) {
push = items3.push;
value4 = environment.__proto__;
guildIds = GuildStore.getGuildIds();
items2 = [];
arraySpread(items2, guildIds, 0, undefined);
apply(push, items2, items3, undefined);
} else {
Array = global.Array;
if (Array.isArray(env0_0)) {
env0_0.forEach(_fun51870);
} else {
value2 = environment.__proto__;
guild = GuildStore.getGuild(env0_0);
if (guild != null) {
closure(guild);
function _fun51874(a0) { // fn#51874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:980, offset: 0x012e6b37, size: 47 bytes, params: 2, frame: 14
if (getCachedResults(a0, require) == null) {
env0_1.push(a0);
}
}
}
if (items3.length > 0) {
value6 = environment.__proto__;
defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
defaultImport.requestMembers(items3, require.toLocaleLowerCase(), importDefault);
}
}
function _fun51874(a0) { // fn#51874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:980, offset: 0x012e6b37, size: 47 bytes, params: 2, frame: 14
if (getCachedResults(a0, require) == null) {
env0_1.push(a0);
}
}
function pushGuild({id}) { // fn#51869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:260, offset: 0x012e6943, size: 29 bytes, params: 2, frame: 11
env0_0.push(id);
}
function _fun51870(a0) { // fn#51870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6770:369, offset: 0x012e6960, size: 45 bytes, params: 2, frame: 11
let value = environment.__proto__.__proto__;
value = GuildStore.getGuild(a0);
if (value != null) {
pushGuild(value);
}
}
global.__d(_fun51866, 6592, [1867, 1878, 1393, 672, 6593, 3995, 1244,
2]) /* metro module 6592, dependencies: [1867, 1878, 1393, 672, 6593, 3995, 1244, 2] */;
+59 -54
View File
@@ -1,20 +1,23 @@
/* Metro module 1948; source: utils/HelpdeskUtils.tsx; dependencies: [1949, 661, 3768, 477, 2] */
import LocaleStore from '../modules/user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlatformUtilsModule from './PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun21706(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#21706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2075:6, offset: 0x00ef7c36, size: 319 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const getLocale = function() {
return LocaleStore.locale.toLowerCase();
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_4 = value.LocalizedLinks;
const SUPPORT_DOMAIN = value.SUPPORT_DOMAIN;
const SUPPORT_DEV_DOMAIN = value.SUPPORT_DEV_DOMAIN;
value = 'https://' + SUPPORT_DOMAIN;
const env0_6 = 'https://' + SUPPORT_DEV_DOMAIN;
object2 = {getArticleURL: getArticleURL, getDevArticleURL: getDevArticleURL,
object = {getArticleURL: getArticleURL, getDevArticleURL: getDevArticleURL,
getCreatorSupportArticleURL: getCreatorSupportArticleURL, getTwitterURL: function() {
return importDefault(dependencyMap[2])(LocalizedLinks.TWITTER);
}, getCommunityURL: getCommunityURL, getSubmitRequestURL: getSubmitRequestURL, getSearchURL: function(a0) {
@@ -23,57 +26,59 @@ function _fun21706(global, require, importDefault, importAll, module, exports, d
}, getFeaturedArticlesJsonURL: function() {
return wrapURL('/api/v2/help_center/en-us/articles.json?label_names=featured');
}, getAppsSupportURL: getAppsSupportURL};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/HelpdeskUtils.tsx');
exports.default = object2;
(FileImportTrackerModule).fileFinishedImporting('utils/HelpdeskUtils.tsx');
exports.default = object;
exports.SUPPORT_LOCATION = value;
}
function wrapURL(a0) { // fn#21707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2075:211, offset: 0x00ef7d75, size: 25 bytes, params: 2, frame: 2
const value = a1;
return (value !== undefined ? value : env0_5) + a0;
}
function getArticleURL(a0) { // fn#21709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2075:318, offset: 0x00ef7da7, size: 59 bytes, params: 2, frame: 17
return wrapURL('/hc/' + getLocale() + '/articles/' + a0);
}
function getDevArticleURL(a0) { // fn#21710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2075:382, offset: 0x00ef7de2, size: 64 bytes, params: 2, frame: 18
return wrapURL('/hc/' + getLocale() + '/articles/' + a0, env0_6);
}
function getCreatorSupportArticleURL(a0) { // fn#21711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2075:459, offset: 0x00ef7e22, size: 66 bytes, params: 2, frame: 17
const wrapURLBinding = wrapURL;
let value = getLocale();
value = '/hc/' + value + '/articles/' + a0;
return wrapURLBinding(value, 'https://creator-support.discord.com');
}
function getCommunityURL() { // fn#21713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2075:597, offset: 0x00ef7e8e, size: 48 bytes, params: 1, frame: 13
return wrapURL('/hc/' + getLocale());
}
function getSubmitRequestURL(a0) { // fn#21714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2075:631, offset: 0x00ef7ebe, size: 146 bytes, params: 2, frame: 19
var r0;
var value;
const wrapURLBinding = wrapURL;
const locale = getLocale();
const encodeURIComponent = global.encodeURIComponent;
const getPlatformName = (require(477) /* metro dependency 477: PlatformUtils */).getPlatformName;
value = encodeURIComponent(Reflect.apply(getPlatformName, value, []));
value = wrapURLBinding('/hc/' + locale + '/requests/new?platform=' + value);
if (a0 == null) {
r0 = value;
} else {
value += '&device_info=' + global.encodeURIComponent(a0);
r0 = value;
function wrapURL(a0) { // fn#21707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2075:211, offset: 0x00ef7d75, size: 25 bytes, params: 2, frame: 2
const value = a1;
return (value !== undefined ? value : env0_5) + a0;
}
return r0;
}
function getAppsSupportURL(a0) { // fn#21717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2075:1075, offset: 0x00ef7faf, size: 66 bytes, params: 2, frame: 17
const wrapURLBinding = wrapURL;
let value = getLocale();
value = '/hc/' + value + '/articles/' + a0;
return wrapURLBinding(value, 'https://support-apps.discord.com');
function getArticleURL(a0) { // fn#21709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2075:318, offset: 0x00ef7da7, size: 59 bytes, params: 2, frame: 17
return wrapURL('/hc/' + getLocale() + '/articles/' + a0);
}
function getDevArticleURL(a0) { // fn#21710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2075:382, offset: 0x00ef7de2, size: 64 bytes, params: 2, frame: 18
return wrapURL('/hc/' + getLocale() + '/articles/' + a0, env0_6);
}
function getCreatorSupportArticleURL(a0) { // fn#21711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2075:459, offset: 0x00ef7e22, size: 66 bytes, params: 2, frame: 17
const wrapURLBinding = wrapURL;
let value = getLocale();
value = '/hc/' + value + '/articles/' + a0;
return wrapURLBinding(value, 'https://creator-support.discord.com');
}
function getCommunityURL() { // fn#21713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2075:597, offset: 0x00ef7e8e, size: 48 bytes, params: 1, frame: 13
return wrapURL('/hc/' + getLocale());
}
function getSubmitRequestURL(a0) { // fn#21714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2075:631, offset: 0x00ef7ebe, size: 146 bytes, params: 2, frame: 19
var r0;
var value;
const wrapURLBinding = wrapURL;
const locale = getLocale();
const encodeURIComponent = global.encodeURIComponent;
const getPlatformName = (PlatformUtilsModule).getPlatformName;
value = encodeURIComponent(Reflect.apply(getPlatformName, value, []));
value = wrapURLBinding('/hc/' + locale + '/requests/new?platform=' + value);
if (a0 == null) {
r0 = value;
} else {
value += '&device_info=' + global.encodeURIComponent(a0);
r0 = value;
}
return r0;
}
function getAppsSupportURL(a0) { // fn#21717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2075:1075, offset: 0x00ef7faf, size: 66 bytes, params: 2, frame: 17
const wrapURLBinding = wrapURL;
let value = getLocale();
value = '/hc/' + value + '/articles/' + a0;
return wrapURLBinding(value, 'https://support-apps.discord.com');
}
}
global.__d(_fun21706, 1948, [1949, 661, 3768, 477,
2]) /* metro module 1948, dependencies: [1949, 661, 3768, 477, 2] */;
+184 -176
View File
@@ -1,4 +1,6 @@
/* Metro module 4600; source: utils/HighlightJsAnsiLanguage.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun39041(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4778:6, offset: 0x010d65a3, size: 254 bytes, params: 8, frame: 18
var RegExp;
const _arrayLikeToArray_39044 = function(a0, a1) {
@@ -54,202 +56,208 @@ function _fun39041(global, require, importDefault, importAll, module, exports, d
const regexp = RegExp('\\x1B\\[(\\d+(?:[:;]\\d+)*)m', '');
RegExp = global.RegExp;
const regExp = new RegExp('(?=' + regexp.source + ')');
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/HighlightJsAnsiLanguage.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/HighlightJsAnsiLanguage.tsx');
exports.default = highlightJsAnsiLanguage;
exports.ANSI_CONTROL_SEQUENCE_RE = regexp;
}
function _createForOfIteratorHelperLoose_39042(a0, a1) { // fn#39042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4778:47, offset: 0x010d66a1, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_39042(a0, a1) { // fn#39042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4778:47, offset: 0x010d66a1, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun39043;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_39044(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun39043;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_39044(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_39044(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_39044(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun39043;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun39043() { // fn#39043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4778:618, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function makeAnsiRuleCategory(a0, a1, a2, a3) { // fn#39045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4778:1281, offset: 0x010d6813, size: 130 bytes, params: 5, frame: 17
var push;
var value;
var items2;
const env0_0 = a0;
const items3 = ['0'];
arraySpread(items3, a2, 1, undefined);
if (a3) {
push = items3.push;
value = global.Object.keys(a1);
items2 = [];
arraySpread(items2, value, 0, undefined);
apply(push, items2, items3, undefined);
}
const Object = global.Object;
return Object.entries(a1).map(_fun39046);
function _fun39046(a0) { // fn#39046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4778:1396, offset: 0x010d6895, size: 95 bytes, params: 2, frame: 19
var r0;
var r1;
var r3;
var item3;
var value3;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
r3 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r3 = value;
} else {
r0 = item3;
r1 = value3;
r3 = item;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun39043;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function makeAnsiRuleCategory(a0, a1, a2, a3) { // fn#39045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4778:1281, offset: 0x010d6813, size: 130 bytes, params: 5, frame: 17
var push;
var value;
var items2;
const env0_0 = a0;
const items3 = ['0'];
arraySpread(items3, a2, 1, undefined);
if (a3) {
push = items3.push;
value = global.Object.keys(a1);
items2 = [];
arraySpread(items2, value, 0, undefined);
apply(push, items2, items3, undefined);
}
const Object = global.Object;
return Object.entries(a1).map(_fun39046);
}
function highlightJsAnsiLanguage() { // fn#39049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4778:1824, offset: 0x010d6a09, size: 251 bytes, params: 1, frame: 22
var r2;
var property;
var value6;
const makeAnsiRuleCategoryBinding = makeAnsiRuleCategory;
const ansiRuleCategory = makeAnsiRuleCategoryBinding('foreground', env0_1, ['38', '39'], true);
let items2 = [];
const value2 = 0;
const value5 = arraySpread(items2, makeAnsiRuleCategoryBinding('style', env0_0, [], false), arraySpread(items2,
makeAnsiRuleCategoryBinding('background', env0_2, ['48', '49'], true), arraySpread(items2, ansiRuleCategory,
value2, true), true), false);
items2[value5] = {className: 'ansi-control-sequence', begin: env0_3, starts: {end: env0_4, endsParent: true}};
value5 + 1;
let length = items2.length;
if (value2 < length) {
for (r2 = value2; true; r2 = value6) {
property = items2[r2];
property.contains = items2.slice(r2 + 1);
value6 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = items2.length;
if (!(value6 < length)) {
break;
if (!r1) {
r0.return();
}
return makeAnsiRule(env0_0, r3, r4, env0_1);
function makeAnsiRule(a0, a1, a2, a3) { // fn#39047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4778:1405, offset: 0x010d68f4, size: 92 bytes, params: 5, frame: 17
const env0_0 = a2;
const env0_1 = a3;
return {className: 'ansi-' + a0 + '-' + a1, endsParent: true, begin: env2_4, ['on:begin']: _fun39048};
function _fun39048([, property], a1) { // fn#39048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4778:1503, offset: 0x010d6950, size: 185 bytes, params: 3, frame: 18
var r3;
var value5;
var includes;
var value6;
let value = property.split(';');
let data = a1.data;
if (data.isOn === undefined) {
data = a1.data;
data.isOn = false;
}
value = _createForOfIteratorHelperLoose_39042(value);
const value3 = value();
let done = value3.done;
if (!done) {
r3 = value3;
while (true) {
value5 = r3.value;
if (value5 !== importDefault) {
includes = importAll.includes;
if (Reflect.apply(includes, importAll, [value5])) {
a1.data.isOn = false;
break;
}
break;
}
data = a1.data;
data.isOn = true;
value6 = value();
done = value6.done;
if (done) {
break;
}
r3 = value6;
continue;
}
}
if (!a1.data.isOn) {
a1.ignoreMatch();
}
}
}
}
}
items2 = [{begin: env0_4, contains: items2}];
return {contains: items2};
}
function _fun39046(a0) { // fn#39046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4778:1396, offset: 0x010d6895, size: 95 bytes, params: 2, frame: 19
var r0;
var r1;
var r3;
var item3;
var value3;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
r3 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r3 = value;
} else {
r0 = item3;
r1 = value3;
r3 = item;
}
}
if (!r1) {
r0.return();
}
return makeAnsiRule(env0_0, r3, r4, env0_1);
}
function makeAnsiRule(a0, a1, a2, a3) { // fn#39047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4778:1405, offset: 0x010d68f4, size: 92 bytes, params: 5, frame: 17
const env0_0 = a2;
const env0_1 = a3;
return {className: 'ansi-' + a0 + '-' + a1, endsParent: true, begin: env2_4, ['on:begin']: _fun39048};
}
function _fun39048([, property], a1) { // fn#39048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4778:1503, offset: 0x010d6950, size: 185 bytes, params: 3, frame: 18
var r3;
var value5;
var includes;
var value6;
let value = property.split(';');
let data = a1.data;
if (data.isOn === undefined) {
data = a1.data;
data.isOn = false;
}
value = _createForOfIteratorHelperLoose_39042(value);
const value3 = value();
let done = value3.done;
if (!done) {
r3 = value3;
while (true) {
value5 = r3.value;
if (value5 !== importDefault) {
includes = importAll.includes;
if (Reflect.apply(includes, importAll, [value5])) {
a1.data.isOn = false;
function highlightJsAnsiLanguage() { // fn#39049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4778:1824, offset: 0x010d6a09, size: 251 bytes, params: 1, frame: 22
var r2;
var property;
var value6;
const makeAnsiRuleCategoryBinding = makeAnsiRuleCategory;
const ansiRuleCategory = makeAnsiRuleCategoryBinding('foreground', env0_1, ['38', '39'], true);
let items2 = [];
const value2 = 0;
const value5 = arraySpread(items2, makeAnsiRuleCategoryBinding('style', env0_0, [], false), arraySpread(items2,
makeAnsiRuleCategoryBinding('background', env0_2, ['48', '49'], true), arraySpread(items2, ansiRuleCategory,
value2, true), true), false);
items2[value5] = {className: 'ansi-control-sequence', begin: env0_3, starts: {end: env0_4, endsParent: true}};
value5 + 1;
let length = items2.length;
if (value2 < length) {
for (r2 = value2; true; r2 = value6) {
property = items2[r2];
property.contains = items2.slice(r2 + 1);
value6 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = items2.length;
if (!(value6 < length)) {
break;
}
break;
}
data = a1.data;
data.isOn = true;
value6 = value();
done = value6.done;
if (done) {
break;
}
r3 = value6;
continue;
}
items2 = [{begin: env0_4, contains: items2}];
return {contains: items2};
}
if (!a1.data.isOn) {
a1.ignoreMatch();
}
}
global.__d(_fun39041, 4600, [2]) /* metro module 4600, dependencies: [2] */;
+234 -229
View File
@@ -1,12 +1,15 @@
/* Metro module 1475; source: utils/ImageUtils.tsx; dependencies: [5, 1476, 1477, 22, 44, 2] */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
import Module01476 from '../by-id/module-01476.js'; /* Metro dependency 1476 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun16856(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#16856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:6, offset: 0x00e5d237, size: 384 bytes, params: 8, frame: 22
let env0_0 = require;
const closure = fit;
const closure2 = getPalette;
const closure3 = dataUrlToBlob;
const fit2 = fit;
const getPalette2 = getPalette;
const dataUrlToBlob2 = dataUrlToBlob;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
object = [[0, 0, 0]];
(importDefault(22) /* metro dependency 22 */).memoize(function(a0) {
var env0_0 = a0;
@@ -15,8 +18,8 @@ function _fun16856(global, require, importDefault, importAll, module, exports, d
var value2 = new Promise(_fun16867);
return value2 instanceof Object ? value2 : value;
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ImageUtils.tsx');
exports.fit = closure;
(FileImportTrackerModule).fileFinishedImporting('utils/ImageUtils.tsx');
exports.fit = fit2;
exports.IMAGE_MAX_ZOOM = 2000;
exports.zoomFit = zoomFit;
exports.zoomScale = zoomScale;
@@ -44,7 +47,7 @@ function _fun16856(global, require, importDefault, importAll, module, exports, d
exports.makeCssUrlString = function(a0) {
return a0 == null || a0 === '' ? 'none' : 'url(' + a0 + ')';
};
exports.getPalette = closure2;
exports.getPalette = getPalette2;
exports.getPaletteForAvatar = function(a0) {
return require(dependencyMap[2]).default.getPaletteForAvatarMobile(a0);
};
@@ -63,7 +66,7 @@ function _fun16856(global, require, importDefault, importAll, module, exports, d
exports.dataUrlToFile = function() {
return _dataUrlToFile.apply(this, arguments);
};
exports.dataUrlToBlob = closure3;
exports.dataUrlToBlob = dataUrlToBlob2;
exports.isPNGAnimated = function() {
return _isPNGAnimated.apply(this, arguments);
};
@@ -74,6 +77,211 @@ function _fun16856(global, require, importDefault, importAll, module, exports, d
var value2 = new Promise(_fun16885);
return value2 instanceof Object ? value2 : value;
};
function getPalette(a0, a1, a2) { // fn#16858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:426, offset: 0x00e5d4b9, size: 361 bytes, params: 4, frame: 31
var r13;
var value5;
var property;
var property2;
var property3;
var property4;
var value6;
var value7;
var value8;
var value9;
var value10;
var value11;
let value = global.document.createElement('canvas');
const context = value.getContext('2d');
if (context == null) {
value = environment;
return env0_4;
}
const width = a0.width;
const value3 = 128;
const value4 = 0;
let r0 = value4 === width ? value3 : a0.width;
value.width = r0;
let height = a0.height;
height = value4 === height ? value3 : a0.height;
value.height = height;
context.drawImage(a0, value4, value4, r0, height);
const getImageData = context.getImageData;
const data = Reflect.apply(getImageData, context, [value4, value4, r0, height]).data;
value = r0 * height;
const items2 = [];
if (value4 < value) {
r0 = value4;
while (true) {
value5 = 4 * r0;
property = data[value4 + value5];
property2 = data[value5 + 1];
property3 = data[value5 + 2];
property4 = data[value5 + 3];
value6 = property4 === undefined;
if (value6) {
r13 = value6;
} else {
value7 = property4 >= 125;
r13 = value7;
}
if (!r13) {
continue;
}
value8 = property > 250;
if (!value8) {
r13 = value8;
continue;
}
value9 = property2 > 250;
r13 = value9;
if (!r13) {
continue;
}
value10 = property3 > 250;
r13 = value10;
if (r13) {
continue;
}
items2.push([property, property2, property3]);
value11 = r0 + a2;
if (value11 < value) {
r0 = value11;
continue;
}
break;
}
}
const value12 = (Module01476)(items2, a1);
return typeof value12 === 'boolean' ? env0_4 : value12.palette();
}
function _dataUrlToFile() { // fn#16859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:1127, offset: 0x00e5d622, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun16861).apply(this, arguments);
function* _fun16861(a0, a1, a2) { // fn#16861, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:1178, offset: 0x00e5d65b, size: 107 bytes, params: 4, frame: 17
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
value = env2_8(a0);
yield value.arrayBuffer();
value = undefined;
if (false) {
return value;
}
const File = global.File;
const items2 = [value];
value = Object.create(File.prototype, {constructor: {value: File}});
const file = new File(items2, a1, {type: a2});
return file instanceof Object ? file : value;
}
}
function _isPNGAnimated() { // fn#16863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:1566, offset: 0x00e5d7e1, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun16865).apply(this, arguments);
}
function _fun16866(a0) { // fn#16866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:929, offset: 0x00e5d8d4, size: 44 bytes, params: 2, frame: 11
const env0_0 = a0;
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun16867);
return promise instanceof Object ? promise : value;
function _fun16867(a0, a1) { // fn#16867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:945, offset: 0x00e5d900, size: 107 bytes, params: 3, frame: 10
const env0_0 = a0;
const env0_1 = a1;
const Image = global.Image;
const image = new Image();
image.crossOrigin = 'Anonymous';
image.onerror = onerror_16868;
image.onload = onload_16869;
image.src = env0_0;
function onerror_16868(a0) { // fn#16868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:1005, offset: 0x00e5d96b, size: 41 bytes, params: 2, frame: 13
require(a0);
const binding = env0_2;
binding.onload = null;
binding.onerror = null;
}
function onload_16869() { // fn#16869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:1055, offset: 0x00e5d994, size: 62 bytes, params: 1, frame: 17
let binding = env0_0;
binding(getPalette(env0_2, 5, 10));
binding = env0_2;
binding.onload = null;
binding.onerror = null;
}
}
}
function zoomFit(a0, a1) { // fn#16870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:1946, offset: 0x00e5d9d2, size: 258 bytes, params: 3, frame: 17
let Math = global.Math;
let min = Math.min;
const Math2 = global.Math;
let value = Math2.round(0.65 * global.window.innerHeight);
const Math3 = global.Math;
value = Reflect.apply(min, Math, [value, Math3.round(global.window.innerHeight)]);
Math = global.Math;
min = Math.min;
const Math4 = global.Math;
const value2 = Math4.round(0.75 * global.window.innerWidth);
const Math5 = global.Math;
const value3 = Reflect.apply(min, Math, [value2, Math5.round(global.window.innerWidth)]);
Math = global.Math;
value = Math.min(value, 2000);
const fitBinding = fit;
const object = {width: a0, height: a1};
Math = global.Math;
object.maxWidth = Math.min(value3, 2000);
object.maxHeight = value;
return fitBinding(object);
}
function readFileAsBase64(a0) { // fn#16877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:3166, offset: 0x00e5dd49, size: 44 bytes, params: 2, frame: 11
const env0_0 = a0;
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun16878);
return promise instanceof Object ? promise : value;
function _fun16878(a0, a1) { // fn#16878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:3215, offset: 0x00e5dd75, size: 92 bytes, params: 3, frame: 12
const env0_0 = a0;
const env0_1 = a1;
const FileReader = global.FileReader;
const fileReader = new FileReader();
fileReader.readAsDataURL(env0_0);
fileReader.onload = onload_16879;
fileReader.onerror = function(a0) {
return require(a0);
};
function onload_16879() { // fn#16879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:3272, offset: 0x00e5ddd1, size: 78 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(44) /* metro dependency 44 */;
const binding = env0_2;
value(typeof binding.result === 'string', 'Result must be a string');
env0_0(binding.result);
}
}
}
function preloadImage(a0) { // fn#16884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:3752, offset: 0x00e5deba, size: 44 bytes, params: 2, frame: 11
const env0_0 = a0;
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun16885);
return promise instanceof Object ? promise : value;
function _fun16885(a0, a1) { // fn#16885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:3797, offset: 0x00e5dee6, size: 83 bytes, params: 3, frame: 13
const Image = global.Image;
const image = new Image();
image.addEventListener('load', a0);
image.addEventListener('error', a1);
image.src = env0_0;
}
}
}
function fit({width, height, maxWidth, maxHeight, minWidth, minHeight}) { // fn#16857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:113, offset: 0x00e5d3b7, size: 258 bytes, params: 2, frame: 23
@@ -150,88 +358,6 @@ function fit({width, height, maxWidth, maxHeight, minWidth, minHeight}) { // fn#
return {width: r2, height: r1};
}
function getPalette(a0, a1, a2) { // fn#16858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:426, offset: 0x00e5d4b9, size: 361 bytes, params: 4, frame: 31
var r13;
var value5;
var property;
var property2;
var property3;
var property4;
var value6;
var value7;
var value8;
var value9;
var value10;
var value11;
let value = global.document.createElement('canvas');
const context = value.getContext('2d');
if (context == null) {
value = environment;
return env0_4;
}
const width = a0.width;
const value3 = 128;
const value4 = 0;
let r0 = value4 === width ? value3 : a0.width;
value.width = r0;
let height = a0.height;
height = value4 === height ? value3 : a0.height;
value.height = height;
context.drawImage(a0, value4, value4, r0, height);
const getImageData = context.getImageData;
const data = Reflect.apply(getImageData, context, [value4, value4, r0, height]).data;
value = r0 * height;
const items2 = [];
if (value4 < value) {
r0 = value4;
while (true) {
value5 = 4 * r0;
property = data[value4 + value5];
property2 = data[value5 + 1];
property3 = data[value5 + 2];
property4 = data[value5 + 3];
value6 = property4 === undefined;
if (value6) {
r13 = value6;
} else {
value7 = property4 >= 125;
r13 = value7;
}
if (!r13) {
continue;
}
value8 = property > 250;
if (!value8) {
r13 = value8;
continue;
}
value9 = property2 > 250;
r13 = value9;
if (!r13) {
continue;
}
value10 = property3 > 250;
r13 = value10;
if (r13) {
continue;
}
items2.push([property, property2, property3]);
value11 = r0 + a2;
if (value11 < value) {
r0 = value11;
continue;
}
break;
}
}
const value12 = (importDefault(1476) /* metro dependency 1476 */)(items2, a1);
return typeof value12 === 'boolean' ? env0_4 : value12.palette();
}
function _dataUrlToFile() { // fn#16859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:1127, offset: 0x00e5d622, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun16861).apply(this, arguments);
}
function dataUrlToBlob(a0) { // fn#16862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:1300, offset: 0x00e5d6c6, size: 283 bytes, params: 2, frame: 16
var r4;
var r5;
@@ -271,97 +397,12 @@ function dataUrlToBlob(a0) { // fn#16862, source: /ci/build/discord/discord/disc
}
const Blob = global.Blob;
const items2 = [uint8Array];
const object2 = {type: property};
const object = {type: property};
uint8Array = Object.create(Blob.prototype, {constructor: {value: Blob}});
const blob = new Blob(items2, object2);
const blob = new Blob(items2, object);
return blob instanceof Object ? blob : uint8Array;
}
function _isPNGAnimated() { // fn#16863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:1566, offset: 0x00e5d7e1, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun16865).apply(this, arguments);
}
function _fun16866(a0) { // fn#16866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:929, offset: 0x00e5d8d4, size: 44 bytes, params: 2, frame: 11
const env0_0 = a0;
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun16867);
return promise instanceof Object ? promise : value;
}
function zoomFit(a0, a1) { // fn#16870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:1946, offset: 0x00e5d9d2, size: 258 bytes, params: 3, frame: 17
let Math = global.Math;
let min = Math.min;
const Math2 = global.Math;
let value = Math2.round(0.65 * global.window.innerHeight);
const Math3 = global.Math;
value = Reflect.apply(min, Math, [value, Math3.round(global.window.innerHeight)]);
Math = global.Math;
min = Math.min;
const Math4 = global.Math;
const value2 = Math4.round(0.75 * global.window.innerWidth);
const Math5 = global.Math;
const value3 = Reflect.apply(min, Math, [value2, Math5.round(global.window.innerWidth)]);
Math = global.Math;
value = Math.min(value, 2000);
const fitBinding = fit;
const object2 = {width: a0, height: a1};
Math = global.Math;
object2.maxWidth = Math.min(value3, 2000);
object2.maxHeight = value;
return fitBinding(object2);
}
function zoomScale(a0, a1, a2, a3) { // fn#16871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:2222, offset: 0x00e5dad4, size: 270 bytes, params: 5, frame: 21
let Math = global.Math;
const max = Math.max;
let value = 0;
let r4 = a0 != null ? value === a0 ? value : a1 != null ? value === a1 ? value : a0 / a2 : value : value;
value = 2;
const value2 = Reflect.apply(max, Math, [value, r4]);
const r5 = a2 != null && a2 * value2 > global.window.innerWidth * 1.6 ? global.window.innerWidth * 1.6 / a2 : value;
r4 = a3 != null && a3 * value2 > global.window.innerHeight * 1.6 ? global.window.innerHeight * 1.6 / a3 : value;
Math = global.Math;
const value11 = Math.min(value2, r5, r4);
const parseFloat = global.parseFloat;
value = value11.toFixed(value);
return parseFloat(value);
}
function readFileAsBase64(a0) { // fn#16877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:3166, offset: 0x00e5dd49, size: 44 bytes, params: 2, frame: 11
const env0_0 = a0;
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun16878);
return promise instanceof Object ? promise : value;
}
function preloadImage(a0) { // fn#16884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:3752, offset: 0x00e5deba, size: 44 bytes, params: 2, frame: 11
const env0_0 = a0;
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun16885);
return promise instanceof Object ? promise : value;
}
function* _fun16861(a0, a1, a2) { // fn#16861, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:1178, offset: 0x00e5d65b, size: 107 bytes, params: 4, frame: 17
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
value = env2_8(a0);
yield value.arrayBuffer();
value = undefined;
if (false) {
return value;
}
const File = global.File;
const items2 = [value];
value = Object.create(File.prototype, {constructor: {value: File}});
const file = new File(items2, a1, {type: a2});
return file instanceof Object ? file : value;
}
function* _fun16865(a0) { // fn#16865, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:1617, offset: 0x00e5d81a, size: 186 bytes, params: 2, frame: 15
var r2;
if (false) {
@@ -389,57 +430,21 @@ function* _fun16865(a0) { // fn#16865, original name: ?anon_0_, source: /ci/buil
return r2;
}
function _fun16867(a0, a1) { // fn#16867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:945, offset: 0x00e5d900, size: 107 bytes, params: 3, frame: 10
const env0_0 = a0;
const env0_1 = a1;
const Image = global.Image;
const image = new Image();
image.crossOrigin = 'Anonymous';
image.onerror = onerror_16868;
image.onload = onload;
image.src = env0_0;
}
function _fun16878(a0, a1) { // fn#16878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:3215, offset: 0x00e5dd75, size: 92 bytes, params: 3, frame: 12
const env0_0 = a0;
const env0_1 = a1;
const FileReader = global.FileReader;
const fileReader = new FileReader();
fileReader.readAsDataURL(env0_0);
fileReader.onload = onload_16879;
fileReader.onerror = function(a0) {
return require(a0);
};
}
function _fun16885(a0, a1) { // fn#16885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:3797, offset: 0x00e5dee6, size: 83 bytes, params: 3, frame: 13
const Image = global.Image;
const image = new Image();
image.addEventListener('load', a0);
image.addEventListener('error', a1);
image.src = env0_0;
}
function onerror_16868(a0) { // fn#16868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:1005, offset: 0x00e5d96b, size: 41 bytes, params: 2, frame: 13
require(a0);
const binding = env0_2;
binding.onload = null;
binding.onerror = null;
}
function onload() { // fn#16869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:1055, offset: 0x00e5d994, size: 62 bytes, params: 1, frame: 17
let binding = env0_0;
binding(getPalette(env0_2, 5, 10));
binding = env0_2;
binding.onload = null;
binding.onerror = null;
}
function onload_16879() { // fn#16879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:3272, offset: 0x00e5ddd1, size: 78 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(44) /* metro dependency 44 */;
const binding = env0_2;
value(typeof binding.result === 'string', 'Result must be a string');
env0_0(binding.result);
function zoomScale(a0, a1, a2, a3) { // fn#16871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1602:2222, offset: 0x00e5dad4, size: 270 bytes, params: 5, frame: 21
let Math = global.Math;
const max = Math.max;
let value = 0;
let r4 = a0 != null ? value === a0 ? value : a1 != null ? value === a1 ? value : a0 / a2 : value : value;
value = 2;
const value2 = Reflect.apply(max, Math, [value, r4]);
const r5 = a2 != null && a2 * value2 > global.window.innerWidth * 1.6 ? global.window.innerWidth * 1.6 / a2 : value;
r4 = a3 != null && a3 * value2 > global.window.innerHeight * 1.6 ? global.window.innerHeight * 1.6 / a3 : value;
Math = global.Math;
const value11 = Math.min(value2, r5, r4);
const parseFloat = global.parseFloat;
value = value11.toFixed(value);
return parseFloat(value);
}
global.__d(_fun16856, 1475, [5, 1476, 1477, 22, 44,
2]) /* metro module 1475, dependencies: [5, 1476, 1477, 22, 44, 2] */;
File diff suppressed because it is too large. Load diff
+82 -81
View File
@@ -1,90 +1,91 @@
/* Metro module 10545; source: utils/InviteErrorUtils.tsx; dependencies: [1878, 661, 3802, 1244, 1948, 2] */
import UserStore from '../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun81318(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10731:6, offset: 0x01eca1d8, size: 183 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.AbortCodes;
const env0_5 = constantsModule.HelpdeskArticles;
const env0_6 = constantsModule.MAX_USER_GUILDS;
const env0_7 = constantsModule.MAX_USER_GUILDS_PREMIUM;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/InviteErrorUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/InviteErrorUtils.tsx');
exports.getDescriptiveInviteError = getDescriptiveInviteError;
exports.getInviteError = getInviteError;
function getDescriptiveInviteError(a0) { // fn#81319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10731:288, offset: 0x01eca28f, size: 618 bytes, params: 2, frame: 19
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var currentUser;
var value3;
var defaultImport;
const TOO_MANY_USER_GUILDS = AbortCodes.TOO_MANY_USER_GUILDS;
if (TOO_MANY_USER_GUILDS === a0) {
currentUser = UserStore.getCurrentUser();
value3 = undefined;
defaultImport = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
return {title: intl.formatToPlainString(t['ttJ/hj'],
{quantity: defaultImport.canUseIncreasedGuildCap(currentUser) || (currentUser == null ? value3 : currentUser.isStaff()) ? MAX_USER_GUILDS_PREMIUM : MAX_USER_GUILDS}),
description: intl.string(t.iLyuDO)};
}
const GUILD_AT_CAPACITY = AbortCodes.GUILD_AT_CAPACITY;
if (GUILD_AT_CAPACITY === a0) {
object = {};
object.title = intl.string(t.ZZlox4);
object.description = intl.string(t.ZUEGFn);
return object;
}
const GUILD_JOIN_INVITE_LIMITED_ACCESS = AbortCodes.GUILD_JOIN_INVITE_LIMITED_ACCESS;
if (GUILD_JOIN_INVITE_LIMITED_ACCESS === a0) {
object = {};
object.title = intl.string(t.kJwpBW);
object.description = intl.string(t.ZUEGFn);
return object;
}
const USER_GUILD_JOIN_LARGE_GUILD_UNDERAGE_DISALLOWED = AbortCodes.USER_GUILD_JOIN_LARGE_GUILD_UNDERAGE_DISALLOWED;
if (USER_GUILD_JOIN_LARGE_GUILD_UNDERAGE_DISALLOWED === a0) {
object = {};
object.title = intl.string(t['u/xsK9']);
object.description = intl.string(t.SxY4IW);
return object;
}
return null;
}
function getInviteError(a0) { // fn#81320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10731:1059, offset: 0x01eca4f9, size: 495 bytes, params: 2, frame: 18
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var format;
var RXSeLl;
var defaultImport;
const TOO_MANY_USER_GUILDS = AbortCodes.TOO_MANY_USER_GUILDS;
if (TOO_MANY_USER_GUILDS === a0) {
return intl.string(t.iLyuDO);
}
const GUILD_AT_CAPACITY = AbortCodes.GUILD_AT_CAPACITY;
if (GUILD_AT_CAPACITY === a0) {
return intl.string(t.M6unNJ);
}
const INVALID_COUNTRY_CODE = AbortCodes.INVALID_COUNTRY_CODE;
if (INVALID_COUNTRY_CODE === a0) {
return intl.string(t.sRJGR1);
}
const INVALID_CANNOT_FRIEND_SELF = AbortCodes.INVALID_CANNOT_FRIEND_SELF;
if (INVALID_CANNOT_FRIEND_SELF === a0) {
return intl.string(t['mY2R+F']);
}
const INVITES_DISABLED = AbortCodes.INVITES_DISABLED;
if (INVITES_DISABLED === a0) {
format = intl.format;
RXSeLl = t.RXSeLl;
defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
return Reflect.apply(format, intl, [RXSeLl,
{articleLink: defaultImport.getArticleURL(HelpdeskArticles.INVITE_DISABLED)}]);
}
return intl.string(t.dDZRdy);
}
}
function getDescriptiveInviteError(a0) { // fn#81319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10731:288, offset: 0x01eca28f, size: 618 bytes, params: 2, frame: 19
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var currentUser;
var value3;
var defaultImport;
const TOO_MANY_USER_GUILDS = AbortCodes.TOO_MANY_USER_GUILDS;
if (TOO_MANY_USER_GUILDS === a0) {
currentUser = UserStore.getCurrentUser();
value3 = undefined;
defaultImport = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
return {title: intl.formatToPlainString(t['ttJ/hj'],
{quantity: defaultImport.canUseIncreasedGuildCap(currentUser) || (currentUser == null ? value3 : currentUser.isStaff()) ? MAX_USER_GUILDS_PREMIUM : MAX_USER_GUILDS}),
description: intl.string(t.iLyuDO)};
}
const GUILD_AT_CAPACITY = AbortCodes.GUILD_AT_CAPACITY;
if (GUILD_AT_CAPACITY === a0) {
object2 = {};
object2.title = intl.string(t.ZZlox4);
object2.description = intl.string(t.ZUEGFn);
return object2;
}
const GUILD_JOIN_INVITE_LIMITED_ACCESS = AbortCodes.GUILD_JOIN_INVITE_LIMITED_ACCESS;
if (GUILD_JOIN_INVITE_LIMITED_ACCESS === a0) {
object2 = {};
object2.title = intl.string(t.kJwpBW);
object2.description = intl.string(t.ZUEGFn);
return object2;
}
const USER_GUILD_JOIN_LARGE_GUILD_UNDERAGE_DISALLOWED = AbortCodes.USER_GUILD_JOIN_LARGE_GUILD_UNDERAGE_DISALLOWED;
if (USER_GUILD_JOIN_LARGE_GUILD_UNDERAGE_DISALLOWED === a0) {
object2 = {};
object2.title = intl.string(t['u/xsK9']);
object2.description = intl.string(t.SxY4IW);
return object2;
}
return null;
}
function getInviteError(a0) { // fn#81320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10731:1059, offset: 0x01eca4f9, size: 495 bytes, params: 2, frame: 18
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var format;
var RXSeLl;
var defaultImport;
const TOO_MANY_USER_GUILDS = AbortCodes.TOO_MANY_USER_GUILDS;
if (TOO_MANY_USER_GUILDS === a0) {
return intl.string(t.iLyuDO);
}
const GUILD_AT_CAPACITY = AbortCodes.GUILD_AT_CAPACITY;
if (GUILD_AT_CAPACITY === a0) {
return intl.string(t.M6unNJ);
}
const INVALID_COUNTRY_CODE = AbortCodes.INVALID_COUNTRY_CODE;
if (INVALID_COUNTRY_CODE === a0) {
return intl.string(t.sRJGR1);
}
const INVALID_CANNOT_FRIEND_SELF = AbortCodes.INVALID_CANNOT_FRIEND_SELF;
if (INVALID_CANNOT_FRIEND_SELF === a0) {
return intl.string(t['mY2R+F']);
}
const INVITES_DISABLED = AbortCodes.INVITES_DISABLED;
if (INVITES_DISABLED === a0) {
format = intl.format;
RXSeLl = t.RXSeLl;
defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
return Reflect.apply(format, intl, [RXSeLl,
{articleLink: defaultImport.getArticleURL(HelpdeskArticles.INVITE_DISABLED)}]);
}
return intl.string(t.dDZRdy);
}
global.__d(_fun81318, 10545, [1878, 661, 3802, 1244, 1948,
2]) /* metro module 10545, dependencies: [1878, 661, 3802, 1244, 1948, 2] */;
+195 -193
View File
@@ -1,201 +1,203 @@
/* Metro module 9047; source: utils/LazyAPIPromise.tsx; dependencies: [5, 57, 31, 4131, 2] */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun70686(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9232:6, offset: 0x01d034a3, size: 149 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/LazyAPIPromise.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/LazyAPIPromise.tsx');
exports.default = useLazyAPIPromise;
function useLazyAPIPromise(a0, a1) { // fn#70687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9232:197, offset: 0x01d03538, size: 140 bytes, params: 3, frame: 19
const env0_0 = a0;
const env0_1 = a1;
let useState = ReactModule.useState;
const value2 = Reflect.apply(useState, ReactModule, [false]);
const binding2 = env0_3;
let value = binding2(value2, 2);
const property = value[0];
const env0_2 = value[1];
useState = ReactModule.useState;
value = binding2(Reflect.apply(useState, ReactModule, [null]), 2);
const property2 = value[0];
var env0_3 = value[1];
return [function() {
return _execFn.apply(this, arguments);
}, {loading: property, error: property2}];
function _execFn() { // fn#70688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9232:315, owner: useLazyAPIPromise._execFn, offset: 0x01d035c4, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_2(_fun70690).apply(this, arguments);
function* _fun70690() { // fn#70690, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9232:352, offset: 0x01d03604, size: 183 bytes, params: 1, frame: 17
var moduleValue;
var value3;
var value4;
var binding;
var error;
var value5;
var APIError;
var prototype;
var value6;
var aPIError;
var value7;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
env2_2(true);
env2_3(null);
try {
} catch (error) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
APIError = binding(env3_1[3]).APIError;
prototype = APIError.prototype;
value6 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value7 = aPIError instanceof Object ? aPIError : value6;
if (dependencyMap == null) {
env2_3(value7);
env2_2(false);
return null;
}
dependencyMap(value7);
env2_3(value7);
env2_2(false);
return null;
}
try {
moduleValue = require();
} catch (error) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
APIError = binding(env3_1[3]).APIError;
prototype = APIError.prototype;
value6 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value7 = aPIError instanceof Object ? aPIError : value6;
if (dependencyMap == null) {
env2_3(value7);
env2_2(false);
return null;
}
dependencyMap(value7);
env2_3(value7);
env2_2(false);
return null;
}
yield moduleValue;
try {
value3 = undefined;
value4 = false;
} catch (error) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
APIError = binding(env3_1[3]).APIError;
prototype = APIError.prototype;
value6 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value7 = aPIError instanceof Object ? aPIError : value6;
if (dependencyMap == null) {
env2_3(value7);
env2_2(false);
return null;
}
dependencyMap(value7);
env2_3(value7);
env2_2(false);
return null;
}
if (!value4) {
try {
binding = env2_2;
} catch (error) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
APIError = binding(env3_1[3]).APIError;
prototype = APIError.prototype;
value6 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value7 = aPIError instanceof Object ? aPIError : value6;
if (dependencyMap == null) {
env2_3(value7);
env2_2(false);
return null;
}
dependencyMap(value7);
env2_3(value7);
env2_2(false);
return null;
}
try {
binding(false);
} catch (error) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
APIError = binding(env3_1[3]).APIError;
prototype = APIError.prototype;
value6 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value7 = aPIError instanceof Object ? aPIError : value6;
if (dependencyMap == null) {
env2_3(value7);
env2_2(false);
return null;
}
dependencyMap(value7);
env2_3(value7);
env2_2(false);
return null;
}
try {
binding = env2_3;
} catch (error) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
APIError = binding(env3_1[3]).APIError;
prototype = APIError.prototype;
value6 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value7 = aPIError instanceof Object ? aPIError : value6;
if (dependencyMap == null) {
env2_3(value7);
env2_2(false);
return null;
}
dependencyMap(value7);
env2_3(value7);
env2_2(false);
return null;
}
try {
binding(null);
} catch (error) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
APIError = binding(env3_1[3]).APIError;
prototype = APIError.prototype;
value6 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value7 = aPIError instanceof Object ? aPIError : value6;
if (dependencyMap == null) {
env2_3(value7);
env2_2(false);
return null;
}
dependencyMap(value7);
env2_3(value7);
env2_2(false);
return null;
}
}
return value3;
}
}
}
}
function useLazyAPIPromise(a0, a1) { // fn#70687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9232:197, offset: 0x01d03538, size: 140 bytes, params: 3, frame: 19
const env0_0 = a0;
const env0_1 = a1;
const binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
let value = binding2(value2, 2);
const property = value[0];
const env0_2 = value[1];
useState = binding.useState;
value = binding2(Reflect.apply(useState, binding, [null]), 2);
const property2 = value[0];
var env0_3 = value[1];
return [function() {
return _execFn.apply(this, arguments);
}, {loading: property, error: property2}];
}
function _execFn() { // fn#70688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9232:315, owner: useLazyAPIPromise._execFn, offset: 0x01d035c4, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_2(_fun70690).apply(this, arguments);
}
function* _fun70690() { // fn#70690, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9232:352, offset: 0x01d03604, size: 183 bytes, params: 1, frame: 17
var moduleValue;
var value3;
var value4;
var binding;
var error;
var value5;
var APIError;
var prototype;
var value6;
var aPIError;
var value7;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
env2_2(true);
env2_3(null);
try {
} catch (error) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
APIError = binding(env3_1[3]).APIError;
prototype = APIError.prototype;
value6 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value7 = aPIError instanceof Object ? aPIError : value6;
if (dependencyMap == null) {
env2_3(value7);
env2_2(false);
return null;
}
dependencyMap(value7);
env2_3(value7);
env2_2(false);
return null;
}
try {
moduleValue = require();
} catch (error) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
APIError = binding(env3_1[3]).APIError;
prototype = APIError.prototype;
value6 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value7 = aPIError instanceof Object ? aPIError : value6;
if (dependencyMap == null) {
env2_3(value7);
env2_2(false);
return null;
}
dependencyMap(value7);
env2_3(value7);
env2_2(false);
return null;
}
yield moduleValue;
try {
value3 = undefined;
value4 = false;
} catch (error) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
APIError = binding(env3_1[3]).APIError;
prototype = APIError.prototype;
value6 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value7 = aPIError instanceof Object ? aPIError : value6;
if (dependencyMap == null) {
env2_3(value7);
env2_2(false);
return null;
}
dependencyMap(value7);
env2_3(value7);
env2_2(false);
return null;
}
if (!value4) {
try {
binding = env2_2;
} catch (error) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
APIError = binding(env3_1[3]).APIError;
prototype = APIError.prototype;
value6 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value7 = aPIError instanceof Object ? aPIError : value6;
if (dependencyMap == null) {
env2_3(value7);
env2_2(false);
return null;
}
dependencyMap(value7);
env2_3(value7);
env2_2(false);
return null;
}
try {
binding(false);
} catch (error) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
APIError = binding(env3_1[3]).APIError;
prototype = APIError.prototype;
value6 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value7 = aPIError instanceof Object ? aPIError : value6;
if (dependencyMap == null) {
env2_3(value7);
env2_2(false);
return null;
}
dependencyMap(value7);
env2_3(value7);
env2_2(false);
return null;
}
try {
binding = env2_3;
} catch (error) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
APIError = binding(env3_1[3]).APIError;
prototype = APIError.prototype;
value6 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value7 = aPIError instanceof Object ? aPIError : value6;
if (dependencyMap == null) {
env2_3(value7);
env2_2(false);
return null;
}
dependencyMap(value7);
env2_3(value7);
env2_2(false);
return null;
}
try {
binding(null);
} catch (error) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
APIError = binding(env3_1[3]).APIError;
prototype = APIError.prototype;
value6 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value7 = aPIError instanceof Object ? aPIError : value6;
if (dependencyMap == null) {
env2_3(value7);
env2_2(false);
return null;
}
dependencyMap(value7);
env2_3(value7);
env2_2(false);
return null;
}
}
return value3;
}
global.__d(_fun70686, 9047, [5, 57, 31, 4131, 2]) /* metro module 9047, dependencies: [5, 57, 31, 4131, 2] */;
+88 -62
View File
@@ -1,4 +1,10 @@
/* Metro module 4278; source: utils/LibraryApplicationUtils.tsx; dependencies: [57, 1878, 4279, 661, 3829, 2] */
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import UserStore from '../stores/UserStore.tsx'; /* Metro dependency 1878 */
import SKUStore from '../stores/game_store/SKUStore.tsx'; /* Metro dependency 4279 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun36264(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:6, offset: 0x01087244, size: 277 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = function(a0) {
@@ -8,14 +14,7 @@ function _fun36264(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_5 = constantsModule.LibraryApplicationFlags;
const env0_6 = constantsModule.LocalDispatchApplicationStates;
const env0_7 = constantsModule.StatusTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/LibraryApplicationUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/LibraryApplicationUtils.tsx');
exports.getComboId = function(a0, a1) {
return '' + a0 + ':' + a1;
};
@@ -31,72 +30,99 @@ function _fun36264(global, require, importDefault, importAll, module, exports, d
return a0.reduce(_fun36272, {'total': 0, 'progress': 0});
};
exports.isUserEntitledToLibraryApplication = isUserEntitledToLibraryApplication;
}
function convertComboId(a0) { // fn#36267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:488, offset: 0x010873ad, size: 61 bytes, params: 2, frame: 13
let value = a0.split(':');
value = Module00057(value, 2);
return {applicationId: value[0], branchId: value[1]};
}
function convertComboId(a0) { // fn#36267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:488, offset: 0x010873ad, size: 61 bytes, params: 2, frame: 13
let value = a0.split(':');
value = env0_2(value, 2);
return {applicationId: value[0], branchId: value[1]};
}
function shouldShareApplicationActivity(a0, a1) { // fn#36268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:618, offset: 0x010873ea, size: 147 bytes, params: 3, frame: 14
var activeLibraryApplication;
const ShowCurrentGame = (require(3829) /* metro dependency 3829: UserSettings */).ShowCurrentGame;
const getSetting = ShowCurrentGame.getSetting;
if (Reflect.apply(getSetting, ShowCurrentGame, [])) {
if ((require(3829) /* metro dependency 3829: UserSettings */).StatusSetting.getSetting() === StatusTypes.INVISIBLE) {
return false;
function shouldShareApplicationActivity(a0, a1) { // fn#36268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:618, offset: 0x010873ea, size: 147 bytes, params: 3, frame: 14
var activeLibraryApplication;
const ShowCurrentGame = (require(3829) /* metro dependency 3829: UserSettings */).ShowCurrentGame;
const getSetting = ShowCurrentGame.getSetting;
if (Reflect.apply(getSetting, ShowCurrentGame, [])) {
if ((require(3829) /* metro dependency 3829: UserSettings */).StatusSetting.getSetting() === StatusTypes.INVISIBLE) {
return false;
}
activeLibraryApplication = a1.getActiveLibraryApplication(a0);
return activeLibraryApplication == null || !activeLibraryApplication.hasFlag(LibraryApplicationFlags.PRIVATE);
}
activeLibraryApplication = a1.getActiveLibraryApplication(a0);
return activeLibraryApplication == null || !activeLibraryApplication.hasFlag(LibraryApplicationFlags.PRIVATE);
return false;
}
return false;
}
function shouldShowGameInLibrary(a0, a1, a2) { // fn#36270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:965, offset: 0x01087499, size: 74 bytes, params: 4, frame: 13
var r1;
var r0;
var enabled;
const value = a1 != null;
if (value) {
enabled = a2.enabled;
r1 = enabled ? !a1.hasFlag(LibraryApplicationFlags.PRIVATE) : !enabled;
r1 = r1 && !a1.isHidden();
r0 = r1;
} else {
r0 = value;
}
return r0;
}
function getCombinedProgress(a0) { // fn#36271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:1149, offset: 0x010874e3, size: 38 bytes, params: 2, frame: 13
return a0.reduce(function(a0, a1) {
function shouldShowGameInLibrary(a0, a1, a2) { // fn#36270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:965, offset: 0x01087499, size: 74 bytes, params: 4, frame: 13
var r1;
var r0;
var property;
var object;
var value = a0;
var value3 = convertToTransitionState(a1);
if (value3 == null) {
r0 = value;
var enabled;
const value = a1 != null;
if (value) {
enabled = a2.enabled;
r1 = enabled ? !a1.hasFlag(LibraryApplicationFlags.PRIVATE) : !enabled;
r1 = r1 && !a1.isHidden();
r0 = r1;
} else {
property = a1.type;
if (property === LocalDispatchApplicationStates.UP_TO_DATE) {
r0 = value;
}
return r0;
}
function getCombinedProgress(a0) { // fn#36271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:1149, offset: 0x010874e3, size: 38 bytes, params: 2, frame: 13
return a0.reduce(function(a0, a1) {
var r0;
var property;
var object;
var value = a0;
var value3 = convertToTransitionState(a1);
if (value3 == null) {
r0 = value;
} else {
property = a1.type;
if (property === LocalDispatchApplicationStates.UP_TO_DATE) {
r0 = value;
} else {
object = {};
property = value.total;
object.total = property + global.Number(value3.total);
property = value.progress;
object.progress = property + global.Number(value3.progress);
r0 = object;
}
}
return r0;
}, {'total': 0, 'progress': 0});
function _fun36272(a0, a1) { // fn#36272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:1198, offset: 0x01087509, size: 124 bytes, params: 3, frame: 17
var r0;
var object;
var total;
var Number;
var progress;
const value = a0;
const value3 = convertToTransitionState(a1);
if (value3 == null) {
r0 = value;
} else if (a1.type === LocalDispatchApplicationStates.UP_TO_DATE) {
r0 = value;
} else {
object = {};
property = value.total;
object.total = property + global.Number(value3.total);
property = value.progress;
object.progress = property + global.Number(value3.progress);
total = value.total;
Number = global.Number;
object.total = total + Number(value3.total);
progress = value.progress;
Number = global.Number;
object.progress = progress + Number(value3.progress);
r0 = object;
}
return r0;
}
return r0;
}, {'total': 0, 'progress': 0});
}
function isUserEntitledToLibraryApplication(a0) { // fn#36273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:1413, offset: 0x01087585, size: 58 bytes, params: 2, frame: 15
const isDiscordApplication = a0.isDiscordApplication();
return isDiscordApplication ? a0.isEntitled(UserStore.getCurrentUser(), SKUStore) : !!isDiscordApplication;
}
function isUserEntitledToLibraryApplication(a0) { // fn#36273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4450:1413, offset: 0x01087585, size: 58 bytes, params: 2, frame: 15
const isDiscordApplication = a0.isDiscordApplication();
return isDiscordApplication ? a0.isEntitled(UserStore.getCurrentUser(), SKUStore) : !!isDiscordApplication;
}
}
global.__d(_fun36264, 4278, [57, 1878, 4279, 661, 3829,
2]) /* metro module 4278, dependencies: [57, 1878, 4279, 661, 3829, 2] */;
+15 -11
View File
@@ -1,19 +1,23 @@
/* Metro module 8866; source: utils/ListUtils.tsx; dependencies: [1244, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun69128(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9051:6, offset: 0x01c69f6d, size: 96 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ListUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/ListUtils.tsx');
exports.getListSummaryLabel = getListSummaryLabel;
function getListSummaryLabel(a0, a1) { // fn#69129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9051:167, offset: 0x01c69fcd, size: 405 bytes, params: 3, frame: 21
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const r10 = a1 ?? a0.length;
return r10 === 0 ? '' : r10 === 1 ? intl.formatToPlainString(t['8s9z8P'],
{first: a0[0]}) : r10 === 2 ? intl.formatToPlainString(t['i0K/dw'], {first: a0[0],
second: a0[1]}) : r10 === 3 ? intl.formatToPlainString(t['/KSOKY'], {first: a0[0], second: a0[1],
third: a0[2]}) : intl.formatToPlainString(t.xpU76u, {first: a0[0], second: a0[1], third: a0[2], count: r10 - 3});
}
}
function getListSummaryLabel(a0, a1) { // fn#69129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9051:167, offset: 0x01c69fcd, size: 405 bytes, params: 3, frame: 21
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r10 = a1 ?? a0.length;
return r10 === 0 ? '' : r10 === 1 ? intl.formatToPlainString(t['8s9z8P'],
{first: a0[0]}) : r10 === 2 ? intl.formatToPlainString(t['i0K/dw'], {first: a0[0],
second: a0[1]}) : r10 === 3 ? intl.formatToPlainString(t['/KSOKY'], {first: a0[0], second: a0[1],
third: a0[2]}) : intl.formatToPlainString(t.xpU76u, {first: a0[0], second: a0[1], third: a0[2], count: r10 - 3});
}
global.__d(_fun69128, 8866, [1244, 2]) /* metro module 8866, dependencies: [1244, 2] */;
+40 -33
View File
@@ -1,4 +1,9 @@
/* Metro module 8980; source: utils/MFAUtils.tsx; dependencies: [27, 1581, 8981, 1216, 2] */
import SentryUtilsNative from './SentryUtils.native.tsx'; /* Metro dependency 1216 */
import Module08981 from '../by-id/module-08981.js'; /* Metro dependency 8981 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
function _fun69993(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9165:6, offset: 0x01ceaa90, size: 301 bytes, params: 8, frame: 22
var r4;
var value6;
@@ -11,7 +16,7 @@ function _fun69993(global, require, importDefault, importAll, module, exports, d
let value = undefined;
const r10 = (window == null ? value : window.crypto) ?? (global.window == null ? value : global.window.msCrypto);
const r5 = r10 != null && 'getRandomValues' in r10 && 'Uint8Array' in global.window;
const NativeModules = (require(27) /* metro dependency 27 */).NativeModules;
const NativeModules = (ReactNativeModule).NativeModules;
const DCDSecurityKeyManager = NativeModules.DCDSecurityKeyManager;
const value5 = DCDSecurityKeyManager != null;
if (value5) {
@@ -20,7 +25,7 @@ function _fun69993(global, require, importDefault, importAll, module, exports, d
} else {
r4 = value5;
}
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/MFAUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/MFAUtils.tsx');
exports.hasCrypto = r5;
exports.hasWebAuthn = r4;
exports.generateTotpSecret = generateTotpSecret;
@@ -34,36 +39,38 @@ function _fun69993(global, require, importDefault, importAll, module, exports, d
};
exports.captureWebAuthnException = captureWebAuthnException;
return value;
function generateTotpSecret() { // fn#69995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9165:508, offset: 0x01ceabe9, size: 180 bytes, params: 1, frame: 15
const binding = env0_2;
const getRandomValues = binding.getRandomValues;
const Uint8Array = global.Uint8Array;
const value2 = Object.create(Uint8Array.prototype, {constructor: {value: Uint8Array}});
const uint8Array = new Uint8Array(20);
const value4 = Reflect.apply(getRandomValues, binding, [uint8Array instanceof Object ? uint8Array : value2]);
let value = Module08981;
value = value.encode(value4);
value = value.toString('utf8');
value = value.replace(RegExp('=', 'g'), '');
value = value.toLowerCase();
value = value.replace(RegExp('(\\w{4})', 'g'), '$1 ');
return value.trim();
}
function captureWebAuthnException(a0, a1) { // fn#69997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9165:1012, offset: 0x01cead0b, size: 108 bytes, params: 3, frame: 17
const value = undefined;
const defaultImport = SentryUtilsNative;
const captureException = defaultImport.captureException;
const object = {};
copyDataProperties(object, a1, undefined);
const object2 = {};
const value2 = a1 == null;
copyDataProperties(object2, value2 ? value : a1.tags, value2);
object2['app_context'] = 'webauthn';
object['tags'] = object2;
Reflect.apply(captureException, defaultImport, [a0, object]);
return value;
}
}
function generateTotpSecret() { // fn#69995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9165:508, offset: 0x01ceabe9, size: 180 bytes, params: 1, frame: 15
const binding = env0_2;
const getRandomValues = binding.getRandomValues;
const Uint8Array = global.Uint8Array;
const value2 = Object.create(Uint8Array.prototype, {constructor: {value: Uint8Array}});
const uint8Array = new Uint8Array(20);
const value4 = Reflect.apply(getRandomValues, binding, [uint8Array instanceof Object ? uint8Array : value2]);
let value = importDefault(8981) /* metro dependency 8981 */;
value = value.encode(value4);
value = value.toString('utf8');
value = value.replace(RegExp('=', 'g'), '');
value = value.toLowerCase();
value = value.replace(RegExp('(\\w{4})', 'g'), '$1 ');
return value.trim();
}
function captureWebAuthnException(a0, a1) { // fn#69997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9165:1012, offset: 0x01cead0b, size: 108 bytes, params: 3, frame: 17
const value = undefined;
const defaultImport = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
const captureException = defaultImport.captureException;
const object3 = {};
copyDataProperties(object3, a1, undefined);
const object4 = {};
const value2 = a1 == null;
copyDataProperties(object4, value2 ? value : a1.tags, value2);
object4['app_context'] = 'webauthn';
object3['tags'] = object4;
Reflect.apply(captureException, defaultImport, [a0, object3]);
return value;
}
global.__d(_fun69993, 8980, [27, 1581, 8981, 1216,
2]) /* metro module 8980, dependencies: [27, 1581, 8981, 1216, 2] */;
File diff suppressed because it is too large. Load diff
+23 -20
View File
@@ -1,34 +1,37 @@
/* Metro module 7216; source: utils/MemoizerUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun57713(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7394:6, offset: 0x016b42c1, size: 92 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/MemoizerUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/MemoizerUtils.tsx');
exports.default = {makeMemoizer: function(a0) {
var env0_0 = a0;
var Map = global.Map;
var env0_1 = new Map();
return _fun57715;
}};
}
function makeMemoizer(a0) { // fn#57714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7394:112, offset: 0x016b431d, size: 48 bytes, params: 2, frame: 10
const env0_0 = a0;
const Map = global.Map;
const map = new Map();
return _fun57715;
function _fun57715(a0) { // fn#57715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7394:158, offset: 0x016b434d, size: 55 bytes, params: 2, frame: 14
var r0;
var value3;
const value2 = env0_1.get(a0);
if (value2 !== undefined) {
r0 = value2;
} else {
value3 = env0_0(a0);
env0_1.set(a0, value3);
r0 = value3;
}
return r0;
}
function makeMemoizer(a0) { // fn#57714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7394:112, offset: 0x016b431d, size: 48 bytes, params: 2, frame: 10
const env0_0 = a0;
const Map = global.Map;
const map = new Map();
return _fun57715;
}
function _fun57715(a0) { // fn#57715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7394:158, offset: 0x016b434d, size: 55 bytes, params: 2, frame: 14
var r0;
var value3;
const value2 = env0_1.get(a0);
if (value2 !== undefined) {
r0 = value2;
} else {
value3 = env0_0(a0);
env0_1.set(a0, value3);
r0 = value3;
}
return r0;
}
global.__d(_fun57713, 7216, [2]) /* metro module 7216, dependencies: [2] */;
+128 -120
View File
@@ -1,6 +1,11 @@
/* Metro module 11013; source: utils/MentionGuardUtils.tsx; dependencies: [57, 6875, 3784, 661, 44, 7076, 2] */
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import PermissionStore from '../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import ChannelMemberStore from '../stores/ChannelMemberStore.tsx'; /* Metro dependency 6875 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun84372(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11199:6, offset: 0x01f4764f, size: 290 bytes, params: 8, frame: 21
var object2;
const _arrayLikeToArray_84375 = function(a0, a1) {
var r0;
var r1;
@@ -44,23 +49,17 @@ function _fun84372(global, require, importDefault, importAll, module, exports, d
}
return value;
};
const closure = everyoneMemberCount;
const everyoneMemberCount2 = everyoneMemberCount;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const channelMemberStore = importDefault(6875) /* metro dependency 6875: ChannelMemberStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_5 = constantsModule.Permissions;
const env0_6 = constantsModule.StatusTypes;
const RegExp = global.RegExp;
const regExp = new RegExp(RegExp('@(:?everyone|here)', ''));
object2 = {shouldShowEveryoneGuard: function(a0, a1) {
object = {shouldShowEveryoneGuard: function(a0, a1) {
importDefault(dependencyMap[4])(a1.getGuildId(), 'isGuildChannel with null guildId');
value = everyoneMemberCount(a0, a1);
value = value > 30;
return value && PermissionStore.can(Permissions.MENTION_EVERYONE, a1);
}, everyoneMemberCount: closure, extractEveryoneRole: function(a0, a1) {
}, everyoneMemberCount: everyoneMemberCount2, extractEveryoneRole: function(a0, a1) {
var value4;
var value5;
var value2 = _createForOfIteratorHelperLoose_84373(importDefault(dependencyMap[5]).parsePreprocessor(a1, a0));
@@ -83,141 +82,150 @@ function _fun84372(global, require, importDefault, importAll, module, exports, d
}
return value4;
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/MentionGuardUtils.tsx');
exports.default = object2;
}
function _createForOfIteratorHelperLoose_84373(a0, a1) { // fn#84373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11199:173, offset: 0x01f47771, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
(FileImportTrackerModule).fileFinishedImporting('utils/MentionGuardUtils.tsx');
exports.default = object;
function _createForOfIteratorHelperLoose_84373(a0, a1) { // fn#84373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11199:173, offset: 0x01f47771, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun84374;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_84375(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun84374;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_84375(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_84375(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_84375(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun84374;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun84374() { // fn#84374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11199:744, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun84374;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function everyoneMemberCount(a0, a1) { // fn#84376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11199:1122, offset: 0x01f478e5, size: 119 bytes, params: 3, frame: 16
var r0;
const env0_0 = a0;
const value = 0;
if (a1.isThread()) {
r0 = a1.memberCount ?? value;
} else {
ChannelMemberStore.getProps(a1.getGuildId(), a1.id).groups.forEach(_fun84377);
r0 = value;
}
return r0;
}
function parsedItemUsesEveryoneRole(a0) { // fn#84378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11199:1321, offset: 0x01f479a1, size: 221 bytes, params: 2, frame: 18
var r4;
var r2;
var value2;
var value3;
var done;
var parsedItemUsesEveryoneRoleBinding;
var value4;
var value5;
var value6;
var type;
if (typeof a0.content === 'string') {
type = a0.type;
if (type === 'inlineCode') {
return null;
function everyoneMemberCount(a0, a1) { // fn#84376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11199:1122, offset: 0x01f478e5, size: 119 bytes, params: 3, frame: 16
var r0;
var channelMemberStoreBinding;
const env0_0 = a0;
const value = 0;
if (a1.isThread()) {
r0 = a1.memberCount ?? value;
} else {
channelMemberStoreBinding = ChannelMemberStore;
channelMemberStoreBinding.getProps(a1.getGuildId(), a1.id).groups.forEach(_fun84377);
r0 = value;
}
type = a0.type;
if (type === 'codeBlock') {
return null;
return r0;
function _fun84377(a0) { // fn#84377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11199:1263, offset: 0x01f4795c, size: 69 bytes, params: 2, frame: 5
if (!(env0_0 !== '@everyone' && a0.id === StatusTypes.OFFLINE)) {
env0_1 = env0_1 + a0.count;
}
}
r2 = a0.content?.match(env0_7);
if (r2 != null) {
return env0_2(r2, 1)[0];
}
} else {
var Array = global.Array;
if (Array.isArray(a0.content)) {
value2 = _createForOfIteratorHelperLoose_84373(a0.content);
value3 = value2();
done = value3.done;
if (done) {
}
function parsedItemUsesEveryoneRole(a0) { // fn#84378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11199:1321, offset: 0x01f479a1, size: 221 bytes, params: 2, frame: 18
var r4;
var r2;
var value2;
var value3;
var done;
var parsedItemUsesEveryoneRoleBinding;
var value4;
var value5;
var value6;
var type;
if (typeof a0.content === 'string') {
type = a0.type;
if (type === 'inlineCode') {
return null;
}
r4 = value3;
loopExit3: while (true) {
parsedItemUsesEveryoneRoleBinding = parsedItemUsesEveryoneRole;
value4 = r4.value;
value5 = parsedItemUsesEveryoneRoleBinding(value4);
if (value5 != null) {
break loopExit3;
}
value6 = value2();
done = value6.done;
type = a0.type;
if (type === 'codeBlock') {
return null;
}
r2 = a0.content?.match(env0_7);
if (r2 != null) {
return Module00057(r2, 1)[0];
}
} else {
var Array = global.Array;
if (Array.isArray(a0.content)) {
value2 = _createForOfIteratorHelperLoose_84373(a0.content);
value3 = value2();
done = value3.done;
if (done) {
return null;
}
r4 = value6;
continue;
r4 = value3;
loopExit3: while (true) {
parsedItemUsesEveryoneRoleBinding = parsedItemUsesEveryoneRole;
value4 = r4.value;
value5 = parsedItemUsesEveryoneRoleBinding(value4);
if (value5 != null) {
break loopExit3;
}
value6 = value2();
done = value6.done;
if (done) {
return null;
}
r4 = value6;
continue;
}
return value5;
}
return value5;
}
return null;
}
return null;
}
function _fun84377(a0) { // fn#84377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11199:1263, offset: 0x01f4795c, size: 69 bytes, params: 2, frame: 5
if (!(env0_0 !== '@everyone' && a0.id === StatusTypes.OFFLINE)) {
env0_1 = env0_1 + a0.count;
}
}
global.__d(_fun84372, 11013, [57, 6875, 3784, 661, 44, 7076,
2]) /* metro module 11013, dependencies: [57, 6875, 3784, 661, 44, 7076, 2] */;
+244 -233
View File
@@ -1,16 +1,19 @@
/* Metro module 13360; source: utils/ModerationUtils.tsx; dependencies: [661, 3831, 696, 13361, 1244, 1314, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as ShimsNativeModule from '../external/discord_common/js/packages/tokens/shims.native.tsx'; /* Metro dependency 696 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as Preloaded_user_settingsModule from '../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/preloaded_user_settings.tsx'; /* Metro dependency 1314 */
import * as DMSafetyConstantsModule from '../modules/user_settings/privacy_and_safety/DMSafetyConstants.tsx'; /* Metro dependency 3831 */
import * as HighlightedSettingsTypesModule from '../modules/guild_settings/safety/HighlightedSettingsTypes.tsx'; /* Metro dependency 13361 */
function _fun101730(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:6, offset: 0x0221d0ba, size: 249 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = mapColorToHighlightColor;
const mapColorToHighlightColor2 = mapColorToHighlightColor;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_2 = constantsModule.VerificationLevels;
const env0_3 = constantsModule.VerificationCriteria;
const env0_4 = constantsModule.GuildExplicitContentFilterTypes;
const env0_5 = (require(3831) /* metro dependency 3831: DMSafetyConstants */).ExplicitContentFilterTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ModerationUtils.tsx');
exports.mapColorToHighlightColor = closure;
(FileImportTrackerModule).fileFinishedImporting('utils/ModerationUtils.tsx');
exports.mapColorToHighlightColor = mapColorToHighlightColor2;
exports.mapOptionToHighlightedRowOptions = function(a0) {
return a0.map(_fun101733);
};
@@ -19,239 +22,247 @@ function _fun101730(global, require, importDefault, importAll, module, exports,
exports.generateContentFilterOptions = generateContentFilterOptions;
exports.generateDmSpamOptions = generateDmSpamOptions;
exports.generateExplicitImageOptions = generateExplicitImageOptions;
}
function mapColorToHighlightColor(a0) { // fn#101731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:227, offset: 0x0221d1b3, size: 408 bytes, params: 2, frame: 15
const HighlightColors = (require(13361) /* metro dependency 13361: HighlightedSettingsTypes */).HighlightColors;
const shimsNativeModule = require(696) /* metro dependency 696: shimsNative */;
if (shimsNativeModule.unsafe_getRawColor('PRIMARY_400') === a0) {
return HighlightColors.ACCENT;
function mapColorToHighlightColor(a0) { // fn#101731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:227, offset: 0x0221d1b3, size: 408 bytes, params: 2, frame: 15
const HighlightColors = (HighlightedSettingsTypesModule).HighlightColors;
if (ShimsNativeModule.unsafe_getRawColor('PRIMARY_400') === a0) {
return HighlightColors.ACCENT;
}
if (ShimsNativeModule.unsafe_getRawColor('GREEN_360') === a0) {
return HighlightColors.GREEN;
}
if (ShimsNativeModule.unsafe_getRawColor('YELLOW_360') === a0) {
return HighlightColors.YELLOW;
}
if (ShimsNativeModule.unsafe_getRawColor('ORANGE_345') === a0) {
return HighlightColors.ORANGE;
}
if (ShimsNativeModule.unsafe_getRawColor('RED_400') === a0) {
return HighlightColors.RED;
}
return HighlightColors.NONE;
}
const moduleValue2 = shimsNativeModule;
if (moduleValue2.unsafe_getRawColor('GREEN_360') === a0) {
return HighlightColors.GREEN;
function mapOptionToHighlightedRowOptions(a0) { // fn#101732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:878, offset: 0x0221d34b, size: 24 bytes, params: 2, frame: 11
return a0.map(function(a0) {
var object = {title: a0.name, description: a0.desc};
object.highlightColor = mapColorToHighlightColor(a0.color);
object.value = a0.value;
object.disabled = a0.disabled;
return object;
});
function _fun101733({name, desc, color, value, disabled}) { // fn#101733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:937, offset: 0x0221d363, size: 68 bytes, params: 2, frame: 13
const object = {};
object.title = name;
object.description = desc;
const __proto__ = environment.__proto__;
object.highlightColor = mapColorToHighlightColor(color);
object.value = __proto__;
object.disabled = disabled;
return object;
}
}
const moduleValue3 = shimsNativeModule;
if (moduleValue3.unsafe_getRawColor('YELLOW_360') === a0) {
return HighlightColors.YELLOW;
function generateVerificationLevelOptions() { // fn#101734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:1097, offset: 0x0221d3a7, size: 915 bytes, params: 1, frame: 21
let value = a0;
const value2 = a1;
const value3 = undefined;
const r0 = value !== value3 ? value : false;
const r4 = value2 !== value3 ? value2 : false;
let object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
const PEzffq = t.PEzffq;
object.name = Reflect.apply(string, intl, [PEzffq]);
string = intl.string;
let r2 = r0 ? Reflect.apply(string, intl, [t.j9WtHx]) : Reflect.apply(string, intl, [t.nDQy0p]);
object.desc = r2;
const NONE = VerificationLevels.NONE;
object.value = NONE;
object.disabled = r0;
const items2 = [object];
object = {};
string = intl.string;
const SsCK8I = t.SsCK8I;
object.name = Reflect.apply(string, intl, [SsCK8I]);
object.desc = intl.string(t['8GCOX6']);
const LOW = VerificationLevels.LOW;
object.value = LOW;
object.color = r4 ? value3 : (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('GREEN_360');
items2[1] = object;
object = {};
string = intl.string;
const WwNoR4 = t.WwNoR4;
object.name = Reflect.apply(string, intl, [WwNoR4]);
let formatToPlainString = intl.formatToPlainString;
const VS14ga = t.VS14ga;
const ACCOUNT_AGE = VerificationCriteria.ACCOUNT_AGE;
object.desc = Reflect.apply(formatToPlainString, intl, [VS14ga, {min: ACCOUNT_AGE}]);
const MEDIUM = VerificationLevels.MEDIUM;
object.value = MEDIUM;
object.color = r4 ? value3 : (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('YELLOW_360');
items2[2] = object;
object = {};
string = intl.string;
const I2jMUF = t.I2jMUF;
object.name = Reflect.apply(string, intl, [I2jMUF]);
formatToPlainString = intl.formatToPlainString;
const property = t['r+b3I4'];
const MEMBER_AGE = VerificationCriteria.MEMBER_AGE;
object.desc = Reflect.apply(formatToPlainString, intl, [property, {min: MEMBER_AGE}]);
const HIGH = VerificationLevels.HIGH;
object.value = HIGH;
object.color = r4 ? value3 : (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('ORANGE_345');
items2[3] = object;
object = {};
object.name = intl.string(t.cJY8w9);
string = intl.string;
const PWaKme = t.PWaKme;
object.desc = Reflect.apply(string, intl, [PWaKme]);
const VERY_HIGH = VerificationLevels.VERY_HIGH;
object.value = VERY_HIGH;
if (r4) {
r2 = value3;
} else {
value = require(696) /* metro dependency 696: shimsNative */;
value = value.unsafe_getRawColor('RED_400');
r2 = value;
}
object.color = r2;
items2[4] = object;
return items2;
}
const moduleValue4 = shimsNativeModule;
if (moduleValue4.unsafe_getRawColor('ORANGE_345') === a0) {
return HighlightColors.ORANGE;
function generateContentFilterHighlightedOptions() { // fn#101735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:2054, offset: 0x0221d73a, size: 543 bytes, params: 1, frame: 20
const value = a0;
const r3 = value !== undefined ? value : false;
let object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object.name = Reflect.apply(string, intl, [t.iHuPE6]);
object.desc = intl.string(t['Z+yUWF']);
const ALL_MEMBERS = GuildExplicitContentFilterTypes.ALL_MEMBERS;
object.value = ALL_MEMBERS;
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('RED_400');
const items2 = [object];
object = {};
object.name = intl.string(t.ynfFaI);
string = intl.string;
object.desc = r3 ? Reflect.apply(string, intl, [t.j9WtHx]) : Reflect.apply(string, intl, [t['3fRIN4']]);
const MEMBERS_WITHOUT_ROLES = GuildExplicitContentFilterTypes.MEMBERS_WITHOUT_ROLES;
object.value = MEMBERS_WITHOUT_ROLES;
object.disabled = r3;
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('YELLOW_360');
items2[1] = object;
object = {};
string = intl.string;
const VbSyAx = t.VbSyAx;
object.name = Reflect.apply(string, intl, [VbSyAx]);
string = intl.string;
object.desc = r3 ? Reflect.apply(string, intl, [t.j9WtHx]) : Reflect.apply(string, intl, [t.M6GNsJ]);
const DISABLED = GuildExplicitContentFilterTypes.DISABLED;
object.value = DISABLED;
object.disabled = r3;
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PRIMARY_400');
items2[2] = object;
return items2;
}
const moduleValue5 = shimsNativeModule;
if (moduleValue5.unsafe_getRawColor('RED_400') === a0) {
return HighlightColors.RED;
function generateContentFilterOptions() { // fn#101736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:2727, offset: 0x0221d959, size: 446 bytes, params: 1, frame: 19
const value = a0;
const r2 = value !== undefined ? value : false;
let object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object.name = Reflect.apply(string, intl, [t.iHuPE6]);
object.desc = intl.string(t['Z+yUWF']);
const ALL_MEMBERS = GuildExplicitContentFilterTypes.ALL_MEMBERS;
object.value = ALL_MEMBERS;
const items2 = [object];
string = intl.string;
const MEMBERS_WITHOUT_ROLES = GuildExplicitContentFilterTypes.MEMBERS_WITHOUT_ROLES;
items2[1] = {name: intl.string(t.ynfFaI), desc: r2 ? Reflect.apply(string, intl, [t.j9WtHx]) : Reflect.apply(string,
intl, [t['3fRIN4']]), value: MEMBERS_WITHOUT_ROLES, disabled: r2};
object = {};
string = intl.string;
const VbSyAx = t.VbSyAx;
object.name = Reflect.apply(string, intl, [VbSyAx]);
string = intl.string;
object.desc = r2 ? Reflect.apply(string, intl, [t.j9WtHx]) : Reflect.apply(string, intl, [t.M6GNsJ]);
const DISABLED = GuildExplicitContentFilterTypes.DISABLED;
object.value = DISABLED;
object.disabled = r2;
items2[2] = object;
return items2;
}
return HighlightColors.NONE;
}
function mapOptionToHighlightedRowOptions(a0) { // fn#101732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:878, offset: 0x0221d34b, size: 24 bytes, params: 2, frame: 11
return a0.map(function(a0) {
var object = {title: a0.name, description: a0.desc};
object.highlightColor = mapColorToHighlightColor(a0.color);
object.value = a0.value;
object.disabled = a0.disabled;
return object;
});
}
function generateVerificationLevelOptions() { // fn#101734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:1097, offset: 0x0221d3a7, size: 915 bytes, params: 1, frame: 21
let value = a0;
const value2 = a1;
const value3 = undefined;
const r0 = value !== value3 ? value : false;
const r4 = value2 !== value3 ? value2 : false;
let object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const PEzffq = t.PEzffq;
object2.name = Reflect.apply(string, intl, [PEzffq]);
string = intl.string;
let r2 = r0 ? Reflect.apply(string, intl, [t.j9WtHx]) : Reflect.apply(string, intl, [t.nDQy0p]);
object2.desc = r2;
const NONE = VerificationLevels.NONE;
object2.value = NONE;
object2.disabled = r0;
const items2 = [object2];
object2 = {};
string = intl.string;
const SsCK8I = t.SsCK8I;
object2.name = Reflect.apply(string, intl, [SsCK8I]);
object2.desc = intl.string(t['8GCOX6']);
const LOW = VerificationLevels.LOW;
object2.value = LOW;
object2.color = r4 ? value3 : (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('GREEN_360');
items2[1] = object2;
object2 = {};
string = intl.string;
const WwNoR4 = t.WwNoR4;
object2.name = Reflect.apply(string, intl, [WwNoR4]);
let formatToPlainString = intl.formatToPlainString;
const VS14ga = t.VS14ga;
const ACCOUNT_AGE = VerificationCriteria.ACCOUNT_AGE;
object2.desc = Reflect.apply(formatToPlainString, intl, [VS14ga, {min: ACCOUNT_AGE}]);
const MEDIUM = VerificationLevels.MEDIUM;
object2.value = MEDIUM;
object2.color = r4 ? value3 : (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('YELLOW_360');
items2[2] = object2;
object2 = {};
string = intl.string;
const I2jMUF = t.I2jMUF;
object2.name = Reflect.apply(string, intl, [I2jMUF]);
formatToPlainString = intl.formatToPlainString;
const property = t['r+b3I4'];
const MEMBER_AGE = VerificationCriteria.MEMBER_AGE;
object2.desc = Reflect.apply(formatToPlainString, intl, [property, {min: MEMBER_AGE}]);
const HIGH = VerificationLevels.HIGH;
object2.value = HIGH;
object2.color = r4 ? value3 : (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('ORANGE_345');
items2[3] = object2;
object2 = {};
object2.name = intl.string(t.cJY8w9);
string = intl.string;
const PWaKme = t.PWaKme;
object2.desc = Reflect.apply(string, intl, [PWaKme]);
const VERY_HIGH = VerificationLevels.VERY_HIGH;
object2.value = VERY_HIGH;
if (r4) {
r2 = value3;
} else {
value = require(696) /* metro dependency 696: shimsNative */;
value = value.unsafe_getRawColor('RED_400');
r2 = value;
function generateDmSpamOptions() { // fn#101737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:3243, offset: 0x0221db17, size: 421 bytes, params: 1, frame: 18
let object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object.name = Reflect.apply(string, intl, [t['4IaoCI']]);
string = intl.string;
const TgipjE = t.TgipjE;
object.desc = Reflect.apply(string, intl, [TgipjE]);
const DmSpamFilterV2 = (Preloaded_user_settingsModule).DmSpamFilterV2;
const FRIENDS_AND_NON_FRIENDS = DmSpamFilterV2.FRIENDS_AND_NON_FRIENDS;
object.value = FRIENDS_AND_NON_FRIENDS;
const items2 = [object];
object = {};
object.name = intl.string(t['6NnX6F']);
object.desc = intl.string(t['+dw1qu']);
const NON_FRIENDS = DmSpamFilterV2.NON_FRIENDS;
object.value = NON_FRIENDS;
items2[1] = object;
object = {};
object.name = intl.string(t['1tiAFz']);
string = intl.string;
const LKTyeA = t.LKTyeA;
object.desc = Reflect.apply(string, intl, [LKTyeA]);
const DISABLED = DmSpamFilterV2.DISABLED;
object.value = DISABLED;
items2[2] = object;
return items2;
}
object2.color = r2;
items2[4] = object2;
return items2;
}
function generateContentFilterHighlightedOptions() { // fn#101735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:2054, offset: 0x0221d73a, size: 543 bytes, params: 1, frame: 20
const value = a0;
const r3 = value !== undefined ? value : false;
let object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.name = Reflect.apply(string, intl, [t.iHuPE6]);
object2.desc = intl.string(t['Z+yUWF']);
const ALL_MEMBERS = GuildExplicitContentFilterTypes.ALL_MEMBERS;
object2.value = ALL_MEMBERS;
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('RED_400');
const items2 = [object2];
object2 = {};
object2.name = intl.string(t.ynfFaI);
string = intl.string;
object2.desc = r3 ? Reflect.apply(string, intl, [t.j9WtHx]) : Reflect.apply(string, intl, [t['3fRIN4']]);
const MEMBERS_WITHOUT_ROLES = GuildExplicitContentFilterTypes.MEMBERS_WITHOUT_ROLES;
object2.value = MEMBERS_WITHOUT_ROLES;
object2.disabled = r3;
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('YELLOW_360');
items2[1] = object2;
object2 = {};
string = intl.string;
const VbSyAx = t.VbSyAx;
object2.name = Reflect.apply(string, intl, [VbSyAx]);
string = intl.string;
object2.desc = r3 ? Reflect.apply(string, intl, [t.j9WtHx]) : Reflect.apply(string, intl, [t.M6GNsJ]);
const DISABLED = GuildExplicitContentFilterTypes.DISABLED;
object2.value = DISABLED;
object2.disabled = r3;
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('PRIMARY_400');
items2[2] = object2;
return items2;
}
function generateExplicitImageOptions() { // fn#101738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:3724, offset: 0x0221dcbc, size: 466 bytes, params: 1, frame: 19
let object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
const PhNlhz = t.PhNlhz;
object.name = Reflect.apply(string, intl, [PhNlhz]);
object.desc = intl.string(t['Fw+Lvp']);
const FRIENDS_AND_NON_FRIENDS = ExplicitContentFilterTypes.FRIENDS_AND_NON_FRIENDS;
object.value = FRIENDS_AND_NON_FRIENDS;
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('GREEN_360');
const items2 = [object];
object = {};
object.name = intl.string(t['8ioJ4S']);
object.desc = intl.string(t.z4l4Cr);
const NON_FRIENDS = ExplicitContentFilterTypes.NON_FRIENDS;
object.value = NON_FRIENDS;
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('YELLOW_360');
items2[1] = object;
object = {};
string = intl.string;
const FLfuhL = t.FLfuhL;
object.name = Reflect.apply(string, intl, [FLfuhL]);
string = intl.string;
const MoZlaD = t.MoZlaD;
object.desc = Reflect.apply(string, intl, [MoZlaD]);
const DISABLED = ExplicitContentFilterTypes.DISABLED;
object.value = DISABLED;
object.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('RED_400');
items2[2] = object;
return items2;
}
function generateContentFilterOptions() { // fn#101736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:2727, offset: 0x0221d959, size: 446 bytes, params: 1, frame: 19
const value = a0;
const r2 = value !== undefined ? value : false;
let object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.name = Reflect.apply(string, intl, [t.iHuPE6]);
object2.desc = intl.string(t['Z+yUWF']);
const ALL_MEMBERS = GuildExplicitContentFilterTypes.ALL_MEMBERS;
object2.value = ALL_MEMBERS;
const items2 = [object2];
string = intl.string;
const MEMBERS_WITHOUT_ROLES = GuildExplicitContentFilterTypes.MEMBERS_WITHOUT_ROLES;
items2[1] = {name: intl.string(t.ynfFaI), desc: r2 ? Reflect.apply(string, intl, [t.j9WtHx]) : Reflect.apply(string,
intl, [t['3fRIN4']]), value: MEMBERS_WITHOUT_ROLES, disabled: r2};
object2 = {};
string = intl.string;
const VbSyAx = t.VbSyAx;
object2.name = Reflect.apply(string, intl, [VbSyAx]);
string = intl.string;
object2.desc = r2 ? Reflect.apply(string, intl, [t.j9WtHx]) : Reflect.apply(string, intl, [t.M6GNsJ]);
const DISABLED = GuildExplicitContentFilterTypes.DISABLED;
object2.value = DISABLED;
object2.disabled = r2;
items2[2] = object2;
return items2;
}
function generateDmSpamOptions() { // fn#101737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:3243, offset: 0x0221db17, size: 421 bytes, params: 1, frame: 18
let object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.name = Reflect.apply(string, intl, [t['4IaoCI']]);
string = intl.string;
const TgipjE = t.TgipjE;
object2.desc = Reflect.apply(string, intl, [TgipjE]);
const DmSpamFilterV2 = (require(1314) /* metro dependency 1314: preloaded_user_settings */).DmSpamFilterV2;
const FRIENDS_AND_NON_FRIENDS = DmSpamFilterV2.FRIENDS_AND_NON_FRIENDS;
object2.value = FRIENDS_AND_NON_FRIENDS;
const items2 = [object2];
object2 = {};
object2.name = intl.string(t['6NnX6F']);
object2.desc = intl.string(t['+dw1qu']);
const NON_FRIENDS = DmSpamFilterV2.NON_FRIENDS;
object2.value = NON_FRIENDS;
items2[1] = object2;
object2 = {};
object2.name = intl.string(t['1tiAFz']);
string = intl.string;
const LKTyeA = t.LKTyeA;
object2.desc = Reflect.apply(string, intl, [LKTyeA]);
const DISABLED = DmSpamFilterV2.DISABLED;
object2.value = DISABLED;
items2[2] = object2;
return items2;
}
function generateExplicitImageOptions() { // fn#101738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13550:3724, offset: 0x0221dcbc, size: 466 bytes, params: 1, frame: 19
let object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const PhNlhz = t.PhNlhz;
object2.name = Reflect.apply(string, intl, [PhNlhz]);
object2.desc = intl.string(t['Fw+Lvp']);
const FRIENDS_AND_NON_FRIENDS = ExplicitContentFilterTypes.FRIENDS_AND_NON_FRIENDS;
object2.value = FRIENDS_AND_NON_FRIENDS;
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('GREEN_360');
const items2 = [object2];
object2 = {};
object2.name = intl.string(t['8ioJ4S']);
object2.desc = intl.string(t.z4l4Cr);
const NON_FRIENDS = ExplicitContentFilterTypes.NON_FRIENDS;
object2.value = NON_FRIENDS;
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('YELLOW_360');
items2[1] = object2;
object2 = {};
string = intl.string;
const FLfuhL = t.FLfuhL;
object2.name = Reflect.apply(string, intl, [FLfuhL]);
string = intl.string;
const MoZlaD = t.MoZlaD;
object2.desc = Reflect.apply(string, intl, [MoZlaD]);
const DISABLED = ExplicitContentFilterTypes.DISABLED;
object2.value = DISABLED;
object2.color = (require(696) /* metro dependency 696: shimsNative */).unsafe_getRawColor('RED_400');
items2[2] = object2;
return items2;
}
global.__d(_fun101730, 13360, [661, 3831, 696, 13361, 1244, 1314,
2]) /* metro module 13360, dependencies: [661, 3831, 696, 13361, 1244, 1314, 2] */;
+35 -32
View File
@@ -1,48 +1,51 @@
/* Metro module 1458; source: utils/NetworkUtils.tsx; dependencies: [1459, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as NetworkUtilsModule from './native/NetworkUtils.tsx'; /* Metro dependency 1459 */
function _fun16708(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#16708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1585:6, offset: 0x00e585df, size: 142 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = [];
object2 = {};
copyDataProperties(object2, (require(1459) /* metro dependency 1459: NetworkUtils */).default, undefined);
object2['awaitOnline'] = function() {
object = {};
copyDataProperties(object, (NetworkUtilsModule).default, undefined);
object['awaitOnline'] = function() {
var Promise = global.Promise;
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
var value2 = new Promise(_fun16710);
return value2 instanceof Object ? value2 : value;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/NetworkUtils.tsx');
exports.default = object2;
}
(FileImportTrackerModule).fileFinishedImporting('utils/NetworkUtils.tsx');
exports.default = object;
function awaitOnline_16709() { // fn#16709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1585:142, offset: 0x00e5866d, size: 37 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun16710);
return promise instanceof Object ? promise : value;
function _fun16710(a0) { // fn#16710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1585:159, offset: 0x00e58692, size: 126 bytes, params: 2, frame: 15
const whenOnline2 = whenOnline;
const property = (NetworkUtilsModule).default;
if (property.isOnline()) {
return a0();
}
env1_2.push(a0);
if (!env1_3) {
property.addOnlineCallback(whenOnline2);
}
function whenOnline() { // fn#16711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1585:228, offset: 0x00e58710, size: 82 bytes, params: 1, frame: 12
const binding = env2_2;
binding.forEach(function(a0) {
return a0();
});
binding.length = 0;
const property = (NetworkUtilsModule).default;
property.removeOnlineCallback(whenOnline);
}
function awaitOnline_16709() { // fn#16709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1585:142, offset: 0x00e5866d, size: 37 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun16710);
return promise instanceof Object ? promise : value;
}
}
function _fun16710(a0) { // fn#16710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1585:159, offset: 0x00e58692, size: 126 bytes, params: 2, frame: 15
const closure = whenOnline;
const property = (require(1459) /* metro dependency 1459: NetworkUtils */).default;
if (property.isOnline()) {
return a0();
}
env1_2.push(a0);
if (!env1_3) {
property.addOnlineCallback(closure);
}
}
function whenOnline() { // fn#16711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1585:228, offset: 0x00e58710, size: 82 bytes, params: 1, frame: 12
const binding = env2_2;
binding.forEach(function(a0) {
return a0();
});
binding.length = 0;
const property = (require(1459) /* metro dependency 1459: NetworkUtils */).default;
property.removeOnlineCallback(whenOnline);
}
global.__d(_fun16708, 1458, [1459, 2]) /* metro module 1458, dependencies: [1459, 2] */;
+63 -55
View File
@@ -1,9 +1,14 @@
/* Metro module 4617; source: utils/NicknameUtils.tsx; dependencies: [1379, 1945, 3793, 1244, 3995, 566, 2] */
import ChannelStore from '../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildMemberStore from '../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import RelationshipStore from '../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun39640(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4795:6, offset: 0x010e735c, size: 201 bytes, params: 8, frame: 22
var object2;
let env0_0 = require;
const closure = getNickname;
const closure2 = getName_39642;
const getNickname2 = getNickname;
const getName_396422 = getName_39642;
const closure3 = function(a0, a1, a2) {
var env0_0 = a0;
var env0_1 = a1;
@@ -13,66 +18,69 @@ function _fun39640(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
object2 = {getNickname: closure, getName: closure2, useName: closure3};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/NicknameUtils.tsx');
exports.default = object2;
exports.getNickname = closure;
exports.getName = closure2;
object = {getNickname: getNickname2, getName: getName_396422, useName: closure3};
(FileImportTrackerModule).fileFinishedImporting('utils/NicknameUtils.tsx');
exports.default = object;
exports.getNickname = getNickname2;
exports.getName = getName_396422;
exports.useName = closure3;
}
function getNickname(a0, a1, a2) { // fn#39641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4795:126, offset: 0x010e7425, size: 109 bytes, params: 4, frame: 16
if (a2 != null) {
if (a0 != null) {
return GuildMemberStore.getNick(a0, a2.id);
}
if (a1 == null) {
return null;
}
var channel = ChannelStore.getChannel(a1);
if (channel == null) {
return null;
}
if (channel.isPrivate()) {
return RelationshipStore.getNickname(a2.id);
function getNickname(a0, a1, a2) { // fn#39641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4795:126, offset: 0x010e7425, size: 109 bytes, params: 4, frame: 16
var relationshipStoreBinding;
var guildMemberStoreBinding;
if (a2 != null) {
if (a0 != null) {
guildMemberStoreBinding = GuildMemberStore;
return guildMemberStoreBinding.getNick(a0, a2.id);
}
if (a1 == null) {
return null;
}
var channel = ChannelStore.getChannel(a1);
if (channel == null) {
return null;
}
if (channel.isPrivate()) {
relationshipStoreBinding = RelationshipStore;
return relationshipStoreBinding.getNickname(a2.id);
}
}
return null;
}
return null;
}
function getName_39642(a0, a1, a2) { // fn#39642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4795:312, offset: 0x010e7492, size: 130 bytes, params: 4, frame: 17
var r0;
var value;
var nickname;
var intl;
if (a2 == null) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sKdZ6U);
} else {
nickname = getNickname(a0, a1, a2);
if (nickname != null) {
r0 = nickname;
function getName_39642(a0, a1, a2) { // fn#39642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4795:312, offset: 0x010e7492, size: 130 bytes, params: 4, frame: 17
var r0;
var value;
var nickname;
var intl;
if (a2 == null) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sKdZ6U);
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(a2);
r0 = value;
nickname = getNickname(a0, a1, a2);
if (nickname != null) {
r0 = nickname;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(a2);
r0 = value;
}
}
return r0;
}
return r0;
}
function useName_39643(a0, a1, a2) { // fn#39643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4795:445, offset: 0x010e7514, size: 94 bytes, params: 4, frame: 15
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore, ChannelStore,
RelationshipStore], _fun39644);
}
function useName_39643(a0, a1, a2) { // fn#39643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4795:445, offset: 0x010e7514, size: 94 bytes, params: 4, frame: 15
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
return (FluxModule).useStateFromStores([GuildMemberStore, ChannelStore,
RelationshipStore], _fun39644);
function _fun39644() { // fn#39644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4795:512, offset: 0x010e7572, size: 33 bytes, params: 1, frame: 15
return getName_39642(env0_0, require, importDefault);
}
}
function _fun39644() { // fn#39644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4795:512, offset: 0x010e7572, size: 33 bytes, params: 1, frame: 15
return getName_39642(env0_0, require, importDefault);
}
global.__d(_fun39640, 4617, [1379, 1945, 3793, 1244, 3995, 566,
2]) /* metro module 4617, dependencies: [1379, 1945, 3793, 1244, 3995, 566, 2] */;
+290 -281
View File
@@ -1,4 +1,15 @@
/* Metro module 6610; source: utils/NotificationSettingsUtils.tsx; dependencies: [6611, 1379, 4814, 4864, 661, 3796, 4865, 670, 1391, 4863, 683, 2] */
import ChannelStore from '../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import MessageStore from '../stores/MessageStore.tsx'; /* Metro dependency 4814 */
import AppAnalyticsUtils from '../modules/app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
import UserGuildSettingsStore from '../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import LastMentionTimestampStore from '../modules/notifications/LastMentionTimestampStore.tsx'; /* Metro dependency 6611 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as FlagUtilsModule from '../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
import * as NotificationConstantsModule from '../modules/notifications/NotificationConstants.tsx'; /* Metro dependency 3796 */
import * as ReadStateConstantsModule from '../modules/read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
function _fun52182(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:6, offset: 0x01321b2a, size: 981 bytes, params: 8, frame: 26
let env0_0 = require;
const differ = function(a0, a1, a2) {
@@ -28,23 +39,17 @@ function _fun52182(global, require, importDefault, importAll, module, exports, d
}
return r0;
};
const closure2 = getCurrentGuildSettings;
const closure3 = getCurrentChannelSettings;
const getCurrentGuildSettings2 = getCurrentGuildSettings;
const getCurrentChannelSettings2 = getCurrentChannelSettings;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const lastMentionTimestampStore = importDefault(6611) /* metro dependency 6611: LastMentionTimestampStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_7 = value.AnalyticEvents;
const UserNotificationSettings = value.UserNotificationSettings;
const env0_9 = (require(3796) /* metro dependency 3796: NotificationConstants */).NotificationSettingsUpdateType;
const env0_10 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
value = require(670) /* metro dependency 670: UserSettingsConstants */;
const env0_11 = value.ChannelNotificationSettingsFlags;
const env0_12 = value.GuildNotificationSettingsFlags;
const object = {forumThreadsCreated: forumThreadsCreated, suppressEveryone: suppressEveryone,
const object2 = {forumThreadsCreated: forumThreadsCreated, suppressEveryone: suppressEveryone,
suppressRoles: suppressRoles, highlights: highlights, mobilePush: mobilePush, optedIn: optedIn,
favorited: favorited, muted: muted, mutedEvents: mutedEvents, unreads: unreads, notifications: notifications};
Object = global.Object;
@@ -55,7 +60,7 @@ function _fun52182(global, require, importDefault, importAll, module, exports, d
const NULL = UserNotificationSettings.NULL;
value = Reflect.apply(freeze, Object, [{[ALL_MESSAGES]: 'All', [ONLY_MENTIONS]: 'Mentions',
[NO_MESSAGES]: 'Nothing', [NULL]: null}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/NotificationSettingsUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/NotificationSettingsUtils.tsx');
exports.NotificationLabels = {ForumThreadsCreatedOn: 'enabled forum thread created notifs',
ForumThreadsCreatedOff: 'disabled forum thread created notifs', SuppressEveryoneOn: 'enabled suppress everyone',
SuppressEveryoneOff: 'disabled suppress everyone', SuppressRolesOn: 'enabled suppress roles',
@@ -72,12 +77,12 @@ function _fun52182(global, require, importDefault, importAll, module, exports, d
UnmutedScheduledEvents: 'unmuted scheduled events', OverrideCreated: 'channel override created',
OverrideDeleted: 'channel override deleted',
AnnouncementAutoEnable: 'announcement channels auto set to all messages'};
exports.NotificationLabel = object;
exports.NotificationLabel = object2;
exports.MessageNotificationSettings = value;
exports.trackGuildNotificationSettingsUpdate = trackGuildNotificationSettingsUpdate;
exports.muteConfigToTimestamp = closure;
exports.trackChannelNotificationSettingsUpdate = trackChannelNotificationSettingsUpdate;
exports.getCurrentGuildSettings = closure2;
exports.getCurrentGuildSettings = getCurrentGuildSettings2;
exports.getManyCurrentGuildSettings = function(a0) {
var Map = global.Map;
var value2 = new Map();
@@ -85,7 +90,7 @@ function _fun52182(global, require, importDefault, importAll, module, exports, d
a0.forEach(_fun52204);
return value2;
};
exports.getCurrentChannelSettings = closure3;
exports.getCurrentChannelSettings = getCurrentChannelSettings2;
exports.getManyCurrentChannelSettings = function(a0, a1) {
var env0_0 = a0;
var Map = global.Map;
@@ -100,293 +105,297 @@ function _fun52182(global, require, importDefault, importAll, module, exports, d
defaultImport.track(NOTIFICATION_SETTINGS_UPDATED, {update_type: NotificationSettingsUpdateType.ACCOUNT,
quiet_mode_enabled: a0.quietMode, quiet_mode_enabled_old: a1.quietMode});
};
}
function differ(a0, a1, a2) { // fn#52183, offset: 0x01321eff, size: 33 bytes, params: 4, frame: 2
const env0_0 = a0;
const env0_1 = a1;
return _fun52184;
function _fun52184(a0) { // fn#52184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2719, offset: 0x01321f20, size: 56 bytes, params: 2, frame: 5
if (env0_2 === 'RETURN_PREVIOUS_WHEN_CHANGED') {
return env0_0[a0] === require[a0] ? undefined : env0_0[a0];
}
}
function differ(a0, a1, a2) { // fn#52183, offset: 0x01321eff, size: 33 bytes, params: 4, frame: 2
const env0_0 = a0;
const env0_1 = a1;
return _fun52184;
}
}
function getCurrentGuildSettings(a0) { // fn#52186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2896, offset: 0x01321fa3, size: 268 bytes, params: 2, frame: 15
var r2;
var end_time;
var Date;
var value4;
var date;
const isMuted2 = UserGuildSettingsStore.isMuted(a0);
const muteConfig = UserGuildSettingsStore.getMuteConfig(a0);
const object2 = {};
object2.guild_suppress_everyone = UserGuildSettingsStore.isSuppressEveryoneEnabled(a0);
object2.guild_suppress_roles = UserGuildSettingsStore.isSuppressRolesEnabled(a0);
object2.guild_scheduled_events_muted = UserGuildSettingsStore.isMuteScheduledEventsEnabled(a0);
object2.guild_is_muted = isMuted2;
const value3 = null;
if (value3 != muteConfig) {
end_time = muteConfig.end_time;
if (value3 != end_time) {
Date = global.Date;
function getCurrentGuildSettings(a0) { // fn#52186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2896, offset: 0x01321fa3, size: 268 bytes, params: 2, frame: 15
var r2;
var end_time;
var Date;
var value4;
var date;
const isMuted2 = UserGuildSettingsStore.isMuted(a0);
const muteConfig = UserGuildSettingsStore.getMuteConfig(a0);
const object = {};
object.guild_suppress_everyone = UserGuildSettingsStore.isSuppressEveryoneEnabled(a0);
object.guild_suppress_roles = UserGuildSettingsStore.isSuppressRolesEnabled(a0);
object.guild_scheduled_events_muted = UserGuildSettingsStore.isMuteScheduledEventsEnabled(a0);
object.guild_is_muted = isMuted2;
const value3 = null;
if (value3 != muteConfig) {
end_time = muteConfig.end_time;
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r2 = (date instanceof Object ? date : value4).getTime();
if (value3 != end_time) {
Date = global.Date;
end_time = muteConfig.end_time;
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r2 = (date instanceof Object ? date : value4).getTime();
} else {
r2 = value3;
}
} else {
r2 = value3;
}
} else {
r2 = value3;
object.guild_muted_until = r2;
object.guild_receive_mobile_push = UserGuildSettingsStore.isMobilePushEnabled(a0);
const binding = env0_14;
userGuildSettingsStoreBinding = UserGuildSettingsStore;
const getMessageNotifications = userGuildSettingsStoreBinding.getMessageNotifications;
object.guild_message_notification_settings = binding[Reflect.apply(getMessageNotifications,
userGuildSettingsStoreBinding, [a0])];
object.guild_notify_highlights = UserGuildSettingsStore.getNotifyHighlights(a0);
object.guild_flags = UserGuildSettingsStore.getGuildFlags(a0);
return object;
}
object2.guild_muted_until = r2;
object2.guild_receive_mobile_push = UserGuildSettingsStore.isMobilePushEnabled(a0);
const binding = env0_14;
const getMessageNotifications = UserGuildSettingsStore.getMessageNotifications;
object2.guild_message_notification_settings = binding[Reflect.apply(getMessageNotifications, UserGuildSettingsStore,
[a0])];
object2.guild_notify_highlights = UserGuildSettingsStore.getNotifyHighlights(a0);
object2.guild_flags = UserGuildSettingsStore.getGuildFlags(a0);
return object2;
}
function getCurrentChannelSettings(a0, a1) { // fn#52187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:3443, offset: 0x013220af, size: 175 bytes, params: 3, frame: 17
var r2;
var end_time;
var Date;
var value4;
var date;
const isChannelMuted2 = UserGuildSettingsStore.isChannelMuted(a0, a1);
const channelMuteConfig = UserGuildSettingsStore.getChannelMuteConfig(a0, a1);
const object2 = {channel_is_muted: isChannelMuted2};
const value3 = null;
if (value3 != channelMuteConfig) {
end_time = channelMuteConfig.end_time;
if (value3 != end_time) {
Date = global.Date;
function getCurrentChannelSettings(a0, a1) { // fn#52187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:3443, offset: 0x013220af, size: 175 bytes, params: 3, frame: 17
var r2;
var end_time;
var Date;
var value4;
var date;
const isChannelMuted2 = UserGuildSettingsStore.isChannelMuted(a0, a1);
const channelMuteConfig = UserGuildSettingsStore.getChannelMuteConfig(a0, a1);
const object = {channel_is_muted: isChannelMuted2};
const value3 = null;
if (value3 != channelMuteConfig) {
end_time = channelMuteConfig.end_time;
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r2 = (date instanceof Object ? date : value4).getTime();
if (value3 != end_time) {
Date = global.Date;
end_time = channelMuteConfig.end_time;
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r2 = (date instanceof Object ? date : value4).getTime();
} else {
r2 = value3;
}
} else {
r2 = value3;
}
} else {
r2 = value3;
object.channel_muted_until = r2;
const binding = env0_14;
userGuildSettingsStoreBinding = UserGuildSettingsStore;
const getChannelMessageNotifications = userGuildSettingsStoreBinding.getChannelMessageNotifications;
object.channel_message_notification_settings = binding[Reflect.apply(getChannelMessageNotifications,
userGuildSettingsStoreBinding, [a0, a1])];
object.channel_flags = UserGuildSettingsStore.getChannelIdFlags(a0, a1);
return object;
}
object2.channel_muted_until = r2;
const binding = env0_14;
const getChannelMessageNotifications = UserGuildSettingsStore.getChannelMessageNotifications;
object2.channel_message_notification_settings = binding[Reflect.apply(getChannelMessageNotifications,
UserGuildSettingsStore, [a0, a1])];
object2.channel_flags = UserGuildSettingsStore.getChannelIdFlags(a0, a1);
return object2;
}
function forumThreadsCreated(a0) { // fn#52188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:1878, offset: 0x0132215e, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.ForumThreadsCreatedOn : binding.ForumThreadsCreatedOff;
}
function suppressEveryone(a0) { // fn#52189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:1949, offset: 0x0132217b, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.SuppressEveryoneOn : binding.SuppressEveryoneOff;
}
function suppressRoles(a0) { // fn#52190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2011, offset: 0x01322198, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.SuppressRolesOn : binding.SuppressRolesOff;
}
function highlights(a0) { // fn#52191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2064, offset: 0x013221b5, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.HighlightsOn : binding.HighlightsOff;
}
function mobilePush(a0) { // fn#52192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2111, offset: 0x013221d2, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.MobilePushOn : binding.MobilePushOff;
}
function optedIn(a0) { // fn#52193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2155, offset: 0x013221ef, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.OptedIn : binding.OptedOut;
}
function favorited(a0) { // fn#52194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2191, offset: 0x0132220c, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.Favorited : binding.UnFavorited;
}
function muted(a0) { // fn#52195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2228, offset: 0x01322229, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.Muted : binding.Unmuted;
}
function mutedEvents(a0) { // fn#52196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2263, offset: 0x01322246, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.MutedScheduledEvents : binding.UnmutedScheduledEvents;
}
function unreads(a0) { // fn#52197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2324, offset: 0x01322263, size: 70 bytes, params: 2, frame: 3
const ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
return a0 === ALL_MESSAGES ? env0_13.UnreadsAll : a0 === UnreadSetting.ONLY_MENTIONS ? env0_13.UnreadsMentions : env0_13.UnreadsDefault;
}
function notifications(a0) { // fn#52198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2428, offset: 0x013222a9, size: 96 bytes, params: 2, frame: 3
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
return a0 === ALL_MESSAGES ? env0_13.NotificationsAll : a0 === UserNotificationSettings.ONLY_MENTIONS ? env0_13.NotificationsMentions : a0 === UserNotificationSettings.NO_MESSAGES ? env0_13.NotificationsNothing : env0_13.NotificationsDefault;
}
function trackGuildNotificationSettingsUpdate(a0, a1, a2, a3, a4) { // fn#52199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:3954, offset: 0x01322309, size: 451 bytes, params: 6, frame: 23
const closure = trackGuildNotificationSettingsUpdateCompute;
let value = closure(a2);
const value4 = closure(getCurrentGuildSettings(a0), a1);
value = differ(value, value4, 'RETURN_PREVIOUS_WHEN_CHANGED');
const value5 = value('guild_flags');
const value6 = 0;
const value7 = (value4.guild_flags ?? value6) ^ (value5 ?? value6);
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const removeFlags = flagUtilsModule.removeFlags;
const OPT_IN_CHANNELS_OFF = GuildNotificationSettingsFlags.OPT_IN_CHANNELS_OFF;
const OPT_IN_CHANNELS_ON = GuildNotificationSettingsFlags.OPT_IN_CHANNELS_ON;
const value8 = Reflect.apply(removeFlags, flagUtilsModule, [value7, OPT_IN_CHANNELS_OFF, OPT_IN_CHANNELS_ON]);
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const NOTIFICATION_SETTINGS_UPDATED = AnalyticEvents.NOTIFICATION_SETTINGS_UPDATED;
const object2 = {};
copyDataProperties(object2, value4, undefined);
const getStats = LastMentionTimestampStore.getStats;
copyDataProperties(object2, Reflect.apply(getStats, LastMentionTimestampStore, [a0]), undefined);
object2['location'] = a4;
object2['guild_id'] = a0;
const GUILD = NotificationSettingsUpdateType.GUILD;
object2['update_type'] = GUILD;
object2['label'] = a3;
object2['guild_flags_old'] = value('guild_flags');
object2['guild_is_muted_old'] = value('guild_is_muted');
object2['guild_suppress_roles_old'] = value('guild_suppress_roles');
object2['guild_notify_highlights_old'] = value('guild_notify_highlights');
object2['guild_suppress_everyone_old'] = value('guild_suppress_everyone');
object2['guild_receive_mobile_push_old'] = value('guild_receive_mobile_push');
object2['guild_scheduled_events_muted_old'] = value('guild_scheduled_events_muted');
value = value('guild_message_notification_settings');
object2['guild_message_notification_settings_old'] = value;
object2['is_opt_in_only_change'] = value6 === value8;
Reflect.apply(trackWithMetadata, defaultImport, [NOTIFICATION_SETTINGS_UPDATED, object2]);
}
function trackChannelNotificationSettingsUpdate({updateType = NotificationSettingsUpdateType.CHANNEL, guildId, channelId, applicationId, change, previous, label, location}) { // fn#52201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:5783, offset: 0x013225f3, size: 548 bytes, params: 2, frame: 30
const closure = trackChannelNotificationSettingsUpdateCompute;
const value3 = closure(previous);
const value5 = closure(getCurrentChannelSettings(guildId, channelId), change);
const value6 = differ(value3, value5, 'RETURN_PREVIOUS_WHEN_CHANGED');
const channel = ChannelStore.getChannel(channelId);
const value11 = (value5.channel_flags ?? 0) ^ (value6('channel_flags') ?? 0);
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
const removeFlags = flagUtilsModule.removeFlags;
const FAVORITED = ChannelNotificationSettingsFlags.FAVORITED;
const OPT_IN_ENABLED = ChannelNotificationSettingsFlags.OPT_IN_ENABLED;
const value12 = Reflect.apply(removeFlags, flagUtilsModule, [value11, FAVORITED, OPT_IN_ENABLED]);
const r7 = MessageStore.getLastMessage(channelId)?.type ?? null;
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const trackWithMetadata = defaultImport.trackWithMetadata;
const NOTIFICATION_SETTINGS_UPDATED = AnalyticEvents.NOTIFICATION_SETTINGS_UPDATED;
const object2 = {};
copyDataProperties(object2, value5, undefined);
const getStats = LastMentionTimestampStore.getStats;
copyDataProperties(object2, Reflect.apply(getStats, LastMentionTimestampStore, [guildId]), undefined);
object2['location'] = location;
object2['guild_id'] = guildId;
object2['channel_id'] = channelId;
object2['update_type'] = updateType;
object2['label'] = label;
object2['parent_id'] = channel != null ? channel.parent_id : null;
object2['channel_flags_old'] = value6('channel_flags');
object2['channel_is_muted_old'] = value6('channel_is_muted');
object2['channel_muted_until_old'] = value6('channel_muted_until');
object2['channel_is_overridden_old'] = value6('channel_is_overridden');
object2['channel_message_notification_settings_old'] = value6('channel_message_notification_settings');
object2['is_opt_in_only_change'] = value12 === 0;
object2['last_message_type'] = r7;
object2['application_id'] = applicationId;
Reflect.apply(trackWithMetadata, defaultImport, [NOTIFICATION_SETTINGS_UPDATED, object2]);
}
function getManyCurrentGuildSettings(a0) { // fn#52203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:7289, offset: 0x013228db, size: 54 bytes, params: 2, frame: 12
const Map = global.Map;
const map = new Map();
a0.forEach(_fun52204);
return map;
}
function getManyCurrentChannelSettings(a0, a1) { // fn#52205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:7491, offset: 0x01322936, size: 61 bytes, params: 3, frame: 12
const env0_0 = a0;
const Map = global.Map;
const map = new Map();
a1.forEach(_fun52206);
return map;
}
function _fun52184(a0) { // fn#52184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2719, offset: 0x01321f20, size: 56 bytes, params: 2, frame: 5
if (env0_2 === 'RETURN_PREVIOUS_WHEN_CHANGED') {
return env0_0[a0] === require[a0] ? undefined : env0_0[a0];
function forumThreadsCreated(a0) { // fn#52188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:1878, offset: 0x0132215e, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.ForumThreadsCreatedOn : binding.ForumThreadsCreatedOff;
}
}
function trackGuildNotificationSettingsUpdateCompute(a0) { // fn#52200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:4019, owner: trackGuildNotificationSettingsUpdate.compute, offset: 0x013224cc, size: 295 bytes, params: 2, frame: 15
var r5;
var end_time;
var Date;
var date;
const value = a1;
const r1 = value !== undefined ? value : {};
if (r1.mute_config == null) {
r5 = a0.guild_muted_until;
} else {
end_time = r1.mute_config.end_time;
if (end_time != null) {
Date = global.Date;
end_time = r1.mute_config.end_time;
date = new Date();
date = date.getTime();
r5 = date;
} else {
r5 = a0.guild_muted_until;
function suppressEveryone(a0) { // fn#52189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:1949, offset: 0x0132217b, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.SuppressEveryoneOn : binding.SuppressEveryoneOff;
}
function suppressRoles(a0) { // fn#52190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2011, offset: 0x01322198, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.SuppressRolesOn : binding.SuppressRolesOff;
}
function highlights(a0) { // fn#52191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2064, offset: 0x013221b5, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.HighlightsOn : binding.HighlightsOff;
}
function mobilePush(a0) { // fn#52192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2111, offset: 0x013221d2, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.MobilePushOn : binding.MobilePushOff;
}
function optedIn(a0) { // fn#52193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2155, offset: 0x013221ef, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.OptedIn : binding.OptedOut;
}
function favorited(a0) { // fn#52194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2191, offset: 0x0132220c, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.Favorited : binding.UnFavorited;
}
function muted(a0) { // fn#52195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2228, offset: 0x01322229, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.Muted : binding.Unmuted;
}
function mutedEvents(a0) { // fn#52196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2263, offset: 0x01322246, size: 29 bytes, params: 2, frame: 3
const binding = env0_13;
return a0 ? binding.MutedScheduledEvents : binding.UnmutedScheduledEvents;
}
function unreads(a0) { // fn#52197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2324, offset: 0x01322263, size: 70 bytes, params: 2, frame: 3
const ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
return a0 === ALL_MESSAGES ? env0_13.UnreadsAll : a0 === UnreadSetting.ONLY_MENTIONS ? env0_13.UnreadsMentions : env0_13.UnreadsDefault;
}
function notifications(a0) { // fn#52198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:2428, offset: 0x013222a9, size: 96 bytes, params: 2, frame: 3
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
return a0 === ALL_MESSAGES ? env0_13.NotificationsAll : a0 === UserNotificationSettings.ONLY_MENTIONS ? env0_13.NotificationsMentions : a0 === UserNotificationSettings.NO_MESSAGES ? env0_13.NotificationsNothing : env0_13.NotificationsDefault;
}
function trackGuildNotificationSettingsUpdate(a0, a1, a2, a3, a4) { // fn#52199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:3954, offset: 0x01322309, size: 451 bytes, params: 6, frame: 23
const trackGuildNotificationSettingsUpdateCompute2 = trackGuildNotificationSettingsUpdateCompute;
let value = trackGuildNotificationSettingsUpdateCompute2(a2);
const value4 = trackGuildNotificationSettingsUpdateCompute2(getCurrentGuildSettings(a0), a1);
value = differ(value, value4, 'RETURN_PREVIOUS_WHEN_CHANGED');
const value5 = value('guild_flags');
const value6 = 0;
const value7 = (value4.guild_flags ?? value6) ^ (value5 ?? value6);
const removeFlags = FlagUtilsModule.removeFlags;
const OPT_IN_CHANNELS_OFF = GuildNotificationSettingsFlags.OPT_IN_CHANNELS_OFF;
const OPT_IN_CHANNELS_ON = GuildNotificationSettingsFlags.OPT_IN_CHANNELS_ON;
const value8 = Reflect.apply(removeFlags, FlagUtilsModule, [value7, OPT_IN_CHANNELS_OFF, OPT_IN_CHANNELS_ON]);
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const NOTIFICATION_SETTINGS_UPDATED = AnalyticEvents.NOTIFICATION_SETTINGS_UPDATED;
const object = {};
copyDataProperties(object, value4, undefined);
const lastMentionTimestampStoreBinding = LastMentionTimestampStore;
const getStats = lastMentionTimestampStoreBinding.getStats;
copyDataProperties(object, Reflect.apply(getStats, lastMentionTimestampStoreBinding, [a0]), undefined);
object['location'] = a4;
object['guild_id'] = a0;
const GUILD = NotificationSettingsUpdateType.GUILD;
object['update_type'] = GUILD;
object['label'] = a3;
object['guild_flags_old'] = value('guild_flags');
object['guild_is_muted_old'] = value('guild_is_muted');
object['guild_suppress_roles_old'] = value('guild_suppress_roles');
object['guild_notify_highlights_old'] = value('guild_notify_highlights');
object['guild_suppress_everyone_old'] = value('guild_suppress_everyone');
object['guild_receive_mobile_push_old'] = value('guild_receive_mobile_push');
object['guild_scheduled_events_muted_old'] = value('guild_scheduled_events_muted');
value = value('guild_message_notification_settings');
object['guild_message_notification_settings_old'] = value;
object['is_opt_in_only_change'] = value6 === value8;
Reflect.apply(trackWithMetadata, defaultImport, [NOTIFICATION_SETTINGS_UPDATED, object]);
function trackGuildNotificationSettingsUpdateCompute(a0) { // fn#52200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:4019, owner: trackGuildNotificationSettingsUpdate.compute, offset: 0x013224cc, size: 295 bytes, params: 2, frame: 15
var r5;
var end_time;
var Date;
var date;
const value = a1;
const r1 = value !== undefined ? value : {};
if (r1.mute_config == null) {
r5 = a0.guild_muted_until;
} else {
end_time = r1.mute_config.end_time;
if (end_time != null) {
Date = global.Date;
end_time = r1.mute_config.end_time;
date = new Date();
date = date.getTime();
r5 = date;
} else {
r5 = a0.guild_muted_until;
}
}
return {guild_muted_until: r5, guild_flags: r1.flags ?? a0.guild_flags,
guild_is_muted: r1.muted ?? a0.guild_is_muted,
guild_message_notification_settings: r1.message_notifications != null ? env1_14[r1.message_notifications] : a0.guild_message_notification_settings,
guild_suppress_roles: r1.suppress_roles ?? a0.guild_suppress_roles,
guild_receive_mobile_push: r1.mobile_push ?? a0.guild_receive_mobile_push,
guild_notify_highlights: r1.notify_highlights ?? a0.guild_notify_highlights,
guild_suppress_everyone: r1.suppress_everyone ?? a0.guild_suppress_everyone,
guild_scheduled_events_muted: r1.mute_scheduled_events ?? a0.guild_scheduled_events_muted};
}
}
return {guild_muted_until: r5, guild_flags: r1.flags ?? a0.guild_flags,
guild_is_muted: r1.muted ?? a0.guild_is_muted,
guild_message_notification_settings: r1.message_notifications != null ? env1_14[r1.message_notifications] : a0.guild_message_notification_settings,
guild_suppress_roles: r1.suppress_roles ?? a0.guild_suppress_roles,
guild_receive_mobile_push: r1.mobile_push ?? a0.guild_receive_mobile_push,
guild_notify_highlights: r1.notify_highlights ?? a0.guild_notify_highlights,
guild_suppress_everyone: r1.suppress_everyone ?? a0.guild_suppress_everyone,
guild_scheduled_events_muted: r1.mute_scheduled_events ?? a0.guild_scheduled_events_muted};
}
function trackChannelNotificationSettingsUpdateCompute(a0) { // fn#52202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:5946, owner: trackChannelNotificationSettingsUpdate.compute, offset: 0x01322817, size: 196 bytes, params: 2, frame: 17
let value = a1;
const value2 = undefined;
const r1 = value !== value2 ? value : {};
const muted = r1.muted;
value = null;
const r8 = value != muted ? muted : value == a0 ? value2 : a0.channel_is_muted;
const r2 = value != r1.message_notifications ? env1_14[r1.message_notifications] : value == a0 ? value2 : a0.channel_message_notification_settings;
const object2 = {channel_is_muted: r8};
object2.channel_is_overridden = value == guildId ? value : r8 === true || value != r2;
const flags = r1.flags;
object2.channel_flags = value != flags ? flags : value == a0 ? value2 : a0.channel_flags;
object2.channel_message_notification_settings = r2;
value = environment.__proto__;
object2.channel_muted_until = muteConfigToTimestamp(r1.mute_config);
return object2;
}
function trackChannelNotificationSettingsUpdate({updateType = NotificationSettingsUpdateType.CHANNEL, guildId, channelId, applicationId, change, previous, label, location}) { // fn#52201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:5783, offset: 0x013225f3, size: 548 bytes, params: 2, frame: 30
const trackChannelNotificationSettingsUpdateCompute2 = trackChannelNotificationSettingsUpdateCompute;
const value3 = trackChannelNotificationSettingsUpdateCompute2(previous);
const value5 = trackChannelNotificationSettingsUpdateCompute2(getCurrentChannelSettings(guildId, channelId), change);
const value6 = differ(value3, value5, 'RETURN_PREVIOUS_WHEN_CHANGED');
const channel = ChannelStore.getChannel(channelId);
const value11 = (value5.channel_flags ?? 0) ^ (value6('channel_flags') ?? 0);
const removeFlags = FlagUtilsModule.removeFlags;
const FAVORITED = ChannelNotificationSettingsFlags.FAVORITED;
const OPT_IN_ENABLED = ChannelNotificationSettingsFlags.OPT_IN_ENABLED;
const value12 = Reflect.apply(removeFlags, FlagUtilsModule, [value11, FAVORITED, OPT_IN_ENABLED]);
const r7 = MessageStore.getLastMessage(channelId)?.type ?? null;
const defaultImport = AppAnalyticsUtils;
const trackWithMetadata = defaultImport.trackWithMetadata;
const NOTIFICATION_SETTINGS_UPDATED = AnalyticEvents.NOTIFICATION_SETTINGS_UPDATED;
const object = {};
copyDataProperties(object, value5, undefined);
const lastMentionTimestampStoreBinding = LastMentionTimestampStore;
const getStats = lastMentionTimestampStoreBinding.getStats;
copyDataProperties(object, Reflect.apply(getStats, lastMentionTimestampStoreBinding, [guildId]), undefined);
object['location'] = location;
object['guild_id'] = guildId;
object['channel_id'] = channelId;
object['update_type'] = updateType;
object['label'] = label;
object['parent_id'] = channel != null ? channel.parent_id : null;
object['channel_flags_old'] = value6('channel_flags');
object['channel_is_muted_old'] = value6('channel_is_muted');
object['channel_muted_until_old'] = value6('channel_muted_until');
object['channel_is_overridden_old'] = value6('channel_is_overridden');
object['channel_message_notification_settings_old'] = value6('channel_message_notification_settings');
object['is_opt_in_only_change'] = value12 === 0;
object['last_message_type'] = r7;
object['application_id'] = applicationId;
Reflect.apply(trackWithMetadata, defaultImport, [NOTIFICATION_SETTINGS_UPDATED, object]);
function trackChannelNotificationSettingsUpdateCompute(a0) { // fn#52202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:5946, owner: trackChannelNotificationSettingsUpdate.compute, offset: 0x01322817, size: 196 bytes, params: 2, frame: 17
let value = a1;
const value2 = undefined;
const r1 = value !== value2 ? value : {};
const muted = r1.muted;
value = null;
const r8 = value != muted ? muted : value == a0 ? value2 : a0.channel_is_muted;
const r2 = value != r1.message_notifications ? env1_14[r1.message_notifications] : value == a0 ? value2 : a0.channel_message_notification_settings;
const object = {channel_is_muted: r8};
object.channel_is_overridden = value == guildId ? value : r8 === true || value != r2;
const flags = r1.flags;
object.channel_flags = value != flags ? flags : value == a0 ? value2 : a0.channel_flags;
object.channel_message_notification_settings = r2;
value = environment.__proto__;
object.channel_muted_until = muteConfigToTimestamp(r1.mute_config);
return object;
}
function _fun52204(a0) { // fn#52204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:7361, offset: 0x01322911, size: 37 bytes, params: 2, frame: 14
const binding = env0_0;
return binding.set(a0, getCurrentGuildSettings(a0));
}
}
function getManyCurrentGuildSettings(a0) { // fn#52203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:7289, offset: 0x013228db, size: 54 bytes, params: 2, frame: 12
const Map = global.Map;
const map = new Map();
a0.forEach(_fun52204);
return map;
function _fun52204(a0) { // fn#52204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:7361, offset: 0x01322911, size: 37 bytes, params: 2, frame: 14
const binding = env0_0;
return binding.set(a0, getCurrentGuildSettings(a0));
}
}
function getManyCurrentChannelSettings(a0, a1) { // fn#52205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:7491, offset: 0x01322936, size: 61 bytes, params: 3, frame: 12
const env0_0 = a0;
const Map = global.Map;
const map = new Map();
a1.forEach(_fun52206);
return map;
function _fun52206(a0) { // fn#52206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:7567, offset: 0x01322973, size: 42 bytes, params: 2, frame: 15
const binding = env0_1;
return binding.set(a0, getCurrentChannelSettings(env0_0, a0));
}
}
function _fun52206(a0) { // fn#52206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6788:7567, offset: 0x01322973, size: 42 bytes, params: 2, frame: 15
const binding = env0_1;
return binding.set(a0, getCurrentChannelSettings(env0_0, a0));
}
global.__d(_fun52182, 6610, [6611, 1379, 4814, 4864, 661, 3796, 4865, 670, 1391, 4863, 683,
2]) /* metro module 6610, dependencies: [6611, 1379, 4814, 4864, 661, 3796, 4865, 670, 1391, 4863, 683, 2] */;
+47 -43
View File
@@ -1,9 +1,12 @@
/* Metro module 1856; source: utils/NumberUtils.tsx; dependencies: [1244, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun20018(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1983:6, offset: 0x00ebc806, size: 127 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/NumberUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/NumberUtils.tsx');
exports.shortenAndLocalizeNumber = shortenAndLocalizeNumber;
exports.humanizeValue = humanizeValue;
exports.parseInteger = function(a0) {
@@ -26,51 +29,52 @@ function _fun20018(global, require, importDefault, importAll, module, exports, d
copyDataProperties(object, r0, Intl);
return Intl.NumberFormat(a0, object).format(a1);
};
}
function shortenAndLocalizeNumber(a0) { // fn#20019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1983:184, offset: 0x00ebc885, size: 167 bytes, params: 2, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (a0 < 1000000) {
return intl.formatToPlainString(t.OiHat3, {value: a0});
function shortenAndLocalizeNumber(a0) { // fn#20019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1983:184, offset: 0x00ebc885, size: 167 bytes, params: 2, frame: 17
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
if (a0 < 1000000) {
return intl.formatToPlainString(t.OiHat3, {value: a0});
}
let value = a0 / 1000000;
value = value.toFixed(1);
const formatToPlainString = intl.formatToPlainString;
const Iku48I = t.Iku48I;
return Reflect.apply(formatToPlainString, intl, [Iku48I, {value: value}]);
}
let value = a0 / 1000000;
value = value.toFixed(1);
const formatToPlainString = intl.formatToPlainString;
const Iku48I = t.Iku48I;
return Reflect.apply(formatToPlainString, intl, [Iku48I, {value: value}]);
}
function humanizeValue(a0, a1) { // fn#20020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1983:404, offset: 0x00ebc92c, size: 369 bytes, params: 3, frame: 18
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var property;
var OiHat3;
if (a0 < 1000) {
function humanizeValue(a0, a1) { // fn#20020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1983:404, offset: 0x00ebc92c, size: 369 bytes, params: 3, frame: 18
var object;
const intl = (IndexNativeModule).intl;
var formatToPlainString;
const t = (IndexNativeModule).t;
var property;
var OiHat3;
if (a0 < 1000) {
formatToPlainString = intl.formatToPlainString;
OiHat3 = t.OiHat3;
object = {};
object.value = global.Math.floor(a0);
return Reflect.apply(formatToPlainString, intl, [OiHat3, object]);
}
if (a0 < 1000000) {
formatToPlainString = intl.formatToPlainString;
property = t['84R4Tc'];
object = {};
object.value = global.Math.floor(a0 / 1000);
return Reflect.apply(formatToPlainString, intl, [property, object]);
}
const Math = global.Math;
let value = Math.floor(10 * a0 / 1000000) / 10;
const Intl = global.Intl;
const NumberFormat = Intl.NumberFormat;
const value2 = Object.create(NumberFormat.prototype, {constructor: {value: NumberFormat}});
const numberFormat = new NumberFormat(a1, {maximumFractionDigits: 1});
value = (numberFormat instanceof Object ? numberFormat : value2).format(value);
formatToPlainString = intl.formatToPlainString;
OiHat3 = t.OiHat3;
object2 = {};
object2.value = global.Math.floor(a0);
return Reflect.apply(formatToPlainString, intl, [OiHat3, object2]);
const Iku48I = t.Iku48I;
return Reflect.apply(formatToPlainString, intl, [Iku48I, {value: value}]);
}
if (a0 < 1000000) {
formatToPlainString = intl.formatToPlainString;
property = t['84R4Tc'];
object2 = {};
object2.value = global.Math.floor(a0 / 1000);
return Reflect.apply(formatToPlainString, intl, [property, object2]);
}
const Math = global.Math;
let value = Math.floor(10 * a0 / 1000000) / 10;
const Intl = global.Intl;
const NumberFormat = Intl.NumberFormat;
const value2 = Object.create(NumberFormat.prototype, {constructor: {value: NumberFormat}});
const numberFormat = new NumberFormat(a1, {maximumFractionDigits: 1});
value = (numberFormat instanceof Object ? numberFormat : value2).format(value);
formatToPlainString = intl.formatToPlainString;
const Iku48I = t.Iku48I;
return Reflect.apply(formatToPlainString, intl, [Iku48I, {value: value}]);
}
global.__d(_fun20018, 1856, [1244, 2]) /* metro module 1856, dependencies: [1244, 2] */;
+29 -22
View File
@@ -1,4 +1,6 @@
/* Metro module 4283; source: utils/PathUtils.tsx; dependencies: [477, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun36330(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4455:6, offset: 0x01089372, size: 124 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = function(a0, a1) {
@@ -10,7 +12,7 @@ function _fun36330(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/PathUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/PathUtils.tsx');
exports.pathJoin = function(a0) {
var r3;
var r2;
@@ -21,27 +23,32 @@ function _fun36330(global, require, importDefault, importAll, module, exports, d
};
exports.pathBasename = closure;
exports.pathFilenameWithoutExt = pathFilenameWithoutExt;
}
function pathJoin(a0) { // fn#36332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4455:301, offset: 0x01089462, size: 80 bytes, params: 2, frame: 12
let value = copyRestArgs(0, undefined);
const r2 = (require(477) /* metro dependency 477: PlatformUtils */).isWindows() ? '\\' : '/';
value = value.filter(function(a0) {
return a0.length > 0;
});
return value.join(r2);
}
function pathFilenameWithoutExt(a0) { // fn#36334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4455:455, offset: 0x010894b2, size: 54 bytes, params: 2, frame: 14
var r0;
var value;
const value2 = pathBasename(a0).lastIndexOf('.');
if (value2 <= 0) {
r0 = value;
} else {
value = value.slice(0, value2);
r0 = value;
function pathJoin(a0) { // fn#36332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4455:301, offset: 0x01089462, size: 80 bytes, params: 2, frame: 12
let value = copyRestArgs(0, undefined);
const r2 = (require(477) /* metro dependency 477: PlatformUtils */).isWindows() ? '\\' : '/';
value = value.filter(function(a0) {
return a0.length > 0;
});
return value.join(r2);
}
return r0;
function pathFilenameWithoutExt(a0) { // fn#36334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4455:455, offset: 0x010894b2, size: 54 bytes, params: 2, frame: 14
var r0;
var value;
const value2 = pathBasename(a0).lastIndexOf('.');
if (value2 <= 0) {
r0 = value;
} else {
value = value.slice(0, value2);
r0 = value;
}
return r0;
}
}
function _fun36333({length}) { // fn#36333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4455:377, offset: 0x00d88c66, size: 16 bytes, params: 2, frame: 2
return length > 0;
}
global.__d(_fun36330, 4283, [477, 2]) /* metro module 4283, dependencies: [477, 2] */;
+4 -1
View File
@@ -1,9 +1,12 @@
/* Metro module 4615; source: utils/PerceptualVolumeUtils.tsx; dependencies: [2, 4616] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun39636(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4793:6, offset: 0x010e71a9, size: 117 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/PerceptualVolumeUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/PerceptualVolumeUtils.tsx');
exports.perceptualToAmplitude = (require(4616) /* metro dependency 4616: PerceptualVolumeUtils */).perceptualToAmplitude;
exports.amplitudeToPerceptual = (require(4616) /* metro dependency 4616: PerceptualVolumeUtils */).amplitudeToPerceptual;
}
global.__d(_fun39636, 4615, [2, 4616]) /* metro module 4615, dependencies: [2, 4616] */;
+452 -424
View File
@@ -1,6 +1,21 @@
/* Metro module 15192; source: utils/PermissionSpecUtils.tsx; dependencies: [1383, 1867, 661, 8120, 15193, 6841, 6636, 15194, 1244, 1948, 6860, 4809, 15195, 6859, 15196, 9112, 7155, 2] */
import GuildStore from '../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import HelpdeskUtils from './HelpdeskUtils.tsx'; /* Metro dependency 1948 */
import GuildSettingsActionCreators from '../modules/guild_settings/GuildSettingsActionCreators.tsx'; /* Metro dependency 9112 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ChannelRecordModule from '../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as StageMediaHooksModule from '../modules/stage_channels/StageMediaHooks.tsx'; /* Metro dependency 4809 */
import * as SoundmojiRenderingExperimentModule from '../modules/premium/sounds/soundmoji/SoundmojiRenderingExperiment.tsx'; /* Metro dependency 6636 */
import * as ThreadHooksModule from '../modules/threads/ThreadHooks.tsx'; /* Metro dependency 6860 */
import * as ChannelPermissionsConstantsModule from '../modules/channel_permissions/ChannelPermissionsConstants.tsx'; /* Metro dependency 8120 */
import * as UseGuildEligibleForStageChannelsModule from '../modules/stage_channels/useGuildEligibleForStageChannels.tsx'; /* Metro dependency 15193 */
import * as HangoutWindowExperimentModule from '../modules/hangout_window/HangoutWindowExperiment.tsx'; /* Metro dependency 15194 */
import * as PermissionUtilsModule from '../modules/guild_automod/PermissionUtils.tsx'; /* Metro dependency 15195 */
import * as PermissionUtilsModule2 from '../modules/permissions/PermissionUtils.tsx'; /* Metro dependency 15196 */
function _fun116173(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:6, offset: 0x0247de90, size: 295 bytes, params: 8, frame: 19
var object2;
let env0_0 = require;
const conditionalPermissionSpec = function(a0, a1) {
return a0 ? [a1()] : [];
@@ -19,440 +34,453 @@ function _fun116173(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = (require(1383) /* metro dependency 1383: ChannelRecord */).VOICE_THREAD_PARENT_CHANNEL_TYPES;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.HelpdeskArticles;
const env0_7 = constantsModule.ChannelTypes;
const env0_8 = constantsModule.GuildFeatures;
const env0_9 = constantsModule.Permissions;
const env0_10 = constantsModule.GuildSettingsSections;
const env0_11 = (require(8120) /* metro dependency 8120: ChannelPermissionsConstants */).getChannelPermissionSpecMap;
object2 = {generateChannelPermissionSpec: generateChannelPermissionSpec,
object = {generateChannelPermissionSpec: generateChannelPermissionSpec,
generateGuildPermissionSpec: generateGuildPermissionSpec, getGuildPermissionSpecMap: function(a0) {
return importAll(dependencyMap[14]).getGuildPermissionSpec(getPermissionOptions(a0.id));
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/PermissionSpecUtils.tsx');
exports.default = object2;
}
(FileImportTrackerModule).fileFinishedImporting('utils/PermissionSpecUtils.tsx');
exports.default = object;
function getPermissionOptions(a0) { // fn#116174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:296, offset: 0x0247dfb7, size: 414 bytes, params: 2, frame: 26
const isGuildEligibleForStageChannels2 = (UseGuildEligibleForStageChannelsModule).isGuildEligibleForStageChannels(a0);
const guild = GuildStore.getGuild(a0);
const r3 = guild != null && (require(6841) /* metro dependency 6841: useIsCreatorMonetizationEnabledGuild */).isCreatorMonetizationEnabledGuild(guild);
const soundmojiRenderingExperiment = (SoundmojiRenderingExperimentModule).getSoundmojiRenderingExperiment({location: 'getPermissionOptions'});
const getHangoutWindowExperiment = HangoutWindowExperimentModule.getHangoutWindowExperiment;
const enableHangoutWindow = Reflect.apply(getHangoutWindowExperiment, HangoutWindowExperimentModule, [{guildId: a0,
location: 'getPermissionOptions'}]).enableHangoutWindow;
object = {};
const intl = (IndexNativeModule).intl;
let format = intl.format;
const t = (IndexNativeModule).t;
const ZuzwPz = t.ZuzwPz;
const intl2 = (IndexNativeModule).intl;
const string = intl2.string;
const DkSwJ2 = t.DkSwJ2;
object.PRIORITY_SPEAKER_DESCRIPTION = Reflect.apply(format, intl, [ZuzwPz, {keybind: Reflect.apply(string, intl2,
[DkSwJ2])}]);
format = intl.format;
const fVE8y8 = t.fVE8y8;
const defaultImport = HelpdeskUtils;
const getArticleURL = defaultImport.getArticleURL;
const SOUNDBOARD = HelpdeskArticles.SOUNDBOARD;
object.SOUNDBOARD_DESCRIPTION = Reflect.apply(format, intl, [fVE8y8,
{helpCenterArticle: Reflect.apply(getArticleURL, defaultImport, [SOUNDBOARD])}]);
object.showStageChannelPermissions = isGuildEligibleForStageChannels2;
object.showExperimental = true;
object.showMembershipManualApprovalPermissions = true;
object.showCreatorMonetizationAnalyticsPermission = r3;
object.inSoundmojiExperiment = soundmojiRenderingExperiment;
object.enableHangoutWindow = enableHangoutWindow;
return object;
}
function getPermissionOptions(a0) { // fn#116174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:296, offset: 0x0247dfb7, size: 414 bytes, params: 2, frame: 26
var object2;
const isGuildEligibleForStageChannels2 = (require(15193) /* metro dependency 15193: useGuildEligibleForStageChannels */).isGuildEligibleForStageChannels(a0);
const guild = GuildStore.getGuild(a0);
const r3 = guild != null && (require(6841) /* metro dependency 6841: useIsCreatorMonetizationEnabledGuild */).isCreatorMonetizationEnabledGuild(guild);
const soundmojiRenderingExperiment = (require(6636) /* metro dependency 6636: SoundmojiRenderingExperiment */).getSoundmojiRenderingExperiment({location: 'getPermissionOptions'});
const hangoutWindowExperimentModule = require(15194) /* metro dependency 15194: HangoutWindowExperiment */;
const getHangoutWindowExperiment = hangoutWindowExperimentModule.getHangoutWindowExperiment;
const enableHangoutWindow = Reflect.apply(getHangoutWindowExperiment, hangoutWindowExperimentModule, [{guildId: a0,
location: 'getPermissionOptions'}]).enableHangoutWindow;
object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let format = intl.format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const ZuzwPz = t.ZuzwPz;
const intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl2.string;
const DkSwJ2 = t.DkSwJ2;
object2.PRIORITY_SPEAKER_DESCRIPTION = Reflect.apply(format, intl, [ZuzwPz, {keybind: Reflect.apply(string, intl2,
[DkSwJ2])}]);
format = intl.format;
const fVE8y8 = t.fVE8y8;
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = defaultImport.getArticleURL;
const SOUNDBOARD = HelpdeskArticles.SOUNDBOARD;
object2.SOUNDBOARD_DESCRIPTION = Reflect.apply(format, intl, [fVE8y8,
{helpCenterArticle: Reflect.apply(getArticleURL, defaultImport, [SOUNDBOARD])}]);
object2.showStageChannelPermissions = isGuildEligibleForStageChannels2;
object2.showExperimental = true;
object2.showMembershipManualApprovalPermissions = true;
object2.showCreatorMonetizationAnalyticsPermission = r3;
object2.inSoundmojiExperiment = soundmojiRenderingExperiment;
object2.enableHangoutWindow = enableHangoutWindow;
return object2;
}
function filterPermissions(a0, a1) { // fn#116176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:1111, offset: 0x0247e177, size: 45 bytes, params: 3, frame: 13
var r0;
let value = a0;
const env0_0 = a1;
if (a1.size === 0) {
r0 = value;
} else {
value = value.map(function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
object['permissions'] = a0.permissions.filter(_fun116178);
function filterPermissions(a0, a1) { // fn#116176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:1111, offset: 0x0247e177, size: 45 bytes, params: 3, frame: 13
var r0;
let value = a0;
const env0_0 = a1;
if (a1.size === 0) {
r0 = value;
} else {
value = value.map(function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
object['permissions'] = a0.permissions.filter(_fun116178);
return object;
});
r0 = value;
}
return r0;
function _fun116177(a0) { // fn#116177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:1170, offset: 0x0247e1a4, size: 51 bytes, params: 2, frame: 13
const object = {};
copyDataProperties(object, a0, undefined);
object['permissions'] = a0.permissions.filter(function(a0) {
return !require.has(a0.flag.toString());
});
return object;
});
r0 = value;
}
return r0;
}
function _fun116178({flag}) { // fn#116178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:1214, offset: 0x0247e1d7, size: 40 bytes, params: 2, frame: 12
return !require.has(flag.toString());
}
function generateChannelPermissionSpec(a0, a1, a2, a3) { // fn#116179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:1286, offset: 0x0247e1ff, size: 3036 bytes, params: 5, frame: 34
var r23;
var r13;
var r22;
var r14;
var defaultImport;
var add;
var MANAGE_OFFICIAL_MESSAGES;
var moduleValue3;
var generateChannelGeneralSection;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var moduleValue4;
var generateChannelMembershipSection;
var moduleValue5;
var generateChannelTextSection;
var moduleValue6;
var generateChannelAppsSection;
var moduleValue7;
var moduleValue8;
var moduleValue9;
var format;
var closure;
var moduleValue10;
var moduleValue11;
var value18;
var moduleValue12;
var moduleValue13;
var generateChannelStageVoiceSection;
var moduleValue14;
var generateChannelStageSection;
var moduleValue15;
var generateChannelEventsSection;
var moduleValue16;
var moduleValue17;
var moduleValue18;
var value23;
var moduleValue19;
var moduleValue20;
var generateChannelVoiceSection;
var moduleValue21;
var moduleValue22;
var moduleValue23;
var moduleValue24;
var moduleValue25;
var moduleValue26;
var moduleValue27;
var moduleValue28;
var value30;
var moduleValue29;
const env0_0 = a0;
const getPermissionOptionsBinding = getPermissionOptions;
const value2 = undefined;
const permissionOptionsBinding = getPermissionOptionsBinding(a0);
const getChannelPermissionSpecMapBinding = getChannelPermissionSpecMap;
let object = {};
copyDataProperties(object, a3, undefined);
object['enableHangoutWindow'] = permissionOptionsBinding.enableHangoutWindow;
const channelPermissionSpecMapBinding = getChannelPermissionSpecMapBinding(a1, a2, object);
const VoiceInThreadsExperiment = (require(6860) /* metro dependency 6860: ThreadHooks */).VoiceInThreadsExperiment;
const getCurrentConfig = VoiceInThreadsExperiment.getCurrentConfig;
const r8 = Reflect.apply(getCurrentConfig, VoiceInThreadsExperiment, [{guildId: a0,
location: '3ad37d_1'}]).enabled && VOICE_THREAD_PARENT_CHANNEL_TYPES.has(a1.type);
const isStageVideoEnabled2 = (require(4809) /* metro dependency 4809: StageMediaHooks */).isStageVideoEnabled(a0);
const canCurrentUserManageMessageFilters2 = (require(15195) /* metro dependency 15195: PermissionUtils */).canCurrentUserManageMessageFilters(a0);
const isMediaChannel2 = a1.isMediaChannel();
const Set = global.Set;
const set = new Set();
const guild = GuildStore.getGuild(a0);
let r1 = guild == null ? value2 : guild.features.has(GuildFeatures.VERIFIED);
if (r1) {
defaultImport = importDefault(6859) /* metro dependency 6859: GuildOfficialMessagesExperiment */;
r1 = defaultImport.getCurrentConfig({guildId: a0, location: 'generateChannelPermissionSpec'}).enabled;
}
if (!r1) {
add = set.add;
MANAGE_OFFICIAL_MESSAGES = Permissions.MANAGE_OFFICIAL_MESSAGES;
Reflect.apply(add, set, [MANAGE_OFFICIAL_MESSAGES.toString()]);
}
const inSoundmojiExperiment = permissionOptionsBinding.inSoundmojiExperiment;
const type = a1.type;
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
if (GUILD_CATEGORY === type) {
moduleValue24 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelGeneralSection = moduleValue24.generateChannelGeneralSection;
string = intl.string;
object = [Reflect.apply(generateChannelGeneralSection, moduleValue24, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['AkPxc+']])])];
moduleValue25 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelMembershipSection = moduleValue25.generateChannelMembershipSection;
string = intl.string;
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue25, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.Ny49TN])]);
moduleValue26 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
object[2] = moduleValue26.generateChannelTextSection(channelPermissionSpecMapBinding, intl.string(t.cKobO5),
{'showPrivateThreads': true, 'showCreateThreads': true, inSoundmojiExperiment: inSoundmojiExperiment});
moduleValue27 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelVoiceSection = moduleValue27.generateChannelVoiceSection;
string = intl.string;
object[3] = Reflect.apply(generateChannelVoiceSection, moduleValue27, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['46Ra1b']])]);
moduleValue28 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelAppsSection = moduleValue28.generateChannelAppsSection;
string = intl.string;
object[4] = Reflect.apply(generateChannelAppsSection, moduleValue28, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['rrh/W6']])]);
value30 = arraySpread(object, conditionalPermissionSpec(permissionOptionsBinding.showStageChannelPermissions,
_fun116180), 5, r23);
moduleValue29 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelEventsSection = moduleValue29.generateChannelEventsSection;
string = intl.string;
object[value30] = Reflect.apply(generateChannelEventsSection, moduleValue29, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.b8lplT])]);
value30 + 1;
r1 = object;
} else if (ChannelTypes.GUILD_VOICE === type) {
moduleValue18 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelGeneralSection = moduleValue18.generateChannelGeneralSection;
value23 = intl.string(t.ouHggI);
object = {showManageWebhooks: true};
object = [Reflect.apply(generateChannelGeneralSection, moduleValue18, [channelPermissionSpecMapBinding, value23,
object])];
moduleValue19 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelMembershipSection = moduleValue19.generateChannelMembershipSection;
string = intl.string;
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue19, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.Ny49TN])]);
moduleValue20 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelVoiceSection = moduleValue20.generateChannelVoiceSection;
string = intl.string;
object[2] = Reflect.apply(generateChannelVoiceSection, moduleValue20, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['46Ra1b']])]);
moduleValue21 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
object[3] = moduleValue21.generateChannelVoiceChatSection(channelPermissionSpecMapBinding,
intl.string(t.iqlsnD),
{sectionDescription: canCurrentUserManageMessageFilters2 ? intl.format(t['4Z9Fbb'],
{setUpAutomod: setUpAutomod_116181}) : value2, inSoundmojiExperiment: inSoundmojiExperiment});
moduleValue22 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelEventsSection = moduleValue22.generateChannelEventsSection;
string = intl.string;
object[4] = Reflect.apply(generateChannelEventsSection, moduleValue22, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.b8lplT])]);
moduleValue23 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelAppsSection = moduleValue23.generateChannelAppsSection;
string = intl.string;
object[5] = Reflect.apply(generateChannelAppsSection, moduleValue23, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['rrh/W6']])]);
r1 = object;
} else if (ChannelTypes.GUILD_STAGE_VOICE === type) {
moduleValue11 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelGeneralSection = moduleValue11.generateChannelGeneralSection;
value18 = intl.string(t.ouHggI);
object = {showManageWebhooks: false};
object = [Reflect.apply(generateChannelGeneralSection, moduleValue11, [channelPermissionSpecMapBinding, value18,
object])];
moduleValue12 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelMembershipSection = moduleValue12.generateChannelMembershipSection;
string = intl.string;
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue12, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.Ny49TN])]);
moduleValue13 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelStageVoiceSection = moduleValue13.generateChannelStageVoiceSection;
string = intl.string;
object[2] = Reflect.apply(generateChannelStageVoiceSection, moduleValue13, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['46Ra1b']]), isStageVideoEnabled2]);
moduleValue14 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelStageSection = moduleValue14.generateChannelStageSection;
string = intl.string;
object[3] = Reflect.apply(generateChannelStageSection, moduleValue14, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.yniauk])]);
moduleValue15 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelEventsSection = moduleValue15.generateChannelEventsSection;
string = intl.string;
object[4] = Reflect.apply(generateChannelEventsSection, moduleValue15, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.b8lplT])]);
moduleValue16 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
object[5] = moduleValue16.generateChannelVoiceChatSection(channelPermissionSpecMapBinding,
intl.string(t.iqlsnD),
{sectionDescription: canCurrentUserManageMessageFilters2 ? intl.format(t['4Z9Fbb'],
{setUpAutomod: setUpAutomod_116182}) : value2, inSoundmojiExperiment: inSoundmojiExperiment});
moduleValue17 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
object[6] = moduleValue17.generateChannelAppsSection(channelPermissionSpecMapBinding, intl.string(t['rrh/W6']),
{showActivities: false});
r1 = object;
} else if (ChannelTypes.GUILD_FORUM === type) {
string = intl.string;
r13 = isMediaChannel2 ? Reflect.apply(string, intl, [t.aSjPgw]) : Reflect.apply(string, intl, [t.TS7Cnb]);
r22 = isMediaChannel2 ? t.YjJTtH : t['1MTnqY'];
moduleValue7 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelGeneralSection = moduleValue7.generateChannelGeneralSection;
string = intl.string;
object = [Reflect.apply(generateChannelGeneralSection, moduleValue7, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.ouHggI])])];
moduleValue8 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelMembershipSection = moduleValue8.generateChannelMembershipSection;
string = intl.string;
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue8, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.Ny49TN])]);
moduleValue9 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelTextSection = moduleValue9.generateChannelTextSection;
if (canCurrentUserManageMessageFilters2) {
format = intl.format;
closure = setUpAutomod;
r14 = Reflect.apply(format, intl, [r22, {setUpAutomod: closure}]);
r23 = closure;
} else {
r14 = value2;
r23 = require;
}
object[2] = Reflect.apply(generateChannelTextSection, moduleValue9, [channelPermissionSpecMapBinding, r13,
{'showPrivateThreads': false, 'showCreateThreads': false, sectionDescription: r14,
inSoundmojiExperiment: inSoundmojiExperiment}]);
moduleValue10 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelAppsSection = moduleValue10.generateChannelAppsSection;
string = intl.string;
object[3] = Reflect.apply(generateChannelAppsSection, moduleValue10, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['rrh/W6']])]);
arraySpread(object, conditionalPermissionSpec(r8, _fun116184), 4, r23);
r1 = object;
} else if (ChannelTypes.GUILD_MEDIA === type) {
string = intl.string;
r13 = isMediaChannel2 ? Reflect.apply(string, intl, [t.aSjPgw]) : Reflect.apply(string, intl, [t.TS7Cnb]);
r22 = isMediaChannel2 ? t.YjJTtH : t['1MTnqY'];
moduleValue7 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelGeneralSection = moduleValue7.generateChannelGeneralSection;
string = intl.string;
object = [Reflect.apply(generateChannelGeneralSection, moduleValue7, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.ouHggI])])];
moduleValue8 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelMembershipSection = moduleValue8.generateChannelMembershipSection;
string = intl.string;
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue8, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.Ny49TN])]);
moduleValue9 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelTextSection = moduleValue9.generateChannelTextSection;
if (canCurrentUserManageMessageFilters2) {
format = intl.format;
closure = setUpAutomod;
r14 = Reflect.apply(format, intl, [r22, {setUpAutomod: closure}]);
r23 = closure;
} else {
r14 = value2;
r23 = require;
}
function generateChannelPermissionSpec(a0, a1, a2, a3) { // fn#116179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:1286, offset: 0x0247e1ff, size: 3036 bytes, params: 5, frame: 34
var r23;
var r13;
var r22;
var r14;
var defaultImport;
var add;
var MANAGE_OFFICIAL_MESSAGES;
var moduleValue3;
var generateChannelGeneralSection;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var moduleValue4;
var generateChannelMembershipSection;
var moduleValue5;
var generateChannelTextSection;
var moduleValue6;
var generateChannelAppsSection;
var moduleValue7;
var moduleValue8;
var moduleValue9;
var format;
var setUpAutomod2;
var moduleValue10;
var moduleValue11;
var value18;
var moduleValue12;
var moduleValue13;
var generateChannelStageVoiceSection;
var moduleValue14;
var generateChannelStageSection;
var moduleValue15;
var generateChannelEventsSection;
var moduleValue16;
var moduleValue17;
var moduleValue18;
var value23;
var moduleValue19;
var moduleValue20;
var generateChannelVoiceSection;
var moduleValue21;
var moduleValue22;
var moduleValue23;
var moduleValue24;
var moduleValue25;
var moduleValue26;
var moduleValue27;
var moduleValue28;
var value30;
var moduleValue29;
const env0_0 = a0;
const getPermissionOptionsBinding = getPermissionOptions;
const value2 = undefined;
const permissionOptionsBinding = getPermissionOptionsBinding(a0);
const getChannelPermissionSpecMapBinding = getChannelPermissionSpecMap;
let object = {};
copyDataProperties(object, a3, undefined);
object['enableHangoutWindow'] = permissionOptionsBinding.enableHangoutWindow;
const channelPermissionSpecMapBinding = getChannelPermissionSpecMapBinding(a1, a2, object);
const VoiceInThreadsExperiment = (ThreadHooksModule).VoiceInThreadsExperiment;
const getCurrentConfig = VoiceInThreadsExperiment.getCurrentConfig;
const r8 = Reflect.apply(getCurrentConfig, VoiceInThreadsExperiment, [{guildId: a0,
location: '3ad37d_1'}]).enabled && VOICE_THREAD_PARENT_CHANNEL_TYPES.has(a1.type);
const isStageVideoEnabled2 = (StageMediaHooksModule).isStageVideoEnabled(a0);
const canCurrentUserManageMessageFilters2 = (PermissionUtilsModule).canCurrentUserManageMessageFilters(a0);
const isMediaChannel2 = a1.isMediaChannel();
const Set = global.Set;
const set = new Set();
const guild = GuildStore.getGuild(a0);
let r1 = guild == null ? value2 : guild.features.has(GuildFeatures.VERIFIED);
if (r1) {
defaultImport = importDefault(6859) /* metro dependency 6859: GuildOfficialMessagesExperiment */;
r1 = defaultImport.getCurrentConfig({guildId: a0, location: 'generateChannelPermissionSpec'}).enabled;
}
object[2] = Reflect.apply(generateChannelTextSection, moduleValue9, [channelPermissionSpecMapBinding, r13,
{'showPrivateThreads': false, 'showCreateThreads': false, sectionDescription: r14,
inSoundmojiExperiment: inSoundmojiExperiment}]);
moduleValue10 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelAppsSection = moduleValue10.generateChannelAppsSection;
string = intl.string;
object[3] = Reflect.apply(generateChannelAppsSection, moduleValue10, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['rrh/W6']])]);
arraySpread(object, conditionalPermissionSpec(r8, _fun116184), 4, r23);
r1 = object;
} else {
moduleValue3 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelGeneralSection = moduleValue3.generateChannelGeneralSection;
string = intl.string;
object = [Reflect.apply(generateChannelGeneralSection, moduleValue3, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.ouHggI])])];
moduleValue4 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelMembershipSection = moduleValue4.generateChannelMembershipSection;
string = intl.string;
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue4, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.Ny49TN])]);
moduleValue5 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
object[2] = moduleValue5.generateChannelTextSection(channelPermissionSpecMapBinding, intl.string(t.cKobO5),
{showPrivateThreads: a1.type !== ChannelTypes.GUILD_ANNOUNCEMENT, showCreateThreads: true,
inSoundmojiExperiment: inSoundmojiExperiment});
moduleValue6 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelAppsSection = moduleValue6.generateChannelAppsSection;
string = intl.string;
object[3] = Reflect.apply(generateChannelAppsSection, moduleValue6, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['rrh/W6']])]);
arraySpread(object, conditionalPermissionSpec(r8, _fun116185), 4, r23);
r1 = object;
if (!r1) {
add = set.add;
MANAGE_OFFICIAL_MESSAGES = Permissions.MANAGE_OFFICIAL_MESSAGES;
Reflect.apply(add, set, [MANAGE_OFFICIAL_MESSAGES.toString()]);
}
const inSoundmojiExperiment = permissionOptionsBinding.inSoundmojiExperiment;
const type = a1.type;
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
if (GUILD_CATEGORY === type) {
moduleValue24 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelGeneralSection = moduleValue24.generateChannelGeneralSection;
string = intl.string;
object = [Reflect.apply(generateChannelGeneralSection, moduleValue24, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['AkPxc+']])])];
moduleValue25 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelMembershipSection = moduleValue25.generateChannelMembershipSection;
string = intl.string;
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue25, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.Ny49TN])]);
moduleValue26 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
object[2] = moduleValue26.generateChannelTextSection(channelPermissionSpecMapBinding, intl.string(t.cKobO5),
{'showPrivateThreads': true, 'showCreateThreads': true, inSoundmojiExperiment: inSoundmojiExperiment});
moduleValue27 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelVoiceSection = moduleValue27.generateChannelVoiceSection;
string = intl.string;
object[3] = Reflect.apply(generateChannelVoiceSection, moduleValue27, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['46Ra1b']])]);
moduleValue28 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelAppsSection = moduleValue28.generateChannelAppsSection;
string = intl.string;
object[4] = Reflect.apply(generateChannelAppsSection, moduleValue28, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['rrh/W6']])]);
value30 = arraySpread(object, conditionalPermissionSpec(permissionOptionsBinding.showStageChannelPermissions,
_fun116180), 5, r23);
moduleValue29 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelEventsSection = moduleValue29.generateChannelEventsSection;
string = intl.string;
object[value30] = Reflect.apply(generateChannelEventsSection, moduleValue29, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.b8lplT])]);
value30 + 1;
r1 = object;
} else if (ChannelTypes.GUILD_VOICE === type) {
moduleValue18 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelGeneralSection = moduleValue18.generateChannelGeneralSection;
value23 = intl.string(t.ouHggI);
object = {showManageWebhooks: true};
object = [Reflect.apply(generateChannelGeneralSection, moduleValue18, [channelPermissionSpecMapBinding, value23,
object])];
moduleValue19 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelMembershipSection = moduleValue19.generateChannelMembershipSection;
string = intl.string;
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue19, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.Ny49TN])]);
moduleValue20 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelVoiceSection = moduleValue20.generateChannelVoiceSection;
string = intl.string;
object[2] = Reflect.apply(generateChannelVoiceSection, moduleValue20, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['46Ra1b']])]);
moduleValue21 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
object[3] = moduleValue21.generateChannelVoiceChatSection(channelPermissionSpecMapBinding,
intl.string(t.iqlsnD),
{sectionDescription: canCurrentUserManageMessageFilters2 ? intl.format(t['4Z9Fbb'],
{setUpAutomod: setUpAutomod_116181}) : value2, inSoundmojiExperiment: inSoundmojiExperiment});
moduleValue22 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelEventsSection = moduleValue22.generateChannelEventsSection;
string = intl.string;
object[4] = Reflect.apply(generateChannelEventsSection, moduleValue22, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.b8lplT])]);
moduleValue23 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelAppsSection = moduleValue23.generateChannelAppsSection;
string = intl.string;
object[5] = Reflect.apply(generateChannelAppsSection, moduleValue23, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['rrh/W6']])]);
r1 = object;
} else if (ChannelTypes.GUILD_STAGE_VOICE === type) {
moduleValue11 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelGeneralSection = moduleValue11.generateChannelGeneralSection;
value18 = intl.string(t.ouHggI);
object = {showManageWebhooks: false};
object = [Reflect.apply(generateChannelGeneralSection, moduleValue11, [channelPermissionSpecMapBinding, value18,
object])];
moduleValue12 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelMembershipSection = moduleValue12.generateChannelMembershipSection;
string = intl.string;
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue12, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.Ny49TN])]);
moduleValue13 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelStageVoiceSection = moduleValue13.generateChannelStageVoiceSection;
string = intl.string;
object[2] = Reflect.apply(generateChannelStageVoiceSection, moduleValue13, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['46Ra1b']]), isStageVideoEnabled2]);
moduleValue14 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelStageSection = moduleValue14.generateChannelStageSection;
string = intl.string;
object[3] = Reflect.apply(generateChannelStageSection, moduleValue14, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.yniauk])]);
moduleValue15 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelEventsSection = moduleValue15.generateChannelEventsSection;
string = intl.string;
object[4] = Reflect.apply(generateChannelEventsSection, moduleValue15, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.b8lplT])]);
moduleValue16 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
object[5] = moduleValue16.generateChannelVoiceChatSection(channelPermissionSpecMapBinding,
intl.string(t.iqlsnD),
{sectionDescription: canCurrentUserManageMessageFilters2 ? intl.format(t['4Z9Fbb'],
{setUpAutomod: setUpAutomod_116182}) : value2, inSoundmojiExperiment: inSoundmojiExperiment});
moduleValue17 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
object[6] = moduleValue17.generateChannelAppsSection(channelPermissionSpecMapBinding, intl.string(t['rrh/W6']),
{showActivities: false});
r1 = object;
} else if (ChannelTypes.GUILD_FORUM === type) {
string = intl.string;
r13 = isMediaChannel2 ? Reflect.apply(string, intl, [t.aSjPgw]) : Reflect.apply(string, intl, [t.TS7Cnb]);
r22 = isMediaChannel2 ? t.YjJTtH : t['1MTnqY'];
moduleValue7 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelGeneralSection = moduleValue7.generateChannelGeneralSection;
string = intl.string;
object = [Reflect.apply(generateChannelGeneralSection, moduleValue7, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.ouHggI])])];
moduleValue8 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelMembershipSection = moduleValue8.generateChannelMembershipSection;
string = intl.string;
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue8, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.Ny49TN])]);
moduleValue9 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelTextSection = moduleValue9.generateChannelTextSection;
if (canCurrentUserManageMessageFilters2) {
format = intl.format;
setUpAutomod2 = setUpAutomod;
r14 = Reflect.apply(format, intl, [r22, {setUpAutomod: setUpAutomod2}]);
r23 = setUpAutomod2;
} else {
r14 = value2;
r23 = require;
}
object[2] = Reflect.apply(generateChannelTextSection, moduleValue9, [channelPermissionSpecMapBinding, r13,
{'showPrivateThreads': false, 'showCreateThreads': false, sectionDescription: r14,
inSoundmojiExperiment: inSoundmojiExperiment}]);
moduleValue10 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelAppsSection = moduleValue10.generateChannelAppsSection;
string = intl.string;
object[3] = Reflect.apply(generateChannelAppsSection, moduleValue10, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['rrh/W6']])]);
arraySpread(object, conditionalPermissionSpec(r8, _fun116184), 4, r23);
r1 = object;
} else if (ChannelTypes.GUILD_MEDIA === type) {
string = intl.string;
r13 = isMediaChannel2 ? Reflect.apply(string, intl, [t.aSjPgw]) : Reflect.apply(string, intl, [t.TS7Cnb]);
r22 = isMediaChannel2 ? t.YjJTtH : t['1MTnqY'];
moduleValue7 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelGeneralSection = moduleValue7.generateChannelGeneralSection;
string = intl.string;
object = [Reflect.apply(generateChannelGeneralSection, moduleValue7, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.ouHggI])])];
moduleValue8 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelMembershipSection = moduleValue8.generateChannelMembershipSection;
string = intl.string;
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue8, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.Ny49TN])]);
moduleValue9 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelTextSection = moduleValue9.generateChannelTextSection;
if (canCurrentUserManageMessageFilters2) {
format = intl.format;
setUpAutomod2 = setUpAutomod;
r14 = Reflect.apply(format, intl, [r22, {setUpAutomod: setUpAutomod2}]);
r23 = setUpAutomod2;
} else {
r14 = value2;
r23 = require;
}
object[2] = Reflect.apply(generateChannelTextSection, moduleValue9, [channelPermissionSpecMapBinding, r13,
{'showPrivateThreads': false, 'showCreateThreads': false, sectionDescription: r14,
inSoundmojiExperiment: inSoundmojiExperiment}]);
moduleValue10 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelAppsSection = moduleValue10.generateChannelAppsSection;
string = intl.string;
object[3] = Reflect.apply(generateChannelAppsSection, moduleValue10, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['rrh/W6']])]);
arraySpread(object, conditionalPermissionSpec(r8, _fun116184), 4, r23);
r1 = object;
} else {
moduleValue3 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelGeneralSection = moduleValue3.generateChannelGeneralSection;
string = intl.string;
object = [Reflect.apply(generateChannelGeneralSection, moduleValue3, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.ouHggI])])];
moduleValue4 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelMembershipSection = moduleValue4.generateChannelMembershipSection;
string = intl.string;
object[1] = Reflect.apply(generateChannelMembershipSection, moduleValue4, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t.Ny49TN])]);
moduleValue5 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
object[2] = moduleValue5.generateChannelTextSection(channelPermissionSpecMapBinding, intl.string(t.cKobO5),
{showPrivateThreads: a1.type !== ChannelTypes.GUILD_ANNOUNCEMENT, showCreateThreads: true,
inSoundmojiExperiment: inSoundmojiExperiment});
moduleValue6 = importAll(15196) /* metro dependency 15196: PermissionUtils */;
generateChannelAppsSection = moduleValue6.generateChannelAppsSection;
string = intl.string;
object[3] = Reflect.apply(generateChannelAppsSection, moduleValue6, [channelPermissionSpecMapBinding,
Reflect.apply(string, intl, [t['rrh/W6']])]);
arraySpread(object, conditionalPermissionSpec(r8, _fun116185), 4, r23);
r1 = object;
}
return filterPermissions(r1, set);
function _fun116180() { // fn#116180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:2445, offset: 0x0247eddb, size: 97 bytes, params: 1, frame: 18
const permissionUtilsModule = PermissionUtilsModule2;
const generateChannelStageSection = permissionUtilsModule.generateChannelStageSection;
const binding = env0_1;
const intl = (IndexNativeModule).intl;
return Reflect.apply(generateChannelStageSection, permissionUtilsModule, [binding,
intl.string((IndexNativeModule).t.yniauk)]);
}
function generateChannelPermissionSpecSetUpAutomod() { // fn#116181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:3062, owner: generateChannelPermissionSpec.setUpAutomod, offset: 0x0247ee3c, size: 56 bytes, params: 1, frame: 14
const defaultImport = GuildSettingsActionCreators;
const open = defaultImport.open;
const binding = env0_0;
const GUILD_AUTOMOD = GuildSettingsSections.GUILD_AUTOMOD;
Reflect.apply(open, defaultImport, [binding, GUILD_AUTOMOD]);
}
function generateChannelPermissionSpecSetUpAutomod_116182() { // fn#116182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:3919, owner: generateChannelPermissionSpec.setUpAutomod, offset: 0x0247ee3c, size: 56 bytes, params: 1, frame: 14
const defaultImport = GuildSettingsActionCreators;
const open = defaultImport.open;
const binding = env0_0;
const GUILD_AUTOMOD = GuildSettingsSections.GUILD_AUTOMOD;
Reflect.apply(open, defaultImport, [binding, GUILD_AUTOMOD]);
}
function generateChannelPermissionSpecSetUpAutomod_116183() { // fn#116183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:4570, owner: generateChannelPermissionSpec.setUpAutomod, offset: 0x0247ee74, size: 98 bytes, params: 1, frame: 14
var value2;
if (!env0_2) {
value2 = environment.__proto__;
(require(7155) /* metro dependency 7155: Tracking */).trackForumEnableAutomodClicked();
}
const defaultImport = GuildSettingsActionCreators;
const open = defaultImport.open;
const binding = env0_0;
const GUILD_AUTOMOD = GuildSettingsSections.GUILD_AUTOMOD;
Reflect.apply(open, defaultImport, [binding, GUILD_AUTOMOD]);
}
function _fun116184() { // fn#116184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:4801, offset: 0x0247eed6, size: 97 bytes, params: 1, frame: 18
const permissionUtilsModule = PermissionUtilsModule2;
const generateChannelVoiceSection = permissionUtilsModule.generateChannelVoiceSection;
const binding = env0_1;
const intl = (IndexNativeModule).intl;
return Reflect.apply(generateChannelVoiceSection, permissionUtilsModule, [binding,
intl.string((IndexNativeModule).t['46Ra1b'])]);
}
function _fun116185() { // fn#116185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:5354, offset: 0x0247eed6, size: 97 bytes, params: 1, frame: 18
const permissionUtilsModule = PermissionUtilsModule2;
const generateChannelVoiceSection = permissionUtilsModule.generateChannelVoiceSection;
const binding = env0_1;
const intl = (IndexNativeModule).intl;
return Reflect.apply(generateChannelVoiceSection, permissionUtilsModule, [binding,
intl.string((IndexNativeModule).t['46Ra1b'])]);
}
}
return filterPermissions(r1, set);
}
function generateGuildPermissionSpec(a0) { // fn#116186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:5501, offset: 0x0247ef37, size: 269 bytes, params: 2, frame: 17
var r1;
var add;
var VIEW_GUILD_ANALYTICS;
var defaultImport;
var MANAGE_OFFICIAL_MESSAGES;
const Set = global.Set;
const set = new Set();
let features = a0.features;
let has = features.has;
const COMMUNITY = GuildFeatures.COMMUNITY;
if (!Reflect.apply(has, features, [COMMUNITY])) {
add = set.add;
VIEW_GUILD_ANALYTICS = Permissions.VIEW_GUILD_ANALYTICS;
Reflect.apply(add, set, [VIEW_GUILD_ANALYTICS.toString()]);
function generateGuildPermissionSpec(a0) { // fn#116186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:5501, offset: 0x0247ef37, size: 269 bytes, params: 2, frame: 17
var r1;
var add;
var VIEW_GUILD_ANALYTICS;
var defaultImport;
var MANAGE_OFFICIAL_MESSAGES;
const Set = global.Set;
const set = new Set();
let features = a0.features;
let has = features.has;
const COMMUNITY = GuildFeatures.COMMUNITY;
if (!Reflect.apply(has, features, [COMMUNITY])) {
add = set.add;
VIEW_GUILD_ANALYTICS = Permissions.VIEW_GUILD_ANALYTICS;
Reflect.apply(add, set, [VIEW_GUILD_ANALYTICS.toString()]);
}
features = a0.features;
has = features.has;
const VERIFIED = GuildFeatures.VERIFIED;
const value3 = Reflect.apply(has, features, [VERIFIED]);
if (value3) {
defaultImport = importDefault(6859) /* metro dependency 6859: GuildOfficialMessagesExperiment */;
r1 = defaultImport.getCurrentConfig({guildId: a0.id, location: 'generateGuildPermissionSpec'}).enabled;
} else {
r1 = value3;
}
if (!r1) {
add = set.add;
MANAGE_OFFICIAL_MESSAGES = Permissions.MANAGE_OFFICIAL_MESSAGES;
Reflect.apply(add, set, [MANAGE_OFFICIAL_MESSAGES.toString()]);
}
const filterPermissionsBinding = filterPermissions;
const permissionUtilsModule = PermissionUtilsModule2;
return filterPermissionsBinding(permissionUtilsModule.generateGuildPermissionSpec(getPermissionOptions(a0.id)), set);
}
features = a0.features;
has = features.has;
const VERIFIED = GuildFeatures.VERIFIED;
const value3 = Reflect.apply(has, features, [VERIFIED]);
if (value3) {
defaultImport = importDefault(6859) /* metro dependency 6859: GuildOfficialMessagesExperiment */;
r1 = defaultImport.getCurrentConfig({guildId: a0.id, location: 'generateGuildPermissionSpec'}).enabled;
} else {
r1 = value3;
}
if (!r1) {
add = set.add;
MANAGE_OFFICIAL_MESSAGES = Permissions.MANAGE_OFFICIAL_MESSAGES;
Reflect.apply(add, set, [MANAGE_OFFICIAL_MESSAGES.toString()]);
}
const filterPermissionsBinding = filterPermissions;
const permissionUtilsModule = importAll(15196) /* metro dependency 15196: PermissionUtils */;
return filterPermissionsBinding(permissionUtilsModule.generateGuildPermissionSpec(getPermissionOptions(a0.id)), set);
}
function _fun116177(a0) { // fn#116177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:1170, offset: 0x0247e1a4, size: 51 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['permissions'] = a0.permissions.filter(function(a0) {
return !require.has(a0.flag.toString());
});
return object2;
}
function _fun116180() { // fn#116180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:2445, offset: 0x0247eddb, size: 97 bytes, params: 1, frame: 18
const permissionUtilsModule = importAll(15196) /* metro dependency 15196: PermissionUtils */;
const generateChannelStageSection = permissionUtilsModule.generateChannelStageSection;
const binding = env0_1;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return Reflect.apply(generateChannelStageSection, permissionUtilsModule, [binding,
intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yniauk)]);
}
function generateChannelPermissionSpecSetUpAutomod() { // fn#116181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:3062, owner: generateChannelPermissionSpec.setUpAutomod, offset: 0x0247ee3c, size: 56 bytes, params: 1, frame: 14
const defaultImport = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
const open = defaultImport.open;
const binding = env0_0;
const GUILD_AUTOMOD = GuildSettingsSections.GUILD_AUTOMOD;
Reflect.apply(open, defaultImport, [binding, GUILD_AUTOMOD]);
}
function generateChannelPermissionSpecSetUpAutomod_116183() { // fn#116183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:4570, owner: generateChannelPermissionSpec.setUpAutomod, offset: 0x0247ee74, size: 98 bytes, params: 1, frame: 14
var value2;
if (!env0_2) {
value2 = environment.__proto__;
(require(7155) /* metro dependency 7155: Tracking */).trackForumEnableAutomodClicked();
}
const defaultImport = importDefault(9112) /* metro dependency 9112: GuildSettingsActionCreators */;
const open = defaultImport.open;
const binding = env0_0;
const GUILD_AUTOMOD = GuildSettingsSections.GUILD_AUTOMOD;
Reflect.apply(open, defaultImport, [binding, GUILD_AUTOMOD]);
}
function _fun116184() { // fn#116184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15389:4801, offset: 0x0247eed6, size: 97 bytes, params: 1, frame: 18
const permissionUtilsModule = importAll(15196) /* metro dependency 15196: PermissionUtils */;
const generateChannelVoiceSection = permissionUtilsModule.generateChannelVoiceSection;
const binding = env0_1;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return Reflect.apply(generateChannelVoiceSection, permissionUtilsModule, [binding,
intl.string((require(1244) /* metro dependency 1244: indexNative */).t['46Ra1b'])]);
}
global.__d(_fun116173, 15192, [1383, 1867, 661, 8120, 15193, 6841, 6636, 15194, 1244, 1948, 6860, 4809, 15195, 6859,
15196, 9112, 7155,
2]) /* metro module 15192, dependencies: [1383, 1867, 661, 8120, 15193, 6841, 6636, 15194, 1244, 1948, 6860, 4809, 15195, 6859, 15196, 9112, 7155, 2] */;
File diff suppressed because it is too large. Load diff
+4 -1
View File
@@ -1,11 +1,14 @@
/* Metro module 477; source: utils/PlatformUtils.tsx; dependencies: [2, 478] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun6164(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#6164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:518:6, offset: 0x00cef3cb, size: 123 bytes, params: 8, frame: 22
var propertyName;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/PlatformUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/PlatformUtils.tsx');
for (propertyName in require(478) /* metro dependency 478: PlatformUtils */) {
exports[propertyName] = (require(478) /* metro dependency 478: PlatformUtils */)[propertyName];
}
}
global.__d(_fun6164, 477, [2, 478]) /* metro module 477, dependencies: [2, 478] */;
+29 -25
View File
@@ -1,44 +1,48 @@
/* Metro module 7937; source: utils/PremiumFeatureUtils.tsx; dependencies: [1879, 661, 1880, 1900, 2] */
import OverridePremiumTypeStore from '../modules/premium/OverridePremiumTypeStore.tsx'; /* Metro dependency 1879 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun63349(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8115:6, offset: 0x01b7ba7b, size: 189 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const closure = getUserMaxFileSize;
const getUserMaxFileSize2 = getUserMaxFileSize;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const overridePremiumTypeStore = importDefault(1879) /* metro dependency 1879: OverridePremiumTypeStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_3 = value.MAX_ATTACHMENT_SIZE;
const env0_4 = value.MAX_STAFF_ATTACHMENT_SIZE;
value = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_5 = value.PremiumUserLimits;
const env0_6 = value.UNSELECTED_PREMIUM_TYPE_OVERRIDE;
object2 = {getUserMaxFileSize: closure};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/PremiumFeatureUtils.tsx');
exports.default = object2;
exports.getUserMaxFileSize = closure;
}
function getUserMaxFileSize(a0) { // fn#63350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8115:239, offset: 0x01b7bb38, size: 136 bytes, params: 2, frame: 13
var r0;
var moduleValue;
if (a0 == null) {
return MAX_ATTACHMENT_SIZE;
}
if (a0.isStaff()) {
if (OverridePremiumTypeStore.getPremiumTypeOverride() === UNSELECTED_PREMIUM_TYPE_OVERRIDE) {
r0 = MAX_STAFF_ATTACHMENT_SIZE;
object = {getUserMaxFileSize: getUserMaxFileSize2};
(FileImportTrackerModule).fileFinishedImporting('utils/PremiumFeatureUtils.tsx');
exports.default = object;
exports.getUserMaxFileSize = getUserMaxFileSize2;
function getUserMaxFileSize(a0) { // fn#63350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8115:239, offset: 0x01b7bb38, size: 136 bytes, params: 2, frame: 13
var r0;
var moduleValue;
if (a0 == null) {
return MAX_ATTACHMENT_SIZE;
}
if (a0.isStaff()) {
if (OverridePremiumTypeStore.getPremiumTypeOverride() === UNSELECTED_PREMIUM_TYPE_OVERRIDE) {
r0 = MAX_STAFF_ATTACHMENT_SIZE;
} else if (a0.premiumType == null) {
r0 = MAX_ATTACHMENT_SIZE;
} else {
moduleValue = require(1900) /* metro dependency 1900: PremiumTypeUtils */;
r0 = moduleValue.isPremium(a0) ? PremiumUserLimits[a0.premiumType].fileSize : MAX_ATTACHMENT_SIZE;
}
} else if (a0.premiumType == null) {
r0 = MAX_ATTACHMENT_SIZE;
} else {
moduleValue = require(1900) /* metro dependency 1900: PremiumTypeUtils */;
r0 = moduleValue.isPremium(a0) ? PremiumUserLimits[a0.premiumType].fileSize : MAX_ATTACHMENT_SIZE;
}
} else if (a0.premiumType == null) {
r0 = MAX_ATTACHMENT_SIZE;
} else {
moduleValue = require(1900) /* metro dependency 1900: PremiumTypeUtils */;
r0 = moduleValue.isPremium(a0) ? PremiumUserLimits[a0.premiumType].fileSize : MAX_ATTACHMENT_SIZE;
return r0;
}
return r0;
}
global.__d(_fun63349, 7937, [1879, 661, 1880, 1900,
2]) /* metro module 7937, dependencies: [1879, 661, 1880, 1900, 2] */;
+23 -21
View File
@@ -1,32 +1,34 @@
/* Metro module 1900; source: utils/PremiumTypeUtils.tsx; dependencies: [1880, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PremiumConstantsModule from '../modules/premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
function _fun20850(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2027:6, offset: 0x00edda80, size: 167 bytes, params: 8, frame: 21
var object2;
const closure = isPremiumAtLeast;
const closure2 = isPremium;
const isPremiumAtLeast2 = isPremiumAtLeast;
const isPremium2 = isPremium;
const closure3 = function(a0, a1) {
return a0 != null && a0.premiumType === a1;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypeOrder;
object2 = {isPremiumAtLeast: closure, isPremium: closure2, isPremiumExactly: closure3};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/PremiumTypeUtils.tsx');
exports.default = object2;
exports.isPremiumAtLeast = closure;
object = {isPremiumAtLeast: isPremiumAtLeast2, isPremium: isPremium2, isPremiumExactly: closure3};
(FileImportTrackerModule).fileFinishedImporting('utils/PremiumTypeUtils.tsx');
exports.default = object;
exports.isPremiumAtLeast = isPremiumAtLeast2;
exports.isPremiumAtMost = isPremiumAtMost;
exports.isPremium = closure2;
exports.isPremium = isPremium2;
exports.isPremiumExactly = closure3;
function isPremiumAtLeast(a0, a1) { // fn#20851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2027:123, offset: 0x00eddb27, size: 50 bytes, params: 3, frame: 6
return a1 == null || a0 != null && PremiumTypeOrder[a0] >= PremiumTypeOrder[a1];
}
function isPremium(a0, a1) { // fn#20852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2027:190, offset: 0x00eddb59, size: 51 bytes, params: 3, frame: 14
return a0 != null && a0.premiumType != null && isPremiumAtLeast(a0.premiumType, a1);
}
function isPremiumAtMost(a0, a1) { // fn#20854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2027:572, offset: 0x00eddba7, size: 40 bytes, params: 3, frame: 4
return a0 == null || PremiumTypeOrder[a0] <= PremiumTypeOrder[a1];
}
}
function isPremiumAtLeast(a0, a1) { // fn#20851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2027:123, offset: 0x00eddb27, size: 50 bytes, params: 3, frame: 6
return a1 == null || a0 != null && PremiumTypeOrder[a0] >= PremiumTypeOrder[a1];
}
function isPremium(a0, a1) { // fn#20852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2027:190, offset: 0x00eddb59, size: 51 bytes, params: 3, frame: 14
return a0 != null && a0.premiumType != null && isPremiumAtLeast(a0.premiumType, a1);
}
function isPremiumAtMost(a0, a1) { // fn#20854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2027:572, offset: 0x00eddba7, size: 40 bytes, params: 3, frame: 4
return a0 == null || PremiumTypeOrder[a0] <= PremiumTypeOrder[a1];
}
global.__d(_fun20850, 1900, [1880, 2]) /* metro module 1900, dependencies: [1880, 2] */;
File diff suppressed because it is too large. Load diff
+118 -111
View File
@@ -1,10 +1,19 @@
/* Metro module 5137; source: utils/PriceUtils.tsx; dependencies: [1949, 3804, 1880, 482, 477, 5138, 5140, 5142, 1244, 3802, 2] */
import LocaleStore from '../modules/user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import BillingInfoStore from '../stores/billing/BillingInfoStore.tsx'; /* Metro dependency 3804 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PremiumConstantsModule from '../modules/premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as PremiumUtilsModule from './PremiumUtils.tsx'; /* Metro dependency 3802 */
import * as PriceUtilsModule from '../external/discord_common/js/shared/utils/PriceUtils.tsx'; /* Metro dependency 5138 */
function _fun45261(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5315:6, offset: 0x01185e28, size: 304 bytes, params: 8, frame: 25
const env0_0 = require;
const closure = formatSingleCurrencyPrice;
const closure2 = formatDualPriceForBG;
const closure3 = formatPrice;
const closure4 = formatRate;
const formatSingleCurrencyPrice2 = formatSingleCurrencyPrice;
const formatDualPriceForBG2 = formatDualPriceForBG;
const formatPrice2 = formatPrice;
const formatRate2 = formatRate;
const closure5 = function(a0) {
var r0;
var value = a0;
@@ -18,17 +27,13 @@ function _fun45261(global, require, importDefault, importAll, module, exports, d
};
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const billingInfoStore = importDefault(3804) /* metro dependency 3804: BillingInfoStore */;
const env0_4 = (require(1880) /* metro dependency 1880: PremiumConstants */).SubscriptionIntervalTypes;
const env0_5 = (require(482) /* metro dependency 482: Constants */).CurrencyCodes;
Object = global.Object;
const env0_6 = Object.freeze(['en-CA', 'en-AU', 'en-NZ']);
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/PriceUtils.tsx');
exports.formatSingleCurrencyPrice = closure;
exports.formatDualPriceForBG = closure2;
exports.formatPrice = closure3;
exports.formatRate = closure4;
(FileImportTrackerModule).fileFinishedImporting('utils/PriceUtils.tsx');
exports.formatSingleCurrencyPrice = formatSingleCurrencyPrice2;
exports.formatDualPriceForBG = formatDualPriceForBG2;
exports.formatPrice = formatPrice2;
exports.formatRate = formatRate2;
exports.formatPercent = function(a0, a1) {
var Intl = global.Intl;
return Intl.NumberFormat(a0, {'style': 'percent', 'minimumFractionDigits': 0}).format(a1);
@@ -38,86 +43,100 @@ function _fun45261(global, require, importDefault, importAll, module, exports, d
exports.shortenAndFormatPrice = function(a0, a1, a2) {
return maybeShortenPrice(formatPrice(a0, a1, a2));
};
}
function formatSingleCurrencyPrice(a0, a1, a2) { // fn#45262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5315:219, offset: 0x01185f58, size: 273 bytes, params: 4, frame: 20
var r0;
let value = a2;
const object2 = {};
copyDataProperties(object2, value ?? ({}), undefined);
const r4 = value?.localeOverride ?? LocaleStore.locale;
if (r4 === 'en-US' && env0_6.includes(LocaleStore.systemLocale)) {
object2.currencyDisplay = 'code';
}
if (value) {
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isWindows();
r0 = value;
} else {
r0 = value;
}
r0 = r0 && LocaleStore.systemLocale === 'en-GB';
if (r0) {
object2.currencyDisplay = 'code';
}
if (object2.maximumFractionDigits === 0 && object2.minimumFractionDigits == null) {
object2.minimumFractionDigits = 0;
}
return (require(5138) /* metro dependency 5138: PriceUtils */).formatPrice(a0, a1, r4, object2);
}
function formatDualPriceForBG(a0, a1) { // fn#45263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5315:633, offset: 0x01186069, size: 101 bytes, params: 3, frame: 18
const formatSingleCurrencyPriceBinding = formatSingleCurrencyPrice;
const EUR = CurrencyCodes.EUR;
const value2 = formatSingleCurrencyPriceBinding(a0, EUR, a1);
const value3 = 1.95583 * a0;
const BGN = CurrencyCodes.BGN;
return '' + value2 + ' (' + formatSingleCurrencyPriceBinding(value3, BGN, a1) + ')';
}
function formatPrice(a0, a1, a2) { // fn#45264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5315:766, offset: 0x011860ce, size: 321 bytes, params: 4, frame: 20
var r7;
var r0;
var value5;
var platformName;
var storeFront;
let Date = global.Date;
let value = Date.now();
Date = global.Date;
const date = new Date('2026-08-05T22:00:00Z');
const getTime = date.getTime;
value = value >= Reflect.apply(getTime, date, []);
if (value) {
r0 = false;
} else {
value5 = undefined;
platformName = (require(477) /* metro dependency 477: PlatformUtils */).getPlatformName();
if (platformName === 'android') {
r7 = (require(5140) /* metro dependency 5140: IAPStoreAndroid */).default.getUserCountry();
} else if (platformName === 'ios') {
storeFront = (require(5142) /* metro dependency 5142: GenericIAPStore */).default.getStoreFront();
r7 = storeFront == null ? value5 : storeFront.country;
} else {
r7 = BillingInfoStore.ipCountryCode;
function formatSingleCurrencyPrice(a0, a1, a2) { // fn#45262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5315:219, offset: 0x01185f58, size: 273 bytes, params: 4, frame: 20
var r0;
let value = a2;
const object = {};
copyDataProperties(object, value ?? ({}), undefined);
const r4 = value?.localeOverride ?? LocaleStore.locale;
if (r4 === 'en-US' && env0_6.includes(LocaleStore.systemLocale)) {
object.currencyDisplay = 'code';
}
r0 = r7 === 'BG' && (a1 == null ? value5 : a1.toLowerCase()) === CurrencyCodes.EUR;
if (value) {
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isWindows();
r0 = value;
} else {
r0 = value;
}
r0 = r0 && LocaleStore.systemLocale === 'en-GB';
if (r0) {
object.currencyDisplay = 'code';
}
if (object.maximumFractionDigits === 0 && object.minimumFractionDigits == null) {
object.minimumFractionDigits = 0;
}
return (PriceUtilsModule).formatPrice(a0, a1, r4, object);
}
r0 = r0 ? formatDualPriceForBG(a0, a2) : formatSingleCurrencyPrice(a0, a1, a2);
return r0;
}
function formatRate(a0, a1, a2) { // fn#45265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5315:1231, offset: 0x0118620f, size: 342 bytes, params: 4, frame: 19
var Error;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value;
const YEAR = SubscriptionIntervalTypes.YEAR;
if (a1 === YEAR) {
return intl.formatToPlainString(t['rS8FA+'], {price: a0});
function formatDualPriceForBG(a0, a1) { // fn#45263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5315:633, offset: 0x01186069, size: 101 bytes, params: 3, frame: 18
const formatSingleCurrencyPriceBinding = formatSingleCurrencyPrice;
const EUR = CurrencyCodes.EUR;
const value2 = formatSingleCurrencyPriceBinding(a0, EUR, a1);
const value3 = 1.95583 * a0;
const BGN = CurrencyCodes.BGN;
return '' + value2 + ' (' + formatSingleCurrencyPriceBinding(value3, BGN, a1) + ')';
}
let MONTH = SubscriptionIntervalTypes.MONTH;
if (a1 !== MONTH) {
if (a1 !== SubscriptionIntervalTypes.MONTH) {
function formatPrice(a0, a1, a2) { // fn#45264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5315:766, offset: 0x011860ce, size: 321 bytes, params: 4, frame: 20
var r7;
var r0;
var value5;
var platformName;
var storeFront;
let Date = global.Date;
let value = Date.now();
Date = global.Date;
const date = new Date('2026-08-05T22:00:00Z');
const getTime = date.getTime;
value = value >= Reflect.apply(getTime, date, []);
if (value) {
r0 = false;
} else {
value5 = undefined;
platformName = (require(477) /* metro dependency 477: PlatformUtils */).getPlatformName();
if (platformName === 'android') {
r7 = (require(5140) /* metro dependency 5140: IAPStoreAndroid */).default.getUserCountry();
} else if (platformName === 'ios') {
storeFront = (require(5142) /* metro dependency 5142: GenericIAPStore */).default.getStoreFront();
r7 = storeFront == null ? value5 : storeFront.country;
} else {
r7 = BillingInfoStore.ipCountryCode;
}
r0 = r7 === 'BG' && (a1 == null ? value5 : a1.toLowerCase()) === CurrencyCodes.EUR;
}
r0 = r0 ? formatDualPriceForBG(a0, a2) : formatSingleCurrencyPrice(a0, a1, a2);
return r0;
}
function formatRate(a0, a1, a2) { // fn#45265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5315:1231, offset: 0x0118620f, size: 342 bytes, params: 4, frame: 19
var Error;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var value;
const YEAR = SubscriptionIntervalTypes.YEAR;
if (a1 === YEAR) {
return intl.formatToPlainString(t['rS8FA+'], {price: a0});
}
let MONTH = SubscriptionIntervalTypes.MONTH;
if (a1 !== MONTH) {
if (a1 !== SubscriptionIntervalTypes.MONTH) {
Error = global.Error;
value = 'Unsupported interval type: ' + a1 + ', and interval count: ' + a2;
throw new Error();
}
if (a2 > 1) {
return intl.formatToPlainString(t['Qc+9ww'], {price: a0, intervalCount: a2});
}
Error = global.Error;
value = 'Unsupported interval type: ' + a1 + ', and interval count: ' + a2;
throw new Error();
}
if (a2 === 1) {
return intl.formatToPlainString(t.AbOLNu, {price: a0});
}
MONTH = SubscriptionIntervalTypes.MONTH;
if (a1 !== MONTH) {
Error = global.Error;
value = 'Unsupported interval type: ' + a1 + ', and interval count: ' + a2;
throw new Error();
@@ -127,30 +146,18 @@ function formatRate(a0, a1, a2) { // fn#45265, source: /ci/build/discord/discord
}
Error = global.Error;
value = 'Unsupported interval type: ' + a1 + ', and interval count: ' + a2;
throw new Error();
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
if (a2 === 1) {
return intl.formatToPlainString(t.AbOLNu, {price: a0});
function formatSubscriptionPlanRate(a0) { // fn#45268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5315:2057, offset: 0x011863ca, size: 110 bytes, params: 2, frame: 17
const r4 = 'interval_count' in a0 ? a0.interval_count : a0.intervalCount;
const price = (PremiumUtilsModule).getPrice(a0.id);
return formatRate(formatPrice(price.amount, price.currency), a0.interval, r4);
}
MONTH = SubscriptionIntervalTypes.MONTH;
if (a1 !== MONTH) {
Error = global.Error;
value = 'Unsupported interval type: ' + a1 + ', and interval count: ' + a2;
throw new Error();
}
if (a2 > 1) {
return intl.formatToPlainString(t['Qc+9ww'], {price: a0, intervalCount: a2});
}
Error = global.Error;
value = 'Unsupported interval type: ' + a1 + ', and interval count: ' + a2;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
function formatSubscriptionPlanRate(a0) { // fn#45268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5315:2057, offset: 0x011863ca, size: 110 bytes, params: 2, frame: 17
const r4 = 'interval_count' in a0 ? a0.interval_count : a0.intervalCount;
const price = (require(3802) /* metro dependency 3802: PremiumUtils */).getPrice(a0.id);
return formatRate(formatPrice(price.amount, price.currency), a0.interval, r4);
}
global.__d(_fun45261, 5137, [1949, 3804, 1880, 482, 477, 5138, 5140, 5142, 1244, 3802,
2]) /* metro module 5137, dependencies: [1949, 3804, 1880, 482, 477, 5138, 5140, 5142, 1244, 3802, 2] */;
+68 -61
View File
@@ -1,73 +1,80 @@
/* Metro module 4664; source: utils/ProcessArgs.tsx; dependencies: [6, 7, 3767, 2] */
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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun40372(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4842:6, offset: 0x010fef55, size: 132 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 value = _fun40373();
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ProcessArgs.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/ProcessArgs.tsx');
exports.ProcessArgs = value;
}
function _fun40373() { // fn#40373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4842:118, offset: 0x010fefd9, size: 175 bytes, params: 1, frame: 16
return env0_3(ProcessArgs, null, [{key: 'get', value: value_40375}, {key: 'contains', value: value_40376},
{key: 'isEnvVariableTrue', value: value_40377}, {key: 'isDisallowPopupsSet', value: value_40378},
{key: 'isDiscordTestSet', value: function() {
return ProcessArgs.isEnvVariableTrue('DISCORD_TEST');
}}, {key: 'isDiscordGatewayPlaintextSet', value: function() {
return false;
}}]);
}
function value_40375() { // fn#40375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4842:216, offset: 0x010ff088, size: 175 bytes, params: 1, frame: 15
var r1;
var value2;
var value3;
var processUtils;
if (ProcessArgs.cached == null) {
value2 = environment.__proto__;
value3 = undefined;
if ((importDefault(3767) /* metro dependency 3767: DiscordNative */) == null) {
r1 = value3;
} else {
processUtils = (importDefault(3767) /* metro dependency 3767: DiscordNative */).processUtils;
r1 = processUtils == null || processUtils.getMainArgvSync == null ? value3 : processUtils.getMainArgvSync();
function _fun40373() { // fn#40373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4842:118, offset: 0x010fefd9, size: 175 bytes, params: 1, frame: 16
return CreateClass(ProcessArgs, null, [{key: 'get', value: value_40375}, {key: 'contains', value: value_40376},
{key: 'isEnvVariableTrue', value: value_40377}, {key: 'isDisallowPopupsSet', value: value_40378},
{key: 'isDiscordTestSet', value: function() {
return ProcessArgs.isEnvVariableTrue('DISCORD_TEST');
}}, {key: 'isDiscordGatewayPlaintextSet', value: function() {
return false;
}}]);
function ProcessArgs() { // fn#40374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4842:129, offset: 0x00c618a4, size: 27 bytes, params: 1, frame: 13
env1_2(this, ProcessArgs);
}
if (r1 != null && r1.length > 1) {
r1.shift();
function value_40375() { // fn#40375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4842:216, offset: 0x010ff088, size: 175 bytes, params: 1, frame: 15
var r1;
var value2;
var value3;
var processUtils;
if (ProcessArgs.cached == null) {
value2 = environment.__proto__;
value3 = undefined;
if ((importDefault(3767) /* metro dependency 3767: DiscordNative */) == null) {
r1 = value3;
} else {
processUtils = (importDefault(3767) /* metro dependency 3767: DiscordNative */).processUtils;
r1 = processUtils == null || processUtils.getMainArgvSync == null ? value3 : processUtils.getMainArgvSync();
}
if (r1 != null && r1.length > 1) {
r1.shift();
}
r1 = r1 ?? [];
ProcessArgs.cached = r1;
}
return ProcessArgs.cached;
}
r1 = r1 ?? [];
ProcessArgs.cached = r1;
function value_40376(a0) { // fn#40376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4842:475, offset: 0x010ff137, size: 31 bytes, params: 2, frame: 11
return ProcessArgs.get().includes(a0);
}
function value_40377(a0) { // fn#40377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4842:557, offset: 0x010ff156, size: 141 bytes, params: 2, frame: 14
var r1;
var process;
const value2 = undefined;
if (value2 !== (importDefault(3767) /* metro dependency 3767: DiscordNative */)) {
if ((importDefault(3767) /* metro dependency 3767: DiscordNative */) == null) {
r1 = value2;
} else {
process = (importDefault(3767) /* metro dependency 3767: DiscordNative */).process;
r1 = process == null || process.env == null ? value2 : process.env[a0];
}
if (r1 === '1') {
return true;
}
if (r1 === 'true') {
return true;
}
}
return false;
}
function value_40378() { // fn#40378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4842:754, offset: 0x010ff1e3, size: 50 bytes, params: 1, frame: 12
return ProcessArgs.contains('--disallow-popups') || ProcessArgs.isEnvVariableTrue('DISCORD_DISALLOW_POPUPS');
}
}
return ProcessArgs.cached;
}
function value_40376(a0) { // fn#40376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4842:475, offset: 0x010ff137, size: 31 bytes, params: 2, frame: 11
return ProcessArgs.get().includes(a0);
}
function value_40377(a0) { // fn#40377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4842:557, offset: 0x010ff156, size: 141 bytes, params: 2, frame: 14
var r1;
var process;
const value2 = undefined;
if (value2 !== (importDefault(3767) /* metro dependency 3767: DiscordNative */)) {
if ((importDefault(3767) /* metro dependency 3767: DiscordNative */) == null) {
r1 = value2;
} else {
process = (importDefault(3767) /* metro dependency 3767: DiscordNative */).process;
r1 = process == null || process.env == null ? value2 : process.env[a0];
}
if (r1 === '1') {
return true;
}
if (r1 === 'true') {
return true;
}
}
return false;
}
function value_40378() { // fn#40378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4842:754, offset: 0x010ff1e3, size: 50 bytes, params: 1, frame: 12
return ProcessArgs.contains('--disallow-popups') || ProcessArgs.isEnvVariableTrue('DISCORD_DISALLOW_POPUPS');
}
global.__d(_fun40372, 4664, [6, 7, 3767, 2]) /* metro module 4664, dependencies: [6, 7, 3767, 2] */;
+374 -370
View File
@@ -1,393 +1,397 @@
/* Metro module 5256; source: utils/ProcessUtils.native.tsx; dependencies: [6, 7, 15, 17, 18, 27, 5257, 2] */
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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ProcessUtilsBaseModule from './ProcessUtilsBase.tsx'; /* Metro dependency 5257 */
function _fun46719(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:6, offset: 0x011adbaf, size: 251 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = (require(27) /* metro dependency 27 */).NativeModules;
const ProcessUtils = (require(5257) /* metro dependency 5257: ProcessUtilsBase */).ProcessUtils;
const ProcessUtils = (ProcessUtilsBaseModule).ProcessUtils;
let value = _fun46726(ProcessUtils);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ProcessUtils.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/ProcessUtils.native.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_46720() { // fn#46720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:172, offset: 0x011adcaa, 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_46720_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getHermesInstrumentedStatsSummary() { // fn#46723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:365, offset: 0x011add08, size: 192 bytes, params: 1, frame: 19
var r1;
var instrumentedStats;
var value3;
var value4;
var Object;
var entries;
var value5;
var filter;
var closure;
var value6;
var slice;
var value7;
var map;
var value8;
var length;
var value9;
var join;
var value10;
var error;
let value = undefined;
const HermesInternal = global.globalThis.HermesInternal;
if (HermesInternal == null) {
return value;
}
if (typeof HermesInternal !== 'object') {
return value;
}
const getInstrumentedStats = HermesInternal.getInstrumentedStats;
if (typeof getInstrumentedStats !== 'function') {
return value;
}
try {
instrumentedStats = getInstrumentedStats();
} catch (error) {
return value;
}
try {
value3 = instrumentedStats == null;
} catch (error) {
return value;
}
if (value3) {
return value;
}
try {
value4 = typeof instrumentedStats !== 'object';
} catch (error) {
return value;
}
if (value4) {
return value;
}
try {
Object = global.Object;
} catch (error) {
return value;
}
try {
entries = Object.entries;
} catch (error) {
return value;
}
try {
value5 = Reflect.apply(entries, Object, [instrumentedStats]);
} catch (error) {
return value;
}
try {
filter = value5.filter;
} catch (error) {
return value;
}
try {
closure = function(a0) {
var r1;
var r2;
var r3;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var value = undefined;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value2 = item2 === value;
if (value2) {
}
if (value2) {
r1 = item2;
r2 = value2;
r3 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r3 = value;
} else {
r1 = item3;
r2 = value3;
r3 = item;
}
}
if (!r2) {
r1.return();
}
r3 = typeof r3 === 'number' && global.Number.isFinite(r3);
return r3;
};
} catch (error) {
return value;
}
try {
value6 = Reflect.apply(filter, value5, [closure]);
} catch (error) {
return value;
}
try {
slice = value6.slice;
} catch (error) {
return value;
}
try {
value7 = Reflect.apply(slice, value6, [0, 6]);
} catch (error) {
return value;
}
try {
map = value7.map;
} catch (error) {
return value;
}
try {
closure = function(a0) {
var r0;
var r1;
var r3;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r4 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
r3 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r3 = value;
} else {
r0 = item3;
r1 = value3;
r3 = item;
}
}
if (!r1) {
r0.return();
}
return '' + r4 + '=' + r3;
};
} catch (error) {
return value;
}
try {
value8 = Reflect.apply(map, value7, [closure]);
} catch (error) {
return value;
}
try {
length = value8.length;
} catch (error) {
return value;
}
try {
value9 = length > 0;
} catch (error) {
return value;
}
if (value9) {
function _isNativeReflectConstruct_46720() { // fn#46720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:172, offset: 0x011adcaa, 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 {
join = value8.join;
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_46720_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getHermesInstrumentedStatsSummary() { // fn#46723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:365, offset: 0x011add08, size: 192 bytes, params: 1, frame: 19
var r1;
var instrumentedStats;
var value3;
var value4;
var Object;
var entries;
var value5;
var filter;
var closure;
var value6;
var slice;
var value7;
var map;
var value8;
var length;
var value9;
var join;
var value10;
var error;
let value = undefined;
const HermesInternal = global.globalThis.HermesInternal;
if (HermesInternal == null) {
return value;
}
if (typeof HermesInternal !== 'object') {
return value;
}
const getInstrumentedStats = HermesInternal.getInstrumentedStats;
if (typeof getInstrumentedStats !== 'function') {
return value;
}
try {
instrumentedStats = getInstrumentedStats();
} catch (error) {
return value;
}
try {
value10 = Reflect.apply(join, value8, [', ']);
value3 = instrumentedStats == null;
} catch (error) {
return value;
}
r1 = value10;
} else {
r1 = value;
}
return r1;
}
function _fun46726(a0) { // fn#46726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:765, offset: 0x011adea0, size: 721 bytes, params: 2, frame: 16
const closure = ProcessUtilsIOS;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getProcessUptime', value: function() {
return null;
}}, {key: 'getCumulativeCPUUsage', value: function() {
return this.cumulativeCpuUsage;
}}, {key: 'getCurrentCPUUsagePercent', value: function() {
return this.cpuPercentage;
}}, {key: 'getCurrentMemoryUsageKB', value: function() {
return this.memory;
}}, {key: 'setShouldCollectHermesInstrumentedStats', value: function(a0) {
this.shouldCollectHermesInstrumentedStats = a0;
var value = undefined;
this.hermesInstrumentedStatsSummary = a0 ? getHermesInstrumentedStatsSummary() : value;
return value;
}}, {key: 'getCurrentHermesInstrumentedStatsSummary', value: function() {
if (this.shouldCollectHermesInstrumentedStats) {
return this.hermesInstrumentedStatsSummary;
if (value3) {
return value;
}
}}, {key: 'enablePerfMemoryHooks', value: function() {
return null;
}}, {key: 'disablePerfMemoryHooks', value: function() {
return null;
}}, {key: 'getPerfAttributedMemory', value: function() {
return null;
}}, {key: 'getPerfAttributedMemoryCallstacks', value: function() {
return null;
}}, {key: 'getPerfAttributedMemoryStats', value: function() {
return null;
}}, {key: 'startCPUProfiling', value: function() {
return null;
}}, {key: 'stopCPUProfiling', value: function() {
var Promise = global.Promise;
return Promise.resolve(null);
}}, {key: 'enablePAMemoryProfiler', value: function() {
return null;
}}, {key: 'disablePAMemoryProfiler', value: function() {
return null;
}}, {key: 'getPerfAttributedPAMemory', value: function() {
return null;
}}, {key: 'getPerfAttributedPAMemoryCallstacks', value: function() {
return null;
}}, {key: 'getPartitionAllocatorStats', value: function() {
return null;
}}, {key: 'enableProfilingV8Heap', value: function() {
}}, {key: 'disableProfilingV8Heap', value: function() {
}}, {key: 'getProfilerV8MemoryCallstacks', value: function() {
return null;
}}, {key: 'getMemoryUsageDetails', value: function() {
return {[0]: this.memory};
}}, {key: 'getMemoryUsageElectronRenderer', value: function() {
return null;
}}, {key: 'getMemoryPrivateUsageElectronRenderer', value: function() {
return null;
}}, {key: 'getMemoryUsageElectronRendererUsedHeapSize', value: function() {
return null;
}}, {key: 'getMemoryHeapStats', value: function() {
return null;
}}, {key: 'getBlinkMemoryInfo', value: function() {
return null;
}}, {key: 'getMemoryUsageElectronProcessTypeDetails', value: function() {
return null;
}}]);
}
function ProcessUtilsIOS() { // fn#46727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:777, offset: 0x011ae171, size: 212 bytes, params: 1, frame: 21
var environment;
const value = environment.__proto__;
const binding = env1_0;
const value3 = undefined;
binding(this, ProcessUtilsIOS);
const value4 = env1_3(ProcessUtilsIOS);
const value7 = env1_2(this, _isNativeReflectConstruct_46720() ? global.Reflect.construct(value4, [],
env1_3(this).constructor) : value4.apply(this, value3));
value7.shouldCollectHermesInstrumentedStats = false;
const SystemResourceManager = NativeModules == null ? value3 : NativeModules.SystemResourceManager;
if (!(SystemResourceManager == null || SystemResourceManager.getCpuCoreCount == null)) {
SystemResourceManager.getCpuCoreCount(_fun46728);
try {
value4 = typeof instrumentedStats !== 'object';
} catch (error) {
return value;
}
if (value4) {
return value;
}
try {
Object = global.Object;
} catch (error) {
return value;
}
try {
entries = Object.entries;
} catch (error) {
return value;
}
try {
value5 = Reflect.apply(entries, Object, [instrumentedStats]);
} catch (error) {
return value;
}
try {
filter = value5.filter;
} catch (error) {
return value;
}
try {
closure = function(a0) {
var r1;
var r2;
var r3;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var value = undefined;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value2 = item2 === value;
if (value2) {
}
if (value2) {
r1 = item2;
r2 = value2;
r3 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r3 = value;
} else {
r1 = item3;
r2 = value3;
r3 = item;
}
}
if (!r2) {
r1.return();
}
r3 = typeof r3 === 'number' && global.Number.isFinite(r3);
return r3;
};
} catch (error) {
return value;
}
try {
value6 = Reflect.apply(filter, value5, [closure]);
} catch (error) {
return value;
}
try {
slice = value6.slice;
} catch (error) {
return value;
}
try {
value7 = Reflect.apply(slice, value6, [0, 6]);
} catch (error) {
return value;
}
try {
map = value7.map;
} catch (error) {
return value;
}
try {
closure = function(a0) {
var r0;
var r1;
var r3;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r4 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
r3 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r3 = value;
} else {
r0 = item3;
r1 = value3;
r3 = item;
}
}
if (!r1) {
r0.return();
}
return '' + r4 + '=' + r3;
};
} catch (error) {
return value;
}
try {
value8 = Reflect.apply(map, value7, [closure]);
} catch (error) {
return value;
}
try {
length = value8.length;
} catch (error) {
return value;
}
try {
value9 = length > 0;
} catch (error) {
return value;
}
if (value9) {
try {
join = value8.join;
} catch (error) {
return value;
}
try {
value10 = Reflect.apply(join, value8, [', ']);
} catch (error) {
return value;
}
r1 = value10;
} else {
r1 = value;
}
return r1;
}
global.setInterval(_fun46729, 1000);
return value7;
}
function _fun46728(a0) { // fn#46728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:1137, offset: 0x011ae245, size: 20 bytes, params: 2, frame: 2
env0_0.cpuCoreCount = a0;
}
function _fun46726(a0) { // fn#46726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:765, offset: 0x011adea0, size: 721 bytes, params: 2, frame: 16
const ProcessUtilsIOS2 = ProcessUtilsIOS;
Inherits(ProcessUtilsIOS2, a0);
return CreateClass(ProcessUtilsIOS2, [{key: 'getProcessUptime', value: function() {
return null;
}}, {key: 'getCumulativeCPUUsage', value: function() {
return this.cumulativeCpuUsage;
}}, {key: 'getCurrentCPUUsagePercent', value: function() {
return this.cpuPercentage;
}}, {key: 'getCurrentMemoryUsageKB', value: function() {
return this.memory;
}}, {key: 'setShouldCollectHermesInstrumentedStats', value: function(a0) {
this.shouldCollectHermesInstrumentedStats = a0;
var value = undefined;
this.hermesInstrumentedStatsSummary = a0 ? getHermesInstrumentedStatsSummary() : value;
return value;
}}, {key: 'getCurrentHermesInstrumentedStatsSummary', value: function() {
if (this.shouldCollectHermesInstrumentedStats) {
return this.hermesInstrumentedStatsSummary;
}
}}, {key: 'enablePerfMemoryHooks', value: function() {
return null;
}}, {key: 'disablePerfMemoryHooks', value: function() {
return null;
}}, {key: 'getPerfAttributedMemory', value: function() {
return null;
}}, {key: 'getPerfAttributedMemoryCallstacks', value: function() {
return null;
}}, {key: 'getPerfAttributedMemoryStats', value: function() {
return null;
}}, {key: 'startCPUProfiling', value: function() {
return null;
}}, {key: 'stopCPUProfiling', value: function() {
var Promise = global.Promise;
return Promise.resolve(null);
}}, {key: 'enablePAMemoryProfiler', value: function() {
return null;
}}, {key: 'disablePAMemoryProfiler', value: function() {
return null;
}}, {key: 'getPerfAttributedPAMemory', value: function() {
return null;
}}, {key: 'getPerfAttributedPAMemoryCallstacks', value: function() {
return null;
}}, {key: 'getPartitionAllocatorStats', value: function() {
return null;
}}, {key: 'enableProfilingV8Heap', value: function() {
}}, {key: 'disableProfilingV8Heap', value: function() {
}}, {key: 'getProfilerV8MemoryCallstacks', value: function() {
return null;
}}, {key: 'getMemoryUsageDetails', value: function() {
return {[0]: this.memory};
}}, {key: 'getMemoryUsageElectronRenderer', value: function() {
return null;
}}, {key: 'getMemoryPrivateUsageElectronRenderer', value: function() {
return null;
}}, {key: 'getMemoryUsageElectronRendererUsedHeapSize', value: function() {
return null;
}}, {key: 'getMemoryHeapStats', value: function() {
return null;
}}, {key: 'getBlinkMemoryInfo', value: function() {
return null;
}}, {key: 'getMemoryUsageElectronProcessTypeDetails', value: function() {
return null;
}}]);
function ProcessUtilsIOS() { // fn#46727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:777, offset: 0x011ae171, size: 212 bytes, params: 1, frame: 21
var environment;
const value = environment.__proto__;
const binding = env1_0;
const value3 = undefined;
binding(this, ProcessUtilsIOS);
const value4 = env1_3(ProcessUtilsIOS);
const value7 = env1_2(this, _isNativeReflectConstruct_46720() ? global.Reflect.construct(value4, [],
env1_3(this).constructor) : value4.apply(this, value3));
value7.shouldCollectHermesInstrumentedStats = false;
const SystemResourceManager = NativeModules == null ? value3 : NativeModules.SystemResourceManager;
if (!(SystemResourceManager == null || SystemResourceManager.getCpuCoreCount == null)) {
SystemResourceManager.getCpuCoreCount(_fun46728);
}
global.setInterval(_fun46729, 1000);
return value7;
function _fun46728(a0) { // fn#46728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:1137, offset: 0x011ae245, size: 20 bytes, params: 2, frame: 2
ClassCallCheck.cpuCoreCount = a0;
}
function _fun46729() { // fn#46729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:1174, offset: 0x011ae259, size: 187 bytes, params: 1, frame: 14
if (!(SystemResourceManager == null || SystemResourceManager.getCurrentCpuUsagePercent == null)) {
SystemResourceManager.getCurrentCpuUsagePercent(_fun46730);
}
if (!(SystemResourceManager == null || SystemResourceManager.getCumulativeCpuUsage == null)) {
SystemResourceManager.getCumulativeCpuUsage(_fun46731);
}
if (!(SystemResourceManager == null || SystemResourceManager.getCurrentMemoryUsageKb == null)) {
SystemResourceManager.getCurrentMemoryUsageKb(_fun46732);
}
const shouldCollectHermesInstrumentedStats = ClassCallCheck.shouldCollectHermesInstrumentedStats;
const value = undefined;
ClassCallCheck.hermesInstrumentedStatsSummary = shouldCollectHermesInstrumentedStats ? getHermesInstrumentedStatsSummary() : value;
return value;
function _fun46730(a0) { // fn#46730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:1252, offset: 0x011ae314, size: 34 bytes, params: 2, frame: 5
const value = a0;
const binding = env1_0;
const value3 = undefined;
binding.cpuPercentage = value >= 0 ? value : value3;
return value3;
}
function _fun46731(a0) { // fn#46731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:1354, offset: 0x011ae336, size: 55 bytes, params: 2, frame: 11
var value;
var binding;
var object;
if (a0 >= 0) {
value = environment.__proto__;
binding = env1_0;
object = {usage: a0};
object.sampleTime = global.performance.now();
binding.cumulativeCpuUsage = object;
}
}
function _fun46732(a0) { // fn#46732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:1498, offset: 0x011ae36d, size: 34 bytes, params: 2, frame: 5
const value = a0;
const binding = env1_0;
const value3 = undefined;
binding.memory = value >= 0 ? value : value3;
return value3;
}
}
}
function _fun46729() { // fn#46729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:1174, offset: 0x011ae259, size: 187 bytes, params: 1, frame: 14
if (!(SystemResourceManager == null || SystemResourceManager.getCurrentCpuUsagePercent == null)) {
SystemResourceManager.getCurrentCpuUsagePercent(_fun46730);
}
if (!(SystemResourceManager == null || SystemResourceManager.getCumulativeCpuUsage == null)) {
SystemResourceManager.getCumulativeCpuUsage(_fun46731);
}
if (!(SystemResourceManager == null || SystemResourceManager.getCurrentMemoryUsageKb == null)) {
SystemResourceManager.getCurrentMemoryUsageKb(_fun46732);
}
const binding = env0_0;
const shouldCollectHermesInstrumentedStats = binding.shouldCollectHermesInstrumentedStats;
const value = undefined;
binding.hermesInstrumentedStatsSummary = shouldCollectHermesInstrumentedStats ? getHermesInstrumentedStatsSummary() : value;
return value;
}
function _fun46730(a0) { // fn#46730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:1252, offset: 0x011ae314, size: 34 bytes, params: 2, frame: 5
const value = a0;
const binding = env1_0;
const value3 = undefined;
binding.cpuPercentage = value >= 0 ? value : value3;
return value3;
}
function _fun46731(a0) { // fn#46731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:1354, offset: 0x011ae336, size: 55 bytes, params: 2, frame: 11
var value;
var binding;
var object2;
if (a0 >= 0) {
value = environment.__proto__;
binding = env1_0;
object2 = {usage: a0};
object2.sampleTime = global.performance.now();
binding.cumulativeCpuUsage = object2;
}
}
function _fun46732(a0) { // fn#46732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5434:1498, offset: 0x011ae36d, size: 34 bytes, params: 2, frame: 5
const value = a0;
const binding = env1_0;
const value3 = undefined;
binding.memory = value >= 0 ? value : value3;
return value3;
}
global.__d(_fun46719, 5256, [6, 7, 15, 17, 18, 27, 5257,
2]) /* metro module 5256, dependencies: [6, 7, 15, 17, 18, 27, 5257, 2] */;
+21 -14
View File
@@ -1,24 +1,31 @@
/* Metro module 5257; source: utils/ProcessUtilsBase.tsx; dependencies: [6, 7, 2] */
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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun46761(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5435:6, offset: 0x011ae3ff, size: 220 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const value = _fun46762();
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ProcessUtilsBase.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/ProcessUtilsBase.tsx');
exports.ElectronProcessType = {Unknown: 'unknown', Main: 'main', Renderer: 'renderer', GPU: 'gpu',
Utility: 'utility', Crashpad: 'crashpad', Clips: 'clips'};
exports.ProcessUtils = value;
function _fun46762() { // fn#46762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5435:272, offset: 0x011ae4db, size: 128 bytes, params: 1, frame: 15
return CreateClass(ProcessUtils, [{key: 'getSystemMetrics', value: function() {
var Promise = global.Promise;
return Promise.resolve(null);
}}, {key: 'setShouldCollectHermesInstrumentedStats', value: function() {
}}, {key: 'getCurrentHermesInstrumentedStatsSummary', value: function() {
}}, {key: 'getCPUCoreCount', value: function() {
return this.cpuCoreCount;
}}]);
function ProcessUtils() { // fn#46763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5435:293, offset: 0x00da1b5f, size: 27 bytes, params: 1, frame: 13
env1_0(this, ProcessUtils);
}
}
}
function _fun46762() { // fn#46762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5435:272, offset: 0x011ae4db, size: 128 bytes, params: 1, frame: 15
return env0_1(ProcessUtils, [{key: 'getSystemMetrics', value: function() {
var Promise = global.Promise;
return Promise.resolve(null);
}}, {key: 'setShouldCollectHermesInstrumentedStats', value: function() {
}}, {key: 'getCurrentHermesInstrumentedStatsSummary', value: function() {
}}, {key: 'getCPUCoreCount', value: function() {
return this.cpuCoreCount;
}}]);
}
global.__d(_fun46761, 5257, [6, 7, 2]) /* metro module 5257, dependencies: [6, 7, 2] */;
+68 -63
View File
@@ -1,80 +1,85 @@
/* Metro module 4232; source: utils/PurchaseTokenUtils.tsx; dependencies: [5, 672, 587, 491, 2] */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
import Durations from './Durations.tsx'; /* Metro dependency 672 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StorageModule from '../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
function _fun34937(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#34937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4403:6, offset: 0x0106667f, size: 179 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = getPurchaseToken;
const getPurchaseToken2 = getPurchaseToken;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const DAY = Millis.DAY;
const env0_4 = 60 * DAY;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/PurchaseTokenUtils.tsx');
exports.getPurchaseToken = closure;
(FileImportTrackerModule).fileFinishedImporting('utils/PurchaseTokenUtils.tsx');
exports.getPurchaseToken = getPurchaseToken2;
exports.getPurchaseTokenHash = function() {
return _getPurchaseTokenHash.apply(this, arguments);
};
}
function getPurchaseToken() { // fn#34938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4403:149, offset: 0x01066732, size: 185 bytes, params: 1, frame: 18
var Date;
var value3;
var set;
var binding;
var object2;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const value2 = Storage.get(env0_3);
if (value2 == null) {
value3 = (require(491) /* metro dependency 491 */).v4();
set = Storage.set;
binding = env0_3;
object2 = {purchaseToken: value3};
object2.expires = global.Date.now() + env0_4;
} else {
var expires = value2.expires;
Date = global.Date;
if (expires >= Date.now()) {
return value2.purchaseToken;
function getPurchaseToken() { // fn#34938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4403:149, offset: 0x01066732, size: 185 bytes, params: 1, frame: 18
var Date;
var value3;
var set;
var binding;
var object;
const Storage = (StorageModule).Storage;
const value2 = Storage.get(env0_3);
if (value2 == null) {
value3 = (require(491) /* metro dependency 491 */).v4();
set = Storage.set;
binding = env0_3;
object = {purchaseToken: value3};
object.expires = global.Date.now() + env0_4;
} else {
var expires = value2.expires;
Date = global.Date;
if (expires >= Date.now()) {
return value2.purchaseToken;
}
value3 = (require(491) /* metro dependency 491 */).v4();
set = Storage.set;
binding = env0_3;
object = {purchaseToken: value3};
Date = global.Date;
object.expires = Date.now() + env0_4;
}
value3 = (require(491) /* metro dependency 491 */).v4();
set = Storage.set;
binding = env0_3;
object2 = {purchaseToken: value3};
Date = global.Date;
object2.expires = Date.now() + env0_4;
Reflect.apply(set, Storage, [binding, object]);
return value3;
}
Reflect.apply(set, Storage, [binding, object2]);
return value3;
}
function _getPurchaseTokenHash() { // fn#34939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4403:353, offset: 0x010667eb, size: 48 bytes, params: 1, frame: 14
return env0_2(_fun34941).apply(this, arguments);
}
function _getPurchaseTokenHash() { // fn#34939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4403:353, offset: 0x010667eb, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun34941).apply(this, arguments);
function* _fun34941() { // fn#34941, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4403:418, offset: 0x01066824, size: 223 bytes, params: 1, frame: 19
var environment;
if (false) {
return undefined;
}
let Uint8Array = global.Uint8Array;
value = environment.__proto__.__proto__;
value = env2_5();
value = value.split('');
value = value.map(function(a0) {
return a0.charCodeAt(0);
});
let uint8Array = new Uint8Array(value);
const subtle = global.window.crypto.subtle;
yield subtle.digest({name: 'SHA-256'}, uint8Array);
if (false) {
return undefined;
}
const btoa = global.btoa;
const String = global.String;
const fromCharCode = String.fromCharCode;
Uint8Array = global.Uint8Array;
uint8Array = new Uint8Array(uint8Array);
items2 = [];
arraySpread(items2, uint8Array, 0, undefined);
return btoa(apply(fromCharCode, items2, String, undefined));
}
function* _fun34941() { // fn#34941, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4403:418, offset: 0x01066824, size: 223 bytes, params: 1, frame: 19
var environment;
if (false) {
return undefined;
}
let Uint8Array = global.Uint8Array;
value = environment.__proto__.__proto__;
value = env2_5();
value = value.split('');
value = value.map(function(a0) {
return a0.charCodeAt(0);
});
let uint8Array = new Uint8Array(value);
const subtle = global.window.crypto.subtle;
yield subtle.digest({name: 'SHA-256'}, uint8Array);
if (false) {
return undefined;
}
const btoa = global.btoa;
const String = global.String;
const fromCharCode = String.fromCharCode;
Uint8Array = global.Uint8Array;
uint8Array = new Uint8Array(uint8Array);
items = [];
arraySpread(items, uint8Array, 0, undefined);
return btoa(apply(fromCharCode, items, String, undefined));
}
global.__d(_fun34937, 4232, [5, 672, 587, 491, 2]) /* metro module 4232, dependencies: [5, 672, 587, 491, 2] */;
+4 -1
View File
@@ -1,11 +1,14 @@
/* Metro module 4099; source: utils/QueryStringUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun33612(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4257:6, offset: 0x01035d12, size: 85 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/QueryStringUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/QueryStringUtils.tsx');
exports.getFirstQueryStringValue = function(a0) {
var value = a0;
return global.Array.isArray(value) ? value[0] : value;
};
}
global.__d(_fun33612, 4099, [2]) /* metro module 4099, dependencies: [2] */;
+97 -93
View File
@@ -1,107 +1,111 @@
/* Metro module 5258; source: utils/Queue.tsx; dependencies: [6, 7, 3, 13, 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 * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun46768(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5436:6, offset: 0x011ae566, size: 174 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 */;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('Queue');
value = _fun46769();
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/Queue.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/Queue.tsx');
exports.default = value;
}
function _fun46769() { // fn#46769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5436:144, offset: 0x011ae614, size: 124 bytes, params: 1, frame: 15
return CreateClass(Queue, [{key: 'enqueue', value: function(a0, a1, a2) {
this.queue.push({message: a0, success: a1, logId: a2});
this._drainIfNecessary();
}}, {key: 'length', get: function() {
return this.queue.length;
}}, {key: '_drainIfNecessary', value: value_46773}, {key: 'clear', value: function() {
this.queue.clear();
global.clearTimeout(this.timeout);
this.timeout = null;
this.draining = false;
}}]);
function Queue() { // fn#46770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5436:165, offset: 0x011ae690, size: 125 bytes, params: 1, frame: 16
let value = a0;
const value2 = a1;
const r4 = value !== undefined ? value : env1_4;
const r3 = value2 !== undefined ? value2 : 100;
value = environment.__proto__;
env1_2(this, Queue);
this.logger = r4;
this.defaultRetryAfter = r3;
value = importDefault(13) /* metro dependency 13 */;
value = new value();
this.queue = value;
this.timeout = null;
this.draining = false;
}
function _fun46769() { // fn#46769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5436:144, offset: 0x011ae614, size: 124 bytes, params: 1, frame: 15
return env0_3(Queue, [{key: 'enqueue', value: function(a0, a1, a2) {
this.queue.push({message: a0, success: a1, logId: a2});
this._drainIfNecessary();
}}, {key: 'length', get: function() {
return this.queue.length;
}}, {key: '_drainIfNecessary', value: value_46773}, {key: 'clear', value: function() {
this.queue.clear();
global.clearTimeout(this.timeout);
this.timeout = null;
this.draining = false;
}}]);
}
function Queue() { // fn#46770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5436:165, offset: 0x011ae690, size: 125 bytes, params: 1, frame: 16
let value = a0;
const value2 = a1;
const r4 = value !== undefined ? value : env1_4;
const r3 = value2 !== undefined ? value2 : 100;
value = environment.__proto__;
env1_2(this, Queue);
this.logger = r4;
this.defaultRetryAfter = r3;
value = importDefault(13) /* metro dependency 13 */;
value = new value();
this.queue = value;
this.timeout = null;
this.draining = false;
}
function value_46773() { // fn#46773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5436:504, offset: 0x011ae757, size: 191 bytes, params: 1, frame: 20
var queue;
var value;
var message;
var success;
var logId;
var logger;
var log;
if (this.timeout === null) {
queue = this.queue;
if (queue.length !== 0) {
if (this.draining !== true) {
this.draining = true;
function value_46773() { // fn#46773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5436:504, offset: 0x011ae757, size: 191 bytes, params: 1, frame: 20
var queue;
var value;
var message;
var success;
var logId;
var logger;
var log;
if (this.timeout === null) {
queue = this.queue;
value = queue.shift();
message = value.message;
success = value.success;
logId = value.logId;
logger = this.logger;
log = logger.log;
queue = this.queue;
Reflect.apply(log, logger,
['Draining message from queue LogId:' + logId + ' QueueLength: ' + queue.length]);
this.drain(message, _fun46774);
if (queue.length !== 0) {
if (this.draining !== true) {
this.draining = true;
queue = this.queue;
value = queue.shift();
message = value.message;
success = value.success;
logId = value.logId;
logger = this.logger;
log = logger.log;
queue = this.queue;
Reflect.apply(log, logger,
['Draining message from queue LogId:' + logId + ' QueueLength: ' + queue.length]);
this.drain(message, _fun46774);
}
}
}
function _fun46774(a0, a1) { // fn#46774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5436:764, offset: 0x011ae816, size: 269 bytes, params: 3, frame: 26
var r8;
var error;
let binding = env0_0;
let logger = binding.logger;
logger.log('Finished draining message from queue LogId:' + logId + ' QueueLength: ' + binding.queue.length);
binding.draining = false;
if (a0 == null) {
global.setImmediate(_fun46775);
try {
success(a1);
} catch (error) {
logger = env0_0.logger;
logger.error('', error);
}
} else {
r8 = a0.retryAfter ?? env0_0.defaultRetryAfter;
binding = env0_0;
logger = binding.logger;
logger.info('Rate limited. Delaying draining of queue for ' + r8 + ' ms. LogId:' + logId + ' QueueLength: ' + binding.queue.length);
binding.timeout = global.setTimeout(_fun46776, r8);
}
function _fun46775() { // fn#46775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5436:916, offset: 0x011ae923, size: 19 bytes, params: 1, frame: 9
return env1_0._drainIfNecessary();
}
function _fun46776() { // fn#46776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5436:1195, offset: 0x011ae936, size: 50 bytes, params: 1, frame: 12
const binding = env1_0;
binding.queue.unshift(env1_1);
binding.timeout = null;
binding._drainIfNecessary();
}
}
}
}
}
function _fun46774(a0, a1) { // fn#46774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5436:764, offset: 0x011ae816, size: 269 bytes, params: 3, frame: 26
var r8;
var error;
let binding = env0_0;
let logger = binding.logger;
logger.log('Finished draining message from queue LogId:' + logId + ' QueueLength: ' + binding.queue.length);
binding.draining = false;
if (a0 == null) {
global.setImmediate(_fun46775);
try {
success(a1);
} catch (error) {
logger = env0_0.logger;
logger.error('', error);
}
} else {
r8 = a0.retryAfter ?? env0_0.defaultRetryAfter;
binding = env0_0;
logger = binding.logger;
logger.info('Rate limited. Delaying draining of queue for ' + r8 + ' ms. LogId:' + logId + ' QueueLength: ' + binding.queue.length);
binding.timeout = global.setTimeout(_fun46776, r8);
}
}
function _fun46775() { // fn#46775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5436:916, offset: 0x011ae923, size: 19 bytes, params: 1, frame: 9
return env1_0._drainIfNecessary();
}
function _fun46776() { // fn#46776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5436:1195, offset: 0x011ae936, size: 50 bytes, params: 1, frame: 12
const binding = env1_0;
binding.queue.unshift(env1_1);
binding.timeout = null;
binding._drainIfNecessary();
}
global.__d(_fun46768, 5258, [6, 7, 3, 13, 2]) /* metro module 5258, dependencies: [6, 7, 3, 13, 2] */;
+65 -64
View File
@@ -1,74 +1,75 @@
/* Metro module 10867; source: utils/RTCConnectionUtils.tsx; dependencies: [661, 1244, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun83281(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11053:6, offset: 0x01f1336f, size: 146 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_2 = constantsModule.RTCConnectionStates;
const env0_3 = constantsModule.ConnectionStatus;
object2 = {getStatus: getStatus, getShortHostname: function(a0) {
object = {getStatus: getStatus_83282, getShortHostname: function(a0) {
return a0 == null ? '' : a0.split('.')[0];
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/RTCConnectionUtils.tsx');
exports.default = object2;
}
function getStatus(a0) { // fn#83282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11053:168, offset: 0x01f13401, size: 929 bytes, params: 2, frame: 19
var r1;
var r2;
var ERROR;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var CONNECTED;
const value = a1;
let r3 = value !== undefined ? value : false;
let CONNECTING = RTCConnectionStates.CONNECTING;
if (CONNECTING === a0) {
CONNECTING = ConnectionStatus.CONNECTING;
r1 = intl.string(t.MzW9sN);
r2 = CONNECTING;
} else if (RTCConnectionStates.AUTHENTICATING === a0) {
CONNECTING = ConnectionStatus.CONNECTING;
r1 = intl.string(t.GxXwE2);
r2 = CONNECTING;
} else if (RTCConnectionStates.AWAITING_ENDPOINT === a0) {
CONNECTING = ConnectionStatus.CONNECTING;
r1 = intl.string(t.xEbu0Q);
r2 = CONNECTING;
} else if (RTCConnectionStates.RTC_CONNECTED === a0) {
CONNECTED = ConnectionStatus.CONNECTED;
string = intl.string;
r3 = r3 ? Reflect.apply(string, intl, [t.HtVOdd]) : Reflect.apply(string, intl, [t.daXg45]);
r1 = r3;
r2 = CONNECTED;
} else if (RTCConnectionStates.RTC_CONNECTING === a0) {
CONNECTING = ConnectionStatus.CONNECTING;
r1 = intl.string(t.Gp51dl);
r2 = CONNECTING;
} else if (RTCConnectionStates.ICE_CHECKING === a0) {
CONNECTING = ConnectionStatus.CONNECTING;
r1 = intl.string(t['rdCyA/']);
r2 = CONNECTING;
} else if (RTCConnectionStates.DTLS_CONNECTING === a0) {
CONNECTING = ConnectionStatus.CONNECTING;
r1 = intl.string(t.UvB3gV);
r2 = CONNECTING;
} else if (RTCConnectionStates.NO_ROUTE === a0) {
ERROR = ConnectionStatus.ERROR;
r1 = intl.string(t.mGhOIi);
r2 = ERROR;
} else if (RTCConnectionStates.RTC_DISCONNECTED === a0) {
ERROR = ConnectionStatus.ERROR;
r1 = intl.string(t.M7LDmE);
r2 = ERROR;
} else {
RTCConnectionStates.DISCONNECTED;
ERROR = ConnectionStatus.ERROR;
r1 = intl.string(t.NLKQbx);
r2 = ERROR;
(FileImportTrackerModule).fileFinishedImporting('utils/RTCConnectionUtils.tsx');
exports.default = object;
function getStatus_83282(a0) { // fn#83282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11053:168, offset: 0x01f13401, size: 929 bytes, params: 2, frame: 19
var r1;
var r2;
var ERROR;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var CONNECTED;
const value = a1;
let r3 = value !== undefined ? value : false;
let CONNECTING = RTCConnectionStates.CONNECTING;
if (CONNECTING === a0) {
CONNECTING = ConnectionStatus.CONNECTING;
r1 = intl.string(t.MzW9sN);
r2 = CONNECTING;
} else if (RTCConnectionStates.AUTHENTICATING === a0) {
CONNECTING = ConnectionStatus.CONNECTING;
r1 = intl.string(t.GxXwE2);
r2 = CONNECTING;
} else if (RTCConnectionStates.AWAITING_ENDPOINT === a0) {
CONNECTING = ConnectionStatus.CONNECTING;
r1 = intl.string(t.xEbu0Q);
r2 = CONNECTING;
} else if (RTCConnectionStates.RTC_CONNECTED === a0) {
CONNECTED = ConnectionStatus.CONNECTED;
string = intl.string;
r3 = r3 ? Reflect.apply(string, intl, [t.HtVOdd]) : Reflect.apply(string, intl, [t.daXg45]);
r1 = r3;
r2 = CONNECTED;
} else if (RTCConnectionStates.RTC_CONNECTING === a0) {
CONNECTING = ConnectionStatus.CONNECTING;
r1 = intl.string(t.Gp51dl);
r2 = CONNECTING;
} else if (RTCConnectionStates.ICE_CHECKING === a0) {
CONNECTING = ConnectionStatus.CONNECTING;
r1 = intl.string(t['rdCyA/']);
r2 = CONNECTING;
} else if (RTCConnectionStates.DTLS_CONNECTING === a0) {
CONNECTING = ConnectionStatus.CONNECTING;
r1 = intl.string(t.UvB3gV);
r2 = CONNECTING;
} else if (RTCConnectionStates.NO_ROUTE === a0) {
ERROR = ConnectionStatus.ERROR;
r1 = intl.string(t.mGhOIi);
r2 = ERROR;
} else if (RTCConnectionStates.RTC_DISCONNECTED === a0) {
ERROR = ConnectionStatus.ERROR;
r1 = intl.string(t.M7LDmE);
r2 = ERROR;
} else {
RTCConnectionStates.DISCONNECTED;
ERROR = ConnectionStatus.ERROR;
r1 = intl.string(t.NLKQbx);
r2 = ERROR;
}
return {connectionStatus: r2, connectionStatusText: r1};
}
return {connectionStatus: r2, connectionStatusText: r1};
}
global.__d(_fun83281, 10867, [661, 1244, 2]) /* metro module 10867, dependencies: [661, 1244, 2] */;
File diff suppressed because it is too large. Load diff
+4 -1
View File
@@ -1,10 +1,13 @@
/* Metro module 4100; source: utils/RegexUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun33614(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4258:6, offset: 0x01035d8a, size: 92 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/RegexUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/RegexUtils.tsx');
exports.default = {escape: function(a0) {
return a0.replace(RegExp('[-[\\]/{}()*+?.\\\\^$|]', 'g'), '\\$&');
}};
}
global.__d(_fun33614, 4100, [2]) /* metro module 4100, dependencies: [2] */;
+43 -36
View File
@@ -1,45 +1,52 @@
/* Metro module 15816; source: utils/RelationshipUtils.tsx; dependencies: [661, 13914, 1423, 1244, 15817, 4603, 2] */
import AvatarUtils from './AvatarUtils.tsx'; /* Metro dependency 1423 */
import ChannelActionCreators from '../actions/ChannelActionCreators.tsx'; /* Metro dependency 4603 */
import NotificationActionCreators from '../actions/NotificationActionCreators.tsx'; /* Metro dependency 13914 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun121553(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16024:6, offset: 0x0254aba3, size: 148 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).FriendsSections;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/RelationshipUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/RelationshipUtils.tsx');
exports.showPendingNotification = showPendingNotification;
exports.showAcceptedNotification = showAcceptedNotification;
function showNotification_121554(a0, a1, a2) { // fn#121554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16024:122, offset: 0x0254ac37, size: 114 bytes, params: 4, frame: 20
const showNotification = NotificationActionCreators.showNotification;
const userAvatarURL = (AvatarUtils).getUserAvatarURL(a0);
const username = a0.username;
Reflect.apply(showNotification, NotificationActionCreators, [userAvatarURL, username, a1, {}, {'omitViewTracking': true,
'omitClickTracking': true, 'tag': null, 'onClick': null, 'isUserAvatar': true, tag: a0.id, onClick: a2}]);
}
function showPendingNotification(a0) { // fn#121555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16024:390, offset: 0x0254aca9, size: 87 bytes, params: 2, frame: 17
const showNotification_121554Binding = showNotification_121554;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
showNotification_121554Binding(a0,
intl.string((require(1244) /* metro dependency 1244: indexNative */).t['t3+Af3']), function() {
var defaultImport = importDefault(dependencyMap[4]);
var PENDING = FriendsSections.PENDING;
defaultImport.transitionToSection(PENDING, {explicit: true});
});
}
function showAcceptedNotification(a0) { // fn#121557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16024:576, offset: 0x0254ad3a, size: 91 bytes, params: 2, frame: 19
const env0_0 = a0;
const showNotification_121554Binding = showNotification_121554;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const MYr3Ka = (IndexNativeModule).t.MYr3Ka;
showNotification_121554Binding(a0, Reflect.apply(string, intl, [MYr3Ka]), _fun121558);
function _fun121558() { // fn#121558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16024:671, offset: 0x0254ad95, size: 57 bytes, params: 1, frame: 13
const value = environment.__proto__;
(ChannelActionCreators).openPrivateChannel({recipientIds: env0_0.id});
}
}
}
function showNotification_121554(a0, a1, a2) { // fn#121554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16024:122, offset: 0x0254ac37, size: 114 bytes, params: 4, frame: 20
const value = importDefault(13914) /* metro dependency 13914: NotificationActionCreators */;
const showNotification = value.showNotification;
const userAvatarURL = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getUserAvatarURL(a0);
const username = a0.username;
Reflect.apply(showNotification, value, [userAvatarURL, username, a1, {}, {'omitViewTracking': true,
'omitClickTracking': true, 'tag': null, 'onClick': null, 'isUserAvatar': true, tag: a0.id, onClick: a2}]);
}
function showPendingNotification(a0) { // fn#121555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16024:390, offset: 0x0254aca9, size: 87 bytes, params: 2, frame: 17
const showNotification_121554Binding = showNotification_121554;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
showNotification_121554Binding(a0,
intl.string((require(1244) /* metro dependency 1244: indexNative */).t['t3+Af3']), function() {
var defaultImport = importDefault(dependencyMap[4]);
var PENDING = FriendsSections.PENDING;
defaultImport.transitionToSection(PENDING, {explicit: true});
});
}
function showAcceptedNotification(a0) { // fn#121557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16024:576, offset: 0x0254ad3a, size: 91 bytes, params: 2, frame: 19
const env0_0 = a0;
const showNotification_121554Binding = showNotification_121554;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const MYr3Ka = (require(1244) /* metro dependency 1244: indexNative */).t.MYr3Ka;
showNotification_121554Binding(a0, Reflect.apply(string, intl, [MYr3Ka]), _fun121558);
}
function _fun121558() { // fn#121558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16024:671, offset: 0x0254ad95, size: 57 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(4603) /* metro dependency 4603: ChannelActionCreators */).openPrivateChannel({recipientIds: env0_0.id});
}
global.__d(_fun121553, 15816, [661, 13914, 1423, 1244, 15817, 4603,
2]) /* metro module 15816, dependencies: [661, 13914, 1423, 1244, 15817, 4603, 2] */;
+6 -2
View File
@@ -1,9 +1,12 @@
/* Metro module 4827; source: utils/ReleaseChannelUtils.native.tsx; dependencies: [1582, 477, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ClientInfoUtilsModule from './native/ClientInfoUtils.tsx'; /* Metro dependency 1582 */
function _fun42096(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5005:6, offset: 0x011302bb, size: 265 bytes, params: 8, frame: 21
var r7;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(1582) /* metro dependency 1582: ClientInfoUtils */;
let value = ClientInfoUtilsModule;
const getConstants = value.getConstants;
const ReleaseChannel = Reflect.apply(getConstants, value, []).ReleaseChannel;
value = require(477) /* metro dependency 477: PlatformUtils */;
@@ -21,8 +24,9 @@ function _fun42096(global, require, importDefault, importAll, module, exports, d
r7 = value;
}
const r3 = !(ReleaseChannel.indexOf('debug') !== -1 || ReleaseChannel.indexOf('developer') !== -1) && (ReleaseChannel === 'stable' || r7);
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ReleaseChannelUtils.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/ReleaseChannelUtils.native.tsx');
exports.isStable = r3;
exports.CurrentReleaseChannel = ReleaseChannel;
}
global.__d(_fun42096, 4827, [1582, 477, 2]) /* metro module 4827, dependencies: [1582, 477, 2] */;
+62 -57
View File
@@ -1,71 +1,76 @@
/* Metro module 6894; source: utils/ReportUtils.tsx; dependencies: [1379, 4111, 3784, 1878, 661, 2] */
import ChannelStore from '../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PermissionStore from '../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import GuildMemberCountStore from '../stores/GuildMemberCountStore.tsx'; /* Metro dependency 4111 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun54740(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7072:6, offset: 0x0136d164, size: 233 bytes, params: 8, frame: 22
const closure = canReportUser;
const closure2 = canReportMessage;
const closure3 = canReportAndDeleteInChannel;
const canReportUser2 = canReportUser;
const canReportMessage2 = canReportMessage;
const canReportAndDeleteInChannel2 = canReportAndDeleteInChannel;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberCountStore = importDefault(4111) /* metro dependency 4111: GuildMemberCountStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.ChannelTypes;
const env0_5 = constantsModule.Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/ReportUtils.tsx');
exports.canReportUser = closure;
exports.canReportMessage = closure2;
exports.canReportAndDeleteInChannel = closure3;
(FileImportTrackerModule).fileFinishedImporting('utils/ReportUtils.tsx');
exports.canReportUser = canReportUser2;
exports.canReportMessage = canReportMessage2;
exports.canReportAndDeleteInChannel = canReportAndDeleteInChannel2;
exports.canDeleteAndReportMessage = canDeleteAndReportMessage;
}
function canReportUser(a0) { // fn#54741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7072:179, offset: 0x0136d24d, size: 70 bytes, params: 2, frame: 12
if (a0 == null) {
return false;
}
const id = a0.id;
const currentUser = UserStore.getCurrentUser();
return currentUser != null && (currentUser.id !== id && a0.system !== true);
}
function canReportUser(a0) { // fn#54741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7072:179, offset: 0x0136d24d, size: 70 bytes, params: 2, frame: 12
if (a0 == null) {
function canReportMessage(a0) { // fn#54742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7072:299, offset: 0x0136d293, size: 34 bytes, params: 2, frame: 12
return a0 != null && canReportUser(a0.author);
}
function canReportAndDeleteInChannel(a0) { // fn#54743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7072:368, offset: 0x0136d2b5, size: 155 bytes, params: 2, frame: 17
var guildMemberCountStoreBinding;
var value;
const channel = ChannelStore.getChannel(a0);
if (channel != null) {
var type = channel.type;
var DM = ChannelTypes.DM;
if (type === DM) {
return true;
}
type = channel.type;
var GROUP_DM = ChannelTypes.GROUP_DM;
if (type === GROUP_DM) {
return true;
}
var permissionStoreBinding = PermissionStore;
var canWithPartialContext = permissionStoreBinding.canWithPartialContext;
var MANAGE_MESSAGES = Permissions.MANAGE_MESSAGES;
if (Reflect.apply(canWithPartialContext, permissionStoreBinding, [MANAGE_MESSAGES, {channelId: a0}])) {
guildMemberCountStoreBinding = GuildMemberCountStore;
value = guildMemberCountStoreBinding.getMemberCount(channel.getGuildId());
return value != null && value >= 50;
}
}
return false;
}
const id = a0.id;
const currentUser = UserStore.getCurrentUser();
return currentUser != null && (currentUser.id !== id && a0.system !== true);
}
function canReportMessage(a0) { // fn#54742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7072:299, offset: 0x0136d293, size: 34 bytes, params: 2, frame: 12
return a0 != null && canReportUser(a0.author);
}
function canReportAndDeleteInChannel(a0) { // fn#54743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7072:368, offset: 0x0136d2b5, size: 155 bytes, params: 2, frame: 17
var value;
const channel = ChannelStore.getChannel(a0);
if (channel != null) {
var type = channel.type;
var DM = ChannelTypes.DM;
if (type === DM) {
return true;
}
type = channel.type;
var GROUP_DM = ChannelTypes.GROUP_DM;
if (type === GROUP_DM) {
return true;
}
var canWithPartialContext = PermissionStore.canWithPartialContext;
var MANAGE_MESSAGES = Permissions.MANAGE_MESSAGES;
if (Reflect.apply(canWithPartialContext, PermissionStore, [MANAGE_MESSAGES, {channelId: a0}])) {
value = GuildMemberCountStore.getMemberCount(channel.getGuildId());
return value != null && value >= 50;
function canDeleteAndReportMessage(a0) { // fn#54744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7072:835, offset: 0x0136d350, size: 55 bytes, params: 2, frame: 12
var canReportAndDeleteInChannelBinding;
let value = a0 != null;
let r0 = value && canReportMessage(a0);
if (r0) {
canReportAndDeleteInChannelBinding = canReportAndDeleteInChannel;
value = a0.getChannelId();
value = canReportAndDeleteInChannelBinding(value);
r0 = value;
}
return r0;
}
return false;
}
function canDeleteAndReportMessage(a0) { // fn#54744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7072:835, offset: 0x0136d350, size: 55 bytes, params: 2, frame: 12
var canReportAndDeleteInChannelBinding;
let value = a0 != null;
let r0 = value && canReportMessage(a0);
if (r0) {
canReportAndDeleteInChannelBinding = canReportAndDeleteInChannel;
value = a0.getChannelId();
value = canReportAndDeleteInChannelBinding(value);
r0 = value;
}
return r0;
}
global.__d(_fun54740, 6894, [1379, 4111, 3784, 1878, 661,
2]) /* metro module 6894, dependencies: [1379, 4111, 3784, 1878, 661, 2] */;
+363 -353
View File
@@ -1,10 +1,17 @@
/* Metro module 9991; source: utils/SKUUtils.tsx; dependencies: [57, 661, 3974, 1244, 4141, 477, 3738, 2] */
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlatformUtilsModule from './PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as MatchPathCompatModule from '../modules/routing/matchPathCompat.tsx'; /* Metro dependency 3974 */
import * as StoreUtilsModule from './StoreUtils.tsx'; /* Metro dependency 4141 */
function _fun78099(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10177:6, offset: 0x01e1914c, size: 427 bytes, params: 8, frame: 21
const env0_0 = require;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const GameGenres = value.GameGenres;
const env0_5 = value.SKUTypes;
const env0_6 = value.Routes;
@@ -20,7 +27,7 @@ function _fun78099(global, require, importDefault, importAll, module, exports, d
value = Object.keys(value);
value.forEach(_fun78100);
object = [['YYYY-MM-DD', 'MMMM DD, Y'], ['YYYY-MM', 'MMMM Y'], ['MM-DD', 'MMMM DD'], ['MM', 'MMMM'], ['YYYY', 'Y']];
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/SKUUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/SKUUtils.tsx');
exports.getSKUIdFromURL = getSKUIdFromURL;
exports.getGenreURLSlugFromId = getGenreURLSlugFromId;
exports.getGenreIdFromURLSlug = getGenreIdFromURLSlug;
@@ -30,361 +37,364 @@ function _fun78099(global, require, importDefault, importAll, module, exports, d
exports.isThirdPartySKU = function(a0) {
return a0 === SKUProductLines.SOCIAL_LAYER_GAME_ITEM;
};
}
function _fun78100(a0) { // fn#78100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10177:242, offset: 0x01e192f7, size: 73 bytes, params: 2, frame: 14
let value = a0.toLowerCase();
value = value.replace(RegExp('_', 'g'), '-');
const property = env0_10[a0];
env0_8[value] = property;
env0_9[property] = value;
}
function _fun78100(a0) { // fn#78100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10177:242, offset: 0x01e192f7, size: 73 bytes, params: 2, frame: 14
let value = a0.toLowerCase();
value = value.replace(RegExp('_', 'g'), '-');
const property = env0_10[a0];
env0_8[value] = property;
env0_9[property] = value;
}
function getSKUIdFromURL(a0) { // fn#78101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10177:484, offset: 0x01e19340, size: 97 bytes, params: 2, frame: 16
const matchPath = MatchPathCompatModule.matchPath;
const object = {};
object.path = Routes.APPLICATION_STORE_LISTING_SKU(':skuId', ':slug');
const value = Reflect.apply(matchPath, MatchPathCompatModule, [a0, object]);
const value2 = null;
return value2 != value ? value.params.skuId : value2;
}
function getSKUIdFromURL(a0) { // fn#78101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10177:484, offset: 0x01e19340, size: 97 bytes, params: 2, frame: 16
const matchPathCompatModule = require(3974) /* metro dependency 3974: matchPathCompat */;
const matchPath = matchPathCompatModule.matchPath;
const object2 = {};
object2.path = Routes.APPLICATION_STORE_LISTING_SKU(':skuId', ':slug');
const value = Reflect.apply(matchPath, matchPathCompatModule, [a0, object2]);
const value2 = null;
return value2 != value ? value.params.skuId : value2;
}
function getGenreURLSlugFromId(a0) { // fn#78102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10177:656, offset: 0x01e193a1, size: 16 bytes, params: 2, frame: 2
return env0_9[a0];
}
function getGenreURLSlugFromId(a0) { // fn#78102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10177:656, offset: 0x01e193a1, size: 16 bytes, params: 2, frame: 2
return env0_9[a0];
}
function getGenreIdFromURLSlug(a0) { // fn#78103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10177:727, offset: 0x01b5a1f5, size: 16 bytes, params: 2, frame: 2
return env0_8[a0];
}
function getGenreText(a0) { // fn#78104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10177:789, offset: 0x01e193b1, size: 5446 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const ACTION = GameGenres.ACTION;
if (ACTION === a0) {
return intl.string(t['1o2/IM']);
}
const ACTION_RPG = GameGenres.ACTION_RPG;
if (ACTION_RPG === a0) {
return intl.string(t.e9Yo4H);
}
const BRAWLER = GameGenres.BRAWLER;
if (BRAWLER === a0) {
return intl.string(t.WCkEjT);
}
const HACK_AND_SLASH = GameGenres.HACK_AND_SLASH;
if (HACK_AND_SLASH === a0) {
return intl.string(t.xQ4VmK);
}
const PLATFORMER = GameGenres.PLATFORMER;
if (PLATFORMER === a0) {
return intl.string(t.WA3189);
}
const STEALTH = GameGenres.STEALTH;
if (STEALTH === a0) {
return intl.string(t['6UPFdw']);
}
const SURVIVAL = GameGenres.SURVIVAL;
if (SURVIVAL === a0) {
return intl.string(t.SVPCt9);
}
const ADVENTURE = GameGenres.ADVENTURE;
if (ADVENTURE === a0) {
return intl.string(t['15p8on']);
}
const ACTION_ADVENTURE = GameGenres.ACTION_ADVENTURE;
if (ACTION_ADVENTURE === a0) {
return intl.string(t.AxkUBp);
}
const METROIDVANIA = GameGenres.METROIDVANIA;
if (METROIDVANIA === a0) {
return intl.string(t.Iwr38m);
}
const OPEN_WORLD = GameGenres.OPEN_WORLD;
if (OPEN_WORLD === a0) {
return intl.string(t['2HRHJO']);
}
const PSYCHOLOGICAL_HORROR = GameGenres.PSYCHOLOGICAL_HORROR;
if (PSYCHOLOGICAL_HORROR === a0) {
return intl.string(t['/IwK3s']);
}
const SANDBOX = GameGenres.SANDBOX;
if (SANDBOX === a0) {
return intl.string(t['2+Vu4Q']);
}
const SURVIVAL_HORROR = GameGenres.SURVIVAL_HORROR;
if (SURVIVAL_HORROR === a0) {
return intl.string(t.CCzRiK);
}
const VISUAL_NOVEL = GameGenres.VISUAL_NOVEL;
if (VISUAL_NOVEL === a0) {
return intl.string(t.FE7rnk);
}
const DRIVING_RACING = GameGenres.DRIVING_RACING;
if (DRIVING_RACING === a0) {
return intl.string(t.Erzgca);
}
const VEHICULAR_COMBAT = GameGenres.VEHICULAR_COMBAT;
if (VEHICULAR_COMBAT === a0) {
return intl.string(t.YQHhog);
}
const MASSIVELY_MULTIPLAYER = GameGenres.MASSIVELY_MULTIPLAYER;
if (MASSIVELY_MULTIPLAYER === a0) {
return intl.string(t['5CNg1o']);
}
const MMORPG = GameGenres.MMORPG;
if (MMORPG === a0) {
return intl.string(t['c4NuO/']);
}
const ROLE_PLAYING = GameGenres.ROLE_PLAYING;
if (ROLE_PLAYING === a0) {
return intl.string(t.yayVgs);
}
const DUNGEON_CRAWLER = GameGenres.DUNGEON_CRAWLER;
if (DUNGEON_CRAWLER === a0) {
return intl.string(t.qicemc);
}
const ROGUELIKE = GameGenres.ROGUELIKE;
if (ROGUELIKE === a0) {
return intl.string(t.zWzaCv);
}
const SHOOTER = GameGenres.SHOOTER;
if (SHOOTER === a0) {
return intl.string(t['+pk6sd']);
}
const LIGHT_GUN = GameGenres.LIGHT_GUN;
if (LIGHT_GUN === a0) {
return intl.string(t.TDS96y);
}
const SHOOT_EM_UP = GameGenres.SHOOT_EM_UP;
if (SHOOT_EM_UP === a0) {
return intl.string(t.wltDUE);
}
const FPS = GameGenres.FPS;
if (FPS === a0) {
return intl.string(t.olTaq4);
}
const DUAL_JOYSTICK_SHOOTER = GameGenres.DUAL_JOYSTICK_SHOOTER;
if (DUAL_JOYSTICK_SHOOTER === a0) {
return intl.string(t['SN+NS3']);
}
const SIMULATION = GameGenres.SIMULATION;
if (SIMULATION === a0) {
return intl.string(t.sxMPdm);
}
const FLIGHT_SIMULATOR = GameGenres.FLIGHT_SIMULATOR;
if (FLIGHT_SIMULATOR === a0) {
return intl.string(t['Q7msr+']);
}
const TRAIN_SIMULATOR = GameGenres.TRAIN_SIMULATOR;
if (TRAIN_SIMULATOR === a0) {
return intl.string(t.ZtECf3);
}
const LIFE_SIMULATOR = GameGenres.LIFE_SIMULATOR;
if (LIFE_SIMULATOR === a0) {
return intl.string(t.byt5Fo);
}
const FISHING = GameGenres.FISHING;
if (FISHING === a0) {
return intl.string(t.BKwiwY);
}
const SPORTS = GameGenres.SPORTS;
if (SPORTS === a0) {
return intl.string(t.O0B7XM);
}
const BASEBALL = GameGenres.BASEBALL;
if (BASEBALL === a0) {
return intl.string(t['jPYb/z']);
}
const BASKETBALL = GameGenres.BASKETBALL;
if (BASKETBALL === a0) {
return intl.string(t['o+D1Bm']);
}
const BILLIARDS = GameGenres.BILLIARDS;
if (BILLIARDS === a0) {
return intl.string(t.PJ5o4E);
}
const BOWLING = GameGenres.BOWLING;
if (BOWLING === a0) {
return intl.string(t['82afJw']);
}
const BOXING = GameGenres.BOXING;
if (BOXING === a0) {
return intl.string(t.DQvfei);
}
const FOOTBALL = GameGenres.FOOTBALL;
if (FOOTBALL === a0) {
return intl.string(t.slOYkj);
}
const GOLF = GameGenres.GOLF;
if (GOLF === a0) {
return intl.string(t.aeQPlG);
}
const HOCKEY = GameGenres.HOCKEY;
if (HOCKEY === a0) {
return intl.string(t.g7oe5X);
}
const SKATEBOARDING_SKATING = GameGenres.SKATEBOARDING_SKATING;
if (SKATEBOARDING_SKATING === a0) {
return intl.string(t.yBDEP0);
}
const SNOWBOARDING_SKIING = GameGenres.SNOWBOARDING_SKIING;
if (SNOWBOARDING_SKIING === a0) {
return intl.string(t.GVaAci);
}
const SOCCER = GameGenres.SOCCER;
if (SOCCER === a0) {
return intl.string(t.KPznxl);
}
const TRACK_FIELD = GameGenres.TRACK_FIELD;
if (TRACK_FIELD === a0) {
return intl.string(t['hJ62Q/']);
}
const SURFING_WAKEBOARDING = GameGenres.SURFING_WAKEBOARDING;
if (SURFING_WAKEBOARDING === a0) {
return intl.string(t.PSh0CV);
}
const WRESTLING = GameGenres.WRESTLING;
if (WRESTLING === a0) {
return intl.string(t['3y9hAT']);
}
const STRATEGY = GameGenres.STRATEGY;
if (STRATEGY === a0) {
return intl.string(t.KovTD8);
}
const FOUR_X = GameGenres.FOUR_X;
if (FOUR_X === a0) {
return intl.string(t['19h4dX']);
}
const ARTILLERY = GameGenres.ARTILLERY;
if (ARTILLERY === a0) {
return intl.string(t.sBqLsP);
}
const RTS = GameGenres.RTS;
if (RTS === a0) {
return intl.string(t.yS4ddj);
}
const TOWER_DEFENSE = GameGenres.TOWER_DEFENSE;
if (TOWER_DEFENSE === a0) {
return intl.string(t.SULyIO);
}
const TURN_BASED_STRATEGY = GameGenres.TURN_BASED_STRATEGY;
if (TURN_BASED_STRATEGY === a0) {
return intl.string(t.VDsbru);
}
const WARGAME = GameGenres.WARGAME;
if (WARGAME === a0) {
return intl.string(t.YDCIrO);
}
const MOBA = GameGenres.MOBA;
if (MOBA === a0) {
return intl.string(t.i1m1t8);
}
const FIGHTING = GameGenres.FIGHTING;
if (FIGHTING === a0) {
return intl.string(t.KepcSI);
}
const PUZZLE = GameGenres.PUZZLE;
if (PUZZLE === a0) {
return intl.string(t.rm7Ggs);
}
const CARD_GAME = GameGenres.CARD_GAME;
if (CARD_GAME === a0) {
return intl.string(t.kX85vy);
}
const EDUCATION = GameGenres.EDUCATION;
if (EDUCATION === a0) {
return intl.string(t.klIi67);
}
const FITNESS = GameGenres.FITNESS;
if (FITNESS === a0) {
return intl.string(t.GOaaFb);
}
const GAMBLING = GameGenres.GAMBLING;
if (GAMBLING === a0) {
return intl.string(t['X8/Ee9']);
}
const MUSIC_RHYTHM = GameGenres.MUSIC_RHYTHM;
if (MUSIC_RHYTHM === a0) {
return intl.string(t.qPgrgw);
}
const PARTY_MINI_GAME = GameGenres.PARTY_MINI_GAME;
if (PARTY_MINI_GAME === a0) {
return intl.string(t.diBclF);
}
const PINBALL = GameGenres.PINBALL;
if (PINBALL === a0) {
return intl.string(t['1+ottx']);
}
const TRIVIA_BOARD_GAME = GameGenres.TRIVIA_BOARD_GAME;
if (TRIVIA_BOARD_GAME === a0) {
return intl.string(t.aLlxjC);
}
const TACTICAL = GameGenres.TACTICAL;
if (TACTICAL === a0) {
return intl.string(t.LRPgbt);
}
const INDIE = GameGenres.INDIE;
if (INDIE === a0) {
return intl.string(t.hz9Xvj);
}
const ARCADE = GameGenres.ARCADE;
if (ARCADE === a0) {
return intl.string(t.Sbxowr);
}
const POINT_AND_CLICK = GameGenres.POINT_AND_CLICK;
if (POINT_AND_CLICK === a0) {
return intl.string(t.vcerEn);
}
return intl.string(t['9b4eUr']);
}
function canUserInstall(a0) { // fn#78105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10177:5333, offset: 0x01e1a8f7, size: 112 bytes, params: 2, frame: 16
const storeUtilsModule = require(4141) /* metro dependency 4141: StoreUtils */;
const nativePlatformTypeToSKUOperatingSystem = storeUtilsModule.nativePlatformTypeToSKUOperatingSystem;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const getPlatform = platformUtilsModule.getPlatform;
const value2 = Reflect.apply(nativePlatformTypeToSKUOperatingSystem, storeUtilsModule, [Reflect.apply(getPlatform,
platformUtilsModule, [])]);
const type = a0.type;
const DURABLE_PRIMARY = SKUTypes.DURABLE_PRIMARY;
return type === DURABLE_PRIMARY && value2 != null && a0.supportedOperatingSystems.includes(value2);
}
function getReadablePreorderReleaseDate({preorderReleaseAt, preorderApproximateReleaseDate}) { // fn#78106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10177:5554, offset: 0x01e1a967, size: 180 bytes, params: 2, frame: 25
var r6;
var binding;
var value3;
var property;
var property2;
var value4;
var isValid;
var value5;
if (preorderReleaseAt != null) {
return preorderReleaseAt.format('MMMM DD');
}
if (preorderApproximateReleaseDate == null) {
return null;
}
let length = env0_11.length;
if (0 < length) {
r6 = 0;
loopExit3: while (true) {
binding = env0_3;
value3 = binding(env0_11[r6], 2);
property = value3[0];
property2 = value3[1];
value4 = (importDefault(3738) /* metro dependency 3738 */)(preorderApproximateReleaseDate, property, true);
isValid = value4.isValid;
if (Reflect.apply(isValid, value4, [])) {
return value4.format(property2);
}
value5 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
length = env0_11.length;
if (value5 < length) {
r6 = value5;
continue;
}
break loopExit3;
function getGenreText(a0) { // fn#78104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10177:789, offset: 0x01e193b1, size: 5446 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const ACTION = GameGenres.ACTION;
if (ACTION === a0) {
return intl.string(t['1o2/IM']);
}
const ACTION_RPG = GameGenres.ACTION_RPG;
if (ACTION_RPG === a0) {
return intl.string(t.e9Yo4H);
}
const BRAWLER = GameGenres.BRAWLER;
if (BRAWLER === a0) {
return intl.string(t.WCkEjT);
}
const HACK_AND_SLASH = GameGenres.HACK_AND_SLASH;
if (HACK_AND_SLASH === a0) {
return intl.string(t.xQ4VmK);
}
const PLATFORMER = GameGenres.PLATFORMER;
if (PLATFORMER === a0) {
return intl.string(t.WA3189);
}
const STEALTH = GameGenres.STEALTH;
if (STEALTH === a0) {
return intl.string(t['6UPFdw']);
}
const SURVIVAL = GameGenres.SURVIVAL;
if (SURVIVAL === a0) {
return intl.string(t.SVPCt9);
}
const ADVENTURE = GameGenres.ADVENTURE;
if (ADVENTURE === a0) {
return intl.string(t['15p8on']);
}
const ACTION_ADVENTURE = GameGenres.ACTION_ADVENTURE;
if (ACTION_ADVENTURE === a0) {
return intl.string(t.AxkUBp);
}
const METROIDVANIA = GameGenres.METROIDVANIA;
if (METROIDVANIA === a0) {
return intl.string(t.Iwr38m);
}
const OPEN_WORLD = GameGenres.OPEN_WORLD;
if (OPEN_WORLD === a0) {
return intl.string(t['2HRHJO']);
}
const PSYCHOLOGICAL_HORROR = GameGenres.PSYCHOLOGICAL_HORROR;
if (PSYCHOLOGICAL_HORROR === a0) {
return intl.string(t['/IwK3s']);
}
const SANDBOX = GameGenres.SANDBOX;
if (SANDBOX === a0) {
return intl.string(t['2+Vu4Q']);
}
const SURVIVAL_HORROR = GameGenres.SURVIVAL_HORROR;
if (SURVIVAL_HORROR === a0) {
return intl.string(t.CCzRiK);
}
const VISUAL_NOVEL = GameGenres.VISUAL_NOVEL;
if (VISUAL_NOVEL === a0) {
return intl.string(t.FE7rnk);
}
const DRIVING_RACING = GameGenres.DRIVING_RACING;
if (DRIVING_RACING === a0) {
return intl.string(t.Erzgca);
}
const VEHICULAR_COMBAT = GameGenres.VEHICULAR_COMBAT;
if (VEHICULAR_COMBAT === a0) {
return intl.string(t.YQHhog);
}
const MASSIVELY_MULTIPLAYER = GameGenres.MASSIVELY_MULTIPLAYER;
if (MASSIVELY_MULTIPLAYER === a0) {
return intl.string(t['5CNg1o']);
}
const MMORPG = GameGenres.MMORPG;
if (MMORPG === a0) {
return intl.string(t['c4NuO/']);
}
const ROLE_PLAYING = GameGenres.ROLE_PLAYING;
if (ROLE_PLAYING === a0) {
return intl.string(t.yayVgs);
}
const DUNGEON_CRAWLER = GameGenres.DUNGEON_CRAWLER;
if (DUNGEON_CRAWLER === a0) {
return intl.string(t.qicemc);
}
const ROGUELIKE = GameGenres.ROGUELIKE;
if (ROGUELIKE === a0) {
return intl.string(t.zWzaCv);
}
const SHOOTER = GameGenres.SHOOTER;
if (SHOOTER === a0) {
return intl.string(t['+pk6sd']);
}
const LIGHT_GUN = GameGenres.LIGHT_GUN;
if (LIGHT_GUN === a0) {
return intl.string(t.TDS96y);
}
const SHOOT_EM_UP = GameGenres.SHOOT_EM_UP;
if (SHOOT_EM_UP === a0) {
return intl.string(t.wltDUE);
}
const FPS = GameGenres.FPS;
if (FPS === a0) {
return intl.string(t.olTaq4);
}
const DUAL_JOYSTICK_SHOOTER = GameGenres.DUAL_JOYSTICK_SHOOTER;
if (DUAL_JOYSTICK_SHOOTER === a0) {
return intl.string(t['SN+NS3']);
}
const SIMULATION = GameGenres.SIMULATION;
if (SIMULATION === a0) {
return intl.string(t.sxMPdm);
}
const FLIGHT_SIMULATOR = GameGenres.FLIGHT_SIMULATOR;
if (FLIGHT_SIMULATOR === a0) {
return intl.string(t['Q7msr+']);
}
const TRAIN_SIMULATOR = GameGenres.TRAIN_SIMULATOR;
if (TRAIN_SIMULATOR === a0) {
return intl.string(t.ZtECf3);
}
const LIFE_SIMULATOR = GameGenres.LIFE_SIMULATOR;
if (LIFE_SIMULATOR === a0) {
return intl.string(t.byt5Fo);
}
const FISHING = GameGenres.FISHING;
if (FISHING === a0) {
return intl.string(t.BKwiwY);
}
const SPORTS = GameGenres.SPORTS;
if (SPORTS === a0) {
return intl.string(t.O0B7XM);
}
const BASEBALL = GameGenres.BASEBALL;
if (BASEBALL === a0) {
return intl.string(t['jPYb/z']);
}
const BASKETBALL = GameGenres.BASKETBALL;
if (BASKETBALL === a0) {
return intl.string(t['o+D1Bm']);
}
const BILLIARDS = GameGenres.BILLIARDS;
if (BILLIARDS === a0) {
return intl.string(t.PJ5o4E);
}
const BOWLING = GameGenres.BOWLING;
if (BOWLING === a0) {
return intl.string(t['82afJw']);
}
const BOXING = GameGenres.BOXING;
if (BOXING === a0) {
return intl.string(t.DQvfei);
}
const FOOTBALL = GameGenres.FOOTBALL;
if (FOOTBALL === a0) {
return intl.string(t.slOYkj);
}
const GOLF = GameGenres.GOLF;
if (GOLF === a0) {
return intl.string(t.aeQPlG);
}
const HOCKEY = GameGenres.HOCKEY;
if (HOCKEY === a0) {
return intl.string(t.g7oe5X);
}
const SKATEBOARDING_SKATING = GameGenres.SKATEBOARDING_SKATING;
if (SKATEBOARDING_SKATING === a0) {
return intl.string(t.yBDEP0);
}
const SNOWBOARDING_SKIING = GameGenres.SNOWBOARDING_SKIING;
if (SNOWBOARDING_SKIING === a0) {
return intl.string(t.GVaAci);
}
const SOCCER = GameGenres.SOCCER;
if (SOCCER === a0) {
return intl.string(t.KPznxl);
}
const TRACK_FIELD = GameGenres.TRACK_FIELD;
if (TRACK_FIELD === a0) {
return intl.string(t['hJ62Q/']);
}
const SURFING_WAKEBOARDING = GameGenres.SURFING_WAKEBOARDING;
if (SURFING_WAKEBOARDING === a0) {
return intl.string(t.PSh0CV);
}
const WRESTLING = GameGenres.WRESTLING;
if (WRESTLING === a0) {
return intl.string(t['3y9hAT']);
}
const STRATEGY = GameGenres.STRATEGY;
if (STRATEGY === a0) {
return intl.string(t.KovTD8);
}
const FOUR_X = GameGenres.FOUR_X;
if (FOUR_X === a0) {
return intl.string(t['19h4dX']);
}
const ARTILLERY = GameGenres.ARTILLERY;
if (ARTILLERY === a0) {
return intl.string(t.sBqLsP);
}
const RTS = GameGenres.RTS;
if (RTS === a0) {
return intl.string(t.yS4ddj);
}
const TOWER_DEFENSE = GameGenres.TOWER_DEFENSE;
if (TOWER_DEFENSE === a0) {
return intl.string(t.SULyIO);
}
const TURN_BASED_STRATEGY = GameGenres.TURN_BASED_STRATEGY;
if (TURN_BASED_STRATEGY === a0) {
return intl.string(t.VDsbru);
}
const WARGAME = GameGenres.WARGAME;
if (WARGAME === a0) {
return intl.string(t.YDCIrO);
}
const MOBA = GameGenres.MOBA;
if (MOBA === a0) {
return intl.string(t.i1m1t8);
}
const FIGHTING = GameGenres.FIGHTING;
if (FIGHTING === a0) {
return intl.string(t.KepcSI);
}
const PUZZLE = GameGenres.PUZZLE;
if (PUZZLE === a0) {
return intl.string(t.rm7Ggs);
}
const CARD_GAME = GameGenres.CARD_GAME;
if (CARD_GAME === a0) {
return intl.string(t.kX85vy);
}
const EDUCATION = GameGenres.EDUCATION;
if (EDUCATION === a0) {
return intl.string(t.klIi67);
}
const FITNESS = GameGenres.FITNESS;
if (FITNESS === a0) {
return intl.string(t.GOaaFb);
}
const GAMBLING = GameGenres.GAMBLING;
if (GAMBLING === a0) {
return intl.string(t['X8/Ee9']);
}
const MUSIC_RHYTHM = GameGenres.MUSIC_RHYTHM;
if (MUSIC_RHYTHM === a0) {
return intl.string(t.qPgrgw);
}
const PARTY_MINI_GAME = GameGenres.PARTY_MINI_GAME;
if (PARTY_MINI_GAME === a0) {
return intl.string(t.diBclF);
}
const PINBALL = GameGenres.PINBALL;
if (PINBALL === a0) {
return intl.string(t['1+ottx']);
}
const TRIVIA_BOARD_GAME = GameGenres.TRIVIA_BOARD_GAME;
if (TRIVIA_BOARD_GAME === a0) {
return intl.string(t.aLlxjC);
}
const TACTICAL = GameGenres.TACTICAL;
if (TACTICAL === a0) {
return intl.string(t.LRPgbt);
}
const INDIE = GameGenres.INDIE;
if (INDIE === a0) {
return intl.string(t.hz9Xvj);
}
const ARCADE = GameGenres.ARCADE;
if (ARCADE === a0) {
return intl.string(t.Sbxowr);
}
const POINT_AND_CLICK = GameGenres.POINT_AND_CLICK;
if (POINT_AND_CLICK === a0) {
return intl.string(t.vcerEn);
}
return intl.string(t['9b4eUr']);
}
return preorderApproximateReleaseDate;
function canUserInstall(a0) { // fn#78105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10177:5333, offset: 0x01e1a8f7, size: 112 bytes, params: 2, frame: 16
const nativePlatformTypeToSKUOperatingSystem = StoreUtilsModule.nativePlatformTypeToSKUOperatingSystem;
const getPlatform = PlatformUtilsModule.getPlatform;
const value2 = Reflect.apply(nativePlatformTypeToSKUOperatingSystem, StoreUtilsModule, [Reflect.apply(getPlatform,
PlatformUtilsModule, [])]);
const type = a0.type;
const DURABLE_PRIMARY = SKUTypes.DURABLE_PRIMARY;
return type === DURABLE_PRIMARY && value2 != null && a0.supportedOperatingSystems.includes(value2);
}
function getReadablePreorderReleaseDate({preorderReleaseAt, preorderApproximateReleaseDate}) { // fn#78106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10177:5554, offset: 0x01e1a967, size: 180 bytes, params: 2, frame: 25
var r6;
var binding;
var value3;
var property;
var property2;
var value4;
var isValid;
var value5;
if (preorderReleaseAt != null) {
return preorderReleaseAt.format('MMMM DD');
}
if (preorderApproximateReleaseDate == null) {
return null;
}
let length = env0_11.length;
if (0 < length) {
r6 = 0;
loopExit3: while (true) {
binding = Module00057;
value3 = binding(env0_11[r6], 2);
property = value3[0];
property2 = value3[1];
value4 = (importDefault(3738) /* metro dependency 3738 */)(preorderApproximateReleaseDate, property, true);
isValid = value4.isValid;
if (Reflect.apply(isValid, value4, [])) {
return value4.format(property2);
}
value5 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
length = env0_11.length;
if (value5 < length) {
r6 = value5;
continue;
}
break loopExit3;
}
}
return preorderApproximateReleaseDate;
}
}
global.__d(_fun78099, 9991, [57, 661, 3974, 1244, 4141, 477, 3738,
2]) /* metro module 9991, dependencies: [57, 661, 3974, 1244, 4141, 477, 3738, 2] */;
+70 -67
View File
@@ -1,81 +1,84 @@
/* Metro module 6274; source: utils/SecondaryIndexMapUtils.tsx; dependencies: [644, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun49569(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6452:6, offset: 0x011fd5a5, size: 97 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/SecondaryIndexMapUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/SecondaryIndexMapUtils.tsx');
exports.isVersionEqual = isVersionEqual;
}
function isVersionEqual(a0, a1) { // fn#49570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6452:176, offset: 0x011fd606, size: 161 bytes, params: 3, frame: 19
var r0;
var r1;
var r2;
var r5;
var r6;
var item3;
var value3;
var item5;
var value5;
let iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r3 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
function isVersionEqual(a0, a1) { // fn#49570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6452:176, offset: 0x011fd606, size: 161 bytes, params: 3, frame: 19
var r0;
var r1;
var r2;
var r5;
var r6;
var item3;
var value3;
var item5;
var value5;
let iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r3 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value;
r2 = value3;
r2 = value2;
} else {
r0 = item3;
r1 = item;
r2 = value3;
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value;
r2 = value3;
} else {
r0 = item3;
r1 = item;
r2 = value3;
}
}
}
if (!r2) {
r0.return();
}
iterator = a1[Symbol.iterator]();
const iterator3 = iterator.next;
let item4 = Reflect.apply(iterator3, iterator, []);
item = item4.value;
item4 = item4.done ? undefined : iterator;
const value4 = item4 === value;
r2 = value4 ? value : item;
if (value4) {
r0 = value;
r5 = item4;
r6 = value4;
} else {
item5 = Reflect.apply(iterator3, item4, []);
item = item5.value;
item5 = item5.done ? undefined : item4;
value5 = item5 === value;
if (value5) {
if (!r2) {
r0.return();
}
iterator = a1[Symbol.iterator]();
const iterator3 = iterator.next;
let item4 = Reflect.apply(iterator3, iterator, []);
item = item4.value;
item4 = item4.done ? undefined : iterator;
const value4 = item4 === value;
r2 = value4 ? value : item;
if (value4) {
r0 = value;
r5 = item5;
r6 = value5;
r5 = item4;
r6 = value4;
} else {
r0 = item;
r5 = item5;
r6 = value5;
item5 = Reflect.apply(iterator3, item4, []);
item = item5.value;
item5 = item5.done ? undefined : item4;
value5 = item5 === value;
if (value5) {
r0 = value;
r5 = item5;
r6 = value5;
} else {
r0 = item;
r5 = item5;
r6 = value5;
}
}
if (!r6) {
r5.return();
}
r0 = r1 === r0 && (importDefault(644) /* metro dependency 644 */)(r3, r2);
return r0;
}
if (!r6) {
r5.return();
}
r0 = r1 === r0 && (importDefault(644) /* metro dependency 644 */)(r3, r2);
return r0;
}
global.__d(_fun49569, 6274, [644, 2]) /* metro module 6274, dependencies: [644, 2] */;
+46 -41
View File
@@ -1,50 +1,55 @@
/* Metro module 15175; source: utils/SecondsSliderUtils.tsx; dependencies: [1244, 3738, 2] */
import Module03738 from '../by-id/module-03738.js'; /* Metro dependency 3738 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun115945(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15372:6, offset: 0x0247560f, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/SecondsSliderUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/SecondsSliderUtils.tsx');
exports.getSecondsSliderLabel = getSecondsSliderLabel;
}
function getSecondsSliderLabel(a0) { // fn#115946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15372:178, offset: 0x02475676, size: 596 bytes, params: 2, frame: 20
var r4;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var formatToPlainString;
var object2;
const value = a1;
const value2 = a2;
let r2 = !(value !== undefined) || value;
let r0 = value2 !== undefined ? value2 : intl.string(t.Yl1D84);
const value3 = (importDefault(3738) /* metro dependency 3738 */).duration(a0, 'seconds');
if (value3.days() > 0) {
formatToPlainString = intl.formatToPlainString;
r2 = r2 ? t.GBLpQ8 : t['k2UNz+'];
object2 = {};
object2.days = value3.days();
r0 = Reflect.apply(formatToPlainString, intl, [r2, object2]);
} else if (value3.hours() > 0) {
formatToPlainString = intl.formatToPlainString;
r4 = r2 ? t.rhY1Rs : t.xCjYxK;
object2 = {};
object2.hours = value3.hours();
r0 = Reflect.apply(formatToPlainString, intl, [r4, object2]);
} else if (value3.minutes() > 0) {
formatToPlainString = intl.formatToPlainString;
r4 = r2 ? t['XIGt+W'] : t.iXLF9W;
object2 = {};
object2.minutes = value3.minutes();
r0 = Reflect.apply(formatToPlainString, intl, [r4, object2]);
} else if (a0 > 0) {
formatToPlainString = intl.formatToPlainString;
r4 = r2 ? t.pyvjRp : t.geSp4K;
object2 = {};
object2.seconds = value3.seconds();
r0 = Reflect.apply(formatToPlainString, intl, [r4, object2]);
} else {
r0 = r2 ? intl.string(t.Yl1D84) : r0;
function getSecondsSliderLabel(a0) { // fn#115946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15372:178, offset: 0x02475676, size: 596 bytes, params: 2, frame: 20
var r4;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var formatToPlainString;
var object;
const value = a1;
const value2 = a2;
let r2 = !(value !== undefined) || value;
let r0 = value2 !== undefined ? value2 : intl.string(t.Yl1D84);
const value3 = (Module03738).duration(a0, 'seconds');
if (value3.days() > 0) {
formatToPlainString = intl.formatToPlainString;
r2 = r2 ? t.GBLpQ8 : t['k2UNz+'];
object = {};
object.days = value3.days();
r0 = Reflect.apply(formatToPlainString, intl, [r2, object]);
} else if (value3.hours() > 0) {
formatToPlainString = intl.formatToPlainString;
r4 = r2 ? t.rhY1Rs : t.xCjYxK;
object = {};
object.hours = value3.hours();
r0 = Reflect.apply(formatToPlainString, intl, [r4, object]);
} else if (value3.minutes() > 0) {
formatToPlainString = intl.formatToPlainString;
r4 = r2 ? t['XIGt+W'] : t.iXLF9W;
object = {};
object.minutes = value3.minutes();
r0 = Reflect.apply(formatToPlainString, intl, [r4, object]);
} else if (a0 > 0) {
formatToPlainString = intl.formatToPlainString;
r4 = r2 ? t.pyvjRp : t.geSp4K;
object = {};
object.seconds = value3.seconds();
r0 = Reflect.apply(formatToPlainString, intl, [r4, object]);
} else {
r0 = r2 ? intl.string(t.Yl1D84) : r0;
}
return r0;
}
return r0;
}
global.__d(_fun115945, 15175, [1244, 3738, 2]) /* metro module 15175, dependencies: [1244, 3738, 2] */;
+370 -362
View File
@@ -1,17 +1,23 @@
/* Metro module 1216; source: utils/SentryUtils.native.tsx; dependencies: [27, 3, 1217, 819, 12844, 818, 1582, 2] */
import Logger from '../modules/debug/Logger.tsx'; /* Metro dependency 3 */
import AddSentryBreadcrumbNative from '../modules/sentry/addSentryBreadcrumb.native.tsx'; /* Metro dependency 818 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as Module00819Module from '../by-id/module-00819.js'; /* Metro dependency 819 */
import * as SentryInitUtilsModule from '../modules/errors/native/SentryInitUtils.tsx'; /* Metro dependency 1217 */
import * as ErrorCommonUtilsModule from './ErrorCommonUtils.tsx'; /* Metro dependency 12844 */
function _fun13517(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:6, offset: 0x00ded430, size: 336 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const isNonEmptyString = function(a0) {
return typeof a0 === 'string' && a0.length > 0;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = (require(27) /* metro dependency 27 */).NativeModules;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('Sentry');
(require(1217) /* metro dependency 1217: SentryInitUtils */).initSentry();
object2 = {setUser: function(a0, a1, a2, a3) {
(SentryInitUtilsModule).initSentry();
object = {setUser: function(a0, a1, a2, a3) {
var object = {id: a0, username: a1, email: a2, staff: a3};
importAll(dependencyMap[3]).getCurrentScope().setUser(object);
updateNativeReporter(object);
@@ -19,7 +25,7 @@ function _fun13517(global, require, importDefault, importAll, module, exports, d
importAll(dependencyMap[3]).getCurrentScope().setUser(null);
updateNativeReporter();
}, setTags: setTags_13522, setExtra: setExtra_13523, captureException: captureException_13524,
captureCrash: captureCrash, captureMessage: captureMessage_13529, addFeatureFlag: addFeatureFlag,
captureCrash: captureCrash, captureMessage: captureMessage_13529, addFeatureFlag: addFeatureFlag_13531,
addBreadcrumb: addBreadcrumb_13532, profiledRootComponent: function(a0) {
var r0;
var value = a0;
@@ -40,376 +46,378 @@ function _fun13517(global, require, importDefault, importAll, module, exports, d
var value2 = new Promise(_fun13537);
return value2 instanceof Object ? value2 : value;
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/SentryUtils.native.tsx');
exports.default = object2;
}
function updateNativeReporter() { // fn#13519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:211, offset: 0x00ded59e, size: 47 bytes, params: 1, frame: 12
const value = a0;
const r3 = value !== undefined ? value : {staff: false};
const CrashReportingManager = NativeModules.CrashReportingManager;
CrashReportingManager.setUser(r3);
}
function setTags_13522(a0) { // fn#13522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:513, offset: 0x00ded661, size: 51 bytes, params: 2, frame: 12
let value = importAll(819) /* metro dependency 819 */;
value = value.getCurrentScope();
value.setTags(a0);
}
function setExtra_13523(a0) { // fn#13523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:562, offset: 0x00ded694, size: 51 bytes, params: 2, frame: 12
let value = importAll(819) /* metro dependency 819 */;
value = value.getCurrentScope();
value.setExtras(a0);
}
function captureException_13524(a0, a1) { // fn#13524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:614, offset: 0x00ded6c7, size: 86 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = (require(12844) /* metro dependency 12844: ErrorCommonUtils */).getUpdatedOptions(a1);
(importAll(819) /* metro dependency 819 */).withScope(_fun13525);
}
function captureCrash(a0, a1) { // fn#13526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:805, offset: 0x00ded79d, size: 169 bytes, params: 3, frame: 17
const env0_0 = a0;
const value2 = undefined;
const updatedOptions = (require(12844) /* metro dependency 12844: ErrorCommonUtils */).getUpdatedOptions(a1);
const r6 = (updatedOptions == null ? value2 : updatedOptions.tags) ?? ({});
const Object = global.Object;
const env0_3 = Object.assign({crash: 'true'}, r6);
(importAll(819) /* metro dependency 819 */).withScope(_fun13527);
return env0_1;
}
function captureMessage_13529(a0, a1) { // fn#13529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:1254, offset: 0x00ded92d, size: 86 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = (require(12844) /* metro dependency 12844: ErrorCommonUtils */).getUpdatedOptions(a1);
(importAll(819) /* metro dependency 819 */).withScope(_fun13530);
}
function addFeatureFlag(a0, a1) { // fn#13531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:1448, offset: 0x00deda17, size: 150 bytes, params: 3, frame: 15
var r5;
var value;
const value2 = undefined;
const getClient = (importAll(819) /* metro dependency 819 */).getClient;
if (getClient == null) {
r5 = value2;
} else {
value = importAll(819) /* metro dependency 819 */;
value = value.getClient();
r5 = value;
(FileImportTrackerModule).fileFinishedImporting('utils/SentryUtils.native.tsx');
exports.default = object;
function updateNativeReporter() { // fn#13519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:211, offset: 0x00ded59e, size: 47 bytes, params: 1, frame: 12
const value = a0;
const r3 = value !== undefined ? value : {staff: false};
const CrashReportingManager = NativeModules.CrashReportingManager;
CrashReportingManager.setUser(r3);
}
const r4 = r5 == null || r5.getIntegrationByName == null ? value2 : r5.getIntegrationByName('FeatureFlags');
if (!(r4 == null || r4.addFeatureFlag == null)) {
r4.addFeatureFlag(a0, a1);
function setTags_13522(a0) { // fn#13522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:513, offset: 0x00ded661, size: 51 bytes, params: 2, frame: 12
let value = Module00819Module;
value = value.getCurrentScope();
value.setTags(a0);
}
return value2;
}
function addBreadcrumb_13532(a0) { // fn#13532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:1667, offset: 0x00dedaad, size: 57 bytes, params: 2, frame: 14
env0_5.verbose('Breadcrumb', a0);
(importDefault(818) /* metro dependency 818: addSentryBreadcrumbNative */)(a0);
}
function setExtra_13523(a0) { // fn#13523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:562, offset: 0x00ded694, size: 51 bytes, params: 2, frame: 12
let value = Module00819Module;
value = value.getCurrentScope();
value.setExtras(a0);
}
function markCrashHandled(a0) { // fn#13535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:1907, offset: 0x00dedb66, size: 95 bytes, params: 2, frame: 13
var value;
var CrashReportingManager;
var markCrashHandled;
var value2;
var error;
var binding;
if (a0.length !== 0) {
try {
value = environment;
CrashReportingManager = NativeModules.CrashReportingManager;
markCrashHandled = CrashReportingManager.markCrashHandled;
value2 = markCrashHandled == null;
if (!value2) {
CrashReportingManager = NativeModules.CrashReportingManager;
CrashReportingManager.markCrashHandled(a0);
function captureException_13524(a0, a1) { // fn#13524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:614, offset: 0x00ded6c7, size: 86 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = (ErrorCommonUtilsModule).getUpdatedOptions(a1);
(Module00819Module).withScope(_fun13525);
function _fun13525(a0) { // fn#13525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:690, offset: 0x00ded71d, size: 128 bytes, params: 2, frame: 13
if (env0_1 != null) {
if (env0_1.tags != null) {
a0.setTags(env0_1.tags);
}
if (env0_1.extra != null) {
a0.setExtras(env0_1.extra);
}
}
} catch (error) {
binding = env0_5;
binding.warn('Failed to mark crash as handled', error);
(Module00819Module).captureException(env0_0);
}
}
}
function getLastCrashReport() { // fn#13536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:2113, offset: 0x00dedbc5, size: 37 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun13537);
return promise instanceof Object ? promise : value;
}
function _fun13525(a0) { // fn#13525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:690, offset: 0x00ded71d, size: 128 bytes, params: 2, frame: 13
if (env0_1 != null) {
if (env0_1.tags != null) {
a0.setTags(env0_1.tags);
function captureCrash(a0, a1) { // fn#13526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:805, offset: 0x00ded79d, size: 169 bytes, params: 3, frame: 17
const env0_0 = a0;
const value2 = undefined;
const updatedOptions = (ErrorCommonUtilsModule).getUpdatedOptions(a1);
const r6 = (updatedOptions == null ? value2 : updatedOptions.tags) ?? ({});
const Object = global.Object;
const env0_3 = Object.assign({crash: 'true'}, r6);
(Module00819Module).withScope(_fun13527);
return env0_1;
function _fun13527(a0) { // fn#13527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:986, offset: 0x00ded846, size: 153 bytes, params: 2, frame: 13
if (env0_2 != null && env0_2.extra != null) {
a0.setExtras(env0_2.extra);
}
a0.setTags(env0_3);
a0.setLevel('fatal');
a0.addEventProcessor(function(a0) {
var r5;
var r2;
var object;
var property = a0.exception;
r2 = property == null || property.values == null ? undefined : property.values[0];
if (r2 != null) {
object = {};
copyDataProperties(object, r2.mechanism, r5);
object['handled'] = false;
r2.mechanism = object;
}
return a0;
});
env0_1 = (importAll(819) /* metro dependency 819 */).captureException(env0_0);
}
if (env0_1.extra != null) {
a0.setExtras(env0_1.extra);
}
}
(importAll(819) /* metro dependency 819 */).captureException(env0_0);
}
function _fun13527(a0) { // fn#13527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:986, offset: 0x00ded846, size: 153 bytes, params: 2, frame: 13
if (env0_2 != null && env0_2.extra != null) {
a0.setExtras(env0_2.extra);
}
a0.setTags(env0_3);
a0.setLevel('fatal');
a0.addEventProcessor(function(a0) {
function captureMessage_13529(a0, a1) { // fn#13529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:1254, offset: 0x00ded92d, size: 86 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = (ErrorCommonUtilsModule).getUpdatedOptions(a1);
(Module00819Module).withScope(_fun13530);
function _fun13530(a0) { // fn#13530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:1328, offset: 0x00ded983, size: 148 bytes, params: 2, frame: 13
if (env0_1 != null && env0_1.extra != null) {
a0.setExtras(env0_1.extra);
}
if (env0_1 != null && env0_1.tags != null) {
a0.setTags(env0_1.tags);
}
(Module00819Module).captureMessage(env0_0);
}
}
function addFeatureFlag_13531(a0, a1) { // fn#13531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:1448, offset: 0x00deda17, size: 150 bytes, params: 3, frame: 15
var r5;
var r2;
var object;
var property = a0.exception;
r2 = property == null || property.values == null ? undefined : property.values[0];
if (r2 != null) {
object = {};
copyDataProperties(object, r2.mechanism, r5);
object['handled'] = false;
r2.mechanism = object;
}
return a0;
});
env0_1 = (importAll(819) /* metro dependency 819 */).captureException(env0_0);
}
function _fun13530(a0) { // fn#13530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:1328, offset: 0x00ded983, size: 148 bytes, params: 2, frame: 13
if (env0_1 != null && env0_1.extra != null) {
a0.setExtras(env0_1.extra);
}
if (env0_1 != null && env0_1.tags != null) {
a0.setTags(env0_1.tags);
}
(importAll(819) /* metro dependency 819 */).captureMessage(env0_0);
}
function _fun13537(a0, a1) { // fn#13537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:2130, offset: 0x00dedbea, size: 77 bytes, params: 3, frame: 15
var environment;
const env0_0 = a0;
const env0_1 = a1;
let value = environment.__proto__;
const CrashReportingManager = NativeModules.CrashReportingManager;
value = undefined;
const getLastCrashReport = CrashReportingManager == null ? value : CrashReportingManager.getLastCrashReport;
if (getLastCrashReport != null) {
CrashReportingManager.getLastCrashReport(_fun13538);
} else {
a0(null);
}
return value;
}
function _fun13538(a0) { // fn#13538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:2234, offset: 0x00dedc37, size: 599 bytes, params: 2, frame: 19
var r5;
var r4;
var r7;
var r3;
var r1;
var value;
var binding;
var value2;
var value3;
var timestamp;
var value4;
var value5;
var Number;
var isNaN;
var isNaN2;
var value6;
var level;
var value7;
var is_native;
var value8;
var value9;
var value10;
var value11;
var object2;
var event_id;
var value12;
var isNonEmptyStringBinding;
var origin;
var isNonEmptyString2;
var object4;
var error_message;
var isNonEmptyString3;
var error_stack;
var isNonEmptyString4;
var exit_reason;
var isNonEmptyString5;
var exit_description;
var isNonEmptyString6;
var tombstone;
var isNonEmptyString7;
var tombstone_cause;
var isNonEmptyString8;
var tombstone_hash;
var isNonEmptyString9;
var tombstone_group_by;
var isNonEmptyString10;
var tombstone_origin;
var isNonEmptyString11;
var value13;
var value14;
var Object;
var assign;
var extra;
var value15;
var error;
try {
value = environment;
binding = env0_0;
value2 = null;
value3 = value2 == a0;
if (value3) {
r1 = value2;
var value;
const value2 = undefined;
const getClient = (importAll(819) /* metro dependency 819 */).getClient;
if (getClient == null) {
r5 = value2;
} else {
timestamp = a0.timestamp;
value4 = undefined;
value5 = typeof timestamp !== 'number';
if (value5) {
r5 = value4;
} else {
Number = global.Number;
isNaN = Number.isNaN;
timestamp = a0.timestamp;
isNaN2 = Reflect.apply(isNaN, Number, [timestamp]);
if (isNaN2) {
r5 = value4;
} else {
timestamp = a0.timestamp;
value6 = timestamp / 1000;
r5 = value6;
}
}
level = a0.level;
value7 = value2 != level;
if (value7) {
r7 = level;
} else {
is_native = a0.is_native;
value8 = 'error';
if (is_native) {
value9 = 'fatal';
r4 = value9;
} else {
r4 = value8;
}
r7 = r4;
}
value10 = value2 == r7;
if (value10) {
r4 = value4;
} else {
value11 = r7.toLowerCase();
r4 = value11;
}
object2 = {type: value4};
event_id = a0.event_id;
object2.event_id = event_id;
object2.timestamp = r5;
object2.level = r4;
value12 = environment.__proto__.__proto__;
isNonEmptyStringBinding = isNonEmptyString;
origin = a0.origin;
isNonEmptyString2 = isNonEmptyStringBinding(origin);
if (isNonEmptyString2) {
origin = a0.origin;
r5 = {['event.origin']: origin};
} else {
r5 = value4;
}
object2.tags = r5;
object4 = {};
isNonEmptyStringBinding = isNonEmptyString;
error_message = a0.error_message;
isNonEmptyString3 = isNonEmptyStringBinding(error_message);
if (isNonEmptyString3) {
error_message = a0.error_message;
object2.message = error_message;
error_message = a0.error_message;
object4.persisted_error_message = error_message;
}
isNonEmptyStringBinding = isNonEmptyString;
error_stack = a0.error_stack;
isNonEmptyString4 = isNonEmptyStringBinding(error_stack);
if (isNonEmptyString4) {
error_stack = a0.error_stack;
object4.persisted_error_stack = error_stack;
}
is_native = a0.is_native;
if (is_native) {
isNonEmptyStringBinding = isNonEmptyString;
exit_reason = a0.exit_reason;
isNonEmptyString5 = isNonEmptyStringBinding(exit_reason);
if (isNonEmptyString5) {
exit_reason = a0.exit_reason;
object4.native_exit_reason = exit_reason;
}
isNonEmptyStringBinding = isNonEmptyString;
exit_description = a0.exit_description;
isNonEmptyString6 = isNonEmptyStringBinding(exit_description);
if (isNonEmptyString6) {
exit_description = a0.exit_description;
object4.native_exit_description = exit_description;
}
isNonEmptyStringBinding = isNonEmptyString;
tombstone = a0.tombstone;
isNonEmptyString7 = isNonEmptyStringBinding(tombstone);
if (isNonEmptyString7) {
tombstone = a0.tombstone;
object4.native_tombstone = tombstone;
}
isNonEmptyStringBinding = isNonEmptyString;
tombstone_cause = a0.tombstone_cause;
isNonEmptyString8 = isNonEmptyStringBinding(tombstone_cause);
if (isNonEmptyString8) {
tombstone_cause = a0.tombstone_cause;
object4.native_tombstone_cause = tombstone_cause;
}
isNonEmptyStringBinding = isNonEmptyString;
tombstone_hash = a0.tombstone_hash;
isNonEmptyString9 = isNonEmptyStringBinding(tombstone_hash);
if (isNonEmptyString9) {
tombstone_hash = a0.tombstone_hash;
object4.native_tombstone_hash = tombstone_hash;
}
isNonEmptyStringBinding = isNonEmptyString;
tombstone_group_by = a0.tombstone_group_by;
isNonEmptyString10 = isNonEmptyStringBinding(tombstone_group_by);
if (isNonEmptyString10) {
tombstone_group_by = a0.tombstone_group_by;
object4.native_tombstone_group_by = tombstone_group_by;
}
isNonEmptyStringBinding = isNonEmptyString;
tombstone_origin = a0.tombstone_origin;
isNonEmptyString11 = isNonEmptyStringBinding(tombstone_origin);
if (isNonEmptyString11) {
tombstone_origin = a0.tombstone_origin;
object4.native_tombstone_origin = tombstone_origin;
}
}
is_native = a0.is_native;
value13 = 'false';
if (is_native) {
value14 = 'true';
r3 = value14;
} else {
r3 = value13;
}
object4.native_is_native = r3;
Object = global.Object;
assign = Object.assign;
extra = object2.extra;
value15 = Reflect.apply(assign, Object, [{}, extra, object4]);
object2.extra = value15;
r1 = object2;
value = importAll(819) /* metro dependency 819 */;
value = value.getClient();
r5 = value;
}
binding(r1);
} catch (error) {
require(error);
const r4 = r5 == null || r5.getIntegrationByName == null ? value2 : r5.getIntegrationByName('FeatureFlags');
if (!(r4 == null || r4.addFeatureFlag == null)) {
r4.addFeatureFlag(a0, a1);
}
return value2;
}
function addBreadcrumb_13532(a0) { // fn#13532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:1667, offset: 0x00dedaad, size: 57 bytes, params: 2, frame: 14
env0_5.verbose('Breadcrumb', a0);
(AddSentryBreadcrumbNative)(a0);
}
function markCrashHandled(a0) { // fn#13535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:1907, offset: 0x00dedb66, size: 95 bytes, params: 2, frame: 13
var value;
var CrashReportingManager;
var markCrashHandled;
var value2;
var error;
var binding;
if (a0.length !== 0) {
try {
value = environment;
CrashReportingManager = NativeModules.CrashReportingManager;
markCrashHandled = CrashReportingManager.markCrashHandled;
value2 = markCrashHandled == null;
if (!value2) {
CrashReportingManager = NativeModules.CrashReportingManager;
CrashReportingManager.markCrashHandled(a0);
}
} catch (error) {
binding = env0_5;
binding.warn('Failed to mark crash as handled', error);
}
}
}
function getLastCrashReport() { // fn#13536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:2113, offset: 0x00dedbc5, size: 37 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun13537);
return promise instanceof Object ? promise : value;
function _fun13537(a0, a1) { // fn#13537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:2130, offset: 0x00dedbea, size: 77 bytes, params: 3, frame: 15
var environment;
const env0_0 = a0;
const env0_1 = a1;
let value = environment.__proto__;
const CrashReportingManager = NativeModules.CrashReportingManager;
value = undefined;
const getLastCrashReport = CrashReportingManager == null ? value : CrashReportingManager.getLastCrashReport;
if (getLastCrashReport != null) {
CrashReportingManager.getLastCrashReport(_fun13538);
} else {
a0(null);
}
return value;
function _fun13538(a0) { // fn#13538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1343:2234, offset: 0x00dedc37, size: 599 bytes, params: 2, frame: 19
var r5;
var r4;
var r7;
var r3;
var r1;
var value;
var binding;
var value2;
var value3;
var timestamp;
var value4;
var value5;
var Number;
var isNaN;
var isNaN2;
var value6;
var level;
var value7;
var is_native;
var value8;
var value9;
var value10;
var value11;
var object;
var event_id;
var value12;
var isNonEmptyStringBinding;
var origin;
var isNonEmptyString2;
var object3;
var error_message;
var isNonEmptyString3;
var error_stack;
var isNonEmptyString4;
var exit_reason;
var isNonEmptyString5;
var exit_description;
var isNonEmptyString6;
var tombstone;
var isNonEmptyString7;
var tombstone_cause;
var isNonEmptyString8;
var tombstone_hash;
var isNonEmptyString9;
var tombstone_group_by;
var isNonEmptyString10;
var tombstone_origin;
var isNonEmptyString11;
var value13;
var value14;
var Object;
var assign;
var extra;
var value15;
var error;
try {
value = environment;
binding = env0_0;
value2 = null;
value3 = value2 == a0;
if (value3) {
r1 = value2;
} else {
timestamp = a0.timestamp;
value4 = undefined;
value5 = typeof timestamp !== 'number';
if (value5) {
r5 = value4;
} else {
Number = global.Number;
isNaN = Number.isNaN;
timestamp = a0.timestamp;
isNaN2 = Reflect.apply(isNaN, Number, [timestamp]);
if (isNaN2) {
r5 = value4;
} else {
timestamp = a0.timestamp;
value6 = timestamp / 1000;
r5 = value6;
}
}
level = a0.level;
value7 = value2 != level;
if (value7) {
r7 = level;
} else {
is_native = a0.is_native;
value8 = 'error';
if (is_native) {
value9 = 'fatal';
r4 = value9;
} else {
r4 = value8;
}
r7 = r4;
}
value10 = value2 == r7;
if (value10) {
r4 = value4;
} else {
value11 = r7.toLowerCase();
r4 = value11;
}
object = {type: value4};
event_id = a0.event_id;
object.event_id = event_id;
object.timestamp = r5;
object.level = r4;
value12 = environment.__proto__.__proto__;
isNonEmptyStringBinding = isNonEmptyString;
origin = a0.origin;
isNonEmptyString2 = isNonEmptyStringBinding(origin);
if (isNonEmptyString2) {
origin = a0.origin;
r5 = {['event.origin']: origin};
} else {
r5 = value4;
}
object.tags = r5;
object3 = {};
isNonEmptyStringBinding = isNonEmptyString;
error_message = a0.error_message;
isNonEmptyString3 = isNonEmptyStringBinding(error_message);
if (isNonEmptyString3) {
error_message = a0.error_message;
object.message = error_message;
error_message = a0.error_message;
object3.persisted_error_message = error_message;
}
isNonEmptyStringBinding = isNonEmptyString;
error_stack = a0.error_stack;
isNonEmptyString4 = isNonEmptyStringBinding(error_stack);
if (isNonEmptyString4) {
error_stack = a0.error_stack;
object3.persisted_error_stack = error_stack;
}
is_native = a0.is_native;
if (is_native) {
isNonEmptyStringBinding = isNonEmptyString;
exit_reason = a0.exit_reason;
isNonEmptyString5 = isNonEmptyStringBinding(exit_reason);
if (isNonEmptyString5) {
exit_reason = a0.exit_reason;
object3.native_exit_reason = exit_reason;
}
isNonEmptyStringBinding = isNonEmptyString;
exit_description = a0.exit_description;
isNonEmptyString6 = isNonEmptyStringBinding(exit_description);
if (isNonEmptyString6) {
exit_description = a0.exit_description;
object3.native_exit_description = exit_description;
}
isNonEmptyStringBinding = isNonEmptyString;
tombstone = a0.tombstone;
isNonEmptyString7 = isNonEmptyStringBinding(tombstone);
if (isNonEmptyString7) {
tombstone = a0.tombstone;
object3.native_tombstone = tombstone;
}
isNonEmptyStringBinding = isNonEmptyString;
tombstone_cause = a0.tombstone_cause;
isNonEmptyString8 = isNonEmptyStringBinding(tombstone_cause);
if (isNonEmptyString8) {
tombstone_cause = a0.tombstone_cause;
object3.native_tombstone_cause = tombstone_cause;
}
isNonEmptyStringBinding = isNonEmptyString;
tombstone_hash = a0.tombstone_hash;
isNonEmptyString9 = isNonEmptyStringBinding(tombstone_hash);
if (isNonEmptyString9) {
tombstone_hash = a0.tombstone_hash;
object3.native_tombstone_hash = tombstone_hash;
}
isNonEmptyStringBinding = isNonEmptyString;
tombstone_group_by = a0.tombstone_group_by;
isNonEmptyString10 = isNonEmptyStringBinding(tombstone_group_by);
if (isNonEmptyString10) {
tombstone_group_by = a0.tombstone_group_by;
object3.native_tombstone_group_by = tombstone_group_by;
}
isNonEmptyStringBinding = isNonEmptyString;
tombstone_origin = a0.tombstone_origin;
isNonEmptyString11 = isNonEmptyStringBinding(tombstone_origin);
if (isNonEmptyString11) {
tombstone_origin = a0.tombstone_origin;
object3.native_tombstone_origin = tombstone_origin;
}
}
is_native = a0.is_native;
value13 = 'false';
if (is_native) {
value14 = 'true';
r3 = value14;
} else {
r3 = value13;
}
object3.native_is_native = r3;
Object = global.Object;
assign = Object.assign;
extra = object.extra;
value15 = Reflect.apply(assign, Object, [{}, extra, object3]);
object.extra = value15;
r1 = object;
}
binding(r1);
} catch (error) {
require(error);
}
}
}
}
}
global.__d(_fun13517, 1216, [27, 3, 1217, 819, 12844, 818, 1582,
2]) /* metro module 1216, dependencies: [27, 3, 1217, 819, 12844, 818, 1582, 2] */;
+48 -45
View File
@@ -1,9 +1,11 @@
/* Metro module 21; source: utils/SnowflakeUtils.tsx; dependencies: [22, 23, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as SnowflakeUtilsModule from '../external/discord_common/js/shared/utils/SnowflakeUtils.tsx'; /* Metro dependency 23 */
function _fun282(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:6, offset: 0x00c3e633, size: 304 bytes, params: 8, frame: 18
var object2;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {age: age, extractTimestamp: extractTimestamp, compare: compare,
object = {age: age, extractTimestamp: extractTimestamp, compare: compare,
atPreviousMillisecond: atPreviousMillisecond, atNextMillisecond: atNextMillisecond,
fromTimestamp: fromTimestamp, fromTimestampWithSequence: fromTimestampWithSequence, keys: function(a0) {
var Object = global.Object;
@@ -25,50 +27,51 @@ function _fun282(global, require, importDefault, importAll, module, exports, dep
}, cast: function(a0) {
return a0;
}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/SnowflakeUtils.tsx');
exports.default = object2;
const DISCORD_EPOCH = (require(23) /* metro dependency 23: SnowflakeUtils */).DISCORD_EPOCH;
(FileImportTrackerModule).fileFinishedImporting('utils/SnowflakeUtils.tsx');
exports.default = object;
const DISCORD_EPOCH = (SnowflakeUtilsModule).DISCORD_EPOCH;
exports.DISCORD_EPOCH = DISCORD_EPOCH;
const SnowflakeSequence = (require(23) /* metro dependency 23: SnowflakeUtils */).SnowflakeSequence;
const SnowflakeSequence = (SnowflakeUtilsModule).SnowflakeSequence;
exports.SnowflakeSequence = SnowflakeSequence;
function age(a0) { // fn#284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:129, offset: 0x00c3e763, size: 41 bytes, params: 2, frame: 11
return (SnowflakeUtilsModule).age(a0);
}
function extractTimestamp(a0) { // fn#285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:185, offset: 0x00c3e78c, size: 41 bytes, params: 2, frame: 11
return (SnowflakeUtilsModule).extractTimestamp(a0);
}
function compare(a0, a1) { // fn#286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:258, offset: 0x00c3e7b5, size: 45 bytes, params: 3, frame: 13
return (SnowflakeUtilsModule).compare(a0, a1);
}
function atPreviousMillisecond(a0) { // fn#287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:331, offset: 0x00c3e7e2, size: 41 bytes, params: 2, frame: 11
return (SnowflakeUtilsModule).atPreviousMillisecond(a0);
}
function atNextMillisecond(a0) { // fn#288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:424, offset: 0x00c3e80b, size: 41 bytes, params: 2, frame: 11
return (SnowflakeUtilsModule).atNextMillisecond(a0);
}
function fromTimestamp(a0) { // fn#289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:505, offset: 0x00c3e834, size: 41 bytes, params: 2, frame: 11
return (SnowflakeUtilsModule).fromTimestamp(a0);
}
function fromTimestampWithSequence(a0, a1) { // fn#290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:590, offset: 0x00c3e85d, size: 45 bytes, params: 3, frame: 13
return (SnowflakeUtilsModule).fromTimestampWithSequence(a0, a1);
}
function forEach(a0, a1) { // fn#292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:730, offset: 0x00c3e8a1, size: 54 bytes, params: 3, frame: 14
const env0_0 = a1;
(importDefault(22) /* metro dependency 22 */).forEach(a0, function(a0, a1) {
return require(a0, a1);
});
}
function isProbablyAValidSnowflake(a0) { // fn#296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:925, offset: 0x00c3e92b, size: 41 bytes, params: 2, frame: 11
return (SnowflakeUtilsModule).isProbablyAValidSnowflake(a0);
}
}
function age(a0) { // fn#284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:129, offset: 0x00c3e763, size: 41 bytes, params: 2, frame: 11
return (importAll(23) /* metro dependency 23: SnowflakeUtils */).age(a0);
}
function extractTimestamp(a0) { // fn#285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:185, offset: 0x00c3e78c, size: 41 bytes, params: 2, frame: 11
return (importAll(23) /* metro dependency 23: SnowflakeUtils */).extractTimestamp(a0);
}
function compare(a0, a1) { // fn#286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:258, offset: 0x00c3e7b5, size: 45 bytes, params: 3, frame: 13
return (importAll(23) /* metro dependency 23: SnowflakeUtils */).compare(a0, a1);
}
function atPreviousMillisecond(a0) { // fn#287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:331, offset: 0x00c3e7e2, size: 41 bytes, params: 2, frame: 11
return (importAll(23) /* metro dependency 23: SnowflakeUtils */).atPreviousMillisecond(a0);
}
function atNextMillisecond(a0) { // fn#288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:424, offset: 0x00c3e80b, size: 41 bytes, params: 2, frame: 11
return (importAll(23) /* metro dependency 23: SnowflakeUtils */).atNextMillisecond(a0);
}
function fromTimestamp(a0) { // fn#289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:505, offset: 0x00c3e834, size: 41 bytes, params: 2, frame: 11
return (importAll(23) /* metro dependency 23: SnowflakeUtils */).fromTimestamp(a0);
}
function fromTimestampWithSequence(a0, a1) { // fn#290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:590, offset: 0x00c3e85d, size: 45 bytes, params: 3, frame: 13
return (importAll(23) /* metro dependency 23: SnowflakeUtils */).fromTimestampWithSequence(a0, a1);
}
function forEach(a0, a1) { // fn#292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:730, offset: 0x00c3e8a1, size: 54 bytes, params: 3, frame: 14
const env0_0 = a1;
(importDefault(22) /* metro dependency 22 */).forEach(a0, function(a0, a1) {
return require(a0, a1);
});
}
function isProbablyAValidSnowflake(a0) { // fn#296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:26:925, offset: 0x00c3e92b, size: 41 bytes, params: 2, frame: 11
return (importAll(23) /* metro dependency 23: SnowflakeUtils */).isProbablyAValidSnowflake(a0);
}
global.__d(_fun282, 21, [22, 23, 2]) /* metro module 21, dependencies: [22, 23, 2] */;
+8 -5
View File
@@ -1,4 +1,6 @@
/* Metro module 4818; source: utils/SortedArrayUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun42031(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4996:6, offset: 0x0112e62c, size: 102 bytes, params: 8, frame: 17
const closure = function(a0, a1, a2) {
var r1;
@@ -35,12 +37,13 @@ function _fun42031(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/SortedArrayUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/SortedArrayUtils.tsx');
exports.insertionIndex = closure;
exports.insert = insert;
function insert(a0, a1, a2) { // fn#42033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4996:298, offset: 0x0112e6de, size: 42 bytes, params: 4, frame: 16
a0.splice(insertionIndex(a0, a1, a2), 0, a1);
}
}
function insert(a0, a1, a2) { // fn#42033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4996:298, offset: 0x0112e6de, size: 42 bytes, params: 4, frame: 16
a0.splice(insertionIndex(a0, a1, a2), 0, a1);
}
global.__d(_fun42031, 4818, [2]) /* metro module 4818, dependencies: [2] */;
+183 -180
View File
@@ -1,20 +1,22 @@
/* Metro module 6726; source: utils/SpellcheckUtils.tsx; dependencies: [5, 3767, 477, 6727, 2] */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun52801(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:6, offset: 0x01337af8, size: 315 bytes, params: 8, frame: 20
const env0_0 = require;
const isElectronBuiltInSpellcheckerSupported = function() {
return importDefault(dependencyMap[1])?.spellCheck != null;
};
const closure = isSupported_52803;
const isSupported_528032 = isSupported_52803;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
let value = closure();
let value = isSupported_528032();
if (value) {
value = require(6727) /* metro dependency 6727: Spellchecker */;
value = value.install();
}
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/SpellcheckUtils.tsx');
exports.isSupported = closure;
(FileImportTrackerModule).fileFinishedImporting('utils/SpellcheckUtils.tsx');
exports.isSupported = isSupported_528032;
exports.setEnabled = function() {
return _setEnabled.apply(this, arguments);
};
@@ -37,184 +39,185 @@ function _fun52801(global, require, importDefault, importAll, module, exports, d
return _setAppLocale_52822.apply(this, arguments);
};
exports.addResultListener = addResultListener;
}
function isSupported_52803() { // fn#52803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:211, offset: 0x01337c74, size: 48 bytes, params: 1, frame: 12
return (require(477) /* metro dependency 477: PlatformUtils */).isDesktop() && isElectronBuiltInSpellcheckerSupported();
}
function _setEnabled() { // fn#52804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:346, offset: 0x01337ca4, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun52806).apply(this, arguments);
}
function _setLearnedWords() { // fn#52807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:467, offset: 0x01337d0f, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun52809).apply(this, arguments);
}
function _isMisspelled() { // fn#52810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:605, offset: 0x01337d7f, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun52812).apply(this, arguments);
}
function _getCorrections() { // fn#52813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:748, offset: 0x01337e12, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun52815).apply(this, arguments);
}
function _getCachedMisspelling() { // fn#52816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:928, offset: 0x01337ec1, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun52818).apply(this, arguments);
}
function _replaceWithCorrection() { // fn#52819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:1208, offset: 0x01337f89, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun52821).apply(this, arguments);
}
function _setAppLocale_52822() { // fn#52822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:1361, offset: 0x01337ff9, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun52824).apply(this, arguments);
}
function addResultListener(a0) { // fn#52832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:2236, offset: 0x01338069, size: 85 bytes, params: 2, frame: 14
if (isElectronBuiltInSpellcheckerSupported()) {
return (importDefault(3767) /* metro dependency 3767: DiscordNative */).spellCheck.on('spellcheck-result',
a0) ?? (function() {
});
function isSupported_52803() { // fn#52803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:211, offset: 0x01337c74, size: 48 bytes, params: 1, frame: 12
return (require(477) /* metro dependency 477: PlatformUtils */).isDesktop() && isElectronBuiltInSpellcheckerSupported();
}
return function() {
};
}
function* _fun52806(a0) { // fn#52806, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:391, offset: 0x01337cdd, size: 50 bytes, params: 2, frame: 3
if (true) {
value = environment.__proto__.__proto__;
yield env2_4;
value = undefined;
if (false) {
return value;
}
if (value != null) {
value.enabled = a0;
}
}
}
function* _fun52809(a0) { // fn#52809, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:522, offset: 0x01337d48, size: 55 bytes, params: 2, frame: 12
if (true) {
value = environment.__proto__.__proto__;
yield env2_4;
value = undefined;
if (false) {
return value;
}
if (value != null) {
value.setLearnedWords(a0);
}
}
}
async function _fun52812(a0) { // fn#52812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:654, offset: 0x01337dc1, size: 81 bytes, params: 2, frame: 16
var r3;
let value = a1;
if (false) {
return undefined;
}
const r6 = value !== undefined ? value : false;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
await env2_4;
value = undefined;
if (false) {
return value;
}
const value6 = value != null;
if (value6) {
value = value.isMisspelled(a0, r6);
r3 = value;
} else {
r3 = value6;
}
return r3;
}
async function _fun52815(a0) { // fn#52815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:801, offset: 0x01337e54, size: 109 bytes, params: 2, frame: 16
var r3;
let value = a1;
const value2 = a2;
if (false) {
return undefined;
}
const r5 = value !== undefined ? value : false;
const r6 = value2 !== undefined ? value2 : 5;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
await env2_4;
if (false) {
return undefined;
}
if (value == null) {
r3 = [];
} else {
value = value.getCorrectionsForMisspelling(a0, r5);
value = value.slice(0, r6);
r3 = value;
}
return r3;
}
async function _fun52818() { // fn#52818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:993, offset: 0x01337f03, size: 134 bytes, params: 1, frame: 17
let value = a0;
if (false) {
return undefined;
}
const r7 = value !== undefined ? value : 5;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
await env2_4;
value = undefined;
if (false) {
return value;
}
if (value == null) {
return {misspelledWord: '', corrections: []};
}
value = value.getCachedMisspelling();
const object2 = {};
object2.misspelledWord = value.misspelledWord;
object2.corrections = value.corrections.slice(0, r7);
return object2;
}
function* _fun52821(a0) { // fn#52821, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:1275, offset: 0x01337fc2, size: 55 bytes, params: 2, frame: 12
if (true) {
value = environment.__proto__.__proto__;
yield env2_4;
value = undefined;
if (false) {
return value;
}
if (value != null) {
value.replaceMisspelling(a0);
}
}
}
function* _fun52824(a0) { // fn#52824, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:1410, offset: 0x01338032, size: 55 bytes, params: 2, frame: 12
if (true) {
value = environment.__proto__.__proto__;
yield env2_4;
value = undefined;
if (false) {
return value;
}
if (value != null) {
value.setAppLocale(a0);
function _setEnabled() { // fn#52804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:346, offset: 0x01337ca4, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun52806).apply(this, arguments);
function* _fun52806(a0) { // fn#52806, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:391, offset: 0x01337cdd, size: 50 bytes, params: 2, frame: 3
if (true) {
value = environment.__proto__.__proto__;
yield env2_4;
value = undefined;
if (false) {
return value;
}
if (value != null) {
value.enabled = a0;
}
}
}
}
function _setLearnedWords() { // fn#52807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:467, offset: 0x01337d0f, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun52809).apply(this, arguments);
function* _fun52809(a0) { // fn#52809, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:522, offset: 0x01337d48, size: 55 bytes, params: 2, frame: 12
if (true) {
value = environment.__proto__.__proto__;
yield env2_4;
value = undefined;
if (false) {
return value;
}
if (value != null) {
value.setLearnedWords(a0);
}
}
}
}
function _isMisspelled() { // fn#52810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:605, offset: 0x01337d7f, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun52812).apply(this, arguments);
async function _fun52812(a0) { // fn#52812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:654, offset: 0x01337dc1, size: 81 bytes, params: 2, frame: 16
var r3;
let value = a1;
if (false) {
return undefined;
}
const r6 = value !== undefined ? value : false;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
await env2_4;
value = undefined;
if (false) {
return value;
}
const value6 = value != null;
if (value6) {
value = value.isMisspelled(a0, r6);
r3 = value;
} else {
r3 = value6;
}
return r3;
}
}
function _getCorrections() { // fn#52813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:748, offset: 0x01337e12, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun52815).apply(this, arguments);
async function _fun52815(a0) { // fn#52815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:801, offset: 0x01337e54, size: 109 bytes, params: 2, frame: 16
var r3;
let value = a1;
const value2 = a2;
if (false) {
return undefined;
}
const r5 = value !== undefined ? value : false;
const r6 = value2 !== undefined ? value2 : 5;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
await env2_4;
if (false) {
return undefined;
}
if (value == null) {
r3 = [];
} else {
value = value.getCorrectionsForMisspelling(a0, r5);
value = value.slice(0, r6);
r3 = value;
}
return r3;
}
}
function _getCachedMisspelling() { // fn#52816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:928, offset: 0x01337ec1, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun52818).apply(this, arguments);
async function _fun52818() { // fn#52818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:993, offset: 0x01337f03, size: 134 bytes, params: 1, frame: 17
let value = a0;
if (false) {
return undefined;
}
const r7 = value !== undefined ? value : 5;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
await env2_4;
value = undefined;
if (false) {
return value;
}
if (value == null) {
return {misspelledWord: '', corrections: []};
}
value = value.getCachedMisspelling();
const object = {};
object.misspelledWord = value.misspelledWord;
object.corrections = value.corrections.slice(0, r7);
return object;
}
}
function _replaceWithCorrection() { // fn#52819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:1208, offset: 0x01337f89, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun52821).apply(this, arguments);
function* _fun52821(a0) { // fn#52821, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:1275, offset: 0x01337fc2, size: 55 bytes, params: 2, frame: 12
if (true) {
value = environment.__proto__.__proto__;
yield env2_4;
value = undefined;
if (false) {
return value;
}
if (value != null) {
value.replaceMisspelling(a0);
}
}
}
}
function _setAppLocale_52822() { // fn#52822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:1361, offset: 0x01337ff9, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun52824).apply(this, arguments);
function* _fun52824(a0) { // fn#52824, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:1410, offset: 0x01338032, size: 55 bytes, params: 2, frame: 12
if (true) {
value = environment.__proto__.__proto__;
yield env2_4;
value = undefined;
if (false) {
return value;
}
if (value != null) {
value.setAppLocale(a0);
}
}
}
}
function addResultListener(a0) { // fn#52832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6904:2236, offset: 0x01338069, size: 85 bytes, params: 2, frame: 14
if (isElectronBuiltInSpellcheckerSupported()) {
return (importDefault(3767) /* metro dependency 3767: DiscordNative */).spellCheck.on('spellcheck-result',
a0) ?? (function() {
});
}
return function() {
};
}
}
global.__d(_fun52801, 6726, [5, 3767, 477, 6727, 2]) /* metro module 6726, dependencies: [5, 3767, 477, 6727, 2] */;
+332 -320
View File
@@ -1,17 +1,23 @@
/* Metro module 4141; source: utils/StoreUtils.tsx; dependencies: [5, 1226, 3804, 3805, 3808, 661, 4142, 4140, 4221, 1457, 4223, 507, 477, 1244, 2] */
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
import AuthenticationStore from '../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import BillingInfoStore from '../stores/billing/BillingInfoStore.tsx'; /* Metro dependency 3804 */
import PaymentSourceStore from '../stores/billing/PaymentSourceStore.tsx'; /* Metro dependency 3805 */
import SubscriptionStore from '../stores/billing/SubscriptionStore.tsx'; /* Metro dependency 3808 */
import Module04142 from '../by-id/module-04142.js'; /* Metro dependency 4142 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlatformUtilsModule from './PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun34359(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#34359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:6, offset: 0x010541d4, size: 374 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const billingInfoStore = importDefault(3804) /* metro dependency 3804: BillingInfoStore */;
const paymentSourceStore = importDefault(3805) /* metro dependency 3805: PaymentSourceStore */;
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_7 = value.Endpoints;
const env0_8 = value.OperatingSystems;
(importDefault(4142) /* metro dependency 4142 */).shim();
(Module04142).shim();
let r3 = !(require(4140) /* metro dependency 4140: PlatformUtils */).isMobile && !(require(4140) /* metro dependency 4140: PlatformUtils */).isTablet;
if (r3) {
value = require(4221) /* metro dependency 4221: BrowserUtils */;
@@ -19,7 +25,7 @@ function _fun34359(global, require, importDefault, importAll, module, exports, d
value = value !== -1;
r3 = value;
}
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/StoreUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/StoreUtils.tsx');
exports.SUPPORTS_WEBP = r3;
exports.getAssetURL = getAssetURL;
exports.httpGetWithCountryCodeQuery = function() {
@@ -41,158 +47,191 @@ function _fun34359(global, require, importDefault, importAll, module, exports, d
}
return r0;
};
}
function _httpGetWithCountryCodeQuery() { // fn#34360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:282, offset: 0x0105434a, size: 48 bytes, params: 1, frame: 14
return env0_2(_fun34362).apply(this, arguments);
}
function getAssetURL(a0, a1, a2, a3) { // fn#34371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:1701, offset: 0x0105476f, size: 374 bytes, params: 5, frame: 31
var r0;
var API_ENDPOINT;
var getBestMediaProxySize;
var moduleValue;
let value = a1;
const value2 = a3;
const GLOBAL_ENV = global.window.GLOBAL_ENV;
const CDN_HOST = GLOBAL_ENV.CDN_HOST;
let r13 = value2 ?? ((value.mimeType || value.mime_type) === 'video/quicktime' || (value.mimeType || value.mime_type) === 'video/mp4' ? 'mp4' : (value.mimeType || value.mime_type) === 'image/gif' ? 'gif' : 'webp');
let r2 = r13 !== 'webp' || env0_9;
r13 = !r2 ? 'png' : r13;
const r11 = typeof value === 'string' ? value : value.id;
if (CDN_HOST != null) {
r2 = '' + 'https:' + '//' + CDN_HOST + '/app-assets/' + a0 + '/store/' + r11 + '.' + r13;
} else {
API_ENDPOINT = global.window.GLOBAL_ENV.API_ENDPOINT;
value = Endpoints.STORE_ASSET(a0, r11, r13);
value = '' + 'https:' + API_ENDPOINT + value;
r2 = value;
}
if (a2 == null) {
r0 = r2;
} else {
value = require(1457) /* metro dependency 1457: ImageLoaderUtils */;
getBestMediaProxySize = value.getBestMediaProxySize;
moduleValue = require(1457) /* metro dependency 1457: ImageLoaderUtils */;
value = Reflect.apply(getBestMediaProxySize, value, [a2 * moduleValue.getDevicePixelRatio()]);
value = r2 + ('?size=' + value);
r0 = value;
}
return r0;
}
function nativePlatformTypeToSKUOperatingSystem(a0) { // fn#34373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:2394, offset: 0x010548e5, size: 150 bytes, params: 2, frame: 14
const PlatformTypes = (require(477) /* metro dependency 477: PlatformUtils */).PlatformTypes;
const WINDOWS = PlatformTypes.WINDOWS;
if (WINDOWS === a0) {
return OperatingSystems.WINDOWS;
}
const OSX = PlatformTypes.OSX;
if (OSX === a0) {
return OperatingSystems.MACOS;
}
const LINUX = PlatformTypes.LINUX;
if (LINUX === a0) {
return OperatingSystems.LINUX;
}
return null;
}
function skuOperatingSystemToText(a0) { // fn#34374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:2653, offset: 0x0105497b, size: 289 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const WINDOWS = OperatingSystems.WINDOWS;
if (WINDOWS === a0) {
return intl.string(t['0/xHFO']);
}
const MACOS = OperatingSystems.MACOS;
if (MACOS === a0) {
return intl.string(t.E4u4n5);
}
const LINUX = OperatingSystems.LINUX;
if (LINUX === a0) {
return intl.string(t.tcawo3);
}
const Error = global.Error;
const value = 'Unknown operating system value: ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
async function _fun34362(a0) { // fn#34362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:361, offset: 0x0105438c, size: 628 bytes, params: 2, frame: 21
var r11;
var id;
var r5;
var object;
var push;
var value11;
var Promise;
var race;
var items2;
var Promise3;
var value13;
var promise;
var defaultBillingCountryCode;
var defaultPaymentSource;
var value18;
var premiumTypeSubscription;
var ipCountryCode;
var value22;
var query;
var object2;
let value = a0;
let value2 = a1;
if (false) {
return undefined;
}
const value5 = undefined;
let r4 = !(value2 !== value5) || value2;
await value5;
if (false) {
return undefined;
}
let binding = env2_3;
if (r4) {
if (binding.isAuthenticated()) {
object = [];
if (!env2_5.hasFetchedPaymentSources) {
object.push(env2_4.paymentSourcesFetchRequest ?? env2_0(env2_1[10]).fetchPaymentSources());
}
if (!env2_4.ipCountryCodeLoaded) {
push = object.push;
value11 = env2_0(env2_1[10]);
Reflect.apply(push, object, [value11.fetchIpCountryCode()]);
}
object.push((() => {
var Promise = global.Promise;
var value = _fun34364();
var value2 = Object.create(Promise.prototype, {constructor: {value: Promise}});
value = new Promise(value);
return value instanceof Object ? value : value2;
})());
Promise = global.Promise;
race = Promise.race;
items2 = [global.Promise.allSettled(object)];
Promise3 = global.Promise;
value13 = Object.create(Promise3.prototype, {constructor: {value: Promise3}});
promise = new Promise3(function(a0) {
return (0, global.setTimeout)(a0, 10000);
});
items2[1] = promise instanceof Object ? promise : value13;
await Reflect.apply(race, Promise, [items2]);
function _httpGetWithCountryCodeQuery() { // fn#34360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:282, offset: 0x0105434a, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun34362).apply(this, arguments);
async function _fun34362(a0) { // fn#34362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:361, offset: 0x0105438c, size: 628 bytes, params: 2, frame: 21
var r11;
var id;
var r5;
var object;
var push;
var value11;
var Promise;
var race;
var items2;
var Promise3;
var value13;
var promise;
var defaultBillingCountryCode;
var defaultPaymentSource;
var value18;
var premiumTypeSubscription;
var ipCountryCode;
var value22;
var query;
var object3;
let value = a0;
let value2 = a1;
if (false) {
return undefined;
}
r11 = object;
binding = env2_5;
defaultBillingCountryCode = binding.getDefaultBillingCountryCode();
const value5 = undefined;
let r4 = !(value2 !== value5) || value2;
await value5;
if (false) {
return undefined;
}
let binding = env2_3;
if (r4) {
if (binding.isAuthenticated()) {
object = [];
if (!env2_5.hasFetchedPaymentSources) {
object.push(env2_4.paymentSourcesFetchRequest ?? env2_0(env2_1[10]).fetchPaymentSources());
}
if (!env2_4.ipCountryCodeLoaded) {
push = object.push;
value11 = env2_0(env2_1[10]);
Reflect.apply(push, object, [value11.fetchIpCountryCode()]);
}
object.push((() => {
var Promise = global.Promise;
var value = _fun34364();
var value2 = Object.create(Promise.prototype, {constructor: {value: Promise}});
value = new Promise(value);
return value instanceof Object ? value : value2;
})());
Promise = global.Promise;
race = Promise.race;
items2 = [global.Promise.allSettled(object)];
Promise3 = global.Promise;
value13 = Object.create(Promise3.prototype, {constructor: {value: Promise3}});
promise = new Promise3(function(a0) {
return (0, global.setTimeout)(a0, 10000);
});
items2[1] = promise instanceof Object ? promise : value13;
await Reflect.apply(race, Promise, [items2]);
if (false) {
return undefined;
}
r11 = object;
binding = env2_5;
defaultBillingCountryCode = binding.getDefaultBillingCountryCode();
defaultPaymentSource = env2_5.defaultPaymentSource;
value18 = null;
id = value18 == defaultPaymentSource ? value5 : defaultPaymentSource.id;
r4 = value18 != id ? id : value18;
binding = env2_6;
premiumTypeSubscription = binding.getPremiumTypeSubscription();
r4 = value18 != premiumTypeSubscription && value18 != premiumTypeSubscription.paymentSourceId ? premiumTypeSubscription.paymentSourceId : r4;
if (value18 !== defaultBillingCountryCode) {
r5 = defaultBillingCountryCode;
} else {
ipCountryCode = env2_4.ipCountryCode;
value22 = value18 != ipCountryCode;
r5 = value22 ? ipCountryCode : value18;
r11 = value22;
}
object = {};
if (value18 != r5) {
object.country_code = r5;
}
if (value18 != r4) {
object.payment_source_id = r4;
}
if (value18 != r5) {
r4 = typeof value !== 'string' ? value : {'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: value};
query = r4.query;
if (typeof query === 'string') {
throw new global.Error('string query not supported');
}
object3 = {};
copyDataProperties(object3, object, r11);
query = r4.query;
copyDataProperties(object3, query, r11);
r4.query = object3;
return env2_0(env2_1[11]).HTTP.get(r4);
}
if (value18 == r4) {
return env2_0(env2_1[11]).HTTP.get(value);
}
r4 = typeof value !== 'string' ? value : {'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: value};
query = r4.query;
if (typeof query === 'string') {
throw new global.Error('string query not supported');
}
object3 = {};
copyDataProperties(object3, object, r11);
query = r4.query;
copyDataProperties(object3, query, r11);
r4.query = object3;
r5 = r4;
binding = env2_0;
return binding(env2_1[11]).HTTP.get(r5);
}
binding = env2_5;
defaultBillingCountryCode = binding.getDefaultBillingCountryCode();
defaultPaymentSource = env2_5.defaultPaymentSource;
value18 = null;
id = value18 == defaultPaymentSource ? value5 : defaultPaymentSource.id;
r4 = value18 != id ? id : value18;
binding = env2_6;
premiumTypeSubscription = binding.getPremiumTypeSubscription();
r4 = value18 != premiumTypeSubscription && value18 != premiumTypeSubscription.paymentSourceId ? premiumTypeSubscription.paymentSourceId : r4;
if (value18 !== defaultBillingCountryCode) {
r5 = defaultBillingCountryCode;
} else {
ipCountryCode = env2_4.ipCountryCode;
value22 = value18 != ipCountryCode;
r5 = value22 ? ipCountryCode : value18;
r11 = value22;
}
object = {};
if (value18 != r5) {
object.country_code = r5;
}
if (value18 != r4) {
object.payment_source_id = r4;
}
if (value18 != r5) {
r4 = typeof value !== 'string' ? value : {'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: value};
query = r4.query;
if (typeof query === 'string') {
throw new global.Error('string query not supported');
}
object3 = {};
copyDataProperties(object3, object, r11);
query = r4.query;
copyDataProperties(object3, query, r11);
r4.query = object3;
return env2_0(env2_1[11]).HTTP.get(r4);
}
if (value18 == r4) {
return env2_0(env2_1[11]).HTTP.get(value);
}
r4 = typeof value !== 'string' ? value : {'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: value};
query = r4.query;
if (typeof query === 'string') {
throw new global.Error('string query not supported');
}
object3 = {};
copyDataProperties(object3, object, r11);
query = r4.query;
copyDataProperties(object3, query, r11);
r4.query = object3;
r5 = r4;
binding = env2_0;
return binding(env2_1[11]).HTTP.get(r5);
}
defaultBillingCountryCode = env2_5.getDefaultBillingCountryCode();
defaultPaymentSource = env2_5.defaultPaymentSource;
value18 = null;
id = value18 == defaultPaymentSource ? value5 : defaultPaymentSource.id;
r4 = value18 != id ? id : value18;
binding = env2_6;
premiumTypeSubscription = binding.getPremiumTypeSubscription();
premiumTypeSubscription = env2_6.getPremiumTypeSubscription();
r4 = value18 != premiumTypeSubscription && value18 != premiumTypeSubscription.paymentSourceId ? premiumTypeSubscription.paymentSourceId : r4;
if (value18 !== defaultBillingCountryCode) {
r5 = defaultBillingCountryCode;
@@ -216,192 +255,165 @@ async function _fun34362(a0) { // fn#34362, source: /ci/build/discord/discord/di
if (typeof query === 'string') {
throw new global.Error('string query not supported');
}
object2 = {};
copyDataProperties(object2, object, r11);
object3 = {};
copyDataProperties(object3, object, r11);
query = r4.query;
copyDataProperties(object2, query, r11);
r4.query = object2;
copyDataProperties(object3, query, r11);
r4.query = object3;
return env2_0(env2_1[11]).HTTP.get(r4);
}
if (value18 == r4) {
return env2_0(env2_1[11]).HTTP.get(value);
}
r4 = typeof value !== 'string' ? value : {'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: value};
query = r4.query;
if (typeof query === 'string') {
r4 = typeof value !== 'string' ? value : {'url': null, 'oldFormErrors': true, 'rejectWithError': false, url: value};
if (typeof r4.query === 'string') {
throw new global.Error('string query not supported');
}
object2 = {};
copyDataProperties(object2, object, r11);
query = r4.query;
copyDataProperties(object2, query, r11);
r4.query = object2;
object3 = {};
copyDataProperties(object3, object, r11);
copyDataProperties(object3, r4.query, r11);
r4.query = object3;
r5 = r4;
binding = env2_0;
return binding(env2_1[11]).HTTP.get(r5);
const HTTP = env2_0(env2_1[11]).HTTP;
return HTTP.get(r5);
function waitForSubscriptionsToBeFetched() { // fn#34363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:608, offset: 0x01054600, size: 43 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = _fun34364();
const value2 = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(value);
return promise instanceof Object ? promise : value2;
function _fun34364() { // fn#34364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:670, offset: 0x0105462b, size: 32 bytes, params: 1, frame: 12
const env0_0 = env4_2(_fun34365);
return _fun34369;
function* _fun34365(a0) { // fn#34365, offset: 0x0105464b, size: 18 bytes, params: 2, frame: 2
return _fun34366;
function* _fun34366(a0) { // fn#34366, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:690, offset: 0x0105465d, size: 131 bytes, params: 2, frame: 14
var environment;
if (true) {
var env0_0 = a0;
var wait_343672 = wait_34367;
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__;
var binding = env6_6;
if (!binding.hasFetchedSubscriptions()) {
if (env6_4.isSubscriptionFetching) {
wait_343672();
return undefined;
}
value = env6_0(env6_1[10]);
yield value.fetchSubscriptions();
value = undefined;
if (false) {
return value;
}
}
a0();
}
function wait_34367() { // fn#34367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:772, offset: 0x010546e0, size: 58 bytes, params: 1, frame: 13
if (env7_4.isSubscriptionFetching) {
global.setTimeout(wait_34367, 50);
} else {
env0_0();
}
}
}
function wait() { // fn#34368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:772, offset: 0x0105471a, size: 58 bytes, params: 1, frame: 13
if (env6_4.isSubscriptionFetching) {
global.setTimeout(wait, 50);
} else {
env6_2();
}
}
}
function _fun34369() { // fn#34369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:899, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
}
binding = env2_5;
defaultBillingCountryCode = binding.getDefaultBillingCountryCode();
defaultPaymentSource = env2_5.defaultPaymentSource;
value18 = null;
id = value18 == defaultPaymentSource ? value5 : defaultPaymentSource.id;
r4 = value18 != id ? id : value18;
binding = env2_6;
premiumTypeSubscription = binding.getPremiumTypeSubscription();
r4 = value18 != premiumTypeSubscription && value18 != premiumTypeSubscription.paymentSourceId ? premiumTypeSubscription.paymentSourceId : r4;
if (value18 !== defaultBillingCountryCode) {
r5 = defaultBillingCountryCode;
}
function getAssetURL(a0, a1, a2, a3) { // fn#34371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:1701, offset: 0x0105476f, size: 374 bytes, params: 5, frame: 31
var r0;
var API_ENDPOINT;
var getBestMediaProxySize;
var moduleValue;
let value = a1;
const value2 = a3;
const GLOBAL_ENV = global.window.GLOBAL_ENV;
const CDN_HOST = GLOBAL_ENV.CDN_HOST;
let r13 = value2 ?? ((value.mimeType || value.mime_type) === 'video/quicktime' || (value.mimeType || value.mime_type) === 'video/mp4' ? 'mp4' : (value.mimeType || value.mime_type) === 'image/gif' ? 'gif' : 'webp');
let r2 = r13 !== 'webp' || env0_9;
r13 = !r2 ? 'png' : r13;
const r11 = typeof value === 'string' ? value : value.id;
if (CDN_HOST != null) {
r2 = '' + 'https:' + '//' + CDN_HOST + '/app-assets/' + a0 + '/store/' + r11 + '.' + r13;
} else {
ipCountryCode = env2_4.ipCountryCode;
value22 = value18 != ipCountryCode;
r5 = value22 ? ipCountryCode : value18;
r11 = value22;
API_ENDPOINT = global.window.GLOBAL_ENV.API_ENDPOINT;
value = Endpoints.STORE_ASSET(a0, r11, r13);
value = '' + 'https:' + API_ENDPOINT + value;
r2 = value;
}
object = {};
if (value18 != r5) {
object.country_code = r5;
if (a2 == null) {
r0 = r2;
} else {
value = require(1457) /* metro dependency 1457: ImageLoaderUtils */;
getBestMediaProxySize = value.getBestMediaProxySize;
moduleValue = require(1457) /* metro dependency 1457: ImageLoaderUtils */;
value = Reflect.apply(getBestMediaProxySize, value, [a2 * moduleValue.getDevicePixelRatio()]);
value = r2 + ('?size=' + value);
r0 = value;
}
if (value18 != r4) {
object.payment_source_id = r4;
return r0;
}
function nativePlatformTypeToSKUOperatingSystem(a0) { // fn#34373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:2394, offset: 0x010548e5, size: 150 bytes, params: 2, frame: 14
const PlatformTypes = (PlatformUtilsModule).PlatformTypes;
const WINDOWS = PlatformTypes.WINDOWS;
if (WINDOWS === a0) {
return OperatingSystems.WINDOWS;
}
if (value18 != r5) {
r4 = typeof value !== 'string' ? value : {'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: value};
query = r4.query;
if (typeof query === 'string') {
throw new global.Error('string query not supported');
}
object2 = {};
copyDataProperties(object2, object, r11);
query = r4.query;
copyDataProperties(object2, query, r11);
r4.query = object2;
return env2_0(env2_1[11]).HTTP.get(r4);
const OSX = PlatformTypes.OSX;
if (OSX === a0) {
return OperatingSystems.MACOS;
}
if (value18 == r4) {
return env2_0(env2_1[11]).HTTP.get(value);
const LINUX = PlatformTypes.LINUX;
if (LINUX === a0) {
return OperatingSystems.LINUX;
}
r4 = typeof value !== 'string' ? value : {'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: value};
query = r4.query;
if (typeof query === 'string') {
throw new global.Error('string query not supported');
return null;
}
function skuOperatingSystemToText(a0) { // fn#34374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:2653, offset: 0x0105497b, size: 289 bytes, params: 2, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const WINDOWS = OperatingSystems.WINDOWS;
if (WINDOWS === a0) {
return intl.string(t['0/xHFO']);
}
object2 = {};
copyDataProperties(object2, object, r11);
query = r4.query;
copyDataProperties(object2, query, r11);
r4.query = object2;
r5 = r4;
binding = env2_0;
return binding(env2_1[11]).HTTP.get(r5);
}
defaultBillingCountryCode = env2_5.getDefaultBillingCountryCode();
defaultPaymentSource = env2_5.defaultPaymentSource;
value18 = null;
id = value18 == defaultPaymentSource ? value5 : defaultPaymentSource.id;
r4 = value18 != id ? id : value18;
premiumTypeSubscription = env2_6.getPremiumTypeSubscription();
r4 = value18 != premiumTypeSubscription && value18 != premiumTypeSubscription.paymentSourceId ? premiumTypeSubscription.paymentSourceId : r4;
if (value18 !== defaultBillingCountryCode) {
r5 = defaultBillingCountryCode;
} else {
ipCountryCode = env2_4.ipCountryCode;
value22 = value18 != ipCountryCode;
r5 = value22 ? ipCountryCode : value18;
r11 = value22;
}
object = {};
if (value18 != r5) {
object.country_code = r5;
}
if (value18 != r4) {
object.payment_source_id = r4;
}
if (value18 != r5) {
r4 = typeof value !== 'string' ? value : {'url': null, 'oldFormErrors': true, 'rejectWithError': false,
url: value};
query = r4.query;
if (typeof query === 'string') {
throw new global.Error('string query not supported');
const MACOS = OperatingSystems.MACOS;
if (MACOS === a0) {
return intl.string(t.E4u4n5);
}
object2 = {};
copyDataProperties(object2, object, r11);
query = r4.query;
copyDataProperties(object2, query, r11);
r4.query = object2;
return env2_0(env2_1[11]).HTTP.get(r4);
}
if (value18 == r4) {
return env2_0(env2_1[11]).HTTP.get(value);
}
r4 = typeof value !== 'string' ? value : {'url': null, 'oldFormErrors': true, 'rejectWithError': false, url: value};
if (typeof r4.query === 'string') {
throw new global.Error('string query not supported');
}
object2 = {};
copyDataProperties(object2, object, r11);
copyDataProperties(object2, r4.query, r11);
r4.query = object2;
r5 = r4;
const HTTP = env2_0(env2_1[11]).HTTP;
return HTTP.get(r5);
}
function waitForSubscriptionsToBeFetched() { // fn#34363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:608, offset: 0x01054600, size: 43 bytes, params: 1, frame: 11
const Promise = global.Promise;
const value = _fun34364();
const value2 = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(value);
return promise instanceof Object ? promise : value2;
}
function _fun34364() { // fn#34364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:670, offset: 0x0105462b, size: 32 bytes, params: 1, frame: 12
const env0_0 = env4_2(_fun34365);
return _fun34369;
}
function* _fun34365(a0) { // fn#34365, offset: 0x0105464b, size: 18 bytes, params: 2, frame: 2
return _fun34366;
}
function* _fun34366(a0) { // fn#34366, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:690, offset: 0x0105465d, size: 131 bytes, params: 2, frame: 14
var environment;
if (true) {
var env0_0 = a0;
var closure = wait_34367;
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__.__proto__;
var binding = env6_6;
if (!binding.hasFetchedSubscriptions()) {
if (env6_4.isSubscriptionFetching) {
closure();
return undefined;
}
value = env6_0(env6_1[10]);
yield value.fetchSubscriptions();
value = undefined;
if (false) {
return value;
}
const LINUX = OperatingSystems.LINUX;
if (LINUX === a0) {
return intl.string(t.tcawo3);
}
a0();
}
}
function wait() { // fn#34368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:772, offset: 0x0105471a, size: 58 bytes, params: 1, frame: 13
if (env6_4.isSubscriptionFetching) {
global.setTimeout(wait, 50);
} else {
env6_2();
}
}
function wait_34367() { // fn#34367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4312:772, offset: 0x010546e0, size: 58 bytes, params: 1, frame: 13
if (env7_4.isSubscriptionFetching) {
global.setTimeout(wait_34367, 50);
} else {
env0_0();
const Error = global.Error;
const value = 'Unknown operating system value: ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
}
global.__d(_fun34359, 4141, [5, 1226, 3804, 3805, 3808, 661, 4142, 4140, 4221, 1457, 4223, 507, 477, 1244,
2]) /* metro module 4141, dependencies: [5, 1226, 3804, 3805, 3808, 661, 4142, 4140, 4221, 1457, 4223, 507, 477, 1244, 2] */;
+134 -133
View File
@@ -1,4 +1,18 @@
/* Metro module 8912; source: utils/StreamQualityUtils.tsx; dependencies: [31, 4399, 1226, 1867, 4294, 1878, 661, 4282, 1880, 4291, 1244, 566, 683, 2] */
import AnalyticsUtils from './AnalyticsUtils.tsx'; /* Metro dependency 683 */
import AuthenticationStore from '../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import GuildStore from '../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RTCConnectionStore from '../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import ApplicationStreamingSettingsStore from '../stores/ApplicationStreamingSettingsStore.tsx'; /* Metro dependency 4399 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PremiumConstantsModule from '../modules/premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as StreamSettingsConstantsModule from '../modules/go_live/StreamSettingsConstants.tsx'; /* Metro dependency 4282 */
import * as ConstantsModule2 from '../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
function _fun69523(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:6, offset: 0x01c75b26, size: 449 bytes, params: 8, frame: 22
let env0_0 = require;
const closure = function(a0) {
@@ -17,22 +31,7 @@ function _fun69523(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const applicationStreamingSettingsStore = importDefault(4399) /* metro dependency 4399: ApplicationStreamingSettingsStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const streamSettingsConstantsModule = require(4282) /* metro dependency 4282: StreamSettingsConstants */;
const env0_10 = streamSettingsConstantsModule.ApplicationStreamFPS;
const env0_11 = streamSettingsConstantsModule.ApplicationStreamResolutions;
const env0_12 = streamSettingsConstantsModule.ApplicationStreamSettingRequirements;
const env0_13 = streamSettingsConstantsModule.getApplicationFramerate;
const env0_14 = streamSettingsConstantsModule.getApplicationResolution;
const env0_15 = (require(1880) /* metro dependency 1880: PremiumConstants */).StreamQualitiesToPremiumType;
const env0_16 = (require(4291) /* metro dependency 4291: Constants */).ResolutionTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/StreamQualityUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/StreamQualityUtils.tsx');
exports.isPremiumResolution = isPremiumResolution;
exports.isPremiumFPS = isPremiumFPS;
exports.isPremiumRequirement = closure;
@@ -46,134 +45,136 @@ function _fun69523(global, require, importDefault, importAll, module, exports, d
exports.getMaxQuality = closure3;
exports.useMaxQuality = useMaxQuality;
exports.trackStreamSettingsUpdate = trackStreamSettingsUpdate;
}
function getPremiumRequirement(a0, a1, a2) { // fn#69525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:499, offset: 0x01c75d05, size: 50 bytes, params: 4, frame: 11
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
return ApplicationStreamSettingRequirements.find(_fun69526);
function _fun69526(a0) { // fn#69526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:552, offset: 0x01c75d37, size: 77 bytes, params: 2, frame: 4
return (a0.preset == null || a0.preset === env0_0) && a0.resolution === require && a0.fps === importDefault;
}
function getPremiumRequirement(a0, a1, a2) { // fn#69525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:499, offset: 0x01c75d05, size: 50 bytes, params: 4, frame: 11
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
return ApplicationStreamSettingRequirements.find(_fun69526);
}
function isPremiumResolution(a0) { // fn#69528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:845, offset: 0x01c75dc4, size: 141 bytes, params: 2, frame: 15
if (a0 != null) {
var env0_0 = getApplicationResolution(a0.maxResolution.type === ResolutionTypes.SOURCE ? ApplicationStreamResolutions.RESOLUTION_SOURCE : a0.maxResolution.height);
return getApplicationFramerate(a0.maxFrameRate) !== ApplicationStreamFPS.FPS_5 && ApplicationStreamSettingRequirements.find(_fun69529) == null;
}
}
function isPremiumFPS(a0) { // fn#69530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:1109, offset: 0x01c75e95, size: 67 bytes, params: 2, frame: 14
if (a0 != null) {
var env0_0 = getApplicationFramerate(a0.maxFrameRate);
return ApplicationStreamSettingRequirements.find(_fun69531) == null;
function isPremiumResolution(a0) { // fn#69528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:845, offset: 0x01c75dc4, size: 141 bytes, params: 2, frame: 15
if (a0 != null) {
var env0_0 = getApplicationResolution(a0.maxResolution.type === ResolutionTypes.SOURCE ? ApplicationStreamResolutions.RESOLUTION_SOURCE : a0.maxResolution.height);
return getApplicationFramerate(a0.maxFrameRate) !== ApplicationStreamFPS.FPS_5 && ApplicationStreamSettingRequirements.find(_fun69529) == null;
}
function _fun69529(a0) { // fn#69529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:1027, offset: 0x01c75e51, size: 68 bytes, params: 2, frame: 12
var r0;
var fps;
const resolution = a0.resolution;
let value = resolution === env0_0;
if (value) {
fps = a0.fps;
value = environment.__proto__;
value = fps !== ApplicationStreamFPS.FPS_5;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__;
value = !isPremiumRequirement(a0);
r0 = value;
}
return r0;
}
}
}
function getResolutionText(a0) { // fn#69532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:1344, offset: 0x01c75f02, size: 156 bytes, params: 2, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const type = a0.type;
const SOURCE = ResolutionTypes.SOURCE;
return type === SOURCE ? intl.string(t.XjXqzh) : intl.formatToPlainString(t.TEOC0I, {resolution: a0.height});
}
function isPremiumFPS(a0) { // fn#69530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:1109, offset: 0x01c75e95, size: 67 bytes, params: 2, frame: 14
if (a0 != null) {
var env0_0 = getApplicationFramerate(a0.maxFrameRate);
return ApplicationStreamSettingRequirements.find(_fun69531) == null;
}
function _fun69531(a0) { // fn#69531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:1191, offset: 0x01c75ed8, size: 42 bytes, params: 2, frame: 12
var r0;
const fps = a0.fps;
let value = fps === env0_0;
if (value) {
value = environment.__proto__;
value = !isPremiumRequirement(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function useMaxQuality(a0) { // fn#69534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:1672, offset: 0x01c75fe9, size: 152 bytes, params: 2, frame: 20
const env0_0 = a0;
return env0_3.useMemo(_fun69537,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
return AuthenticationStore.getId();
}), a0,
(require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ApplicationStreamingSettingsStore],
function() {
return ApplicationStreamingSettingsStore.getState();
})]);
}
function trackStreamSettingsUpdate(a0, a1, a2, a3) { // fn#69538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:2011, offset: 0x01c7612b, size: 263 bytes, params: 5, frame: 25
const getPremiumRequirementBinding = getPremiumRequirement;
const value2 = undefined;
const premiumRequirementBinding = getPremiumRequirementBinding(a0, a1, a2);
const currentUser = UserStore.getCurrentUser();
const guildId = RTCConnectionStore.getGuildId();
const value6 = null;
const r12 = value6 != guildId ? GuildStore.getGuild(guildId) : value6;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const STREAM_SETTINGS_UPDATE = AnalyticEvents.STREAM_SETTINGS_UPDATE;
Reflect.apply(track, defaultImport, [STREAM_SETTINGS_UPDATE,
{user_premium_tier: value6 == currentUser ? value2 : currentUser.premiumType,
guild_premium_tier: value6 == r12 ? value2 : r12.premiumTier,
stream_quality_user_premium_tier: value6 != (value6 == premiumRequirementBinding ? value2 : premiumRequirementBinding.quality) ? StreamQualitiesToPremiumType[premiumRequirementBinding.quality] : value6,
stream_quality_guild_premium_tier: value6 == premiumRequirementBinding ? value2 : premiumRequirementBinding.guildPremiumTier,
stream_quality_preset: a0, stream_quality_resolution: a1, stream_quality_frame_rate: a2,
soundshare_enabled: a3}]);
return value2;
}
function _fun69526(a0) { // fn#69526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:552, offset: 0x01c75d37, size: 77 bytes, params: 2, frame: 4
return (a0.preset == null || a0.preset === env0_0) && a0.resolution === require && a0.fps === importDefault;
}
function _fun69529(a0) { // fn#69529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:1027, offset: 0x01c75e51, size: 68 bytes, params: 2, frame: 12
var r0;
var fps;
const resolution = a0.resolution;
let value = resolution === env0_0;
if (value) {
fps = a0.fps;
value = environment.__proto__;
value = fps !== ApplicationStreamFPS.FPS_5;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__;
value = !isPremiumRequirement(a0);
r0 = value;
function getResolutionText(a0) { // fn#69532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:1344, offset: 0x01c75f02, size: 156 bytes, params: 2, frame: 17
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const type = a0.type;
const SOURCE = ResolutionTypes.SOURCE;
return type === SOURCE ? intl.string(t.XjXqzh) : intl.formatToPlainString(t.TEOC0I, {resolution: a0.height});
}
return r0;
}
function _fun69531(a0) { // fn#69531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:1191, offset: 0x01c75ed8, size: 42 bytes, params: 2, frame: 12
var r0;
const fps = a0.fps;
let value = fps === env0_0;
if (value) {
value = environment.__proto__;
value = !isPremiumRequirement(a0);
r0 = value;
} else {
r0 = value;
function useMaxQuality(a0) { // fn#69534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:1672, offset: 0x01c75fe9, size: 152 bytes, params: 2, frame: 20
const env0_0 = a0;
return ReactModule.useMemo(_fun69537,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
return AuthenticationStore.getId();
}), a0,
(require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ApplicationStreamingSettingsStore],
function() {
return ApplicationStreamingSettingsStore.getState();
})]);
function _fun69537() { // fn#69537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:1833, offset: 0x01c760a7, size: 132 bytes, params: 1, frame: 14
var r0;
var value2;
var object;
var binding;
var object2;
var resolution;
const idBinding = id;
const user = env0_0.user;
if (idBinding === user.id) {
object = {};
binding = env0_1;
object.maxFrameRate = binding.fps;
object2 = {};
resolution = binding.resolution;
object2.height = resolution;
object2.width = 0;
resolution = binding.resolution;
object2.type = resolution === 0 ? ResolutionTypes.SOURCE : ResolutionTypes.FIXED;
object.maxResolution = object2;
r0 = object;
} else {
value2 = environment.__proto__;
r0 = getMaxQuality(env0_0);
}
return r0;
}
}
return r0;
}
function _fun69537() { // fn#69537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:1833, offset: 0x01c760a7, size: 132 bytes, params: 1, frame: 14
var r0;
var value2;
var object3;
var binding;
var object4;
var resolution;
const idBinding = id;
const user = env0_0.user;
if (idBinding === user.id) {
object3 = {};
binding = env0_1;
object3.maxFrameRate = binding.fps;
object4 = {};
resolution = binding.resolution;
object4.height = resolution;
object4.width = 0;
resolution = binding.resolution;
object4.type = resolution === 0 ? ResolutionTypes.SOURCE : ResolutionTypes.FIXED;
object3.maxResolution = object4;
r0 = object3;
} else {
value2 = environment.__proto__;
r0 = getMaxQuality(env0_0);
function trackStreamSettingsUpdate(a0, a1, a2, a3) { // fn#69538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9097:2011, offset: 0x01c7612b, size: 263 bytes, params: 5, frame: 25
const getPremiumRequirementBinding = getPremiumRequirement;
const value2 = undefined;
const premiumRequirementBinding = getPremiumRequirementBinding(a0, a1, a2);
const currentUser = UserStore.getCurrentUser();
const guildId = RTCConnectionStore.getGuildId();
const value6 = null;
const r12 = value6 != guildId ? GuildStore.getGuild(guildId) : value6;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const STREAM_SETTINGS_UPDATE = AnalyticEvents.STREAM_SETTINGS_UPDATE;
Reflect.apply(track, defaultImport, [STREAM_SETTINGS_UPDATE,
{user_premium_tier: value6 == currentUser ? value2 : currentUser.premiumType,
guild_premium_tier: value6 == r12 ? value2 : r12.premiumTier,
stream_quality_user_premium_tier: value6 != (value6 == premiumRequirementBinding ? value2 : premiumRequirementBinding.quality) ? StreamQualitiesToPremiumType[premiumRequirementBinding.quality] : value6,
stream_quality_guild_premium_tier: value6 == premiumRequirementBinding ? value2 : premiumRequirementBinding.guildPremiumTier,
stream_quality_preset: a0, stream_quality_resolution: a1, stream_quality_frame_rate: a2,
soundshare_enabled: a3}]);
return value2;
}
return r0;
}
global.__d(_fun69523, 8912, [31, 4399, 1226, 1867, 4294, 1878, 661, 4282, 1880, 4291, 1244, 566, 683,
2]) /* metro module 8912, dependencies: [31, 4399, 1226, 1867, 4294, 1878, 661, 4282, 1880, 4291, 1244, 566, 683, 2] */;
+4 -1
View File
@@ -1,8 +1,10 @@
/* Metro module 1861; source: utils/StringUtils.tsx; dependencies: [2, 1862] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun20035(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1988:6, offset: 0x00ebd17c, size: 214 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/StringUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/StringUtils.tsx');
exports.isNullOrEmpty = function(a0) {
return a0 == null || a0.length === 0;
};
@@ -15,3 +17,4 @@ function _fun20035(global, require, importDefault, importAll, module, exports, d
exports.normalize = (require(1862) /* metro dependency 1862: StringUtils */).normalize;
}
global.__d(_fun20035, 1861, [2, 1862]) /* metro module 1861, dependencies: [2, 1862] */;
File diff suppressed because it is too large. Load diff
+19 -16
View File
@@ -1,9 +1,11 @@
/* Metro module 11977; source: utils/StylesheetUtils.tsx; dependencies: [1861, 2] */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun91946(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12163:6, offset: 0x020778a9, size: 96 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/StylesheetUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/StylesheetUtils.tsx');
exports.getClass = function(a0, a1, a2) {
var r4;
var value = copyRestArgs(2, r4);
@@ -14,22 +16,23 @@ function _fun91946(global, require, importDefault, importAll, module, exports, d
return property;
}
};
}
function getClass(a0, a1, a2) { // fn#91947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12163:162, offset: 0x02077909, size: 73 bytes, params: 4, frame: 13
let value = copyRestArgs(2, undefined);
value = value.reduce(_fun91948, '');
value = '' + a1 + value;
const property = a0[value];
if (property != null) {
return property;
}
function _fun91948(a0, a1) { // fn#91948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12163:215, offset: 0x02077952, size: 47 bytes, params: 3, frame: 11
let value = environment.__proto__;
value = require(1861) /* metro dependency 1861: StringUtils */;
value = value.upperCaseFirstChar(a1);
return a0 + value;
}
function getClass(a0, a1, a2) { // fn#91947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12163:162, offset: 0x02077909, size: 73 bytes, params: 4, frame: 13
let value = copyRestArgs(2, undefined);
value = value.reduce(_fun91948, '');
value = '' + a1 + value;
const property = a0[value];
if (property != null) {
return property;
}
}
function _fun91948(a0, a1) { // fn#91948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12163:215, offset: 0x02077952, size: 47 bytes, params: 3, frame: 11
let value = environment.__proto__;
value = require(1861) /* metro dependency 1861: StringUtils */;
value = value.upperCaseFirstChar(a1);
return a0 + value;
}
global.__d(_fun91946, 11977, [1861, 2]) /* metro module 11977, dependencies: [1861, 2] */;
+257 -241
View File
@@ -1,4 +1,14 @@
/* Metro module 8457; source: utils/SubscriptionUtils.tsx; dependencies: [57, 31, 3807, 661, 1880, 44, 8458, 3802, 6847, 566, 8460, 3738, 2] */
import Module00044 from '../by-id/module-00044.js'; /* Metro dependency 44 */
import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */
import SubscriptionPlanStore from '../stores/billing/SubscriptionPlanStore.tsx'; /* Metro dependency 3807 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
import * as CheckoutErrorModule from '../modules/checkout/CheckoutError.tsx'; /* Metro dependency 8458 */
import * as PauseDurationModule from '../external/discord_common/js/shared/shared-constants/PauseDuration.tsx'; /* Metro dependency 8460 */
function _fun67168(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:6, offset: 0x01c18522, size: 350 bytes, params: 8, frame: 21
const env0_0 = require;
const _arrayLikeToArray_67171 = function(a0, a1) {
@@ -47,22 +57,19 @@ function _fun67168(global, require, importDefault, importAll, module, exports, d
const closure = function({items}) {
return items.map(_fun67173);
};
const closure2 = subscriptionCanSwitchImmediately;
const subscriptionCanSwitchImmediately2 = subscriptionCanSwitchImmediately;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const subscriptionPlanStore = importDefault(3807) /* metro dependency 3807: SubscriptionPlanStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_6 = value.SubscriptionStatusTypes;
const env0_7 = value.SubscriptionTypes;
value = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_8 = value.SubscriptionPlans;
const env0_9 = value.SubscriptionPlanInfo;
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/SubscriptionUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/SubscriptionUtils.tsx');
exports.getSubscriptionPlans = closure;
exports.getSubscriptionSKUs = getSubscriptionSKUs;
exports.subscriptionCanSwitchImmediately = closure2;
exports.subscriptionCanSwitchImmediately = subscriptionCanSwitchImmediately2;
exports.subscriptionCanDowngrade = function(a0, a1, a2) {
return !subscriptionCanSwitchImmediately(a0, a1, a2);
};
@@ -70,265 +77,274 @@ function _fun67168(global, require, importDefault, importAll, module, exports, d
exports.useGetOrFetchSubscriptionPlan = useGetOrFetchSubscriptionPlan;
exports.getSubscriptionPauseDurations = getSubscriptionPauseDurations;
exports.didBeginPurchaseFlowOnFractionalPremium = didBeginPurchaseFlowOnFractionalPremium;
}
function _createForOfIteratorHelperLoose_67169(a0, a1) { // fn#67169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:250, offset: 0x01c18680, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_67169(a0, a1) { // fn#67169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:250, offset: 0x01c18680, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun67170;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_67171(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun67170;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_67171(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_67171(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_67171(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun67170;
}
return _fun67170;
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun67170() { // fn#67170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:821, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function getSubscriptionPlans({items}) { // fn#67172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:1160, offset: 0x01c187f4, size: 30 bytes, params: 2, frame: 11
return items.map(_fun67173);
}
function getSubscriptionPlans({items}) { // fn#67172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:1160, offset: 0x01c187f4, size: 30 bytes, params: 2, frame: 11
return items.map(_fun67173);
function _fun67173({planId}) { // fn#67173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:1213, offset: 0x01c18812, size: 68 bytes, params: 2, frame: 14
const value = environment.__proto__;
const value2 = SubscriptionPlanStore.get(planId);
(Module00044)(value2 != null, 'Unable to fetch plan');
return value2;
}
function subscriptionCanSwitchImmediately(a0, a1, a2) { // fn#67174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:1291, offset: 0x01c18856, size: 274 bytes, params: 4, frame: 14
var object4;
const CheckoutError = (require(8458) /* metro dependency 8458: CheckoutError */).CheckoutError;
var object2;
var object3;
let value = a0.getCurrentSubscriptionPlanIdForGroup(a2);
const type = a0.type;
const PREMIUM = SubscriptionTypes.PREMIUM;
if (type !== PREMIUM) {
object4 = {oldPlanId: value, newPlanId: a1};
if (value == null) {
object3 = {message: 'Current subscription has no plan in group', extraSentryInformation: object4};
throw new CheckoutError();
}
if (value !== SubscriptionPlans.PREMIUM_YEAR_TIER_1) {
value = a2.indexOf(value);
return value < a2.indexOf(a1);
}
if (a1 === SubscriptionPlans.PREMIUM_MONTH_TIER_2) {
object2 = {message: 'Unexpected plan switch', extraSentryInformation: object4};
throw new CheckoutError();
}
} else {
if (value == null) {
return true;
}
object4 = {oldPlanId: value, newPlanId: a1};
if (value == null) {
object3 = {message: 'Current subscription has no plan in group', extraSentryInformation: object4};
throw new CheckoutError();
}
if (value !== SubscriptionPlans.PREMIUM_YEAR_TIER_1) {
value = a2.indexOf(value);
return value < a2.indexOf(a1);
}
if (a1 === SubscriptionPlans.PREMIUM_MONTH_TIER_2) {
object2 = {message: 'Unexpected plan switch', extraSentryInformation: object4};
throw new CheckoutError();
}
}
value = a2.indexOf(value);
return value < a2.indexOf(a1);
}
function getSubscriptionSKUs(a0) { // fn#67175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:1901, offset: 0x01c18968, size: 38 bytes, params: 2, frame: 11
return getSubscriptionPlans(a0).map(function(a0) {
return a0.skuId;
});
}
function getOrFetchSubscriptionPlan(a0, a1) { // fn#67178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:2199, offset: 0x01c189ac, size: 180 bytes, params: 3, frame: 19
var property;
var moduleValue;
var value4;
const value2 = SubscriptionPlanStore.get(a0);
if (value2 == null) {
property = SubscriptionPlanInfo[a0];
(importDefault(44) /* metro dependency 44 */)(property != null, 'Missing hardcoded subscriptionPlan: ' + a0);
moduleValue = require(3802) /* metro dependency 3802: PremiumUtils */;
value4 = moduleValue.castPremiumSubscriptionAsSkuId(property.skuId);
if (!SubscriptionPlanStore.isFetchingForSKU(value4)) {
(require(6847) /* metro dependency 6847: SubscriptionPlanActionCreators */).fetchSubscriptionPlansForSKU(value4,
a1);
}
}
return value2;
}
function useGetOrFetchSubscriptionPlan(a0, a1) { // fn#67179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:2502, offset: 0x01c18a60, size: 150 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const value3 = env0_3(Reflect.apply(useStateFromStoresArray, fluxModule, [[SubscriptionPlanStore], _fun67180]), 2);
const property = value3[0];
env0_4.useEffect(_fun67181, [property, a0, a1, value3[1]]);
return property;
}
function getSubscriptionPauseDurations(a0) { // fn#67182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:2957, offset: 0x01c18bf5, size: 327 bytes, params: 2, frame: 21
var r4;
var items;
var value4;
var value5;
var Math;
var value6;
var value7;
var value8;
var done;
var value9;
var value10;
const Object = global.Object;
const keys = Object.keys;
const PauseDuration = (require(8460) /* metro dependency 8460: PauseDuration */).PauseDuration;
const value3 = Reflect.apply(keys, Object, [PauseDuration]).filter(function(a0) {
return global.isNaN((0, global.Number)(a0));
});
const status = a0.status;
const PAUSED = SubscriptionStatusTypes.PAUSED;
if (status !== PAUSED) {
return {durations: value3, currentDaysPaused: 0};
}
if (a0.pauseEndsAt != null) {
value4 = (importDefault(3738) /* metro dependency 3738 */)(a0.currentPeriodStart);
value5 = (importDefault(3738) /* metro dependency 3738 */)(a0.pauseEndsAt);
Math = global.Math;
value6 = Math.round(value5.diff(value4, 'days', true));
items = [];
value7 = _createForOfIteratorHelperLoose_67169(value3);
value8 = value7();
done = value8.done;
if (!done) {
r4 = value8;
while (true) {
value9 = r4.value;
if (PauseDuration[value9] > value6) {
items.push(value9);
}
value10 = value7();
done = value10.done;
if (done) {
break;
}
r4 = value10;
continue;
function subscriptionCanSwitchImmediately(a0, a1, a2) { // fn#67174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:1291, offset: 0x01c18856, size: 274 bytes, params: 4, frame: 14
var object;
const CheckoutError = (CheckoutErrorModule).CheckoutError;
var object2;
var object3;
let value = a0.getCurrentSubscriptionPlanIdForGroup(a2);
const type = a0.type;
const PREMIUM = SubscriptionTypes.PREMIUM;
if (type !== PREMIUM) {
object = {oldPlanId: value, newPlanId: a1};
if (value == null) {
object3 = {message: 'Current subscription has no plan in group', extraSentryInformation: object};
throw new CheckoutError();
}
if (value !== SubscriptionPlans.PREMIUM_YEAR_TIER_1) {
value = a2.indexOf(value);
return value < a2.indexOf(a1);
}
if (a1 === SubscriptionPlans.PREMIUM_MONTH_TIER_2) {
object2 = {message: 'Unexpected plan switch', extraSentryInformation: object};
throw new CheckoutError();
}
} else {
if (value == null) {
return true;
}
object = {oldPlanId: value, newPlanId: a1};
if (value == null) {
object3 = {message: 'Current subscription has no plan in group', extraSentryInformation: object};
throw new CheckoutError();
}
if (value !== SubscriptionPlans.PREMIUM_YEAR_TIER_1) {
value = a2.indexOf(value);
return value < a2.indexOf(a1);
}
if (a1 === SubscriptionPlans.PREMIUM_MONTH_TIER_2) {
object2 = {message: 'Unexpected plan switch', extraSentryInformation: object};
throw new CheckoutError();
}
}
return {durations: items, currentDaysPaused: value6};
value = a2.indexOf(value);
return value < a2.indexOf(a1);
}
return {durations: [], currentDaysPaused: 0};
}
function didBeginPurchaseFlowOnFractionalPremium(a0) { // fn#67184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:3499, offset: 0x01c18d3c, size: 93 bytes, params: 2, frame: 14
var r0;
let value = a0 != null;
if (value) {
value = importDefault(3738) /* metro dependency 3738 */;
value = value.isMoment(a0);
r0 = value;
} else {
r0 = value;
function getSubscriptionSKUs(a0) { // fn#67175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:1901, offset: 0x01c18968, size: 38 bytes, params: 2, frame: 11
return getSubscriptionPlans(a0).map(function(a0) {
return a0.skuId;
});
}
r0 = r0 && a0.isSameOrAfter((importDefault(3738) /* metro dependency 3738 */)());
return r0;
}
function _fun67173({planId}) { // fn#67173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:1213, offset: 0x01c18812, size: 68 bytes, params: 2, frame: 14
const value = environment.__proto__;
const value2 = SubscriptionPlanStore.get(planId);
(importDefault(44) /* metro dependency 44 */)(value2 != null, 'Unable to fetch plan');
return value2;
}
function _fun67180() { // fn#67180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:2590, offset: 0x01c18af6, size: 83 bytes, params: 1, frame: 13
var r1;
const value2 = null;
const r2 = value2 != env0_0 ? SubscriptionPlanStore.get(env0_0) : value2;
const items2 = [r2];
let value = value2 != r2;
if (value) {
value = environment.__proto__;
value = SubscriptionPlanStore.isFetchingForSKU(r2.skuId);
r1 = value;
} else {
r1 = value;
}
items2[1] = r1;
return items2;
}
function _fun67181() { // fn#67181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:2716, offset: 0x01c18b49, size: 172 bytes, params: 1, frame: 19
var value2;
var binding;
var property;
var moduleValue;
var fetchSubscriptionPlansForSKU;
var moduleValue2;
if (env0_2 == null) {
if (env0_0 != null) {
if (!env0_3) {
value2 = environment.__proto__;
binding = env0_0;
property = SubscriptionPlanInfo[binding];
(importDefault(44) /* metro dependency 44 */)(property != null,
'Missing hardcoded subscriptionPlan: ' + binding);
moduleValue = require(6847) /* metro dependency 6847: SubscriptionPlanActionCreators */;
fetchSubscriptionPlansForSKU = moduleValue.fetchSubscriptionPlansForSKU;
moduleValue2 = require(3802) /* metro dependency 3802: PremiumUtils */;
Reflect.apply(fetchSubscriptionPlansForSKU, moduleValue,
[moduleValue2.castPremiumSubscriptionAsSkuId(property.skuId), require]);
function getOrFetchSubscriptionPlan(a0, a1) { // fn#67178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:2199, offset: 0x01c189ac, size: 180 bytes, params: 3, frame: 19
var property;
var moduleValue;
var value4;
const value2 = SubscriptionPlanStore.get(a0);
if (value2 == null) {
property = SubscriptionPlanInfo[a0];
(importDefault(44) /* metro dependency 44 */)(property != null, 'Missing hardcoded subscriptionPlan: ' + a0);
moduleValue = require(3802) /* metro dependency 3802: PremiumUtils */;
value4 = moduleValue.castPremiumSubscriptionAsSkuId(property.skuId);
subscriptionPlanStoreBinding = SubscriptionPlanStore;
if (!subscriptionPlanStoreBinding.isFetchingForSKU(value4)) {
(require(6847) /* metro dependency 6847: SubscriptionPlanActionCreators */).fetchSubscriptionPlansForSKU(value4,
a1);
}
}
return value2;
}
function useGetOrFetchSubscriptionPlan(a0, a1) { // fn#67179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:2502, offset: 0x01c18a60, size: 150 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const useStateFromStoresArray = FluxModule.useStateFromStoresArray;
const value3 = Module00057(Reflect.apply(useStateFromStoresArray, FluxModule, [[SubscriptionPlanStore], _fun67180]), 2);
const property = value3[0];
ReactModule.useEffect(_fun67181, [property, a0, a1, value3[1]]);
return property;
function _fun67180() { // fn#67180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:2590, offset: 0x01c18af6, size: 83 bytes, params: 1, frame: 13
var r1;
var subscriptionPlanStoreBinding;
const value2 = null;
const r2 = value2 != env0_0 ? SubscriptionPlanStore.get(env0_0) : value2;
const items2 = [r2];
let value = value2 != r2;
if (value) {
value = environment.__proto__;
subscriptionPlanStoreBinding = SubscriptionPlanStore;
value = subscriptionPlanStoreBinding.isFetchingForSKU(r2.skuId);
r1 = value;
} else {
r1 = value;
}
items2[1] = r1;
return items2;
}
function _fun67181() { // fn#67181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:2716, offset: 0x01c18b49, size: 172 bytes, params: 1, frame: 19
var value2;
var binding;
var property;
var moduleValue;
var fetchSubscriptionPlansForSKU;
var moduleValue2;
if (env0_2 == null) {
if (env0_0 != null) {
if (!Module00057) {
value2 = environment.__proto__;
binding = env0_0;
property = SubscriptionPlanInfo[binding];
(importDefault(44) /* metro dependency 44 */)(property != null,
'Missing hardcoded subscriptionPlan: ' + binding);
moduleValue = require(6847) /* metro dependency 6847: SubscriptionPlanActionCreators */;
fetchSubscriptionPlansForSKU = moduleValue.fetchSubscriptionPlansForSKU;
moduleValue2 = require(3802) /* metro dependency 3802: PremiumUtils */;
Reflect.apply(fetchSubscriptionPlansForSKU, moduleValue,
[moduleValue2.castPremiumSubscriptionAsSkuId(property.skuId), require]);
}
}
}
}
}
function getSubscriptionPauseDurations(a0) { // fn#67182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:2957, offset: 0x01c18bf5, size: 327 bytes, params: 2, frame: 21
var r4;
var items2;
var value4;
var value5;
var Math;
var value6;
var value7;
var value8;
var done;
var value9;
var value10;
const Object = global.Object;
const keys = Object.keys;
const PauseDuration = (PauseDurationModule).PauseDuration;
const value3 = Reflect.apply(keys, Object, [PauseDuration]).filter(function(a0) {
return global.isNaN((0, global.Number)(a0));
});
const status = a0.status;
const PAUSED = SubscriptionStatusTypes.PAUSED;
if (status !== PAUSED) {
return {durations: value3, currentDaysPaused: 0};
}
if (a0.pauseEndsAt != null) {
value4 = (importDefault(3738) /* metro dependency 3738 */)(a0.currentPeriodStart);
value5 = (importDefault(3738) /* metro dependency 3738 */)(a0.pauseEndsAt);
Math = global.Math;
value6 = Math.round(value5.diff(value4, 'days', true));
items2 = [];
value7 = _createForOfIteratorHelperLoose_67169(value3);
value8 = value7();
done = value8.done;
if (!done) {
r4 = value8;
while (true) {
value9 = r4.value;
if (PauseDuration[value9] > value6) {
items2.push(value9);
}
value10 = value7();
done = value10.done;
if (done) {
break;
}
r4 = value10;
continue;
}
}
return {durations: items2, currentDaysPaused: value6};
}
return {durations: [], currentDaysPaused: 0};
}
function didBeginPurchaseFlowOnFractionalPremium(a0) { // fn#67184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8642:3499, offset: 0x01c18d3c, size: 93 bytes, params: 2, frame: 14
var r0;
let value = a0 != null;
if (value) {
value = importDefault(3738) /* metro dependency 3738 */;
value = value.isMoment(a0);
r0 = value;
} else {
r0 = value;
}
r0 = r0 && a0.isSameOrAfter((importDefault(3738) /* metro dependency 3738 */)());
return r0;
}
}
global.__d(_fun67168, 8457, [57, 31, 3807, 661, 1880, 44, 8458, 3802, 6847, 566, 8460, 3738,
2]) /* metro module 8457, dependencies: [57, 31, 3807, 661, 1880, 44, 8458, 3802, 6847, 566, 8460, 3738, 2] */;
File diff suppressed because it is too large. Load diff
Loaded 100 of 22448 files, more files were not shown because too many files have changed in this diff. Show more