/* Metro module 9016; source: modules/phone/PhoneActionCreators.tsx; dependencies: [5, 1226, 9014, 661, 694, 507, 5046, 480, 2] */ function _fun70147(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9201:6, offset: 0x01cf06e6, size: 367 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(5) /* metro dependency 5 */; const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */; const env0_5 = (require(9014) /* metro dependency 9014: PhoneConstants */).PHONE_VERIFICATION_MODAL_KEY; const env0_6 = (require(661) /* metro dependency 661: Constants */).Endpoints; let object = {setCountryCode: setCountryCode, removePhone: function(a0, a1) { var HTTP = require(dependencyMap[5]).HTTP; return HTTP.del({url: Endpoints.PHONE, body: {password: a0, change_phone_reason: a1}, oldFormErrors: true, rejectWithError: false}); }, resendCode: function(a0) { var object = {}; var value2 = AuthenticationStore.getFingerprint(); if (value2 != null && value2 !== '') { object['X-Fingerprint'] = value2; } var HTTP = require(dependencyMap[5]).HTTP; return HTTP.post({url: Endpoints.RESEND_PHONE, headers: object, body: {phone: a0}, rejectWithError: false}); }, beginAddPhone: function(a0, a1) { var HTTP = require(dependencyMap[5]).HTTP; return HTTP.post({url: Endpoints.PHONE, body: {phone: a0, change_phone_reason: a1}, rejectWithError: false}); }, addPhone: function(a0, a1, a2) { var HTTP = require(dependencyMap[5]).HTTP; return HTTP.post({url: Endpoints.PHONE, body: {phone_token: a0, password: a1, change_phone_reason: a2}, oldFormErrors: true, rejectWithError: false}); }, addPhoneWithoutPassword: function(a0) { var HTTP = require(dependencyMap[5]).HTTP; return HTTP.post({url: Endpoints.PHONE_VERIFY_NO_PASSWORD, body: {code: a0}, rejectWithError: false}); }, beginReverifyPhone: function(a0, a1) { var HTTP = require(dependencyMap[5]).HTTP; return HTTP.post({url: Endpoints.PHONE_REVERIFY, body: {phone: a0, change_phone_reason: a1}, rejectWithError: false}); }, reverifyPhone: function(a0, a1, a2) { var HTTP = require(dependencyMap[5]).HTTP; return HTTP.post({url: Endpoints.PHONE_REVERIFY, body: {phone_token: a0, password: a1, change_phone_reason: a2}, oldFormErrors: true, rejectWithError: false}); }, validatePhoneForSupport: function(a0) { var HTTP = require(dependencyMap[5]).HTTP; return HTTP.post({url: Endpoints.VERIFY_PHONE_FOR_TICKET, body: {token: a0}, oldFormErrors: true, rejectWithError: false}); }, verifyPhone: verifyPhone}; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/phone/PhoneActionCreators.tsx'); exports.default = object; exports.ChangePhoneReason = {USER_ACTION_REQUIRED: 'user_action_required', USER_SETTINGS_UPDATE: 'user_settings_update', GUILD_PHONE_REQUIRED: 'guild_phone_required', MFA_PHONE_UPDATE: 'mfa_phone_update', CONTACT_SYNC: 'contact_sync'}; } function setCountryCode(a0) { // fn#70148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9201:412, offset: 0x01cf0855, size: 57 bytes, params: 2, frame: 13 (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'PHONE_SET_COUNTRY_CODE', countryCode: a0}); } function verifyPhone(a0, a1) { // fn#70157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9201:1581, offset: 0x01cf0b88, size: 69 bytes, params: 3, frame: 13 const value = a2; const value2 = a3; const env0_0 = a0; const env0_1 = a1; const env0_2 = !(value !== undefined) || value; return (value2 !== undefined ? value2 : false)(_fun70159)(); } function* _fun70159() { // fn#70159, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9201:1601, offset: 0x01cf0bd8, size: 286 bytes, params: 1, frame: 19 var value10; if (false) { return undefined; } const object3 = {}; value = environment.__proto__.__proto__; let binding = env2_4; const fingerprint = binding.getFingerprint(); if (fingerprint != null && fingerprint !== '') { object3['X-Fingerprint'] = fingerprint; } if (env1_3) { object3.authorization = ''; } binding = env2_1; const binding2 = env2_2; const value7 = binding(binding2[6]); const post = value7.post; const object4 = {}; const VERIFY_PHONE = env2_6.VERIFY_PHONE; object4.url = VERIFY_PHONE; object4.headers = object3; object4.body = {phone: require, code: importDefault}; object4.oldFormErrors = true; const NetworkActionNames = env2_0(binding2[7]).NetworkActionNames; const USER_VERIFY_PHONE = NetworkActionNames.USER_VERIFY_PHONE; object4.trackedActionData = {event: USER_VERIFY_PHONE}; object4.rejectWithError = false; yield Reflect.apply(post, value7, [object4]); const value8 = undefined; if (false) { return value8; } if (dependencyMap) { value10 = env2_1(env2_2[4]); value10.dispatch({type: 'MODAL_POP', key: env2_5}); } return value8.body; }