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

No files matched your search

@@ -1,16 +1,17 @@
/* Metro module 13317; source: modules/user_settings/account/MFAUtils.tsx; dependencies: [1867, 3784, 1878, 661, 1244, 632, 8980, 2] */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun101456(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:6, offset: 0x02215726, size: 277 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_5 = constantsModule.GuildFeatures;
const env0_6 = constantsModule.Permissions;
const env0_7 = constantsModule.UserFlags;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/MFAUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/MFAUtils.tsx');
exports.getSMSBackupDisabledMessage = getSMSBackupDisabledMessage;
exports.useIsMFAEnabled = function() {
return require(dependencyMap[5]).useStateFromStores([UserStore], _fun101459);
@@ -19,78 +20,79 @@ function _fun101456(global, require, importDefault, importAll, module, exports,
UNAVAILABLE_UNVERIFIED: 'unavailable_unverified'};
exports.useMFAAvailability = useMFAAvailability;
exports.use2FARemoveDisableReason = use2FARemoveDisableReason;
}
function getSMSBackupDisabledMessage(a0) { // fn#101457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:444, offset: 0x0221583b, size: 327 bytes, params: 2, frame: 18
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
let value = a1;
const r2 = value !== undefined ? value : false;
value = null;
return value == a0 ? value : a0.hasAnyStaffLevel() ? r2 ? intl.string(t.YJGvuD) : intl.string(t['3iKih7']) : a0.hasFlag(UserFlags.PARTNER) ? r2 ? intl.string(t['9UucjT']) : intl.string(t.Sq6Q1u) : value == a0.email ? r2 ? intl.string(t['9VWpT9']) : intl.string(t.LfCBZG) : value;
}
function useIsMFAEnabled() { // fn#101458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:832, offset: 0x02215982, size: 59 bytes, params: 1, frame: 13
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore], _fun101459);
}
function useMFAAvailability() { // fn#101460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:1002, offset: 0x022159de, size: 123 bytes, params: 1, frame: 17
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
return (require(8980) /* metro dependency 8980: MFAUtils */).hasCrypto ? Reflect.apply(useStateFromStores,
useStateFromStoresModule, [[UserStore],
_fun101461]) === false ? env0_8.UNAVAILABLE_UNVERIFIED : env0_8.AVAILABLE : env0_8.UNAVAILABLE_NO_CRYPTO;
}
function use2FARemoveDisableReason() { // fn#101462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:1260, offset: 0x02215a7c, size: 88 bytes, params: 1, frame: 15
const value = a0;
const env0_0 = value !== undefined ? value : false;
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildStore,
PermissionStore, UserStore], _fun101463);
}
function _fun101459() { // fn#101459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:898, offset: 0x022159bd, size: 33 bytes, params: 1, frame: 10
let value = environment.__proto__;
value = UserStore.getCurrentUser();
return value != null && value.mfaEnabled;
}
function _fun101461() { // fn#101461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:1070, offset: 0x02215a59, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.verified;
}
function _fun101463() { // fn#101463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:1344, offset: 0x02215ad4, size: 253 bytes, params: 1, frame: 17
var environment;
var r0;
var guildsArray;
var binding;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value = environment.__proto__;
const currentUser = UserStore.getCurrentUser();
const value3 = null;
if (value3 == currentUser) {
guildsArray = GuildStore.getGuildsArray();
r0 = guildsArray.some(_fun101464) ? env0_0 ? intl.string(t.OYTCUh) : intl.string(t.HC8uSZ) : value3;
} else if (currentUser.hasAnyStaffLevel()) {
binding = env0_0;
string = intl.string;
r0 = binding ? Reflect.apply(string, intl, [t.hxf9fX]) : Reflect.apply(string, intl, [t['3iKih7']]);
} else {
guildsArray = GuildStore.getGuildsArray();
r0 = guildsArray.some(_fun101464) ? env0_0 ? intl.string(t.OYTCUh) : intl.string(t.HC8uSZ) : value3;
function getSMSBackupDisabledMessage(a0) { // fn#101457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:444, offset: 0x0221583b, size: 327 bytes, params: 2, frame: 18
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
let value = a1;
const r2 = value !== undefined ? value : false;
value = null;
return value == a0 ? value : a0.hasAnyStaffLevel() ? r2 ? intl.string(t.YJGvuD) : intl.string(t['3iKih7']) : a0.hasFlag(UserFlags.PARTNER) ? r2 ? intl.string(t['9UucjT']) : intl.string(t.Sq6Q1u) : value == a0.email ? r2 ? intl.string(t['9VWpT9']) : intl.string(t.LfCBZG) : value;
}
return r0;
}
function _fun101464(a0) { // fn#101464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:1519, offset: 0x02215bd1, size: 63 bytes, params: 2, frame: 14
const features = a0.features;
const has = features.has;
const value = environment.__proto__.__proto__;
const ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE = GuildFeatures.ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE;
return Reflect.apply(has, features,
[ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE]) && PermissionStore.can(Permissions.ADMINISTRATOR, a0);
function useIsMFAEnabled() { // fn#101458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:832, offset: 0x02215982, size: 59 bytes, params: 1, frame: 13
return (UseStateFromStoresModule).useStateFromStores([UserStore], _fun101459);
function _fun101459() { // fn#101459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:898, offset: 0x022159bd, size: 33 bytes, params: 1, frame: 10
let value = environment.__proto__;
value = UserStore.getCurrentUser();
return value != null && value.mfaEnabled;
}
}
function useMFAAvailability() { // fn#101460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:1002, offset: 0x022159de, size: 123 bytes, params: 1, frame: 17
const useStateFromStores = UseStateFromStoresModule.useStateFromStores;
return (require(8980) /* metro dependency 8980: MFAUtils */).hasCrypto ? Reflect.apply(useStateFromStores,
UseStateFromStoresModule, [[UserStore],
_fun101461]) === false ? env0_8.UNAVAILABLE_UNVERIFIED : env0_8.AVAILABLE : env0_8.UNAVAILABLE_NO_CRYPTO;
function _fun101461() { // fn#101461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:1070, offset: 0x02215a59, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.verified;
}
}
function use2FARemoveDisableReason() { // fn#101462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:1260, offset: 0x02215a7c, size: 88 bytes, params: 1, frame: 15
const value = a0;
const env0_0 = value !== undefined ? value : false;
return (UseStateFromStoresModule).useStateFromStores([GuildStore,
PermissionStore, UserStore], _fun101463);
function _fun101463() { // fn#101463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:1344, offset: 0x02215ad4, size: 253 bytes, params: 1, frame: 17
var environment;
var r0;
var guildsArray;
var binding;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
const value = environment.__proto__;
const currentUser = UserStore.getCurrentUser();
const value3 = null;
if (value3 == currentUser) {
guildsArray = GuildStore.getGuildsArray();
r0 = guildsArray.some(_fun101464) ? env0_0 ? intl.string(t.OYTCUh) : intl.string(t.HC8uSZ) : value3;
} else if (currentUser.hasAnyStaffLevel()) {
binding = env0_0;
string = intl.string;
r0 = binding ? Reflect.apply(string, intl, [t.hxf9fX]) : Reflect.apply(string, intl, [t['3iKih7']]);
} else {
guildsArray = GuildStore.getGuildsArray();
r0 = guildsArray.some(_fun101464) ? env0_0 ? intl.string(t.OYTCUh) : intl.string(t.HC8uSZ) : value3;
}
return r0;
function _fun101464(a0) { // fn#101464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13507:1519, offset: 0x02215bd1, size: 63 bytes, params: 2, frame: 14
const features = a0.features;
const has = features.has;
const value = environment.__proto__.__proto__;
const ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE = GuildFeatures.ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE;
return Reflect.apply(has, features,
[ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE]) && PermissionStore.can(Permissions.ADMINISTRATOR, a0);
}
}
}
}
global.__d(_fun101456, 13317, [1867, 3784, 1878, 661, 1244, 632, 8980,
2]) /* metro module 13317, dependencies: [1867, 3784, 1878, 661, 1244, 632, 8980, 2] */;
@@ -1,21 +1,36 @@
/* Metro module 13299; source: modules/user_settings/account/native/AccountEditPassword.tsx; dependencies: [31, 27, 33, 4501, 697, 13300, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserSettingsAccountEditPassword from './UserSettingsAccountEditPassword.tsx'; /* Metro dependency 13300 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun101367(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13489:6, offset: 0x02211d0c, size: 245 bytes, params: 8, frame: 23
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_2 = value2.View;
const StyleSheet = value2.StyleSheet;
const env0_3 = (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;
copyDataProperties(object, StyleSheet.absoluteFillObject, undefined);
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{container: object}]);
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [{container: object2}]);
value = value.memo(_fun101368);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/AccountEditPassword.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/AccountEditPassword.tsx');
exports.default = value;
function _fun101368() { // fn#101368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13489:277, offset: 0x02211e01, size: 72 bytes, params: 1, frame: 16
const styles = useStyles();
return (
<View style={styles.container}>
{((Component) => <Component />)(UserSettingsAccountEditPassword)}
</View>
);
}
}
global.__d(_fun101367, 13299, [31, 27, 33, 4501, 697, 13300,
2]) /* metro module 13299, dependencies: [31, 27, 33, 4501, 697, 13300, 2] */;
@@ -1,60 +1,74 @@
/* Metro module 9023; source: modules/user_settings/account/native/SMSBackupWarningAlert.tsx; dependencies: [31, 33, 4501, 4596, 1244, 4496, 4573, 2] */
import AlertActionCreators from '../../../../actions/native/AlertActionCreators.tsx'; /* Metro dependency 4496 */
import Alert from '../../../../components_native/common/Alert.tsx'; /* Metro dependency 4596 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun70194(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9208:6, offset: 0x01cf2242, size: 203 bytes, params: 8, frame: 20
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_3 = value.jsx;
const env0_4 = value.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({title: {textAlign: 'center'},
ReactModule;
const env0_5 = (CreateStylesModule).createStyles({title: {textAlign: 'center'},
body: {'marginTop': 8, 'textAlign': 'center', 'lineHeight': 18}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/SMSBackupWarningAlert.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/SMSBackupWarningAlert.tsx');
exports.default = SMSBackupWarningAlert;
}
function SMSBackupWarningAlert({onConfirm}) { // fn#70195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9208:342, offset: 0x01cf230d, size: 404 bytes, params: 2, frame: 24
const styles = useStyles();
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.cancelText = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']]);
string = intl.string;
const N86XcP = (require(1244) /* metro dependency 1244: indexNative */).t.N86XcP;
object2.confirmText = Reflect.apply(string, intl, [N86XcP]);
object2.onConfirm = onConfirm;
object2.onCancel = onCancel;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
const Ed4XQB = (require(1244) /* metro dependency 1244: indexNative */).t.Ed4XQB;
const text = <Text style={styles.title} accessibilityRole="header" variant="heading-lg/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [Ed4XQB])}</Text>;
string = intl.string;
const EDU2Eg = (require(1244) /* metro dependency 1244: indexNative */).t.EDU2Eg;
return (
<Alert {...object2}>
{text}
function SMSBackupWarningAlert({onConfirm}) { // fn#70195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9208:342, offset: 0x01cf230d, size: 404 bytes, params: 2, frame: 24
const styles = useStyles();
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.cancelText = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']]);
string = intl.string;
const N86XcP = (require(1244) /* metro dependency 1244: indexNative */).t.N86XcP;
object.confirmText = Reflect.apply(string, intl, [N86XcP]);
object.onConfirm = onConfirm_70196;
object.onCancel = onCancel_70197;
const Text = (TextModule).Text;
string = intl.string;
const Ed4XQB = (require(1244) /* metro dependency 1244: indexNative */).t.Ed4XQB;
const text = (
<Text
style={styles.body}
variant="text-sm/medium"
color="text-default"
style={styles.title}
accessibilityRole="header"
variant="heading-lg/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [EDU2Eg])}
{Reflect.apply(string, intl, [Ed4XQB])}
</Text>
</Alert>
);
}
);
string = intl.string;
const EDU2Eg = (require(1244) /* metro dependency 1244: indexNative */).t.EDU2Eg;
return (
<Alert {...object}>
{text}
<Text
style={styles.body}
variant="text-sm/medium"
color="text-default"
>
{Reflect.apply(string, intl, [EDU2Eg])}
</Text>
</Alert>
);
function SMSBackupWarningAlertOnConfirm() { // fn#70196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9208:528, owner: SMSBackupWarningAlert.onConfirm, offset: 0x01cf24a1, size: 48 bytes, params: 1, frame: 12
onConfirm();
const value = environment.__proto__;
(AlertActionCreators).close();
}
function SMSBackupWarningAlertOnConfirm() { // fn#70196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9208:528, owner: SMSBackupWarningAlert.onConfirm, offset: 0x01cf24a1, size: 48 bytes, params: 1, frame: 12
onConfirm();
const value = environment.__proto__;
(importDefault(4496) /* metro dependency 4496: AlertActionCreators */).close();
}
function SMSBackupWarningAlertOnCancel() { // fn#70197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9208:569, owner: SMSBackupWarningAlert.onCancel, offset: 0x01cf24d1, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (AlertActionCreators).close();
}
}
function SMSBackupWarningAlertOnCancel() { // fn#70197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9208:569, owner: SMSBackupWarningAlert.onCancel, offset: 0x01cf24d1, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(4496) /* metro dependency 4496: AlertActionCreators */).close();
}
global.__d(_fun70194, 9023, [31, 33, 4501, 4596, 1244, 4496, 4573,
2]) /* metro module 9023, dependencies: [31, 33, 4501, 4596, 1244, 4496, 4573, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 11471; source: modules/user_settings/account/native/SettingsAccountConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun87822(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11657:6, offset: 0x01fcc6de, size: 100 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/SettingsAccountConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/SettingsAccountConstants.tsx');
exports.AccountSettingsTabs = {SECURITY: 'SECURITY', STANDING: 'STANDING'};
}
global.__d(_fun87822, 11471, [2]) /* metro module 11471, dependencies: [2] */;
@@ -1,121 +1,150 @@
/* Metro module 13269; source: modules/user_settings/account/native/SettingsAccountHeader.tsx; dependencies: [31, 27, 3793, 1878, 661, 6263, 33, 4501, 697, 13270, 1244, 7007, 566, 9011, 8953, 6238, 4578, 2] */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import EmailVerificationModalActionCreators from '../../../../actions/native/EmailVerificationModalActionCreators.tsx'; /* Metro dependency 8953 */
import SafetySettingsNotice from '../../../safety_common/native/SafetySettingsNotice.tsx'; /* Metro dependency 13270 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as ConstantsModule2 from '../../../safety_common/Constants.tsx'; /* Metro dependency 6263 */
import * as UserSettingsAccountUnverifiedHeaderModule from './UserSettingsAccountUnverifiedHeader.tsx'; /* Metro dependency 9011 */
function _fun101181(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13459:6, offset: 0x0220a89d, size: 355 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_4 = (require(27) /* metro dependency 27 */).View;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticsSections;
const env0_8 = (require(6263) /* metro dependency 6263: Constants */).SafetySettingsNoticeType;
const value2 = require(33) /* metro dependency 33 */;
const env0_9 = value2.jsx;
const env0_10 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.paddingTop = PX_24;
object2.paddingTop = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.gap = PX_24;
const env0_11 = Reflect.apply(createStyles, createStylesModule, [{header: object}]);
object2.gap = PX_24;
const env0_11 = Reflect.apply(createStyles, CreateStylesModule, [{header: object2}]);
value = value.memo(_fun101184);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/SettingsAccountHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/SettingsAccountHeader.tsx');
exports.default = value;
}
function RestrictedAccountRedirect() { // fn#101182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13459:321, offset: 0x0220aa00, size: 101 bytes, params: 1, frame: 17
const zqv4nV = (IndexNativeModule).t.zqv4nV;
const RESTRICTED_ACCOUNTS_SETTING_NOTICE = SafetySettingsNoticeType.RESTRICTED_ACCOUNTS_SETTING_NOTICE;
return (
<SafetySettingsNotice
label={zqv4nV}
labelHook={function() {
require(dependencyMap[11]).openUserSettings({screen: AnalyticsSections.SETTINGS_CONTENT_AND_SOCIAL});
}}
noticeType={RESTRICTED_ACCOUNTS_SETTING_NOTICE}
/>
);
}
function RestrictedAccountRedirect() { // fn#101182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13459:321, offset: 0x0220aa00, size: 101 bytes, params: 1, frame: 17
const SafetySettingsNotice = importDefault(13270) /* metro dependency 13270: SafetySettingsNotice */;
const zqv4nV = (require(1244) /* metro dependency 1244: indexNative */).t.zqv4nV;
const RESTRICTED_ACCOUNTS_SETTING_NOTICE = SafetySettingsNoticeType.RESTRICTED_ACCOUNTS_SETTING_NOTICE;
return (
<SafetySettingsNotice
label={zqv4nV}
labelHook={function() {
require(dependencyMap[11]).openUserSettings({screen: AnalyticsSections.SETTINGS_CONTENT_AND_SOCIAL});
}}
noticeType={RESTRICTED_ACCOUNTS_SETTING_NOTICE}
/>
);
}
function _fun101184() { // fn#101184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13459:546, offset: 0x0220aa9c, size: 379 bytes, params: 1, frame: 25
var r6;
var r0;
var items2;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var object;
var title;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var object4;
var button;
const styles = useStyles();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const bannerText = (require(9011) /* metro dependency 9011: UserSettingsAccountUnverifiedHeader */).getBannerText(currentUser);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], function() {
return RelationshipStore.getBlockedOrIgnoredIDs().length > 0;
});
const value4 = env0_3.useCallback(_fun101187, []);
const value5 = null;
if (value5 != bannerText) {
var viewBindingProps = {style: styles.header};
items2 = [value3 ? <RestrictedAccountRedirect /> : value5];
function _fun101184() { // fn#101184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13459:546, offset: 0x0220aa9c, size: 379 bytes, params: 1, frame: 25
var r6;
var r0;
var items2;
const TableRow = (TableRowNativeModule).TableRow;
var object2;
var title;
const Button = (ButtonNativeModule).Button;
var object3;
var button;
const styles = useStyles();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const bannerText = (UserSettingsAccountUnverifiedHeaderModule).getBannerText(currentUser);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], function() {
return RelationshipStore.getBlockedOrIgnoredIDs().length > 0;
});
const value4 = env0_3.useCallback(_fun101187, []);
const value5 = null;
if (value5 != bannerText) {
object = {onPress: value4, variant: 'danger'};
title = bannerText.title;
object.label = title;
title = bannerText.title;
object.accessibilityLabel = title;
object4 = {};
button = bannerText.button;
object4.text = button;
button = bannerText.button;
object4.accessibilityLabel = button;
object4.onPress = value4;
object.trailing = <Button {...object4} />;
object.start = true;
object.end = true;
r6 = <TableRow {...object} />;
var viewBindingProps = {style: styles.header};
items2 = [
value3
? (
<RestrictedAccountRedirect />
)
: value5,
];
if (value5 != bannerText) {
object2 = {onPress: value4, variant: 'danger'};
title = bannerText.title;
object2.label = title;
title = bannerText.title;
object2.accessibilityLabel = title;
object3 = {};
button = bannerText.button;
object3.text = button;
button = bannerText.button;
object3.accessibilityLabel = button;
object3.onPress = value4;
object2.trailing = <Button {...object3} />;
object2.start = true;
object2.end = true;
r6 = <TableRow {...object2} />;
} else {
r6 = value5;
}
items2[1] = r6;
r0 = (
<View {...viewBindingProps}>
{items2}
</View>
);
} else if (value3) {
var viewBindingProps = {style: styles.header};
items2 = [
value3
? (
<RestrictedAccountRedirect />
)
: value5,
];
if (value5 != bannerText) {
object2 = {onPress: value4, variant: 'danger'};
title = bannerText.title;
object2.label = title;
title = bannerText.title;
object2.accessibilityLabel = title;
object3 = {};
button = bannerText.button;
object3.text = button;
button = bannerText.button;
object3.accessibilityLabel = button;
object3.onPress = value4;
object2.trailing = <Button {...object3} />;
object2.start = true;
object2.end = true;
r6 = <TableRow {...object2} />;
} else {
r6 = value5;
}
items2[1] = r6;
r0 = (
<View {...viewBindingProps}>
{items2}
</View>
);
} else {
r6 = value5;
r0 = value5;
}
items2[1] = r6;
r0 = <View {...viewBindingProps}>{items2}</View>;
} else if (value3) {
var viewBindingProps = {style: styles.header};
items2 = [value3 ? <RestrictedAccountRedirect /> : value5];
if (value5 != bannerText) {
object = {onPress: value4, variant: 'danger'};
title = bannerText.title;
object.label = title;
title = bannerText.title;
object.accessibilityLabel = title;
object4 = {};
button = bannerText.button;
object4.text = button;
button = bannerText.button;
object4.accessibilityLabel = button;
object4.onPress = value4;
object.trailing = <Button {...object4} />;
object.start = true;
object.end = true;
r6 = <TableRow {...object} />;
} else {
r6 = value5;
return r0;
function _fun101187() { // fn#101187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13459:749, offset: 0x0220ac35, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(EmailVerificationModalActionCreators).open();
}
items2[1] = r6;
r0 = <View {...viewBindingProps}>{items2}</View>;
} else {
r0 = value5;
}
return r0;
}
function _fun101187() { // fn#101187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13459:749, offset: 0x0220ac35, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(8953) /* metro dependency 8953: EmailVerificationModalActionCreators */).open();
}
global.__d(_fun101181, 13269, [31, 27, 3793, 1878, 661, 6263, 33, 4501, 697, 13270, 1244, 7007, 566, 9011, 8953,
6238, 4578,
2]) /* metro module 13269, dependencies: [31, 27, 3793, 1878, 661, 6263, 33, 4501, 697, 13270, 1244, 7007, 566, 9011, 8953, 6238, 4578, 2] */;
@@ -1,226 +1,273 @@
/* Metro module 13242; source: modules/user_settings/account/native/SettingsAccountScreen.tsx; dependencies: [57, 31, 27, 13243, 8224, 11471, 661, 13244, 33, 4501, 697, 1484, 6239, 5475, 13245, 4573, 1244, 4578, 5080, 13246, 1962, 566, 13268, 8980, 5084, 6231, 9692, 13269, 13170, 13272, 7032, 8853, 683, 9221, 8861, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import FastImage from '../../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
import SettingLayout from '../../../settings/native/renderer/SettingLayout.tsx'; /* Metro dependency 13170 */
import WebAuthnStore from '../../../webauthn/WebAuthnStore.tsx'; /* Metro dependency 13243 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as CardNativeModule from '../../../../design/components/Card/native/Card.native.tsx'; /* Metro dependency 6239 */
import * as UseSettingNavigationRouteModule from '../../core/native/useSettingNavigationRoute.tsx'; /* Metro dependency 7032 */
import * as SettingsConstantsModule from '../../core/native/SettingsConstants.tsx'; /* Metro dependency 8224 */
import * as SegmentedControlStateNativeModule from '../../../../design/components/SegmentedControl/native/SegmentedControlState.native.tsx'; /* Metro dependency 8853 */
import * as SegmentedControlPagesNativeModule from '../../../../design/components/SegmentedControl/native/SegmentedControlPages.native.tsx'; /* Metro dependency 8861 */
import * as SegmentedControlNativeModule from '../../../../design/components/SegmentedControl/native/SegmentedControl.native.tsx'; /* Metro dependency 9221 */
import * as SettingBuildersModule from '../../../settings/native/renderer/SettingBuilders.tsx'; /* Metro dependency 9692 */
import * as SettingsAccountConstantsModule from './SettingsAccountConstants.tsx'; /* Metro dependency 11471 */
import * as WebAuthnConstantsModule from '../../../webauthn/WebAuthnConstants.tsx'; /* Metro dependency 13244 */
import * as Module13245Module from '../../../../by-id/module-13245.js'; /* Metro dependency 13245 */
import * as SettingsAccountUtilsModule from './SettingsAccountUtils.tsx'; /* Metro dependency 13268 */
import * as SafetyHubPageModule from '../../../safety_hub/native/SafetyHubPage.tsx'; /* Metro dependency 13272 */
function _fun100990(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:6, offset: 0x02204049, size: 572 bytes, params: 8, frame: 24
var object4;
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 */).View;
const webAuthnStore = importDefault(13243) /* metro dependency 13243: WebAuthnStore */;
const env0_7 = (require(8224) /* metro dependency 8224: SettingsConstants */).MobileSetting;
const env0_8 = (require(11471) /* metro dependency 11471: SettingsAccountConstants */).AccountSettingsTabs;
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_10 = (require(13244) /* metro dependency 13244: WebAuthnConstants */).WebAuthnScreens;
const value2 = require(33) /* metro dependency 33 */;
const env0_11 = value2.jsx;
const env0_12 = value2.jsxs;
const env0_13 = value2.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {'marginBottom': 16, 'borderColor': null, 'borderWidth': 1};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'marginBottom': 16, 'borderColor': null, 'borderWidth': 1};
const REDESIGN_INPUT_CONTROL_SELECTED = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_INPUT_CONTROL_SELECTED;
object5.borderColor = REDESIGN_INPUT_CONTROL_SELECTED;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object4.upsellPasswordless = object5;
object4.upsellImagePasswordless = {'height': '100%', 'width': '100%'};
const object6 = {};
object2.borderColor = REDESIGN_INPUT_CONTROL_SELECTED;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.upsellPasswordless = object2;
object.upsellImagePasswordless = {'height': '100%', 'width': '100%'};
const object3 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingHorizontal = PX_16;
object3.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingTop = PX_16;
object4.controlContainer = object6;
object4.pageContainer = {flex: 1};
object3.paddingTop = PX_16;
object.controlContainer = object3;
object.pageContainer = {flex: 1};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.standingPage = {paddingTop: PX_24};
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object4]);
object.standingPage = {paddingTop: PX_24};
const env0_14 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun101000);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/SettingsAccountScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/SettingsAccountScreen.tsx');
exports.default = value;
}
function PasswordlessUpsell() { // fn#100991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:667, offset: 0x02204285, size: 707 bytes, params: 1, frame: 40
const styles = useStyles();
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const view = <View style={{'width': 70,
'height': 70}}>{((Component) => <Component source={require(13245) /* metro dependency 13245 */} resizeMode="contain" style={styles.upsellImagePasswordless} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</View>;
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items2 = [<Heading variant="heading-lg/medium" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t['+Svv46']])}</Heading>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
const S0g2K9 = (require(1244) /* metro dependency 1244: indexNative */).t.S0g2K9;
items2[1] = <Text variant="text-md/normal" color="text-muted">{Reflect.apply(string, intl, [S0g2K9])}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View style={{flexDirection: 'row'}}><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.piGf5c)} onPress={onPress_100992} size="sm" /><View /></View>;
return (
<View style={styles.upsellPasswordless}>
<Card border="none" shadow="none">
<View style={{'flexDirection': 'row', 'gap': 8}}>
{view}
<View style={{flex: 1}}>
<View style={{'flexShrink': 1, 'width': '90%', 'gap': 8}}>
{items2}
function PasswordlessUpsell() { // fn#100991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:667, offset: 0x02204285, size: 707 bytes, params: 1, frame: 40
const styles = useStyles();
const env0_0 = (UseNavigationNativeModule).useNavigation();
const Card = (CardNativeModule).Card;
const view = (
<View style={{'width': 70, 'height': 70}}>
{((Component) => <Component source={Module13245Module} resizeMode="contain" style={styles.upsellImagePasswordless} />)(FastImage)}
</View>
);
const Heading = (TextModule).Heading;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items2 = [
<Heading variant="heading-lg/medium" color="mobile-text-heading-primary">
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['+Svv46']])}
</Heading>,
];
const Text = (TextModule).Text;
string = intl.string;
const S0g2K9 = (require(1244) /* metro dependency 1244: indexNative */).t.S0g2K9;
items2[1] = (
<Text variant="text-md/normal" color="text-muted">
{Reflect.apply(string, intl, [S0g2K9])}
</Text>
);
const Button = (ButtonNativeModule).Button;
items2[2] = (
<View style={{flexDirection: 'row'}}>
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.piGf5c)}
onPress={onPress_100992}
size="sm"
/>
<View />
</View>
);
return (
<View style={styles.upsellPasswordless}>
<Card border="none" shadow="none">
<View style={{'flexDirection': 'row', 'gap': 8}}>
{view}
<View style={{flex: 1}}>
<View style={{'flexShrink': 1, 'width': '90%', 'gap': 8}}>
{items2}
</View>
</View>
</View>
</View>
</Card>
</View>
);
}
function AccountTwoFALabel() { // fn#100993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:1603, offset: 0x022045b5, size: 333 bytes, params: 1, frame: 22
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
const value3 = env0_3(Reflect.apply(useStateFromStoresObject, fluxModule, [[WebAuthnStore], function() {
var items = [WebAuthnStore.hasCredentials];
items[1] = WebAuthnStore.hasFetchedCredentials();
return items;
}]), 2);
const property = value3[0];
const property2 = value3[1];
const value5 = env0_4.useMemo(_fun100995, [property2, property,
(require(13268) /* metro dependency 13268: SettingsAccountUtils */).useIsUserVerified()]);
env0_4.useEffect(_fun100996, [property2]);
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
const r6 = value5 && <PasswordlessUpsell />;
const TableRowGroupTitle = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroupTitle;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<>
{r6}
<TableRowGroupTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fuTmEJ)} />
</>
);
}
function AccountSecurityPage() { // fn#100997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:2036, offset: 0x0220479e, size: 72 bytes, params: 1, frame: 14
return ((Component) => <Component node={env0_4.useMemo(_fun100998,
[])} />)(importDefault(13170) /* metro dependency 13170: SettingLayout */);
}
function AccountStandingPage() { // fn#100999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:2706, offset: 0x022049b8, size: 51 bytes, params: 1, frame: 14
return ((Component) => <Component visible />)((require(13272) /* metro dependency 13272: SafetyHubPage */).default);
}
function _fun101000() { // fn#101000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:2799, offset: 0x022049eb, size: 601 bytes, params: 1, frame: 30
const value2 = undefined;
const styles = useStyles();
const binding = env0_4;
const value3 = 0;
const value5 = env0_3(binding.useState(value3), 2);
const property = value5[value3];
const value6 = 1;
const env0_0 = value5[value6];
const value7 = env0_4.useCallback(_fun101001, []);
const useSettingNavigationRouteModule = require(7032) /* metro dependency 7032: useSettingNavigationRoute */;
const useSettingNavigationRoute = useSettingNavigationRouteModule.useSettingNavigationRoute;
const params = Reflect.apply(useSettingNavigationRoute, useSettingNavigationRouteModule, []).params;
const initialTab = params == null ? value2 : params.initialTab;
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Am9YHi = (require(1244) /* metro dependency 1244: indexNative */).t.Am9YHi;
object.label = Reflect.apply(string, intl, [Am9YHi]);
const SECURITY = AccountSettingsTabs.SECURITY;
object.id = SECURITY;
object.page = <AccountSecurityPage />;
const items2 = [object];
const object4 = {};
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['00Sfl/']);
let STANDING = AccountSettingsTabs.STANDING;
object4.id = STANDING;
object4.page = <View style={styles.standingPage}><AccountStandingPage /></View>;
items2[1] = object4;
STANDING = AccountSettingsTabs.STANDING;
const value8 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [{items: items2,
pageWidth: property, defaultIndex: initialTab !== STANDING ? value3 : value6, onSetActiveIndex: function(a0) {
var defaultImport = importDefault(dependencyMap[32]);
var track = defaultImport.track;
var MY_ACCOUNT_PAGE_TAB_NAVIGATE = AnalyticEvents.MY_ACCOUNT_PAGE_TAB_NAVIGATE;
Reflect.apply(track, defaultImport, [MY_ACCOUNT_PAGE_TAB_NAVIGATE,
{target_tab_name: a0 === 0 ? AccountSettingsTabs.SECURITY : AccountSettingsTabs.STANDING}]);
}}]);
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
const SegmentedControl = (require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl;
const view = <View style={styles.controlContainer} onLayout={value7}><SegmentedControl state={value8} /></View>;
const SegmentedControlPages = (require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages;
return (
<>
{view}
<View style={styles.pageContainer}>
<SegmentedControlPages state={value8} />
</Card>
</View>
</>
);
}
);
function PasswordlessUpsellOnPress() { // fn#100992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:1459, owner: PasswordlessUpsell.onPress, offset: 0x02204548, size: 109 bytes, params: 1, frame: 16
const defaultImport = importDefault(dependencyMap[18]);
const pushLazy = defaultImport.pushLazy;
const value2 = require(dependencyMap[20])(dependencyMap[19], dependencyMap.paths);
const REGISTER = WebAuthnScreens.REGISTER;
Reflect.apply(pushLazy, defaultImport, [value2, {navigation: env0_0, initialRouteName: REGISTER, showNav: true}]);
}
function PasswordlessUpsellOnPress() { // fn#100992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:1459, owner: PasswordlessUpsell.onPress, offset: 0x02204548, size: 109 bytes, params: 1, frame: 16
const defaultImport = importDefault(dependencyMap[18]);
const pushLazy = defaultImport.pushLazy;
const value2 = require(dependencyMap[20])(dependencyMap[19], dependencyMap.paths);
const REGISTER = WebAuthnScreens.REGISTER;
Reflect.apply(pushLazy, defaultImport, [value2, {navigation: env0_0, initialRouteName: REGISTER, showNav: true}]);
}
function _fun100995() { // fn#100995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:1795, offset: 0x0220472b, size: 66 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(8980) /* metro dependency 8980: MFAUtils */).hasWebAuthn && env0_2 && env0_1 && !env0_0;
}
function _fun100996() { // fn#100996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:1860, offset: 0x0220476d, size: 49 bytes, params: 1, frame: 11
var value;
if (!env0_1) {
value = environment.__proto__;
value = require(5084) /* metro dependency 5084: WebAuthnActionCreators */;
value.fetchWebAuthnCredentials();
}
function AccountTwoFALabel() { // fn#100993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:1603, offset: 0x022045b5, size: 333 bytes, params: 1, frame: 22
const useStateFromStoresObject = FluxModule.useStateFromStoresObject;
const value3 = Module00057(Reflect.apply(useStateFromStoresObject, FluxModule, [[WebAuthnStore], function() {
var items = [WebAuthnStore.hasCredentials];
items[1] = WebAuthnStore.hasFetchedCredentials();
return items;
}]), 2);
const property = value3[0];
const property2 = value3[1];
const value5 = env0_4.useMemo(_fun100995, [property2, property,
(SettingsAccountUtilsModule).useIsUserVerified()]);
env0_4.useEffect(_fun100996, [property2]);
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
const r6 = value5 && <PasswordlessUpsell />;
const TableRowGroupTitle = (TableRowGroupNativeModule).TableRowGroupTitle;
const intl = (IndexNativeModule).intl;
return (
<>
{r6}
<TableRowGroupTitle title={intl.string((IndexNativeModule).t.fuTmEJ)} />
</>
);
function _fun100995() { // fn#100995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:1795, offset: 0x0220472b, size: 66 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(8980) /* metro dependency 8980: MFAUtils */).hasWebAuthn && env0_2 && env0_1 && !env0_0;
}
function _fun100996() { // fn#100996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:1860, offset: 0x0220476d, size: 49 bytes, params: 1, frame: 11
var value;
if (!env0_1) {
value = environment.__proto__;
value = require(5084) /* metro dependency 5084: WebAuthnActionCreators */;
value.fetchWebAuthnCredentials();
}
}
}
function AccountSecurityPage() { // fn#100997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:2036, offset: 0x0220479e, size: 72 bytes, params: 1, frame: 14
return ((Component) => <Component node={env0_4.useMemo(_fun100998,
[])} />)(SettingLayout);
function _fun100998() { // fn#100998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:2084, offset: 0x022047e6, size: 466 bytes, params: 1, frame: 22
const createList = SettingBuildersModule.createList;
const object = {};
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e262Nn);
const ACCOUNT_USERNAME = MobileSetting.ACCOUNT_USERNAME;
const ACCOUNT_DISPLAY_NAME = MobileSetting.ACCOUNT_DISPLAY_NAME;
const ACCOUNT_EMAIL = MobileSetting.ACCOUNT_EMAIL;
const ACCOUNT_PHONE = MobileSetting.ACCOUNT_PHONE;
const ACCOUNT_AGE_GROUP_ADULT = MobileSetting.ACCOUNT_AGE_GROUP_ADULT;
const ACCOUNT_AGE_GROUP_NON_ADULT = MobileSetting.ACCOUNT_AGE_GROUP_NON_ADULT;
const ACCOUNT_AGE_GROUP_ASSIGNED_ADULT = MobileSetting.ACCOUNT_AGE_GROUP_ASSIGNED_ADULT;
object2.settings = [ACCOUNT_USERNAME, ACCOUNT_DISPLAY_NAME, ACCOUNT_EMAIL, ACCOUNT_PHONE, ACCOUNT_AGE_GROUP_ADULT,
ACCOUNT_AGE_GROUP_NON_ADULT, ACCOUNT_AGE_GROUP_ASSIGNED_ADULT];
const items2 = [object2];
const object3 = {};
object3.label = <AccountTwoFALabel />;
const ACCOUNT_CHANGE_PASSWORD = MobileSetting.ACCOUNT_CHANGE_PASSWORD;
const ACCOUNT_WEB_AUTHN_VIEW = MobileSetting.ACCOUNT_WEB_AUTHN_VIEW;
const ACCOUNT_ENABLE_2FA = MobileSetting.ACCOUNT_ENABLE_2FA;
const ACCOUNT_VIEW_BACKUP_CODES = MobileSetting.ACCOUNT_VIEW_BACKUP_CODES;
const ACCOUNT_REMOVE_2FA = MobileSetting.ACCOUNT_REMOVE_2FA;
const ACCOUNT_SMS_BACKUP = MobileSetting.ACCOUNT_SMS_BACKUP;
object3.settings = [ACCOUNT_CHANGE_PASSWORD, ACCOUNT_WEB_AUTHN_VIEW, ACCOUNT_ENABLE_2FA, ACCOUNT_VIEW_BACKUP_CODES,
ACCOUNT_REMOVE_2FA, ACCOUNT_SMS_BACKUP];
items2[1] = object3;
const object4 = {};
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5V0AkP']);
const ACCOUNT_DISABLE = MobileSetting.ACCOUNT_DISABLE;
const ACCOUNT_DELETE = MobileSetting.ACCOUNT_DELETE;
object4.settings = [ACCOUNT_DISABLE, ACCOUNT_DELETE];
items2[2] = object4;
const filter = items2.filter;
const Boolean = global.Boolean;
object.sections = Reflect.apply(filter, items2, [Boolean]);
object.ListHeaderComponent = importDefault(13269) /* metro dependency 13269: SettingsAccountHeader */;
return Reflect.apply(createList, SettingBuildersModule, [object]);
}
}
function AccountStandingPage() { // fn#100999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:2706, offset: 0x022049b8, size: 51 bytes, params: 1, frame: 14
return ((Component) => <Component visible />)((SafetyHubPageModule).default);
}
function _fun101000() { // fn#101000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:2799, offset: 0x022049eb, size: 601 bytes, params: 1, frame: 30
const value2 = undefined;
const styles = useStyles();
const binding = env0_4;
const value3 = 0;
const value5 = Module00057(binding.useState(value3), 2);
const property = value5[value3];
const value6 = 1;
const env0_0 = value5[value6];
const value7 = env0_4.useCallback(_fun101001, []);
const useSettingNavigationRoute = UseSettingNavigationRouteModule.useSettingNavigationRoute;
const params = Reflect.apply(useSettingNavigationRoute, UseSettingNavigationRouteModule, []).params;
const initialTab = params == null ? value2 : params.initialTab;
const useSegmentedControlState = SegmentedControlStateNativeModule.useSegmentedControlState;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Am9YHi = (require(1244) /* metro dependency 1244: indexNative */).t.Am9YHi;
object2.label = Reflect.apply(string, intl, [Am9YHi]);
const SECURITY = AccountSettingsTabs.SECURITY;
object2.id = SECURITY;
object2.page = <AccountSecurityPage />;
const items2 = [object2];
const object3 = {};
object3.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['00Sfl/']);
let STANDING = AccountSettingsTabs.STANDING;
object3.id = STANDING;
object3.page = (
<View style={styles.standingPage}>
<AccountStandingPage />
</View>
);
items2[1] = object3;
STANDING = AccountSettingsTabs.STANDING;
const value8 = Reflect.apply(useSegmentedControlState, SegmentedControlStateNativeModule, [{items: items2,
pageWidth: property, defaultIndex: initialTab !== STANDING ? value3 : value6, onSetActiveIndex: function(a0) {
var defaultImport = importDefault(dependencyMap[32]);
var track = defaultImport.track;
var MY_ACCOUNT_PAGE_TAB_NAVIGATE = AnalyticEvents.MY_ACCOUNT_PAGE_TAB_NAVIGATE;
Reflect.apply(track, defaultImport, [MY_ACCOUNT_PAGE_TAB_NAVIGATE,
{target_tab_name: a0 === 0 ? AccountSettingsTabs.SECURITY : AccountSettingsTabs.STANDING}]);
}}]);
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
const SegmentedControl = (SegmentedControlNativeModule).SegmentedControl;
const view = (
<View style={styles.controlContainer} onLayout={value7}>
<SegmentedControl state={value8} />
</View>
);
const SegmentedControlPages = (SegmentedControlPagesNativeModule).SegmentedControlPages;
return (
<>
{view}
<View style={styles.pageContainer}>
<SegmentedControlPages state={value8} />
</View>
</>
);
function _fun101001({nativeEvent}) { // fn#101001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:2878, offset: 0x01c1cbbd, size: 36 bytes, params: 2, frame: 11
env0_0(nativeEvent.layout.width);
}
}
}
function _fun100998() { // fn#100998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13432:2084, offset: 0x022047e6, size: 466 bytes, params: 1, frame: 22
const settingBuildersModule = require(9692) /* metro dependency 9692: SettingBuilders */;
const createList = settingBuildersModule.createList;
const object5 = {};
const object6 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object6.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e262Nn);
const ACCOUNT_USERNAME = MobileSetting.ACCOUNT_USERNAME;
const ACCOUNT_DISPLAY_NAME = MobileSetting.ACCOUNT_DISPLAY_NAME;
const ACCOUNT_EMAIL = MobileSetting.ACCOUNT_EMAIL;
const ACCOUNT_PHONE = MobileSetting.ACCOUNT_PHONE;
const ACCOUNT_AGE_GROUP_ADULT = MobileSetting.ACCOUNT_AGE_GROUP_ADULT;
const ACCOUNT_AGE_GROUP_NON_ADULT = MobileSetting.ACCOUNT_AGE_GROUP_NON_ADULT;
const ACCOUNT_AGE_GROUP_ASSIGNED_ADULT = MobileSetting.ACCOUNT_AGE_GROUP_ASSIGNED_ADULT;
object6.settings = [ACCOUNT_USERNAME, ACCOUNT_DISPLAY_NAME, ACCOUNT_EMAIL, ACCOUNT_PHONE, ACCOUNT_AGE_GROUP_ADULT,
ACCOUNT_AGE_GROUP_NON_ADULT, ACCOUNT_AGE_GROUP_ASSIGNED_ADULT];
const items2 = [object6];
const object7 = {};
object7.label = <AccountTwoFALabel />;
const ACCOUNT_CHANGE_PASSWORD = MobileSetting.ACCOUNT_CHANGE_PASSWORD;
const ACCOUNT_WEB_AUTHN_VIEW = MobileSetting.ACCOUNT_WEB_AUTHN_VIEW;
const ACCOUNT_ENABLE_2FA = MobileSetting.ACCOUNT_ENABLE_2FA;
const ACCOUNT_VIEW_BACKUP_CODES = MobileSetting.ACCOUNT_VIEW_BACKUP_CODES;
const ACCOUNT_REMOVE_2FA = MobileSetting.ACCOUNT_REMOVE_2FA;
const ACCOUNT_SMS_BACKUP = MobileSetting.ACCOUNT_SMS_BACKUP;
object7.settings = [ACCOUNT_CHANGE_PASSWORD, ACCOUNT_WEB_AUTHN_VIEW, ACCOUNT_ENABLE_2FA, ACCOUNT_VIEW_BACKUP_CODES,
ACCOUNT_REMOVE_2FA, ACCOUNT_SMS_BACKUP];
items2[1] = object7;
const object8 = {};
object8.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5V0AkP']);
const ACCOUNT_DISABLE = MobileSetting.ACCOUNT_DISABLE;
const ACCOUNT_DELETE = MobileSetting.ACCOUNT_DELETE;
object8.settings = [ACCOUNT_DISABLE, ACCOUNT_DELETE];
items2[2] = object8;
const filter = items2.filter;
const Boolean = global.Boolean;
object5.sections = Reflect.apply(filter, items2, [Boolean]);
object5.ListHeaderComponent = importDefault(13269) /* metro dependency 13269: SettingsAccountHeader */;
return Reflect.apply(createList, settingBuildersModule, [object5]);
}
global.__d(_fun100990, 13242, [57, 31, 27, 13243, 8224, 11471, 661, 13244, 33, 4501, 697, 1484, 6239, 5475, 13245,
4573, 1244, 4578, 5080, 13246, 1962, 566, 13268, 8980, 5084, 6231, 9692, 13269, 13170, 13272, 7032, 8853, 683,
9221, 8861,
2]) /* metro module 13242, dependencies: [57, 31, 27, 13243, 8224, 11471, 661, 13244, 33, 4501, 697, 1484, 6239, 5475, 13245, 4573, 1244, 4578, 5080, 13246, 1962, 566, 13268, 8980, 5084, 6231, 9692, 13269, 13170, 13272, 7032, 8853, 683, 9221, 8861, 2] */;
@@ -1,11 +1,14 @@
/* Metro module 13268; source: modules/user_settings/account/native/SettingsAccountUtils.tsx; dependencies: [1226, 1878, 632, 2] */
import AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseStateFromStoresModule from '../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
function _fun101174(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:6, offset: 0x0220a6e1, size: 156 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/SettingsAccountUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/SettingsAccountUtils.tsx');
exports.useIs2FAEnabled = function() {
return require(dependencyMap[2]).useStateFromStores([UserStore], _fun101176);
};
@@ -15,32 +18,37 @@ function _fun101174(global, require, importDefault, importAll, module, exports,
exports.useIsUserVerified = function() {
return require(dependencyMap[2]).useStateFromStores([UserStore], _fun101180);
};
function useIs2FAEnabled() { // fn#101175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:229, offset: 0x0220a77d, size: 59 bytes, params: 1, frame: 13
return (UseStateFromStoresModule).useStateFromStores([UserStore], _fun101176);
function _fun101176() { // fn#101176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:295, offset: 0x0220a7b8, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
const mfaEnabled = UserStore.getCurrentUser()?.mfaEnabled;
return mfaEnabled != null && mfaEnabled;
}
}
function useIsTOTPEnabled() { // fn#101177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:400, offset: 0x0220a7e5, size: 59 bytes, params: 1, frame: 13
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AuthenticationStore],
function() {
return AuthenticationStore.hasTOTPEnabled();
});
function _fun101178() { // fn#101178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:467, offset: 0x0220a820, size: 21 bytes, params: 1, frame: 9
return AuthenticationStore.hasTOTPEnabled();
}
}
function useIsUserVerified() { // fn#101179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:513, offset: 0x0220a835, size: 59 bytes, params: 1, frame: 13
return (UseStateFromStoresModule).useStateFromStores([UserStore], _fun101180);
function _fun101180() { // fn#101180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:581, offset: 0x0220a870, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
const verified = UserStore.getCurrentUser()?.verified;
return verified != null && verified;
}
}
}
function useIs2FAEnabled() { // fn#101175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:229, offset: 0x0220a77d, size: 59 bytes, params: 1, frame: 13
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore], _fun101176);
}
function useIsTOTPEnabled() { // fn#101177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:400, offset: 0x0220a7e5, size: 59 bytes, params: 1, frame: 13
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AuthenticationStore],
function() {
return AuthenticationStore.hasTOTPEnabled();
});
}
function useIsUserVerified() { // fn#101179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:513, offset: 0x0220a835, size: 59 bytes, params: 1, frame: 13
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore], _fun101180);
}
function _fun101176() { // fn#101176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:295, offset: 0x0220a7b8, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
const mfaEnabled = UserStore.getCurrentUser()?.mfaEnabled;
return mfaEnabled != null && mfaEnabled;
}
function _fun101180() { // fn#101180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13458:581, offset: 0x0220a870, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
const verified = UserStore.getCurrentUser()?.verified;
return verified != null && verified;
}
global.__d(_fun101174, 13268, [1226, 1878, 632, 2]) /* metro module 13268, dependencies: [1226, 1878, 632, 2] */;
@@ -1,126 +1,141 @@
/* Metro module 13266; source: modules/user_settings/account/native/UserSettingsAccountBackupCodes.tsx; dependencies: [31, 27, 12593, 33, 4501, 697, 6797, 3856, 6238, 6742, 1244, 3860, 566, 13267, 4572, 4573, 6231, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import MFAStore from '../../../../stores/MFAStore.tsx'; /* Metro dependency 12593 */
import MFAActionCreators from '../../../../actions/MFAActionCreators.tsx'; /* Metro dependency 13267 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ToastUtilsModule from '../../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
function _fun101143(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:6, offset: 0x022099fc, size: 262 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).ScrollView;
const mfaStore = importDefault(12593) /* metro dependency 12593: MFAStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
const TEXT_BRAND = (Native).colors.TEXT_BRAND;
const env0_8 = Reflect.apply(createStyles, value, [{generateCode: {color: TEXT_BRAND}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/UserSettingsAccountBackupCodes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/UserSettingsAccountBackupCodes.tsx');
exports.default = UserSettingsAccountBackupCodes;
function CodeRow({code, showCheckMark}) { // fn#101144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:237, offset: 0x02209b02, size: 190 bytes, params: 2, frame: 20
const value2 = ReactModule.useCallback(_fun101145, [code]);
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
onPress={showCheckMark ? undefined : value2}
label={code}
trailing={showCheckMark
? ((CheckmarkSmallIcon) => <CheckmarkSmallIcon color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND} />)((require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon)
: null}
/>
);
function _fun101145() { // fn#101145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:301, offset: 0x02209bc0, size: 96 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
const copy = value.copy;
const codeBinding = code;
Reflect.apply(copy, value, [codeBinding.replace(RegExp('[^a-zA-Z0-9]', 'g'), '')]);
(ToastUtilsModule).presentCopiedToClipboard();
}
}
function UserSettingsAccountBackupCodes({onGenerate, headerLabel}) { // fn#101146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:644, offset: 0x02209c20, size: 902 bytes, params: 2, frame: 33
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const r10 = headerLabel !== undefined ? headerLabel : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.OhmvYt,
{});
const useToken = UseTokenModule.useToken;
const TABLE_ROW_PADDING = (Native).modules.mobile.TABLE_ROW_PADDING;
const value2 = Reflect.apply(useToken, UseTokenModule, [TABLE_ROW_PADDING]);
const styles = useStyles();
const {usedCodes, unusedCodes} = ReactModule.useMemo(function() {
backupCodes.forEach(_fun101149);
return {usedCodes: [], unusedCodes: []};
}, [(require(566) /* metro dependency 566: flux */).useStateFromStores([MFAStore], function() {
return MFAStore.getBackupCodes();
})]);
ReactModule.useEffect(function() {
return _fun101151;
}, []);
const Stack = (StackNativeModule).Stack;
const PX_24 = (Native).space.PX_24;
const object2 = {paddingHorizontal: value2};
const PX_16 = (Native).space.PX_16;
object2.paddingTop = PX_16;
const items2 = [r10.map(_fun101152)];
items2[1] = unusedCodes.length > 0 && <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zdzyFo)} hasIcons={false}>{unusedCodes.map(_fun101153)}</TableRowGroup>;
items2[2] = usedCodes.length > 0 && <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.FkFLDN)} hasIcons={false}>{usedCodes.map(_fun101154)}</TableRowGroup>;
items2[3] = onGenerate !== null && <TableRowGroup hasIcons={false}>{((TableRow) => <TableRow label={((Text) => <Text variant="text-md/semibold" style={styles.generateCode}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.RIThUu)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)} onPress={onPress_101155} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow)}</TableRowGroup>;
return (
<ScrollView>
<Stack spacing={PX_24} style={object2}>
{items2}
</Stack>
</ScrollView>
);
function _fun101148() { // fn#101148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:902, offset: 0x02209fbb, size: 56 bytes, params: 1, frame: 13
backupCodes.forEach(_fun101149);
return {usedCodes: [], unusedCodes: []};
function _fun101149(a0) { // fn#101149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:939, offset: 0x02209ff3, size: 47 bytes, params: 2, frame: 12
return a0.consumed ? env0_0.push(a0) : env0_1.push(a0);
}
}
function _fun101150() { // fn#101150, offset: 0x0220a022, size: 11 bytes, params: 1, frame: 1
return _fun101151;
function _fun101151() { // fn#101151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:1064, offset: 0x0220a02d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(MFAActionCreators).clearBackupCodes();
}
}
function _fun101152(a0, a1) { // fn#101152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:1239, offset: 0x0220a052, size: 65 bytes, params: 3, frame: 15
const Text = (TextModule).Text;
return <Text {...{variant: 'text-sm/medium', children: a0}} key={a1} />;
}
function _fun101153(a0, a1) { // fn#101153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:1417, offset: 0x0220a093, size: 46 bytes, params: 3, frame: 15
return (
<CodeRow
code={a0.code}
showCheckMark={false}
key={a1}
/>
);
}
function _fun101154(a0, a1) { // fn#101154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:1584, offset: 0x0220a0c1, size: 46 bytes, params: 3, frame: 15
return (
<CodeRow
code={a0.code}
showCheckMark
key={a1}
/>
);
}
function UserSettingsAccountBackupCodesOnPress() { // fn#101155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:1846, owner: UserSettingsAccountBackupCodes.onPress, offset: 0x0220a0ef, size: 57 bytes, params: 1, frame: 14
const value = environment.__proto__;
(MFAActionCreators).confirmViewBackupCodes(MFAStore.getVerificationKey(),
true);
}
}
}
function CodeRow({code, showCheckMark}) { // fn#101144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:237, offset: 0x02209b02, size: 190 bytes, params: 2, frame: 20
const value2 = env0_3.useCallback(_fun101145, [code]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
onPress={showCheckMark ? undefined : value2}
label={code}
trailing={showCheckMark ? ((CheckmarkSmallIcon) => <CheckmarkSmallIcon color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND} />)((require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon) : null}
/>
);
}
function UserSettingsAccountBackupCodes({onGenerate, headerLabel}) { // fn#101146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:644, offset: 0x02209c20, size: 902 bytes, params: 2, frame: 33
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const r10 = headerLabel !== undefined ? headerLabel : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.OhmvYt,
{});
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
const value2 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_PADDING]);
const styles = useStyles();
const {usedCodes, unusedCodes} = env0_3.useMemo(function() {
backupCodes.forEach(_fun101149);
return {usedCodes: [], unusedCodes: []};
}, [(require(566) /* metro dependency 566: flux */).useStateFromStores([MFAStore], function() {
return MFAStore.getBackupCodes();
})]);
env0_3.useEffect(function() {
return _fun101151;
}, []);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const object = {paddingHorizontal: value2};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingTop = PX_16;
const items2 = [r10.map(_fun101152)];
items2[1] = unusedCodes.length > 0 && <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zdzyFo)} hasIcons={false}>{unusedCodes.map(_fun101153)}</TableRowGroup>;
items2[2] = usedCodes.length > 0 && <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.FkFLDN)} hasIcons={false}>{usedCodes.map(_fun101154)}</TableRowGroup>;
items2[3] = onGenerate !== null && <TableRowGroup hasIcons={false}>{((TableRow) => <TableRow label={((Text) => <Text variant="text-md/semibold" style={styles.generateCode}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.RIThUu)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)} onPress={onPress_101155} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow)}</TableRowGroup>;
return (
<ScrollView>
<Stack spacing={PX_24} style={object}>
{items2}
</Stack>
</ScrollView>
);
}
function _fun101145() { // fn#101145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:301, offset: 0x02209bc0, size: 96 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
const copy = value.copy;
const codeBinding = code;
Reflect.apply(copy, value, [codeBinding.replace(RegExp('[^a-zA-Z0-9]', 'g'), '')]);
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
}
function _fun101148() { // fn#101148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:902, offset: 0x02209fbb, size: 56 bytes, params: 1, frame: 13
backupCodes.forEach(_fun101149);
return {usedCodes: [], unusedCodes: []};
}
function _fun101150() { // fn#101150, offset: 0x0220a022, size: 11 bytes, params: 1, frame: 1
return _fun101151;
}
function _fun101152(a0, a1) { // fn#101152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:1239, offset: 0x0220a052, size: 65 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return <Text {...{variant: 'text-sm/medium', children: a0}} key={a1} />;
}
function _fun101153(a0, a1) { // fn#101153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:1417, offset: 0x0220a093, size: 46 bytes, params: 3, frame: 15
return (
<CodeRow
code={a0.code}
showCheckMark={false}
key={a1}
/>
);
}
function _fun101154(a0, a1) { // fn#101154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:1584, offset: 0x0220a0c1, size: 46 bytes, params: 3, frame: 15
return (
<CodeRow
code={a0.code}
showCheckMark
key={a1}
/>
);
}
function UserSettingsAccountBackupCodesOnPress() { // fn#101155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:1846, owner: UserSettingsAccountBackupCodes.onPress, offset: 0x0220a0ef, size: 57 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(13267) /* metro dependency 13267: MFAActionCreators */).confirmViewBackupCodes(MFAStore.getVerificationKey(),
true);
}
function _fun101149(a0) { // fn#101149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:939, offset: 0x02209ff3, size: 47 bytes, params: 2, frame: 12
return a0.consumed ? env0_0.push(a0) : env0_1.push(a0);
}
function _fun101151() { // fn#101151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13456:1064, offset: 0x0220a02d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(importDefault(13267) /* metro dependency 13267: MFAActionCreators */).clearBackupCodes();
}
global.__d(_fun101143, 13266, [31, 27, 12593, 33, 4501, 697, 6797, 3856, 6238, 6742, 1244, 3860, 566, 13267, 4572,
4573, 6231,
2]) /* metro module 13266, dependencies: [31, 27, 12593, 33, 4501, 697, 6797, 3856, 6238, 6742, 1244, 3860, 566, 13267, 4572, 4573, 6231, 2] */;
@@ -1,318 +1,400 @@
/* Metro module 13300; source: modules/user_settings/account/native/UserSettingsAccountEditPassword.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 1372, 7008, 1878, 661, 33, 4501, 697, 7620, 9009, 22, 683, 7508, 9011, 13301, 4573, 1244, 4572, 7981, 4578, 3868, 7032, 566, 44, 1484, 2] */
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import LoginRequiredActionStore from '../../../auth/LoginRequiredActionStore.tsx'; /* Metro dependency 1372 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UserSettingsAccountStore from '../../../../stores/UserSettingsAccountStore.tsx'; /* Metro dependency 7008 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as NativeModule from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as UseSettingNavigationRouteModule from '../../core/native/useSettingNavigationRoute.tsx'; /* Metro dependency 7032 */
import * as UserSettingsAccountActionCreatorsModule from '../../../../actions/UserSettingsAccountActionCreators.tsx'; /* Metro dependency 7620 */
import * as TextInputNativeModule from '../../../../design/components/TextInput/native/TextInput.native.tsx'; /* Metro dependency 7981 */
import * as UserSettingsAccountUnverifiedHeaderModule from './UserSettingsAccountUnverifiedHeader.tsx'; /* Metro dependency 9011 */
function _fun101369(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:6, offset: 0x02211e49, size: 606 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_9 = value2.Image;
const env0_10 = value2.View;
const env0_11 = value2.ScrollView;
const loginRequiredActionStore = importDefault(1372) /* metro dependency 1372: LoginRequiredActionStore */;
const userSettingsAccountStore = importDefault(7008) /* metro dependency 7008: UserSettingsAccountStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_15 = constantsModule.AnalyticEvents;
const env0_16 = constantsModule.LoginRequiredActions;
const value4 = require(33) /* metro dependency 33 */;
const env0_17 = value4.jsx;
const env0_18 = value4.jsxs;
let value = ReactModule;
object = {newPassword: undefined, password: ''};
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
const object3 = {'overflow': 'hidden', 'borderRadius': null, 'marginVertical': 16};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_20 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [{onePass: {'width': 20,
'height': 20}, unverifiedWrapper: object3, container: {padding: 16}, header: {marginBottom: 20},
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
const object2 = {'overflow': 'hidden', 'borderRadius': null, 'marginVertical': 16};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_20 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [{onePass: {'width': 20,
'height': 20}, unverifiedWrapper: object2, container: {padding: 16}, header: {marginBottom: 20},
requiredActionsSubtitle: {'textAlign': 'center', 'marginTop': 8}, requiredActionsTitle: {'flex': 1,
'textAlign': 'center'}, image: {'marginTop': 12, 'marginBottom': 16, 'alignSelf': 'center'}}]);
const Component = value.Component;
value = _fun101373(Component);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/UserSettingsAccountEditPassword.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/UserSettingsAccountEditPassword.tsx');
exports.default = EditPasswordWrapper;
}
function _isNativeReflectConstruct_101370() { // fn#101370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:315, offset: 0x022120a7, 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_101370_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun101373(a0) { // fn#101373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:922, offset: 0x02212109, size: 122 bytes, params: 2, frame: 16
const closure = EditPassword;
env0_8(closure, a0);
return env0_5(closure, [{key: 'componentWillUnmount', value: value_101383}, {key: 'getError', value: function(a0) {
var property = this.props.errors;
return property != null && property[a0] != null ? property[a0][0] : undefined;
}}, {key: 'render', value: value_101385}]);
}
function EditPasswordWrapper() { // fn#101386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:4365, offset: 0x02212a56, size: 193 bytes, params: 1, frame: 18
const value2 = undefined;
const useSettingNavigationRouteModule = require(7032) /* metro dependency 7032: useSettingNavigationRoute */;
const useSettingNavigationRoute = useSettingNavigationRouteModule.useSettingNavigationRoute;
const params = Reflect.apply(useSettingNavigationRoute, useSettingNavigationRouteModule, []).params;
const isLoginRequiredAction = params == null ? value2 : params.isLoginRequiredAction;
const env0_0 = isLoginRequiredAction != null && isLoginRequiredAction;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
return ((Component) => <Component navigation={(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation()} {...Reflect.apply(useStateFromStoresObject,
fluxModule, [[UserStore, UserSettingsAccountStore, LoginRequiredActionStore], _fun101387])} />)(env0_21);
}
function EditPassword(a0) { // fn#101374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:934, offset: 0x02212183, size: 249 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, EditPassword);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(EditPassword);
binding = env1_6;
if (_isNativeReflectConstruct_101370()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = env1_19;
value.newPasswordRef = null;
value.passwordManagerRef = null;
value.handlePasswordChange = handlePasswordChange;
value.handleSetNewPasswordRef = handleSetNewPasswordRef;
value.handleFocusNewPassword = handleFocusNewPassword;
value.handleNewPasswordChange = handleNewPasswordChange;
value.handleSubmit = handleSubmit_101379;
value.handleSetPasswordManagerRef = handleSetPasswordManagerRef;
value.canSubmit = canSubmit;
return value;
}
function value_101383() { // fn#101383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:2233, offset: 0x0221252b, size: 43 bytes, params: 1, frame: 11
var value;
var property;
var error;
try {
value = environment.__proto__;
property = dependencyMap[14];
value = importAll(property);
value.resetAccount();
} catch (error) {
}
}
function value_101385() { // fn#101385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:2407, offset: 0x0221258b, size: 1227 bytes, params: 1, frame: 41
var r9;
var r8;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items3;
const value = environment.__proto__;
const binding = env1_20;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const {password, newPassword} = this.state;
const {passwordLabel, newPasswordLabel, showForcedPasswordUpdate, submitting, hasBannerText} = this.props;
const container = value3.container;
const items5 = [hasBannerText && <View style={value3.unverifiedWrapper}>{((Component) => <Component />)(importDefault(9011) /* metro dependency 9011: UserSettingsAccountUnverifiedHeader */)}</View>];
if (showForcedPasswordUpdate) {
var viewBinding3Props = {style: value3.header};
items2 = [<Image source={importDefault(13301) /* metro dependency 13301 */} style={value3.image} />];
string = intl.string;
items2[1] = <Text style={value3.requiredActionsTitle} variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [t.geta79])}</Text>;
string = intl.string;
items2[2] = <Text style={value3.requiredActionsSubtitle} variant="text-sm/medium" color="text-default">{Reflect.apply(string,
intl, [t['37iHbZ']])}</Text>;
r9 = <View {...viewBinding3Props}>{items2}</View>;
} else {
r9 = showForcedPasswordUpdate;
}
items5[1] = r9;
if (showForcedPasswordUpdate) {
r8 = !showForcedPasswordUpdate;
} else {
var viewBinding4Props = {style: value3.header};
string = intl.string;
items3 = [<Text style={value3.requiredActionsTitle} variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [t.geta79])}</Text>];
string = intl.string;
items3[1] = <Text style={value3.requiredActionsSubtitle} variant="text-sm/medium" color="text-default">{Reflect.apply(string,
intl, [t.x5tG4V])}</Text>;
r8 = <View {...viewBinding4Props}>{items3}</View>;
}
items5[2] = r8;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const items4 = [<TextInput label={passwordLabel} secureTextEntry errorMessage={this.getError('password')} onChange={this.handlePasswordChange} value={password} onSubmitEditing={this.canSubmit() ? this.handleSubmit : this.handleFocusNewPassword} returnKeyType="next" autoComplete="current-password" required />];
items4[1] = <TextInput label={newPasswordLabel} ref={this.handleSetNewPasswordRef} secureTextEntry errorMessage={this.getError('new_password')} onChange={this.handleNewPasswordChange} value={newPassword} returnKeyType="done" autoComplete="new-password" onSubmitEditing={this.canSubmit() ? this.handleSubmit : value2} required />;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const handleSubmit = this.handleSubmit;
let r15 = submitting || password == null;
r15 = !r15 ? newPassword == null : r15;
items4[2] = <Button text={Reflect.apply(string, intl,
[t['FRep5/']])} onPress={handleSubmit} loading={submitting} disabled={r15} />;
items5[3] = <Stack spacing={24}>{items4}</Stack>;
return (
<ScrollView>
<View style={container}>
{items5}
</View>
</ScrollView>
);
}
function _fun101387() { // fn#101387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:4549, offset: 0x02212b17, size: 375 bytes, params: 1, frame: 24
const currentUser = UserStore.getCurrentUser();
const value3 = undefined;
const value5 = (require(9011) /* metro dependency 9011: UserSettingsAccountUnverifiedHeader */).getBannerText(currentUser) != null;
const errors = UserSettingsAccountStore.getErrors();
const submitting = UserSettingsAccountStore.getSubmitting();
const settings = UserSettingsAccountStore.getSettings();
if (!env0_0) {
(importDefault(44) /* metro dependency 44 */)(currentUser != null,
'EditPasswordWrapper: user cannot be undefined');
}
const id = currentUser == null ? value3 : currentUser.id;
let r2 = id != null && LoginRequiredActionStore.requiredActionsIncludes(id, [LoginRequiredActions.UPDATE_PASSWORD]);
const object2 = {errors: errors, submitting: submitting, settings: settings, user: currentUser};
const verified = currentUser == null ? value3 : currentUser.verified;
object2.verified = verified != null && verified;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const WBqMRQ = t.WBqMRQ;
object2.passwordLabel = Reflect.apply(string, intl, [WBqMRQ]);
object2.newPasswordLabel = intl.string(t['8dM4FO']);
r2 = r2 && env0_0;
object2.showForcedPasswordUpdate = r2;
object2.hasBannerText = value5;
return object2;
}
function handlePasswordChange(a0) { // fn#101375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1237, owner: EditPassword.handlePasswordChange, offset: 0x0221227c, size: 73 bytes, params: 2, frame: 13
env0_0.setState({password: a0});
const value = environment.__proto__.__proto__;
(importAll(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */).updateAccount({password: a0});
}
function handleSetNewPasswordRef(a0) { // fn#101376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1330, owner: EditPassword.handleSetNewPasswordRef, offset: 0x022122c5, size: 20 bytes, params: 2, frame: 2
env0_0.newPasswordRef = a0;
}
function handleFocusNewPassword() { // fn#101377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1379, owner: EditPassword.handleFocusNewPassword, offset: 0x022122d9, size: 33 bytes, params: 1, frame: 9
const newPasswordRef = env0_0.newPasswordRef;
if (newPasswordRef != null) {
newPasswordRef.focus();
}
}
function handleNewPasswordChange(a0) { // fn#101378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1455, owner: EditPassword.handleNewPasswordChange, offset: 0x022122fa, size: 83 bytes, params: 2, frame: 13
let value = a0;
const r4 = value !== '' ? value : undefined;
const binding = env0_0;
binding.setState({newPassword: r4});
value = environment.__proto__.__proto__;
value = importAll(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */;
value.updateAccount({newPassword: r4});
}
function EditPasswordHandleSubmit() { // fn#101379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1562, owner: EditPassword.handleSubmit, offset: 0x0221234d, size: 118 bytes, params: 1, frame: 16
var environment;
const binding = env0_0;
const {password, newPassword} = binding.state;
var env0_0 = binding.props.showForcedPasswordUpdate;
let value = environment.__proto__.__proto__;
value = Reflect.apply((importAll(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */).saveAccountChanges,
value, [{password: password, newPassword: newPassword}, {close: false}]);
value.then(_fun101380);
}
function handleSetPasswordManagerRef(a0) { // fn#101381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:2001, owner: EditPassword.handleSetPasswordManagerRef, offset: 0x022124bd, size: 20 bytes, params: 2, frame: 2
env0_0.passwordManagerRef = a0;
}
function canSubmit() { // fn#101382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:2041, owner: EditPassword.canSubmit, offset: 0x022124d1, size: 90 bytes, params: 1, frame: 5
const {password, newPassword} = env0_0.state;
let r0 = password != null && password !== '' && newPassword != null;
r0 = r0 && newPassword !== '' && (password.length > 0 && newPassword.length > 0);
return r0;
}
function _fun101380(a0) { // fn#101380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1718, offset: 0x022123c3, size: 250 bytes, params: 2, frame: 14
var r0;
var body;
var value;
var defaultImport;
const ok = a0.ok;
if (ok) {
r0 = ok;
} else {
body = a0.body;
value = undefined;
value = (body == null ? value : body.username) == null;
r0 = value;
}
if (!r0) {
value = environment.__proto__.__proto__.__proto__;
value = require(9009) /* metro dependency 9009: showInvalidUsernameToastNative */;
value.showInvalidUsernameToast();
}
value = environment.__proto__.__proto__.__proto__;
const errors = UserSettingsAccountStore.getErrors();
if (errors == null || (importDefault(22) /* metro dependency 22 */)(errors).isEmpty()) {
if (showForcedPasswordUpdate) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.FORCED_UPDATE_PASSWORD_SUCCEEDED);
(importDefault(7508) /* metro dependency 7508: UserSettingsModalActionCreators */).close();
} else {
value = environment.__proto__;
env1_0.props.navigation.pop();
function _isNativeReflectConstruct_101370() { // fn#101370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:315, offset: 0x022120a7, 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_101370_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun101373(a0) { // fn#101373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:922, offset: 0x02212109, size: 122 bytes, params: 2, frame: 16
const EditPassword2 = EditPassword;
Inherits(EditPassword2, a0);
return CreateClass(EditPassword2, [{key: 'componentWillUnmount', value: value_101383}, {key: 'getError',
value: function(a0) {
var property = this.props.errors;
return property != null && property[a0] != null ? property[a0][0] : undefined;
}}, {key: 'render', value: value_101385}]);
function EditPassword(a0) { // fn#101374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:934, offset: 0x02212183, size: 249 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_4;
binding(this, EditPassword);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_7(EditPassword);
binding = env1_6;
if (_isNativeReflectConstruct_101370()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_7(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = env1_19;
value.newPasswordRef = null;
value.passwordManagerRef = null;
value.handlePasswordChange = handlePasswordChange;
value.handleSetNewPasswordRef = handleSetNewPasswordRef;
value.handleFocusNewPassword = handleFocusNewPassword;
value.handleNewPasswordChange = handleNewPasswordChange;
value.handleSubmit = handleSubmit_101379;
value.handleSetPasswordManagerRef = handleSetPasswordManagerRef;
value.canSubmit = canSubmit;
return value;
function handlePasswordChange(a0) { // fn#101375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1237, owner: EditPassword.handlePasswordChange, offset: 0x0221227c, size: 73 bytes, params: 2, frame: 13
env0_0.setState({password: a0});
const value = environment.__proto__.__proto__;
(UserSettingsAccountActionCreatorsModule).updateAccount({password: a0});
}
function handleSetNewPasswordRef(a0) { // fn#101376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1330, owner: EditPassword.handleSetNewPasswordRef, offset: 0x022122c5, size: 20 bytes, params: 2, frame: 2
env0_0.newPasswordRef = a0;
}
function handleFocusNewPassword() { // fn#101377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1379, owner: EditPassword.handleFocusNewPassword, offset: 0x022122d9, size: 33 bytes, params: 1, frame: 9
const newPasswordRef = env0_0.newPasswordRef;
if (newPasswordRef != null) {
newPasswordRef.focus();
}
}
function handleNewPasswordChange(a0) { // fn#101378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1455, owner: EditPassword.handleNewPasswordChange, offset: 0x022122fa, size: 83 bytes, params: 2, frame: 13
let value = a0;
const r4 = value !== '' ? value : undefined;
const binding = env0_0;
binding.setState({newPassword: r4});
value = environment.__proto__.__proto__;
value = importAll(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */;
value.updateAccount({newPassword: r4});
}
function EditPasswordHandleSubmit() { // fn#101379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1562, owner: EditPassword.handleSubmit, offset: 0x0221234d, size: 118 bytes, params: 1, frame: 16
var environment;
const binding = showForcedPasswordUpdate;
const {password, newPassword} = binding.state;
var showForcedPasswordUpdate = binding.props.showForcedPasswordUpdate;
let value = environment.__proto__.__proto__;
value = Reflect.apply((importAll(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */).saveAccountChanges,
value, [{password: password, newPassword: newPassword}, {close: false}]);
value.then(_fun101380);
function _fun101380(a0) { // fn#101380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:1718, offset: 0x022123c3, size: 250 bytes, params: 2, frame: 14
var r0;
var body;
var value;
var defaultImport;
const ok = a0.ok;
if (ok) {
r0 = ok;
} else {
body = a0.body;
value = undefined;
value = (body == null ? value : body.username) == null;
r0 = value;
}
if (!r0) {
value = environment.__proto__.__proto__.__proto__;
value = require(9009) /* metro dependency 9009: showInvalidUsernameToastNative */;
value.showInvalidUsernameToast();
}
value = environment.__proto__.__proto__.__proto__;
const errors = UserSettingsAccountStore.getErrors();
if (errors == null || (importDefault(22) /* metro dependency 22 */)(errors).isEmpty()) {
if (showForcedPasswordUpdate) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.FORCED_UPDATE_PASSWORD_SUCCEEDED);
(importDefault(7508) /* metro dependency 7508: UserSettingsModalActionCreators */).close();
} else {
value = environment.__proto__;
env1_0.props.navigation.pop();
}
}
}
}
function handleSetPasswordManagerRef(a0) { // fn#101381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:2001, owner: EditPassword.handleSetPasswordManagerRef, offset: 0x022124bd, size: 20 bytes, params: 2, frame: 2
env0_0.passwordManagerRef = a0;
}
function canSubmit() { // fn#101382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:2041, owner: EditPassword.canSubmit, offset: 0x022124d1, size: 90 bytes, params: 1, frame: 5
const {password, newPassword} = env0_0.state;
let r0 = password != null && password !== '' && newPassword != null;
r0 = r0 && newPassword !== '' && (password.length > 0 && newPassword.length > 0);
return r0;
}
}
function value_101383() { // fn#101383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:2233, offset: 0x0221252b, size: 43 bytes, params: 1, frame: 11
var value;
var property;
var error;
try {
value = environment.__proto__;
property = dependencyMap[14];
value = importAll(property);
value.resetAccount();
} catch (error) {
}
}
function value_101385() { // fn#101385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:2407, offset: 0x0221258b, size: 1227 bytes, params: 1, frame: 41
var r9;
var r8;
var items2;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var items3;
const value = environment.__proto__;
const binding = env1_20;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const {password, newPassword} = this.state;
const {passwordLabel, newPasswordLabel, showForcedPasswordUpdate, submitting, hasBannerText} = this.props;
const container = value3.container;
const items5 = [
hasBannerText && <View style={value3.unverifiedWrapper}>{((Component) => <Component />)(importDefault(9011) /* metro dependency 9011: UserSettingsAccountUnverifiedHeader */)}</View>,
];
if (showForcedPasswordUpdate) {
var viewBinding3Props = {style: value3.header};
items2 = [
<Image source={importDefault(13301) /* metro dependency 13301 */} style={value3.image} />,
];
string = intl.string;
items2[1] = (
<Text
style={value3.requiredActionsTitle}
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [t.geta79])}
</Text>
);
string = intl.string;
items2[2] = (
<Text
style={value3.requiredActionsSubtitle}
variant="text-sm/medium"
color="text-default"
>
{Reflect.apply(string, intl, [t['37iHbZ']])}
</Text>
);
r9 = (
<View {...viewBinding3Props}>
{items2}
</View>
);
} else {
r9 = showForcedPasswordUpdate;
}
items5[1] = r9;
if (showForcedPasswordUpdate) {
r8 = !showForcedPasswordUpdate;
} else {
var viewBinding4Props = {style: value3.header};
string = intl.string;
items3 = [
<Text
style={value3.requiredActionsTitle}
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [t.geta79])}
</Text>,
];
string = intl.string;
items3[1] = (
<Text
style={value3.requiredActionsSubtitle}
variant="text-sm/medium"
color="text-default"
>
{Reflect.apply(string, intl, [t.x5tG4V])}
</Text>
);
r8 = (
<View {...viewBinding4Props}>
{items3}
</View>
);
}
items5[2] = r8;
const Stack = (StackNativeModule).Stack;
const TextInput = (TextInputNativeModule).TextInput;
const items4 = [
<TextInput
label={passwordLabel}
secureTextEntry
errorMessage={this.getError('password')}
onChange={this.handlePasswordChange}
value={password}
onSubmitEditing={this.canSubmit() ? this.handleSubmit : this.handleFocusNewPassword}
returnKeyType="next"
autoComplete="current-password"
required
/>,
];
items4[1] = (
<TextInput
label={newPasswordLabel}
ref={this.handleSetNewPasswordRef}
secureTextEntry
errorMessage={this.getError('new_password')}
onChange={this.handleNewPasswordChange}
value={newPassword}
returnKeyType="done"
autoComplete="new-password"
onSubmitEditing={this.canSubmit() ? this.handleSubmit : value2}
required
/>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const handleSubmit = this.handleSubmit;
let r15 = submitting || password == null;
r15 = !r15 ? newPassword == null : r15;
items4[2] = (
<Button
text={Reflect.apply(string, intl, [t['FRep5/']])}
onPress={handleSubmit}
loading={submitting}
disabled={r15}
/>
);
items5[3] = (
<Stack spacing={24}>
{items4}
</Stack>
);
return (
<ScrollView>
<View style={container}>
{items5}
</View>
</ScrollView>
);
}
}
function EditPasswordWrapper() { // fn#101386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:4365, offset: 0x02212a56, size: 193 bytes, params: 1, frame: 18
const value2 = undefined;
const useSettingNavigationRoute = UseSettingNavigationRouteModule.useSettingNavigationRoute;
const params = Reflect.apply(useSettingNavigationRoute, UseSettingNavigationRouteModule, []).params;
const isLoginRequiredAction = params == null ? value2 : params.isLoginRequiredAction;
const env0_0 = isLoginRequiredAction != null && isLoginRequiredAction;
const useStateFromStoresObject = FluxModule.useStateFromStoresObject;
return ((Component) => <Component navigation={(UseNavigationNativeModule).useNavigation()} {...Reflect.apply(useStateFromStoresObject,
FluxModule, [[UserStore, UserSettingsAccountStore, LoginRequiredActionStore], _fun101387])} />)(env0_21);
function _fun101387() { // fn#101387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13490:4549, offset: 0x02212b17, size: 375 bytes, params: 1, frame: 24
const currentUser = UserStore.getCurrentUser();
const value3 = undefined;
const value5 = (UserSettingsAccountUnverifiedHeaderModule).getBannerText(currentUser) != null;
const userSettingsAccountStoreBinding = UserSettingsAccountStore;
const errors = userSettingsAccountStoreBinding.getErrors();
const submitting = userSettingsAccountStoreBinding.getSubmitting();
const settings = userSettingsAccountStoreBinding.getSettings();
if (!env0_0) {
(importDefault(44) /* metro dependency 44 */)(currentUser != null,
'EditPasswordWrapper: user cannot be undefined');
}
const id = currentUser == null ? value3 : currentUser.id;
let r2 = id != null && LoginRequiredActionStore.requiredActionsIncludes(id, [LoginRequiredActions.UPDATE_PASSWORD]);
const object = {errors: errors, submitting: submitting, settings: settings, user: currentUser};
const verified = currentUser == null ? value3 : currentUser.verified;
object.verified = verified != null && verified;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const WBqMRQ = t.WBqMRQ;
object.passwordLabel = Reflect.apply(string, intl, [WBqMRQ]);
object.newPasswordLabel = intl.string(t['8dM4FO']);
r2 = r2 && env0_0;
object.showForcedPasswordUpdate = r2;
object.hasBannerText = value5;
return object;
}
}
}
global.__d(_fun101369, 13300, [6, 7, 15, 17, 18, 31, 27, 1372, 7008, 1878, 661, 33, 4501, 697, 7620, 9009, 22, 683,
7508, 9011, 13301, 4573, 1244, 4572, 7981, 4578, 3868, 7032, 566, 44, 1484,
2]) /* metro module 13300, dependencies: [6, 7, 15, 17, 18, 31, 27, 1372, 7008, 1878, 661, 33, 4501, 697, 7620, 9009, 22, 683, 7508, 9011, 13301, 4573, 1244, 4572, 7981, 4578, 3868, 7032, 566, 44, 1484, 2] */;
@@ -1,91 +1,119 @@
/* Metro module 9011; source: modules/user_settings/account/native/UserSettingsAccountUnverifiedHeader.tsx; dependencies: [31, 1878, 33, 4501, 697, 8953, 1244, 566, 5278, 4573, 2] */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import EmailVerificationModalActionCreators from '../../../../actions/native/EmailVerificationModalActionCreators.tsx'; /* Metro dependency 8953 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun70105(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9196:6, offset: 0x01ceedb6, size: 357 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const closure = getBannerText;
const getBannerText2 = getBannerText;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2.accountWarning = {'backgroundColor': null, 'height': 36, 'alignItems': 'center', 'alignSelf': 'stretch',
object.accountWarning = {'backgroundColor': null, 'height': 36, 'alignItems': 'center', 'alignSelf': 'stretch',
'flexDirection': 'row', 'paddingHorizontal': 16, backgroundColor: RED_400};
object2.accountWarningText = {'flex': 1, 'lineHeight': 16};
const object4 = {'borderWidth': 1, 'borderColor': null, 'borderRadius': null, 'paddingHorizontal': 8,
object.accountWarningText = {'flex': 1, 'lineHeight': 16};
const object3 = {'borderWidth': 1, 'borderColor': null, 'borderRadius': null, 'paddingHorizontal': 8,
'paddingVertical': 4};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object4.borderColor = WHITE;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.accountWarningButton = object4;
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/UserSettingsAccountUnverifiedHeader.tsx');
object3.borderColor = WHITE;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.accountWarningButton = object3;
const env0_6 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/UserSettingsAccountUnverifiedHeader.tsx');
exports.default = UserSettingsAccountUnverifiedHeader;
exports.getBannerText = closure;
}
exports.getBannerText = getBannerText2;
function handleOpenEmailVerification() { // fn#70106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9196:504, offset: 0x01ceef1b, size: 37 bytes, params: 1, frame: 11
(EmailVerificationModalActionCreators).open();
}
function handleOpenEmailVerification() { // fn#70106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9196:504, offset: 0x01ceef1b, size: 37 bytes, params: 1, frame: 11
(importDefault(8953) /* metro dependency 8953: EmailVerificationModalActionCreators */).open();
}
function getBannerText(a0) { // fn#70107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9196:558, offset: 0x01ceef40, size: 290 bytes, params: 2, frame: 18
var r1;
var r0;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value = null;
if (value == a0) {
r0 = value;
} else {
if (value == a0.email) {
object2 = {};
object2.title = intl.string(t['/yqgqs']);
object2.button = intl.string(t.ydw5nX);
r1 = object2;
} else if (a0.verified) {
r1 = value;
function getBannerText(a0) { // fn#70107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9196:558, offset: 0x01ceef40, size: 290 bytes, params: 2, frame: 18
var r1;
var r0;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const value = null;
if (value == a0) {
r0 = value;
} else {
object2 = {};
object2.title = intl.string(t['3sWbf3']);
object2.button = intl.string(t['13ofGu']);
r1 = object2;
if (value == a0.email) {
object = {};
object.title = intl.string(t['/yqgqs']);
object.button = intl.string(t.ydw5nX);
r1 = object;
} else if (a0.verified) {
r1 = value;
} else {
object = {};
object.title = intl.string(t['3sWbf3']);
object.button = intl.string(t['13ofGu']);
r1 = object;
}
r0 = r1;
}
r0 = r1;
return r0;
}
return r0;
}
function UserSettingsAccountUnverifiedHeader() { // fn#70108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9196:946, offset: 0x01cef062, size: 286 bytes, params: 1, frame: 23
var r0;
var PressableOpacity;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
var value;
const styles = useStyles();
const getBannerTextBinding = getBannerText;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const bannerTextBinding = getBannerTextBinding(currentUser);
const value3 = null;
if (value3 == bannerTextBinding) {
r0 = value3;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {accessibilityRole: 'button', style: styles.accountWarning,
onPress: handleOpenEmailVerification};
value = <Text style={styles.accountWarningText} variant="text-xs/bold" color="always-white">{bannerTextBinding.title}</Text>;
items2 = [value];
items2[1] = <Text style={styles.accountWarningButton} variant="text-xs/medium" color="always-white">{bannerTextBinding.button}</Text>;
value = <PressableOpacity {...pressableOpacityProps}>{items2}</PressableOpacity>;
r0 = value;
function UserSettingsAccountUnverifiedHeader() { // fn#70108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9196:946, offset: 0x01cef062, size: 286 bytes, params: 1, frame: 23
var r0;
var PressableOpacity;
const Text = (TextModule).Text;
var items2;
var value;
const styles = useStyles();
const getBannerTextBinding = getBannerText;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const bannerTextBinding = getBannerTextBinding(currentUser);
const value3 = null;
if (value3 == bannerTextBinding) {
r0 = value3;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {accessibilityRole: 'button', style: styles.accountWarning,
onPress: handleOpenEmailVerification};
value = (
<Text
style={styles.accountWarningText}
variant="text-xs/bold"
color="always-white"
>
{bannerTextBinding.title}
</Text>
);
items2 = [value];
items2[1] = (
<Text
style={styles.accountWarningButton}
variant="text-xs/medium"
color="always-white"
>
{bannerTextBinding.button}
</Text>
);
value = (
<PressableOpacity {...pressableOpacityProps}>
{items2}
</PressableOpacity>
);
r0 = value;
}
return r0;
}
return r0;
}
global.__d(_fun70105, 9011, [31, 1878, 33, 4501, 697, 8953, 1244, 566, 5278, 4573,
2]) /* metro module 9011, dependencies: [31, 1878, 33, 4501, 697, 8953, 1244, 566, 5278, 4573, 2] */;
@@ -1,328 +1,363 @@
/* Metro module 13281; source: modules/user_settings/account/native/UserSettingsChangeUsername.tsx; dependencies: [5, 57, 31, 27, 1878, 661, 33, 4501, 697, 4242, 13282, 4573, 1244, 1484, 566, 3802, 13283, 7508, 7620, 507, 1485, 9603, 7981, 9011, 8968, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import FreeFormLabel from '../../../../design/void/Form/native/FreeFormLabel.tsx'; /* Metro dependency 8968 */
import UserSettingsAccountUnverifiedHeader from './UserSettingsAccountUnverifiedHeader.tsx'; /* Metro dependency 9011 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as Module01485Module from '../../../../by-id/module-01485.js'; /* Metro dependency 1485 */
import * as Module04242Module from '../../../../by-id/module-04242.js'; /* Metro dependency 4242 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TextInputNativeModule from '../../../../design/components/TextInput/native/TextInput.native.tsx'; /* Metro dependency 7981 */
import * as UniqueUsernamesTypesModule from '../../../unique_usernames/UniqueUsernamesTypes.tsx'; /* Metro dependency 13282 */
import * as UseUsernameStatusModule from '../../../unique_usernames/useUsernameStatus.tsx'; /* Metro dependency 13283 */
function _fun101254(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:6, offset: 0x0220e55a, size: 471 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importDefault(57) /* metro dependency 57 */;
const env0_6 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_7 = value.View;
const env0_8 = value.ScrollView;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = 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.background = {backgroundColor: BACKGROUND_BASE_LOW};
object2.container = {padding: 16};
object2.inputs = {'flex': 1, 'flexDirection': 'row', 'marginTop': 8};
object2.username = {flex: 2};
object2.discriminator = {flex: 1};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.divider = {'width': 1, 'backgroundColor': null, 'marginBottom': 8, backgroundColor: BACKGROUND_BASE_LOWEST};
const INTERACTIVE_BACKGROUND_SELECTED = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_SELECTED;
object2.dividerInner = {'flex': 1, 'marginVertical': 12, backgroundColor: INTERACTIVE_BACKGROUND_SELECTED};
const env0_13 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/UserSettingsChangeUsername.tsx');
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.background = {backgroundColor: BACKGROUND_BASE_LOW};
object.container = {padding: 16};
object.inputs = {'flex': 1, 'flexDirection': 'row', 'marginTop': 8};
object.username = {flex: 2};
object.discriminator = {flex: 1};
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
object.divider = {'width': 1, 'backgroundColor': null, 'marginBottom': 8, backgroundColor: BACKGROUND_BASE_LOWEST};
const INTERACTIVE_BACKGROUND_SELECTED = (Native).colors.INTERACTIVE_BACKGROUND_SELECTED;
object.dividerInner = {'flex': 1, 'marginVertical': 12, backgroundColor: INTERACTIVE_BACKGROUND_SELECTED};
const env0_13 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/UserSettingsChangeUsername.tsx');
exports.default = _default_101259;
}
function UsernameStatusMessage({usernameStatus, showHint}) { // fn#101255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:642, offset: 0x0220e731, size: 230 bytes, params: 2, frame: 20
let value = require(4242) /* metro dependency 4242 */;
value = value.match(usernameStatus);
let object2 = {};
const NameValidationState = (require(13282) /* metro dependency 13282: UniqueUsernamesTypes */).NameValidationState;
const ERROR = NameValidationState.ERROR;
object2.type = ERROR;
const P = (require(4242) /* metro dependency 4242 */).P;
object2.message = P.select();
value = value.with(object2, _fun101256);
object2 = {};
const AVAILABLE = NameValidationState.AVAILABLE;
object2.type = AVAILABLE;
object2.message = P.select();
value = value.with(object2, _fun101257);
return value.otherwise(_fun101258);
}
function _default_101259() { // fn#101259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:1179, offset: 0x0220e90c, size: 1465 bytes, params: 1, frame: 38
var r12;
const value2 = undefined;
const styles = useStyles();
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [UserStore];
const currentUser = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return UserStore.getCurrentUser();
}]);
const r18 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canEditDiscriminator(currentUser) && !(currentUser != null && currentUser.hasUniqueUsername());
let binding = env0_6;
let useState = binding.useState;
let username = currentUser == null ? value2 : currentUser.username;
const value6 = '';
let r1 = username ?? value6;
const value8 = env0_5(Reflect.apply(useState, binding, [r1]), 2);
const property = value8[0];
const env0_4 = value8[1];
const value9 = env0_6.useState((currentUser == null ? value2 : currentUser.discriminator) ?? value6);
binding = env0_5;
const value10 = binding(value9, 2);
const property2 = value10[0];
const property3 = value10[1];
const binding2 = env0_6;
useState = binding2.useState;
const value11 = binding(Reflect.apply(useState, binding2, [null]), 2);
const property4 = value11[0];
var env0_6 = value11[1];
const useUsernameStatusModule = require(13283) /* metro dependency 13283: useUsernameStatus */;
const useUsernameStatus = useUsernameStatusModule.useUsernameStatus;
r1 = currentUser == null || !currentUser.hasUniqueUsername();
username = currentUser == null ? value2 : currentUser.username;
const value14 = Reflect.apply(useUsernameStatus, useUsernameStatusModule, [property, !r1, false, username]);
const value15 = env0_6.useRef(null);
username = currentUser == null ? value2 : currentUser.username;
const r15 = (property !== username || property2 !== (currentUser == null ? value2 : currentUser.discriminator)) && (r18 ? RegExp('^\\d+$',
'').test(property2) && global.parseInt(property2) > 0 : !r18);
binding = env0_6;
const value21 = binding.useCallback(_fun101261, [r15, r18, property2, value3, currentUser, property]);
const value22 = binding.useCallback(_fun101266, [r18, value21]);
binding.useLayoutEffect(_fun101267, [r15, value21, value3]);
if (currentUser == null) {
return null;
}
let r2 = property4 == null ? value2 : property4.getFieldMessage('username');
r2 = r2 ?? (property4 == null ? value2 : property4.getFieldMessage('discriminator'));
if (r2 == null) {
r12 = value14;
} else {
function UsernameStatusMessage({usernameStatus, showHint}) { // fn#101255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:642, offset: 0x0220e731, size: 230 bytes, params: 2, frame: 20
let value = Module04242Module;
value = value.match(usernameStatus);
let object = {};
const NameValidationState = (UniqueUsernamesTypesModule).NameValidationState;
const ERROR = NameValidationState.ERROR;
object.type = ERROR;
const P = (Module04242Module).P;
object.message = P.select();
value = value.with(object, _fun101256);
object = {};
object.type = (require(13282) /* metro dependency 13282: UniqueUsernamesTypes */).NameValidationState.ERROR;
object.message = r2;
r12 = object;
}
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const textInput = <TextInput {...r18 ? {ref: value15, containerStyle: styles.discriminator, keyboardType: 'numeric',
value: property2, onChange: property3, onSubmitEditing: value21, placeholder: '1337', returnKeyType: 'done',
autoCapitalize: 'none', isClearable: true, leadingText: '#', maxLength: 4} : {ref: value15,
containerStyle: styles.discriminator, value: '#' + property2, isClearable: false, isDisabled: true}} />;
const value26 = ((Component) => <Component />)(importDefault(9011) /* metro dependency 9011: UserSettingsAccountUnverifiedHeader */);
const FreeFormLabel = importDefault(8968) /* metro dependency 8968: FreeFormLabel */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
let IEpCBQ = (require(1244) /* metro dependency 1244: indexNative */).t.IEpCBQ;
const items2 = [<FreeFormLabel>{Reflect.apply(string, intl, [IEpCBQ])}</FreeFormLabel>];
const object2 = {};
username = styles.username;
object2.containerStyle = username;
object2.textContentType = 'username';
object2.value = property;
object2.enableAndroidSanitizedInputWorkaround = currentUser.hasUniqueUsername();
object2.onChange = onChange_101269;
object2.onSubmitEditing = value22;
string = intl.string;
IEpCBQ = (require(1244) /* metro dependency 1244: indexNative */).t.IEpCBQ;
object2.placeholder = Reflect.apply(string, intl, [IEpCBQ]);
object2.returnKeyType = r18 ? 'next' : 'done';
object2.autoCapitalize = 'none';
object2.autoFocus = true;
const items3 = [<TextInput {...object2} />];
items3[1] = !currentUser.hasUniqueUsername() && <View style={styles.divider}><View style={styles.dividerInner} /></View>;
items3[2] = !currentUser.hasUniqueUsername() && textInput;
items2[1] = <View style={styles.inputs}>{items3}</View>;
items2[2] = <UsernameStatusMessage usernameStatus={r12} showHint={currentUser.hasUniqueUsername()} />;
return (
<ScrollView
style={styles.background}
keyboardShouldPersistTaps="handled"
alwaysBounceVertical={false}
>
{value26}
<View style={styles.container}>
{items2}
</View>
</ScrollView>
);
}
function _fun101256(a0) { // fn#101256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:767, offset: 0x0220e817, size: 63 bytes, params: 2, frame: 14
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-xs/medium" color="text-feedback-critical">
{a0}
</Text>
);
}
function _fun101257(a0) { // fn#101257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:937, offset: 0x0220e856, size: 63 bytes, params: 2, frame: 14
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-xs/medium" color="text-feedback-positive">
{a0}
</Text>
);
}
function _fun101258() { // fn#101258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:1039, offset: 0x0220e895, size: 119 bytes, params: 1, frame: 19
var r0;
var Text;
var intl;
const showHintBinding = showHint;
let value = null;
if (showHintBinding) {
value = environment.__proto__;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = <Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.z7c4bP)}</Text>;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun101261() { // fn#101261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:1845, offset: 0x0220eec5, size: 129 bytes, params: 1, frame: 17
var environment;
var value2;
var defaultImport;
var setSection;
var ACCOUNT_CONFIRM_PASSWORD;
var binding;
var push;
if (env0_8) {
value2 = environment.__proto__;
defaultImport = importDefault(7508) /* metro dependency 7508: UserSettingsModalActionCreators */;
setSection = defaultImport.setSection;
ACCOUNT_CONFIRM_PASSWORD = UserSettingsSections.ACCOUNT_CONFIRM_PASSWORD;
Reflect.apply(setSection, defaultImport, [ACCOUNT_CONFIRM_PASSWORD]);
binding = env0_0;
push = binding.push;
ACCOUNT_CONFIRM_PASSWORD = UserSettingsSections.ACCOUNT_CONFIRM_PASSWORD;
var env0_0 = env1_4(_fun101263);
Reflect.apply(push, binding, [ACCOUNT_CONFIRM_PASSWORD, {onSubmit: onSubmit_101264,
onSuccess: onSuccess_101265}]);
}
}
function _fun101266() { // fn#101266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:2507, offset: 0x0220f0df, size: 51 bytes, params: 1, frame: 10
var current;
if (env0_2) {
current = env0_7.current;
if (current != null) {
current.focus();
const AVAILABLE = NameValidationState.AVAILABLE;
object.type = AVAILABLE;
object.message = P.select();
value = value.with(object, _fun101257);
return value.otherwise(_fun101258);
function _fun101256(a0) { // fn#101256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:767, offset: 0x0220e817, size: 63 bytes, params: 2, frame: 14
const Text = (TextModule).Text;
return (
<Text variant="text-xs/medium" color="text-feedback-critical">
{a0}
</Text>
);
}
} else {
env0_9();
}
}
function _fun101267() { // fn#101267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:2586, offset: 0x0220f112, size: 38 bytes, params: 1, frame: 12
const binding = env0_0;
binding.setOptions({headerRight: headerRight_101268});
}
function _fun101257(a0) { // fn#101257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:937, offset: 0x0220e856, size: 63 bytes, params: 2, frame: 14
const Text = (TextModule).Text;
return (
<Text variant="text-xs/medium" color="text-feedback-positive">
{a0}
</Text>
);
}
function _default_101259OnChange(a0) { // fn#101269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:3641, owner: _default_101259.onChange, offset: 0x0220f1c3, size: 71 bytes, params: 2, frame: 14
var r4;
let value = a0;
let currentUserBinding = currentUser;
if (currentUserBinding == null) {
r4 = value;
} else {
currentUserBinding = currentUser;
if (currentUserBinding.hasUniqueUsername()) {
value = value.toLowerCase();
r4 = value;
} else {
r4 = value;
function _fun101258() { // fn#101258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:1039, offset: 0x0220e895, size: 119 bytes, params: 1, frame: 19
var r0;
var Text;
var intl;
const showHintBinding = showHint;
let value = null;
if (showHintBinding) {
value = environment.__proto__;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = (
<Text variant="text-xs/medium" color="text-default">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.z7c4bP)}
</Text>
);
r0 = value;
} else {
r0 = value;
}
return r0;
}
}
env0_4(r4);
env0_6(null);
}
function* _fun101263(a0) { // fn#101263, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:1958, offset: 0x0220ef51, size: 321 bytes, params: 2, frame: 21
var binding;
var dispatch;
var CommonActions;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
if (importDefault != null) {
var value3 = undefined;
env2_6(null);
var object2 = {};
object2.username = dependencyMap;
object2.password = a0;
object2.discriminator = importAll ? env2_5 : value3;
binding = env3_2;
var value5 = binding(env3_3[18]);
yield value5.saveAccountChanges(object2, {close: false});
var value6 = undefined;
if (false) {
return value6;
}
if (value6.ok) {
return value6;
}
binding = env3_0;
var V6OrEarlierAPIError = binding(env3_3[19]).V6OrEarlierAPIError;
var v6OrEarlierAPIError = new V6OrEarlierAPIError(value6);
var getFieldMessage = v6OrEarlierAPIError.getFieldMessage;
if (Reflect.apply(getFieldMessage, v6OrEarlierAPIError, ['username']) != null) {
dispatch = require.dispatch;
CommonActions = env3_0(env3_3[20]).CommonActions;
Reflect.apply(dispatch, require, [CommonActions.navigate({name: env3_10.ACCOUNT_CHANGE_USERNAME})]);
env2_6(v6OrEarlierAPIError);
function _default_101259() { // fn#101259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:1179, offset: 0x0220e90c, size: 1465 bytes, params: 1, frame: 38
var r12;
const value2 = undefined;
const styles = useStyles();
const value3 = (UseNavigationNativeModule).useNavigation();
const useStateFromStores = FluxModule.useStateFromStores;
let object = [UserStore];
const currentUser = Reflect.apply(useStateFromStores, FluxModule, [object, function() {
return UserStore.getCurrentUser();
}]);
const r18 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canEditDiscriminator(currentUser) && !(currentUser != null && currentUser.hasUniqueUsername());
let binding = env0_6;
let useState = binding.useState;
let username = currentUser == null ? value2 : currentUser.username;
const value6 = '';
let r1 = username ?? value6;
const value8 = Module00057(Reflect.apply(useState, binding, [r1]), 2);
const property = value8[0];
const env0_4 = value8[1];
const value9 = env0_6.useState((currentUser == null ? value2 : currentUser.discriminator) ?? value6);
binding = Module00057;
const value10 = binding(value9, 2);
const property2 = value10[0];
const property3 = value10[1];
const binding2 = env0_6;
useState = binding2.useState;
const value11 = binding(Reflect.apply(useState, binding2, [null]), 2);
const property4 = value11[0];
var env0_6 = value11[1];
const useUsernameStatus = UseUsernameStatusModule.useUsernameStatus;
r1 = currentUser == null || !currentUser.hasUniqueUsername();
username = currentUser == null ? value2 : currentUser.username;
const value14 = Reflect.apply(useUsernameStatus, UseUsernameStatusModule, [property, !r1, false, username]);
const value15 = env0_6.useRef(null);
username = currentUser == null ? value2 : currentUser.username;
const r15 = (property !== username || property2 !== (currentUser == null ? value2 : currentUser.discriminator)) && (r18 ? RegExp('^\\d+$',
'').test(property2) && global.parseInt(property2) > 0 : !r18);
binding = env0_6;
const value21 = binding.useCallback(_fun101261, [r15, r18, property2, value3, currentUser, property]);
const value22 = binding.useCallback(_fun101266, [r18, value21]);
binding.useLayoutEffect(_fun101267, [r15, value21, value3]);
if (currentUser == null) {
return null;
}
getFieldMessage = v6OrEarlierAPIError.getFieldMessage;
if (Reflect.apply(getFieldMessage, v6OrEarlierAPIError, ['discriminator']) == null) {
return value6;
let r2 = property4 == null ? value2 : property4.getFieldMessage('username');
r2 = r2 ?? (property4 == null ? value2 : property4.getFieldMessage('discriminator'));
if (r2 == null) {
r12 = value14;
} else {
object = {};
object.type = (require(13282) /* metro dependency 13282: UniqueUsernamesTypes */).NameValidationState.ERROR;
object.message = r2;
r12 = object;
}
dispatch = require.dispatch;
binding = env3_0;
CommonActions = binding(env3_3[20]).CommonActions;
Reflect.apply(dispatch, require, [CommonActions.navigate({name: env3_10.ACCOUNT_CHANGE_USERNAME})]);
env2_6(v6OrEarlierAPIError);
const TextInput = (TextInputNativeModule).TextInput;
const textInput = (
<TextInput
{...r18 ? {ref: value15, containerStyle: styles.discriminator, keyboardType: 'numeric', value: property2,
onChange: property3, onSubmitEditing: value21, placeholder: '1337', returnKeyType: 'done',
autoCapitalize: 'none', isClearable: true, leadingText: '#', maxLength: 4} : {ref: value15,
containerStyle: styles.discriminator, value: '#' + property2, isClearable: false, isDisabled: true}}
/>
);
const value26 = ((Component) => <Component />)(UserSettingsAccountUnverifiedHeader);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
let IEpCBQ = (require(1244) /* metro dependency 1244: indexNative */).t.IEpCBQ;
const items2 = [
<FreeFormLabel>
{Reflect.apply(string, intl, [IEpCBQ])}
</FreeFormLabel>,
];
const object3 = {};
username = styles.username;
object3.containerStyle = username;
object3.textContentType = 'username';
object3.value = property;
object3.enableAndroidSanitizedInputWorkaround = currentUser.hasUniqueUsername();
object3.onChange = onChange_101269;
object3.onSubmitEditing = value22;
string = intl.string;
IEpCBQ = (require(1244) /* metro dependency 1244: indexNative */).t.IEpCBQ;
object3.placeholder = Reflect.apply(string, intl, [IEpCBQ]);
object3.returnKeyType = r18 ? 'next' : 'done';
object3.autoCapitalize = 'none';
object3.autoFocus = true;
const items3 = [
<TextInput {...object3} />,
];
items3[1] = !currentUser.hasUniqueUsername() && <View style={styles.divider}><View style={styles.dividerInner} /></View>;
items3[2] = !currentUser.hasUniqueUsername() && textInput;
items2[1] = (
<View style={styles.inputs}>
{items3}
</View>
);
items2[2] = <UsernameStatusMessage usernameStatus={r12} showHint={currentUser.hasUniqueUsername()} />;
return (
<ScrollView
style={styles.background}
keyboardShouldPersistTaps="handled"
alwaysBounceVertical={false}
>
{value26}
<View style={styles.container}>
{items2}
</View>
</ScrollView>
);
function _fun101261() { // fn#101261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:1845, offset: 0x0220eec5, size: 129 bytes, params: 1, frame: 17
var environment;
var value2;
var defaultImport;
var setSection;
var ACCOUNT_CONFIRM_PASSWORD;
var binding;
var push;
if (env0_8) {
value2 = environment.__proto__;
defaultImport = importDefault(7508) /* metro dependency 7508: UserSettingsModalActionCreators */;
setSection = defaultImport.setSection;
ACCOUNT_CONFIRM_PASSWORD = UserSettingsSections.ACCOUNT_CONFIRM_PASSWORD;
Reflect.apply(setSection, defaultImport, [ACCOUNT_CONFIRM_PASSWORD]);
binding = env0_0;
push = binding.push;
ACCOUNT_CONFIRM_PASSWORD = UserSettingsSections.ACCOUNT_CONFIRM_PASSWORD;
var env0_0 = env1_4(_fun101263);
Reflect.apply(push, binding, [ACCOUNT_CONFIRM_PASSWORD, {onSubmit: onSubmit_101264,
onSuccess: onSuccess_101265}]);
}
function* _fun101263(a0) { // fn#101263, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:1958, offset: 0x0220ef51, size: 321 bytes, params: 2, frame: 21
var binding;
var dispatch;
var CommonActions;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
if (importDefault != null) {
var value3 = undefined;
env2_6(null);
var object = {};
object.username = dependencyMap;
object.password = a0;
object.discriminator = importAll ? env2_5 : value3;
binding = env3_2;
var value5 = binding(env3_3[18]);
yield value5.saveAccountChanges(object, {close: false});
var value6 = undefined;
if (false) {
return value6;
}
if (value6.ok) {
return value6;
}
binding = env3_0;
var V6OrEarlierAPIError = binding(env3_3[19]).V6OrEarlierAPIError;
var v6OrEarlierAPIError = new V6OrEarlierAPIError(value6);
var getFieldMessage = v6OrEarlierAPIError.getFieldMessage;
if (Reflect.apply(getFieldMessage, v6OrEarlierAPIError, ['username']) != null) {
dispatch = require.dispatch;
CommonActions = env3_0(env3_3[20]).CommonActions;
Reflect.apply(dispatch, require, [CommonActions.navigate({name: env3_10.ACCOUNT_CHANGE_USERNAME})]);
env2_6(v6OrEarlierAPIError);
return null;
}
getFieldMessage = v6OrEarlierAPIError.getFieldMessage;
if (Reflect.apply(getFieldMessage, v6OrEarlierAPIError, ['discriminator']) == null) {
return value6;
}
dispatch = require.dispatch;
binding = env3_0;
CommonActions = binding(env3_3[20]).CommonActions;
Reflect.apply(dispatch, require, [CommonActions.navigate({name: env3_10.ACCOUNT_CHANGE_USERNAME})]);
env2_6(v6OrEarlierAPIError);
}
return null;
}
function onSubmit_101264() { // fn#101264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:2348, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function onSuccess_101265() { // fn#101265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:2402, offset: 0x0220f092, size: 77 bytes, params: 1, frame: 15
const binding = env1_0;
const dispatch = binding.dispatch;
const CommonActions = (Module01485Module).CommonActions;
const navigate = CommonActions.navigate;
const ACCOUNT = UserSettingsSections.ACCOUNT;
Reflect.apply(dispatch, binding, [Reflect.apply(navigate, CommonActions, [{name: ACCOUNT}])]);
}
}
function _fun101266() { // fn#101266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:2507, offset: 0x0220f0df, size: 51 bytes, params: 1, frame: 10
var current;
if (env0_2) {
current = env0_7.current;
if (current != null) {
current.focus();
}
} else {
env0_9();
}
}
function _fun101267() { // fn#101267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:2586, offset: 0x0220f112, size: 38 bytes, params: 1, frame: 12
const binding = env0_0;
binding.setOptions({headerRight: headerRight_101268});
function headerRight_101268(a0) { // fn#101268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:2617, offset: 0x0220f138, size: 139 bytes, params: 2, frame: 19
var r0;
var value3;
var HeaderTextButton;
var intl;
let value = environment.__proto__;
if (env1_8) {
value3 = environment.__proto__.__proto__;
HeaderTextButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderTextButton;
var headerTextButtonProps = {...a0};
headerTextButtonProps['onPress'] = env1_9;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+']);
headerTextButtonProps['label'] = value;
value = <HeaderTextButton {...headerTextButtonProps} />;
r0 = value;
} else {
r0 = null;
}
return r0;
}
}
function _default_101259OnChange(a0) { // fn#101269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:3641, owner: _default_101259.onChange, offset: 0x0220f1c3, size: 71 bytes, params: 2, frame: 14
var r4;
let value = a0;
let currentUserBinding = currentUser;
if (currentUserBinding == null) {
r4 = value;
} else {
currentUserBinding = currentUser;
if (currentUserBinding.hasUniqueUsername()) {
value = value.toLowerCase();
r4 = value;
} else {
r4 = value;
}
}
env0_4(r4);
env0_6(null);
}
}
return null;
}
function onSuccess_101265() { // fn#101265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:2402, offset: 0x0220f092, size: 77 bytes, params: 1, frame: 15
const binding = env1_0;
const dispatch = binding.dispatch;
const CommonActions = (require(1485) /* metro dependency 1485 */).CommonActions;
const navigate = CommonActions.navigate;
const ACCOUNT = UserSettingsSections.ACCOUNT;
Reflect.apply(dispatch, binding, [Reflect.apply(navigate, CommonActions, [{name: ACCOUNT}])]);
}
function headerRight_101268(a0) { // fn#101268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13471:2617, offset: 0x0220f138, size: 139 bytes, params: 2, frame: 19
var r0;
var value3;
var HeaderTextButton;
var intl;
let value = environment.__proto__;
if (env1_8) {
value3 = environment.__proto__.__proto__;
HeaderTextButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderTextButton;
var headerTextButtonProps = {...a0};
headerTextButtonProps['onPress'] = env1_9;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+']);
headerTextButtonProps['label'] = value;
value = <HeaderTextButton {...headerTextButtonProps} />;
r0 = value;
} else {
r0 = null;
}
return r0;
}
global.__d(_fun101254, 13281, [5, 57, 31, 27, 1878, 661, 33, 4501, 697, 4242, 13282, 4573, 1244, 1484, 566, 3802,
13283, 7508, 7620, 507, 1485, 9603, 7981, 9011, 8968,
2]) /* metro module 13281, dependencies: [5, 57, 31, 27, 1878, 661, 33, 4501, 697, 4242, 13282, 4573, 1244, 1484, 566, 3802, 13283, 7508, 7620, 507, 1485, 9603, 7981, 9011, 8968, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,186 +1,193 @@
/* Metro module 13320; source: modules/user_settings/account/native/UserSettingsInputAlert.tsx; dependencies: [6, 7, 15, 17, 18, 31, 33, 507, 4572, 4573, 7981, 4596, 5467, 2] */
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Alert from '../../../../components_native/common/Alert.tsx'; /* Metro dependency 4596 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextInputNativeModule from '../../../../design/components/TextInput/native/TextInput.native.tsx'; /* Metro dependency 7981 */
function _fun101479(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:6, offset: 0x022162cd, size: 288 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(33) /* metro dependency 33 */;
const env0_8 = value2.jsx;
const env0_9 = value2.jsxs;
let value = ReactModule;
object = {input: '', error: undefined};
const PureComponent = value.PureComponent;
value = _fun101483(PureComponent);
value.defaultProps = {'isLoading': false, 'useKeyboardAwareWrapper': false, 'secureTextEntry': true};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/UserSettingsInputAlert.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/UserSettingsInputAlert.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_101480() { // fn#101480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:185, offset: 0x022163ed, 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_101480_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun101483(a0) { // fn#101483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:410, offset: 0x0221644f, size: 97 bytes, params: 2, frame: 16
const closure = UserSettingsInputAlert;
env0_7(closure, a0);
return env0_4(closure, [{key: 'renderContent', value: value_101489}, {key: 'render', value: value_101491}]);
}
function UserSettingsInputAlert(a0) { // fn#101484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:422, offset: 0x022164b0, size: 168 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, UserSettingsInputAlert);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(UserSettingsInputAlert);
binding = env1_5;
if (_isNativeReflectConstruct_101480()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = env1_10;
value.close = close_101485;
value.handleSubmit = handleSubmit_101486;
return value;
}
function value_101489() { // fn#101489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:1156, offset: 0x022166c0, size: 336 bytes, params: 1, frame: 27
var environment;
const {placeholder, secureTextEntry, helpText, inputLabel} = this.props;
let error = this.props.error;
if (error == null) {
error = this.state.error;
} else {
error = this.props.error;
error = error !== '' ? this.props.error : this.state.error;
}
const value = environment.__proto__;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const r6 = helpText != null && ((Text) => <Text variant="text-md/normal">{helpText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
return (
<Stack spacing={16}>
{r6}
<TextInput
label={inputLabel}
placeholder={placeholder}
secureTextEntry={secureTextEntry}
returnKeyType="done"
autoFocus
status={error != null ? 'error' : 'default'}
errorMessage={error}
onSubmitEditing={this.handleSubmit}
onChange={onChange_101490}
/>
</Stack>
);
}
function value_101491() { // fn#101491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:1680, offset: 0x0221682e, size: 173 bytes, params: 1, frame: 20
var r0;
const {title, actionText, cancelText, confirmColor, useKeyboardAwareWrapper} = this.props;
let value = environment.__proto__;
const value2 = ((Component) => <Component title={title} confirmText={actionText} confirmColor={confirmColor} onConfirm={this.handleSubmit} cancelText={cancelText} onCancel={this.close}>{this.renderContent()}</Component>)(importDefault(4596) /* metro dependency 4596: Alert */);
if (useKeyboardAwareWrapper) {
value = importDefault(5467) /* metro dependency 5467: KeyboardAwareView */;
value = ((Component) => <Component>{value2}</Component>)(value);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function UserSettingsInputAlertClose() { // fn#101485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:692, owner: UserSettingsInputAlert.close, offset: 0x02216558, size: 34 bytes, params: 1, frame: 9
const onClose = env0_0.props.onClose;
if (onClose != null) {
onClose();
}
}
function UserSettingsInputAlertHandleSubmit() { // fn#101486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:748, owner: UserSettingsInputAlert.handleSubmit, offset: 0x0221657a, size: 137 bytes, params: 1, frame: 14
var value;
const binding = env0_0;
const props = binding.props;
const isLoading = props.isLoading;
const onSubmit = props.onSubmit;
var env0_0 = props.onSuccess;
const env0_1 = props.closeOnSuccess;
const env0_2 = props.onError;
const env0_3 = props.skipErrorMsgAbortCode;
if (!(isLoading || onSubmit == null)) {
value = onSubmit(binding.state.input);
value = value.then(_fun101487);
value.catch(_fun101488);
}
}
function value_101489OnChange(a0) { // fn#101490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:1625, owner: value_101489.onChange, offset: 0x02216810, size: 30 bytes, params: 2, frame: 12
return env0_0.setState({input: a0});
}
function _fun101487() { // fn#101487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:904, offset: 0x02216603, size: 51 bytes, params: 1, frame: 10
if (onSuccess != null) {
onSuccess();
}
if (closeOnSuccess) {
value = environment.__proto__;
env1_0.close();
}
}
function _fun101488(a0) { // fn#101488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:945, offset: 0x02216636, size: 138 bytes, params: 2, frame: 13
var value2;
var v6OrEarlierAPIError;
if (onError != null) {
onError(a0);
}
if (a0) {
if (a0.body) {
value2 = environment.__proto__.__proto__.__proto__;
v6OrEarlierAPIError = new (require(507) /* metro dependency 507: HTTPUtils */).V6OrEarlierAPIError(a0);
if (v6OrEarlierAPIError.code !== skipErrorMsgAbortCode) {
value = environment.__proto__;
env1_0.setState({error: v6OrEarlierAPIError.message});
}
function _isNativeReflectConstruct_101480() { // fn#101480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:185, offset: 0x022163ed, 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_101480_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun101483(a0) { // fn#101483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:410, offset: 0x0221644f, size: 97 bytes, params: 2, frame: 16
const UserSettingsInputAlert2 = UserSettingsInputAlert;
Inherits(UserSettingsInputAlert2, a0);
return CreateClass(UserSettingsInputAlert2, [{key: 'renderContent', value: value_101489}, {key: 'render',
value: value_101491}]);
function UserSettingsInputAlert(a0) { // fn#101484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:422, offset: 0x022164b0, size: 168 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, UserSettingsInputAlert);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(UserSettingsInputAlert);
binding = env1_5;
if (_isNativeReflectConstruct_101480()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.state = env1_10;
value.close = close_101485;
value.handleSubmit = handleSubmit_101486;
return value;
function UserSettingsInputAlertClose() { // fn#101485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:692, owner: UserSettingsInputAlert.close, offset: 0x02216558, size: 34 bytes, params: 1, frame: 9
const onClose = env0_0.props.onClose;
if (onClose != null) {
onClose();
}
}
function UserSettingsInputAlertHandleSubmit() { // fn#101486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:748, owner: UserSettingsInputAlert.handleSubmit, offset: 0x0221657a, size: 137 bytes, params: 1, frame: 14
var value;
const binding = onSuccess;
const props = binding.props;
const isLoading = props.isLoading;
const onSubmit = props.onSubmit;
var onSuccess = props.onSuccess;
const env0_1 = props.closeOnSuccess;
const env0_2 = props.onError;
const env0_3 = props.skipErrorMsgAbortCode;
if (!(isLoading || onSubmit == null)) {
value = onSubmit(binding.state.input);
value = value.then(_fun101487);
value.catch(_fun101488);
}
function _fun101487() { // fn#101487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:904, offset: 0x02216603, size: 51 bytes, params: 1, frame: 10
if (onSuccess != null) {
onSuccess();
}
if (closeOnSuccess) {
value = environment.__proto__;
env1_0.close();
}
}
function _fun101488(a0) { // fn#101488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:945, offset: 0x02216636, size: 138 bytes, params: 2, frame: 13
var value2;
var v6OrEarlierAPIError;
if (onError != null) {
onError(a0);
}
if (a0) {
if (a0.body) {
value2 = environment.__proto__.__proto__.__proto__;
v6OrEarlierAPIError = new (require(507) /* metro dependency 507: HTTPUtils */).V6OrEarlierAPIError(a0);
if (v6OrEarlierAPIError.code !== skipErrorMsgAbortCode) {
value = environment.__proto__;
env1_0.setState({error: v6OrEarlierAPIError.message});
}
}
}
}
}
}
function value_101489() { // fn#101489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:1156, offset: 0x022166c0, size: 336 bytes, params: 1, frame: 27
var environment;
const {placeholder, secureTextEntry, helpText, inputLabel} = this.props;
let error = this.props.error;
if (error == null) {
error = this.state.error;
} else {
error = this.props.error;
error = error !== '' ? this.props.error : this.state.error;
}
const value = environment.__proto__;
const Stack = (StackNativeModule).Stack;
const r6 = helpText != null && ((Text) => <Text variant="text-md/normal">{helpText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
const TextInput = (TextInputNativeModule).TextInput;
return (
<Stack spacing={16}>
{r6}
<TextInput
label={inputLabel}
placeholder={placeholder}
secureTextEntry={secureTextEntry}
returnKeyType="done"
autoFocus
status={error != null ? 'error' : 'default'}
errorMessage={error}
onSubmitEditing={this.handleSubmit}
onChange={onChange_101490}
/>
</Stack>
);
function value_101489OnChange(a0) { // fn#101490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:1625, owner: value_101489.onChange, offset: 0x02216810, size: 30 bytes, params: 2, frame: 12
return env0_0.setState({input: a0});
}
}
function value_101491() { // fn#101491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13510:1680, offset: 0x0221682e, size: 173 bytes, params: 1, frame: 20
var r0;
const {title, actionText, cancelText, confirmColor, useKeyboardAwareWrapper} = this.props;
let value = environment.__proto__;
const value2 = ((Component) => <Component title={title} confirmText={actionText} confirmColor={confirmColor} onConfirm={this.handleSubmit} cancelText={cancelText} onCancel={this.close}>{this.renderContent()}</Component>)(Alert);
if (useKeyboardAwareWrapper) {
value = importDefault(5467) /* metro dependency 5467: KeyboardAwareView */;
value = ((Component) => <Component>{value2}</Component>)(value);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
}
}
global.__d(_fun101479, 13320, [6, 7, 15, 17, 18, 31, 33, 507, 4572, 4573, 7981, 4596, 5467,
2]) /* metro module 13320, dependencies: [6, 7, 15, 17, 18, 31, 33, 507, 4572, 4573, 7981, 4596, 5467, 2] */;
@@ -1,88 +1,94 @@
/* Metro module 13334; source: modules/user_settings/account/native/handleDisableAccount.tsx; dependencies: [1867, 1878, 1244, 7620, 13319, 4647, 2] */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UserSettingsAccountActionCreatorsModule from '../../../../actions/UserSettingsAccountActionCreators.tsx'; /* Metro dependency 7620 */
function _fun101558(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:6, offset: 0x02218625, size: 134 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/handleDisableAccount.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/handleDisableAccount.tsx');
exports.default = handleDisableAccount;
}
function handleDisableAccount() { // fn#101559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:221, offset: 0x022186ab, size: 232 bytes, params: 1, frame: 16
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var value2;
var value3;
let value = a0;
let r2 = value !== undefined ? value : false;
if (hasOwnedGuilds()) {
value2 = intl.string(t.vJiTOL);
value3 = intl.string(t.UyVVan);
value = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
value.show({title: value2, body: value3});
} else {
r2 = r2 ? getDeleteAlertProps() : getDisableAlertProps();
(importDefault(13319) /* metro dependency 13319: showUserSettingsInputAlert */)(r2);
}
function hasOwnedGuilds() { // fn#101560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:260, owner: handleDisableAccount.hasOwnedGuilds, offset: 0x02218793, size: 65 bytes, params: 1, frame: 12
var environment;
var r0;
let value = environment.__proto__;
const value3 = UserStore.getCurrentUser() != null;
if (value3) {
value = GuildStore.getGuildsArray();
value = value.some(_fun101561);
r0 = value;
} else {
r0 = value3;
}
return r0;
function _fun101561({ownerId}) { // fn#101561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:352, offset: 0x022187d4, size: 27 bytes, params: 2, frame: 2
return ownerId === env0_0.id;
}
}
function getDeleteAlertProps() { // fn#101562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:506, owner: handleDisableAccount.getDeleteAlertProps, offset: 0x022187ef, size: 158 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
value = Reflect.apply(string, intl, [t['CIGa+7']]);
value = value.toUpperCase();
const object = {onSubmit: onSubmit_101563};
object.title = intl.string(t['8lQ2rR']).toUpperCase();
object.placeholder = value;
object.closeOnSuccess = true;
return object;
function getDeleteAlertPropsOnSubmit(a0) { // fn#101563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:614, owner: handleDisableAccount.getDeleteAlertProps.onSubmit, offset: 0x0221888d, size: 44 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (UserSettingsAccountActionCreatorsModule).disableAccount(a0, true);
}
}
function getDisableAlertProps() { // fn#101564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:743, owner: handleDisableAccount.getDisableAlertProps, offset: 0x022188b9, size: 158 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
value = Reflect.apply(string, intl, [t['CIGa+7']]);
value = value.toUpperCase();
const object = {onSubmit: onSubmit_101565};
object.title = intl.string(t.jf5GGb).toUpperCase();
object.placeholder = value;
object.closeOnSuccess = true;
return object;
function getDisableAlertPropsOnSubmit(a0) { // fn#101565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:852, owner: handleDisableAccount.getDisableAlertProps.onSubmit, offset: 0x02218957, size: 44 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (UserSettingsAccountActionCreatorsModule).disableAccount(a0, false);
}
}
function handleDisableAccount() { // fn#101559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:221, offset: 0x022186ab, size: 232 bytes, params: 1, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value2;
var value3;
let value = a0;
let r2 = value !== undefined ? value : false;
if (hasOwnedGuilds()) {
value2 = intl.string(t.vJiTOL);
value3 = intl.string(t.UyVVan);
value = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
value.show({title: value2, body: value3});
} else {
r2 = r2 ? getDeleteAlertProps() : getDisableAlertProps();
(importDefault(13319) /* metro dependency 13319: showUserSettingsInputAlert */)(r2);
}
}
function hasOwnedGuilds() { // fn#101560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:260, owner: handleDisableAccount.hasOwnedGuilds, offset: 0x02218793, size: 65 bytes, params: 1, frame: 12
var environment;
var r0;
let value = environment.__proto__;
const value3 = UserStore.getCurrentUser() != null;
if (value3) {
value = GuildStore.getGuildsArray();
value = value.some(_fun101561);
r0 = value;
} else {
r0 = value3;
}
return r0;
}
function getDeleteAlertProps() { // fn#101562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:506, owner: handleDisableAccount.getDeleteAlertProps, offset: 0x022187ef, size: 158 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
value = Reflect.apply(string, intl, [t['CIGa+7']]);
value = value.toUpperCase();
const object2 = {onSubmit: onSubmit_101563};
object2.title = intl.string(t['8lQ2rR']).toUpperCase();
object2.placeholder = value;
object2.closeOnSuccess = true;
return object2;
}
function getDisableAlertProps() { // fn#101564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:743, owner: handleDisableAccount.getDisableAlertProps, offset: 0x022188b9, size: 158 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
value = Reflect.apply(string, intl, [t['CIGa+7']]);
value = value.toUpperCase();
const object2 = {onSubmit: onSubmit_101565};
object2.title = intl.string(t.jf5GGb).toUpperCase();
object2.placeholder = value;
object2.closeOnSuccess = true;
return object2;
}
function _fun101561({ownerId}) { // fn#101561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:352, offset: 0x022187d4, size: 27 bytes, params: 2, frame: 2
return ownerId === env0_0.id;
}
function getDeleteAlertPropsOnSubmit(a0) { // fn#101563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:614, owner: handleDisableAccount.getDeleteAlertProps.onSubmit, offset: 0x0221888d, size: 44 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (require(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */).disableAccount(a0, true);
}
function getDisableAlertPropsOnSubmit(a0) { // fn#101565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13524:852, owner: handleDisableAccount.getDisableAlertProps.onSubmit, offset: 0x02218957, size: 44 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (require(7620) /* metro dependency 7620: UserSettingsAccountActionCreators */).disableAccount(a0, false);
}
global.__d(_fun101558, 13334, [1867, 1878, 1244, 7620, 13319, 4647,
2]) /* metro module 13334, dependencies: [1867, 1878, 1244, 7620, 13319, 4647, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 13306; source: modules/user_settings/account/native/mfa_modal_flow/TwoFAConstants.tsx; dependencies: [661, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
function _fun101414(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13496:6, offset: 0x02213813, size: 185 bytes, params: 8, frame: 19
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const AnalyticsSections = (require(661) /* metro dependency 661: Constants */).AnalyticsSections;
const AnalyticsSections = (ConstantsModule).AnalyticsSections;
Object = global.Object;
const freeze = Object.freeze;
const IOS_TWO_FA_LANDING = AnalyticsSections.IOS_TWO_FA_LANDING;
@@ -14,7 +17,8 @@ function _fun101414(global, require, importDefault, importAll, module, exports,
const value = Reflect.apply(freeze, Object, [{LANDING: IOS_TWO_FA_LANDING, SCAN: IOS_TWO_FA_SCAN,
ENTER_CODE: IOS_TWO_FA_ENTER_CODE, SUCCESS: IOS_TWO_FA_SUCCESS, ADD_SMS: IOS_TWO_FA_ADD_SMS,
VERIFY_SMS: IOS_TWO_FA_VERIFY_SMS}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFAConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFAConstants.tsx');
exports.TwoFAModalSetupSections = value;
}
global.__d(_fun101414, 13306, [661, 2]) /* metro module 13306, dependencies: [661, 2] */;
@@ -1,90 +1,106 @@
/* Metro module 13312; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupEnterCode.tsx; dependencies: [57, 31, 7030, 13306, 33, 4501, 13309, 1484, 566, 8980, 13267, 1244, 13305, 6618, 1305, 13313, 6619, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseRefValue from '../../../../../hooks/useRefValue.tsx'; /* Metro dependency 6619 */
import AppStateStore from '../../../../../stores/native/AppStateStore.tsx'; /* Metro dependency 7030 */
import MFACodeInput from '../../../../auth/native/components/MFACodeInput.tsx'; /* Metro dependency 13313 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UseNavigationNativeModule from '../../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SafeAreaViewModule from '../../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as MFAUtilsModule from '../../../../../utils/MFAUtils.tsx'; /* Metro dependency 8980 */
import * as TwoFASetupModalModule from './TwoFASetupModal.tsx'; /* Metro dependency 13305 */
import * as TwoFAConstantsModule from './TwoFAConstants.tsx'; /* Metro dependency 13306 */
import * as TwoFASetupStylesModule from './TwoFASetupStyles.tsx'; /* Metro dependency 13309 */
function _fun101425(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13502:6, offset: 0x022142e3, size: 251 bytes, params: 8, frame: 19
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 appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
const env0_6 = (require(13306) /* metro dependency 13306: TwoFAConstants */).TwoFAModalSetupSections;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
const env0_9 = (CreateStylesModule).createStyles({container: {'flex': 1,
'justifyContent': 'center', 'alignItems': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupEnterCode.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupEnterCode.tsx');
exports.default = TwoFASetupEnterCode;
}
function TwoFASetupEnterCode(a0) { // fn#101426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13502:396, offset: 0x022143de, size: 535 bytes, params: 2, frame: 29
const env0_0 = a0;
const styles = useStyles();
const value2 = (TwoFASetupStylesModule).useTwoFASetupStyles();
const env0_1 = ReactModule.useRef(a0);
ReactModule.useEffect(_fun101427);
const value3 = (UseNavigationNativeModule).useNavigation();
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
return AppStateStore.getState();
});
const [property, env0_3] = env0_3Binding(ReactModule.useState(false), 2);
const value6 = ReactModule.useRef(null);
const value7 = ReactModule.useRef(null);
const value8 = ReactModule.useCallback(_fun101429, [value3]);
const TwoFASetupModalScreen = (TwoFASetupModalModule).TwoFASetupModalScreen;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const LegacyText = (NativeModule).LegacyText;
const items2 = [value2.modalHeader];
items2[1] = value2.text;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const HZPBOd = (IndexNativeModule).t.HZPBOd;
return (
<TwoFASetupModalScreen>
<SafeAreaPaddingView bottom style={styles.container}>
<LegacyText style={items2}>
{Reflect.apply(string, intl, [HZPBOd])}
</LegacyText>
{((Component) => <Component style={{maxHeight: 520}} ref={value7} showActivityIndicator={property} handleSubmit={value8} error={(UseRefValue)(value6)} appState={state} />)(MFACodeInput)}
</SafeAreaPaddingView>
</TwoFASetupModalScreen>
);
function _fun101427() { // fn#101427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13502:497, offset: 0x00e655cf, size: 21 bytes, params: 1, frame: 2
env0_1.current = env0_0;
}
function TwoFASetupEnterCode(a0) { // fn#101426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13502:396, offset: 0x022143de, size: 535 bytes, params: 2, frame: 29
const env0_0 = a0;
const styles = useStyles();
const value2 = (require(13309) /* metro dependency 13309: TwoFASetupStyles */).useTwoFASetupStyles();
const binding = env0_4;
const env0_1 = binding.useRef(a0);
binding.useEffect(_fun101427);
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
return AppStateStore.getState();
});
const [property, env0_3] = env0_3Binding(binding.useState(false), 2);
const value6 = binding.useRef(null);
const value7 = binding.useRef(null);
const value8 = binding.useCallback(_fun101429, [value3]);
const TwoFASetupModalScreen = (require(13305) /* metro dependency 13305: TwoFASetupModal */).TwoFASetupModalScreen;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const items2 = [value2.modalHeader];
items2[1] = value2.text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const HZPBOd = (require(1244) /* metro dependency 1244: indexNative */).t.HZPBOd;
return (
<TwoFASetupModalScreen>
<SafeAreaPaddingView bottom style={styles.container}>
<LegacyText style={items2}>
{Reflect.apply(string, intl, [HZPBOd])}
</LegacyText>
{((Component) => <Component style={{maxHeight: 520}} ref={value7} showActivityIndicator={property} handleSubmit={value8} error={(importDefault(6619) /* metro dependency 6619: useRefValue */)(value6)} appState={state} />)(importDefault(13313) /* metro dependency 13313: MFACodeInput */)}
</SafeAreaPaddingView>
</TwoFASetupModalScreen>
);
}
function _fun101429(a0) { // fn#101429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13502:691, offset: 0x022145f5, size: 145 bytes, params: 2, frame: 16
var value;
const value3 = (MFAUtilsModule).encodeTotpSecret(env0_1.current.totpSecret);
env0_3(true);
value = Reflect.apply((importDefault(13267) /* metro dependency 13267: MFAActionCreators */).enable, value,
[{code: a0, secret: value3}]);
value = value.then(_fun101430);
value.catch(_fun101431);
function _fun101430() { // fn#101430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13502:799, offset: 0x02214686, size: 34 bytes, params: 1, frame: 11
const binding = env1_2;
const push = binding.push;
const SUCCESS = TwoFAModalSetupSections.SUCCESS;
Reflect.apply(push, binding, [SUCCESS]);
}
function _fun101429(a0) { // fn#101429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13502:691, offset: 0x022145f5, size: 145 bytes, params: 2, frame: 16
var value;
const value3 = (require(8980) /* metro dependency 8980: MFAUtils */).encodeTotpSecret(env0_1.current.totpSecret);
env0_3(true);
value = Reflect.apply((importDefault(13267) /* metro dependency 13267: MFAActionCreators */).enable, value,
[{code: a0, secret: value3}]);
value = value.then(_fun101430);
value.catch(_fun101431);
}
function _fun101431(a0) { // fn#101431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13502:832, offset: 0x022146a8, size: 139 bytes, params: 2, frame: 18
var r2;
var value2;
var intl;
const binding = env1_4;
if (a0.body != null) {
r2 = a0.body.message;
} else {
value2 = environment.__proto__.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1u5B+G']);
}
binding.current = r2;
const current = env1_5.current;
if (current != null) {
current.clear();
}
env1_3(false);
}
function _fun101430() { // fn#101430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13502:799, offset: 0x02214686, size: 34 bytes, params: 1, frame: 11
const binding = env1_2;
const push = binding.push;
const SUCCESS = TwoFAModalSetupSections.SUCCESS;
Reflect.apply(push, binding, [SUCCESS]);
}
}
function _fun101431(a0) { // fn#101431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13502:832, offset: 0x022146a8, size: 139 bytes, params: 2, frame: 18
var r2;
var value2;
var intl;
const binding = env1_4;
if (a0.body != null) {
r2 = a0.body.message;
} else {
value2 = environment.__proto__.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1u5B+G']);
}
binding.current = r2;
const current = env1_5.current;
if (current != null) {
current.clear();
}
env1_3(false);
}
global.__d(_fun101425, 13312, [57, 31, 7030, 13306, 33, 4501, 13309, 1484, 566, 8980, 13267, 1244, 13305, 6618,
1305, 13313, 6619,
2]) /* metro module 13312, dependencies: [57, 31, 7030, 13306, 33, 4501, 13309, 1484, 566, 8980, 13267, 1244, 13305, 6618, 1305, 13313, 6619, 2] */;
@@ -1,51 +1,73 @@
/* Metro module 13308; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupLanding.tsx; dependencies: [31, 27, 33, 4501, 13309, 13305, 6618, 13310, 4573, 1244, 2] */
import Module13310 from '../../../../../by-id/module-13310.js'; /* Metro dependency 13310 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SafeAreaViewModule from '../../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as TwoFASetupModalModule from './TwoFASetupModal.tsx'; /* Metro dependency 13305 */
import * as TwoFASetupStylesModule from './TwoFASetupStyles.tsx'; /* Metro dependency 13309 */
function _fun101418(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13498:6, offset: 0x02213b45, size: 243 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.Image;
const env0_4 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
const env0_7 = (CreateStylesModule).createStyles({container: {'flex': 1,
'alignItems': 'center', 'justifyContent': 'center'}, authIcon: {'width': 120, 'height': 120,
'marginBottom': 32}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupLanding.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupLanding.tsx');
exports.default = TwoFASetupLanding;
function TwoFASetupLanding() { // fn#101419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13498:415, offset: 0x02213c38, size: 426 bytes, params: 1, frame: 29
const styles = useStyles();
const value2 = (TwoFASetupStylesModule).useTwoFASetupStyles();
const TwoFASetupModalScreen = (TwoFASetupModalModule).TwoFASetupModalScreen;
const object2 = {};
let container = styles.container;
object2.style = container;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
container = styles.container;
const items3 = [
<Image source={Module13310} style={styles.authIcon} />,
];
const Heading = (TextModule).Heading;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = (
<Heading variant="heading-xl/extrabold" color="mobile-text-heading-primary">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9E74Dx'])}
</Heading>
);
const Text = (TextModule).Text;
const items2 = [value2.modalBody];
items2[1] = value2.text;
const format = intl.format;
const A7Aehw = (require(1244) /* metro dependency 1244: indexNative */).t.A7Aehw;
items3[2] = (
<Text variant="text-md/normal" style={items2}>
{Reflect.apply(format, intl, [A7Aehw,
{'googleAuthURL': 'https://support.google.com/accounts/answer/1066447?hl=en',
'authyURL': 'https://www.authy.com/'}])}
</Text>
);
return (
<TwoFASetupModalScreen>
<View {...object2}>
<SafeAreaPaddingView bottom style={container}>
{items3}
</SafeAreaPaddingView>
</View>
</TwoFASetupModalScreen>
);
}
}
function TwoFASetupLanding() { // fn#101419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13498:415, offset: 0x02213c38, size: 426 bytes, params: 1, frame: 29
const styles = useStyles();
const value2 = (require(13309) /* metro dependency 13309: TwoFASetupStyles */).useTwoFASetupStyles();
const TwoFASetupModalScreen = (require(13305) /* metro dependency 13305: TwoFASetupModal */).TwoFASetupModalScreen;
const object = {};
let container = styles.container;
object.style = container;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
container = styles.container;
const items3 = [<Image source={importDefault(13310) /* metro dependency 13310 */} style={styles.authIcon} />];
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = <Heading variant="heading-xl/extrabold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9E74Dx'])}</Heading>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [value2.modalBody];
items2[1] = value2.text;
const format = intl.format;
const A7Aehw = (require(1244) /* metro dependency 1244: indexNative */).t.A7Aehw;
items3[2] = <Text variant="text-md/normal" style={items2}>{Reflect.apply(format, intl, [A7Aehw,
{'googleAuthURL': 'https://support.google.com/accounts/answer/1066447?hl=en',
'authyURL': 'https://www.authy.com/'}])}</Text>;
return (
<TwoFASetupModalScreen>
<View {...object}>
<SafeAreaPaddingView bottom style={container}>
{items3}
</SafeAreaPaddingView>
</View>
</TwoFASetupModalScreen>
);
}
global.__d(_fun101418, 13308, [31, 27, 33, 4501, 13309, 13305, 6618, 13310, 4573, 1244,
2]) /* metro module 13308, dependencies: [31, 27, 33, 4501, 13309, 13305, 6618, 13310, 4573, 1244, 2] */;
@@ -1,159 +1,181 @@
/* Metro module 13305; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupModal.tsx; dependencies: [31, 27, 13306, 33, 4501, 697, 1484, 13304, 6618, 4578, 1244, 13307, 5282, 13308, 13311, 13312, 13314, 6518, 8980, 5280, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseInitialValue from '../../../../../hooks/useInitialValue.tsx'; /* Metro dependency 6518 */
import TwoFASetupLanding from './TwoFASetupLanding.tsx'; /* Metro dependency 13308 */
import TwoFASetupScan from './TwoFASetupScan.tsx'; /* Metro dependency 13311 */
import TwoFASetupEnterCode from './TwoFASetupEnterCode.tsx'; /* Metro dependency 13312 */
import TwoFASetupSuccess from './TwoFASetupSuccess.tsx'; /* Metro dependency 13314 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as NavigatorNativeModule from '../../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as TwoFAConstantsModule from './TwoFAConstants.tsx'; /* Metro dependency 13306 */
import * as TwoFASetupModalHeaderModule from './TwoFASetupModalHeader.tsx'; /* Metro dependency 13307 */
function _fun101399(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:6, offset: 0x0221310c, size: 341 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const TwoFAModalSetupSections = (require(13306) /* metro dependency 13306: TwoFAConstants */).TwoFAModalSetupSections;
let value = require(33) /* metro dependency 33 */;
const TwoFAModalSetupSections = (TwoFAConstantsModule).TwoFAModalSetupSections;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
const env0_8 = Reflect.apply(createStyles, value, [{container: {flex: 1, backgroundColor: BACKGROUND_BASE_LOW},
floatingButton: {'position': 'absolute', 'bottom': 12, 'left': 12, 'right': 12}}]);
object2 = {};
object = {};
const LANDING = TwoFAModalSetupSections.LANDING;
object2[LANDING] = 1;
object[LANDING] = 1;
const SCAN = TwoFAModalSetupSections.SCAN;
object2[SCAN] = 2;
object[SCAN] = 2;
const ENTER_CODE = TwoFAModalSetupSections.ENTER_CODE;
object2[ENTER_CODE] = 3;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupModal.tsx');
object[ENTER_CODE] = 3;
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupModal.tsx');
exports.default = TwoFASetupModal;
exports.TwoFASetupModalScreen = TwoFASetupModalScreen;
}
function getPageMarker(a0) { // fn#101400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:388, offset: 0x02213261, size: 100 bytes, params: 2, frame: 16
const Object = global.Object;
const length = Object.keys(env0_9).length;
const PageMarker = (require(13307) /* metro dependency 13307: TwoFASetupModalHeader */).PageMarker;
return <PageMarker currentPage={env0_9[a0]} numMarkers={length - 1} />;
}
function TwoFASetupModal({initialRouteName = TwoFAModalSetupSections.LANDING}) { // fn#101401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:622, offset: 0x022132c5, size: 172 bytes, params: 2, frame: 18
const value2 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun101402);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Navigator
initialRouteName={initialRouteName}
screens={value2}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
headerTitleAlign="center"
/>
);
}
function TwoFASetupModalScreen({children}) { // fn#101412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:1374, offset: 0x022135b2, size: 432 bytes, params: 2, frame: 27
var r5;
var SafeAreaPaddingView;
var Button;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
let getState = value2.getState;
const routes = Reflect.apply(getState, value2, []).routes;
getState = value2.getState;
const name = routes[Reflect.apply(getState, value2, []).routes.length - 1].name;
const ENTER_CODE = TwoFAModalSetupSections.ENTER_CODE;
const value3 = name !== ENTER_CODE;
if (value3) {
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
var safeAreaPaddingViewProps = {bottom: true, style: styles.floatingButton};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r5 = <SafeAreaPaddingView {...safeAreaPaddingViewProps}><Button onPress={env0_3.useCallback(_fun101413, [value2,
name])} text={name === TwoFAModalSetupSections.SUCCESS ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i4jeWR) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XiOHRX)} /></SafeAreaPaddingView>;
} else {
r5 = value3;
function getPageMarker(a0) { // fn#101400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:388, offset: 0x02213261, size: 100 bytes, params: 2, frame: 16
const Object = global.Object;
const length = Object.keys(env0_9).length;
const PageMarker = (TwoFASetupModalHeaderModule).PageMarker;
return <PageMarker currentPage={env0_9[a0]} numMarkers={length - 1} />;
}
return (
<View style={styles.container}>
{children}
{r5}
</View>
);
}
function _fun101402() { // fn#101402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:695, offset: 0x02213371, size: 51 bytes, params: 1, frame: 11
var environment;
let value = environment.__proto__;
value = require(8980) /* metro dependency 8980: MFAUtils */;
value = value.generateTotpSecret();
return getScreens_101403(value);
}
function TwoFASetupModal({initialRouteName = TwoFAModalSetupSections.LANDING}) { // fn#101401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:622, offset: 0x022132c5, size: 172 bytes, params: 2, frame: 18
const value2 = (UseInitialValue)(_fun101402);
const Navigator = (NavigatorNativeModule).Navigator;
const intl = (IndexNativeModule).intl;
return (
<Navigator
initialRouteName={initialRouteName}
screens={value2}
headerBackTitle={intl.string((IndexNativeModule).t['13/7kX'])}
headerTitleAlign="center"
/>
);
function _fun101402() { // fn#101402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:695, offset: 0x02213371, size: 51 bytes, params: 1, frame: 11
var environment;
let value = environment.__proto__;
value = require(8980) /* metro dependency 8980: MFAUtils */;
value = value.generateTotpSecret();
return getScreens_101403(value);
function getScreens_101403(a0) { // fn#101403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:699, offset: 0x022133a4, size: 268 bytes, params: 2, frame: 22
var environment;
const env0_0 = a0;
const object = {};
const value = environment.__proto__.__proto__;
const LANDING = TwoFAModalSetupSections.LANDING;
const object2 = {};
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(13304) /* metro dependency 13304: TwoFASetupModalActionCreators */).close);
object2.headerTitle = function() {
return getPageMarker(TwoFAModalSetupSections.LANDING);
};
object2.render = render_101405;
object[LANDING] = object2;
const SCAN = TwoFAModalSetupSections.SCAN;
object[SCAN] = {headerTitle: function() {
return getPageMarker(TwoFAModalSetupSections.SCAN);
}, render: render_101407};
const ENTER_CODE = TwoFAModalSetupSections.ENTER_CODE;
object[ENTER_CODE] = {headerTitle: function() {
return getPageMarker(TwoFAModalSetupSections.ENTER_CODE);
}, render: render_101409};
const SUCCESS = TwoFAModalSetupSections.SUCCESS;
const object5 = {};
object5.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(13304) /* metro dependency 13304: TwoFASetupModalActionCreators */).close);
object5.headerTitle = function() {
return null;
};
object5.render = render_101411;
object[SUCCESS] = object5;
return object;
function getScreens_101403Render() { // fn#101405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:846, owner: getScreens_101403.render, offset: 0x022134ca, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component />)(TwoFASetupLanding);
}
function getScreens_101403Render_101407() { // fn#101407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:921, owner: getScreens_101403.render, offset: 0x0221350b, size: 51 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component totpSecret={env0_0} />)(TwoFASetupScan);
}
function getScreens_101403Render_101409() { // fn#101409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:1020, owner: getScreens_101403.render, offset: 0x02213558, size: 51 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component totpSecret={env0_0} />)(TwoFASetupEnterCode);
}
function getScreens_101403Render_101411() { // fn#101411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:1149, owner: getScreens_101403.render, offset: 0x0221358b, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component />)(TwoFASetupSuccess);
}
}
}
function _fun101413() { // fn#101413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:1548, offset: 0x02213762, size: 177 bytes, params: 1, frame: 13
var binding;
const nameBinding = name;
const LANDING = TwoFAModalSetupSections.LANDING;
if (nameBinding === LANDING) {
binding = env0_0;
binding.push(TwoFAModalSetupSections.SCAN);
} else if (name === TwoFAModalSetupSections.SCAN) {
binding = env0_0;
binding.push(TwoFAModalSetupSections.ENTER_CODE);
} else if (name === TwoFAModalSetupSections.ENTER_CODE) {
binding = env0_0;
binding.push(TwoFAModalSetupSections.SUCCESS);
} else {
(importDefault(13304) /* metro dependency 13304: TwoFASetupModalActionCreators */).close();
}
function TwoFASetupModalScreen({children}) { // fn#101412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:1374, offset: 0x022135b2, size: 432 bytes, params: 2, frame: 27
var r5;
var SafeAreaPaddingView;
var Button;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const value2 = (UseNavigationNativeModule).useNavigation();
let getState = value2.getState;
const routes = Reflect.apply(getState, value2, []).routes;
getState = value2.getState;
const name = routes[Reflect.apply(getState, value2, []).routes.length - 1].name;
const ENTER_CODE = TwoFAModalSetupSections.ENTER_CODE;
const value3 = name !== ENTER_CODE;
if (value3) {
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
var safeAreaPaddingViewProps = {bottom: true, style: styles.floatingButton};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r5 = (
<SafeAreaPaddingView {...safeAreaPaddingViewProps}>
<Button
onPress={ReactModule.useCallback(_fun101413, [value2, name])}
text={name === TwoFAModalSetupSections.SUCCESS ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i4jeWR) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XiOHRX)}
/>
</SafeAreaPaddingView>
);
} else {
r5 = value3;
}
return (
<View style={styles.container}>
{children}
{r5}
</View>
);
function _fun101413() { // fn#101413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:1548, offset: 0x02213762, size: 177 bytes, params: 1, frame: 13
var binding;
const nameBinding = name;
const LANDING = TwoFAModalSetupSections.LANDING;
if (nameBinding === LANDING) {
binding = env0_0;
binding.push(TwoFAModalSetupSections.SCAN);
} else if (name === TwoFAModalSetupSections.SCAN) {
binding = env0_0;
binding.push(TwoFAModalSetupSections.ENTER_CODE);
} else if (name === TwoFAModalSetupSections.ENTER_CODE) {
binding = env0_0;
binding.push(TwoFAModalSetupSections.SUCCESS);
} else {
(importDefault(13304) /* metro dependency 13304: TwoFASetupModalActionCreators */).close();
}
}
}
}
function getScreens_101403(a0) { // fn#101403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:699, offset: 0x022133a4, size: 268 bytes, params: 2, frame: 22
var environment;
const env0_0 = a0;
const object3 = {};
const value = environment.__proto__.__proto__;
const LANDING = TwoFAModalSetupSections.LANDING;
const object4 = {};
object4.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(13304) /* metro dependency 13304: TwoFASetupModalActionCreators */).close);
object4.headerTitle = function() {
return getPageMarker(TwoFAModalSetupSections.LANDING);
};
object4.render = render_101405;
object3[LANDING] = object4;
const SCAN = TwoFAModalSetupSections.SCAN;
object3[SCAN] = {headerTitle: function() {
return getPageMarker(TwoFAModalSetupSections.SCAN);
}, render: render_101407};
const ENTER_CODE = TwoFAModalSetupSections.ENTER_CODE;
object3[ENTER_CODE] = {headerTitle: function() {
return getPageMarker(TwoFAModalSetupSections.ENTER_CODE);
}, render: render_101409};
const SUCCESS = TwoFAModalSetupSections.SUCCESS;
const object6 = {};
object6.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(13304) /* metro dependency 13304: TwoFASetupModalActionCreators */).close);
object6.headerTitle = function() {
return null;
};
object6.render = render_101411;
object3[SUCCESS] = object6;
return object3;
}
function getScreens_101403Render() { // fn#101405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:846, owner: getScreens_101403.render, offset: 0x022134ca, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component />)(importDefault(13308) /* metro dependency 13308: TwoFASetupLanding */);
}
function getScreens_101403Render_101407() { // fn#101407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:921, owner: getScreens_101403.render, offset: 0x0221350b, size: 51 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component totpSecret={env0_0} />)(importDefault(13311) /* metro dependency 13311: TwoFASetupScan */);
}
function getScreens_101403Render_101409() { // fn#101409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:1020, owner: getScreens_101403.render, offset: 0x02213558, size: 51 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component totpSecret={env0_0} />)(importDefault(13312) /* metro dependency 13312: TwoFASetupEnterCode */);
}
function getScreens_101403Render_101411() { // fn#101411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13495:1149, owner: getScreens_101403.render, offset: 0x0221358b, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component />)(importDefault(13314) /* metro dependency 13314: TwoFASetupSuccess */);
}
global.__d(_fun101399, 13305, [31, 27, 13306, 33, 4501, 697, 1484, 13304, 6618, 4578, 1244, 13307, 5282, 13308,
13311, 13312, 13314, 6518, 8980, 5280,
2]) /* metro module 13305, dependencies: [31, 27, 13306, 33, 4501, 697, 1484, 13304, 6618, 4578, 1244, 13307, 5282, 13308, 13311, 13312, 13314, 6518, 8980, 5280, 2] */;
@@ -1,23 +1,26 @@
/* Metro module 13304; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupModalActionCreators.tsx; dependencies: [5080, 13305, 1962, 2] */
import ModalActionCreators from '../../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun101396(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13494:6, offset: 0x0221300e, size: 122 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {open: open_101397, close: close_101398};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupModalActionCreators.tsx');
exports.default = object2;
}
object = {open: open_101397, close: close_101398};
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupModalActionCreators.tsx');
exports.default = object;
function open_101397(a0) { // fn#101397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13494:126, offset: 0x02213088, size: 89 bytes, params: 2, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {initialRouteName: a0}, 'TWO_FA_SETUP_MODAL_KEY']);
}
function open_101397(a0) { // fn#101397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13494:126, offset: 0x02213088, size: 89 bytes, params: 2, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {initialRouteName: a0}, 'TWO_FA_SETUP_MODAL_KEY']);
}
function close_101398() { // fn#101398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13494:198, offset: 0x022130e1, size: 43 bytes, params: 1, frame: 12
(ModalActionCreators).popWithKey('TWO_FA_SETUP_MODAL_KEY');
}
function close_101398() { // fn#101398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13494:198, offset: 0x022130e1, size: 43 bytes, params: 1, frame: 12
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('TWO_FA_SETUP_MODAL_KEY');
}
global.__d(_fun101396, 13304, [5080, 13305, 1962, 2]) /* metro module 13304, dependencies: [5080, 13305, 1962, 2] */;
@@ -1,52 +1,54 @@
/* Metro module 13307; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupModalHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun101415(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13497:6, offset: 0x022138cc, size: 383 bytes, params: 8, frame: 23
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_1 = value2.jsx;
const env0_2 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {pageMarkerContainer: {'flex': 1, 'alignItems': 'center', 'justifyContent': 'space-between',
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {pageMarkerContainer: {'flex': 1, 'alignItems': 'center', 'justifyContent': 'space-between',
'flexDirection': 'row'}};
const object5 = {'width': 14, 'height': 14, 'borderRadius': 7, 'borderWidth': 1};
const object2 = {'width': 14, 'height': 14, 'borderRadius': 7, 'borderWidth': 1};
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object5.backgroundColor = BACKGROUND_MOD_STRONG;
object2.backgroundColor = BACKGROUND_MOD_STRONG;
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderColor = BORDER_SUBTLE;
object3.circleIcon = object5;
object2.borderColor = BORDER_SUBTLE;
object.circleIcon = object2;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object3.horizontalLine = {'position': 'absolute', 'left': 0, 'right': 0, 'top': '50%', 'bottom': '50%', 'height': 1,
object.horizontalLine = {'position': 'absolute', 'left': 0, 'right': 0, 'top': '50%', 'bottom': '50%', 'height': 1,
backgroundColor: BORDER_STRONG};
const object6 = {};
const object4 = {};
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
object6.backgroundColor = TEXT_BRAND;
object4.backgroundColor = TEXT_BRAND;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.borderColor = BORDER_SUBTLE;
object3.filledCircle = object6;
const env0_3 = Reflect.apply(createStyles, createStylesModule, [object3]);
object4.borderColor = BORDER_SUBTLE;
object.filledCircle = object4;
const env0_3 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun101416);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupModalHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupModalHeader.tsx');
exports.PageMarker = value;
function _fun101416({numMarkers, currentPage}) { // fn#101416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13497:666, offset: 0x02213a4b, size: 170 bytes, params: 2, frame: 20
const styles = useStyles();
const Array = global.Array;
return (
<View style={[styles.pageMarkerContainer, {width: 20 * numMarkers}]}>
<View style={styles.horizontalLine} />
{Array(numMarkers).fill(undefined).map(_fun101417)}
</View>
);
function _fun101417(a0, a1) { // fn#101417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13497:744, offset: 0x02213af5, size: 80 bytes, params: 3, frame: 18
const currentPageBinding = currentPage;
const value2 = typeof a1 === 'bigint' ? a1 + 1n : +a1 + 1;
return <View style={[styles.circleIcon, currentPageBinding === value2 && styles.filledCircle]} key={value2} />;
}
}
}
function _fun101416({numMarkers, currentPage}) { // fn#101416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13497:666, offset: 0x02213a4b, size: 170 bytes, params: 2, frame: 20
const styles = useStyles();
const Array = global.Array;
return (
<View style={[styles.pageMarkerContainer, {width: 20 * numMarkers}]}>
<View style={styles.horizontalLine} />
{Array(numMarkers).fill(undefined).map(_fun101417)}
</View>
);
}
function _fun101417(a0, a1) { // fn#101417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13497:744, offset: 0x02213af5, size: 80 bytes, params: 3, frame: 18
const currentPageBinding = currentPage;
const value2 = typeof a1 === 'bigint' ? a1 + 1n : +a1 + 1;
return <View style={[styles.circleIcon, currentPageBinding === value2 && styles.filledCircle]} key={value2} />;
}
global.__d(_fun101415, 13307, [31, 27, 33, 4501, 697,
2]) /* metro module 13307, dependencies: [31, 27, 33, 4501, 697, 2] */;
@@ -1,59 +1,86 @@
/* Metro module 13311; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupScan.tsx; dependencies: [57, 31, 33, 4501, 697, 6797, 13309, 13305, 6618, 1305, 1244, 4573, 5278, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as SafeAreaViewModule from '../../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as ClipboardUtilsNativeModule from '../../../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
import * as TwoFASetupModalModule from './TwoFASetupModal.tsx'; /* Metro dependency 13305 */
import * as TwoFASetupStylesModule from './TwoFASetupStyles.tsx'; /* Metro dependency 13309 */
function _fun101422(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13501:6, offset: 0x02213f1a, size: 243 bytes, params: 8, frame: 21
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 */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
const TEXT_BRAND = (Native).colors.TEXT_BRAND;
const env0_6 = Reflect.apply(createStyles, value, [{container: {'flex': 1, 'alignItems': 'center',
'justifyContent': 'center'}, copy: {color: TEXT_BRAND}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupScan.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupScan.tsx');
exports.default = TwoFASetupScan;
function TwoFASetupScan({totpSecret}) { // fn#101423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13501:386, offset: 0x0221400d, size: 641 bytes, params: 2, frame: 31
const styles = useStyles();
const [property, env0_1] = Module00057(ReactModule.useState(false), 2);
const value4 = ReactModule.useCallback(_fun101424, [totpSecret]);
const value5 = (TwoFASetupStylesModule).useTwoFASetupStyles();
const TwoFASetupModalScreen = (TwoFASetupModalModule).TwoFASetupModalScreen;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const LegacyText = (NativeModule).LegacyText;
const items3 = [value5.modalHeader];
items3[1] = value5.text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const items2 = [
<LegacyText style={items3}>
{Reflect.apply(string, intl, [t['hg/+aT']])}
</LegacyText>,
];
items2[1] = (
<LegacyText style={[value5.modalBody, value5.text]}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UQR+Qy'])}
</LegacyText>
);
const Text = (TextModule).Text;
items2[2] = (
<Text variant="text-md/bold" style={{textAlign: 'center'}}>
{totpSecret}
</Text>
);
const PressableOpacity = (PressablesModule).PressableOpacity;
string = intl.string;
items2[3] = (
<PressableOpacity accessibilityRole="button" onPress={value4}>
<LegacyText style={styles.copy}>
{property ? Reflect.apply(string, intl, [t.mGZ66D]) : Reflect.apply(string, intl, [t.OpuAlK])}
</LegacyText>
</PressableOpacity>
);
return (
<TwoFASetupModalScreen>
<SafeAreaPaddingView bottom style={styles.container}>
{items2}
</SafeAreaPaddingView>
</TwoFASetupModalScreen>
);
function _fun101424() { // fn#101424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13501:493, offset: 0x0221428e, size: 85 bytes, params: 1, frame: 16
env0_1(true);
const copy = ClipboardUtilsNativeModule.copy;
const totpSecretBinding = totpSecret;
Reflect.apply(copy, ClipboardUtilsNativeModule, [totpSecretBinding.replace(RegExp('[^a-zA-Z0-9]', 'g'), '')]);
}
}
}
function TwoFASetupScan({totpSecret}) { // fn#101423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13501:386, offset: 0x0221400d, size: 641 bytes, params: 2, frame: 31
const styles = useStyles();
const binding = env0_3;
const [property, env0_1] = env0_2(binding.useState(false), 2);
const value4 = binding.useCallback(_fun101424, [totpSecret]);
const value5 = (require(13309) /* metro dependency 13309: TwoFASetupStyles */).useTwoFASetupStyles();
const TwoFASetupModalScreen = (require(13305) /* metro dependency 13305: TwoFASetupModal */).TwoFASetupModalScreen;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const items3 = [value5.modalHeader];
items3[1] = value5.text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const items2 = [<LegacyText style={items3}>{Reflect.apply(string, intl, [t['hg/+aT']])}</LegacyText>];
items2[1] = <LegacyText style={[value5.modalBody,
value5.text]}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UQR+Qy'])}</LegacyText>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[2] = <Text variant="text-md/bold" style={{textAlign: 'center'}}>{totpSecret}</Text>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
string = intl.string;
items2[3] = <PressableOpacity accessibilityRole="button" onPress={value4}><LegacyText style={styles.copy}>{property ? Reflect.apply(string,
intl, [t.mGZ66D]) : Reflect.apply(string, intl, [t.OpuAlK])}</LegacyText></PressableOpacity>;
return (
<TwoFASetupModalScreen>
<SafeAreaPaddingView bottom style={styles.container}>
{items2}
</SafeAreaPaddingView>
</TwoFASetupModalScreen>
);
}
function _fun101424() { // fn#101424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13501:493, offset: 0x0221428e, size: 85 bytes, params: 1, frame: 16
env0_1(true);
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
const copy = clipboardUtilsNativeModule.copy;
const totpSecretBinding = totpSecret;
Reflect.apply(copy, clipboardUtilsNativeModule, [totpSecretBinding.replace(RegExp('[^a-zA-Z0-9]', 'g'), '')]);
}
global.__d(_fun101422, 13311, [57, 31, 33, 4501, 697, 6797, 13309, 13305, 6618, 1305, 1244, 4573, 5278,
2]) /* metro module 13311, dependencies: [57, 31, 33, 4501, 697, 6797, 13309, 13305, 6618, 1305, 1244, 4573, 5278, 2] */;
@@ -1,22 +1,28 @@
/* Metro module 13309; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupStyles.tsx; dependencies: [661, 4501, 6597, 697, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import TextStyles from '../../../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun101420(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13499:6, offset: 0x02213de2, size: 244 bytes, params: 8, frame: 24
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(4501) /* metro dependency 4501: createStyles */;
const Fonts = (ConstantsModule).Fonts;
let value = CreateStylesModule;
const createStyles = value.createStyles;
object3 = {text: {'textAlign': 'center', 'marginLeft': 20, 'marginRight': 20}};
const object4 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
object = {text: {'textAlign': 'center', 'marginLeft': 20, 'marginRight': 20}};
const object2 = {};
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object4, textStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 24), undefined);
object3.modalHeader = object4;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object3.modalBody = {color: TEXT_SUBTLE, marginTop: 8};
value = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupStyles.tsx');
const MOBILE_TEXT_HEADING_PRIMARY = (Native).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object2, TextStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 24), undefined);
object.modalHeader = object2;
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
object.modalBody = {color: TEXT_SUBTLE, marginTop: 8};
value = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupStyles.tsx');
exports.useTwoFASetupStyles = value;
}
global.__d(_fun101420, 13309, [661, 4501, 6597, 697,
2]) /* metro module 13309, dependencies: [661, 4501, 6597, 697, 2] */;
@@ -1,331 +1,366 @@
/* Metro module 13314; source: modules/user_settings/account/native/mfa_modal_flow/TwoFASetupSuccess.tsx; dependencies: [5, 57, 31, 27, 661, 33, 4501, 6597, 697, 5084, 1244, 13304, 8978, 13305, 13315, 1305, 4578, 2] */
import Module00005 from '../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import TextStyles from '../../../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import NativeCeremonies from '../../../../webauthn/native/NativeCeremonies.tsx'; /* Metro dependency 8978 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TwoFASetupModalModule from './TwoFASetupModal.tsx'; /* Metro dependency 13305 */
function _fun101443(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13504:6, offset: 0x02214df5, size: 575 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(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 */;
let value = ReactNativeModule;
const env0_6 = value.View;
const env0_7 = value.Image;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const Fonts = (ConstantsModule).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 = {container: {'alignSelf': 'stretch', 'flex': 1, 'alignItems': 'center', 'justifyContent': 'flex-start',
object = {container: {'alignSelf': 'stretch', 'flex': 1, 'alignItems': 'center', 'justifyContent': 'flex-start',
'flexDirection': 'column'}};
object2.flex = {flex: 1};
object2.image = {'width': 190, 'height': 70};
const object4 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
object.flex = {flex: 1};
object.image = {'width': 190, 'height': 70};
const object3 = {};
const DISPLAY_SEMIBOLD = Fonts.DISPLAY_SEMIBOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object4, textStyles(DISPLAY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 20), undefined);
object4['marginTop'] = 33;
object2.success = object4;
copyDataProperties(object3, TextStyles(DISPLAY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 20), undefined);
object3['marginTop'] = 33;
object.success = object3;
let TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object2.successBody = {'fontSize': 14, 'textAlign': 'center', 'marginHorizontal': 20, 'marginTop': 4,
object.successBody = {'fontSize': 14, 'textAlign': 'center', 'marginHorizontal': 20, 'marginTop': 4,
color: TEXT_STRONG};
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object2.divider = {'height': 2, 'width': 48, 'margin': 32, backgroundColor: BORDER_STRONG};
object2.buttonWrapper = {'alignSelf': 'stretch', 'margin': 16, 'marginTop': 0};
object.divider = {'height': 2, 'width': 48, 'margin': 32, backgroundColor: BORDER_STRONG};
object.buttonWrapper = {'alignSelf': 'stretch', 'margin': 16, 'marginTop': 0};
TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object2.ctaDescription = {'fontSize': 14, 'textAlign': 'center', 'marginTop': 4, 'marginHorizontal': 16,
object.ctaDescription = {'fontSize': 14, 'textAlign': 'center', 'marginTop': 4, 'marginHorizontal': 16,
color: TEXT_STRONG};
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
object2.errorText = {'fontSize': 14, 'textAlign': 'center', 'marginHorizontal': 16, 'marginTop': 8,
object.errorText = {'fontSize': 14, 'textAlign': 'center', 'marginHorizontal': 16, 'marginTop': 8,
color: TEXT_FEEDBACK_CRITICAL};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupSuccess.tsx');
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/mfa_modal_flow/TwoFASetupSuccess.tsx');
exports.default = TwoFASetupSuccess;
}
function TwoFASetupSuccess() { // fn#101444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13504:1077, offset: 0x02215034, size: 784 bytes, params: 1, frame: 32
const styles = useStyles();
const binding = env0_5;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_4;
const value3 = binding2(value2, 2);
const property = value3[0];
const env0_0 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property2 = value4[0];
const env0_1 = value4[1];
const value5 = binding.useCallback(_fun101445, []);
const TwoFASetupModalScreen = (require(13305) /* metro dependency 13305: TwoFASetupModal */).TwoFASetupModalScreen;
const items2 = [<View style={styles.flex} />];
items2[1] = <Image source={require(13315) /* metro dependency 13315 */} style={styles.image} />;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Awk3Gw = t.Awk3Gw;
items2[2] = <LegacyText style={styles.success}>{Reflect.apply(string, intl, [Awk3Gw])}</LegacyText>;
items2[3] = <LegacyText style={styles.successBody}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0d1bXM'])}</LegacyText>;
items2[4] = <View style={styles.divider} />;
items2[5] = <LegacyText style={styles.ctaDescription}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.okgGTu)}</LegacyText>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[6] = <View style={styles.buttonWrapper}><Button text={property ? Reflect.apply(string, intl,
[t.wePEBF]) : Reflect.apply(string, intl,
[t.NIFmCJ])} onPress={value5} disabled={property} loading={property} grow />{property2 !== '' && <LegacyText style={styles.errorText}>{property2}</LegacyText>}</View>;
items2[7] = <View style={styles.flex} />;
return (
<TwoFASetupModalScreen>
<View style={styles.container}>
{items2}
function TwoFASetupSuccess() { // fn#101444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13504:1077, offset: 0x02215034, size: 784 bytes, params: 1, frame: 32
const styles = useStyles();
let useState = ReactModule.useState;
const value2 = Reflect.apply(useState, ReactModule, [false]);
const value3 = Module00057(value2, 2);
const property = value3[0];
const env0_0 = value3[1];
useState = ReactModule.useState;
const value4 = Module00057(Reflect.apply(useState, ReactModule, ['']), 2);
const property2 = value4[0];
const env0_1 = value4[1];
const value5 = ReactModule.useCallback(_fun101445, []);
const TwoFASetupModalScreen = (TwoFASetupModalModule).TwoFASetupModalScreen;
const items2 = [
<View style={styles.flex} />,
];
items2[1] = <Image source={require(13315) /* metro dependency 13315 */} style={styles.image} />;
const LegacyText = (NativeModule).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Awk3Gw = t.Awk3Gw;
items2[2] = (
<LegacyText style={styles.success}>
{Reflect.apply(string, intl, [Awk3Gw])}
</LegacyText>
);
items2[3] = (
<LegacyText style={styles.successBody}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0d1bXM'])}
</LegacyText>
);
items2[4] = <View style={styles.divider} />;
items2[5] = (
<LegacyText style={styles.ctaDescription}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.okgGTu)}
</LegacyText>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
items2[6] = (
<View style={styles.buttonWrapper}>
<Button
text={property ? Reflect.apply(string, intl, [t.wePEBF]) : Reflect.apply(string, intl, [t.NIFmCJ])}
onPress={value5}
disabled={property}
loading={property}
grow
/>
{property2 !== '' && <LegacyText style={styles.errorText}>{property2}</LegacyText>}
</View>
</TwoFASetupModalScreen>
);
}
);
items2[7] = <View style={styles.flex} />;
return (
<TwoFASetupModalScreen>
<View style={styles.container}>
{items2}
</View>
</TwoFASetupModalScreen>
);
function _fun101445() { // fn#101445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13504:1213, offset: 0x02215344, size: 88 bytes, params: 1, frame: 15
const binding = env0_1;
binding('');
const value2 = _fun101446();
const defaultImport = NativeCeremonies;
defaultImport.registerPasskey({setRegistering: env0_0, setError: binding, onRegisterSuccess: value2});
function _fun101446() { // fn#101446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13504:1230, offset: 0x0221539c, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun101448);
return _fun101449;
async function _fun101448({ticket, credential}) { // fn#101448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13504:1250, offset: 0x022153d4, size: 201 bytes, params: 2, frame: 23
var binding;
var binding2;
var property;
var value4;
var finishRegisterWebAuthnCredential;
var value5;
var intl;
var string;
var value6;
var t;
var value7;
var value8;
var value9;
var value10;
var binding3;
var close;
var error;
var body;
var message;
if (true) {
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__.__proto__.__proto__;
try {
binding = env4_0;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
binding2 = env4_2;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
property = binding2[9];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
finishRegisterWebAuthnCredential = value4.finishRegisterWebAuthnCredential;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
property = binding2[10];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value5 = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
intl = value5.intl;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
string = intl.string;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
property = binding2[10];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value6 = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
t = value6.t;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
property = t['8H5RmH'];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value7 = Reflect.apply(string, intl, [property]);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value8 = Reflect.apply(finishRegisterWebAuthnCredential, value4, [value7, ticket, credential]);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
await value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
if (value10) {
return value9;
}
try {
binding = env4_1;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
binding3 = env4_2;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
property = binding3[11];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
close = value.close;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
Reflect.apply(close, value, []);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
}
}
}
function _fun101445() { // fn#101445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13504:1213, offset: 0x02215344, size: 88 bytes, params: 1, frame: 15
const binding = env0_1;
binding('');
const value2 = _fun101446();
const defaultImport = importDefault(8978) /* metro dependency 8978: NativeCeremonies */;
defaultImport.registerPasskey({setRegistering: env0_0, setError: binding, onRegisterSuccess: value2});
}
function _fun101449() { // fn#101449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13504:1439, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function _fun101446() { // fn#101446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13504:1230, offset: 0x0221539c, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun101448);
return _fun101449;
}
}
async function _fun101448({ticket, credential}) { // fn#101448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13504:1250, offset: 0x022153d4, size: 201 bytes, params: 2, frame: 23
var binding;
var binding2;
var property;
var value4;
var finishRegisterWebAuthnCredential;
var value5;
var intl;
var string;
var value6;
var t;
var value7;
var value8;
var value9;
var value10;
var binding3;
var close;
var error;
var body;
var message;
if (true) {
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__.__proto__.__proto__;
try {
binding = env4_0;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
binding2 = env4_2;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
property = binding2[9];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
finishRegisterWebAuthnCredential = value4.finishRegisterWebAuthnCredential;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
property = binding2[10];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value5 = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
intl = value5.intl;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
string = intl.string;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
property = binding2[10];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value6 = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
t = value6.t;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
property = t['8H5RmH'];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value7 = Reflect.apply(string, intl, [property]);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value8 = Reflect.apply(finishRegisterWebAuthnCredential, value4, [value7, ticket, credential]);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
await value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
if (value10) {
return value9;
}
try {
binding = env4_1;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
binding3 = env4_2;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
property = binding3[11];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
value = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
close = value.close;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
return undefined;
}
try {
Reflect.apply(close, value, []);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
body = error.body;
message = body.message;
importDefault(message);
}
}
}
global.__d(_fun101443, 13314, [5, 57, 31, 27, 661, 33, 4501, 6597, 697, 5084, 1244, 13304, 8978, 13305, 13315, 1305,
4578,
2]) /* metro module 13314, dependencies: [5, 57, 31, 27, 661, 33, 4501, 6597, 697, 5084, 1244, 13304, 8978, 13305, 13315, 1305, 4578, 2] */;
@@ -1,9 +1,11 @@
/* Metro module 9009; source: modules/user_settings/account/native/showInvalidUsernameToastNative.tsx; dependencies: [3857, 1244, 8160, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun70093(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9194:6, offset: 0x01cee425, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_settings/account/native/showInvalidUsernameToastNative.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/showInvalidUsernameToastNative.tsx');
exports.showInvalidUsernameToast = function() {
var defaultImport = importDefault(dependencyMap[0]);
var object = {key: 'USER_SETTINGS_UPDATE_FAILURE'};
@@ -13,3 +15,4 @@ function _fun70093(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun70093, 9009, [3857, 1244, 8160, 2]) /* metro module 9009, dependencies: [3857, 1244, 8160, 2] */;
@@ -1,57 +1,63 @@
/* Metro module 13319; source: modules/user_settings/account/native/showUserSettingsInputAlert.tsx; dependencies: [31, 33, 4496, 13320, 1962, 1244, 4596, 2] */
import AlertActionCreators from '../../../../actions/native/AlertActionCreators.tsx'; /* Metro dependency 4496 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun101474(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13509:6, offset: 0x02216060, 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/user_settings/account/native/showUserSettingsInputAlert.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/user_settings/account/native/showUserSettingsInputAlert.tsx');
exports.default = showUserSettingsInputAlert;
function showUserSettingsInputAlert(a0) { // fn#101475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13509:229, offset: 0x022160ea, size: 122 bytes, params: 2, frame: 15
var environment;
const value = Object.create(environment);
const env0_0 = a0.onSubmit;
const env0_1 = a0.onSuccess;
const env0_2 = a0.onError;
const object = {'onSubmit': 0, 'onSuccess': 0, 'onError': 0};
silentSetPrototypeOf(object, null, undefined);
const env0_3 = copyDataProperties({}, a0, object, value);
const defaultImport = AlertActionCreators;
defaultImport.openLazy({importer: importer_101476});
function showUserSettingsInputAlertImporter() { // fn#101476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13509:333, owner: showUserSettingsInputAlert.importer, offset: 0x02216164, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(dependencyMap[4]);
value = value(dependencyMap[3], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun101478;
});
function _fun101477({default: env0_0}) { // fn#101477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13509:365, offset: 0x022161a4, size: 23 bytes, params: 2, frame: 2
return _fun101478;
function _fun101478(a0) { // fn#101478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13509:380, offset: 0x022161bb, size: 274 bytes, params: 2, frame: 22
const binding = env0_0;
const bindingProps = {...a0};
const binding2 = env2_3;
copyDataProperties(bindingProps, binding2, undefined);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
bindingProps['cancelText'] = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']]);
string = intl.string;
const BddRzS = (require(1244) /* metro dependency 1244: indexNative */).t.BddRzS;
bindingProps['confirmText'] = Reflect.apply(string, intl, [BddRzS]);
bindingProps['confirmColor'] = binding2.confirmColor != null ? env2_3.confirmColor : (importDefault(4596) /* metro dependency 4596: Alert */).Colors.RED;
bindingProps['onSubmit'] = onSubmit;
bindingProps['onSuccess'] = onSuccess;
bindingProps['onError'] = onError;
return ((Component) => <Component {...bindingProps} />)(binding);
}
}
}
}
}
function showUserSettingsInputAlert(a0) { // fn#101475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13509:229, offset: 0x022160ea, size: 122 bytes, params: 2, frame: 15
var environment;
const value = Object.create(environment);
const env0_0 = a0.onSubmit;
const env0_1 = a0.onSuccess;
const env0_2 = a0.onError;
const object2 = {'onSubmit': 0, 'onSuccess': 0, 'onError': 0};
silentSetPrototypeOf(object2, null, undefined);
const env0_3 = copyDataProperties({}, a0, object2, value);
const defaultImport = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
defaultImport.openLazy({importer: importer_101476});
}
function showUserSettingsInputAlertImporter() { // fn#101476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13509:333, owner: showUserSettingsInputAlert.importer, offset: 0x02216164, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(dependencyMap[4]);
value = value(dependencyMap[3], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun101478;
});
}
function _fun101477({default: env0_0}) { // fn#101477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13509:365, offset: 0x022161a4, size: 23 bytes, params: 2, frame: 2
return _fun101478;
}
function _fun101478(a0) { // fn#101478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13509:380, offset: 0x022161bb, size: 274 bytes, params: 2, frame: 22
const binding = env0_0;
const bindingProps = {...a0};
const binding2 = env2_3;
copyDataProperties(bindingProps, binding2, undefined);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
bindingProps['cancelText'] = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']]);
string = intl.string;
const BddRzS = (require(1244) /* metro dependency 1244: indexNative */).t.BddRzS;
bindingProps['confirmText'] = Reflect.apply(string, intl, [BddRzS]);
bindingProps['confirmColor'] = binding2.confirmColor != null ? env2_3.confirmColor : (importDefault(4596) /* metro dependency 4596: Alert */).Colors.RED;
bindingProps['onSubmit'] = onSubmit;
bindingProps['onSuccess'] = onSuccess;
bindingProps['onError'] = onError;
return ((Component) => <Component {...bindingProps} />)(binding);
}
global.__d(_fun101474, 13319, [31, 33, 4496, 13320, 1962, 1244, 4596,
2]) /* metro module 13319, dependencies: [31, 33, 4496, 13320, 1962, 1244, 4596, 2] */;