236 lines
14 KiB
TypeScript
236 lines
14 KiB
TypeScript
/* Metro module 9013; source: modules/verification/native/components/PhoneVerificationModal.tsx; dependencies: [5, 31, 661, 9014, 33, 5282, 9015, 9016, 5080, 480, 9024, 9010, 5280, 1244, 2] */
|
|
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import ModalActionCreators from '../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
|
|
import UserSettingsConfirmPassword from '../../../user_settings/account/native/UserSettingsConfirmPassword.tsx'; /* Metro dependency 9010 */
|
|
import AddPhone from './AddPhone.tsx'; /* Metro dependency 9015 */
|
|
import PhoneActionCreators from '../../../phone/PhoneActionCreators.tsx'; /* Metro dependency 9016 */
|
|
import VerifyPhone from './VerifyPhone.tsx'; /* Metro dependency 9024 */
|
|
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 AnalyticsUtilsModule from '../../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
|
|
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
|
|
import * as PhoneConstantsModule from '../../../phone/PhoneConstants.tsx'; /* Metro dependency 9014 */
|
|
|
|
function _fun70113(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9198:6, offset: 0x01cef5a4, size: 198 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/verification/native/components/PhoneVerificationModal.tsx');
|
|
exports.default = PhoneVerificationModal;
|
|
function PhoneVerificationModal(a0) { // fn#70114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9198:316, offset: 0x01cef66a, size: 338 bytes, params: 2, frame: 24
|
|
const Navigator = (NavigatorNativeModule).Navigator;
|
|
const env0_0 = a0;
|
|
const object2 = {};
|
|
let ADD_PHONE = VerificationModalScenes.ADD_PHONE;
|
|
const object3 = {};
|
|
object3.headerTitle = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderNoTitle();
|
|
object3.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(a0.onClose);
|
|
object3.render = render_70115;
|
|
object2[ADD_PHONE] = object3;
|
|
const VERIFY_PHONE = VerificationModalScenes.VERIFY_PHONE;
|
|
const object4 = {};
|
|
object4.headerTitle = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderNoTitle();
|
|
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
|
|
const USER_VERIFY_PHONE = ImpressionNames.USER_VERIFY_PHONE;
|
|
object4.impressionName = USER_VERIFY_PHONE;
|
|
object4.render = render_70123;
|
|
object2[VERIFY_PHONE] = object4;
|
|
const VERIFY_PASSWORD = VerificationModalScenes.VERIFY_PASSWORD;
|
|
const object5 = {};
|
|
object5.headerTitle = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderNoTitle();
|
|
object5.render = render_70129;
|
|
object2[VERIFY_PASSWORD] = object5;
|
|
ADD_PHONE = VerificationModalScenes.ADD_PHONE;
|
|
const intl = (IndexNativeModule).intl;
|
|
return (
|
|
<Navigator
|
|
screens={object2}
|
|
initialRouteName={ADD_PHONE}
|
|
headerBackTitle={intl.string((IndexNativeModule).t['13/7kX'])}
|
|
/>
|
|
);
|
|
function PhoneVerificationModalRender(a0, a1) { // fn#70115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9198:499, owner: PhoneVerificationModal.render, offset: 0x01cef7bc, size: 160 bytes, params: 3, frame: 18
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
let value = environment.__proto__;
|
|
value = undefined;
|
|
const value2 = null;
|
|
let reason = value2 == a0 ? value : a0.reason;
|
|
reason = value2 == reason ? env0_0.reason : reason;
|
|
return (
|
|
<AddPhone
|
|
{...a0}
|
|
{...{['reason']: reason}}
|
|
{...{['onComplete']: function(a0) {
|
|
var VERIFY_PHONE = VerificationModalScenes.VERIFY_PHONE;
|
|
return require.push(VERIFY_PHONE, {phone: a0, onVerified: _fun70117});
|
|
}}}
|
|
{...{['onDeletePhone']: env0_0.allowDeletePhone ? function() {
|
|
var VERIFY_PASSWORD = VerificationModalScenes.VERIFY_PASSWORD;
|
|
require.push(VERIFY_PASSWORD, {hideUnverifiedBanner: true, onSubmit: _fun70121, onSuccess: _fun70122});
|
|
} : value2}}
|
|
/>
|
|
);
|
|
function renderOnComplete(a0) { // fn#70116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9198:603, owner: PhoneVerificationModal.render.onComplete, offset: 0x01cef85c, size: 57 bytes, params: 2, frame: 14
|
|
const push = require.push;
|
|
const VERIFY_PHONE = VerificationModalScenes.VERIFY_PHONE;
|
|
return Reflect.apply(push, require, [VERIFY_PHONE, {phone: a0, onVerified: function(a0) {
|
|
var env0_0 = a0;
|
|
var VERIFY_PASSWORD = VerificationModalScenes.VERIFY_PASSWORD;
|
|
require.push(VERIFY_PASSWORD, {hideUnverifiedBanner: true, onSubmit: _fun70118, onSuccess: _fun70119});
|
|
}}]);
|
|
function onCompleteOnVerified(a0) { // fn#70117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9198:637, owner: PhoneVerificationModal.render.onComplete.onVerified, offset: 0x01cef895, size: 77 bytes, params: 2, frame: 15
|
|
const env0_0 = a0;
|
|
const push = require.push;
|
|
const VERIFY_PASSWORD = VerificationModalScenes.VERIFY_PASSWORD;
|
|
Reflect.apply(push, require, [VERIFY_PASSWORD, {hideUnverifiedBanner: true, onSubmit: onSubmit_70118,
|
|
onSuccess: function() {
|
|
importDefault(dependencyMap[8]).popWithKey(PHONE_VERIFICATION_MODAL_KEY);
|
|
}}]);
|
|
function onVerifiedOnSubmit_70118(a0) { // fn#70118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9198:710, owner: PhoneVerificationModal.render.onComplete.onVerified.onSubmit, offset: 0x01cef8e2, size: 93 bytes, params: 2, frame: 17
|
|
let value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
value = undefined;
|
|
const defaultImport = PhoneActionCreators;
|
|
const addPhone = defaultImport.addPhone;
|
|
const binding = env0_0;
|
|
let reason = env2_0 == null ? value : env2_0.reason;
|
|
reason = reason ?? env3_0.reason;
|
|
return Reflect.apply(addPhone, defaultImport, [binding, a0, reason]);
|
|
}
|
|
|
|
function onVerifiedOnSuccess_70119() { // fn#70119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9198:805, owner: PhoneVerificationModal.render.onComplete.onVerified.onSuccess, offset: 0x01cef93f, size: 42 bytes, params: 1, frame: 12
|
|
(ModalActionCreators).popWithKey(PHONE_VERIFICATION_MODAL_KEY);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun70120() { // fn#70120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9198:871, offset: 0x01cef969, size: 70 bytes, params: 1, frame: 15
|
|
const push = require.push;
|
|
const VERIFY_PASSWORD = VerificationModalScenes.VERIFY_PASSWORD;
|
|
Reflect.apply(push, require, [VERIFY_PASSWORD, {hideUnverifiedBanner: true, onSubmit: onSubmit_70121,
|
|
onSuccess: onSuccess_70122}]);
|
|
function onSubmit_70121(a0) { // fn#70121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9198:935, offset: 0x01cef9af, size: 85 bytes, params: 2, frame: 15
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
value = undefined;
|
|
const defaultImport = PhoneActionCreators;
|
|
const removePhone = defaultImport.removePhone;
|
|
let reason = env1_0 == null ? value : env1_0.reason;
|
|
reason = reason ?? env2_0.reason;
|
|
return Reflect.apply(removePhone, defaultImport, [a0, reason]);
|
|
}
|
|
|
|
function onSuccess_70122() { // fn#70122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9198:1031, offset: 0x01cefa04, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
(ModalActionCreators).pop();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function PhoneVerificationModalRender_70123(a0, a1) { // fn#70123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9198:1184, owner: PhoneVerificationModal.render, offset: 0x01cefa29, size: 85 bytes, params: 3, frame: 16
|
|
var environment;
|
|
const env0_0 = a1;
|
|
const value = environment.__proto__;
|
|
return ((Component) => <Component {...a0} {...{['disableKeyboardAvoidingView']: true}} {...{['onVerified']: onVerified}} />)(VerifyPhone);
|
|
function onVerified(a0) { // fn#70124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9198:1250, owner: PhoneVerificationModal.render.onVerified, offset: 0x01cefa7e, size: 97 bytes, params: 2, frame: 17
|
|
const env0_0 = a0;
|
|
const push = require.push;
|
|
const VERIFY_PASSWORD = VerificationModalScenes.VERIFY_PASSWORD;
|
|
const env0_1 = env2_3(_fun70126);
|
|
Reflect.apply(push, require, [VERIFY_PASSWORD, {hideUnverifiedBanner: true, onSubmit: onSubmit_70127,
|
|
onSuccess: function() {
|
|
importDefault(dependencyMap[8]).popWithKey(PHONE_VERIFICATION_MODAL_KEY);
|
|
}}]);
|
|
function* _fun70126(a0) { // fn#70126, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9198:1325, offset: 0x01cefaea, size: 95 bytes, params: 2, frame: 16
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var addPhone;
|
|
var reason;
|
|
var value5;
|
|
var error;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
try {
|
|
binding = env4_1;
|
|
} catch (error) {
|
|
return error;
|
|
}
|
|
try {
|
|
binding2 = env4_2;
|
|
} catch (error) {
|
|
return error;
|
|
}
|
|
try {
|
|
property = binding2[7];
|
|
} catch (error) {
|
|
return error;
|
|
}
|
|
try {
|
|
value = binding(property);
|
|
} catch (error) {
|
|
return error;
|
|
}
|
|
try {
|
|
addPhone = value.addPhone;
|
|
} catch (error) {
|
|
return error;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
return error;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
return error;
|
|
}
|
|
try {
|
|
reason = require.reason;
|
|
} catch (error) {
|
|
return error;
|
|
}
|
|
try {
|
|
value = Reflect.apply(addPhone, value, [require, a0, reason]);
|
|
} catch (error) {
|
|
return error;
|
|
}
|
|
yield value;
|
|
try {
|
|
value = undefined;
|
|
value5 = false;
|
|
} catch (error) {
|
|
return error;
|
|
}
|
|
return value5 ? value : value;
|
|
}
|
|
|
|
function onVerifiedOnSubmit() { // fn#70127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9198:1408, owner: PhoneVerificationModal.render.onVerified.onSubmit, offset: 0x00c3b2ba, size: 30 bytes, params: 1, frame: 13
|
|
return env0_1.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function PhoneVerificationModalRender_70129(a0) { // fn#70129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9198:1563, owner: PhoneVerificationModal.render, offset: 0x01cefb73, size: 49 bytes, params: 2, frame: 14
|
|
const value = environment.__proto__;
|
|
return ((Component) => <Component {...a0} />)(UserSettingsConfirmPassword);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun70113, 9013, [5, 31, 661, 9014, 33, 5282, 9015, 9016, 5080, 480, 9024, 9010, 5280, 1244,
|
|
2]) /* metro module 9013, dependencies: [5, 31, 661, 9014, 33, 5282, 9015, 9016, 5080, 480, 9024, 9010, 5280, 1244, 2] */;
|