Files
2026-07-28 01:06:53 +03:00

793 lines
35 KiB
TypeScript

/* Metro module 8966; source: modules/verification/native/components/ConfirmEmailCode.tsx; dependencies: [5, 57, 31, 27, 1878, 8955, 33, 4501, 697, 566, 4132, 4573, 1244, 8967, 8971, 3857, 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 UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
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 IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun69898(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9151:6, offset: 0x01ce724b, size: 467 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactNativeModule;
const env0_6 = value.View;
const env0_7 = value.ScrollView;
value = require(8955) /* metro dependency 8955: ChangeEmailStore */;
const env0_9 = value.useChangeEmailError;
const env0_10 = value.ChangeEmailFields;
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;
object = {};
const object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.paddingVertical = PX_12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.paddingHorizontal = PX_16;
object.background = object2;
object.title = {textAlign: 'center'};
object.prompt = {'marginTop': 8, 'lineHeight': 18, 'textAlign': 'center'};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.input = {marginTop: PX_24};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.contentContainer = {gap: PX_24};
const env0_13 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/verification/native/components/ConfirmEmailCode.tsx');
exports.default = ConfirmEmailCode;
function ConfirmEmailCode({onFormSubmit, onSuccess, onResend, headerText, confirmButtonText}) { // fn#69899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9151:686, offset: 0x01ce741e, size: 853 bytes, params: 2, frame: 37
var r0;
const Text = (TextModule).Text;
var items2;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var FreeFormInputGroup;
var LinkButton;
var value;
const styles = useStyles();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const binding = env0_5;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, ['']);
const value3 = Module00057(value2, 2);
const property = value3[0];
const property6 = property;
const property2 = value3[1];
const EMAIL_TOKEN = ChangeEmailFields.EMAIL_TOKEN;
const value4 = Module00057(useChangeEmailError(EMAIL_TOKEN), 2);
const property3 = value4[0];
const property4 = value4[1];
useState = binding.useState;
const value5 = Module00057(Reflect.apply(useState, binding, [false]), 2);
const property5 = value5[0];
var env0_5 = value5[1];
const value7 = binding.useCallback(property6(_fun69902), [property, property4, onFormSubmit, onSuccess]);
if (currentUser == null) {
r0 = null;
} else {
var scrollViewBindingProps = {'style': null, 'keyboardShouldPersistTaps': 'handled',
'alwaysBounceVertical': false,
style: styles.background, contentContainerStyle: styles.contentContainer};
items2 = [
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{headerText}
</Text>,
];
string = intl.string;
items2[1] = (
<Text
style={styles.prompt}
variant="text-sm/medium"
color="text-default"
>
{Reflect.apply(string, intl, [t.SZJowy])}
</Text>
);
FreeFormInputGroup = importDefault(8967) /* metro dependency 8967: FreeFormInputGroup */;
items2[2] = (
<FreeFormInputGroup
style={styles.input}
label={intl.string(t['8mZX6M'])}
textContentType="emailAddress"
keyboardType="email-address"
value={property}
onChangeText={property2}
onSubmitEditing={value7}
returnKeyType="done"
autoCapitalize="none"
error={property3}
autoFocus
/>
);
LinkButton = (require(8971) /* metro dependency 8971: Login */).LinkButton;
string = intl.string;
items2[3] = (
<LinkButton
text={Reflect.apply(string, intl, [t.K0NPQ6])}
variant="text-sm/medium"
onPress={property6(_fun69904)}
/>
);
value = (
<View>
{items2}
</View>
);
value = (
<ScrollView {...scrollViewBindingProps}>
{value}
{((Button) => <Button text={confirmButtonText} onPress={value7} loading={property5} disabled={property === ''} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}
</ScrollView>
);
r0 = value;
}
return r0;
function* _fun69902() { // fn#69902, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9151:996, offset: 0x01ce777e, size: 213 bytes, params: 1, frame: 16
var token;
var value;
var value2;
var value3;
var binding;
var moduleValue;
var value4;
var value5;
var value6;
var error;
var value7;
var binding2;
var property;
var value8;
var prototype;
var value10;
var value11;
var getAnyErrorMessage;
var value12;
exceptionLanding41: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = undefined;
value3 = environment.__proto__;
reducibleJoin4: while (true) {
reduciblePort40: while (true) {
exceptionLanding23: while (true) {
try {
try {
binding = env1_4;
} catch (error) {
break exceptionLanding23;
}
} catch (error) {
break exceptionLanding41;
}
break reducibleJoin4;
}
value7 = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
break exceptionLanding41;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding41;
}
try {
property = binding2[10];
} catch (error) {
break exceptionLanding41;
}
try {
value8 = binding(property);
} catch (error) {
break exceptionLanding41;
}
try {
prototype = value8.prototype;
} catch (error) {
break exceptionLanding41;
}
try {
} catch (error) {
break exceptionLanding41;
}
try {
value10 = new value8();
} catch (error) {
break exceptionLanding41;
}
try {
value11 = value10 instanceof Object ? value10 : undefined;
} catch (error) {
break exceptionLanding41;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding41;
}
try {
getAnyErrorMessage = value11.getAnyErrorMessage;
} catch (error) {
break exceptionLanding41;
}
try {
value12 = Reflect.apply(getAnyErrorMessage, value11, []);
} catch (error) {
break exceptionLanding41;
}
try {
binding(value12);
} catch (error) {
break exceptionLanding41;
}
break reduciblePort40;
}
env1_5(false);
return value;
}
try {
try {
binding(null);
} catch (error) {
break exceptionLanding23;
}
} catch (error) {
break exceptionLanding41;
}
try {
try {
binding = env1_5;
} catch (error) {
break exceptionLanding23;
}
} catch (error) {
break exceptionLanding41;
}
try {
try {
binding(true);
} catch (error) {
break exceptionLanding23;
}
} catch (error) {
break exceptionLanding41;
}
try {
try {
} catch (error) {
break exceptionLanding23;
}
} catch (error) {
break exceptionLanding41;
}
try {
try {
binding = env1_3;
} catch (error) {
break exceptionLanding23;
}
} catch (error) {
break exceptionLanding41;
}
try {
try {
moduleValue = require(binding);
} catch (error) {
break exceptionLanding23;
}
} catch (error) {
break exceptionLanding41;
}
yield moduleValue;
try {
try {
value4 = undefined;
value5 = false;
} catch (error) {
break exceptionLanding23;
}
} catch (error) {
break exceptionLanding41;
}
if (value5) {
env1_5(false);
return value4;
}
try {
try {
} catch (error) {
break exceptionLanding23;
}
} catch (error) {
break exceptionLanding41;
}
try {
try {
value6 = value4 == null;
} catch (error) {
break exceptionLanding23;
}
} catch (error) {
break exceptionLanding41;
}
reducibleJoin20: while (true) {
if (value6) {
token = value;
break reducibleJoin20;
}
try {
try {
token = value4.token;
} catch (error) {
break exceptionLanding23;
}
} catch (error) {
break exceptionLanding41;
}
break reducibleJoin20;
}
try {
try {
importDefault(token);
} catch (error) {
break exceptionLanding23;
}
} catch (error) {
break exceptionLanding41;
}
env1_5(false);
return value;
}
env1_5(false);
throw error;
}
function* _fun69904() { // fn#69904, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9151:1939, offset: 0x01ce785e, size: 261 bytes, params: 1, frame: 20
var value3;
var binding;
var binding2;
var property;
var value4;
var open;
var object;
var intl;
var string;
var t;
var error;
var value5;
var prototype;
var value6;
var value7;
var value8;
var anyErrorMessage;
if (true) {
value = environment.__proto__;
try {
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
value = dependencyMap();
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
yield value;
try {
value = undefined;
value3 = false;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
if (value3) {
return value;
}
value = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
property = binding2[15];
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
open = value4.open;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
object = {};
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
object.key = 'USER_SETTINGS_ACCOUNT_CHANGE_EMAIL_CONFIRM_CODE_SENT';
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
binding = env2_0;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
property = binding2[12];
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
value = binding(property);
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
intl = value.intl;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
string = intl.string;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
property = binding2[12];
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
value = binding(property);
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
t = value.t;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
property = t['84yeoz'];
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
value = Reflect.apply(string, intl, [property]);
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
object.content = value;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
return undefined;
}
try {
Reflect.apply(open, value4, [object]);
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
value5 = binding(env2_2[10]);
prototype = value5.prototype;
value6 = Object.create(prototype, {constructor: {value: value5}});
value7 = new value5();
value8 = value7 instanceof Object ? value7 : value6;
anyErrorMessage = value8.getAnyErrorMessage();
if (anyErrorMessage != null) {
binding = env2_1;
value = binding(env2_2[15]);
value.open({key: 'CONFIRM_EMAIL_ERROR', content: anyErrorMessage});
}
}
}
}
}
}
global.__d(_fun69898, 8966, [5, 57, 31, 27, 1878, 8955, 33, 4501, 697, 566, 4132, 4573, 1244, 8967, 8971, 3857,
4578,
2]) /* metro module 8966, dependencies: [5, 57, 31, 27, 1878, 8955, 33, 4501, 697, 566, 4132, 4573, 1244, 8967, 8971, 3857, 4578, 2] */;