Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,157 @@
/* Metro module 12953; source: modules/devtools/AnalyticsLogStore.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 7112, 490, 491, 566, 694, 2] */
function _fun98689(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#98689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13143:6, offset: 0x021b2524, size: 388 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const developerExperimentStore = importDefault(7112) /* metro dependency 7112: DeveloperExperimentStore */;
const env0_10 = [];
const env0_12 = [];
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun98694(Store);
value.displayName = 'AnalyticsLogStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {TRACK: TRACK_98701,
TRACK_TRIGGER: TRACK_TRIGGER, SET_TRACK_TRIGGERS: function(a0) {
env0_13 = a0.enabled;
}, ANALYTICS_LOG_CLEAR: ANALYTICS_LOG_CLEAR});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/AnalyticsLogStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_98690() { // fn#98690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13143:168, offset: 0x021b26a8, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_98690_isNativeReflectConstruct = function() {
return !!result;
})();
}
function resolveFingerprint(a0) { // fn#98693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13143:388, offset: 0x021b270a, size: 66 bytes, params: 2, frame: 13
var r0;
var value;
if (a0 != null) {
value = require(490) /* metro dependency 490: FingerprintUtils */;
value = value.extractId(a0);
r0 = value;
} else {
r0 = AuthenticationStore.getId();
}
return r0;
}
function _fun98694(a0) { // fn#98694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13143:471, offset: 0x021b274c, size: 180 bytes, params: 2, frame: 16
const closure = AnalyticsLogStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore, DeveloperExperimentStore);
}}, {key: 'loggedEvents', get: get_98697}, {key: 'loggedEventsVersion', get: get_98698}, {key: 'loggedTriggers',
get: get_98699}, {key: 'trackTriggers', get: get_98700}]);
}
function TRACK_98701({event, properties, fingerprint}) { // fn#98701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13143:1091, offset: 0x021b2800, size: 217 bytes, params: 2, frame: 17
var binding;
var push;
var object2;
var binding2;
var value2;
var Date;
var value3;
var date;
var slice;
var Math;
if (DeveloperExperimentStore.isDeveloper) {
binding = env0_10;
push = binding.push;
object2 = {};
binding2 = env0_9;
value2 = typeof binding2 === 'bigint' ? binding2 : +binding2;
env0_9 = typeof value2 === 'bigint' ? value2 + 1n : +value2 + 1;
object2.key = value2.toString();
object2.event = event;
object2.properties = properties;
object2.fingerprint = resolveFingerprint(fingerprint);
Date = global.Date;
value3 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
object2.timestamp = date instanceof Object ? date : value3;
Reflect.apply(push, binding, [object2]);
binding = env0_11;
env0_11 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
if (env0_10.length > 500) {
binding = env0_10;
slice = binding.slice;
Math = global.Math;
env0_10 = Reflect.apply(slice, binding, [-Math.floor(250)]);
}
}
}
function TRACK_TRIGGER({experimentId, descriptor, exposureType, excluded, location, previouslyTracked}) { // fn#98702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13143:1335, offset: 0x021b28d9, size: 233 bytes, params: 2, frame: 24
var binding;
var items2;
var value2;
var object2;
var Date;
var value3;
var date;
let r1 = DeveloperExperimentStore.isDeveloper && env0_13;
if (r1) {
binding = env0_12;
items2 = [];
value2 = arraySpread(items2, binding, 0, undefined);
object2 = {};
object2.key = (require(491) /* metro dependency 491 */).v4();
object2.experimentId = experimentId;
object2.descriptor = descriptor;
object2.exposureType = exposureType;
object2.excluded = excluded;
object2.location = location;
object2.previouslyTracked = previouslyTracked;
Date = global.Date;
value3 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
object2.timestamp = date instanceof Object ? date : value3;
items2[value2] = object2;
value2 + 1;
env0_12 = items2;
r1 = items2.length > 500;
}
if (r1) {
env0_12.shift();
}
}
function ANALYTICS_LOG_CLEAR() { // fn#98704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13143:1715, offset: 0x021b29d5, size: 34 bytes, params: 1, frame: 2
env0_10 = [];
const binding = env0_11;
env0_11 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
env0_12 = [];
}
+12
View File
@@ -0,0 +1,12 @@
/* Metro module 695; source: modules/devtools/Constants.tsx; dependencies: [696, 2] */
function _fun8466(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#8466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:822:6, offset: 0x00d41161, size: 125 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(696) /* metro dependency 696: shimsNative */;
const getRadii = value.getRadii;
value = 2 * Reflect.apply(getRadii, value, []).xl;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/Constants.tsx');
exports.STORAGE_KEY_LOG_DISPATCHES = 'DevToolsLogDispatches';
exports.DEV_WIDGET_SIZE = value;
}
@@ -0,0 +1,26 @@
/* Metro module 13126; source: modules/devtools/DevToolsActionCreators.tsx; dependencies: [7111, 694, 2] */
function _fun100338(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13316:6, offset: 0x021e54d4, size: 161 bytes, params: 8, frame: 19
const closure = updateDevToolsSettings;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const devToolsSettingsStore = importDefault(7111) /* metro dependency 7111: DevToolsSettingsStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/DevToolsActionCreators.tsx');
exports.updateDevToolsSettings = closure;
exports.toggleDisplayDevTools = function() {
updateDevToolsSettings({displayTools: !DevToolsSettingsStore.displayTools});
};
exports.openDevTools = function(a0, a1) {
updateDevToolsSettings({displayTools: true, lastOpenTabId: a0, lastOpenSubTabId: a1});
};
exports.clearAnalyticsLog = clearAnalyticsLog;
}
function updateDevToolsSettings(a0) { // fn#100339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13316:106, offset: 0x021e5575, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DEV_TOOLS_SETTINGS_UPDATE',
settings: a0});
}
function clearAnalyticsLog() { // fn#100342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13316:583, offset: 0x021e55fb, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ANALYTICS_LOG_CLEAR'});
}
@@ -0,0 +1,79 @@
/* Metro module 14246; source: modules/devtools/DevToolsGuildPowerupsConstants.tsx; dependencies: [1365, 2] */
function _fun107763(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14443:6, offset: 0x02307f0c, size: 501 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const GUILD_POWERUP_PERKS_COACHMARK = DismissibleContent.GUILD_POWERUP_PERKS_COACHMARK;
items4 = [GUILD_POWERUP_PERKS_COACHMARK];
const GUILD_POWERUPS_OVERVIEW_SIDEBAR_COACHMARK = DismissibleContent.GUILD_POWERUPS_OVERVIEW_SIDEBAR_COACHMARK;
items4[1] = GUILD_POWERUPS_OVERVIEW_SIDEBAR_COACHMARK;
const GUILD_POWERUP_NOTIFICATION = DismissibleContent.GUILD_POWERUP_NOTIFICATION;
items4[2] = GUILD_POWERUP_NOTIFICATION;
const GUILD_TAG_AVAILABLE_COACHMARK = DismissibleContent.GUILD_TAG_AVAILABLE_COACHMARK;
items4[3] = GUILD_TAG_AVAILABLE_COACHMARK;
const GUILD_POWERUP_NEW_PERK_AVAILABLE_COACHMARK = DismissibleContent.GUILD_POWERUP_NEW_PERK_AVAILABLE_COACHMARK;
items4[4] = GUILD_POWERUP_NEW_PERK_AVAILABLE_COACHMARK;
const DismissibleGuildContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleGuildContent;
const GUILD_POWERUP_LEVEL_1_COACHMARK = DismissibleGuildContent.GUILD_POWERUP_LEVEL_1_COACHMARK;
const items5 = [GUILD_POWERUP_LEVEL_1_COACHMARK];
const GUILD_POWERUP_LEVEL_2_COACHMARK = DismissibleGuildContent.GUILD_POWERUP_LEVEL_2_COACHMARK;
items5[1] = GUILD_POWERUP_LEVEL_2_COACHMARK;
const GUILD_POWERUP_LEVEL_3_COACHMARK = DismissibleGuildContent.GUILD_POWERUP_LEVEL_3_COACHMARK;
items5[2] = GUILD_POWERUP_LEVEL_3_COACHMARK;
const GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK = DismissibleGuildContent.GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK;
items5[3] = GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK;
const GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK = DismissibleGuildContent.GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK;
items5[4] = GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK;
const ADOPT_CLAN_IDENTITY_NOTICE = DismissibleGuildContent.ADOPT_CLAN_IDENTITY_NOTICE;
const items2 = [ADOPT_CLAN_IDENTITY_NOTICE];
const VANITY_URL_POWERUP_ROLLBACK_NOTIFICATION = DismissibleContent.VANITY_URL_POWERUP_ROLLBACK_NOTIFICATION;
const items3 = [VANITY_URL_POWERUP_ROLLBACK_NOTIFICATION];
const VANITY_URL_POWERUP_ROLLBACK_MODAL = DismissibleContent.VANITY_URL_POWERUP_ROLLBACK_MODAL;
items3[1] = VANITY_URL_POWERUP_ROLLBACK_MODAL;
const VANITY_URL_POWERUP_EDUCATIONAL_POPOVER = DismissibleContent.VANITY_URL_POWERUP_EDUCATIONAL_POPOVER;
items3[2] = VANITY_URL_POWERUP_EDUCATIONAL_POPOVER;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/DevToolsGuildPowerupsConstants.tsx');
exports.USER_DCS = items4;
exports.GUILD_DCS = items5;
exports.SERVER_TAG_GUILD_DCS = items2;
exports.VANITY_URL_POWERUP_DCS = items3;
exports.getGuildDCString = getGuildDCString;
exports.getUserDCString = getUserDCString;
}
function getGuildDCString(a0) { // fn#107764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14443:1200, offset: 0x02308101, size: 268 bytes, params: 2, frame: 14
const DismissibleGuildContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleGuildContent;
const GUILD_POWERUP_LEVEL_1_COACHMARK = DismissibleGuildContent.GUILD_POWERUP_LEVEL_1_COACHMARK;
if (GUILD_POWERUP_LEVEL_1_COACHMARK === a0) {
return 'GUILD_POWERUP_LEVEL_1_COACHMARK';
}
const GUILD_POWERUP_LEVEL_2_COACHMARK = DismissibleGuildContent.GUILD_POWERUP_LEVEL_2_COACHMARK;
if (GUILD_POWERUP_LEVEL_2_COACHMARK === a0) {
return 'GUILD_POWERUP_LEVEL_2_COACHMARK';
}
const GUILD_POWERUP_LEVEL_3_COACHMARK = DismissibleGuildContent.GUILD_POWERUP_LEVEL_3_COACHMARK;
if (GUILD_POWERUP_LEVEL_3_COACHMARK === a0) {
return 'GUILD_POWERUP_LEVEL_3_COACHMARK';
}
const GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK = DismissibleGuildContent.GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK;
if (GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK === a0) {
return 'GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK';
}
const GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK = DismissibleGuildContent.GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK;
if (GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK === a0) {
return 'GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK';
}
const ADOPT_CLAN_IDENTITY_NOTICE = DismissibleGuildContent.ADOPT_CLAN_IDENTITY_NOTICE;
if (ADOPT_CLAN_IDENTITY_NOTICE === a0) {
return 'ADOPT_CLAN_IDENTITY_NOTICE';
}
const String = global.String;
return String(a0);
}
function getUserDCString(a0) { // fn#107765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14443:1976, offset: 0x0230820d, size: 58 bytes, params: 2, frame: 12
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
return DismissibleContent[a0] ?? global.String(a0);
}
@@ -0,0 +1,119 @@
/* Metro module 7111; source: modules/devtools/DevToolsSettingsStore.tsx; dependencies: [6, 7, 15, 17, 18, 7112, 694, 566, 2] */
function _fun56825(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7289:6, offset: 0x013d33d5, size: 347 bytes, params: 8, frame: 19
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const developerExperimentStore = importDefault(7112) /* metro dependency 7112: DeveloperExperimentStore */;
object2 = {'sidebarWidth': 460, 'lastOpenTabId': null, 'lastOpenSubTabId': null, 'displayTools': false,
'showDevWidget': false};
object2.devWidgetPosition = {'x': 0, 'y': 0};
object2.sortedScreenKeys = [];
const DeviceSettingsStore = (importDefault(566) /* metro dependency 566: flux */).DeviceSettingsStore;
let value = _fun56829(DeviceSettingsStore);
value.displayName = 'DevToolsSettingsStore';
value.persistKey = 'DevToolsSettingsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{DEV_TOOLS_SETTINGS_UPDATE: DEV_TOOLS_SETTINGS_UPDATE});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/DevToolsSettingsStore.tsx');
exports.default = value;
exports.DEVTOOLS_SIDEBAR_MIN_WIDTH = 460;
}
function _isNativeReflectConstruct_56826() { // fn#56826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7289:158, offset: 0x013d3530, 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_56826_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun56829(a0) { // fn#56829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7289:504, offset: 0x013d358e, size: 252 bytes, params: 2, frame: 16
const closure = DevToolsSettingsStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_56831}, {key: 'getUserAgnosticState', value: value_56832},
{key: 'sidebarWidth', get: get_56833}, {key: 'lastOpenTabId', get: get_56834}, {key: 'lastOpenSubTabId',
get: get_56835}, {key: 'displayTools', get: get_56836}, {key: 'showDevWidget', get: get_56837},
{key: 'devWidgetPosition', get: get_56838}, {key: 'sortedScreenKeys', get: get_56839}]);
}
function DEV_TOOLS_SETTINGS_UPDATE(a0) { // fn#56840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7289:1729, offset: 0x013d37a0, size: 53 bytes, params: 2, frame: 12
var object2;
if (DeveloperExperimentStore.isDeveloper) {
object2 = {};
copyDataProperties(object2, env0_8, undefined);
copyDataProperties(object2, a0.settings, a0);
}
}
function value_56831(a0) { // fn#56831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7289:839, offset: 0x013d368a, size: 109 bytes, params: 2, frame: 13
const r2 = a0 ?? env1_8;
value = environment.__proto__;
env1_8 = r2;
const r3 = r2.sortedScreenKeys ?? [];
const object2 = {};
copyDataProperties(object2, env1_8, r3);
object2['sortedScreenKeys'] = r3;
(importDefault(694) /* metro dependency 694: Dispatcher */).actionLogger.persist = DeveloperExperimentStore.isDeveloper;
}
function get_56833() { // fn#56833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7289:1060, offset: 0x013d36f7, size: 29 bytes, params: 1, frame: 2
return this.displayTools ? env1_8.sidebarWidth : 0;
}
function get_56834() { // fn#56834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7289:1140, offset: 0x013d3714, size: 27 bytes, params: 1, frame: 3
let value = environment.__proto__;
const lastOpenTabId = env1_8.lastOpenTabId;
value = null;
return value != lastOpenTabId ? lastOpenTabId : value;
}
function get_56835() { // fn#56835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7289:1227, offset: 0x013d372f, size: 27 bytes, params: 1, frame: 3
let value = environment.__proto__;
const lastOpenSubTabId = env1_8.lastOpenSubTabId;
value = null;
return value != lastOpenSubTabId ? lastOpenSubTabId : value;
}
function get_56836() { // fn#56836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7289:1313, offset: 0x013d374a, size: 28 bytes, params: 1, frame: 3
return DeveloperExperimentStore.isDeveloper && env1_8.displayTools;
}
function get_56837() { // fn#56837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7289:1388, offset: 0x013d3766, size: 28 bytes, params: 1, frame: 3
return DeveloperExperimentStore.isDeveloper && env1_8.showDevWidget;
}
function get_56838() { // fn#56838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7289:1468, offset: 0x013d3782, size: 15 bytes, params: 1, frame: 1
return env1_8.devWidgetPosition;
}
function get_56839() { // fn#56839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7289:1536, offset: 0x013d3791, size: 15 bytes, params: 1, frame: 1
return env1_8.sortedScreenKeys;
}
@@ -0,0 +1,23 @@
/* Metro module 14250; source: modules/devtools/design_toggles/DesignTogglesActions.tsx; dependencies: [5114, 694, 2] */
function _fun107810(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14447:6, offset: 0x02309a9c, size: 131 bytes, params: 8, frame: 19
const closure = toggle_107811;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const designTogglesStore = importDefault(5114) /* metro dependency 5114: DesignTogglesStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/design_toggles/DesignTogglesActions.tsx');
exports.toggle = closure;
exports.clearAll = function() {
var propertyName;
for (propertyName in DesignTogglesStore.all()) {
toggle_107811(propertyName, false);
}
};
}
function toggle_107811(a0, a1) { // fn#107811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14447:106, offset: 0x02309b1f, size: 93 bytes, params: 3, frame: 15
let value = a1;
const r4 = typeof value === 'boolean' ? value : !DesignTogglesStore.get(a0);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'DEV_TOOLS_DESIGN_TOGGLE_SET', toggle: a0, value: r4});
}
@@ -0,0 +1,155 @@
/* Metro module 5114; source: modules/devtools/design_toggles/DesignTogglesStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
function _fun44683(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5292:6, offset: 0x01176c08, size: 295 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_6 = {};
const DeviceSettingsStore = (importDefault(566) /* metro dependency 566: flux */).DeviceSettingsStore;
let value = _fun44687(DeviceSettingsStore);
value.displayName = 'DevToolsDesignTogglesStore';
value.persistKey = 'DevToolsDesignTogglesStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{DEV_TOOLS_DESIGN_TOGGLE_SET: DEV_TOOLS_DESIGN_TOGGLE_SET});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/design_toggles/DesignTogglesStore.tsx');
exports.default = value;
exports.toggles = {'enable_recently_active': 'Enable recently active channels',
'theme_setting_in_account_sheet': 'Show theme settings in the Account action sheet',
'nav_experiment_server_drawer_enabled': '[NavI] Enable expandable server drawer',
'show_icymi_debug_scores': 'Show ICYMI debug scores',
'channel_list_scrim': 'Dim the channel list when chat appears', 'mana_radio_large_variant': 'Larger Radio',
'mana_checkbox_large_variant': 'Larger Checkbox', 'mana_switch_large_variant': 'Larger Switch',
'show_header_debug_info': 'Show header component debug overlays'};
}
function _isNativeReflectConstruct_44684() { // fn#44684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5292:148, offset: 0x01176d2f, 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_44684_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun44687(a0) { // fn#44687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5292:876, offset: 0x01176d8d, size: 185 bytes, params: 2, frame: 16
const closure = DesignTogglesStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getUserAgnosticState', value: value_44689}, {key: 'initialize', value: value_44690},
{key: 'get', value: value_44691}, {key: 'set', value: value_44692}, {key: 'all', value: value_44693},
{key: 'allWithDescriptions', value: value_44694}]);
}
function DEV_TOOLS_DESIGN_TOGGLE_SET({toggle, value}) { // fn#44696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5292:1787, offset: 0x01176f3e, size: 29 bytes, params: 2, frame: 3
env0_6[toggle] = value;
}
function value_44690(a0) { // fn#44690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5292:1266, offset: 0x01176e46, size: 92 bytes, params: 2, frame: 14
var r10;
var r11;
var propertyName;
var toggleStates;
var property;
var value3;
const binding = env1_5;
const value2 = undefined;
for (propertyName in binding) {
if (a0 == null) {
r10 = value2;
continue;
}
toggleStates = a0.toggleStates;
if (toggleStates == null) {
r10 = value2;
continue;
}
property = toggleStates[propertyName];
r10 = property;
value3 = r10 != null;
if (value3) {
r11 = r10;
continue;
}
r11 = value3;
continue;
env1_6[propertyName] = r11;
}
return value2;
}
function value_44692(a0, a1) { // fn#44692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5292:1452, offset: 0x01176ea2, size: 19 bytes, params: 3, frame: 3
env1_6[a0] = a1;
return a1;
}
function value_44694() { // fn#44694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5292:1556, offset: 0x01176eb5, size: 45 bytes, params: 1, frame: 11
var environment;
const Object = global.Object;
const entries = Object.entries;
const value = environment.__proto__;
return Reflect.apply(entries, Object, [env1_6]).map(_fun44695);
}
function _fun44695(a0) { // fn#44695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5292:1597, offset: 0x01176ee2, size: 92 bytes, params: 2, frame: 7
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;
let value = undefined;
const value2 = item2 === value;
const r2 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value;
r3 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value;
r3 = value3;
} else {
r0 = item3;
r1 = item;
r3 = value3;
}
}
if (!r3) {
r0.return();
}
value = environment.__proto__.__proto__;
return [r2, r1, env2_5[r2]];
}
@@ -0,0 +1,61 @@
/* Metro module 5283; source: modules/devtools/design_toggles/HeaderDebugOverlay.native.tsx; dependencies: [31, 27, 33, 4501, 697, 5115, 4573, 2] */
function _fun46972(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5461:6, offset: 0x011b45df, size: 467 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.Fragment;
const env0_6 = value.jsxs;
const env0_7 = {'os-drawn': 'OS-Drawn', 'custom-drawn': 'Custom-Drawn', 'js-stack': 'JS Stack', 'sheet': 'Sheet',
'bespoke': 'Bespoke'};
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {tintWash: {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0, 'pointerEvents': 'none',
'opacity': 0.15}, badgeContainer: {'position': 'absolute', 'bottom': 2, 'right': 4, 'pointerEvents': 'none'}};
const object4 = {'paddingHorizontal': 4, 'paddingVertical': 1};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.badge = object4;
const TEXT_LINK = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_LINK;
object3['color-os-drawn'] = {backgroundColor: TEXT_LINK};
const STATUS_DANGER = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_DANGER;
object3['color-custom-drawn'] = {backgroundColor: STATUS_DANGER};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object3['color-js-stack'] = {backgroundColor: BACKGROUND_BRAND};
const STATUS_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_POSITIVE;
object3['color-sheet'] = {backgroundColor: STATUS_POSITIVE};
const STATUS_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_WARNING;
object3['color-bespoke'] = {backgroundColor: STATUS_WARNING};
const env0_8 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/design_toggles/HeaderDebugOverlay.native.tsx');
exports.default = useHeaderDebugOverlay;
}
function useHeaderDebugOverlay(a0, a1) { // fn#46973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5461:967, offset: 0x011b47b2, size: 276 bytes, params: 3, frame: 23
var r11;
var property;
var jsxRuntimeEnv0_5Binding;
var items2;
let value = a1;
const value3 = (importDefault(5115) /* metro dependency 5115: useDesignToggle */)('show_header_debug_info');
const styles = useStyles();
if (value3) {
property = styles['color-' + a0];
r11 = value ?? env0_7[a0];
jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
value = <View style={[styles.tintWash, property]} />;
items2 = [value];
items2[1] = <View style={styles.badgeContainer}><View style={[styles.badge,
property]}>{((Text) => <Text variant="text-xs/bold" color="white">{r11}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View></View>;
return (
<>
{items2}
</>
);
}
return null;
}
@@ -0,0 +1,18 @@
/* Metro module 5115; source: modules/devtools/design_toggles/useDesignToggle.tsx; dependencies: [5114, 566, 2] */
function _fun44697(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5293:6, offset: 0x01176f5b, size: 112 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const designTogglesStore = importDefault(5114) /* metro dependency 5114: DesignTogglesStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/design_toggles/useDesignToggle.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[1]).useStateFromStores([DesignTogglesStore], _fun44699, [a0]);
};
}
function useDesignToggle(a0) { // fn#44698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5293:201, offset: 0x01176fcb, size: 73 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([DesignTogglesStore], _fun44699, [a0]);
}
@@ -0,0 +1,23 @@
/* Metro module 14234; source: modules/devtools/dev_settings/DevSettingsActions.tsx; dependencies: [4649, 694, 2] */
function _fun107649(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14431:6, offset: 0x023040ba, size: 131 bytes, params: 8, frame: 19
const closure = toggle_107650;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/dev_settings/DevSettingsActions.tsx');
exports.toggle = closure;
exports.clearAll = function() {
var propertyName;
for (propertyName in DevSettingsStore.enabled()) {
toggle_107650(propertyName, false);
}
};
}
function toggle_107650(a0, a1) { // fn#107650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14431:106, offset: 0x0230413d, size: 95 bytes, params: 3, frame: 15
let value = a1;
const r4 = typeof value === 'boolean' ? value : !DevSettingsStore.get(a0);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'DEV_TOOLS_DEV_SETTING_SET', toggle: a0, value: r4});
}
@@ -0,0 +1,281 @@
/* Metro module 4649; source: modules/devtools/dev_settings/DevSettingsStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
function _fun40108(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4827:6, offset: 0x010f65d4, size: 1127 bytes, params: 8, frame: 22
var object4;
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 */;
object4 = {MESSAGING: 0};
object4[0] = 'MESSAGING';
object4.OVERLAYS = 1;
object4[1] = 'OVERLAYS';
object4.PREMIUM = 2;
object4[2] = 'PREMIUM';
object4.REPORTING = 3;
object4[3] = 'REPORTING';
object4.APP_COLLECTIONS = 4;
object4[4] = 'APP_COLLECTIONS';
object4.SHOP = 5;
object4[5] = 'SHOP';
object4.LIBDISCORE = 6;
object4[6] = 'LIBDISCORE';
const object5 = {};
let REPORTING = object4.REPORTING;
object5[REPORTING] = 'Reporting Toggles';
let OVERLAYS = object4.OVERLAYS;
object5[OVERLAYS] = 'Dev Overlays';
let MESSAGING = object4.MESSAGING;
object5[MESSAGING] = 'Messaging Toggles';
let APP_COLLECTIONS = object4.APP_COLLECTIONS;
object5[APP_COLLECTIONS] = 'App Collections Toggles';
let PREMIUM = object4.PREMIUM;
object5[PREMIUM] = 'Premium Toggles';
let SHOP = object4.SHOP;
object5[SHOP] = 'Shop Toggles';
let LIBDISCORE = object4.LIBDISCORE;
object5[LIBDISCORE] = 'Libdiscore Toggles';
const object6 = {};
OVERLAYS = object4.OVERLAYS;
object6.visual_effect_view_overrides = {label: 'Blur view overrides for designers to test with', category: OVERLAYS};
OVERLAYS = object4.OVERLAYS;
object6.obscure_blur_effect_explicit_content_enabled = {label: 'Force explicit content obscure blur effect on for message media and embeds',
category: OVERLAYS};
OVERLAYS = object4.OVERLAYS;
object6.obscure_blur_effect_gore_content_enabled = {label: 'Force gore content obscure blur effect on for message media and embeds',
category: OVERLAYS};
OVERLAYS = object4.OVERLAYS;
object6.obscure_blur_effect_self_harm_content_enabled = {label: 'Force self harm content obscure blur effect on for message media and embeds',
category: OVERLAYS};
OVERLAYS = object4.OVERLAYS;
object6.explicit_media_redaction_ignore_pending_scan = {label: 'Ignore pending scan on explicit media',
category: OVERLAYS};
OVERLAYS = object4.OVERLAYS;
object6.analytics_debugger = {label: 'Enable analytics debugger view', category: OVERLAYS};
OVERLAYS = object4.OVERLAYS;
object6.idle_status_indicator = {label: 'Enable idle status indicator', category: OVERLAYS};
MESSAGING = object4.MESSAGING;
object6.upload_fail_50 = {label: 'Uploads: Fail 50% of uploads with 500 status after a 1 second delay',
category: MESSAGING};
MESSAGING = object4.MESSAGING;
object6.send_fail_100 = {label: 'Send: Fail with 500 status', category: MESSAGING};
PREMIUM = object4.PREMIUM;
object6.premium_roadblocks = {label: 'Enable all new premium roadblocks', category: PREMIUM};
PREMIUM = object4.PREMIUM;
object6.force_mock_iap = {label: '[iOS] Force mock IAP products', category: PREMIUM};
REPORTING = object4.REPORTING;
object6.iar_testing = {label: 'Enable staff only test iar menu options', category: REPORTING};
REPORTING = object4.REPORTING;
object6.iar_skip_api_report_submit = {label: 'Enable to skip calling the API to skip submitting actual IAR reports',
category: REPORTING};
REPORTING = object4.REPORTING;
object6.iar_show_report_sub_type_labels = {label: 'Show IAR report sub type labels', category: REPORTING};
APP_COLLECTIONS = object4.APP_COLLECTIONS;
object6.only_show_preview_app_collections = {label: "Only show application collections (e.g. in App Directory, App Launcher in text) that have the 'preview' active state. This disables application collections cache, too, so you can see collections updates immediately.",
category: APP_COLLECTIONS};
APP_COLLECTIONS = object4.APP_COLLECTIONS;
object6.disable_app_collections_cache = {label: 'Disable application collections cache so that you can see updates to collections immediately.',
category: APP_COLLECTIONS};
SHOP = object4.SHOP;
object6.shop_disable_cache = {label: 'Disable collectibles shop cache', category: SHOP};
SHOP = object4.SHOP;
object6.shop_include_unpublished = {label: 'Show unpublished items in collectibles shop', category: SHOP};
SHOP = object4.SHOP;
object6.shop_show_debug_overlay = {label: 'Show debug log overlay in collectibles shop', category: SHOP};
SHOP = object4.SHOP;
object6.bypass_google_sku_sync = {label: '[Android] Bypass Google SKU sync in collectibles shop', category: SHOP};
LIBDISCORE = object4.LIBDISCORE;
object6.libdiscore_verbose_telemetry_logging = {label: 'Enable verbose telemetry logging for libdiscore',
category: LIBDISCORE};
const env0_6 = {};
const DeviceSettingsStore = (importDefault(566) /* metro dependency 566: flux */).DeviceSettingsStore;
let value = _fun40112(DeviceSettingsStore);
value.displayName = 'DevToolsDevSettingsStore';
value.persistKey = 'DevToolsDevSettingsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{DEV_TOOLS_DEV_SETTING_SET: DEV_TOOLS_DEV_SETTING_SET});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/dev_settings/DevSettingsStore.tsx');
exports.default = value;
exports.DevSettingsCategory = object4;
exports.CATEGORY_LABELS = object5;
exports.toggles = object6;
}
function _isNativeReflectConstruct_40109() { // fn#40109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4827:148, offset: 0x010f6a3b, 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_40109_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun40112(a0) { // fn#40112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4827:3230, offset: 0x010f6a99, size: 160 bytes, params: 2, frame: 16
const closure = DevSettingsStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getUserAgnosticState', value: value_40114}, {key: 'initialize', value: value_40115},
{key: 'get', value: value_40116}, {key: 'enabled', value: value_40117}, {key: 'allByCategory',
value: value_40118}]);
}
function DEV_TOOLS_DEV_SETTING_SET(a0) { // fn#40121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4827:4141, offset: 0x010f6cc1, size: 59 bytes, params: 2, frame: 3
if (a0.value !== false) {
env0_6[a0.toggle] = a0.value;
} else {
delete env0_6[a0.toggle];
}
}
function value_40115(a0) { // fn#40115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4827:3610, offset: 0x010f6b49, size: 104 bytes, params: 2, frame: 15
var r6;
var r11;
var r12;
var propertyName;
var propertyName2;
var toggleStates;
var property;
var value3;
const binding = env1_5;
const value2 = undefined;
for (propertyName in binding) {
if (a0 == null) {
r11 = value2;
continue;
}
toggleStates = a0.toggleStates;
if (toggleStates == null) {
r11 = value2;
continue;
}
property = toggleStates[propertyName];
r11 = property;
value3 = r11 != null;
if (value3) {
r12 = r11;
continue;
}
r12 = value3;
continue;
if (!r12) {
r6 = propertyName2;
continue;
}
env1_6[propertyName] = r12;
r6 = propertyName2;
}
return value2;
}
function value_40118(a0) { // fn#40118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4827:3854, offset: 0x010f6bcd, size: 67 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const Object = global.Object;
const entries = Object.entries;
let value = environment.__proto__;
value = Reflect.apply(entries, Object, [env1_5]);
value = value.filter(_fun40119);
return value.map(_fun40120);
}
function _fun40119(a0) { // fn#40119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4827:3899, offset: 0x010f6c10, size: 73 bytes, params: 2, frame: 6
var r0;
var r1;
var r2;
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;
if (value2) {
r0 = value;
r1 = item2;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = value;
r1 = item3;
r2 = value3;
} else {
r0 = item;
r1 = item3;
r2 = value3;
}
}
if (!r2) {
r1.return();
}
return r0.category === env0_0;
}
function _fun40120(a0) { // fn#40120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4827:3930, offset: 0x010f6c59, size: 104 bytes, params: 2, frame: 7
var r0;
var r1;
var r2;
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;
let 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;
r1 = value;
r2 = value3;
} else {
r0 = item3;
r1 = item;
r2 = value3;
}
}
if (!r2) {
r0.return();
}
value = environment.__proto__.__proto__;
const property = env2_6[r3];
return [r3, property != null && property, r1];
}
@@ -0,0 +1,268 @@
/* Metro module 13122; source: modules/devtools/native/components/DevToolsContent.tsx; dependencies: [57, 31, 27, 10557, 4107, 1220, 33, 4501, 697, 566, 10558, 13123, 4573, 5278, 4081, 14278, 14280, 1484, 1585, 6231, 6238, 3857, 13121, 2] */
function _fun100275(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:6, offset: 0x021e2f4d, size: 552 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.ScrollView;
const buildOverrideStore = importDefault(10557) /* metro dependency 10557: BuildOverrideStore */;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const apexExperimentStore = importDefault(1220) /* metro dependency 1220: ApexExperimentStore */;
const value3 = require(33) /* metro dependency 33 */;
const env0_10 = value3.jsx;
const env0_11 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object5 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.backgroundColor = BACKGROUND_BASE_LOW;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.padding = PX_16;
object3.devToolsContainer = object5;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.sortingIcons = {flexDirection: 'row', gap: PX_8};
const object6 = {};
const CONTROL_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object6.backgroundColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object6.width = PX_32;
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object6.height = PX_32;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object6.justifyContent = 'center';
object6.alignItems = 'center';
object3.button = object6;
object3.disabledButton = {opacity: 0.5};
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object3]);
const value5 = value.memo(_fun100279);
value = value.memo(DevToolsContent);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/DevToolsContent.tsx');
exports.default = value;
exports.DevToolsContentSubLabel = value5;
}
function DevToolsContentSortButtons({screenKey, start, end}) { // fn#100276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:811, offset: 0x021e3175, size: 355 bytes, params: 2, frame: 27
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {onPress: onPress_100277, disabled: start, style: [styles.button,
start && styles.disabledButton], accessibilityRole: 'button', accessibilityLabel: 'Shift up'};
const ArrowSmallUpIcon = (require(14278) /* metro dependency 14278: ArrowSmallUpIcon */).ArrowSmallUpIcon;
const pressableOpacity = <PressableOpacity {...pressableOpacityProps}><ArrowSmallUpIcon /></PressableOpacity>;
const pressableOpacityProps2 = {onPress: onPress_100278, disabled: end, style: [styles.button,
end && styles.disabledButton], accessibilityRole: 'button', accessibilityLabel: 'Shift down'};
const ArrowSmallDownIcon = (require(14280) /* metro dependency 14280: ArrowSmallDownIcon */).ArrowSmallDownIcon;
return (
<View style={styles.sortingIcons}>
{pressableOpacity}
<PressableOpacity {...pressableOpacityProps2}>
<ArrowSmallDownIcon />
</PressableOpacity>
</View>
);
}
function _fun100279({label, value}) { // fn#100279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:639, offset: 0x021e3394, size: 121 bytes, params: 2, frame: 20
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const Text2 = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-xs/medium" color="text-subtle">
{label}
<Text2 variant="text-xs/semibold">
{value}
</Text2>
</Text>
);
}
function DevToolsContent({title, embedded}) { // fn#100280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:1550, offset: 0x021e340d, size: 319 bytes, params: 2, frame: 22
var r0;
var object;
const styles = useStyles();
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const env0_1 = useDevToolsContentSublabels();
const [env0_2, env0_3] = env0_3Binding(env0_4.useState(false), 2);
const value5 = (importDefault(13123) /* metro dependency 13123: useSortedDevToolsScreens */)();
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const tableRowGroup = <TableRowGroup title={title} hasIcons>{value5.map(_fun100286)}</TableRowGroup>;
if (embedded) {
r0 = tableRowGroup;
} else {
var scrollViewBindingProps = {style: styles.devToolsContainer};
object = {};
object.paddingBottom = value2.bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
scrollViewBindingProps.contentContainerStyle = object;
r0 = <ScrollView {...scrollViewBindingProps}>{tableRowGroup}</ScrollView>;
}
return r0;
}
function DevToolsContentSortButtonsOnPress() { // fn#100277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:966, owner: DevToolsContentSortButtons.onPress, offset: 0x021e32d8, size: 94 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = value.triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, value, [IMPACT_MEDIUM]);
value = require(13123) /* metro dependency 13123: useSortedDevToolsScreens */;
value.updateSortOrder(screenKey, 'up');
}
function DevToolsContentSortButtonsOnPress_100278() { // fn#100278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:1265, owner: DevToolsContentSortButtons.onPress, offset: 0x021e3336, size: 94 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = value.triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, value, [IMPACT_MEDIUM]);
value = require(13123) /* metro dependency 13123: useSortedDevToolsScreens */;
value.updateSortOrder(screenKey, 'down');
}
function useDevToolsContentSublabels() { // fn#100281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:1649, owner: DevToolsContent.useDevToolsContentSublabels, offset: 0x021e354c, size: 186 bytes, params: 1, frame: 19
var environment;
const value = environment.__proto__;
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const env0_0 = Reflect.apply(useStateFromStores, fluxModule, [[BuildOverrideStore], function() {
var r0;
var property = BuildOverrideStore.getCurrentBuildOverride().overrides;
var value2 = undefined;
if (property == null) {
r0 = value2;
} else {
property = property[require(dependencyMap[10]).DEVICE_FIELD];
r0 = property == null ? value2 : property.id;
}
return r0;
}]);
const length = fluxModule.useStateFromStores([ExperimentStore], function() {
var Object = global.Object;
return Object.keys(ExperimentStore.getAllExperimentOverrideDescriptors()).length;
});
const moduleValue3 = fluxModule;
useStateFromStores = moduleValue3.useStateFromStores;
const env0_1 = length + Reflect.apply(useStateFromStores, moduleValue3, [[ApexExperimentStore], function() {
var Object = global.Object;
return Object.keys(ApexExperimentStore.getClientOverrides()).length;
}]);
return (importDefault(13123) /* metro dependency 13123: useSortedDevToolsScreens */)().map(_fun100285);
}
function _fun100286(a0, a1) { // fn#100286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:2381, offset: 0x021e375a, size: 319 bytes, params: 3, frame: 28
var r1;
var r2;
var r42;
var item3;
var value3;
var headerTitle;
var Icon;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r42 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r42 = value;
} else {
r1 = item3;
r2 = value3;
r42 = item;
}
}
try {
headerTitle = r42.headerTitle;
Icon = r42.Icon;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
}
}
throw error;
}
if (!r2) {
r1.return();
}
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {label: headerTitle, subLabel: env0_1[a1]};
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon2 = TableRow2.Icon;
tableRowProps.icon = <Icon2 IconComponent={Icon} />;
const binding = env0_2;
tableRowProps.arrow = !binding;
tableRowProps.trailing = binding ? <DevToolsContentSortButtons screenKey={r4} start={a1 === 0} end={a1 === env0_4.length - 1} /> : value;
tableRowProps.onLongPress = onLongPress_100287;
tableRowProps.onPress = onPress_100289;
return <TableRow {...tableRowProps} key={r4} />;
}
function _fun100285(a0) { // fn#100285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:2047, offset: 0x021e36ac, size: 174 bytes, params: 2, frame: 16
const iterator = a0[Symbol.iterator]();
let item2 = iterator.next();
const item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r1 = value2 ? value : item;
if (!value2) {
item2.return();
}
if (r1 === 'buildOverride') {
return env0_0 != null ? ((Component) => <Component label="Build override: " value={env0_0} />)(env2_13) : value;
}
if (r1 === 'experiments') {
return env0_1 > 0 ? ((Component) => <Component label="Experiments overridden: " value={env0_1.toString()} />)(env2_13) : value;
}
return value;
}
function onLongPress_100287() { // fn#100287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:2619, offset: 0x021e3899, size: 159 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__.__proto__;
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: env1_2 ? 'sorting-disabled' : 'sorting-enabled',
content: env1_2 ? 'Sorting disabled' : 'Sorting enabled'});
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = value.triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, value, [IMPACT_MEDIUM]);
env1_3(function(a0) {
return !a0;
});
}
function onPress_100289() { // fn#100289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:2826, offset: 0x021e3938, size: 102 bytes, params: 1, frame: 13
let value = environment.__proto__;
if (!env1_2) {
if (env1_0.push != null) {
env1_0.push(env0_0);
} else {
value = environment.__proto__.__proto__;
value = require(13121) /* metro dependency 13121: DevToolsNavigator */;
value.navigateToDevTools({screenKey: env0_0});
}
}
}
@@ -0,0 +1,83 @@
/* Metro module 13119; source: modules/devtools/native/components/DevToolsLazy.tsx; dependencies: [5, 31, 27, 7112, 7111, 33, 477, 13120, 13121, 1962, 566, 13115, 14282, 2] */
function _fun100255(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:6, offset: 0x021e2742, size: 319 bytes, params: 8, frame: 20
var keyModifierControl;
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 = importAll(31) /* metro dependency 31 */;
const NativeModules = (require(27) /* metro dependency 27 */).NativeModules;
const developerExperimentStore = importDefault(7112) /* metro dependency 7112: DeveloperExperimentStore */;
const devToolsSettingsStore = importDefault(7111) /* metro dependency 7111: DevToolsSettingsStore */;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
let value = require(477) /* metro dependency 477: PlatformUtils */;
if (value.isAndroid()) {
value = importDefault(13120) /* metro dependency 13120: NativeKeyCommandsModule */;
keyModifierControl = value.getConstants().keyModifierControl;
} else {
keyModifierControl = NativeModules.KeyCommandsView.keyModifierControl;
}
const env0_8 = [{'input': 'o', 'modifierFlags': null, 'eventName': 'keyCommandShowDevTools',
'discoverabilityTitle': 'Open DevTools Panel', modifierFlags: keyModifierControl, onKeyCommand: onKeyCommand}];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/DevToolsLazy.tsx');
exports.default = DevToolsLazy;
}
function onKeyCommand() { // fn#100256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:392, offset: 0x021e2881, size: 29 bytes, params: 1, frame: 11
return env0_2(_fun100258)();
}
function DevToolsLazy() { // fn#100259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:569, offset: 0x021e28f8, size: 206 bytes, params: 1, frame: 19
const isDeveloper = (require(566) /* metro dependency 566: flux */).useStateFromStores([DeveloperExperimentStore],
function() {
return DeveloperExperimentStore.isDeveloper;
});
const showDevWidget = (require(566) /* metro dependency 566: flux */).useStateFromStores([DevToolsSettingsStore],
function() {
return DevToolsSettingsStore.showDevWidget;
});
env0_3.useEffect(function() {
if (require(dependencyMap[6]).isIOS()) {
DeveloperExperimentStore.addChangeListener(_fun100263);
}
});
(require(13115) /* metro dependency 13115: KeyCommandsView */).useKeyCommands(isDeveloper ? env0_8 : []);
if (isDeveloper) {
if (showDevWidget) {
return ((Component) => <Component />)((require(14282) /* metro dependency 14282: DevWidget */).default);
}
}
return null;
}
function* _fun100258() { // fn#100258, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:399, offset: 0x021e28a9, size: 79 bytes, params: 1, frame: 14
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_1;
yield binding(binding2[9])(binding2[8], binding2.paths);
value = undefined;
if (false) {
return value;
}
value.navigateToDevTools();
}
}
function _fun100262() { // fn#100262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:725, offset: 0x021e29e4, size: 64 bytes, params: 1, frame: 12
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
DeveloperExperimentStore.addChangeListener(_fun100263);
}
}
function _fun100263() { // fn#100263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:768, offset: 0x021e2a24, size: 43 bytes, params: 1, frame: 11
var setIsDiscordDeveloper;
const NSUserDefaultsBridge = NativeModules.NSUserDefaultsBridge;
if (NSUserDefaultsBridge != null) {
setIsDiscordDeveloper = NSUserDefaultsBridge.setIsDiscordDeveloper;
value = environment.__proto__;
Reflect.apply(setIsDiscordDeveloper, NSUserDefaultsBridge, [isDeveloper]);
}
}
@@ -0,0 +1,165 @@
/* Metro module 13121; source: modules/devtools/native/components/DevToolsNavigator.tsx; dependencies: [31, 27, 33, 9884, 5280, 9603, 13122, 9409, 4573, 697, 13124, 4080, 5080, 2] */
function _fun100265(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:6, offset: 0x021e2ac0, size: 215 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const env0_6 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
const env0_7 = value.memo(_fun100266);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/DevToolsNavigator.tsx');
exports.navigateToDevTools = navigateToDevTools;
}
function _fun100266({screenKey}) { // fn#100266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:197, offset: 0x021e2b97, size: 277 bytes, params: 2, frame: 22
var environment;
let value = environment;
const env0_0 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
const Navigator = env0_6.Navigator;
const object2 = {};
const value2 = 'home';
object2.initialRouteName = screenKey ?? value2;
object2.screenOptions = screenOptions;
const Screen = env0_6.Screen;
const items2 = [<Screen name={value2} component={importDefault(13122) /* metro dependency 13122: DevToolsContent */} options={function() {
return {headerTitle: _fun100270, title: 'DevTools'};
}} />];
const Object = global.Object;
const entries = Object.entries;
const object4 = {};
const DevToolsScreens = (require(13124) /* metro dependency 13124: DevToolsScreens */).DevToolsScreens;
value = copyDataProperties(object4, DevToolsScreens, value);
const PerformanceTestingScreens = (require(13124) /* metro dependency 13124: DevToolsScreens */).PerformanceTestingScreens;
copyDataProperties(object4, PerformanceTestingScreens, value);
value = Reflect.apply(entries, Object, [object4]);
items2[1] = value.map(_fun100271);
return (
<Navigator {...object2}>
{items2}
</Navigator>
);
}
function navigateToDevTools() { // fn#100273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:1144, offset: 0x021e2ecf, size: 99 bytes, params: 1, frame: 16
let value = a0;
const screenKey = (value !== undefined ? value : {}).screenKey;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
value = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
value.pushLazy(_fun100274, {screenKey: screenKey}, 'DevToolsNavigator');
}
function screenOptions({navigation}) { // fn#100267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:342, offset: 0x021e2cac, size: 91 bytes, params: 2, frame: 14
var environment;
const object2 = {headerTitle: headerTitle_100268};
const value = environment.__proto__;
object2.headerLeft = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalCloseImage(navigation);
object2.headerTitleAlign = 'center';
copyDataProperties(object2, env0_0, require);
return object2;
}
function options_100269() { // fn#100269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:580, offset: 0x021e2d5e, size: 28 bytes, params: 1, frame: 2
return {headerTitle: headerTitle_100270, title: 'DevTools'};
}
function _fun100271(a0) { // fn#100271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:934, offset: 0x021e2e29, size: 151 bytes, params: 2, frame: 22
var r1;
var r2;
var r42;
var item3;
var value3;
var headerTitle;
var render;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r42 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r42 = value;
} else {
r1 = item3;
r2 = value3;
r42 = item;
}
}
try {
headerTitle = r42.headerTitle;
var env0_0 = headerTitle;
render = r42.render;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
}
}
throw error;
}
if (!r2) {
r1.return();
}
const Screen = env1_6.Screen;
return (
<Screen
name={r4}
children={render}
options={function() {
return {title: headerTitle};
}}
key={r4}
/>
);
}
function _fun100274() { // fn#100274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:1236, offset: 0x021e2f32, size: 27 bytes, params: 1, frame: 11
const Promise = global.Promise;
return Promise.resolve(env1_7);
}
function screenOptionsHeaderTitle_100268(a0) { // fn#100268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:374, owner: screenOptions.headerTitle, offset: 0x021e2d07, size: 87 bytes, params: 2, frame: 16
const children = a0.children;
const value = Object.create(null);
value.children = 0;
const value2 = copyDataProperties({}, a0, value, children);
const GenericHeaderTitle = (require(9603) /* metro dependency 9603: HeaderShared */).GenericHeaderTitle;
return <GenericHeaderTitle title={children} {...value2} />;
}
function options_100269HeaderTitle() { // fn#100270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:598, owner: options_100269.headerTitle, offset: 0x021e2d7a, size: 175 bytes, params: 1, frame: 21
const HammerIcon = (require(9409) /* metro dependency 9409: HammerIcon */).HammerIcon;
const hammerIcon = <HammerIcon size="sm" />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
return (
<View style={{flexDirection: 'row'}}>
{hammerIcon}
<Text
style={{marginLeft: PX_8}}
variant="heading-md/semibold"
color="mobile-text-heading-primary"
>
{'DevTools'}
</Text>
</View>
);
}
@@ -0,0 +1,163 @@
/* Metro module 13124; source: modules/devtools/native/components/DevToolsScreens.tsx; dependencies: [31, 33, 8931, 13125, 13127, 13129, 13132, 10570, 10330, 13134, 13135, 11441, 13136, 13164, 13166, 13167, 13169, 14157, 14161, 13813, 14164, 4062, 14199, 10227, 14202, 10945, 14207, 13140, 14230, 9646, 14248, 13797, 14249, 8036, 14251, 9411, 14253, 10358, 14260, 14261, 13144, 14263, 4056, 14266, 10802, 14267, 14268, 2] */
function _fun100300(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:6, offset: 0x021e3e74, size: 1463 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
object2 = {};
const ClipboardListIcon = (require(8931) /* metro dependency 8931: ClipboardListIcon */).ClipboardListIcon;
object2.analytics = {headerTitle: 'Analytics', Icon: ClipboardListIcon, render: render_100301};
const RefreshIcon = (require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon;
object2.buildOverride = {headerTitle: 'Build Override', Icon: RefreshIcon, render: render_100302};
const BeakerIcon = (require(13132) /* metro dependency 13132: BeakerIcon */).BeakerIcon;
object2.experiments = {headerTitle: 'Experiment Overrides', Icon: BeakerIcon, render: render_100303};
const PaperIcon = (require(10330) /* metro dependency 10330: PaperIcon */).PaperIcon;
object2.loggingFlags = {headerTitle: 'Logging Flags', Icon: PaperIcon, render: render_100304};
object2.cacheStats = {headerTitle: 'Cache Stats', Icon: PaperIcon, predicate: function() {
return false;
}, render: render_100306};
const UserIcon = (require(11441) /* metro dependency 11441: UserIcon */).UserIcon;
object2.generatedTestUsers = {headerTitle: 'Generated Test Users', Icon: UserIcon, render: render_100307};
const FileUpIcon = (require(13164) /* metro dependency 13164: FileUpIcon */).FileUpIcon;
object2.dataStorage = {headerTitle: 'Data Storage', Icon: FileUpIcon, render: render_100308};
const PaintPaletteIcon = (require(13167) /* metro dependency 13167: PaintPaletteIcon */).PaintPaletteIcon;
object2.designSystems = {headerTitle: 'Design Systems', Icon: PaintPaletteIcon, render: render_100309};
object2.dismissibleContent = {headerTitle: 'Dismissible Contents', Icon: PaperIcon, render: render_100310};
object2.gameCommunityUpsell = {headerTitle: 'Game Community Upsell', Icon: PaperIcon, render: render_100311};
const LanguageIcon = (require(13813) /* metro dependency 13813: LanguageIcon */).LanguageIcon;
object2.i18n = {headerTitle: 'Intl Testing', Icon: LanguageIcon, render: render_100312};
const DownloadIcon = (require(4062) /* metro dependency 4062: DownloadIcon */).DownloadIcon;
object2.otatest = {headerTitle: 'OTA Test', Icon: DownloadIcon, render: render_100313};
const TimerIcon = (require(10227) /* metro dependency 10227: TimerIcon */).TimerIcon;
object2.profiling = {headerTitle: 'Profiling', Icon: TimerIcon, render: render_100314};
const MagicWandIcon = (require(10945) /* metro dependency 10945: MagicWandIcon */).MagicWandIcon;
object2.quickActions = {headerTitle: 'Quick Actions', Icon: MagicWandIcon, render: render_100315};
const PiggyBankIcon = (require(13140) /* metro dependency 13140: PiggyBankIcon */).PiggyBankIcon;
object2.revenuePlayground = {headerTitle: 'Revenue Playground', Icon: PiggyBankIcon, render: render_100316};
const PencilIcon = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
object2.surveyOverride = {headerTitle: 'Survey & Changelog Override', Icon: PencilIcon, render: render_100317};
const EyeDropperIcon = (require(13797) /* metro dependency 13797: EyeDropperIcon */).EyeDropperIcon;
object2.toggles = {headerTitle: 'Toggles (Design, Reporting, etc)', Icon: EyeDropperIcon, render: render_100318};
const ShieldIcon = (require(8036) /* metro dependency 8036: ShieldIcon */).ShieldIcon;
object2.ageVerification = {headerTitle: 'Age Verification', Icon: ShieldIcon, render: render_100319};
const RobotIcon = (require(9411) /* metro dependency 9411: RobotIcon */).RobotIcon;
object2.components = {headerTitle: 'Bot Components Testing', Icon: RobotIcon, render: render_100320};
const ShopIcon = (require(10358) /* metro dependency 10358: ShopIcon */).ShopIcon;
object2.shop = {headerTitle: 'Shop', Icon: ShopIcon, render: render_100321};
object2.shopProductPreview = {headerTitle: 'Collectibles Tool', Icon: ShopIcon, render: render_100322};
const CompassIcon = (require(13144) /* metro dependency 13144: CompassIcon */).CompassIcon;
object2.actionSheets = {headerTitle: 'Action Sheets', Icon: CompassIcon, render: render_100323};
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
object2.accountLinking = {headerTitle: 'Account Linking', Icon: LinkIcon, render: render_100324};
const SpeedometerIcon = (require(10802) /* metro dependency 10802: SpeedometerIcon */).SpeedometerIcon;
object2.performanceTesting = {headerTitle: 'Performance Testing', Icon: SpeedometerIcon, render: render_100325};
const object3 = {};
object3.displayNameEffectsBenchmark = {headerTitle: 'Display Name Effects Benchmark', Icon: PaintPaletteIcon,
render: render_100326};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/DevToolsScreens.tsx');
exports.DevToolsScreens = object2;
exports.PerformanceTestingScreens = object3;
}
function render_100301() { // fn#100301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:194, offset: 0x021e442b, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(13125) /* metro dependency 13125: DevToolsAnalyticsScreen */).default);
}
function render_100302() { // fn#100302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:314, offset: 0x021e4457, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(13129) /* metro dependency 13129: DevToolsBuildOverrideScreen */).default);
}
function render_100303() { // fn#100303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:437, offset: 0x021e4483, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(10570) /* metro dependency 10570: DevToolsExperimentsScreen */).default);
}
function render_100304() { // fn#100304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:553, offset: 0x021e44af, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(13134) /* metro dependency 13134: DevToolsLoggingFlagsScreen */).default);
}
function render_100306() { // fn#100306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:682, offset: 0x021e44db, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(13135) /* metro dependency 13135: DevToolsLocalMessageCache */).default);
}
function render_100307() { // fn#100307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:812, offset: 0x021e4507, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(13136) /* metro dependency 13136: DevToolsGeneratedTestUsersScreen */).default);
}
function render_100308() { // fn#100308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:929, offset: 0x021e4533, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(13166) /* metro dependency 13166: DevToolsDataStorageScreen */).default);
}
function render_100309() { // fn#100309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1056, offset: 0x021e455f, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(13169) /* metro dependency 13169: UserSettingsDesignSystemsScreen */).default);
}
function render_100310() { // fn#100310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1186, offset: 0x021e458b, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14157) /* metro dependency 14157: DevToolsDismissableContentsScreen */).default);
}
function render_100311() { // fn#100311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1318, offset: 0x021e45b7, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14161) /* metro dependency 14161: GameCommunityUpsellDevTools */).default);
}
function render_100312() { // fn#100312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1430, offset: 0x021e45e3, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14164) /* metro dependency 14164: IntlTestingSettingsPage */).default);
}
function render_100313() { // fn#100313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1541, offset: 0x021e460f, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14199) /* metro dependency 14199: DevToolsOTATestScreen */).default);
}
function render_100314() { // fn#100314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1652, offset: 0x021e463b, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14202) /* metro dependency 14202: DevToolsProfilingScreen */).default);
}
function render_100315() { // fn#100315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1774, offset: 0x021e4667, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14207) /* metro dependency 14207: DevToolsQuickActionsScreen */).default);
}
function render_100316() { // fn#100316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1906, offset: 0x021e4693, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14230) /* metro dependency 14230: DevToolsRevenuePlaygroundScreen */).default);
}
function render_100317() { // fn#100317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2041, offset: 0x021e46bf, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14248) /* metro dependency 14248: UserSettingsSurveyChangelogOverride */).default);
}
function render_100318() { // fn#100318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2178, offset: 0x021e46eb, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14249) /* metro dependency 14249: DevToolsTogglesScreen */).default);
}
function render_100319() { // fn#100319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2303, offset: 0x021e4717, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14251) /* metro dependency 14251: DevToolsAgeVerificationScreen */).default);
}
function render_100320() { // fn#100320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2428, offset: 0x021e4743, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14253) /* metro dependency 14253: DevToolsComponentsTestingScreen */).default);
}
function render_100321() { // fn#100321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2528, offset: 0x021e476f, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14260) /* metro dependency 14260: DevToolsShopScreen */).default);
}
function render_100322() { // fn#100322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2655, offset: 0x021e479b, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14261) /* metro dependency 14261: CollectiblesTool */).default);
}
function render_100323() { // fn#100323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2775, offset: 0x021e47c7, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14263) /* metro dependency 14263: DevToolsActionSheetsScreen */).default);
}
function render_100324() { // fn#100324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2896, offset: 0x021e47f3, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14266) /* metro dependency 14266: DevToolsAccountLinkingScreen */).default);
}
function render_100325() { // fn#100325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:3032, offset: 0x021e481f, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14267) /* metro dependency 14267: DevToolsPerformanceTestingScreen */).default);
}
function render_100326() { // fn#100326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:3193, offset: 0x021e484b, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14268) /* metro dependency 14268: DevToolsDisplayNameEffectsBenchmarkScreen */).default);
}
@@ -0,0 +1,192 @@
/* Metro module 14282; source: modules/devtools/native/components/DevWidget.tsx; dependencies: [31, 7111, 695, 33, 4501, 697, 4017, 11281, 14283, 5321, 4577, 4581, 5278, 13121, 13969, 14284, 13126, 2] */
function _fun108017(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:6, offset: 0x02311eb6, size: 462 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const devToolsSettingsStore = importDefault(7111) /* metro dependency 7111: DevToolsSettingsStore */;
const DEV_WIDGET_SIZE = (require(695) /* metro dependency 695: Constants */).DEV_WIDGET_SIZE;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.Fragment;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object2 = {'backgroundColor': null, 'justifyContent': 'center', 'alignItems': 'center'};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.backgroundColor = BACKGROUND_BRAND;
object2.height = DEV_WIDGET_SIZE;
object2.width = DEV_WIDGET_SIZE;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const SHADOW_MOBILE_NAVIGATOR_X = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_MOBILE_NAVIGATOR_X;
copyDataProperties(object2, SHADOW_MOBILE_NAVIGATOR_X, undefined);
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{widgetContainer: {position: 'absolute'},
widget: object2}]);
object = {code: 'function DevWidgetTsx1(x,y){const{windowDimensionsSharedValue,insetsSharedValue,clamp,dragBoundsPadding,contentWidth,contentHeight}=this.__closure;const{width:windowWidth,height:windowHeight}=windowDimensionsSharedValue.get();const insets=insetsSharedValue.get();return{x:clamp(x,insets.left+dragBoundsPadding,windowWidth-insets.right-contentWidth-dragBoundsPadding),y:clamp(y,insets.top+dragBoundsPadding,windowHeight-insets.bottom-contentHeight-dragBoundsPadding)};}'};
object = {code: 'function DevWidgetTsx2(){const{runOnJS,onChangePosition,x,y}=this.__closure;runOnJS(onChangePosition)({x:x.get(),y:y.get()});}'};
object = {code: 'function DevWidgetTsx3(event){const{getClampedPosition,originalX,originalY,x,y}=this.__closure;const{x:xClamped,y:yClamped}=getClampedPosition(originalX.get()+event.translationX,originalY.get()+event.translationY);x.set(xClamped);y.set(yClamped);}'};
object = {code: 'function DevWidgetTsx4(){const{originalX,x,originalY,y}=this.__closure;originalX.set(x.get());originalY.set(y.get());}'};
object = {code: 'function DevWidgetTsx5(){const{getClampedPosition,x,y,withSpring,springUnclamped}=this.__closure;const{x:translateX,y:translateY}=getClampedPosition(x.get(),y.get());return{transform:[{translateX:withSpring(translateX,springUnclamped)},{translateY:withSpring(translateY,springUnclamped)}]};}'};
const env0_16 = value.memo(_fun108024);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/DevWidget.tsx');
exports.default = DevWidget;
}
function DraggableContainer({x, y, contentWidth, contentHeight, dragBoundsPadding, onChangePosition, children}) { // fn#108018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:1768, offset: 0x02312084, size: 817 bytes, params: 2, frame: 33
const env0_3 = contentHeight;
dragBoundsPadding = dragBoundsPadding === undefined ? 0 : dragBoundsPadding;
const styles = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useSharedValue = reanimatedRexportModule.useSharedValue;
let get = x.get;
const value2 = Reflect.apply(useSharedValue, reanimatedRexportModule, [Reflect.apply(get, x, [])]);
const moduleValue2 = reanimatedRexportModule;
useSharedValue = moduleValue2.useSharedValue;
get = y.get;
const value3 = Reflect.apply(useSharedValue, moduleValue2, [Reflect.apply(get, y, [])]);
const value4 = (importDefault(11281) /* metro dependency 11281: useSafeAreaInsetsSharedValueNative */)();
const value5 = (importDefault(14283) /* metro dependency 14283: useWindowDimensionsSharedValueNative */)();
const binding = env0_3;
const useCallback = binding.useCallback;
let closure = DraggableContainerP;
let object2 = {windowDimensionsSharedValue: value5, insetsSharedValue: value4};
object2.clamp = reanimatedRexportModule.clamp;
object2.dragBoundsPadding = dragBoundsPadding;
object2.contentWidth = contentWidth;
object2.contentHeight = contentHeight;
closure.__closure = object2;
closure.__workletHash = 729779775192;
closure.__initData = undefined;
const value6 = Reflect.apply(useCallback, binding, [closure, [contentHeight, contentWidth, dragBoundsPadding,
value4, value5]]);
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value7 = Gesture.Pan();
const onStart = value7.onStart;
closure = DraggableContainerC;
closure.__closure = {originalX: value2, x: x, originalY: value3, y: y};
closure.__workletHash = 7165614533762;
closure.__initData = env0_13;
const value8 = Reflect.apply(onStart, value7, [closure]);
const onUpdate = value8.onUpdate;
closure = DraggableContainerD;
closure.__closure = {getClampedPosition: value6, originalX: value2, originalY: value3, x: x, y: y};
closure.__workletHash = 10056531764801;
closure.__initData = env0_12;
const value9 = Reflect.apply(onUpdate, value8, [closure]);
const onEnd = value9.onEnd;
closure = DraggableContainerF;
closure.__closure = {runOnJS: reanimatedRexportModule.runOnJS, onChangePosition: onChangePosition, x: x, y: y};
closure.__workletHash = 12890758993684;
closure.__initData = env0_11;
const value10 = Reflect.apply(onEnd, value9, [closure]);
const moduleValue3 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = DraggableContainerW;
object2 = {getClampedPosition: value6, x: x, y: y};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.springUnclamped = (require(4581) /* metro dependency 4581: springPresets */).springUnclamped;
closure.__closure = object2;
closure.__workletHash = 6251354551691;
closure.__initData = env0_14;
const value11 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<GestureDetector gesture={value10}>
<View style={[styles.widgetContainer, value11]}>
{children}
</View>
</GestureDetector>
);
}
function _fun108024() { // fn#108024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:3426, offset: 0x02312610, size: 141 bytes, params: 1, frame: 16
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {style: styles.widget, accessibilityRole: 'button', onPress: onPress_108025,
activeOpacity: 0.5};
const StaffBadgeIcon = (require(13969) /* metro dependency 13969: StaffBadgeIcon */).StaffBadgeIcon;
return (
<PressableOpacity {...pressableOpacityProps}>
<StaffBadgeIcon size="md" color="white" />
</PressableOpacity>
);
}
function DevWidget() { // fn#108026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:3744, offset: 0x023126c2, size: 244 bytes, params: 1, frame: 22
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(DevToolsSettingsStore.devWidgetPosition.x);
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(DevToolsSettingsStore.devWidgetPosition.y);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const value4 = ((Component) => <Component x={value2} y={value3} />)(importDefault(14284) /* metro dependency 14284: VEVOO */);
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
return (
<>
{value4}
<DraggableContainer
x={value2}
y={value3}
contentWidth={DEV_WIDGET_SIZE}
contentHeight={DEV_WIDGET_SIZE}
dragBoundsPadding={PX_4}
onChangePosition={onChangePosition}
>
{((Component) => <Component />)(env0_16)}
</DraggableContainer>
</>
);
}
function DraggableContainerP(a0, a1) { // fn#108019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:1996, owner: DraggableContainer.P, offset: 0x023123b5, size: 181 bytes, params: 3, frame: 24
const {width, height} = env0_9.get();
const value3 = env0_8.get();
const object2 = {};
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const clamp = reanimatedRexportModule.clamp;
const left = value3.left;
const dragBoundsPaddingBinding = dragBoundsPadding;
object2.x = Reflect.apply(clamp, reanimatedRexportModule, [a0, left + dragBoundsPaddingBinding,
width - value3.right - contentWidth - dragBoundsPaddingBinding]);
const moduleValue2 = reanimatedRexportModule;
object2.y = moduleValue2.clamp(a1, value3.top + dragBoundsPaddingBinding,
height - value3.bottom - contentHeight - dragBoundsPaddingBinding);
return object2;
}
function DraggableContainerF() { // fn#108022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:2751, owner: DraggableContainer.f, offset: 0x0231250f, size: 85 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS, value,
[onChangePosition]);
const object2 = {};
object2.x = x.get();
object2.y = y.get();
value(object2);
}
function DraggableContainerW() { // fn#108023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:2949, owner: DraggableContainer.W, offset: 0x02312564, size: 172 bytes, params: 1, frame: 21
const binding = env0_10;
const value2 = x.get();
let value = y.get();
value = binding(value2, value);
const x2 = value.x;
const y2 = value.y;
value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
const withSpring = value.withSpring;
const springUnclamped = (require(4581) /* metro dependency 4581: springPresets */).springUnclamped;
const items2 = [{translateX: Reflect.apply(withSpring, value, [x2, springUnclamped])}];
const object = {};
object.translateY = (require(4577) /* metro dependency 4577: spring */).withSpring(y2, springUnclamped);
items2[1] = object;
return {transform: items2};
}
function onPress_108025() { // fn#108025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:3533, offset: 0x0231269d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(13121) /* metro dependency 13121: DevToolsNavigator */).navigateToDevTools();
}
function onChangePosition(a0) { // fn#108027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:4024, owner: DevWidget.onChangePosition, offset: 0x023127b6, size: 48 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (require(13126) /* metro dependency 13126: DevToolsActionCreators */).updateDevToolsSettings({devWidgetPosition: a0});
}
@@ -0,0 +1,194 @@
/* Metro module 14266; source: modules/devtools/native/components/screens/DevToolsAccountLinkingScreen.tsx; dependencies: [57, 31, 27, 4234, 5109, 1867, 3969, 33, 4501, 697, 566, 6779, 1585, 6777, 6774, 6231, 6238, 4573, 7981, 4578, 2] */
function _fun107931(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:6, offset: 0x0230f172, size: 463 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
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 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.Image;
const env0_6 = value.ScrollView;
const env0_7 = value.View;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const authorizedAppsStore = importDefault(5109) /* metro dependency 5109: AuthorizedAppsStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
const object4 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.padding = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.gap = PX_16;
object2.scrollContainer = object4;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.buttonRow = {gap: PX_8};
const object6 = {'width': 64, 'height': 64};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.rewardImage = object6;
const env0_14 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsAccountLinkingScreen.tsx');
exports.default = DevToolsAccountLinkingScreen;
}
function DevToolsAccountLinkingScreen() { // fn#107932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:612, offset: 0x0230f341, size: 1876 bytes, params: 1, frame: 43
var r11;
var r5;
var value31;
var object;
var items6;
var reward_name;
var value;
const value2 = undefined;
const styles = useStyles();
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const [property, property2] = env0_3(env0_4.useState(''), 2);
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore], function() {
return SelectedGuildStore.getGuildId();
});
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const value7 = (importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)((guild == null ? value2 : guild.gameApplicationIds) ?? []).filter(function(a0) {
return a0 != null;
});
const value8 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(property);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ApplicationStore],
_fun107936);
const value10 = (importDefault(6774) /* metro dependency 6774: useStartAuthorize */)(value8, {debug: true});
const canStartAuthorization = value10.canStartAuthorization;
var env0_4 = value10.startAuthorization;
const hasAlreadyLinked = value10.hasAlreadyLinked;
const debug = value10.debug;
const connectionApp = value10.connectionApp;
const {canDeauthorize, deauthorize} = useDeauthorize(connectionApp == null ? value2 : connectionApp.id);
const length = value9.length;
const value12 = 'N/A';
const r30 = length > 0 ? value9.map(_fun107942).join(', ') : value12;
const items5 = [styles.scrollContainer];
const bottom = value3.bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items5[1] = {paddingBottom: bottom + PX_16};
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const items2 = [<TableRowGroup title={'Guild Official Games - ' + ((guild == null ? value2 : guild.name) ?? value12)} hasIcons={false}>{guild != null ? value7.length > 0 ? value7.map(_fun107943) : <TableRow label="No official games" /> : <TableRow label="No guild selected" />}</TableRowGroup>];
const object2 = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.padding = PX_12;
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const items3 = [<View style={object2}><TextInput label="Application ID" value={property} onChange={property2} /></View>];
var TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
items3[1] = <TableRow label={'Name: ' + (value8 != null ? value8.name : value12)} />;
items3[2] = <TableRow label={'Linked Games: ' + r30} />;
items2[1] = <TableRowGroup title="Application" hasIcons={false}>{items3}</TableRowGroup>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items4 = [<TableRow label="Connection Entrypoint URL" trailing={<Text variant="text-sm/semibold" color={debug.hasConnectionEntrypointUrl ? 'text-feedback-positive' : 'text-feedback-critical'}>{debug.hasConnectionEntrypointUrl ? 'Set' : 'Not set'}</Text>} />];
items4[1] = <TableRow label="Already Linked" trailing={<Text variant="text-sm/semibold" color={hasAlreadyLinked ? 'text-feedback-positive' : 'text-muted'}>{hasAlreadyLinked ? 'Yes' : 'No'}</Text>} />;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items4[2] = <View style={styles.buttonRow}><Button disabled={!canStartAuthorization} onPress={function() {
return startAuthorization({});
}} variant="primary" text="Start Authorization" /><Button disabled={!canDeauthorize} onPress={deauthorize} variant="critical-primary" text="Deauthorize" /></View>;
items2[2] = <TableRowGroup title="Authorization" hasIcons={false}>{items4}</TableRowGroup>;
let applicationAccountLinkBenefitConfig = connectionApp == null ? value2 : connectionApp.applicationAccountLinkBenefitConfig;
const value30 = applicationAccountLinkBenefitConfig != null;
if (value30) {
applicationAccountLinkBenefitConfig = connectionApp.applicationAccountLinkBenefitConfig;
value31 = applicationAccountLinkBenefitConfig.reward_image != null;
if (value31) {
object = {};
object.padding = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
r11 = <View style={object}><Image source={{uri: connectionApp.applicationAccountLinkBenefitConfig.reward_image}} style={styles.rewardImage} /></View>;
} else {
r11 = value31;
}
items6 = [r11];
applicationAccountLinkBenefitConfig = connectionApp.applicationAccountLinkBenefitConfig;
reward_name = applicationAccountLinkBenefitConfig.reward_name;
value = 'Unnamed Reward';
items6[1] = <TableRow label={'Reward: ' + (reward_name ?? value)} />;
value = <TableRowGroup title="Reward Configuration" hasIcons={false}>{items6}</TableRowGroup>;
r5 = value;
} else {
r5 = value30;
}
items2[3] = r5;
return (
<ScrollView style={styles.container} contentContainerStyle={items5}>
{items2}
</ScrollView>
);
}
function _fun107936() { // fn#107936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:999, offset: 0x0230fac3, size: 83 bytes, params: 1, frame: 14
var r0;
var linkedGames;
var value;
const value2 = undefined;
if (env0_3 == null) {
r0 = value2;
} else {
linkedGames = env0_3.linkedGames;
if (linkedGames == null) {
r0 = value2;
} else {
value = linkedGames.map(function(a0) {
return ApplicationStore.getApplication(a0.id);
});
value = value.filter(_fun107938);
r0 = value;
}
}
r0 = r0 ?? [];
return r0;
}
function useDeauthorize(a0) { // fn#107939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1258, owner: DevToolsAccountLinkingScreen.useDeauthorize, offset: 0x0230fb32, size: 118 bytes, params: 2, frame: 15
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const newestTokenForApplication = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthorizedAppsStore],
_fun107940);
const binding = env1_4;
const useCallback = binding.useCallback;
return {canDeauthorize: newestTokenForApplication != null, deauthorize: Reflect.apply(useCallback, binding,
[_fun107941, [newestTokenForApplication]])};
}
function _fun107942(a0) { // fn#107942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1546, offset: 0x0230fc00, size: 80 bytes, params: 2, frame: 14
return connectionApp?.id === a0.id ? '' + a0.name + '*' : a0.name;
}
function _fun107943(a0) { // fn#107943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1891, offset: 0x0230fc50, size: 190 bytes, params: 2, frame: 24
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const value2 = undefined;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={'' + a0.name + ' (' + a0.id + ')'}
onPress={onPress_107944}
trailing={env0_0 !== a0.id ? value2 : ((Text) => <Text variant="text-sm/semibold">{'Selected'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
key={a0.id}
/>
);
}
function _fun107940() { // fn#107940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1324, offset: 0x0230fba8, size: 27 bytes, params: 1, frame: 11
return AuthorizedAppsStore.getNewestTokenForApplication(env0_0);
}
function _fun107941() { // fn#107941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1381, offset: 0x0230fbc3, size: 61 bytes, params: 1, frame: 12
var value2;
if (newestTokenForApplication != null) {
value2 = environment.__proto__.__proto__;
(importDefault(6779) /* metro dependency 6779: AuthorizedAppsActionCreators */).delete(newestTokenForApplication.id);
}
}
@@ -0,0 +1,142 @@
/* Metro module 14263; source: modules/devtools/native/components/screens/DevToolsActionSheetsScreen.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 10195, 10193, 5080, 14264, 1962, 4080, 6275, 6758, 6231, 6238, 8129, 4064, 4572, 6239, 4573, 2] */
function _fun107883(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:6, offset: 0x0230cf3d, size: 428 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
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 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.View;
const env0_6 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
object4.flex = 1;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingHorizontal = PX_12;
object3.wrap = object4;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.contentContainer = {paddingVertical: PX_16};
const env0_9 = Reflect.apply(createStyles, value, [object3]);
const items2 = [{'type': 'blocked-domain', 'label': 'Blocked Domain',
'description': 'Shows a warning for potentially malicious domains', show: show_107888}];
items2[1] = {'type': 'suspicious-download', 'label': 'Suspicious Download',
'description': 'Warns users about potentially dangerous file downloads', show: show_107889};
items2[2] = {'type': 'inappropriate-conversation', 'label': 'Inappropriate Conversation',
'description': 'Shows safety warning for inappropriate conversations', show: show_107890};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsActionSheetsScreen.tsx');
exports.default = DevToolsActionSheetsScreen;
}
function ActionSheetSelector({selectedType, onSelect}) { // fn#107884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:1095, offset: 0x0230d0e9, size: 314 bytes, params: 2, frame: 24
var object3;
const env0_2 = env0_4.useCallback(_fun107885, [onSelect]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object3 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object3.header = <BottomSheetTitleHeader title="Select Action Sheet" subtitle={'' + env0_10.length + ' options'} />;
const object2 = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.paddingHorizontal = PX_12;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<BottomSheet {...object3}>
<View style={object2}>
<TableRowGroup hasIcons>
{env0_10.map(_fun107886)}
</TableRowGroup>
</View>
</BottomSheet>
);
}
function show_107888() { // fn#107888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:479, offset: 0x0230d35f, size: 44 bytes, params: 1, frame: 11
return (importDefault(10195) /* metro dependency 10195: BlockedDomainModalActionCreatorsNative */).show('https://example-phishing-site.com/malicious-page');
}
function show_107889() { // fn#107889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:679, offset: 0x0230d38b, size: 44 bytes, params: 1, frame: 11
return (importDefault(10193) /* metro dependency 10193: SuspiciousDownloadModalActionCreatorsNative */).show('https://suspicious-file.com/dangerous-file.exe');
}
function show_107890() { // fn#107890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:889, offset: 0x0230d3b7, size: 94 bytes, params: 1, frame: 16
const defaultImport = importDefault(dependencyMap[8]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[10]);
value = value(dependencyMap[9], dependencyMap.paths);
return Reflect.apply(pushLazy, defaultImport, [value, {'warningId': 'test-warning-123',
'warningType': 'inappropriate_conversation', 'senderId': '123456789', 'channelId': '987654321'},
'INAPPROPRIATE_CONVERSATION_TAKEOVER_MODAL']);
}
function DevToolsActionSheetsScreen() { // fn#107891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:1901, offset: 0x0230d415, size: 407 bytes, params: 1, frame: 29
const styles = useStyles();
const [property, env0_1] = env0_3(env0_4.useState('blocked-domain'), 2);
const value4 = env0_10.find(_fun107892);
const value5 = env0_4.useCallback(_fun107893, [property]);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="heading-lg/medium">{'Action Sheets'}</Text>;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<ScrollView style={styles.wrap} contentContainerStyle={styles.contentContainer}>
<Stack spacing={16}>
<Card>
{text}
<TableRowGroup description="Tap an option to launch the action sheet immediately" hasIcons={false}>
<TableRow
label={value4.label}
subLabel={value4.description}
arrow
onPress={value5}
/>
</TableRowGroup>
</Card>
</Stack>
</ScrollView>
);
}
function _fun107885(a0) { // fn#107885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:1174, offset: 0x0230d223, size: 74 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('action-sheet-selector');
onSelect(a0.type);
a0.show();
}
function _fun107886(a0, a1) { // fn#107886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:1511, offset: 0x0230d26d, size: 242 bytes, params: 3, frame: 22
const env0_0 = a0;
const value2 = undefined;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const WarningIcon = (require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon;
return (
<TableRow
icon={<WarningIcon size="md" />}
label={a0.label}
subLabel={a0.description}
onPress={onPress_107887}
trailing={selectedType !== a0.type ? value2 : ((CheckmarkLargeIcon) => <CheckmarkLargeIcon size="md" color="text-feedback-positive" />)((require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon)}
start={a1 === 0}
end={a1 === env1_10.length - 1}
key={a0.type}
/>
);
}
function _fun107893() { // fn#107893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:2046, offset: 0x0230d5ac, size: 97 bytes, params: 1, frame: 17
const value = environment.__proto__;
const defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = defaultImport.openLazy;
const Promise = global.Promise;
Reflect.apply(openLazy, defaultImport, [Promise.resolve({default: ActionSheetSelector}), 'action-sheet-selector',
{selectedType: env0_0, onSelect: env0_1}]);
}
@@ -0,0 +1,342 @@
/* Metro module 14251; source: modules/devtools/native/components/screens/DevToolsAgeVerificationScreen.tsx; dependencies: [5, 31, 27, 5262, 33, 4501, 697, 14252, 3857, 5263, 5074, 1585, 6231, 6238, 8988, 6243, 2] */
function _fun107813(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14448:6, offset: 0x02309bb3, size: 312 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).ScrollView;
const env0_5 = (require(5262) /* metro dependency 5262: AgeVerificationConstants */).VerificationMethod;
let value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {backgroundColor: BACKGROUND_BASE_LOW};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {padding: PX_16};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
const env0_9 = _fun107814();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsAgeVerificationScreen.tsx');
exports.default = DevToolsAgeVerificationScreen;
}
function _fun107814() { // fn#107814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14448:324, offset: 0x02309ceb, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun107816);
return _fun107818;
}
function DevToolsAgeVerificationScreen() { // fn#107819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14448:967, offset: 0x02309e2c, size: 384 bytes, params: 1, frame: 25
const styles = useStyles();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const items2 = [styles.content];
items2[1] = {paddingBottom: styles.content.padding + value2.bottom};
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
let object = {label: 'Launch Age Verification Test Tool', onPress: env0_9};
const KeyIcon = (require(8988) /* metro dependency 8988: KeyIcon */).KeyIcon;
object.icon = <KeyIcon />;
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
object.trailing = <TableRowArrow />;
const tableRow = <TableRow {...object} />;
return (
<ScrollView style={styles.container} contentContainerStyle={items2}>
<TableRowGroup title="Quick Actions" hasIcons>
{tableRow}
<TableRow
label="Launch Age Verification Modal"
onPress={function() {
var defaultImport = importDefault(dependencyMap[9]);
var object = {};
object.entryPoint = require(dependencyMap[10]).AgeVerificationModalEntryPoint.DEV_TOOLS_QUICK_ACTIONS;
return defaultImport.showAgeVerificationGetStartedModal(object);
}}
icon={<KeyIcon />}
trailing={<TableRowArrow />}
/>
</TableRowGroup>
</ScrollView>
);
}
function* _fun107816() { // fn#107816, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14448:344, offset: 0x02309d1a, size: 222 bytes, params: 1, frame: 17
var environment;
var binding;
var binding2;
var property;
var value3;
var testAgeVerification;
var MODULAR;
var value4;
var value5;
var value6;
var binding3;
var value7;
var showAgeVerification;
var object2;
var verification_webview_url;
var closure;
var value8;
var AgeVerificationModalEntryPoint;
var DEV_TOOLS_QUICK_ACTIONS;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
property = binding2[7];
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
testAgeVerification = value3.testAgeVerification;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
binding = env2_5;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
MODULAR = binding.MODULAR;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
value4 = Reflect.apply(testAgeVerification, value3, [MODULAR]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
if (value6) {
return value5;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
property = binding3[9];
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
value7 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
showAgeVerification = value7.showAgeVerification;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
object2 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
verification_webview_url = value5.verification_webview_url;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
object2.webviewUrl = verification_webview_url;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
closure = onComplete;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
object2.onComplete = closure;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
property = binding3[10];
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
value8 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
AgeVerificationModalEntryPoint = value8.AgeVerificationModalEntryPoint;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
DEV_TOOLS_QUICK_ACTIONS = AgeVerificationModalEntryPoint.DEV_TOOLS_QUICK_ACTIONS;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
object2.entryPoint = DEV_TOOLS_QUICK_ACTIONS;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
Reflect.apply(showAgeVerification, value7, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
}
}
}
function onComplete() { // fn#107817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14448:489, offset: 0x02309df8, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__;
env3_1(env3_2[8]).open({'content': '[On Complete] Successfully age verified',
'key': 'age-verification-test-success'});
}
@@ -0,0 +1,225 @@
/* Metro module 13125; source: modules/devtools/native/components/screens/DevToolsAnalyticsScreen.tsx; dependencies: [57, 31, 27, 1878, 12953, 661, 33, 4501, 697, 4573, 6238, 11046, 3738, 9210, 5278, 6797, 4060, 566, 7705, 8416, 4572, 6231, 6808, 11689, 4071, 13126, 6984, 2] */
function _fun100327(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:6, offset: 0x021e4877, size: 580 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
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 env0_5 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const analyticsLogStore = importDefault(12953) /* metro dependency 12953: AnalyticsLogStore */;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.analyticsContainer = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.contentContainer = {padding: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.searchFieldContainer = {paddingHorizontal: PX_16};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.detailsContainer = {backgroundColor: BACKGROUND_SURFACE_HIGH};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.commonPropertiesContainer = {backgroundColor: BACKGROUND_BASE_LOWEST, paddingHorizontal: 10};
object2.commonProperty = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
'marginVertical': 8, 'height': 20};
object2.customPropertiesContainer = {'paddingHorizontal': 10, 'paddingVertical': 4};
object2.customProperty = {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap',
'justifyContent': 'flex-start', 'marginVertical': 4};
let CODE_BOLD = Fonts.CODE_BOLD;
object2.customPropertyName = {'fontWeight': '600', 'fontFamily': null, 'marginRight': 4, fontFamily: CODE_BOLD};
CODE_BOLD = Fonts.CODE_BOLD;
object2.monospace = {fontFamily: CODE_BOLD};
object2.copyContainer = {'flexDirection': 'row', 'alignItems': 'center'};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsAnalyticsScreen.tsx');
exports.default = DevToolsAnalyticsScreen;
}
function CommonProperty({name, children}) { // fn#100328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:1052, offset: 0x021e4abb, size: 123 bytes, params: 2, frame: 19
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.commonProperty}>
<Text variant="text-sm/semibold" color="text-default">
{name}
</Text>
{children}
</View>
);
}
function LoggedEvent({event, properties, timestamp, fingerprint, start, end}) { // fn#100329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:1234, offset: 0x021e4b36, size: 960 bytes, params: 2, frame: 42
var r5;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
var items5;
var value;
const styles = useStyles();
const [property, env0_2] = env0_3(env0_4.useState(false), 2);
const user = UserStore.getUser(fingerprint);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const AnalyticsIcon = (require(11046) /* metro dependency 11046: AnalyticsIcon */).AnalyticsIcon;
const tableRow = <TableRow arrow={!property} icon={<AnalyticsIcon />} label={event} subLabel={'name' in properties ? properties.name : properties.location?.toString() ?? 'N/A'} onPress={onPress_100330} start={start} end={end} />;
if (property) {
var viewBinding2Props = {style: styles.detailsContainer};
var viewBinding3Props = {style: styles.commonPropertiesContainer};
items2 = [<CommonProperty name="Timestamp (local)"><Text variant="text-sm/semibold" color="mobile-text-heading-primary">{(importDefault(3738) /* metro dependency 3738 */)(timestamp).calendar()}</Text></CommonProperty>];
items2[1] = user != null && <CommonProperty name="User ">{((Component) => <Component user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */)}</CommonProperty>;
items2[2] = <CommonProperty name="Fingerprint">{fingerprint != null ? ((PressableOpacity) => <PressableOpacity style={styles.copyContainer} onPress={onPress_100332}><Text variant="text-sm/medium" color="mobile-text-heading-primary" style={[styles.monospace,
{marginRight: 4}]}>{fingerprint}</Text>{((CopyIcon) => <CopyIcon size="sm" />)((require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity) : <Text variant="text-sm/medium" color="text-muted" style={styles.monospace}>{'null'}</Text>}</CommonProperty>;
items5 = [<View {...viewBinding3Props}>{items2}</View>];
var viewBinding4Props = {style: styles.customPropertiesContainer};
value = global.Object.entries(properties);
items5[1] = <View {...viewBinding4Props}>{value.map(_fun100333)}</View>;
value = <View {...viewBinding2Props}>{items5}</View>;
r5 = value;
} else {
r5 = property;
}
return (
<View collapsable={false}>
{tableRow}
{r5}
</View>
);
}
function DevToolsAnalyticsScreen() { // fn#100334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:2944, offset: 0x021e5081, size: 935 bytes, params: 1, frame: 46
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const styles = useStyles();
const loggedEventsVersion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AnalyticsLogStore],
function() {
return AnalyticsLogStore.loggedEventsVersion;
});
const loggedEvents = AnalyticsLogStore.loggedEvents;
const [property, property2] = env0_3(env0_4.useState(false), 2);
const [property3, property4] = env0_3(env0_4.useState(''), 2);
const r0 = property3.toLowerCase().trim() === '' ? loggedEvents : loggedEvents.filter(_fun100336);
items = [];
arraySpread(items, r0, 0, undefined);
const r9 = property ? items.reverse() : items;
const value10 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const ArrowsUpDownIcon = (require(11689) /* metro dependency 11689: ArrowsUpDownIcon */).ArrowsUpDownIcon;
const tableSwitchRow = <TableSwitchRow icon={<ArrowsUpDownIcon />} label="Reverse Events" value={property} onValueChange={property2} />;
const TrashIcon = (require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon;
const items2 = [<TableRowGroup title="Actions" hasIcons>{tableSwitchRow}<TableRow arrow variant="danger" icon={<TrashIcon color="text-feedback-critical" />} label="Clear Analytics Log" onPress={(require(13126) /* metro dependency 13126: DevToolsActionCreators */).clearAnalyticsLog} /></TableRowGroup>];
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
items2[1] = <View style={styles.searchFieldContainer}><SearchField placeholder="Search by event name" onChange={property4} /></View>;
items2[2] = <TableRowGroup title="Analytics Events" hasIcons={false}>{loggedEvents.length === 0 ? <TableRow label="No events logged." /> : r0.length !== 0 ? null : <TableRow label={'No events match "' + property3 + '"'} />}</TableRowGroup>;
return (
<View style={styles.analyticsContainer}>
<FlashList
ListHeaderComponent={<Stack spacing={16}>{items2}</Stack>}
contentContainerStyle={styles.contentContainer}
extraData={loggedEventsVersion}
data={r9}
estimatedItemSize={value10}
renderItem={renderItem_100337}
/>
</View>
);
}
function LoggedEventOnPress() { // fn#100330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:1591, owner: LoggedEvent.onPress, offset: 0x021e4ef6, size: 25 bytes, params: 1, frame: 11
return env0_2(function(a0) {
return !a0;
});
}
function LoggedEventOnPress_100332() { // fn#100332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:2066, owner: LoggedEvent.onPress, offset: 0x021e4f0f, size: 57 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (fingerprint != null) {
value2 = environment.__proto__;
moduleValue = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
moduleValue.copy(fingerprint);
}
}
function _fun100333(a0) { // fn#100333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:2442, offset: 0x021e4f48, size: 313 bytes, params: 2, frame: 26
var r0;
var r1;
var r12;
var r6;
var item3;
var value3;
var object;
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 r3 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
r12 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r12 = value;
} else {
r0 = item3;
r1 = value3;
r12 = item;
}
}
if (!r1) {
r0.return();
}
const stylesBinding = styles;
const customProperty = stylesBinding.customProperty;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-sm/semibold" color="text-brand" style={stylesBinding.customPropertyName}>{r3}{':'}</Text>;
if (r12 != null) {
object = {'variant': 'text-sm/semibold', 'color': 'mobile-text-heading-primary'};
object.style = styles.monospace;
object.children = global.JSON.stringify(r12);
r6 = object;
} else {
r6 = {'variant': 'text-sm/semibold', 'color': 'text-muted', 'style': null, 'children': 'null',
style: styles.monospace};
}
return (
<View style={customProperty} key={r3}>
{text}
<Text {...r6} />
</View>
);
}
function _fun100336({event}) { // fn#100336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:3195, offset: 0x021e5439, size: 38 bytes, params: 2, frame: 11
return event.toLowerCase().includes(env0_0);
}
function DevToolsAnalyticsScreenRenderItem({item, index}) { // fn#100337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:4175, owner: DevToolsAnalyticsScreen.renderItem, offset: 0x021e545f, size: 117 bytes, params: 2, frame: 16
return (
<LoggedEvent
start={index === 0}
end={index === env0_1.length - 1}
event={item.event}
properties={item.properties}
timestamp={item.timestamp}
fingerprint={item.fingerprint}
/>
);
}
@@ -0,0 +1,161 @@
/* Metro module 13129; source: modules/devtools/native/components/screens/DevToolsBuildOverrideScreen.tsx; dependencies: [57, 31, 27, 10557, 33, 4501, 697, 10078, 13130, 5463, 566, 10558, 4572, 6231, 6238, 4060, 6797, 3856, 13127, 4071, 7988, 7987, 7981, 4578, 1360, 2] */
function _fun100346(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:6, offset: 0x021e56fc, size: 414 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).ScrollView;
const buildOverrideStore = importDefault(10557) /* metro dependency 10557: BuildOverrideStore */;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.content = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.contentContainer = {padding: PX_16};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {'label': 'Branch Name', 'value': 'branch'};
const TagIcon = (require(10078) /* metro dependency 10078: TagIcon */).TagIcon;
object2.icon = <TagIcon />;
const items2 = [object2];
object2 = {'label': 'Commit SHA', 'value': 'id'};
const HashmarkIcon = (require(13130) /* metro dependency 13130: HashmarkIcon */).HashmarkIcon;
object2.icon = <HashmarkIcon />;
items2[1] = object2;
value = value.memo(_fun100347);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsBuildOverrideScreen.tsx');
exports.default = value;
}
function _fun100347() { // fn#100347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:457, offset: 0x021e589a, size: 1081 bytes, params: 1, frame: 38
var r8;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var items3;
const value2 = undefined;
const styles = useStyles();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BuildOverrideStore], function() {
var r0;
var property = BuildOverrideStore.getCurrentBuildOverride().overrides;
if (property == null) {
r0 = undefined;
} else {
property = property[require(dependencyMap[11]).DEVICE_FIELD];
r0 = property;
}
return r0;
});
let binding = env0_4;
const value4 = '';
let [property, env0_2] = env0_3(binding.useState({'type': 'branch', 'id': ''}), 2);
const closure = getLabel_100349;
const object = {};
copyDataProperties(object, styles.contentContainer, undefined);
object['paddingBottom'] = styles.contentContainer.padding + insets.bottom;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const value7 = null;
if (value7 != value3) {
items3 = [<TableRow icon={((CopyIcon) => <CopyIcon />)((require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon)} label={closure(value3)} subLabel={value3.id} onPress={onPress_100351} />];
items3[1] = <TableRow icon={((RefreshIcon) => <RefreshIcon />)((require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon)} label="Refresh Override" onPress={(require(10558) /* metro dependency 10558: BuildOverrideUtils */).refreshBuildOverride} arrow />;
items3[2] = <TableRow icon={((TrashIcon) => <TrashIcon color="text-feedback-critical" />)((require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon)} label="Clear Override" variant="danger" onPress={(require(10558) /* metro dependency 10558: BuildOverrideUtils */).clearBuildOverride} arrow />;
r8 = <TableRowGroup title="Current Override" hasIcons>{items3}</TableRowGroup>;
} else {
r8 = value7;
}
const items2 = [r8];
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const r18 = value7 != value3 ? 'New' : value4;
const type = property.type;
binding = env0_10;
items2[1] = <TableRadioGroup title={r18 + ' Override Type'} defaultValue={type} onChange={onChange_100352} hasIcons>{binding.map(_fun100353)}</TableRadioGroup>;
const object3 = {title: closure(property), hasIcons: true};
const value11 = binding.find(_fun100354);
const icon = value7 == value11 ? value2 : value11.icon;
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
items2[2] = <TableRowGroup {...object3}><TableRow icon={icon} label={<TextInput size="md" placeholder={'Enter ' + closure(property)} onChange={onChange_100355} autoCapitalize="none" autoCorrect={false} autoComplete="off" isClearable />} /></TableRowGroup>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[3] = <Button text="Apply Build Override" disabled={value4 === property.id} onPress={onPress_100356} />;
return (
<ScrollView style={styles.content} contentContainerStyle={object}>
<Stack spacing={16}>
{items2}
</Stack>
</ScrollView>
);
}
function getLabel_100349(a0) { // fn#100349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:729, offset: 0x021e5d17, size: 52 bytes, params: 2, frame: 11
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return env1_10.find(_fun100350)?.label;
}
function onPress_100351() { // fn#100351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:1149, offset: 0x021e5d65, size: 72 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(env0_0.id);
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
}
function onChange_100352(a0) { // fn#100352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:1615, offset: 0x021e5dad, size: 33 bytes, params: 2, frame: 11
env0_2({type: a0, id: ''});
}
function _fun100353({icon, value, label}) { // fn#100353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:1666, offset: 0x021e5dce, size: 76 bytes, params: 2, frame: 18
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
value={value}
label={label}
icon={icon}
key={value}
/>
);
}
function _fun100354({value}) { // fn#100354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:1859, offset: 0x021e5e1a, size: 26 bytes, params: 2, frame: 2
return value === env0_1.type;
}
function onChange_100355(a0) { // fn#100355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:1982, offset: 0x021e5e34, size: 41 bytes, params: 2, frame: 13
const binding = env0_2;
const object2 = {};
copyDataProperties(object2, env0_1, undefined);
object2['id'] = a0;
binding(object2);
}
function onPress_100356() { // fn#100356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:2153, offset: 0x021e5e5d, size: 171 bytes, params: 1, frame: 12
var value2;
var moduleValue;
var value3;
var moduleValue2;
var value4;
var moduleValue3;
const type = env0_1.type;
if (type === 'branch') {
value4 = environment.__proto__;
moduleValue3 = require(10558) /* metro dependency 10558: BuildOverrideUtils */;
moduleValue3.setBuildOverrideForBranch(env0_1.id);
} else if (type === 'id') {
value3 = environment.__proto__;
moduleValue2 = require(10558) /* metro dependency 10558: BuildOverrideUtils */;
moduleValue2.setBuildOverrideForId(env0_1.id);
} else {
value2 = environment.__proto__;
moduleValue = require(1360) /* metro dependency 1360: GlobalUtils */;
moduleValue.assertNever(env0_1.type);
}
}
function _fun100350({value}) { // fn#100350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:763, offset: 0x021e5d4b, size: 26 bytes, params: 2, frame: 2
return value === env0_0.type;
}
@@ -0,0 +1,123 @@
/* Metro module 14253; source: modules/devtools/native/components/screens/DevToolsComponentsTestingScreen.tsx; dependencies: [57, 31, 27, 1934, 33, 4501, 697, 4627, 1909, 8357, 6239, 4573, 14254, 14257, 4578, 4572, 14258, 694, 2] */
function _fun107826(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14450:6, offset: 0x0230a131, size: 595 bytes, params: 8, frame: 27
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).ScrollView;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.wrap = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
const object4 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.padding = PX_16;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object4.paddingBottom = PX_32;
object2.contentContainer = object4;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object2]);
const interactionComponentUtilsModule = require(4627) /* metro dependency 4627: InteractionComponentUtils */;
const transformComponents = interactionComponentUtilsModule.transformComponents;
const {STRING_SELECT, TEXT_DISPLAY} = (require(1909) /* metro dependency 1909: Server */).ComponentType;
value = value(Reflect.apply(transformComponents, interactionComponentUtilsModule, [[{'type': null,
'custom_id': 'test', 'max_values': 1, 'min_values': 1, 'placeholder': 'Choose...', type: STRING_SELECT,
options: [{'label': 'test with a long label', 'value': 'test'}, {'label': 'test 2 with a long label',
'value': 'test2', 'description': 'with description!'}, {'label': 'star with a long label', 'value': 'star',
emoji: {name: '⭐'}}, {'label': 'advaith', 'value': 'advaith', emoji: {'id': '889887673425199124',
'name': 'advaith_anim', 'animated': true}}]}, {type: TEXT_DISPLAY,
content: 'hello world! :eyes: **bold** `code` https://cdn.discordapp.com/attachments/1408191424968523819/1408191500277387274/advaith.webp\nhttps://discord.com [google](https://google.com) ||spoiler|| <t:1755730638:t> <a:wumpus_party:393564669765353483>'}]]),
2);
const env0_11 = value[0];
const env0_12 = value[1];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsComponentsTestingScreen.tsx');
exports.default = DevToolsComponentsTestingScreen;
}
function Select({type, title}) { // fn#107827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14450:1117, offset: 0x0230a384, size: 691 bytes, params: 2, frame: 29
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const [property, env0_0] = env0_3(env0_4.useState(false), 2);
const object2 = {};
copyDataProperties(object2, env0_11, undefined);
object2['maxValues'] = property ? 4 : 1;
object2['type'] = type;
const String = global.String;
object2['id'] = String(type);
const componentStateContextModule = require(8357) /* metro dependency 8357: ComponentStateContext */;
const useComponentState = componentStateContextModule.useComponentState;
const state = Reflect.apply(useComponentState, componentStateContextModule, [object2]).state;
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const text = <Text variant="heading-lg/medium">{title}</Text>;
type = object2.type;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const STRING_SELECT = ComponentType.STRING_SELECT;
const r7 = type === STRING_SELECT ? ((Component) => <Component {...object2} />)(importDefault(14254) /* metro dependency 14254: StringSelectActionComponent */) : ((Component) => <Component {...object2} {...{['type']: object2.type}} />)(importDefault(14257) /* metro dependency 14257: SearchableSelectActionComponent */);
const r6 = state?.type === object2.type ? <Text variant="text-md/normal">{'Selected values: '}{('values' in state ? state.values : state.selectedOptions.map(function(a0) {
return a0.label;
})).join(', ')}</Text> : <Text variant="text-md/normal">{'Nothing selected'}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<Card style={{gap: 8}}>
{text}
{r7}
{r6}
<Button
text={'Toggle Multi Select (' + (property ? 'on' : 'off') + ')'}
onPress={onPress_107829}
size="sm"
/>
</Card>
);
}
function DevToolsComponentsTestingScreen() { // fn#107831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14450:1954, offset: 0x0230a650, size: 598 bytes, params: 1, frame: 29
const styles = useStyles();
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items3 = [<Text variant="text-md/normal">{'Test screen for embedding native components in RN'}</Text>];
const ComponentStateContextProvider = (require(8357) /* metro dependency 8357: ComponentStateContext */).ComponentStateContextProvider;
const object = {customId: 'modal'};
object.channelId = SelectedChannelStore.getChannelId();
object.components = env0_10;
const items2 = [((Component) => <Component {...env0_12} />)(importDefault(14258) /* metro dependency 14258: TextDisplayComponent */)];
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const STRING_SELECT = ComponentType.STRING_SELECT;
items2[1] = <Select title="String Select" type={STRING_SELECT} />;
const USER_SELECT = ComponentType.USER_SELECT;
items2[2] = <Select title="User Select" type={USER_SELECT} />;
const ROLE_SELECT = ComponentType.ROLE_SELECT;
items2[3] = <Select title="Role Select" type={ROLE_SELECT} />;
const MENTIONABLE_SELECT = ComponentType.MENTIONABLE_SELECT;
items2[4] = <Select title="Mentionable Select" type={MENTIONABLE_SELECT} />;
const CHANNEL_SELECT = ComponentType.CHANNEL_SELECT;
items2[5] = <Select title="Channel Select" type={CHANNEL_SELECT} />;
items3[1] = <ComponentStateContextProvider modal={object}>{items2}</ComponentStateContextProvider>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items3[2] = <Button onPress={onPress_107832} text="Reset Modal State" />;
return (
<ScrollView style={styles.wrap} contentContainerStyle={styles.contentContainer}>
<Stack spacing={16}>
{items3}
</Stack>
</ScrollView>
);
}
function SelectOnPress() { // fn#107829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14450:1801, owner: Select.onPress, offset: 0x0230a637, size: 25 bytes, params: 1, frame: 11
return env0_0(function(a0) {
return !a0;
});
}
function DevToolsComponentsTestingScreenOnPress() { // fn#107832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14450:2764, owner: DevToolsComponentsTestingScreen.onPress, offset: 0x0230a8a6, size: 51 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'CLEAR_INTERACTION_MODAL_STATE',
'customId': 'modal'});
}
@@ -0,0 +1,312 @@
/* Metro module 13166; source: modules/devtools/native/components/screens/DevToolsDataStorageScreen.tsx; dependencies: [57, 31, 27, 567, 1226, 33, 4501, 697, 6238, 1910, 3857, 566, 1926, 1485, 5463, 7705, 7706, 7699, 6984, 4080, 4573, 8671, 6805, 6758, 6807, 2] */
function _fun100465(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:6, offset: 0x021e8e49, size: 494 bytes, params: 8, frame: 26
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(567) /* metro dependency 567: PersistedStore */).PersistedStore;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingHorizontal = PX_12;
object4.flex = 1;
object3.container = object4;
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.sectionHeader = {'backgroundColor': null, 'verticalAlign': 'middle', 'flexDirection': 'row',
'alignItems': 'center', 'flex': 1, backgroundColor: BACKGROUND_BASE_LOW};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object3]);
const env0_10 = value.memo(_fun100468);
const env0_11 = value.memo(_fun100470);
const env0_12 = value.memo(_fun100472);
const env0_13 = value.memo(_fun100474);
object3 = {DATABASE_CONTROLS: 0};
object3[0] = 'DATABASE_CONTROLS';
object3.DATABASE_CURRENT = 1;
object3[1] = 'DATABASE_CURRENT';
object3.PERSISTED_STORES = 2;
object3[2] = 'PERSISTED_STORES';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsDataStorageScreen.tsx');
exports.default = DevToolsDataStorageScreen;
}
function DevToolsPersistedStoresActionSheet({store, close}) { // fn#100466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:1531, offset: 0x021e9037, size: 219 bytes, params: 2, frame: 22
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const object2 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object2.header = <BottomSheetTitleHeader title={store.getName()} />;
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
const Group = ActionSheetRow.Group;
return (
<ActionSheet {...object2}>
<Group hasIcons={false}>
<ActionSheetRow
variant="danger"
label="Clear persisted store"
subLabel="App restart required to re-init the cleared store"
onPress={function() {
store.clear();
importDefault(dependencyMap[10]).open({'key': 'DevToolsPersistedStoresActionSheet',
'content': 'Store cleared from persisted storage'});
close();
}}
/>
</Group>
</ActionSheet>
);
}
function _fun100468() { // fn#100468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:461, offset: 0x021e915f, size: 70 bytes, params: 1, frame: 14
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label="Disable Database"
start
onPress={onPress_100469}
/>
);
}
function _fun100470() { // fn#100470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:722, offset: 0x021e920e, size: 191 bytes, params: 1, frame: 17
const value2 = undefined;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const items = [importDefault(1926) /* metro dependency 1926: DatabaseManager */];
items[1] = AuthenticationStore;
const value3 = Reflect.apply(useStateFromStores, fluxModule, [items, function() {
return importDefault(dependencyMap[12]).database(AuthenticationStore.getId());
}]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={value3 == null ? 'No active database.' : value3.name}
start
end
subLabel={value3 != null ? 'Handle: ' + value3.handle : value2}
/>
);
}
function _fun100472() { // fn#100472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:963, offset: 0x021e9301, size: 68 bytes, params: 1, frame: 14
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return <TableRow label="Disable + Remove Database" onPress={onPress_100473} />;
}
function _fun100474() { // fn#100474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:1224, offset: 0x021e9396, size: 96 bytes, params: 1, frame: 16
const env0_0 = (require(1485) /* metro dependency 1485 */).useNavigation();
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label="View Cache Stats"
end
onPress={onPress_100475}
/>
);
}
function DevToolsDataStorageScreen() { // fn#100476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2141, offset: 0x021e9412, size: 391 bytes, params: 1, frame: 26
const styles = useStyles();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value2 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
const value3 = (importDefault(7706) /* metro dependency 7706: useScaledSectionHeight */)();
const value4 = (importDefault(7699) /* metro dependency 7699: useFastestListTableRowPlaceholderConfigNative */)();
const binding = env0_4;
const value5 = binding.useCallback(_fun100477, []);
const value7 = env0_3(binding.useState(_fun100480), 2);
const {sections, persistedStores} = value7[0];
var env0_3 = value7[1];
const value8 = binding.useCallback(_fun100481, [persistedStores, value5]);
const value9 = binding.useCallback(_fun100485, [styles]);
const FastestListAndroid = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
const bottom = insets.bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
return (
<View style={styles.container}>
<FastestListAndroid
sections={sections}
renderItem={value8}
renderSectionHeader={value9}
insetEnd={bottom + PX_16}
itemSize={value2}
sectionHeaderSize={value3}
estimatedListSize="windowSize"
placeholderConfig={value4}
wrapChildren
/>
</View>
);
}
function onPress_100469() { // fn#100469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:541, offset: 0x021e91a5, size: 105 bytes, params: 1, frame: 13
const value = environment.__proto__;
const value2 = (importDefault(1910) /* metro dependency 1910: DatabaseDaos */).database();
if (value2 != null) {
value2.disable('via UserSettingsDatabaseControls');
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({'key': 'disable_database',
'content': 'Database has been disabled.'});
}
}
function onPress_100473() { // fn#100473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:1043, offset: 0x021e9345, size: 81 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(1926) /* metro dependency 1926: DatabaseManager */).replaceDisableAllDatabases('via UserSettingsDatabaseControls');
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({'key': 'disable_database_and_remove',
'content': 'Database has been removed.'});
}
function onPress_100475() { // fn#100475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:1333, offset: 0x021e93f6, size: 28 bytes, params: 1, frame: 11
env0_0.navigate('cacheStats');
}
function _fun100477(a0) { // fn#100477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2290, offset: 0x021e9599, size: 140 bytes, params: 2, frame: 14
const env0_0 = a0;
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const value3 = PersistedStore.getAll().filter(_fun100478);
const object2 = {};
const {DATABASE_CONTROLS, DATABASE_CURRENT, PERSISTED_STORES} = env1_14;
object2.sections = [DATABASE_CONTROLS, DATABASE_CURRENT, PERSISTED_STORES].map(_fun100479);
object2.persistedStores = value3;
return object2;
}
function _fun100481(a0, a1) { // fn#100481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2773, offset: 0x021e96e3, size: 462 bytes, params: 3, frame: 20
var environment;
var persistedStoresBinding;
var length;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var object2;
const env0_0 = a1;
const value = environment.__proto__;
const DATABASE_CONTROLS = env1_14.DATABASE_CONTROLS;
if (DATABASE_CONTROLS === a0) {
if (a1 === 0) {
return ((Component) => <Component />)(env1_10);
}
if (a1 === 1) {
return ((Component) => <Component />)(env1_12);
}
if (a1 === 2) {
return ((Component) => <Component />)(env1_13);
}
} else {
var DATABASE_CURRENT = env1_14.DATABASE_CURRENT;
if (DATABASE_CURRENT === a0) {
return a1 !== 0 ? null : ((Component) => <Component />)(env1_11);
}
var PERSISTED_STORES = env1_14.PERSISTED_STORES;
if (PERSISTED_STORES === a0) {
if (a1 === 0) {
return (
<TableRow
label={((SearchField) => <SearchField size="md" onChange={onChange_100482} />)((require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField)}
start
/>
);
}
if (a1 !== 1) {
persistedStoresBinding = persistedStores;
return (
<TableRow
label={persistedStoresBinding[a1 - 1].getName()}
end={a1 === persistedStoresBinding.length}
onPress={onPress_100483}
/>
);
}
length = persistedStores.length;
if (length === 0) {
return <TableRow label="No results found." end />;
}
object2 = {};
persistedStoresBinding = persistedStores;
object2.label = persistedStoresBinding[a1 - 1].getName();
length = persistedStoresBinding.length;
object2.end = a1 === length;
object2.onPress = onPress_100483;
return <TableRow {...object2} />;
}
}
return null;
}
function _fun100485(a0) { // fn#100485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:3524, offset: 0x021e9971, size: 144 bytes, params: 2, frame: 18
const value = environment.__proto__;
const value2 = undefined;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const DATABASE_CONTROLS = env1_14.DATABASE_CONTROLS;
return (
<Text
style={styles.sectionHeader}
variant="text-sm/semibold"
color="text-default"
>
{DATABASE_CONTROLS === a0 ? 'Database Controls' : env1_14.DATABASE_CURRENT === a0 ? 'Database (Current)' : env1_14.PERSISTED_STORES !== a0 ? value2 : 'Persisted Stores'}
</Text>
);
}
function _fun100478(a0) { // fn#100478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2341, offset: 0x021e9625, size: 66 bytes, params: 2, frame: 13
var r0;
var includes;
var binding;
let value = environment.__proto__.__proto__;
value = a0 instanceof PersistedStore;
if (value) {
value = a0.getName();
value = value.toLocaleLowerCase();
includes = value.includes;
binding = env0_0;
value = Reflect.apply(includes, value, [binding.toLocaleLowerCase()]);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun100479(a0) { // fn#100479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2507, offset: 0x021e9667, size: 104 bytes, params: 2, frame: 4
var length;
var value2;
const DATABASE_CONTROLS = env2_14.DATABASE_CONTROLS;
if (DATABASE_CONTROLS === a0) {
return 3;
}
const DATABASE_CURRENT = env2_14.DATABASE_CURRENT;
if (DATABASE_CURRENT === a0) {
return 1;
}
const PERSISTED_STORES = env2_14.PERSISTED_STORES;
if (PERSISTED_STORES === a0) {
length = env0_1.length;
value2 = 1;
return value2 + (length > 0 ? env0_1.length : value2);
}
}
function onChange_100482(a0) { // fn#100482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:3079, offset: 0x021e98b1, size: 28 bytes, params: 2, frame: 12
return env1_3(env1_1(a0));
}
function onPress_100483() { // fn#100483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:3263, offset: 0x021e98cd, size: 120 bytes, params: 1, frame: 18
var environment;
const value = environment.__proto__.__proto__;
const defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = defaultImport.openLazy;
const Promise = global.Promise;
Reflect.apply(openLazy, defaultImport, [Promise.resolve({default: DevToolsPersistedStoresActionSheet}),
'DevToolsPersistedStoresActionSheet', {store: persistedStores[require - 1], close: close_100484}]);
}
function onPress_100483Close() { // fn#100484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:3405, owner: onPress_100483.close, offset: 0x021e9945, size: 44 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('DevToolsPersistedStoresActionSheet');
}
@@ -0,0 +1,212 @@
/* Metro module 14157; source: modules/devtools/native/components/screens/DevToolsDismissableContentsScreen.tsx; dependencies: [57, 31, 27, 1369, 33, 4501, 697, 1365, 14158, 6808, 5463, 7705, 7706, 10779, 6590, 566, 7699, 4573, 6231, 12715, 6238, 1362, 4071, 6243, 14159, 6984, 8671, 8607, 2] */
function _fun107130(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:6, offset: 0x022f450b, size: 522 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const dismissibleContentFrameworkStore = importDefault(1369) /* metro dependency 1369: DismissibleContentFrameworkStore */;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingTop = PX_16;
object4.flex = 1;
object3.container = object4;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.list = {flex: 1, paddingHorizontal: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.search = {paddingHorizontal: PX_16};
const object6 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingBottom = PX_16;
object3.section = object6;
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.sectionHeader = {'backgroundColor': null, 'verticalAlign': 'middle', 'flexDirection': 'row',
'alignItems': 'center', 'flex': 1, backgroundColor: BACKGROUND_BASE_LOW};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object3.emptyState = {'marginVertical': null, 'justifyContent': 'center', 'alignItems': 'center', 'flex': 1,
marginVertical: PX_32};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object3]);
const env0_10 = value.memo(_fun107131);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsDismissableContentsScreen.tsx');
exports.default = DevToolsDismissableContentsScreen;
}
function _fun107131({content, start, end}) { // fn#107131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:724, offset: 0x022f4715, size: 139 bytes, params: 2, frame: 19
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const {isDismissed,
handleToggleDismissState} = (importDefault(14158) /* metro dependency 14158: toggleDismissibleContentDismissState */)(DismissibleContent[content]);
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
return (
<TableSwitchRow
start={start}
end={end}
onValueChange={handleToggleDismissState}
value={isDismissed}
label={content}
/>
);
}
function DevToolsDismissableContentsScreen() { // fn#107132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:1063, offset: 0x022f47a0, size: 1429 bytes, params: 1, frame: 43
var r5;
var Text;
var object;
var value;
const styles = useStyles();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value2 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
const value3 = (importDefault(7706) /* metro dependency 7706: useScaledSectionHeight */)();
const useLocalStorageStateModule = require(10779) /* metro dependency 10779: useLocalStorageState */;
const value4 = '';
const value5 = useLocalStorageStateModule.useLocalStorageState('devtools-dc-search', value4);
const binding = env0_3;
const value6 = binding(value5, 2);
const property = value6[0];
const env0_2 = value6[1];
const binding2 = env0_4;
var env0_3 = binding2.useCallback(_fun107133, []);
const useState = binding2.useState;
const value7 = binding(Reflect.apply(useState, binding2, [_fun107135]), 2);
const {sections, dismissableContent} = value7[0];
const env0_5 = value7[1];
const {dailyCapOverridden,
newUserMinAgeRequiredOverridden} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([DismissibleContentFrameworkStore],
function() {
return {dailyCapOverridden: DismissibleContentFrameworkStore.dailyCapOverridden,
newUserMinAgeRequiredOverridden: DismissibleContentFrameworkStore.newUserMinAgeRequiredOverridden};
});
const value9 = (importDefault(7699) /* metro dependency 7699: useFastestListTableRowPlaceholderConfigNative */)();
const value10 = binding2.useCallback(_fun107137, [dismissableContent]);
const value11 = binding2.useCallback(_fun107138, [styles]);
let section = styles.section;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const items2 = [<View style={section}><TableRowGroup title="Global Overrides" hasIcons={false}><TableSwitchRow onValueChange={(require(12715) /* metro dependency 12715: DismissibleContentFrameworkActionCreators */).overrideDismissibleContentFramework} value={dailyCapOverridden} label="Daily limit" subLabel="When enabled, bypass the daily limit of dismissible content shown" /><TableSwitchRow onValueChange={(require(12715) /* metro dependency 12715: DismissibleContentFrameworkActionCreators */).overrideNewUserMinAgeRequired} value={newUserMinAgeRequiredOverridden} label="New user account minimum age" subLabel="When enabled, bypass the minimum age requirement for new user accounts" /></TableRowGroup></View>];
section = styles.section;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {label: 'Clear all dismissed dismissible contents',
onPress: (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).clearDismissedContents};
const TrashIcon = (require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon;
tableRowProps.icon = <TrashIcon />;
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
tableRowProps.trailing = <TableRowArrow />;
const items3 = [<TableRow {...tableRowProps} />];
items3[1] = <TableRow label="Clear all guild dismissed dismissible contents" onPress={(require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).clearGuildDismissedContents} icon={<TrashIcon />} trailing={<TableRowArrow />} />;
const tableRowProps3 = {label: 'Dismiss all dismissible contents',
onPress: (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).checkAllDismissedContents};
const DoubleCheckmarkIcon = (require(14159) /* metro dependency 14159: DoubleCheckmarkIcon */).DoubleCheckmarkIcon;
tableRowProps3.icon = <DoubleCheckmarkIcon />;
tableRowProps3.trailing = <TableRowArrow />;
items3[2] = <TableRow {...tableRowProps3} />;
items2[1] = <View style={section}><TableRowGroup title="Bulk actions" hasIcons>{items3}</TableRowGroup></View>;
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
items2[2] = <View style={styles.search}><SearchField size="md" defaultValue={property ?? value4} onChange={onChange_107139} /></View>;
if (dismissableContent.length > 0) {
value = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
value = ((Component) => <Component style={styles.list} estimatedListSize="windowSize" itemSize={value2} placeholderConfig={value9} renderItem={value10} renderSectionHeader={value11} sections={sections} sectionHeaderSize={value3} insetEnd={insets.bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16} wrapChildren />)(value);
r5 = value;
} else {
var viewBinding2Props = {style: styles.emptyState};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
object = {};
object.marginBottom = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
value = <Text style={object} variant="heading-lg/semibold">{'No results found'}</Text>;
value = <View {...viewBinding2Props}>{value}{((SearchEmpty) => <SearchEmpty />)((require(8607) /* metro dependency 8607: SearchEmpty */).SearchEmpty)}</View>;
r5 = value;
}
items2[3] = r5;
return (
<View style={styles.container}>
{items2}
</View>
);
}
function _fun107133(a0) { // fn#107133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:1287, offset: 0x022f4d35, size: 207 bytes, params: 2, frame: 26
var r8;
var r12;
var propertyName;
var propertyName2;
var defaultImport;
var toLowerCase;
var value3;
var value4;
var isNaN;
var Number;
var isNaN2;
let items2 = [];
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const value2 = a0 === '';
for (propertyName in DismissibleContent) {
if (value2) {
r12 = value2;
continue;
}
defaultImport = importDefault(6590) /* metro dependency 6590 */;
value3 = a0.toLowerCase();
toLowerCase = propertyName.toLowerCase;
value4 = defaultImport(value3, Reflect.apply(toLowerCase, propertyName, []));
r12 = value4;
if (!r12) {
continue;
}
isNaN = global.isNaN;
Number = global.Number;
isNaN2 = isNaN(Number(propertyName));
r12 = isNaN2;
if (!r12) {
r8 = propertyName2;
continue;
}
items2.push(propertyName);
r8 = propertyName2;
}
items2.sort(function(a0, a1) {
return a0.localeCompare(a1);
});
const object2 = {dismissableContent: items2};
items2 = [items2.length];
object2.sections = items2;
return object2;
}
function _fun107135() { // fn#107135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:1527, offset: 0x022f4e17, size: 37 bytes, params: 1, frame: 12
return env0_3(env0_1 ?? '');
}
function _fun107137(a0, a1) { // fn#107137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:1854, offset: 0x022f4e5d, size: 71 bytes, params: 3, frame: 15
const binding = env1_10;
const dismissableContentBinding = dismissableContent;
return ((Component) => <Component content={dismissableContentBinding[a1]} start={a1 === 0} end={a1 === dismissableContentBinding.length - 1} />)(binding);
}
function _fun107138() { // fn#107138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:1935, offset: 0x022f4ea4, size: 75 bytes, params: 1, frame: 14
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
style={styles.sectionHeader}
variant="text-sm/semibold"
color="text-default"
>
{'Dismissible Contents'}
</Text>
);
}
function DevToolsDismissableContentsScreenOnChange(a0) { // fn#107139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:3372, owner: DevToolsDismissableContentsScreen.onChange, offset: 0x022f4eef, size: 37 bytes, params: 2, frame: 12
env0_2(a0);
env0_5(env0_3(a0));
}
@@ -0,0 +1,325 @@
/* Metro module 14268; source: modules/devtools/native/components/screens/DevToolsDisplayNameEffectsBenchmarkScreen.tsx; dependencies: [57, 31, 27, 1878, 1889, 33, 1890, 8705, 1244, 8701, 2582, 4501, 697, 4572, 4573, 4578, 8696, 8697, 566, 14269, 6231, 6238, 9402, 4637, 2] */
function _fun107950(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:6, offset: 0x02310037, size: 545 bytes, params: 8, frame: 23
const env0_0 = require;
const effectName = function(a0) {
var intl = require(dependencyMap[8]).intl;
var string = intl.string;
var DISPLAY_NAME_STYLES_EFFECT_NAMES = require(dependencyMap[9]).DISPLAY_NAME_STYLES_EFFECT_NAMES;
return Reflect.apply(string, intl,
[DISPLAY_NAME_STYLES_EFFECT_NAMES[a0] ?? importDefault(dependencyMap[10]).OpWJ3f]);
};
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 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.ScrollView;
const env0_6 = value.View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const EFFECT_ORDER = (require(1889) /* metro dependency 1889: DisplayNameStylesConstants */).EFFECT_ORDER;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
object = [];
value = arraySpread(object, EFFECT_ORDER, 0, undefined);
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
const GUMMY = DisplayNameEffect.GUMMY;
object[value] = GUMMY;
value + 1;
const env0_11 = [10, 50, 100, 200];
object = [{'key': 'short', 'label': 'Short', 'name': 'Pixel7'}, {'key': 'medium', 'label': 'Medium',
'name': 'NebulaWanderer'}, {'key': 'long', 'label': 'Long', 'name': 'GalacticOverlord2049'}];
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object = {};
const object3 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
object.wrap = object3;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.container = {paddingVertical: PX_16};
object.batchRow = {paddingVertical: 2};
object.optionButtons = {flexWrap: 'wrap'};
const env0_13 = Reflect.apply(createStyles, value, [object]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsDisplayNameEffectsBenchmarkScreen.tsx');
exports.default = DevToolsDisplayNameEffectsBenchmarkScreen;
}
function makeUniqueName(a0, a1, a2) { // fn#107951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:251, offset: 0x02310258, size: 170 bytes, params: 4, frame: 16
let String = global.String;
const Math = global.Math;
const length = String(Math.max(a2 - 1, 0)).length;
String = global.String;
value = String(a1);
value = value.padStart(length, '0');
const value3 = (require(8705) /* metro dependency 8705: StringUtils */).splitGraphemes(a0);
return value3.length <= length ? value : value3.slice(0, value3.length - length).join('') + value;
}
function OptionButtons({caption, options, value, onChange}) { // fn#107953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:967, offset: 0x02310365, size: 227 bytes, params: 2, frame: 24
const styles = useStyles();
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-sm/semibold" color="text-subtle">{caption}</Text>;
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
return (
<Stack spacing={8}>
{text}
<Stack2
direction="horizontal"
spacing={8}
style={styles.optionButtons}
>
{options.map(_fun107954)}
</Stack2>
</Stack>
);
}
function BenchmarkRow({userId, effect, userName, style}) { // fn#107956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1388, offset: 0x023104e4, size: 172 bytes, params: 2, frame: 21
const value2 = (require(8701) /* metro dependency 8701: useDisplayNameStylesEffectConfigs */).useDisplayNameStylesEffectConfig(effect);
const usernameWithEffects = importDefault(8696) /* metro dependency 8696: UsernameWithEffects */;
const EffectDisplayType = (require(8697) /* metro dependency 8697: types */).EffectDisplayType;
const STATIC = EffectDisplayType.STATIC;
return (
<View style={style}>
{((Component) => <Component userId={userId} userName={userName} effectDisplayType={STATIC} pendingDisplayNameStyles={value2.previewStyles} variant="text-md/semibold" />)(usernameWithEffects)}
</View>
);
}
function DevToolsDisplayNameEffectsBenchmarkScreen() { // fn#107957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1818, offset: 0x02310590, size: 1513 bytes, params: 1, frame: 54
var r8;
var Provider;
var MountMeasure;
var object;
var batchKey;
var Array;
var from;
const styles = useStyles();
let value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun107958);
const binding = env0_4;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [_fun107959]);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const property = value4[0];
var env0_3 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [100]), 2);
const property2 = value5[0];
const property3 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, ['long']), 2);
const property4 = value6[0];
const property5 = value6[1];
const {results, addMount, addScroll,
clear} = (require(14269) /* metro dependency 14269: performance */).useBenchmarkResults();
const value8 = (require(14269) /* metro dependency 14269: performance */).useMountTimer();
const run = value8.run;
const begin = value8.begin;
const measure = value8.measure;
const env0_10 = measure;
const cancel = value8.cancel;
const value9 = binding.useCallback(function(a0) {
addScroll(a0);
}, [addScroll]);
const value10 = binding.useMemo(_fun107961, [property4]);
const env0_11 = value10;
const value11 = binding.useMemo(_fun107963, [value10]);
const env0_12 = value11;
const value12 = binding.useMemo(_fun107964, [property]);
const value13 = binding.useMemo(_fun107966, [value12]);
const env0_15 = binding.useCallback(_fun107967, []);
const value14 = binding.useCallback(_fun107969, [begin, value12, value13, property2, value10, value11]);
const env0_16 = binding.useCallback(function(a0, a1) {
var value2 = measure(a0);
if (value2 != null) {
addMount('' + a1.effectLabel + ' · ' + a1.rowCount + ' rows · ' + a1.graphemeCount + ' graphemes', value2);
}
}, [measure, addMount]);
const value15 = null;
const r29 = value15 != value2 && value12.length > 0;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-sm/semibold" color="text-subtle">{'Effects (checked render in rotation)'}</Text>;
const Stack3 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const items2 = [<TableRow label={<Stack2 spacing={8}>{text}<Stack3 spacing={4}>{env0_10.map(_fun107971)}</Stack3></Stack2>} />];
items2[1] = <TableRow label={<OptionButtons caption="Rows" value={property2} onChange={property3} options={env0_11.map(function(a0) {
return {value: a0, label: (0, global.String)(a0)};
})} />} />;
items2[2] = <TableRow label={<OptionButtons caption={'Name length (' + value11 + ' graphemes)'} value={property4} onChange={property5} options={env0_12.map(function(a0) {
return {value: a0.key, label: a0.label};
})} />} />;
const items3 = [<TableRowGroup title="Configuration" hasIcons={false}>{items2}</TableRowGroup>];
const tableRow = <TableRow label="Measure mount + layout" subLabel="Mounts the batch and times until native layout completes." arrow disabled={!r29} onPress={value14} />;
const ScrollBenchmark = (require(14269) /* metro dependency 14269: performance */).ScrollBenchmark;
items3[1] = <TableRowGroup title="Run" hasIcons={false}>{tableRow}<ScrollBenchmark onResult={value9} subLabel="Records frame times while you scroll the batch below." /></TableRowGroup>;
const BenchmarkResultsList = (require(14269) /* metro dependency 14269: performance */).BenchmarkResultsList;
items3[2] = <BenchmarkResultsList results={results} onClear={clear} />;
if (value15 != run) {
if (value15 != value2) {
Provider = (require(4637) /* metro dependency 4637: DisplayNameStylesContext */).DisplayNameStylesContext.Provider;
MountMeasure = (require(14269) /* metro dependency 14269: performance */).MountMeasure;
object = {};
batchKey = run.batchKey;
object.batchKey = batchKey;
object.onCancel = cancel;
object.onMeasure = onMeasure;
Array = global.Array;
from = Array.from;
batchKey = run.batchKey;
r8 = <Provider value={{overrideSettings: true}}><MountMeasure {...object} key={batchKey}>{Reflect.apply(from,
Array,
[{length: run.params.rowCount}, _fun107976])}</MountMeasure></Provider>;
} else {
r8 = value15;
}
} else {
r8 = value15;
}
items3[3] = r8;
return (
<ScrollView style={styles.wrap} contentContainerStyle={styles.container}>
<Stack spacing={16}>
{items3}
</Stack>
</ScrollView>
);
}
function _fun107954(a0) { // fn#107954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1253, offset: 0x02310448, size: 128 bytes, params: 2, frame: 19
const env0_0 = a0;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const label = a0.label;
const r6 = a0.value !== value ? 'secondary' : 'primary';
const String = global.String;
return (
<Button
size="sm"
text={label}
variant={r6}
onPress={onPress_107955}
key={String(a0.value)}
/>
);
}
function _fun107958() { // fn#107958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1916, offset: 0x02310b79, size: 34 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.id;
}
function _fun107959() { // fn#107959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1992, offset: 0x02310b9b, size: 78 bytes, params: 1, frame: 12
const Set = global.Set;
let value = environment.__proto__;
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
const GUMMY = DisplayNameEffect.GUMMY;
const items2 = [GUMMY];
value = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(items2);
return set instanceof Object ? set : value;
}
function _fun107961() { // fn#107961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2345, offset: 0x02310be9, size: 34 bytes, params: 1, frame: 11
const binding = env1_12;
return binding.find(_fun107962).name;
}
function _fun107963() { // fn#107963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2396, offset: 0x02310c20, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(8705) /* metro dependency 8705: StringUtils */;
return value.splitGraphemes(env0_11).length;
}
function _fun107964() { // fn#107964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2452, offset: 0x02310c52, size: 28 bytes, params: 1, frame: 11
return env1_10.filter(_fun107965);
}
function _fun107966() { // fn#107966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2499, offset: 0x02310c6e, size: 70 bytes, params: 1, frame: 13
var r0;
var binding;
var value;
if (env0_13.length === env1_10.length) {
r0 = 'All (rotation)';
} else {
binding = env0_13;
value = binding.map(effectName);
value = value.join(' + ');
r0 = value;
}
return r0;
}
function _fun107967(a0, a1) { // fn#107967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2593, offset: 0x02310cb4, size: 39 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_3(_fun107968);
}
function _fun107969() { // fn#107969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2683, offset: 0x02310d24, size: 79 bytes, params: 1, frame: 12
if (env0_13.length !== 0) {
begin({effects: env0_13, effectLabel: env0_14, rowCount: env0_4, name: env0_11, graphemeCount: env0_12});
}
}
function _fun107971(a0) { // fn#107971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:3348, offset: 0x02310dd2, size: 102 bytes, params: 2, frame: 18
const env0_0 = a0;
const Checkbox = (require(9402) /* metro dependency 9402: CheckboxNative */).Checkbox;
return (
<Checkbox
label={effectName(a0)}
checked={env0_2.has(a0)}
onToggle={onToggle_107972}
key={a0}
/>
);
}
function onMeasure(a0) { // fn#107975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:4274, owner: DevToolsDisplayNameEffectsBenchmarkScreen.onMeasure, offset: 0x02310e8a, size: 30 bytes, params: 2, frame: 13
return env0_16(a0, run.params);
}
function _fun107976(a0, a1) { // fn#107976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:4339, offset: 0x02310ea8, size: 137 bytes, params: 3, frame: 19
const runBinding = run;
return (
<BenchmarkRow
userId={env0_1}
effect={runBinding.params.effects[a1 % runBinding.params.effects.length]}
userName={makeUniqueName(runBinding.params.name, a1, runBinding.params.rowCount)}
style={styles.batchRow}
key={a1}
/>
);
}
function onPress_107955() { // fn#107955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1348, offset: 0x023104c8, size: 28 bytes, params: 1, frame: 11
const value = environment.__proto__;
return onChange(env0_0.value);
}
function _fun107962({key}) { // fn#107962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2357, offset: 0x02310c0b, size: 21 bytes, params: 2, frame: 2
return key === env1_5;
}
function _fun107968(a0) { // fn#107968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2604, offset: 0x02310cdb, size: 73 bytes, params: 2, frame: 12
const Set = global.Set;
const set = new Set(a0);
if (require) {
set.add(env0_0);
} else {
set.delete(env0_0);
}
return set;
}
function onToggle_107972(a0) { // fn#107972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:3418, offset: 0x02310e38, size: 27 bytes, params: 2, frame: 13
return env1_15(env0_0, a0);
}
@@ -0,0 +1,615 @@
/* Metro module 10570; source: modules/devtools/native/components/screens/DevToolsExperimentsScreen.tsx; dependencies: [57, 31, 27, 4107, 1226, 1867, 4108, 33, 4501, 697, 10564, 10565, 5463, 7705, 10571, 22, 1305, 8754, 6984, 8671, 4113, 4106, 4080, 6238, 4573, 490, 10568, 6231, 4105, 6797, 3857, 4073, 6275, 6758, 2] */
function _fun81515(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:6, offset: 0x01ed221e, size: 582 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const _arrayLikeToArray_81518 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const closure = ExperimentDetails;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const experimentConstantsModule = require(4108) /* metro dependency 4108: ExperimentConstants */;
const env0_9 = experimentConstantsModule.ExperimentBuckets;
const env0_10 = experimentConstantsModule.ExperimentTypes;
let value3 = require(33) /* metro dependency 33 */;
const env0_11 = value3.jsx;
const env0_12 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.listContainer = {paddingHorizontal: PX_12};
const object3 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingVertical = PX_16;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.paddingHorizontal = PX_12;
object2.searchBar = object3;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.debugContainer = {marginTop: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.copyExperimentLink = {marginTop: PX_16};
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
let value5 = value.memo(_fun81533);
const env0_14 = value.memo(_fun81538);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsExperimentsScreen.tsx');
exports.default = value5;
exports.ExperimentDetails = closure;
}
function _createForOfIteratorHelperLoose_81516(a0, a1) { // fn#81516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:248, offset: 0x01ed2464, 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)) {
if (r1) {
}
return _fun81517;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_81518(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') {
value = _arrayLikeToArray_81518(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_81518(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun81517;
}
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 UserExperimentDebugView({id, override, experiment}) { // fn#81519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:3612, offset: 0x01ed25d8, size: 993 bytes, params: 2, frame: 34
const styles = useStyles();
const id2 = AuthenticationStore.getId();
const installationForTracking = AuthenticationStore.getInstallationForTracking();
let r0 = installationForTracking != null ? (require(490) /* metro dependency 490: FingerprintUtils */).maybeExtractId(installationForTracking) : null;
const r9 = experiment.kind !== 'installation' || r0 == null ? id2 : r0;
const value7 = (require(10568) /* metro dependency 10568: useExperimentAssignments */).useExperimentAssignment(experiment,
r9);
const value8 = (require(10568) /* metro dependency 10568: useExperimentAssignments */).useExperimentServerAssignment(experiment,
r9);
const defaultImport = importDefault(22) /* metro dependency 22 */;
const sortBy = defaultImport.sortBy;
const getRecentExposures = ExperimentStore.getRecentExposures;
const USER = ExperimentTypes.USER;
const value11 = Reflect.apply(sortBy, defaultImport, [Reflect.apply(getRecentExposures, ExperimentStore, [USER,
id]), function(a0) {
var r0;
var r1;
var r2;
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;
if (value2) {
r0 = value;
r1 = item2;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = value;
r1 = item3;
r2 = value3;
} else {
r0 = item;
r1 = item3;
r2 = value3;
}
}
if (!r2) {
r1.return();
}
return -r0;
}]).map(_fun81521);
const system = experiment.system;
const ExperimentSystem = (require(4106) /* metro dependency 4106: ExperimentManager */).ExperimentSystem;
const LEGACY = ExperimentSystem.LEGACY;
const r13 = system === LEGACY ? 'Currently assigned to bucket ' + (value7 ?? ExperimentBuckets.NOT_ELIGIBLE) : value7 != null ? 'Currently assigned to variant ' + value7 : 'Currently unassigned';
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const items2 = [<TableRowGroup title="Overview" hasIcons={false}><TableRow label={r13} subLabel={value8 == null ? 'Warning: Server did not send any experiment config. You may need to check the "Send to Client" box in the admin UI.' : undefined} /></TableRowGroup>];
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
items2[1] = <Spacer size={16} />;
const value17 = 'None';
items2[2] = <TableRowGroup title="Server Descriptor" hasIcons={false}><TableRow label={value8 == null ? value17 : global.JSON.stringify(value8,
undefined, 2)} /></TableRowGroup>;
items2[3] = <Spacer size={16} />;
items2[4] = <TableRowGroup title="Override Descriptor" hasIcons={false}><TableRow label={override == null ? value17 : global.JSON.stringify(override.originalDescriptor,
undefined, 2)} /></TableRowGroup>;
items2[5] = <Spacer size={16} />;
items2[6] = <TableRowGroup title="Recent Exposures" hasIcons={false}><TableRow label={value11.length === 0 ? value17 : value11.join('\n')} /></TableRowGroup>;
return (
<View style={styles.debugContainer}>
{items2}
</View>
);
}
function GuildExperimentDebugView({id, override}) { // fn#81522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:5036, offset: 0x01ed2a45, size: 1199 bytes, params: 2, frame: 37
var r5;
var bucket;
var r16;
var value12;
var getGuildExperimentDescriptor;
var id2;
var value13;
var NOT_ELIGIBLE;
var property;
var push;
var name;
var value14;
const styles = useStyles();
const loadedGuildExperiment = ExperimentStore.getLoadedGuildExperiment(id);
const defaultImport = importDefault(22) /* metro dependency 22 */;
const sortBy = defaultImport.sortBy;
const getRecentExposures = ExperimentStore.getRecentExposures;
const GUILD = ExperimentTypes.GUILD;
const value5 = Reflect.apply(sortBy, defaultImport, [Reflect.apply(getRecentExposures, ExperimentStore, [GUILD,
id]), function(a0) {
var r0;
var r1;
var r2;
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;
if (value2) {
r0 = value;
r1 = item2;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = value;
r1 = item3;
r2 = value3;
} else {
r0 = item;
r1 = item3;
r2 = value3;
}
}
if (!r2) {
r1.return();
}
return -r0;
}]);
let map = value5.map;
const value6 = Reflect.apply(map, value5, [_fun81524]);
const defaultImport2 = defaultImport;
const value8 = defaultImport2.sortBy(GuildStore.getGuildsArray(), function({name}) {
return name.toLowerCase();
});
const object2 = {};
const items3 = [];
const value9 = _createForOfIteratorHelperLoose_81516(value8);
const value10 = value9();
let done = value10.done;
if (!done) {
r5 = value10;
while (true) {
value12 = r5.value;
getGuildExperimentDescriptor = ExperimentStore.getGuildExperimentDescriptor;
id2 = value12.id;
value13 = Reflect.apply(getGuildExperimentDescriptor, ExperimentStore, [id, id2]);
bucket = value13?.bucket;
if (bucket != null) {
r16 = bucket;
continue;
}
NOT_ELIGIBLE = ExperimentBuckets.NOT_ELIGIBLE;
r16 = NOT_ELIGIBLE;
if (r16 in object2) {
continue;
}
object2[r16] = 0;
property = object2[r16];
object2[r16] = typeof property === 'bigint' ? property + 1n : +property + 1;
push = items3.push;
name = value12.name;
Reflect.apply(push, items3, ['' + name + ': ' + r16]);
value14 = value9();
done = value14.done;
if (done) {
break;
}
r5 = value14;
continue;
}
}
const value16 = defaultImport(object2).keys();
map = value16.map;
const Number = global.Number;
const value20 = Reflect.apply(map, value16, [Number]).sort().map(_fun81526).join(', ');
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const items2 = [<TableRowGroup title="Overview" hasIcons={false}><TableRow label={'Current Assignments: ' + value20} subLabel={loadedGuildExperiment == null ? "Warning: Server did not send any experiment config. You may need to check the 'Send to Client' box in the admin UI." : null} /></TableRowGroup>];
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
items2[1] = <Spacer size={16} />;
items2[2] = <TableRowGroup title="Guild Assignments" hasIcons={false}><TableRow label={items3.join('\n')} /></TableRowGroup>;
items2[3] = <Spacer size={16} />;
const value23 = 'None';
items2[4] = <TableRowGroup title="Server Descriptor" hasIcons={false}><TableRow label={loadedGuildExperiment == null ? value23 : global.JSON.stringify(loadedGuildExperiment,
undefined, 2)} /></TableRowGroup>;
items2[5] = <Spacer size={16} />;
items2[6] = <TableRowGroup title="Override Descriptor" hasIcons={false}><TableRow label={override == null ? value23 : global.JSON.stringify(override,
undefined, 2)} /></TableRowGroup>;
items2[7] = <Spacer size={16} />;
items2[8] = <TableRowGroup title="Recent Exposures" hasIcons={false}>{value6.length === 0 ? <TableRow label="none" /> : value6.map(_fun81527)}</TableRowGroup>;
return (
<View style={styles.debugContainer}>
{items2}
</View>
);
}
function ExperimentDetails({experiment, override, id, options, onCopyLink}) { // fn#81528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:6685, offset: 0x01ed2f73, size: 449 bytes, params: 2, frame: 30
const styles = useStyles();
const uRLForExperiment = (require(4105) /* metro dependency 4105: ExperimentEmbedUtils */).getURLForExperiment(id);
const value3 = env0_4.useCallback(_fun81529, [uRLForExperiment, onCopyLink]);
const object = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingHorizontal = PX_12;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const items2 = [<TableRowGroup title="Experiment Assignments" hasIcons={false}>{options.map(_fun81531)}</TableRowGroup>];
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
items2[1] = <View style={styles.copyExperimentLink}><TableRowGroup title="Share" hasIcons={false}><TableRow label="Copy Link" subLabel={uRLForExperiment} onPress={value3} /></TableRowGroup></View>;
items2[2] = experiment.kind === 'guild' ? <GuildExperimentDebugView id={id} override={override} /> : <UserExperimentDebugView id={id} override={override} experiment={experiment} />;
return (
<View style={object}>
{items2}
</View>
);
}
function ExperimentActionSheet({id, experiment, override, options, onCopyLink}) { // fn#81532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:7595, offset: 0x01ed322b, size: 167 bytes, params: 2, frame: 23
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
return (
<BottomSheet header={<BottomSheetTitleHeader title={experiment.title} subtitle={id} />}>
<ExperimentDetails
experiment={experiment}
override={override}
id={id}
options={options}
onCopyLink={onCopyLink}
/>
</BottomSheet>
);
}
function _fun81533() { // fn#81533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:1507, offset: 0x01ed32d2, size: 740 bytes, params: 1, frame: 28
var r0;
var items2;
var value;
const styles = useStyles();
const [property, property2] = env0_3(env0_4.useState(''), 2);
const {experiments,
overridesInfo} = (require(10564) /* metro dependency 10564: useLegacyExperiments */).useLegacyExperiments();
const value5 = (require(10565) /* metro dependency 10565: useApexExperiments */).useApexExperiments();
const experiments2 = value5.experiments;
const overridesInfo2 = value5.overridesInfo;
const value6 = env0_4.useMemo(function() {
var r2;
var object = {};
copyDataProperties(object, experiments, copyDataProperties(object, experiments, r2));
return object;
}, [experiments, experiments2]);
const value7 = env0_4.useMemo(function() {
var r2;
var object = {};
copyDataProperties(object, overridesInfo, copyDataProperties(object, overridesInfo, r2));
return object;
}, [overridesInfo, overridesInfo2]);
var env0_4 = value7;
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value8 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
const userSettingsExperimentsUtilsModule = require(10571) /* metro dependency 10571: UserSettingsExperimentsUtils */;
const getBestMatches = userSettingsExperimentsUtilsModule.getBestMatches;
const moduleValue4 = userSettingsExperimentsUtilsModule;
const sortEntries = moduleValue4.sortEntries;
const moduleValue5 = userSettingsExperimentsUtilsModule;
const getEntries = moduleValue5.getEntries;
const value9 = Reflect.apply(getBestMatches, userSettingsExperimentsUtilsModule, [Reflect.apply(sortEntries,
moduleValue4, [Reflect.apply(getEntries, moduleValue5, [value6]), value7]), property]);
const value10 = env0_4.useMemo(_fun81536, [value9.length]);
const value11 = env0_4.useCallback(_fun81537, [value9, value7]);
const defaultImport2 = importDefault(22) /* metro dependency 22 */;
if (defaultImport2.isEmpty(value6)) {
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
r0 = <EmptyState Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} title="No Experiments" body="No experiments are currently running." />;
} else {
var viewBindingProps = {style: styles.container};
items2 = [<View style={styles.searchBar}>{((SearchField) => <SearchField size="md" onChange={property2} />)((require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField)}</View>];
value = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
items2[1] = ((Component) => <Component style={styles.listContainer} sections={value10} estimatedListSize="windowSize" itemSize={value8} insetEnd={insets.bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16} renderItem={value11} />)(value);
value = <View {...viewBindingProps}>{items2}</View>;
r0 = value;
}
return r0;
}
function _fun81538({id, override, experiment, start, end}) { // fn#81538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:2529, offset: 0x01ed366f, size: 284 bytes, params: 2, frame: 22
const value2 = env0_4.useMemo(_fun81539, [experiment]);
const value3 = env0_4.useCallback(_fun81540, [id, experiment, override, value2]);
const value5 = ((a0, a1) => {
var env0_0 = a1;
if (a1 == null) {
return 'N/A';
}
var value = a0.find(_fun81547);
return value != null ? value.label : 'Unknown (' + a1 + ')';
})(value2, override?.variantId);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const title = experiment.title;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<TableRow
height="100%"
start={start}
end={end}
label={title}
labelLineClamp={1}
onPress={value3}
trailing={<Text variant="text-md/medium" color="text-muted">{value5}</Text>}
/>
);
}
function _fun81521(a0) { // fn#81521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:3971, offset: 0x01ed29b9, size: 140 bytes, params: 2, frame: 18
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 r5 = 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();
}
const Date = global.Date;
let date = new Date();
date = date.toLocaleString();
return '' + date + ' (' + r5 + ')';
}
function _fun81526(a0) { // fn#81526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:5595, offset: 0x01ed2f08, size: 46 bytes, params: 2, frame: 15
return '' + env0_0[a0] + ' guilds are in bucket ' + a0;
}
function _fun81527(a0) { // fn#81527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:6624, offset: 0x01ed2f36, size: 61 bytes, params: 2, frame: 16
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={a0}
labelLineClamp={1}
key={a0}
/>
);
}
function _fun81529() { // fn#81529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:6829, offset: 0x01ed3134, size: 55 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(env0_1, function() {
var defaultImport = importDefault(dependencyMap[30]);
var object = {'key': 'experiment-link-copied', 'content': 'Copied experiment link', 'IconComponent': null,
'iconColor': 'status-positive'};
object.IconComponent = require(dependencyMap[31]).CircleCheckIcon;
defaultImport.open(object);
if (onCopyLink != null) {
onCopyLink();
}
});
}
function _fun81531({label, isDestructive, onPress}, a1) { // fn#81531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:7183, offset: 0x01ed31d0, size: 91 bytes, params: 3, frame: 18
const value = environment.__proto__;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
variant={isDestructive ? 'danger' : 'default'}
label={label}
onPress={onPress}
key={a1}
/>
);
}
function _fun81536() { // fn#81536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:1933, offset: 0x01ed35f0, size: 22 bytes, params: 1, frame: 2
return [env0_5.length];
}
function _fun81537(a0, a1) { // fn#81537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:1978, offset: 0x01ed3606, size: 105 bytes, params: 3, frame: 17
const binding = env0_5;
const property = binding[a1];
return ((Component) => <Component id={property.id} experiment={property.experiment} override={env0_4[property.id]} start={a1 === 0} end={a1 === binding.length - 1} />)(env1_14);
}
function _fun81539() { // fn#81539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:2601, offset: 0x01ed378b, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(4113) /* metro dependency 4113: ExperimentDevToolsUtils */).getExperimentVariantsForDevTools(experiment);
}
function _fun81540() { // fn#81540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:2674, offset: 0x01ed37b8, size: 234 bytes, params: 1, frame: 20
var environment;
const Map = global.Map;
let map = new Map();
env0_3.forEach(_fun81541);
const items2 = [];
map.forEach(_fun81542);
items2.push({'label': 'Clear Override', 'isDestructive': true, onPress: onPress_81544});
map = environment.__proto__;
const defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = defaultImport.openLazy;
const Promise = global.Promise;
Reflect.apply(openLazy, defaultImport, [Promise.resolve({default: ExperimentActionSheet}),
'UserSettingsExperimentBucket', {id: id, experiment: experiment, override: override, options: items2,
onCopyLink: onCopyLink}]);
}
function getVariantLabel(a0, a1) { // fn#81546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:3273, offset: 0x01ed39c4, size: 88 bytes, params: 3, frame: 14
const env0_0 = a1;
if (a1 == null) {
return 'N/A';
}
const value = a0.find(function({id}) {
return id === require;
});
return value != null ? value.label : 'Unknown (' + a1 + ')';
}
function _fun81542(a0) { // fn#81542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:2745, offset: 0x01ed38a2, size: 52 bytes, params: 2, frame: 13
const env0_0 = a0;
env0_1.push({label: a0.label, onPress: onPress_81543});
}
function onPress_81544() { // fn#81544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:2934, offset: 0x01ed393c, size: 92 bytes, params: 1, frame: 18
const value = environment.__proto__.__proto__;
const experimentManagerModule = require(4106) /* metro dependency 4106: ExperimentManager */;
experimentManagerModule.overrideBucket(experiment.system, id, null);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('UserSettingsExperimentBucket');
}
function onCopyLink() { // fn#81545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:3195, offset: 0x01ed3998, size: 44 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('UserSettingsExperimentBucket');
}
function onPress_81543() { // fn#81543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10756:2771, offset: 0x01ed38d6, size: 102 bytes, params: 1, frame: 18
const value = environment.__proto__.__proto__.__proto__;
const experimentManagerModule = require(4106) /* metro dependency 4106: ExperimentManager */;
experimentManagerModule.overrideBucket(experiment.system, id, env0_0.id);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('UserSettingsExperimentBucket');
}
@@ -0,0 +1,309 @@
/* Metro module 13136; source: modules/devtools/native/components/screens/DevToolsGeneratedTestUsersScreen.tsx; dependencies: [5, 57, 31, 27, 13137, 1226, 33, 11441, 8036, 10112, 13138, 13140, 13142, 10802, 13144, 12374, 13146, 13148, 13150, 13152, 8656, 13154, 13156, 13158, 13160, 7002, 4501, 697, 4572, 7981, 4578, 4080, 13162, 6275, 6758, 6231, 6238, 4064, 566, 5463, 2] */
function _fun100373(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:6, offset: 0x021e6a21, size: 844 bytes, params: 8, frame: 23
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 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_6 = value.View;
const env0_7 = value.ScrollView;
const generatedTestUsersStore = importDefault(13137) /* metro dependency 13137: GeneratedTestUsersStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
const UserIcon = (require(11441) /* metro dependency 11441: UserIcon */).UserIcon;
object = [UserIcon];
const ShieldIcon = (require(8036) /* metro dependency 8036: ShieldIcon */).ShieldIcon;
object[1] = ShieldIcon;
const GiftIcon = (require(10112) /* metro dependency 10112: GiftIcon */).GiftIcon;
object[2] = GiftIcon;
const AchievementsIcon = (require(13138) /* metro dependency 13138: AchievementsIcon */).AchievementsIcon;
object[3] = AchievementsIcon;
const PiggyBankIcon = (require(13140) /* metro dependency 13140: PiggyBankIcon */).PiggyBankIcon;
object[4] = PiggyBankIcon;
const TreehouseIcon = (require(13142) /* metro dependency 13142: TreehouseIcon */).TreehouseIcon;
object[5] = TreehouseIcon;
const SpeedometerIcon = (require(10802) /* metro dependency 10802: SpeedometerIcon */).SpeedometerIcon;
object[6] = SpeedometerIcon;
const CompassIcon = (require(13144) /* metro dependency 13144: CompassIcon */).CompassIcon;
object[7] = CompassIcon;
const SignPostIcon = (require(12374) /* metro dependency 12374: SignPostIcon */).SignPostIcon;
object[8] = SignPostIcon;
const CarIcon = (require(13146) /* metro dependency 13146: CarIcon */).CarIcon;
object[9] = CarIcon;
const TrainIcon = (require(13148) /* metro dependency 13148: TrainIcon */).TrainIcon;
object[10] = TrainIcon;
const TeacupIcon = (require(13150) /* metro dependency 13150: TeacupIcon */).TeacupIcon;
object[11] = TeacupIcon;
const InventoryIcon = (require(13152) /* metro dependency 13152: InventoryIcon */).InventoryIcon;
object[12] = InventoryIcon;
const FoodIcon = (require(8656) /* metro dependency 8656: FoodIcon */).FoodIcon;
object[13] = FoodIcon;
const BurgerIcon = (require(13154) /* metro dependency 13154: BurgerIcon */).BurgerIcon;
object[14] = BurgerIcon;
const MagicDoorIcon = (require(13156) /* metro dependency 13156: MagicDoorIcon */).MagicDoorIcon;
object[15] = MagicDoorIcon;
const PawPrintIcon = (require(13158) /* metro dependency 13158: PawPrintIcon */).PawPrintIcon;
object[16] = PawPrintIcon;
const RecordPlayerIcon = (require(13160) /* metro dependency 13160: RecordPlayerIcon */).RecordPlayerIcon;
object[17] = RecordPlayerIcon;
const SettingsIcon = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
object[18] = SettingsIcon;
const env0_13 = ['text-default', 'text-feedback-positive', 'text-feedback-warning', 'text-feedback-critical',
'text-link', 'text-brand'];
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.contentContainer = {padding: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.inputContainer = {marginBottom: PX_16};
const env0_14 = Reflect.apply(createStyles, value, [object]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsGeneratedTestUsersScreen.tsx');
exports.default = DevToolsGeneratedTestUsersScreen;
}
function PoolIdInput({onSubmit}) { // fn#100374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:929, offset: 0x021e6d6d, size: 457 bytes, params: 2, frame: 27
const styles = useStyles();
const [property, property2] = env0_4(env0_5Binding.useState(''), 2);
const value5 = env0_4(env0_5Binding.useState(''), 2);
const property3 = value5[0];
const env0_3 = property3;
const property4 = value5[1];
var env0_4 = property4;
var [property5, env0_5] = env0_4(env0_5Binding.useState(false), 2);
const value9 = env0_5Binding.useCallback(env0_3(_fun100376), [property, property3, onSubmit]);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const items2 = [<TextInput size="md" placeholder="Enter Pool ID" onChange={property2} autoCapitalize="none" autoCorrect={false} autoComplete="off" isClearable />];
items2[1] = <TextInput size="md" secureTextEntry placeholder="Enter Password" onChange={property4} autoCapitalize="none" autoCorrect={false} autoComplete="off" isClearable />;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
let r10 = property.length === 0 || property3.length === 0;
r10 = !r10 ? property5 : r10;
items2[2] = <Button size="md" variant="primary" text="Get Pool" disabled={r10} loading={property5} onPress={value9} />;
return (
<Stack spacing={4} style={styles.inputContainer}>
{items2}
</Stack>
);
}
function UserActionSheet({pool}) { // fn#100377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:1708, offset: 0x021e6fcc, size: 348 bytes, params: 2, frame: 25
var object3;
const usersForPool = GeneratedTestUsersStore.getUsersForPool(pool.id);
const env0_2 = AuthenticationStore.getId();
const env0_3 = env0_5.useCallback(_fun100378, [pool.id]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object3 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object3.header = <BottomSheetTitleHeader title={pool.summary} subtitle={'' + usersForPool.length + ' users'} />;
const object2 = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.paddingHorizontal = PX_12;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<BottomSheet {...object3}>
<View style={object2}>
<TableRowGroup title="Select User to Login As" hasIcons>
{usersForPool.map(_fun100379)}
</TableRowGroup>
</View>
</BottomSheet>
);
}
function PoolUsers({pool, start, end}) { // fn#100381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:2471, offset: 0x021e7296, size: 280 bytes, params: 2, frame: 24
const id = pool.id;
const summary = pool.summary;
const usersForPool = GeneratedTestUsersStore.getUsersForPool(id);
let binding = env0_12;
let Number = global.Number;
const property = binding[Number(id) % env0_12.length];
binding = env0_13;
Number = global.Number;
const property2 = binding[Number(id) % env0_13.length];
const value5 = env0_5.useCallback(_fun100382, [pool]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
icon={((Component) => <Component size="md" color={property2} />)(property)}
label={summary}
subLabel={'' + usersForPool.length + ' users'}
arrow
onPress={value5}
start={start}
end={end}
/>
);
}
function DevToolsGeneratedTestUsersScreen() { // fn#100383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:2985, offset: 0x021e7406, size: 460 bytes, params: 1, frame: 30
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GeneratedTestUsersStore],
_fun100384);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value4 = env0_5.useCallback(_fun100385(), []);
const items2 = [styles.contentContainer];
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[1] = {paddingBottom: PX_16 + insets.bottom};
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const poolIdInput = <PoolIdInput onSubmit={value4} />;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const items3 = [value2.length === 0 && ((TableRow) => <TableRow label="No pools available." />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow)];
items3[1] = value2.map(_fun100389);
return (
<View style={styles.container}>
<ScrollView contentContainerStyle={items2}>
<Stack spacing={16}>
{poolIdInput}
<TableRowGroup title="Generated Test User Pools" hasIcons>
{items3}
</TableRowGroup>
</Stack>
</ScrollView>
</View>
);
}
function* _fun100376() { // fn#100376, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:1113, offset: 0x021e6f41, size: 139 bytes, params: 1, frame: 15
var binding;
var moduleValue;
var value3;
var value4;
var error;
if (true) {
value = environment.__proto__;
if (importDefault.length !== 0) {
env1_5(true);
try {
} catch (error) {
env1_5(false);
throw error;
}
try {
} catch (error) {
env1_5(false);
throw error;
}
try {
binding = env1_3;
} catch (error) {
env1_5(false);
throw error;
}
try {
moduleValue = require(importDefault, binding);
} catch (error) {
env1_5(false);
throw error;
}
yield moduleValue;
try {
value3 = undefined;
value4 = false;
} catch (error) {
env1_5(false);
throw error;
}
if (value4) {
env1_5(false);
return value3;
}
try {
} catch (error) {
env1_5(false);
throw error;
}
try {
dependencyMap('');
} catch (error) {
env1_5(false);
throw error;
}
try {
binding = env1_4;
} catch (error) {
env1_5(false);
throw error;
}
try {
binding('');
} catch (error) {
env1_5(false);
throw error;
}
env1_5(false);
}
}
}
function _fun100378(a0) { // fn#100378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:1802, offset: 0x021e7128, size: 87 bytes, params: 2, frame: 15
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('generated-test-users');
value = require(13162) /* metro dependency 13162: GeneratedTestUserActionCreators */;
value.loginAsGeneratedUser(pool.id, a0);
}
function _fun100379(a0, a1) { // fn#100379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:2179, offset: 0x021e717f, size: 251 bytes, params: 3, frame: 24
const env0_0 = a0;
const value2 = a0.id === env0_2;
const value4 = undefined;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {};
const UserIcon = (require(11441) /* metro dependency 11441: UserIcon */).UserIcon;
object2.icon = <UserIcon size="md" />;
const username = a0.username;
object2.label = username;
object2.subLabel = a0.email;
object2.onPress = onPress_100380;
object2.disabled = value2;
object2.trailing = value2 ? ((CheckmarkLargeIcon) => <CheckmarkLargeIcon size="md" color="text-feedback-positive" />)((require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon) : value4;
object2.start = a1 === 0;
object2.end = a1 === env0_1.length - 1;
return <TableRow {...object2} key={a0.id} />;
}
function _fun100382() { // fn#100382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:2625, offset: 0x021e73ae, size: 88 bytes, params: 1, frame: 17
const value = environment.__proto__;
const defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = defaultImport.openLazy;
const Promise = global.Promise;
Reflect.apply(openLazy, defaultImport, [Promise.resolve({default: UserActionSheet}), 'generated-test-users',
{pool: pool}]);
}
function _fun100384() { // fn#100384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:3079, offset: 0x021e75d2, size: 31 bytes, params: 1, frame: 9
const value = environment.__proto__;
return GeneratedTestUsersStore.getPools() ?? [];
}
function _fun100385() { // fn#100385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:3190, offset: 0x021e75f1, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun100387);
return _fun100388;
}
function _fun100389(a0, a1) { // fn#100389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:3689, offset: 0x021e7665, size: 77 bytes, params: 3, frame: 17
return (
<PoolUsers
pool={a0}
start={a1 === 0}
end={a1 === env0_0.length - 1}
key={a0.id}
/>
);
}
function* _fun100387(a0, a1) { // fn#100387, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:3210, offset: 0x021e7620, size: 69 bytes, params: 3, frame: 15
if (true) {
value = environment.__proto__.__proto__.__proto__;
value = env3_0(env3_2[32]);
var getGeneratedPoolById = value.getGeneratedPoolById;
yield Reflect.apply(getGeneratedPoolById, value, [a0, a1]);
}
}
@@ -0,0 +1,39 @@
/* Metro module 14244; source: modules/devtools/native/components/screens/DevToolsGuildPowerupsModal.tsx; dependencies: [31, 33, 9884, 5280, 9603, 9893, 14245, 2] */
function _fun107731(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14441:6, offset: 0x02307181, size: 174 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const env0_4 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
value = value.memo(DevToolsGuildPowerupsModal);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsGuildPowerupsModal.tsx');
exports.default = value;
}
function DevToolsGuildPowerupsModal() { // fn#107732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14441:173, offset: 0x0230722f, size: 137 bytes, params: 1, frame: 19
const env0_0 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
const {Navigator, Screen} = env0_4;
return (
<Navigator screenOptions={screenOptions_107733}>
<Screen
name="DevToolsGuildPowerups"
options={function() {
return {title: 'Guild Powerups'};
}}
component={importDefault(14245) /* metro dependency 14245: DevToolsGuildPowerupsScreen */}
/>
</Navigator>
);
}
function DevToolsGuildPowerupsModalScreenOptions({navigation}) { // fn#107733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14441:298, owner: DevToolsGuildPowerupsModal.screenOptions, offset: 0x023072b8, size: 118 bytes, params: 2, frame: 16
const object2 = {headerTitle: headerTitle_107734};
object2.headerLeft = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalCloseImage(navigation);
object2.headerTitleAlign = 'center';
copyDataProperties(object2, env0_0, navigation);
copyDataProperties(object2, (importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)(),
navigation);
return object2;
}
@@ -0,0 +1,256 @@
/* Metro module 14245; source: modules/devtools/native/components/screens/DevToolsGuildPowerupsScreen.tsx; dependencies: [5, 31, 27, 1348, 12346, 1867, 3969, 14246, 661, 33, 4501, 697, 507, 3738, 8251, 12307, 14158, 6808, 14247, 1362, 1365, 1585, 566, 4573, 6231, 6238, 2] */
function _fun107736(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:6, offset: 0x0230733c, size: 572 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const setWarningBoosts = function() {
return _setWarningBoosts.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.ScrollView;
const env0_6 = value.View;
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const appliedGuildBoostStore = importDefault(12346) /* metro dependency 12346: AppliedGuildBoostStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
value = require(14246) /* metro dependency 14246: DevToolsGuildPowerupsConstants */;
const env0_11 = value.GUILD_DCS;
const env0_12 = value.SERVER_TAG_GUILD_DCS;
const env0_13 = value.USER_DCS;
const env0_14 = value.VANITY_URL_POWERUP_DCS;
const env0_15 = value.getGuildDCString;
const env0_16 = value.getUserDCString;
const env0_17 = (require(661) /* metro dependency 661: Constants */).Endpoints;
value = require(33) /* metro dependency 33 */;
const env0_18 = value.jsx;
const env0_19 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
const object4 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.padding = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.gap = PX_16;
object2.scrollContainer = object4;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.noGuildContainer = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', padding: PX_32};
const env0_20 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsGuildPowerupsScreen.tsx');
exports.default = DevToolsGuildPowerupsScreen;
}
function _setWarningBoosts() { // fn#107738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:711, offset: 0x02307578, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun107740).apply(this, arguments);
}
function _sendPowerupsSystemMessage() { // fn#107742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1063, offset: 0x023076a5, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun107744).apply(this, arguments);
}
function UserDCSwitchRow({dc}) { // fn#107745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1262, offset: 0x02307743, size: 109 bytes, params: 2, frame: 18
const {isDismissed,
handleToggleDismissState} = (importDefault(14158) /* metro dependency 14158: toggleDismissibleContentDismissState */)(dc);
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
return (
<TableSwitchRow
label={getUserDCString(dc)}
value={isDismissed}
onValueChange={handleToggleDismissState}
/>
);
}
function GuildDCSwitchRow({dc, guildId, isDismissed}) { // fn#107746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1429, offset: 0x023077b0, size: 131 bytes, params: 2, frame: 18
const value2 = env0_4.useCallback(_fun107747, [dc, guildId]);
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
return (
<TableSwitchRow
label={getGuildDCString(dc)}
value={isDismissed}
onValueChange={value2}
/>
);
}
function DevToolsGuildPowerupsScreen() { // fn#107748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1891, offset: 0x023078c6, size: 1099 bytes, params: 1, frame: 29
var r0;
var items4;
var object;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var items2;
var items3;
const styles = useStyles();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const guildId = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore],
function() {
return SelectedGuildStore.getGuildId();
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun107750);
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserSettingsProtoStore],
function() {
var r3;
var items = [];
arraySpread(items, SERVER_TAG_GUILD_DCS, arraySpread(items, GUILD_DCS, 0, r3), r3);
return items.filter(_fun107752);
});
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([AppliedGuildBoostStore],
_fun107753);
if (guildId == null) {
r0 = <View style={[styles.container,
styles.noGuildContainer]}>{((Text) => <Text variant="heading-md/semibold" color="text-muted">{'No guild selected'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
} else {
var scrollViewBindingProps = {style: styles.container};
items4 = [styles.scrollContainer];
object = {};
object.paddingBottom = value2.bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items4[1] = object;
scrollViewBindingProps.contentContainerStyle = items4;
items2 = [<TableRowGroup title={'Current Guild: ' + (value3 ?? 'Unknown')} hasIcons={false}><TableRow label="Reset Notification Indicators" onPress={onPress_107754} /></TableRowGroup>];
items3 = [<TableRow label="Set Half Boosts expiring in 1 day" onPress={onPress_107755} />];
items3[1] = <TableRow label="Reset End Date" onPress={onPress_107756} />;
items2[1] = <TableRowGroup title="Warning State" hasIcons={false}>{items3}</TableRowGroup>;
items2[2] = <TableRowGroup title="User Level DCs" hasIcons={false}>{USER_DCS.map(_fun107757)}</TableRowGroup>;
items2[3] = <TableRowGroup title="Guild Level DCs" hasIcons={false}>{GUILD_DCS.map(_fun107758)}</TableRowGroup>;
items2[4] = <TableRowGroup title="Server Tag Guild Level DCs" hasIcons={false}>{SERVER_TAG_GUILD_DCS.map(_fun107759)}</TableRowGroup>;
items2[5] = <TableRowGroup title="Powerup Rollback DCs" hasIcons={false}>{VANITY_URL_POWERUP_DCS.map(_fun107760)}</TableRowGroup>;
items2[6] = <TableRowGroup title="System Messages" hasIcons={false}><TableRow label="Send Powerups System Message" onPress={function() {
return _fun107762(guildId);
}} /></TableRowGroup>;
r0 = <ScrollView {...scrollViewBindingProps}>{items2}</ScrollView>;
}
return r0;
}
function* _fun107740(a0, a1, a2) { // fn#107740, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:768, offset: 0x023075b5, size: 240 bytes, params: 4, frame: 22
var environment;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var HTTP = binding(env2_2[12]).HTTP;
var patch = HTTP.patch;
var object3 = {};
var APPLIED_BOOST_MODIFY_END_DATE = env2_17.APPLIED_BOOST_MODIFY_END_DATE;
object3.url = APPLIED_BOOST_MODIFY_END_DATE;
var object4 = {};
object4.applied_boost_ids = a1.map(function(a0) {
return a0.id;
});
object4.ends_at = a2 ? null : env2_1(env2_2[13])().add(1, 'day');
object3.body = object4;
object3.rejectWithError = true;
yield Reflect.apply(patch, HTTP, [object3]);
if (false) {
return undefined;
}
binding = env2_0;
var binding2 = env2_2;
binding(binding2[14]).fetchAppliedGuildBoostsForGuild(a0);
binding(binding2[15]).fetchGuildBoostEntitlements(a0, true);
}
}
function* _fun107744(a0) { // fn#107744, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1138, offset: 0x023076e2, size: 97 bytes, params: 2, frame: 16
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[12]).HTTP;
var post = HTTP.post;
var object2 = {};
object2.url = env2_17.SEND_POWERUPS_SYSTEM_MESSAGE(a0);
object2.rejectWithError = true;
yield Reflect.apply(post, HTTP, [object2]);
}
}
function _fun107747(a0) { // fn#107747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1508, offset: 0x02307833, size: 147 bytes, params: 2, frame: 16
let value = environment.__proto__;
if (a0) {
value = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
value.markContentAsDismissed(dc, guildId, false);
} else {
value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
value.removeDismissedRecurringContent((require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.GUILD_POWERUP_NOTIFICATION);
value = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
value.unmarkContentAsDismissed(dc, guildId);
}
}
function _fun107750() { // fn#107750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2044, offset: 0x02307d11, size: 59 bytes, params: 1, frame: 13
const guildIdBinding = guildId;
const value2 = null;
return value2 != guildIdBinding ? value2 == GuildStore.getGuild(guildId) ? undefined : GuildStore.getGuild(guildId).name : value2;
}
function _fun107751() { // fn#107751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2156, offset: 0x02307d4c, size: 52 bytes, params: 1, frame: 14
const items2 = [];
arraySpread(items2, SERVER_TAG_GUILD_DCS, arraySpread(items2, GUILD_DCS, 0, undefined), undefined);
return items2.filter(_fun107752);
}
function _fun107753() { // fn#107753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2269, offset: 0x02307dbe, size: 45 bytes, params: 1, frame: 12
return guildId == null ? [] : AppliedGuildBoostStore.getAppliedGuildBoostsForGuild(guildId) ?? [];
}
function DevToolsGuildPowerupsScreenOnPress() { // fn#107754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2797, owner: DevToolsGuildPowerupsScreen.onPress, offset: 0x02307deb, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(12307) /* metro dependency 12307: GuildPowerupsActionCreators */).guildPowerupsResetNotifications();
}
function DevToolsGuildPowerupsScreenOnPress_107755() { // fn#107755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2989, owner: DevToolsGuildPowerupsScreen.onPress, offset: 0x02307e10, size: 72 bytes, params: 1, frame: 18
const value = environment.__proto__;
const setWarningBoostsBinding = setWarningBoosts;
const guildIdBinding = guildId;
const binding = env0_2;
const slice = binding.slice;
const Math = global.Math;
return setWarningBoostsBinding(guildIdBinding, Reflect.apply(slice, binding,
[Math.floor(binding.length / 2)]), false);
}
function DevToolsGuildPowerupsScreenOnPress_107756() { // fn#107756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:3102, owner: DevToolsGuildPowerupsScreen.onPress, offset: 0x02307e58, size: 31 bytes, params: 1, frame: 15
return setWarningBoosts(guildId, env0_2, true);
}
function _fun107757(a0) { // fn#107757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:3213, offset: 0x02307e77, size: 32 bytes, params: 2, frame: 15
return <UserDCSwitchRow dc={a0} key={a0} />;
}
function _fun107758(a0) { // fn#107758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:3326, offset: 0x02307e97, size: 62 bytes, params: 2, frame: 16
return (
<GuildDCSwitchRow
dc={a0}
guildId={guildId}
isDismissed={env0_1.includes(a0)}
key={a0}
/>
);
}
function DevToolsGuildPowerupsScreenOnPress_107761() { // fn#107761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:3814, owner: DevToolsGuildPowerupsScreen.onPress, offset: 0x02307ed5, size: 25 bytes, params: 1, frame: 11
return (function() {
return _sendPowerupsSystemMessage.apply(this, arguments);
})(guildId);
}
function _fun107752(a0) { // fn#107752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2180, offset: 0x02307d80, size: 62 bytes, params: 2, frame: 14
var r0;
var value3;
var moduleValue;
const value = environment.__proto__;
const value2 = guildId != null;
if (value2) {
value3 = environment.__proto__.__proto__;
moduleValue = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
r0 = moduleValue.isContentDismissed(a0, guildId);
} else {
r0 = value2;
}
return r0;
}
@@ -0,0 +1,93 @@
/* Metro module 13135; source: modules/devtools/native/components/screens/DevToolsLocalMessageCache.tsx; dependencies: [27, 1379, 33, 4501, 697, 6238, 4572, 6231, 4900, 4573, 2] */
function _fun100369(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13325:6, offset: 0x021e63bb, size: 276 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).ScrollView;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.contentContainer = {padding: PX_16};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsLocalMessageCache.tsx');
exports.default = DevToolsLocalMessageCache;
}
function CacheLogEntry({entry}) { // fn#100370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13325:297, offset: 0x021e64cf, size: 686 bytes, params: 2, frame: 29
var count;
const Date = global.Date;
let date = new Date(entry.startTime);
date = date.toLocaleString();
date = '' + date;
const before = entry.before;
const value2 = 'null';
let r5 = before ?? value2;
let r7 = entry.after ?? value2;
const value3 = 'Before: ' + r5 + ', After: ' + r7 + ', Limit: ' + entry.limit;
let localMessageDetails = entry.localMessageDetails;
if (localMessageDetails != null) {
localMessageDetails = entry.localMessageDetails;
count = localMessageDetails.count;
localMessageDetails = entry.localMessageDetails;
r7 = 'Cache Hit: ' + count + ' messages in ' + (localMessageDetails.loadTime - entry.startTime) + 'ms';
} else {
r7 = 'Cache Missed';
}
let networkMessageDetails = entry.networkMessageDetails;
if (networkMessageDetails != null) {
networkMessageDetails = entry.networkMessageDetails;
count = networkMessageDetails.count;
networkMessageDetails = entry.networkMessageDetails;
r5 = 'Network: ' + count + ' messages in ' + (networkMessageDetails.loadTime - entry.startTime) + 'ms';
} else {
r5 = 'No Network Fetch';
}
const r4 = entry.localMessageDetails == null ? 'Comparision unavailable (no local cache data)' : entry.networkMessageDetails == null ? 'Comparision unavailable (no network data)' : entry.localMessageDetails.count !== entry.networkMessageDetails.count ? 'Cache had ' + entry.localMessageDetails.count + ' messages vs ' + entry.networkMessageDetails.count + ' from network' : entry.localMessageDetails.lastMessageId === entry.networkMessageDetails.lastMessageId ? 'Cache was up-to-date' : 'Cache last message ID ' + entry.localMessageDetails.lastMessageId + ' differs from network last message ID ' + entry.networkMessageDetails.lastMessageId;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={'' + ChannelStore.getChannel(entry.channelId)?.name}
subLabel={[date, value3, r7, r5, r4].join('\n')}
/>
);
}
function DevToolsLocalMessageCache() { // fn#100371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13325:1623, offset: 0x021e677d, size: 641 bytes, params: 1, frame: 31
const styles = useStyles();
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const items3 = [<TableRow label="Channels Fetched" subLabel={(importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchStarted.size} />];
items3[1] = <TableRow label="Cache Hits" subLabel={(importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchedWithLocalMessages.size} />;
items3[2] = <TableRow label="Cache Misses" subLabel={(importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchedNetwork.size - (importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchedWithLocalMessages.size} />;
items3[3] = <TableRow label="Incomplete Fetches" subLabel={(importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchStarted.size - (importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchedNetwork.size} />;
const items2 = [<TableRowGroup title="Local Message Cache Stats" hasIcons={false}>{items3}</TableRowGroup>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text variant="text-sm/normal" color="text-muted">{'Cumulative since app launch. Does not update dynamically.'}</Text>;
const Array = global.Array;
const from = Array.from;
const fetchLogs = (importDefault(4900) /* metro dependency 4900: MessageCacheStats */).fetchLogs;
let value = Reflect.apply(from, Array, [fetchLogs.values()]);
value = value.reverse();
items2[2] = <TableRowGroup title="Fetch Log (Reversed)" hasIcons={false}>{value.map(_fun100372)}</TableRowGroup>;
return (
<ScrollView style={styles.container} contentContainerStyle={styles.contentContainer}>
<Stack spacing={8}>
{items2}
</Stack>
</ScrollView>
);
}
function _fun100372(a0, a1) { // fn#100372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13325:2579, offset: 0x021e69fe, size: 35 bytes, params: 3, frame: 15
return <CacheLogEntry entry={a0} key={a1} />;
}
@@ -0,0 +1,61 @@
/* Metro module 13134; source: modules/devtools/native/components/screens/DevToolsLoggingFlagsScreen.tsx; dependencies: [27, 691, 33, 4501, 697, 566, 6231, 6808, 693, 2] */
function _fun100363(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13324:6, offset: 0x021e60a8, size: 256 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(27) /* metro dependency 27 */).ScrollView;
const developerOptionsStore = importDefault(691) /* metro dependency 691: DeveloperOptionsStore */;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {backgroundColor: BACKGROUND_BASE_LOW};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {padding: PX_16};
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsLoggingFlagsScreen.tsx');
exports.default = DevToolsLoggingFlagsScreen;
}
function DevToolsLoggingFlagsScreen() { // fn#100364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13324:398, offset: 0x021e61a8, size: 343 bytes, params: 1, frame: 25
const styles = useStyles();
const {isLoggingGatewayEvents, isLoggingAnalyticsEvents,
isTracingRequests} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([DeveloperOptionsStore],
function() {
return {isLoggingGatewayEvents: DeveloperOptionsStore.isLoggingGatewayEvents,
isLoggingAnalyticsEvents: DeveloperOptionsStore.isLoggingAnalyticsEvents,
isTracingRequests: DeveloperOptionsStore.isTracingRequests};
});
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const items2 = [<TableSwitchRow label="Gateway Events" subLabel="Logs all gateway events to console, including content. Enable verbose logs to see them." value={isLoggingGatewayEvents} onValueChange={onValueChange_100366} />];
items2[1] = <TableSwitchRow label="Analytics Events" subLabel="Logs all analytics events to the developer console." value={isLoggingAnalyticsEvents} onValueChange={onValueChange_100367} />;
items2[2] = <TableSwitchRow label="Tracing Requests" subLabel="Force trace all client requests with APM." value={isTracingRequests} onValueChange={onValueChange_100368} />;
return (
<ScrollView style={styles.container} contentContainerStyle={styles.content}>
<TableRowGroup title="Logging" hasIcons={false}>
{items2}
</TableRowGroup>
</ScrollView>
);
}
function DevToolsLoggingFlagsScreenOnValueChange(a0) { // fn#100366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13324:1016, owner: DevToolsLoggingFlagsScreen.onValueChange, offset: 0x021e632b, size: 48 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (require(693) /* metro dependency 693: DeveloperOptionsActionCreators */).setDeveloperOptionSettings({logGatewayEvents: a0});
}
function DevToolsLoggingFlagsScreenOnValueChange_100367(a0) { // fn#100367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13324:1214, owner: DevToolsLoggingFlagsScreen.onValueChange, offset: 0x021e635b, size: 48 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (require(693) /* metro dependency 693: DeveloperOptionsActionCreators */).setDeveloperOptionSettings({logAnalyticsEvents: a0});
}
function DevToolsLoggingFlagsScreenOnValueChange_100368(a0) { // fn#100368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13324:1404, owner: DevToolsLoggingFlagsScreen.onValueChange, offset: 0x021e638b, size: 48 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (require(693) /* metro dependency 693: DeveloperOptionsActionCreators */).setDeveloperOptionSettings({trace: a0});
}
@@ -0,0 +1,203 @@
/* Metro module 14199; source: modules/devtools/native/components/screens/DevToolsOTATestScreen.tsx; dependencies: [5, 57, 31, 27, 482, 33, 4501, 697, 6275, 6758, 4573, 10560, 4080, 4572, 6231, 6238, 13957, 6797, 10330, 4062, 14200, 2] */
function _fun107364(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:6, offset: 0x022f93af, size: 411 bytes, params: 8, frame: 24
var object2;
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 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_6 = value.ScrollView;
const env0_7 = value.View;
const Fonts = (require(482) /* metro dependency 482: Constants */).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.wrap = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.contentContainer = {padding: PX_16};
const object3 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.paddingVertical = PX_8;
object2.verificationLine = object3;
const CODE_NORMAL = Fonts.CODE_NORMAL;
object2.verificationFailure = {fontFamily: CODE_NORMAL};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsOTATestScreen.tsx');
exports.default = DevToolsOTATestScreen;
}
function OtaVerificationActionSheet({result}) { // fn#107365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:480, offset: 0x022f954a, size: 954 bytes, params: 2, frame: 33
var length;
var r6;
var r5;
var items5;
var items6;
var failures;
var value;
const styles = useStyles();
const totalFileCount = result.totalFileCount;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object2 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object2.header = <BottomSheetTitleHeader title="OTA Verification Result" />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="heading-md/bold">{'Has OTA Applied'}</Text>;
const hasOtaApplied = result.hasOtaApplied;
const value4 = 'No';
const items2 = [<View style={styles.verificationLine}>{text}<Text variant="text-md/normal">{hasOtaApplied ? 'Yes' : value4}</Text></View>];
items2[1] = <View style={styles.verificationLine}><Text variant="heading-md/bold">{'Has Local Copy'}</Text><Text variant="text-md/normal">{result.hasLocalCopy == null ? '--' : result.hasLocalCopy ? 'Yes' : value4}</Text></View>;
items2[2] = <View style={styles.verificationLine}><Text variant="heading-md/bold">{'OTA is Valid'}</Text><Text variant="text-md/normal">{result.isValid ? 'Yes' : value4}</Text></View>;
if (totalFileCount === null) {
r6 = null;
} else {
var viewBindingProps = {style: styles.verificationLine};
items5 = [<Text variant="heading-md/bold">{'File Counts'}</Text>];
items6 = [result.totalFileCount, ' files. '];
length = result.successes?.length;
items6[2] = length;
items6[3] = ' successes, ';
length = result.failures?.length;
items6[4] = length;
items6[5] = ' failures.';
items5[1] = <Text variant="text-md/normal">{items6}</Text>;
r6 = <View {...viewBindingProps}>{items5}</View>;
}
items2[3] = r6;
if (result.failures.length > 0) {
var viewBindingProps = {style: styles.verificationLine};
value = <Text variant="heading-md/bold">{'Failures'}</Text>;
failures = result.failures;
value = <View {...viewBindingProps}>{[value, failures.map(_fun107366)]}</View>;
r5 = value;
} else {
r5 = null;
}
items2[4] = r5;
return (
<BottomSheet {...object2}>
{items2}
</BottomSheet>
);
}
function DevToolsOTATestScreen() { // fn#107367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:1942, offset: 0x022f9953, size: 1316 bytes, params: 1, frame: 39
const value2 = undefined;
const styles = useStyles();
const binding = env0_5;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, ['']);
const binding2 = env0_4;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_1 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property2 = value5[0];
const env0_2 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property3 = value6[0];
const env0_3 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property4 = value7[0];
var env0_4 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property5 = value8[0];
var env0_5 = value8[1];
binding.useEffect(_fun107371, []);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const WrenchIcon = (require(13957) /* metro dependency 13957: WrenchIcon */).WrenchIcon;
const items2 = [<TableRowGroup title="OTA Status" hasIcons><TableRow label="Status" subLabel={property4} icon={<WrenchIcon />} /><TableRow label="Root Path (tap to copy)" subLabel={property} onPress={onPress_107372} /></TableRowGroup>];
const tableRow = <TableRow label="Manifest Source" subLabel={(property2 == null ? value2 : property2.source) ?? 'Unknown'} icon={<WrenchIcon />} />;
const PaperIcon = (require(10330) /* metro dependency 10330: PaperIcon */).PaperIcon;
items2[1] = <TableRowGroup title="Manifest" hasIcons>{tableRow}<TableRow icon={<PaperIcon />} label={property2 != null ? global.JSON.stringify(property2.metadata ?? ({}),
null, 2) : '{}'} /></TableRowGroup>;
items2[2] = <TableRowGroup title="Build Override Cookie" hasIcons><TableRow icon={<WrenchIcon />} label="Is cookie set?" subLabel={property3 == null ? 'No' : 'Yes'} />{property3 != null && <TableRow icon={<WrenchIcon />} label={global.JSON.stringify(property3,
null, 2)} />}</TableRowGroup>;
const DownloadIcon = (require(4062) /* metro dependency 4062: DownloadIcon */).DownloadIcon;
const tableRow2 = <TableRow label={'Check for Update & Reload'} icon={<DownloadIcon />} onPress={(importDefault(10560) /* metro dependency 10560: BundleUpdater */).checkForUpdateAndReload} />;
const r18 = property5 ? 'Verification in progress' : 'Verify content hashes for all app files';
const ClipboardCheckIcon = (require(14200) /* metro dependency 14200: ClipboardCheckIcon */).ClipboardCheckIcon;
items2[3] = <TableRowGroup title="Actions" hasIcons>{tableRow2}<TableRow label="Verify OTA Files" subLabel={r18} icon={<ClipboardCheckIcon />} onPress={function() {
return _verifyFiles.apply(this, arguments);
}} disabled={property5} /></TableRowGroup>;
return (
<ScrollView style={styles.wrap} contentContainerStyle={styles.contentContainer}>
<Stack spacing={16}>
{items2}
</Stack>
</ScrollView>
);
}
function _fun107366(a0) { // fn#107366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:1728, offset: 0x022f9904, size: 79 bytes, params: 2, frame: 16
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-md/normal"
style={styles.verificationFailure}
key={a0}
>
{a0}
</Text>
);
}
function _verifyFiles() { // fn#107368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:2193, owner: DevToolsOTATestScreen._verifyFiles, offset: 0x022f9e77, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun107370).apply(this, arguments);
}
function _fun107371() { // fn#107371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:2461, offset: 0x022f9f5a, size: 153 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = importDefault(10560) /* metro dependency 10560: BundleUpdater */;
value = value.getOtaRootPath();
value.then(env0_1);
value = importDefault(10560) /* metro dependency 10560: BundleUpdater */;
value = value.getManifestInfo();
value.then(env0_2);
value = importDefault(10560) /* metro dependency 10560: BundleUpdater */;
value = value.getBuildOverrideCookieContents();
value.then(env0_3);
value = importDefault(10560) /* metro dependency 10560: BundleUpdater */;
value = value.getOtaStatus();
value.then(env0_4);
}
function DevToolsOTATestScreenOnPress() { // fn#107372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:2949, owner: DevToolsOTATestScreen.onPress, offset: 0x022f9ff3, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_0);
}
function* _fun107370() { // fn#107370, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:2240, offset: 0x022f9eb7, size: 163 bytes, params: 1, frame: 19
if (true) {
value = environment.__proto__.__proto__;
env2_5(true);
var value4 = env3_1(env3_2[11]);
yield value4.verifyOtaFiles();
var value5 = undefined;
if (false) {
return value5;
}
env2_5(false);
value = env3_1(env3_2[12]);
var openLazy = value.openLazy;
var Promise = global.Promise;
Reflect.apply(openLazy, value, [Promise.resolve({default: env3_11}), 'OtaVerificationActionSheet',
{result: value5}]);
}
}
@@ -0,0 +1,118 @@
/* Metro module 14267; source: modules/devtools/native/components/screens/DevToolsPerformanceTestingScreen.tsx; dependencies: [31, 27, 33, 4501, 697, 1484, 1585, 6231, 13124, 6238, 13121, 2] */
function _fun107946(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14464:6, offset: 0x0230fd20, size: 254 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).ScrollView;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.padding = PX_16;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{container: object}]);
value = value.memo(DevToolsPerformanceTestingScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsPerformanceTestingScreen.tsx');
exports.default = value;
}
function DevToolsPerformanceTestingScreen() { // fn#107947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14464:272, offset: 0x0230fe1e, size: 234 bytes, params: 1, frame: 21
const styles = useStyles();
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const object = {};
const bottom = value2.bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingBottom = bottom + PX_16;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const Object = global.Object;
const entries = Object.entries;
const PerformanceTestingScreens = (require(13124) /* metro dependency 13124: DevToolsScreens */).PerformanceTestingScreens;
return (
<ScrollView style={styles.container} contentContainerStyle={object}>
<TableRowGroup hasIcons>
{Reflect.apply(entries, Object, [PerformanceTestingScreens]).map(_fun107948)}
</TableRowGroup>
</ScrollView>
);
}
function _fun107948(a0) { // fn#107948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14464:571, offset: 0x0230ff08, size: 208 bytes, params: 2, frame: 24
var r1;
var r2;
var r42;
var item3;
var value3;
var headerTitle;
var Icon;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r42 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r42 = value;
} else {
r1 = item3;
r2 = value3;
r42 = item;
}
}
try {
headerTitle = r42.headerTitle;
Icon = r42.Icon;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
}
}
throw error;
}
if (!r2) {
r1.return();
}
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon2 = TableRow2.Icon;
return (
<TableRow
label={headerTitle}
icon={<Icon2 IconComponent={Icon} />}
arrow
onPress={onPress_107949}
key={r4}
/>
);
}
function onPress_107949() { // fn#107949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14464:694, offset: 0x0230ffd8, size: 95 bytes, params: 1, frame: 13
let value = environment.__proto__;
if (env1_0.push != null) {
env1_0.push(env0_0);
} else {
value = environment.__proto__.__proto__;
value = require(13121) /* metro dependency 13121: DevToolsNavigator */;
value.navigateToDevTools({screenKey: env0_0});
}
}
@@ -0,0 +1,130 @@
/* Metro module 14202; source: modules/devtools/native/components/screens/DevToolsProfilingScreen.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 277, 6231, 6808, 11222, 4572, 6238, 4573, 14203, 477, 2] */
function _fun107377(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:6, offset: 0x022fa0f0, size: 340 bytes, params: 8, frame: 22
const env0_0 = require;
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 */;
let value = require(27) /* metro dependency 27 */;
const StyleSheet = value.StyleSheet;
const env0_5 = value.ScrollView;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.Fragment;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
copyDataProperties(object, StyleSheet.absoluteFillObject, undefined);
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object['backgroundColor'] = BACKGROUND_BASE_LOW;
object['padding'] = 16;
const CODE_BOLD = Fonts.CODE_BOLD;
const env0_9 = Reflect.apply(createStyles, value, [{container: object, monospace: {fontFamily: CODE_BOLD}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsProfilingScreen.tsx');
exports.default = DevToolsProfilingScreen;
}
function TableRowGroupReactProfiling() { // fn#107378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:371, offset: 0x022fa244, size: 256 bytes, params: 1, frame: 19
const binding = env0_4;
const useState = binding.useState;
const r6 = (importDefault(277) /* metro dependency 277: NativeStartupFlagsModule */)?.reactProfilingEnabled();
const value6 = env0_3(Reflect.apply(useState, binding, [r6 != null && r6]), 2);
const property = value6[0];
const property2 = value6[1];
env0_4.useEffect(_fun107379, [property]);
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
return (
<TableRowGroup title="React Profiling Renderer" hasIcons={false}>
<TableSwitchRow
label="Enable React Profiling Renderer"
subLabel="Enables React.Profiler, app restart required after change."
onValueChange={property2}
value={property}
/>
</TableRowGroup>
);
}
function DevToolsProfilingScreen() { // fn#107380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:960, offset: 0x022fa38a, size: 712 bytes, params: 1, frame: 35
var r8;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var jsxRuntimeEnv0_7Binding;
var items2;
var value10;
const value3 = env0_3(env0_4.useState(false), 2);
value3[0];
const env0_0 = value3[1];
const value4 = env0_4.useCallback(_fun107381, []);
const styles = useStyles();
const componentRenderStats = (require(11222) /* metro dependency 11222: ComponentProfiler */).getComponentRenderStats();
const Object = global.Object;
const value6 = Object.keys(componentRenderStats).length > 0;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
if (value6) {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
items2 = [<TableRowGroup title="Component Profiler" hasIcons={false}><TableRow variant="danger" arrow label="Reset Stats" onPress={value4} /></TableRowGroup>];
value10 = global.Object.keys(componentRenderStats);
items2[1] = value10.map(_fun107382);
r8 = <>{items2}</>;
} else {
r8 = <TableRowGroup title="Component Profiler" hasIcons={false}><TableRow label="No components rendered yet." subLabel={((Text) => <Text variant="text-xs/medium" color="text-subtle">{'Make sure you wrap your component in '}{((Text) => <Text variant="text-xs/semibold" style={styles.monospace}>{'<ComponentProfiler />'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}{' to enable measurements.'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)} /></TableRowGroup>;
}
const items3 = [r8];
const DevToolsProfilingUseStateFromStores = (require(14203) /* metro dependency 14203: DevToolsProfilingUseStateFromStores */).DevToolsProfilingUseStateFromStores;
items3[1] = <DevToolsProfilingUseStateFromStores />;
items3[2] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? <TableRowGroupReactProfiling /> : null;
return (
<ScrollView style={styles.container}>
<Stack spacing={16}>
{items3}
</Stack>
</ScrollView>
);
}
function _fun107379() { // fn#107379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:539, offset: 0x022fa344, size: 70 bytes, params: 1, frame: 13
const value = environment.__proto__;
if ((importDefault(277) /* metro dependency 277: NativeStartupFlagsModule */) != null) {
(importDefault(277) /* metro dependency 277: NativeStartupFlagsModule */).setReactProfilingEnabled(env0_0);
}
}
function _fun107381() { // fn#107381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:1056, offset: 0x022fa652, size: 51 bytes, params: 1, frame: 11
const value = environment.__proto__;
(require(11222) /* metro dependency 11222: ComponentProfiler */).clearComponentRenderStats();
env0_0(true);
}
function _fun107382(a0) { // fn#107382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:1448, offset: 0x022fa685, size: 206 bytes, params: 2, frame: 21
const {mount, update, nestedUpdate} = env0_2[a0];
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup
title={"Component Profiler Target: '" + a0 + "'"}
hasIcons={false}
key={a0}
>
{[{stat: mount, label: 'Mount'}, {stat: update, label: 'Update'}, {stat: nestedUpdate,
label: 'Nested Update'}].map(_fun107383)}
</TableRowGroup>
);
}
function _fun107383({stat, label}, a1) { // fn#107383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:1681, offset: 0x022fa753, size: 275 bytes, params: 3, frame: 31
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const jsxRuntimeEnv2_7Binding = jsxRuntimeEnv2_7;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const stylesBinding = styles;
return (
<TableRow
subLabel={<><Text variant="text-sm/medium" color="text-subtle" style={stylesBinding.monospace}>{'Count - ' + stat.count}</Text><Text variant="text-sm/medium" color="text-subtle" style={stylesBinding.monospace}>{'Mean - ' + stat.mean}</Text></>}
label={label}
key={a1}
/>
);
}
@@ -0,0 +1,194 @@
/* Metro module 14203; source: modules/devtools/native/components/screens/DevToolsProfilingUseStateFromStores.tsx; dependencies: [57, 31, 33, 14204, 4573, 6231, 6808, 6238, 6985, 10227, 11046, 14205, 4071, 1244, 2] */
function _fun107384(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:6, offset: 0x022fa866, size: 173 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.Fragment;
const env0_6 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsProfilingUseStateFromStores.tsx');
exports.DevToolsProfilingUseStateFromStores = DevToolsProfilingUseStateFromStores;
}
function DevToolsProfilingUseStateFromStores() { // fn#107385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:311, offset: 0x022fa913, size: 1376 bytes, params: 1, frame: 38
var r5;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var jsxRuntimeEnv0_5Binding2;
var items2;
const TextField = (require(6985) /* metro dependency 6985: TextFieldNative */).TextField;
const TimerIcon = (require(10227) /* metro dependency 10227: TimerIcon */).TimerIcon;
var items3;
var items4;
var items5;
var items6;
var object;
var intl;
var value;
const binding = env0_3;
let useState = binding.useState;
const useStateFromStoresPerformanceDebuggingModule = require(14204) /* metro dependency 14204: useStateFromStoresPerformanceDebugging */;
const getUseStateFromStoresDebuggingEnabled = useStateFromStoresPerformanceDebuggingModule.getUseStateFromStoresDebuggingEnabled;
const value2 = Reflect.apply(useState, binding, [Reflect.apply(getUseStateFromStoresDebuggingEnabled,
useStateFromStoresPerformanceDebuggingModule, [])]);
const binding2 = env0_2;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
useState = binding.useState;
const moduleValue2 = useStateFromStoresPerformanceDebuggingModule;
const getUseStateFromStoresExecutionWindowThresholdMs = moduleValue2.getUseStateFromStoresExecutionWindowThresholdMs;
const value4 = binding2(Reflect.apply(useState, binding,
[Reflect.apply(getUseStateFromStoresExecutionWindowThresholdMs, moduleValue2, [])]), 2);
const property3 = value4[0];
var env0_2 = value4[1];
useState = binding.useState;
const moduleValue3 = useStateFromStoresPerformanceDebuggingModule;
const getUseStateFromStoresExecutionTimeWarningThresholdMs = moduleValue3.getUseStateFromStoresExecutionTimeWarningThresholdMs;
const value5 = binding2(Reflect.apply(useState, binding,
[Reflect.apply(getUseStateFromStoresExecutionTimeWarningThresholdMs, moduleValue3, [])]), 2);
const property4 = value5[0];
const env0_4 = value5[1];
useState = binding.useState;
const moduleValue4 = useStateFromStoresPerformanceDebuggingModule;
const getUseStateFromStoresExecutionCountWarningThreshold = moduleValue4.getUseStateFromStoresExecutionCountWarningThreshold;
const value6 = binding2(Reflect.apply(useState, binding,
[Reflect.apply(getUseStateFromStoresExecutionCountWarningThreshold, moduleValue4, [])]), 2);
const property5 = value6[0];
const env0_6 = value6[1];
useState = binding.useState;
const moduleValue5 = useStateFromStoresPerformanceDebuggingModule;
const getUseStateFromStoresSpecificHookFilter = moduleValue5.getUseStateFromStoresSpecificHookFilter;
const value7 = binding2(Reflect.apply(useState, binding, [Reflect.apply(getUseStateFromStoresSpecificHookFilter,
moduleValue5, [])]), 2);
const property6 = value7[0];
const env0_8 = value7[1];
binding.useEffect(_fun107386, [property]);
binding.useEffect(_fun107387, [property3]);
binding.useEffect(_fun107388, [property4]);
binding.useEffect(_fun107389, [property5]);
binding.useEffect(_fun107390, [property6]);
const value8 = null;
const value9 = binding.useRef(value8);
const closure = DevToolsProfilingUseStateFromStoresRenderLabel;
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const tableRowGroup = <TableRowGroup title="useStateFromStores Profiling" hasIcons={false}><TableSwitchRow label="Enable useStateFromStores profiling" subLabel="May require app restart after changes." onValueChange={property2} value={property} /></TableRowGroup>;
if (property) {
jsxRuntimeEnv0_5Binding2 = jsxRuntimeEnv0_5;
value = closure('Time window to wait for before reporting violations.');
items2 = [value];
items2[1] = <TextField size="sm" defaultValue={property3.toString()} onChange={onChange_107392} keyboardType="numeric" leadingIcon={TimerIcon} trailingText="ms" ref={value9} />;
value = <TableRow label="Execution time window threshold" subLabel={<>{items2}</>} />;
items3 = [value];
value = closure('Total execution time limit for hooks before reporting violations.');
items4 = [value];
items4[1] = <TextField size="sm" defaultValue={property4.toString()} keyboardType="numeric" leadingIcon={TimerIcon} trailingText="ms" onChange={onChange_107393} />;
items3[1] = <TableRow label="Cumulative execution time warning threshold" subLabel={<>{items4}</>} />;
value = closure('Execution counts limit for hooks before reporting violations.');
items5 = [value];
items5[1] = <TextField size="sm" defaultValue={property5.toString()} keyboardType="numeric" leadingIcon={(require(11046) /* metro dependency 11046: AnalyticsIcon */).AnalyticsIcon} trailingText="times" onChange={onChange_107394} />;
items3[2] = <TableRow label="Cumulative execution count warning threshold" subLabel={<>{items5}</>} />;
value = closure('Include a specific hook in the profiling regardless of limits.');
items6 = [value];
var textFieldProps3 = {'size': 'sm', 'keyboardType': 'email-address', 'autoCapitalize': 'none',
'autoCorrect': false, 'defaultValue': null, 'placeholder': 'hookName', defaultValue: property6,
leadingIcon: (require(14205) /* metro dependency 14205: LettersIcon */).LettersIcon,
trailingIcon: (require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon};
object = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VkKicb);
object.onPress = onPress_107395;
textFieldProps3.trailingPressableProps = object;
textFieldProps3.onChange = onChange_107396;
items6[1] = <TextField {...textFieldProps3} />;
items3[3] = <TableRow label="Track specific hook" subLabel={<>{items6}</>} />;
value = <TableRowGroup title="useStateFromStores Config" hasIcons={false}>{items3}</TableRowGroup>;
r5 = value;
} else {
r5 = value8;
}
return (
<>
{tableRowGroup}
{r5}
</>
);
}
function _fun107386() { // fn#107386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:841, offset: 0x022fae73, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(14204) /* metro dependency 14204: useStateFromStoresPerformanceDebugging */).setUseStateFromStoresDebuggingEnabled(env0_0);
}
function _fun107387() { // fn#107387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:915, offset: 0x022faea0, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(14204) /* metro dependency 14204: useStateFromStoresPerformanceDebugging */).setUseStateFromStoresExecutionWindowThresholdMs(env0_1);
}
function _fun107388() { // fn#107388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:999, offset: 0x022faecd, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(14204) /* metro dependency 14204: useStateFromStoresPerformanceDebugging */).setUseStateFromStoresExecutionTimeWarningThresholdMs(env0_3);
}
function _fun107389() { // fn#107389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:1088, offset: 0x022faefa, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(14204) /* metro dependency 14204: useStateFromStoresPerformanceDebugging */).setUseStateFromStoresExecutionCountWarningThreshold(env0_5);
}
function _fun107390() { // fn#107390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:1176, offset: 0x022faf27, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(14204) /* metro dependency 14204: useStateFromStoresPerformanceDebugging */).setUseStateFromStoresSpecificHookFilter(env0_7);
}
function DevToolsProfilingUseStateFromStoresRenderLabel(a0) { // fn#107391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:1272, owner: DevToolsProfilingUseStateFromStores.renderLabel, offset: 0x022faf54, size: 69 bytes, params: 2, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-xs/medium"
color="text-subtle"
style={{marginBottom: 4}}
>
{a0}
</Text>
);
}
function DevToolsProfilingUseStateFromStoresOnChange(a0) { // fn#107392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:1926, owner: DevToolsProfilingUseStateFromStores.onChange, offset: 0x022faf99, size: 93 bytes, params: 2, frame: 12
var current;
const Number = global.Number;
const value = Number(a0);
if (global.isNaN(value)) {
current = env0_9.current;
if (current != null) {
current.setText('60000');
}
} else if (value > 1000) {
env0_2(value);
} else {
current = env0_9.current;
if (current != null) {
current.setText('60000');
}
}
}
function DevToolsProfilingUseStateFromStoresOnChange_107393(a0) { // fn#107393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:2409, owner: DevToolsProfilingUseStateFromStores.onChange, offset: 0x022faff6, size: 32 bytes, params: 2, frame: 12
const binding = env0_4;
const Number = global.Number;
binding(Number(a0));
}
function DevToolsProfilingUseStateFromStoresOnChange_107394(a0) { // fn#107394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:2753, owner: DevToolsProfilingUseStateFromStores.onChange, offset: 0x022fb016, size: 32 bytes, params: 2, frame: 12
const binding = env0_6;
const Number = global.Number;
binding(Number(a0));
}
function DevToolsProfilingUseStateFromStoresOnPress() { // fn#107395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:3219, owner: DevToolsProfilingUseStateFromStores.onPress, offset: 0x022fb036, size: 20 bytes, params: 1, frame: 11
env0_8('');
}
@@ -0,0 +1,370 @@
/* Metro module 14207; source: modules/devtools/native/components/screens/DevToolsQuickActionsScreen.tsx; dependencies: [57, 31, 27, 4502, 4257, 1879, 1949, 1310, 1312, 1878, 7111, 661, 12022, 1880, 9734, 1313, 33, 4501, 697, 12043, 694, 12021, 7896, 12992, 1362, 1365, 3968, 5080, 14208, 1962, 9746, 13304, 13306, 10995, 1585, 566, 3829, 14224, 6231, 6808, 13126, 1305, 13730, 4002, 13783, 14225, 9646, 1244, 6238, 13813, 6243, 8988, 13957, 14226, 8998, 12546, 1216, 1873, 2] */
function _fun107419(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:6, offset: 0x022fbb72, size: 626 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const handleThemeChange = function(a0) {
var defaultImport = importDefault(dependencyMap[22]);
defaultImport.updateTheme(a0 ? ThemeTypes.LIGHT : ThemeTypes.DARK);
};
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 env0_5 = (require(27) /* metro dependency 27 */).ScrollView;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const overridePremiumTypeStore = importDefault(1879) /* metro dependency 1879: OverridePremiumTypeStore */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const unsyncedUserSettingsStore = importDefault(1312) /* metro dependency 1312: UnsyncedUserSettingsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const devToolsSettingsStore = importDefault(7111) /* metro dependency 7111: DevToolsSettingsStore */;
const env0_14 = (require(661) /* metro dependency 661: Constants */).ThemeTypes;
const env0_15 = (require(12022) /* metro dependency 12022: NUFConstants */).NewUserTypes;
let value = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_16 = value.PREMIUM_TYPE_OVERRIDE_OPTIONS;
const env0_17 = value.UNSELECTED_PREMIUM_TYPE_OVERRIDE;
const env0_18 = (require(9734) /* metro dependency 9734: Constants */).VIBING_WUMPUS_MODAL_KEY;
const env0_19 = (require(1313) /* metro dependency 1313: ThemeConstants */).SystemThemeState;
value = require(33) /* metro dependency 33 */;
const env0_20 = value.jsx;
const env0_21 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {backgroundColor: BACKGROUND_BASE_LOW};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {padding: PX_16};
const env0_22 = Reflect.apply(createStyles, value, [object2]);
const showVibingWumpus = function() {
importDefault(dependencyMap[27]).pushLazy(require(dependencyMap[29])(dependencyMap[30], dependencyMap.paths),
{onClose: _fun107429}, VIBING_WUMPUS_MODAL_KEY);
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsQuickActionsScreen.tsx');
exports.default = DevToolsQuickActionsScreen;
}
function handleNewUserOnboarding() { // fn#107420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:567, offset: 0x022fbde4, size: 93 bytes, params: 1, frame: 15
const nufActionCreatorsModule = require(12043) /* metro dependency 12043: NUFActionCreators */;
const setNewUser = nufActionCreatorsModule.setNewUser;
const ORGANIC_REGISTERED = NewUserTypes.ORGANIC_REGISTERED;
Reflect.apply(setNewUser, nufActionCreatorsModule, [ORGANIC_REGISTERED]);
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.wait((require(12021) /* metro dependency 12021: NUFActionCreators */).startOnboarding);
}
function handleReducedMotionChange(a0) { // fn#107422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:753, offset: 0x022fbe7d, size: 54 bytes, params: 2, frame: 13
const value = require(12992) /* metro dependency 12992: AccessibilityActionCreators */;
value.setPrefersReducedMotion(a0 ? 'reduce' : 'no-preference');
}
function handleLaunchWelcomeReset() { // fn#107423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:852, offset: 0x022fbeb3, size: 106 bytes, params: 1, frame: 15
let value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
const removeDismissedContent = value.removeDismissedContent;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const SEEN_LAUNCH_WELCOME = DismissibleContent.SEEN_LAUNCH_WELCOME;
Reflect.apply(removeDismissedContent, value, [SEEN_LAUNCH_WELCOME]);
value = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_markDismissibleContentAsDismissed = value.UNSAFE_markDismissibleContentAsDismissed;
const SEEN_OLD_DESIGN = DismissibleContent.SEEN_OLD_DESIGN;
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, value, [SEEN_OLD_DESIGN]);
}
function launchMFA() { // fn#107424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:1078, offset: 0x022fbf1d, size: 90 bytes, params: 1, frame: 14
importDefault(dependencyMap[27]).pop();
let value = require(dependencyMap[29]);
value = value(dependencyMap[28], dependencyMap.paths);
value.then(_fun107425);
}
function showVibingWumpus() { // fn#107428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:1325, offset: 0x022fbff9, size: 94 bytes, params: 1, frame: 17
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[29])(dependencyMap[30], dependencyMap.paths), {onClose: function() {
}}, VIBING_WUMPUS_MODAL_KEY);
}
function handleResetDoubleTapState() { // fn#107430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:1419, offset: 0x022fc057, size: 206 bytes, params: 1, frame: 18
let value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
let removeDismissedContent = value.removeDismissedContent;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const DOUBLE_TAP_TO_REACT_UPSELL = DismissibleContent.DOUBLE_TAP_TO_REACT_UPSELL;
Reflect.apply(removeDismissedContent, value, [DOUBLE_TAP_TO_REACT_UPSELL]);
value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
removeDismissedContent = value.removeDismissedContent;
const DOUBLE_TAP_TO_REACT_REMINDER = DismissibleContent.DOUBLE_TAP_TO_REACT_REMINDER;
Reflect.apply(removeDismissedContent, value, [DOUBLE_TAP_TO_REACT_REMINDER]);
value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
removeDismissedContent = value.removeDismissedContent;
const DOUBLE_TAP_TO_REACT_EXPANDED_UPSELL = DismissibleContent.DOUBLE_TAP_TO_REACT_EXPANDED_UPSELL;
Reflect.apply(removeDismissedContent, value, [DOUBLE_TAP_TO_REACT_EXPANDED_UPSELL]);
const PreloadedUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).PreloadedUserSettingsActionCreators;
const updateAsync = PreloadedUserSettingsActionCreators.updateAsync;
const UserSettingsDelay = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).UserSettingsDelay;
const INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
Reflect.apply(updateAsync, PreloadedUserSettingsActionCreators, ['textAndImages', function(a0) {
a0.defaultReactionEmoji = undefined;
}, INFREQUENT_USER_ACTION]);
}
function launchTotpSetupSuccess() { // fn#107432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:1884, offset: 0x022fc132, size: 148 bytes, params: 1, frame: 18
importDefault(dependencyMap[27]).pop();
const Promise = global.Promise;
const all = Promise.all;
let value = require(dependencyMap[29]);
value = value(dependencyMap[31], dependencyMap.paths);
const items2 = [value];
items2[1] = require(dependencyMap[29])(dependencyMap[32], dependencyMap.paths);
Reflect.apply(all, Promise, [items2]).then(function(a0) {
var r1;
var r2;
var r0;
var property;
var item3;
var value3;
var TwoFAModalSetupSections;
var error;
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;
var r6 = value2 ? value : item;
try {
property = r6.default;
} catch (error) {
r0 = error;
r1 = item2;
r2 = value2;
if (!r2) {
try {
r1.return();
} catch {
}
}
throw r0;
}
if (value2) {
r1 = item2;
r2 = value2;
r6 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r6 = value;
} else {
r1 = item3;
r2 = value3;
r6 = item;
}
}
try {
TwoFAModalSetupSections = r6.TwoFAModalSetupSections;
} catch (error) {
r0 = error;
if (!r2) {
try {
r1.return();
} catch {
}
}
throw r0;
}
if (!r2) {
r1.return();
}
property.open(TwoFAModalSetupSections.SUCCESS);
return value;
});
}
function handleResetInAppNotificationExpandNux() { // fn#107434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:2079, offset: 0x022fc241, size: 84 bytes, params: 1, frame: 14
const value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
const removeDismissedContent = value.removeDismissedContent;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const IN_APP_NOTIFICATION_EXPAND_NUX = DismissibleContent.IN_APP_NOTIFICATION_EXPAND_NUX;
Reflect.apply(removeDismissedContent, value, [IN_APP_NOTIFICATION_EXPAND_NUX]);
(require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).resetExpandNUXState();
}
function DevToolsQuickActionsScreen() { // fn#107435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:2326, offset: 0x022fc295, size: 2946 bytes, params: 1, frame: 36
const styles = useStyles();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const {theme, usingSystemTheme, locale,
showDevWidget} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ThemeStore,
LocaleStore, UnsyncedUserSettingsStore, DevToolsSettingsStore], function() {
var useSystemTheme = UnsyncedUserSettingsStore.useSystemTheme;
return {theme: ThemeStore.theme, usingSystemTheme: useSystemTheme === SystemThemeState.ON,
locale: LocaleStore.locale, showDevWidget: DevToolsSettingsStore.showDevWidget};
});
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([OverridePremiumTypeStore],
function() {
return OverridePremiumTypeStore.getPremiumTypeOverride();
});
const binding = env0_4;
var [property, env0_4] = env0_3(binding.useState(false), 2);
const IgnoreProfileSpeedbumpDisabled = (require(3829) /* metro dependency 3829: UserSettings */).IgnoreProfileSpeedbumpDisabled;
const value6 = IgnoreProfileSpeedbumpDisabled.useSetting();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value7 = binding.useCallback(_fun107440, [locale]);
if (property) {
return ((Component) => <Component />)((require(14224) /* metro dependency 14224: UserSettingsJSError */).default);
}
const items3 = [styles.content];
items3[1] = {paddingBottom: styles.content.padding + value2.bottom};
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const items2 = [<TableRowGroup title="General" hasIcons={false}><TableSwitchRow label="Show Dev Widget" value={showDevWidget} onValueChange={onValueChange_107441} /></TableRowGroup>];
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[1] = <Spacer size={PX_16} />;
const ThemeLightIcon = (require(13730) /* metro dependency 13730: ThemeLightIcon */).ThemeLightIcon;
const tableSwitchRow = <TableSwitchRow label={usingSystemTheme ? '(using system theme)' : 'Light Theme'} disabled={usingSystemTheme} icon={<ThemeLightIcon />} value={(require(4002) /* metro dependency 4002: shared */).isThemeLight(theme)} onValueChange={handleThemeChange} />;
const AccessibilityIcon = (require(13783) /* metro dependency 13783: AccessibilityIcon */).AccessibilityIcon;
items2[2] = <TableRowGroup title="Appearance" hasIcons>{tableSwitchRow}<TableSwitchRow label="Reduced Motion" icon={<AccessibilityIcon />} value={useReducedMotion} onValueChange={handleReducedMotionChange} /></TableRowGroup>;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[3] = <Spacer size={PX_16} />;
items2[4] = <TableRowGroup title="Override Client-Side Premium Type" hasIcons>{PREMIUM_TYPE_OVERRIDE_OPTIONS.map(_fun107442)}</TableRowGroup>;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[5] = <Spacer size={PX_16} />;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Aojq+L']);
object.hasIcons = true;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {label: locale !== 'en-US' ? 'Change to en-US' : 'Change to pt-BR',
subLabel: 'Toggle to a non-english locale for change log testing, etc.', onPress: value7};
const LanguageIcon = (require(13813) /* metro dependency 13813: LanguageIcon */).LanguageIcon;
tableRowProps.icon = <LanguageIcon />;
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
tableRowProps.trailing = <TableRowArrow />;
const items4 = [<TableRow {...tableRowProps} />];
const tableRowProps2 = {'label': 'Reset Double Tap Emoji State',
'subLabel': 'Clears double tap emoji and resets dismissible content.', onPress: handleResetDoubleTapState};
const KeyIcon = (require(8988) /* metro dependency 8988: KeyIcon */).KeyIcon;
tableRowProps2.icon = <KeyIcon />;
tableRowProps2.trailing = <TableRowArrow />;
items4[1] = <TableRow {...tableRowProps2} />;
items4[2] = <TableRow label="Reset In App Notif Expand NUX" subLabel="Resets in app notification expand NUX dismissible content." onPress={handleResetInAppNotificationExpandNux} icon={<KeyIcon />} trailing={<TableRowArrow />} />;
const tableRowProps3 = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yoWDXU),
subLabel: 'Dismisses dev tools when launching.', onPress: handleNewUserOnboarding};
const WrenchIcon = (require(13957) /* metro dependency 13957: WrenchIcon */).WrenchIcon;
tableRowProps3.icon = <WrenchIcon />;
tableRowProps3.trailing = <TableRowArrow />;
items4[3] = <TableRow {...tableRowProps3} />;
items4[4] = <TableRow label="Launch MFA Challenge Modal" subLabel="Dismisses dev tools when launching." onPress={launchMFA} icon={<KeyIcon />} trailing={<TableRowArrow />} />;
items4[5] = <TableRow label="Show TOTP Setup Success" subLabel="Dismisses dev tools when launching." onPress={launchTotpSetupSuccess} icon={<KeyIcon />} trailing={<TableRowArrow />} />;
items4[6] = <TableRow label="Reset Launch Welcome" subLabel="Resets launch welcome NUX flag, requires an app restart to take effect." onPress={handleLaunchWelcomeReset} icon={<KeyIcon />} trailing={<TableRowArrow />} />;
items4[7] = <TableRow label="Launch Vibing Wumpus" subLabel="Vibe with the one and only" onPress={showVibingWumpus} icon={<KeyIcon />} trailing={<TableRowArrow />} />;
items4[8] = <TableRow label="Test captcha" onPress={(require(14226) /* metro dependency 14226: OpenCaptchaTestModal */).showCaptchaTestModal} icon={<KeyIcon />} trailing={<TableRowArrow />} />;
const EyeSlashIcon = (require(8998) /* metro dependency 8998: EyeSlashIcon */).EyeSlashIcon;
items4[9] = <TableSwitchRow label="Ignored Profile Speedbump Suppression" subLabel="Suppresses the speedbump for ignored profiles." icon={<EyeSlashIcon />} value={value6} onValueChange={onValueChange_107444} />;
items4[10] = <TableRow label="Show App Rating Modal" subLabel="Attempts to show the app rating modal -- this may not visually show anything on debug builds or if your device has already been shown the modal recently." onPress={importDefault(12546) /* metro dependency 12546: requestReviewModal */} icon={<WrenchIcon />} />;
items2[6] = <TableRowGroup {...object}>{items4}</TableRowGroup>;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[7] = <Spacer size={PX_16} />;
const items5 = [<TableRow icon={<WrenchIcon />} label="Force Native Crash" onPress={onPress_107445} />];
items5[1] = <TableRow icon={<WrenchIcon />} label="Force JS Crash" onPress={function() {
var Error = global.Error;
throw new Error('Force JS Crash');
}} />;
items5[2] = <TableRow icon={<WrenchIcon />} label="Force JS Boundary Crash" onPress={onPress_107447} />;
items5[3] = <TableRow icon={<WrenchIcon />} label="Force libdiscore Crash" onPress={onPress_107448} />;
items5[4] = <TableRow icon={<WrenchIcon />} label="Force libdiscore Store Crash" subLabel="Dispatches LIBDISCORE_SIMULATE_CRASH to NoteStore" onPress={onPress_107449} />;
items5[5] = <TableRow icon={<WrenchIcon />} label="Force libdiscore Store Error" subLabel="Dispatches LIBDISCORE_SIMULATE_STORE_ERROR with socket reset" onPress={onPress_107450} />;
items2[8] = <TableRowGroup title="Crash Actions" hasIcons>{items5}</TableRowGroup>;
return (
<ScrollView style={styles.container} contentContainerStyle={items3}>
{items2}
</ScrollView>
);
}
function _fun107425({openMFAModal}) { // fn#107425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:1128, offset: 0x022fbf77, size: 130 bytes, params: 2, frame: 16
openMFAModal({ticket: 'ticket', methods: [{'type': 'webauthn', 'challenge': '{}'}, {type: 'totp'}, {type: 'backup'},
{type: 'sms'}, {type: 'password'}]}, function() {
}, function() {
});
}
function _fun107440() { // fn#107440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:2905, offset: 0x022fce7b, size: 97 bytes, params: 1, frame: 12
var value;
if (locale !== 'en-US') {
value = environment.__proto__;
value = importDefault(7896) /* metro dependency 7896: UserSettingsActionCreators */;
value.updateLocale('en-US');
} else {
value = environment.__proto__;
value = importDefault(7896) /* metro dependency 7896: UserSettingsActionCreators */;
value.updateLocale('pt-BR');
}
}
function DevToolsQuickActionsScreenOnValueChange() { // fn#107441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:3288, owner: DevToolsQuickActionsScreen.onValueChange, offset: 0x022fcedc, size: 55 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (require(13126) /* metro dependency 13126: DevToolsActionCreators */).updateDevToolsSettings({showDevWidget: !showDevWidget});
}
function _fun107442({label, value}) { // fn#107442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:3929, offset: 0x022fcf13, size: 126 bytes, params: 2, frame: 19
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const PencilIcon = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
return (
<TableSwitchRow
onValueChange={function(a0) {
var moduleValue = require(dependencyMap[45]);
moduleValue.updateClientPremiumTypeOverride(a0 ? value : UNSELECTED_PREMIUM_TYPE_OVERRIDE, currentUser);
}}
label={label}
icon={<PencilIcon />}
value={value === premiumTypeOverride}
key={label}
/>
);
}
function DevToolsQuickActionsScreenOnValueChange_107444() { // fn#107444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:6302, owner: DevToolsQuickActionsScreen.onValueChange, offset: 0x022fcfd2, size: 54 bytes, params: 1, frame: 11
const IgnoreProfileSpeedbumpDisabled = (require(3829) /* metro dependency 3829: UserSettings */).IgnoreProfileSpeedbumpDisabled;
return IgnoreProfileSpeedbumpDisabled.updateSetting(!env0_5);
}
function DevToolsQuickActionsScreenOnPress() { // fn#107445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:6839, owner: DevToolsQuickActionsScreen.onPress, offset: 0x022fd008, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).crash();
}
function DevToolsQuickActionsScreenOnPress_107448() { // fn#107448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:7184, owner: DevToolsQuickActionsScreen.onPress, offset: 0x022fd051, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(require(1873) /* metro dependency 1873: shimNative */).crash();
}
function DevToolsQuickActionsScreenOnPress_107449() { // fn#107449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:7367, owner: DevToolsQuickActionsScreen.onPress, offset: 0x022fd076, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LIBDISCORE_SIMULATE_CRASH'});
}
function DevToolsQuickActionsScreenOnPress_107450() { // fn#107450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:7598, owner: DevToolsQuickActionsScreen.onPress, offset: 0x022fd0a7, size: 87 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
const env0_0 = GatewayConnectionStore.getSocket();
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value = value.dispatch({type: 'LIBDISCORE_SIMULATE_STORE_ERROR'});
value.catch(_fun107451);
}
function _fun107451(a0) { // fn#107451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:7690, offset: 0x022fd0fe, size: 41 bytes, params: 2, frame: 12
env0_0.resetSocketOnDispatchError({error: a0, action: 'LIBDISCORE_SIMULATE_STORE_ERROR'});
}
@@ -0,0 +1,458 @@
/* Metro module 14230; source: modules/devtools/native/components/screens/DevToolsRevenuePlaygroundScreen.tsx; dependencies: [31, 27, 8326, 5221, 1379, 1934, 1878, 4649, 1880, 33, 694, 632, 6231, 6238, 6243, 6803, 3857, 7067, 4501, 697, 7062, 4080, 14231, 1962, 6808, 14234, 10560, 5080, 14235, 14238, 14242, 14244, 1305, 2] */
function _fun107606(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:6, offset: 0x0230227d, size: 651 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).ScrollView;
const premiumGiftingIntentStore = importDefault(8326) /* metro dependency 8326: PremiumGiftingIntentStore */;
const userAffinitiesV2Store = importDefault(5221) /* metro dependency 5221: UserAffinitiesV2Store */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
const env0_10 = (require(4649) /* metro dependency 4649: DevSettingsStore */).DevSettingsCategory;
let value = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_11 = value.GiftIntentType;
const env0_12 = value.PremiumTypes;
value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.jsxs;
object = [{'label': 'None', 'value': null}, {'label': '1', 'value': 1}, {'label': '2', 'value': 2}, {'label': '3',
'value': 3}, {'label': '4', 'value': 4}, {'label': '5', 'value': 5}, {'label': '10', 'value': 10},
{'label': '25', 'value': 25}];
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.scrollContainer = {padding: PX_16};
const env0_16 = Reflect.apply(createStyles, value, [object]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsRevenuePlaygroundScreen.tsx');
exports.default = DevToolsRevenuePlaygroundScreen;
}
function FriendAnniversary() { // fn#107607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:462, offset: 0x02302508, size: 445 bytes, params: 1, frame: 28
const value2 = undefined;
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([PremiumGiftingIntentStore,
UserStore, UserAffinitiesV2Store], _fun107608, [],
(require(632) /* metro dependency 632: useStateFromStores */).statesWillNeverBeEqual);
const env0_0 = value3.selected;
const highestAffinity = value3.highestAffinity;
const highAffinity = value3.highAffinity;
const value4 = env0_15.find(function({value}) {
return value === selected;
});
const r16 = (value4 == null ? value2 : value4.label) ?? 'None';
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
const items2 = [<TableRow label="Number of anniversaries" subLabel={'Current: ' + r16} trailing={<TableRowArrow />} onPress={onPress_107611} />];
items2[1] = <TableRow label="Trigger Mobile FA message in current DM" subLabel="Sends an ephemeral GIFTING_PROMPT into the selected channel" onPress={onPress_107614} />;
items2[2] = highestAffinity.map(_fun107615);
items2[3] = highAffinity.map(_fun107616);
return (
<TableRowGroup title="Friend Anniversary" hasIcons={false}>
{items2}
</TableRowGroup>
);
}
function TrialOfferSheetExample() { // fn#107617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:2802, offset: 0x02302ae9, size: 265 bytes, params: 1, frame: 23
const value2 = undefined;
const value4 = (require(7062) /* metro dependency 7062: usePremiumTrialOfferNative */).usePremiumTrialOffer() != null;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const value5 = 'No trial offer in store';
const r9 = value4 ? value2 : value5;
const value6 = !value4;
return (
<TableRowGroup title="Trial Offers" hasIcons={false}>
<TableRow
label="Trial Offer Nitro Basic"
subLabel={r9}
disabled={value6}
onPress={function() {
openTrialOfferActionSheet(PremiumTypes.TIER_0);
}}
/>
<TableRow
label="Trial Offer Nitro"
subLabel={value4 ? value2 : value5}
disabled={value6}
onPress={function() {
openTrialOfferActionSheet(PremiumTypes.TIER_2);
}}
/>
</TableRowGroup>
);
}
function PremiumToggles() { // fn#107622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:3453, offset: 0x02302cac, size: 145 bytes, params: 1, frame: 22
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([DevSettingsStore],
_fun107623, [], (require(632) /* metro dependency 632: useStateFromStores */).statesWillNeverBeEqual);
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup title="Premium Toggles" hasIcons={false}>
{value2.map(_fun107625)}
</TableRowGroup>
);
}
function ForceMockIAP() { // fn#107627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:3828, offset: 0x02302e92, size: 163 bytes, params: 1, frame: 19
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([DevSettingsStore],
function() {
return DevSettingsStore.get('force_mock_iap');
});
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
return (
<TableRowGroup title="iOS IAP Mock" hasIcons={false}>
<TableSwitchRow
label="Force mock IAP products"
subLabel="Replaces StoreKit with hardcoded fixture data. App will restart when toggled."
value={value2}
onValueChange={onValueChange_107629}
/>
</TableRowGroup>
);
}
function PaymentFlowTest() { // fn#107630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4258, offset: 0x02302fa6, size: 149 bytes, params: 1, frame: 20
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {label: 'Test Payment Flow', onPress: onPress_107631};
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
object.trailing = <TableRowArrow />;
return (
<TableRowGroup title="Payment Flow Test" hasIcons={false}>
<TableRow {...object} />
</TableRowGroup>
);
}
function Orbs() { // fn#107632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4511, offset: 0x02303083, size: 149 bytes, params: 1, frame: 20
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {label: 'Test Orbs Flow', onPress: onPress_107633};
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
object.trailing = <TableRowArrow />;
return (
<TableRowGroup title="Orbs" hasIcons={false}>
<TableRow {...object} />
</TableRowGroup>
);
}
function RevenueSmokeTests() { // fn#107634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4737, offset: 0x02303160, size: 149 bytes, params: 1, frame: 20
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {label: 'Test all purchasing flows', onPress: onPress_107635};
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
object.trailing = <TableRowArrow />;
return (
<TableRowGroup title="Revenue Smoke Tests" hasIcons={false}>
<TableRow {...object} />
</TableRowGroup>
);
}
function GuildPowerups() { // fn#107636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:5002, offset: 0x0230323d, size: 149 bytes, params: 1, frame: 20
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {label: 'Guild Powerups', onPress: onPress_107637};
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
object.trailing = <TableRowArrow />;
return (
<TableRowGroup title="Guild Powerups" hasIcons={false}>
<TableRow {...object} />
</TableRowGroup>
);
}
function DevToolsRevenuePlaygroundScreen() { // fn#107638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:5370, offset: 0x0230331a, size: 615 bytes, params: 1, frame: 24
const styles = useStyles();
const items2 = [<TrialOfferSheetExample />];
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[1] = <Spacer size={PX_16} />;
items2[2] = <PremiumToggles />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[3] = <Spacer size={PX_16} />;
items2[4] = <ForceMockIAP />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[5] = <Spacer size={PX_16} />;
items2[6] = <PaymentFlowTest />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[7] = <Spacer size={PX_16} />;
items2[8] = <Orbs />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[9] = <Spacer size={PX_16} />;
items2[10] = <RevenueSmokeTests />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[11] = <Spacer size={PX_16} />;
items2[12] = <GuildPowerups />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[13] = <Spacer size={PX_16} />;
items2[14] = <FriendAnniversary />;
return (
<ScrollView style={styles.container} contentContainerStyle={styles.scrollContainer}>
{items2}
</ScrollView>
);
}
function _fun107608() { // fn#107608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:538, offset: 0x023026c5, size: 99 bytes, params: 1, frame: 13
var environment;
const closure = buildRow;
const object2 = {};
const value = environment.__proto__;
object2.selected = PremiumGiftingIntentStore.getDevToolTotalFriendAnniversaries();
object2.highestAffinity = PremiumGiftingIntentStore.getHighestAffinityFriendAnniversaries().map(closure);
object2.highAffinity = PremiumGiftingIntentStore.getHighAffinityFriendAnniversaries().map(closure);
return object2;
}
function FriendAnniversaryOnPress() { // fn#107611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:1345, owner: FriendAnniversary.onPress, offset: 0x023027e4, size: 100 bytes, params: 1, frame: 15
const showSimpleActionSheetNativeModule = require(6803) /* metro dependency 6803: showSimpleActionSheetNative */;
const showSimpleActionSheet = showSimpleActionSheetNativeModule.showSimpleActionSheet;
const object2 = {key: 'dev-tools-friend-anniversary-count'};
object2.header = {title: 'Anniversaries to generate'};
object2.options = env1_15.map(_fun107612);
object2.hasIcons = false;
Reflect.apply(showSimpleActionSheet, showSimpleActionSheetNativeModule, [object2]);
}
function FriendAnniversaryOnPress_107614() { // fn#107614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:1841, owner: FriendAnniversary.onPress, offset: 0x023028d6, size: 267 bytes, params: 1, frame: 18
var r7;
var channel;
const value = environment.__proto__;
const channelId = SelectedChannelStore.getChannelId();
if (channelId != null) {
channel = ChannelStore.getChannel(channelId);
r7 = channel == null || channel.recipients == null ? undefined : channel.recipients[0];
if (r7 != null) {
(importDefault(7067) /* metro dependency 7067: MessageActionCreators */).sendGiftingPromptSystemMessage(channelId,
{giftIntentType: GiftIntentType.FRIEND_ANNIVERSARY, recipientUserId: r7});
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({'key': 'dev-tools-gift-intent-triggered',
'content': 'Friendship anniversary card sent.'});
} else {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({'key': 'dev-tools-gift-intent-no-recipient',
'content': 'Selected channel has no other recipient.'});
}
} else {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({'key': 'dev-tools-gift-intent-no-channel',
'content': 'Open a DM first.'});
}
}
function _fun107615({userId, username, affinity}) { // fn#107615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:2372, offset: 0x023029e1, size: 143 bytes, params: 2, frame: 20
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={'★ ' + username}
subLabel={'Highest affinity (eligible for notification) · ' + affinity}
key={'highest-' + userId}
/>
);
}
function _fun107616({userId, username, affinity}) { // fn#107616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:2536, offset: 0x02302a70, size: 121 bytes, params: 2, frame: 19
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={username}
subLabel={'High affinity · ' + affinity}
key={'high-' + userId}
/>
);
}
function openTrialOfferActionSheet(a0) { // fn#107618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:2910, owner: TrialOfferSheetExample.openTrialOfferActionSheet, offset: 0x02302bf2, size: 128 bytes, params: 2, frame: 17
var environment;
var value2;
var defaultImport;
if (env0_0 != null) {
value2 = environment.__proto__;
defaultImport = importDefault(dependencyMap[21]);
defaultImport.openLazy(require(dependencyMap[23])(dependencyMap[22], dependencyMap.paths),
'PremiumTrialOfferActionSheet', {fallbackPremiumType: a0, userTrialOffer: env0_0,
markAsDismissed: function() {
}});
}
}
function _fun107623() { // fn#107623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:3518, offset: 0x02302d3d, size: 49 bytes, params: 1, frame: 11
var environment;
let value = environment.__proto__;
const allByCategory = DevSettingsStore.allByCategory;
const PREMIUM = DevSettingsCategory.PREMIUM;
return Reflect.apply(allByCategory, DevSettingsStore, [PREMIUM]).filter(function(a0) {
var iterator = a0[Symbol.iterator]();
var item2 = iterator.next();
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r1 = value2 ? value : item;
if (!value2) {
item2.return();
}
return r1 !== 'force_mock_iap';
});
}
function _fun107625(a0) { // fn#107625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:3709, offset: 0x02302d99, size: 200 bytes, params: 2, frame: 23
var r1;
var r2;
var r42;
var r43;
var item3;
var value3;
var item4;
var value4;
var label;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r42 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r42 = value;
} else {
r1 = item3;
r2 = value3;
r42 = item;
}
}
if (r2) {
r43 = value;
} else {
item4 = Reflect.apply(iterator2, r1, []);
item = item4.value;
item4 = item4.done ? undefined : r1;
value4 = item4 === value;
if (value4) {
r1 = item4;
r2 = value4;
r43 = value;
} else {
r1 = item4;
r2 = value4;
r43 = item;
}
}
try {
label = r43.label;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
}
}
throw error;
}
if (!r2) {
r1.return();
}
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
return (
<TableSwitchRow
label={label}
subLabel={r4}
value={r42}
onValueChange={onValueChange_107626}
key={r4}
/>
);
}
function ForceMockIAPOnValueChange(a0) { // fn#107629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4166, owner: ForceMockIAP.onValueChange, offset: 0x02302f4e, size: 88 bytes, params: 2, frame: 16
const value = environment.__proto__;
(require(14234) /* metro dependency 14234: DevSettingsActions */).toggle('force_mock_iap', a0);
DevSettingsStore.persist();
(importDefault(10560) /* metro dependency 10560: BundleUpdater */).checkForUpdateAndReload();
}
function PaymentFlowTestOnPress() { // fn#107631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4420, owner: PaymentFlowTest.onPress, offset: 0x0230303b, size: 72 bytes, params: 1, frame: 15
const value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[23])(dependencyMap[28], dependencyMap.paths));
}
function OrbsOnPress() { // fn#107633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4646, owner: Orbs.onPress, offset: 0x02303118, size: 72 bytes, params: 1, frame: 15
const value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[23])(dependencyMap[29], dependencyMap.paths));
}
function RevenueSmokeTestsOnPress() { // fn#107635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4911, owner: RevenueSmokeTests.onPress, offset: 0x023031f5, size: 72 bytes, params: 1, frame: 15
const value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[23])(dependencyMap[30], dependencyMap.paths));
}
function GuildPowerupsOnPress() { // fn#107637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:5156, owner: GuildPowerups.onPress, offset: 0x023032d2, size: 72 bytes, params: 1, frame: 15
const value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[23])(dependencyMap[31], dependencyMap.paths));
}
function buildRow(a0) { // fn#107609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:556, offset: 0x02302728, size: 188 bytes, params: 2, frame: 18
var r1;
let value = environment.__proto__.__proto__;
const userAffinity = UserAffinitiesV2Store.getUserAffinity(a0);
const object2 = {userId: a0};
value = UserStore.getUser(a0);
const value3 = undefined;
const username = value == null ? value3 : value.username;
object2.username = username ?? 'Unknown User (' + a0 + ')';
const dmProbability = userAffinity == null ? value3 : userAffinity.dmProbability;
value = 'N/A';
if (dmProbability != null) {
value = 100 * userAffinity.dmProbability;
value = value.toFixed(3);
value = '' + value + '%';
r1 = value;
} else {
r1 = value;
}
object2.affinity = r1;
return object2;
}
function _fun107612({label, value}) { // fn#107612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:1487, offset: 0x02302848, size: 81 bytes, params: 2, frame: 16
return {label: value !== selected ? label : '' + label + ' (selected)', onPress: function() {
importDefault(dependencyMap[10]).dispatch({type: 'DEV_TOOLS_SET_FRIEND_ANNIVERSARY_COUNT', total: value});
}};
}
function onValueChange_107626(a0) { // fn#107626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:3796, offset: 0x02302e61, size: 49 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (require(14234) /* metro dependency 14234: DevSettingsActions */).toggle(env0_0, a0);
}
@@ -0,0 +1,88 @@
/* Metro module 14260; source: modules/devtools/native/components/screens/DevToolsShopScreen.tsx; dependencies: [31, 27, 4649, 33, 4501, 697, 5463, 566, 14158, 1365, 4572, 6231, 6238, 6809, 14234, 6808, 2] */
function _fun107857(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:6, offset: 0x0230b889, size: 270 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).ScrollView;
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
const env0_7 = Reflect.apply(createStyles, value, [{wrap: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsShopScreen.tsx');
exports.default = DevToolsShopScreen;
}
function DevToolsShopScreen() { // fn#107858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:394, offset: 0x0230b997, size: 835 bytes, params: 1, frame: 33
const styles = useStyles();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], function() {
return DevSettingsStore.get('shop_disable_cache');
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], function() {
return DevSettingsStore.get('shop_include_unpublished');
});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], function() {
return DevSettingsStore.get('shop_show_debug_overlay');
});
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], function() {
return DevSettingsStore.get('bypass_google_sku_sync');
});
const defaultImport2 = importDefault(14158) /* metro dependency 14158: toggleDismissibleContentDismissState */;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const COLLECTIBLES_SHOP_ENTRY_MARKETING = DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
const {isDismissed, handleToggleDismissState} = defaultImport2(COLLECTIBLES_SHOP_ENTRY_MARKETING);
const object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingVertical = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingBottom = PX_16 + insets.bottom;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const FormSwitch = (require(6809) /* metro dependency 6809: FormSwitchNative */).FormSwitch;
const items2 = [<TableRow label="Disable collectibles shop cache" subLabel="shop_disable_cache" subLabelLineClamp={1} trailing={<FormSwitch value={value2} onValueChange={onValueChange_107863} />} />];
items2[1] = <TableRow label="Show unpublished items in collectibles shop" subLabel="shop_include_unpublished" subLabelLineClamp={1} trailing={<FormSwitch value={value3} onValueChange={onValueChange_107864} />} />;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
items2[2] = <TableSwitchRow label="Collectibles Marketing" subLabel="COLLECTIBLES_SHOP_ENTRY_MARKETING" subLabelLineClamp={1} value={isDismissed} onValueChange={handleToggleDismissState} />;
items2[3] = <TableRow label="Show debug log overlay in collectibles shop" subLabel="shop_show_debug_overlay" subLabelLineClamp={1} trailing={<FormSwitch value={value4} onValueChange={onValueChange_107865} />} />;
items2[4] = <TableRow label="[Android] Bypass Google SKU sync in collectibles shop" subLabel="bypass_google_sku_sync" subLabelLineClamp={1} trailing={<FormSwitch value={value5} onValueChange={onValueChange_107866} />} />;
return (
<ScrollView style={styles.wrap} contentContainerStyle={object}>
<Stack spacing={16}>
<TableRowGroup title="Shop Toggles" hasIcons={false}>
{items2}
</TableRowGroup>
</Stack>
</ScrollView>
);
}
function DevToolsShopScreenOnValueChange(a0) { // fn#107863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:1292, owner: DevToolsShopScreen.onValueChange, offset: 0x0230bd3e, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (require(14234) /* metro dependency 14234: DevSettingsActions */).toggle('shop_disable_cache', a0);
}
function DevToolsShopScreenOnValueChange_107864(a0) { // fn#107864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:1522, owner: DevToolsShopScreen.onValueChange, offset: 0x0230bd6e, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (require(14234) /* metro dependency 14234: DevSettingsActions */).toggle('shop_include_unpublished', a0);
}
function DevToolsShopScreenOnValueChange_107865(a0) { // fn#107865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:1906, owner: DevToolsShopScreen.onValueChange, offset: 0x0230bd9e, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (require(14234) /* metro dependency 14234: DevSettingsActions */).toggle('shop_show_debug_overlay', a0);
}
function DevToolsShopScreenOnValueChange_107866(a0) { // fn#107866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:2149, owner: DevToolsShopScreen.onValueChange, offset: 0x0230bdce, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (require(14234) /* metro dependency 14234: DevSettingsActions */).toggle('bypass_google_sku_sync', a0);
}
@@ -0,0 +1,461 @@
/* Metro module 14249; source: modules/devtools/native/components/screens/DevToolsTogglesScreen.tsx; dependencies: [57, 31, 27, 5114, 4649, 33, 6590, 4501, 697, 6238, 3857, 6809, 566, 6231, 14234, 5463, 4572, 14250, 6984, 2] */
function _fun107793(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:6, offset: 0x023090c1, size: 388 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
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 env0_5 = (require(27) /* metro dependency 27 */).ScrollView;
const designTogglesStore = importDefault(5114) /* metro dependency 5114: DesignTogglesStore */;
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
const env0_8 = (require(4649) /* metro dependency 4649: DevSettingsStore */).CATEGORY_LABELS;
let value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object3.wrap = object4;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.container = {paddingVertical: PX_16};
const env0_11 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsTogglesScreen.tsx');
exports.default = DevToolsTogglesScreen;
}
function fuzzySearchToggle(a0, a1, a2) { // fn#107794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:210, offset: 0x02309245, size: 125 bytes, params: 4, frame: 19
var r1;
var r0;
var value3;
let value = a0.length === 0;
if (value) {
r0 = value;
} else {
value3 = (importDefault(6590) /* metro dependency 6590 */)(a0.toLowerCase(), a1.toLowerCase());
if (value3) {
r1 = value3;
} else {
value = importDefault(6590) /* metro dependency 6590 */;
value = value(a0.toLowerCase(), a2.toLowerCase());
r1 = value;
}
r0 = r1;
}
return r0;
}
function ToggleTableRow({toggleName, description, value, onValueChange}) { // fn#107795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:524, offset: 0x023092c2, size: 158 bytes, params: 2, frame: 23
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {label: description, labelLineClamp: 1, subLabel: toggleName, subLabelLineClamp: 1,
onPress: onPress_107796};
const FormSwitch = (require(6809) /* metro dependency 6809: FormSwitchNative */).FormSwitch;
object2.trailing = <FormSwitch value={value} onValueChange={onValueChange} />;
return <TableRow {...object2} key={toggleName} />;
}
function DevTogglesForCategory(a0) { // fn#107797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:794, offset: 0x0230939b, size: 124 bytes, params: 2, frame: 18
var r0;
const category = a0.category;
const title = a0.title;
let value = ((a0, a1) => {
var env0_0 = a0;
var env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], _fun107799, [a1,
a0],
(require(566) /* metro dependency 566: flux */).statesWillNeverBeEqual);
})(category, a0.query);
if (value.length === 0) {
r0 = null;
} else {
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
value = <TableRowGroup title={title} hasIcons={false}>{value.map(_fun107801)}</TableRowGroup>;
r0 = value;
}
return r0;
}
function DevToolsTogglesScreen() { // fn#107803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1389, offset: 0x02309621, size: 635 bytes, params: 1, frame: 34
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const styles = useStyles();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const [property, property2] = env0_3(env0_4.useState(''), 2);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DesignTogglesStore], _fun107804,
[property], (require(566) /* metro dependency 566: flux */).statesWillNeverBeEqual);
const items2 = [styles.container];
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[1] = {paddingBottom: PX_16 + insets.bottom};
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRow = <TableRow label="Clear All" variant="danger" onPress={onPress_107806} arrow />;
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
const items4 = [<TableRowGroup title="Actions" hasIcons={false}>{tableRow}<TableRow label={<SearchField size="md" placeholder="Search design toggles" onChange={property2} />} /></TableRowGroup>];
items4[1] = value4.length > 0 ? <TableRowGroup title="Design Toggles" hasIcons={false}>{value4.map(_fun107807)}</TableRowGroup> : null;
const Object = global.Object;
const value = Object.entries(CATEGORY_LABELS);
items4[2] = value.map(_fun107809);
return (
<ScrollView style={styles.wrap} contentContainerStyle={items2}>
<Stack spacing={16}>
{items4}
</Stack>
</ScrollView>
);
}
function ToggleTableRowOnPress() { // fn#107796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:693, owner: ToggleTableRow.onPress, offset: 0x02309360, size: 59 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({content: description, key: toggleName});
}
function useFilteredDevTogglesForCategory(a0, a1) { // fn#107798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:861, owner: DevTogglesForCategory.useFilteredDevTogglesForCategory, offset: 0x02309417, size: 107 bytes, params: 3, frame: 22
const env0_0 = a0;
const env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], _fun107799, [a1, a0],
(require(566) /* metro dependency 566: flux */).statesWillNeverBeEqual);
}
function _fun107801(a0) { // fn#107801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1158, offset: 0x0230953e, size: 178 bytes, params: 2, frame: 23
var r1;
var r2;
var r42;
var r43;
var item3;
var value3;
var item4;
var value4;
var label;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r42 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r42 = value;
} else {
r1 = item3;
r2 = value3;
r42 = item;
}
}
if (r2) {
r43 = value;
} else {
item4 = Reflect.apply(iterator2, r1, []);
item = item4.value;
item4 = item4.done ? undefined : r1;
value4 = item4 === value;
if (value4) {
r1 = item4;
r2 = value4;
r43 = value;
} else {
r1 = item4;
r2 = value4;
r43 = item;
}
}
try {
label = r43.label;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
}
}
throw error;
}
if (!r2) {
r1.return();
}
return (
<ToggleTableRow
toggleName={r4}
description={label}
value={r42}
onValueChange={onValueChange_107802}
key={r4}
/>
);
}
function _fun107804() { // fn#107804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1553, offset: 0x0230989c, size: 40 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
return DesignTogglesStore.allWithDescriptions().filter(_fun107805);
}
function DevToolsTogglesScreenOnPress() { // fn#107806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1946, owner: DevToolsTogglesScreen.onPress, offset: 0x02309928, size: 59 bytes, params: 1, frame: 13
const value = environment.__proto__;
(require(14250) /* metro dependency 14250: DesignTogglesActions */).clearAll();
(require(14234) /* metro dependency 14234: DevSettingsActions */).clearAll();
}
function _fun107807(a0) { // fn#107807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:2205, offset: 0x02309963, size: 146 bytes, params: 2, frame: 20
var r0;
var r1;
var r6;
var r7;
var item3;
var value3;
var item4;
var value4;
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 r3 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
r6 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r6 = value;
} else {
r0 = item3;
r1 = value3;
r6 = item;
}
}
if (r1) {
r7 = value;
} else {
item4 = Reflect.apply(iterator2, r0, []);
item = item4.value;
item4 = item4.done ? undefined : r0;
value4 = item4 === value;
if (value4) {
r0 = item4;
r1 = value4;
r7 = value;
} else {
r0 = item4;
r1 = value4;
r7 = item;
}
}
if (!r1) {
r0.return();
}
return (
<ToggleTableRow
toggleName={r3}
description={r7}
value={r6}
onValueChange={onValueChange_107808}
key={r3}
/>
);
}
function _fun107809(a0) { // fn#107809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:2343, offset: 0x02309a26, size: 118 bytes, params: 2, frame: 18
var r0;
var r1;
var r5;
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 r3 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
r5 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r5 = value;
} else {
r0 = item3;
r1 = value3;
r5 = item;
}
}
if (!r1) {
r0.return();
}
return (
<DevTogglesForCategory
category={global.parseInt(r3)}
title={r5}
query={env0_0}
key={r3}
/>
);
}
function _fun107799() { // fn#107799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:948, offset: 0x02309482, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__.__proto__;
return DevSettingsStore.allByCategory(env0_0).filter(_fun107800);
}
function onValueChange_107802(a0) { // fn#107802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1244, offset: 0x023095f0, size: 49 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (require(14234) /* metro dependency 14234: DevSettingsActions */).toggle(env0_0, a0);
}
function _fun107805(a0) { // fn#107805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1589, offset: 0x023098c4, size: 100 bytes, params: 2, frame: 18
var r0;
var r1;
var r2;
var item3;
var value3;
var item4;
var value4;
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 r3 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
r0 = item3;
r1 = value3;
}
if (r1) {
r2 = value;
} else {
item4 = Reflect.apply(iterator2, r0, []);
item = item4.value;
item4 = item4.done ? undefined : r0;
value4 = item4 === value;
if (value4) {
r0 = item4;
r1 = value4;
r2 = value;
} else {
r0 = item4;
r1 = value4;
r2 = item;
}
}
if (!r1) {
r0.return();
}
return fuzzySearchToggle(env1_0, r3, r2);
}
function onValueChange_107808(a0) { // fn#107808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:2283, offset: 0x023099f5, size: 49 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (require(14250) /* metro dependency 14250: DesignTogglesActions */).toggle(env0_0, a0);
}
function _fun107800(a0) { // fn#107800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:979, offset: 0x023094b0, size: 142 bytes, params: 2, frame: 21
var r1;
var r2;
var r52;
var item3;
var value3;
var item4;
var value4;
var label;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r5 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
} else {
r1 = item3;
r2 = value3;
}
}
if (r2) {
r52 = value;
} else {
item4 = Reflect.apply(iterator2, r1, []);
item = item4.value;
item4 = item4.done ? undefined : r1;
value4 = item4 === value;
if (value4) {
r1 = item4;
r2 = value4;
r52 = value;
} else {
r1 = item4;
r2 = value4;
r52 = item;
}
}
try {
label = r52.label;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
}
}
throw error;
}
if (!r2) {
r1.return();
}
return fuzzySearchToggle(require, r5, label);
}
@@ -0,0 +1,57 @@
/* Metro module 14275; source: modules/devtools/native/components/screens/performance/BenchmarkResultsList.tsx; dependencies: [31, 33, 6231, 6238, 14271, 2] */
function _fun108002(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14472:6, offset: 0x02311844, size: 140 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_2 = value.jsx;
const env0_3 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/BenchmarkResultsList.tsx');
exports.default = BenchmarkResultsList;
}
function BenchmarkResultsList({results, onClear}) { // fn#108003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14472:254, offset: 0x023118d0, size: 169 bytes, params: 2, frame: 21
var r0;
var TableRowGroup;
var items2;
if (results.length === 0) {
r0 = null;
} else {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
items2 = [results.map(_fun108004)];
items2[1] = ((TableRow) => <TableRow label="Clear results" variant="danger" arrow onPress={onClear} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow);
r0 = <TableRowGroup title="Results (newest first)" hasIcons={false}>{items2}</TableRowGroup>;
}
return r0;
}
function _fun108004(a0) { // fn#108004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14472:417, offset: 0x02311979, size: 347 bytes, params: 2, frame: 28
var r0;
var value;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var object2;
var dropped;
var frames;
if (a0.kind === 'mount') {
value = environment.__proto__;
var tableRowProps = {label: a0.label};
value = a0.elapsedMs.toFixed(1);
tableRowProps.subLabel = '' + value + ' ms total';
value = <TableRow {...tableRowProps} key={a0.id} />;
r0 = value;
} else {
value = environment.__proto__;
object2 = {};
value = a0.meanMs.toFixed(1);
object2.label = 'Scroll · mean ' + value + ' ms · worst ' + a0.worstMs.toFixed(1) + ' ms';
dropped = a0.dropped;
frames = a0.frames;
value = (require(14271) /* metro dependency 14271: startFrameMonitor */).FRAME_BUDGET_MS.toFixed(1);
object2.subLabel = '' + dropped + '/' + frames + ' frames over ' + value + ' ms';
value = <TableRow {...object2} key={a0.id} />;
r0 = value;
}
return r0;
}
@@ -0,0 +1,25 @@
/* Metro module 14277; source: modules/devtools/native/components/screens/performance/MountMeasure.tsx; dependencies: [31, 27, 33, 4594, 2] */
function _fun108007(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14474:6, offset: 0x02311c00, size: 152 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/MountMeasure.tsx');
exports.default = MountMeasure;
}
function MountMeasure({batchKey, onMeasure, onCancel, style, children}) { // fn#108008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14474:248, offset: 0x02311c98, size: 126 bytes, params: 2, frame: 17
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(function() {
return onCancel(batchKey);
});
return (
<View style={style} onLayout={function() {
return onMeasure(batchKey);
}}>
{children}
</View>
);
}
@@ -0,0 +1,26 @@
/* Metro module 14276; source: modules/devtools/native/components/screens/performance/ScrollBenchmark.tsx; dependencies: [31, 33, 14273, 6238, 2] */
function _fun108005(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14473:6, offset: 0x02311ad4, size: 138 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/ScrollBenchmark.tsx');
exports.default = ScrollBenchmark;
}
function ScrollBenchmark({onResult, subLabel}) { // fn#108006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14473:236, offset: 0x02311b5e, size: 162 bytes, params: 2, frame: 19
subLabel = subLabel === undefined ? 'Records frame times while you scroll the content below.' : subLabel;
const {monitoring, start, stop} = (importDefault(14273) /* metro dependency 14273: useFrameMonitor */)(onResult);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={monitoring ? 'Stop scroll monitor' : 'Start scroll monitor'}
subLabel={subLabel}
variant={monitoring ? 'danger' : undefined}
arrow
onPress={monitoring ? stop : start}
/>
);
}
@@ -0,0 +1,20 @@
/* Metro module 14269; source: modules/devtools/native/components/screens/performance/index.tsx; dependencies: [2, 14270, 14271, 14272, 14273, 14274, 14275, 14276, 14277] */
function _fun107977(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14466:6, offset: 0x02310f31, size: 281 bytes, params: 8, frame: 23
var propertyName;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/index.tsx');
for (propertyName in require(14270) /* metro dependency 14270: types */) {
exports[propertyName] = (require(14270) /* metro dependency 14270: types */)[propertyName];
}
const FRAME_BUDGET_MS = (require(14271) /* metro dependency 14271: startFrameMonitor */).FRAME_BUDGET_MS;
exports.FRAME_BUDGET_MS = FRAME_BUDGET_MS;
exports.startFrameMonitor = (require(14271) /* metro dependency 14271: startFrameMonitor */).startFrameMonitor;
exports.useMountTimer = importDefault(14272) /* metro dependency 14272: useMountTimer */;
exports.useFrameMonitor = importDefault(14273) /* metro dependency 14273: useFrameMonitor */;
exports.useBenchmarkResults = importDefault(14274) /* metro dependency 14274: useBenchmarkResults */;
exports.BenchmarkResultsList = importDefault(14275) /* metro dependency 14275: BenchmarkResultsList */;
exports.ScrollBenchmark = importDefault(14276) /* metro dependency 14276: ScrollBenchmark */;
exports.MountMeasure = importDefault(14277) /* metro dependency 14277: MountMeasure */;
}
@@ -0,0 +1,51 @@
/* Metro module 14271; source: modules/devtools/native/components/screens/performance/startFrameMonitor.tsx; dependencies: [2] */
function _fun107979(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14468:6, offset: 0x0231106f, size: 103 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/startFrameMonitor.tsx');
exports.FRAME_BUDGET_MS = 16.666666666666668;
exports.startFrameMonitor = function() {
var env0_0 = 0;
var env0_1 = global.performance.now();
var env0_2 = false;
var env0_3 = 0;
var env0_4 = 0;
var env0_5 = 0;
var env0_6 = 0;
var env0_7 = false;
var closure = _fun107981;
var env0_8 = closure;
env0_0 = (0, global.requestAnimationFrame)(closure);
return {stop: _fun107982};
};
}
function startFrameMonitor() { // fn#107980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14468:267, offset: 0x023110d6, size: 99 bytes, params: 1, frame: 13
const env0_1 = global.performance.now();
const env0_0 = global.requestAnimationFrame(tick);
return {stop: stop_107982};
}
function tick() { // fn#107981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14468:355, owner: startFrameMonitor.tick, offset: 0x02311139, size: 135 bytes, params: 1, frame: 14
var value3;
if (env0_2) {
value3 = global.performance.now() - env0_1;
env0_3 += 1;
env0_6 += value3;
if (value3 > env0_5) {
}
if (value3 > 16.666666666666668) {
env0_4 += 1;
}
}
env0_0 = global.requestAnimationFrame(tick);
}
function startFrameMonitorStop() { // fn#107982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14468:521, owner: startFrameMonitor.stop, offset: 0x023111c0, size: 96 bytes, params: 1, frame: 13
if (!env0_7) {
global.cancelAnimationFrame(env0_0);
}
const value2 = 0;
return {frames: env0_3, dropped: env0_4, meanMs: env0_3 > value2 ? env0_6 / env0_3 : value2, worstMs: env0_5};
}
@@ -0,0 +1,5 @@
/* Metro module 14270; source: modules/devtools/native/components/screens/performance/types.tsx; dependencies: [2] */
function _fun107978(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14467:6, offset: 0x0231104a, size: 37 bytes, params: 8, frame: 12
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/types.tsx');
}
@@ -0,0 +1,64 @@
/* Metro module 14274; source: modules/devtools/native/components/screens/performance/useBenchmarkResults.tsx; dependencies: [57, 31, 2] */
function _fun107995(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:6, offset: 0x02311631, size: 125 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
const env0_1 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/useBenchmarkResults.tsx');
exports.default = useBenchmarkResults;
}
function useBenchmarkResults() { // fn#107996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:238, offset: 0x023116ae, size: 159 bytes, params: 1, frame: 15
const binding = env0_1;
const value = env0_0(binding.useState([]), 2);
const property = value[0];
var env0_0 = value[1];
var env0_1 = binding.useRef(0);
const object2 = {results: property};
object2.addMount = binding.useCallback(_fun107997, []);
object2.addScroll = binding.useCallback(function(a0) {
a0(_fun108000);
}, []);
object2.clear = binding.useCallback(_fun108001, []);
return object2;
}
function _fun107997(a0, a1) { // fn#107997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:368, offset: 0x0231174d, size: 39 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_0(_fun107998);
}
function _fun107999(a0) { // fn#107999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:472, offset: 0x023117c5, size: 32 bytes, params: 2, frame: 11
a0(_fun108000);
}
function _fun108001() { // fn#108001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:554, offset: 0x02311830, size: 20 bytes, params: 1, frame: 11
return env0_0([]);
}
function _fun107998(a0) { // fn#107998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:379, offset: 0x02311774, size: 81 bytes, params: 2, frame: 14
let value = environment.__proto__;
const binding = env1_1;
const current = binding.current;
value = typeof current === 'bigint' ? current : +current;
binding.current = typeof value === 'bigint' ? value + 1n : +value + 1;
const items2 = [{kind: 'mount', id: value, label: env0_0, elapsedMs: require}];
arraySpread(items2, a0, 1, binding);
return items2;
}
function _fun108000(a0) { // fn#108000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:479, offset: 0x023117e5, size: 75 bytes, params: 2, frame: 14
const object2 = {kind: 'scroll'};
let value = environment.__proto__;
const binding = env1_1;
const current = binding.current;
value = typeof current === 'bigint' ? current : +current;
binding.current = typeof value === 'bigint' ? value + 1n : +value + 1;
object2.id = value;
copyDataProperties(object2, env0_0, undefined);
const items2 = [object2];
arraySpread(items2, a0, 1, binding);
return items2;
}
@@ -0,0 +1,60 @@
/* Metro module 14273; source: modules/devtools/native/components/screens/performance/useFrameMonitor.tsx; dependencies: [57, 31, 14271, 2] */
function _fun107988(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14470:6, offset: 0x02311414, size: 133 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/useFrameMonitor.tsx');
exports.default = useFrameMonitor;
}
function useFrameMonitor(a0) { // fn#107989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14470:234, offset: 0x02311499, size: 200 bytes, params: 2, frame: 16
const env0_0 = a0;
const binding = env0_3;
let value = env0_2(binding.useState(false), 2);
const property = value[0];
const env0_1 = value[1];
var env0_2 = binding.useRef(null);
var env0_3 = binding.useRef(a0);
binding.useEffect(_fun107990, [a0]);
value = binding.useCallback(_fun107991, []);
const value3 = binding.useCallback(_fun107992, []);
binding.useEffect(function() {
return _fun107994;
}, []);
return {monitoring: property, start: value, stop: value3};
}
function _fun107991() { // fn#107991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14470:395, offset: 0x02311561, size: 86 bytes, params: 1, frame: 13
const current = env0_2.current;
if (current != null) {
current.stop();
}
env0_2.current = (require(14271) /* metro dependency 14271: startFrameMonitor */).startFrameMonitor();
env0_1(true);
}
function _fun107992() { // fn#107992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14470:503, offset: 0x023115b7, size: 69 bytes, params: 1, frame: 13
var value2;
const current = env0_2.current;
if (current != null) {
env0_2.current = null;
value2 = current.stop();
env0_1(false);
env0_3.current(value2);
}
}
function _fun107993() { // fn#107993, offset: 0x023115fc, size: 11 bytes, params: 1, frame: 1
return _fun107994;
}
function _fun107994() { // fn#107994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14470:616, offset: 0x02311607, size: 42 bytes, params: 1, frame: 11
const current = env1_2.current;
if (current != null) {
current.stop();
}
env1_2.current = null;
}
@@ -0,0 +1,53 @@
/* Metro module 14272; source: modules/devtools/native/components/screens/performance/useMountTimer.tsx; dependencies: [57, 31, 2] */
function _fun107983(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14469:6, offset: 0x02311220, size: 125 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
const env0_1 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/useMountTimer.tsx');
exports.default = useMountTimer;
}
function useMountTimer() { // fn#107984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14469:232, offset: 0x0231129d, size: 185 bytes, params: 1, frame: 16
const binding = env0_1;
const value = env0_0(binding.useState(null), 2);
const property = value[0];
var env0_0 = value[1];
var env0_1 = binding.useRef(0);
const env0_2 = binding.useRef(0);
const env0_3 = binding.useRef(null);
const object2 = {run: property};
object2.begin = binding.useCallback(_fun107985, []);
object2.measure = binding.useCallback(_fun107986, []);
object2.cancel = binding.useCallback(_fun107987, []);
return object2;
}
function _fun107985(a0) { // fn#107985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14469:382, offset: 0x02311356, size: 90 bytes, params: 2, frame: 13
const binding = env0_1;
const value2 = binding.current + 1;
binding.current = value2;
env0_3.current = value2;
env0_2.current = global.performance.now();
env0_0({batchKey: value2, params: a0});
}
function _fun107986(a0) { // fn#107986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14469:510, offset: 0x023113b0, size: 65 bytes, params: 2, frame: 12
var r0;
const current = env0_3.current;
const value2 = null;
if (a0 !== current) {
r0 = value2;
} else {
env0_3.current = value2;
r0 = global.performance.now() - env0_2.current;
}
return r0;
}
function _fun107987(a0) { // fn#107987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14469:604, offset: 0x023113f1, size: 35 bytes, params: 2, frame: 3
if (a0 === env0_3.current) {
env0_3.current = null;
}
}
@@ -0,0 +1,283 @@
/* Metro module 13123; source: modules/devtools/native/useSortedDevToolsScreens.tsx; dependencies: [57, 7111, 13124, 13126, 566, 2] */
function _fun100290(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13313:6, offset: 0x021e399e, size: 176 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_100293 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const devToolsSettingsStore = importDefault(7111) /* metro dependency 7111: DevToolsSettingsStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/useSortedDevToolsScreens.tsx');
exports.default = function() {
return getSortedDevToolsScreens(require(dependencyMap[4]).useStateFromStores([DevToolsSettingsStore],
_fun100298));
};
exports.updateSortOrder = updateSortOrder;
}
function _createForOfIteratorHelperLoose_100291(a0, a1) { // fn#100291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13313:120, offset: 0x021e3a4e, 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)) {
if (r1) {
}
return _fun100292;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_100293(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') {
value = _arrayLikeToArray_100293(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_100293(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun100292;
}
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 getSortedDevToolsScreens() { // fn#100294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13313:1030, offset: 0x021e3bc2, size: 113 bytes, params: 1, frame: 15
let value = a0;
const env0_0 = value !== undefined ? value : DevToolsSettingsStore.sortedScreenKeys;
const Object = global.Object;
const entries = Object.entries;
const DevToolsScreens = (require(13124) /* metro dependency 13124: DevToolsScreens */).DevToolsScreens;
value = Reflect.apply(entries, Object, [DevToolsScreens]);
value = value.filter(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 = r3.predicate == null || r3.predicate();
return r3;
});
return value.sort(_fun100296);
}
function useSortedDevToolsScreens() { // fn#100297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13313:1384, offset: 0x021e3d2f, size: 68 bytes, params: 1, frame: 15
const getSortedDevToolsScreensBinding = getSortedDevToolsScreens;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
return getSortedDevToolsScreensBinding(Reflect.apply(useStateFromStores, fluxModule, [[DevToolsSettingsStore],
function() {
return DevToolsSettingsStore.sortedScreenKeys;
}]));
}
function updateSortOrder(a0, a1) { // fn#100299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13313:1531, offset: 0x021e3d82, size: 242 bytes, params: 3, frame: 20
var r3;
var value4;
var property;
var includes;
var value5;
const sortedScreenKeys = DevToolsSettingsStore.sortedScreenKeys;
const items2 = [];
arraySpread(items2, sortedScreenKeys, 0, undefined);
const value2 = _createForOfIteratorHelperLoose_100291(getSortedDevToolsScreens());
const value3 = value2();
let done = value3.done;
if (!done) {
r3 = value3;
while (true) {
value4 = r3.value;
property = env0_2(value4, 1)[0];
includes = items2.includes;
if (!Reflect.apply(includes, items2, [property])) {
items2.push(property);
}
value5 = value2();
done = value5.done;
if (done) {
break;
}
r3 = value5;
continue;
}
}
const value6 = items2.indexOf(a0);
if (a1 === 'up') {
property = items2[value6];
items2[value6] = items2[value6 - 1];
items2[value6 - 1] = property;
} else if (a1 === 'down') {
property = items2[value6];
items2[value6] = items2[value6 + 1];
items2[value6 + 1] = property;
}
const value = require(13126) /* metro dependency 13126: DevToolsActionCreators */;
value.updateDevToolsSettings({sortedScreenKeys: items2});
}
function _fun100296(a0, a1) { // fn#100296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13313:1191, offset: 0x021e3ca9, size: 134 bytes, params: 3, frame: 14
var r1;
var r0;
let iterator = a0[Symbol.iterator]();
let item2 = iterator.next();
let item = item2.value;
item2 = item2.done ? undefined : iterator;
let value = undefined;
const value2 = item2 === value;
const r3 = value2 ? value : item;
if (!value2) {
item2.return();
}
iterator = a1[Symbol.iterator]();
let item3 = iterator.next();
item = item3.value;
item3 = item3.done ? undefined : iterator;
const value3 = item3 === value;
let r2 = value3 ? value : item;
if (!value3) {
item3.return();
}
const binding = env0_0;
value = binding.indexOf(r3);
const value4 = binding.indexOf(r2);
const value5 = -1;
const value6 = value5 === value;
if (value6) {
if (value5 === value4) {
r0 = 0;
} else {
if (value6) {
r1 = 1;
} else {
if (value5 === value4) {
r2 = value5;
} else {
value -= value4;
r2 = value;
}
r1 = r2;
}
r0 = r1;
}
} else {
if (value6) {
r1 = 1;
} else {
if (value5 === value4) {
r2 = value5;
} else {
value -= value4;
r2 = value;
}
r1 = r2;
}
r0 = r1;
}
return r0;
}