151 lines
7.9 KiB
TypeScript
151 lines
7.9 KiB
TypeScript
/* Metro module 6257; source: modules/age_assurance/AgeVerificationURLActionCreators.tsx; dependencies: [5, 1226, 661, 5266, 507, 694, 2] */
|
|
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
function _fun49403(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6435:6, offset: 0x011f8866, size: 267 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const closure = function() {
|
|
return _initiateAgeVerification.apply(this, arguments);
|
|
};
|
|
const closure2 = function() {
|
|
return _initiateSuspendedUserAgeVerification.apply(this, arguments);
|
|
};
|
|
const closure3 = function() {
|
|
var HTTP = require(dependencyMap[4]).HTTP;
|
|
return HTTP.get({url: Endpoints.AGE_VERIFICATION_METHODS, rejectWithError: true});
|
|
};
|
|
const closure4 = function() {
|
|
var value2 = AuthenticationStore.getSuspendedUserToken();
|
|
var HTTP = require(dependencyMap[4]).HTTP;
|
|
return HTTP.post({url: Endpoints.SAFETY_HUB_GET_SUSPENDED_AGE_VERIFICATION_METHODS, rejectWithError: true,
|
|
body: {token: value2}});
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/age_assurance/AgeVerificationURLActionCreators.tsx');
|
|
exports.requestAgeVerification = function() {
|
|
return _requestAgeVerification.apply(this, arguments);
|
|
};
|
|
exports.initiateAgeVerification = closure;
|
|
exports.initiateSuspendedUserAgeVerification = closure2;
|
|
exports.getAgeVerificationMethods = function() {
|
|
return _getAgeVerificationMethods.apply(this, arguments);
|
|
};
|
|
exports.fetchAgeVerificationMethods = closure3;
|
|
exports.fetchAgeVerificationMethodsSuspendedUser = closure4;
|
|
function _requestAgeVerification() { // fn#49404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6435:136, offset: 0x011f8971, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun49406).apply(this, arguments);
|
|
async function _fun49406({method, classificationId}) { // fn#49406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6435:205, offset: 0x011f89b3, size: 147 bytes, params: 2, frame: 17
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
await undefined;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const value4 = env2_0(env2_2[3]);
|
|
if (value4.isCurrentUserSuspended()) {
|
|
await env2_9({classificationId: classificationId, method: method});
|
|
} else {
|
|
await env2_7(method);
|
|
}
|
|
value = undefined;
|
|
if (false) {
|
|
}
|
|
return value;
|
|
}
|
|
|
|
}
|
|
|
|
function _initiateAgeVerification() { // fn#49408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6435:508, offset: 0x011f8a46, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun49410).apply(this, arguments);
|
|
function* _fun49410(a0) { // fn#49410, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6435:579, offset: 0x011f8a7f, size: 108 bytes, params: 2, frame: 14
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const HTTP = env2_0(env2_2[4]).HTTP;
|
|
const post = HTTP.post;
|
|
const VERIFY_AGE = env2_5.VERIFY_AGE;
|
|
yield Reflect.apply(post, HTTP, [{url: VERIFY_AGE, body: {method: a0}, rejectWithError: true}]);
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
return value.body;
|
|
}
|
|
|
|
}
|
|
|
|
function _initiateSuspendedUserAgeVerification() { // fn#49412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6435:825, offset: 0x011f8aeb, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun49414).apply(this, arguments);
|
|
async function _fun49414({classificationId, method}) { // fn#49414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6435:922, offset: 0x011f8b2d, size: 160 bytes, params: 2, frame: 18
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
await undefined;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const suspendedUserToken = env2_4.getSuspendedUserToken();
|
|
const HTTP = env2_0(env2_2[4]).HTTP;
|
|
const post = HTTP.post;
|
|
const SAFETY_HUB_REQUEST_SUSPENDED_AGE_VERIFICATION = env2_5.SAFETY_HUB_REQUEST_SUSPENDED_AGE_VERIFICATION;
|
|
await Reflect.apply(post, HTTP, [{url: SAFETY_HUB_REQUEST_SUSPENDED_AGE_VERIFICATION,
|
|
body: {token: suspendedUserToken, from_classification_id: classificationId, method: method},
|
|
rejectWithError: true}]);
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
return value.body;
|
|
}
|
|
|
|
}
|
|
|
|
function _getAgeVerificationMethods() { // fn#49415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6435:1181, offset: 0x011f8bcd, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun49417).apply(this, arguments);
|
|
function* _fun49417() { // fn#49417, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6435:1256, offset: 0x011f8c06, size: 167 bytes, params: 1, frame: 17
|
|
var environment;
|
|
var r5;
|
|
var r1;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_1;
|
|
var binding2 = env2_2;
|
|
var value3 = undefined;
|
|
binding(binding2[5]).dispatch({type: 'AGE_VERIFICATION_METHODS_LOAD_START'});
|
|
var value5 = env2_0(binding2[3]);
|
|
r5 = value5.isCurrentUserSuspended() ? env2_13() : env2_12();
|
|
if (r5 == null) {
|
|
r1 = value3;
|
|
} else {
|
|
value = r5.then(_fun49418);
|
|
value = value.catch(_fun49419);
|
|
r1 = value;
|
|
}
|
|
yield r1;
|
|
}
|
|
function _fun49418({body}) { // fn#49418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6435:1487, offset: 0x011f8cad, size: 68 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
env3_1(env3_2[5]).dispatch({type: 'AGE_VERIFICATION_METHODS_LOAD_SUCCESS', methods: body.methods});
|
|
}
|
|
|
|
function _fun49419() { // fn#49419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6435:1589, offset: 0x011f8cf1, size: 49 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
env3_1(env3_2[5]).dispatch({type: 'AGE_VERIFICATION_METHODS_LOAD_FAILURE'});
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun49403, 6257, [5, 1226, 661, 5266, 507, 694,
|
|
2]) /* metro module 6257, dependencies: [5, 1226, 661, 5266, 507, 694, 2] */;
|