decord/source/modules/age_assurance/AgeVerificationActionCreators.native.tsx

188 lines
6.5 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 6690
2026-07-27 11:26:19 +00:00
// Function ID: 59050
2026-07-20 16:05:17 +00:00
// Name: openIncodeAgeVerificationModal
2026-07-25 08:10:48 +00:00
// Dependencies: [5, 1850, 6691, 6693, 4345, 6659, 33, 4676, 4338, 6694, 1935, 6664, 1553, 4473, 6710, 6711, 6712, 4348, 3810, 686, 6713, 6714, 7557, 7558, 3828, 2]
2026-07-20 16:05:17 +00:00
2026-07-25 08:10:48 +00:00
// Module 6690 (openIncodeAgeVerificationModal)
2026-07-23 10:11:24 +00:00
import SafetyToastType from "SafetyToastType";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import set from "set";
import { AGE_VERIFICATION_INCODE_PATH as closure_9 } from "postToNativeWebView";
import { NativePermissionTypes } from "NativePermissionStatus";
import { SafetyToastType } from "SafetyToastType";
import { jsx } from "jsxProd";
import set from "set";
let closure_5;
let closure_6;
let closure_7;
let closure_8;
const require = arg1;
2026-07-20 16:05:17 +00:00
function openIncodeAgeVerificationModal(arg0) {
2026-07-23 10:11:24 +00:00
let importDefault;
let require;
({ onClose: require, onComplete: importDefault } = arg0);
2026-07-20 16:05:17 +00:00
let WEBAPP_ENDPOINT;
if (null != GLOBAL_ENV) {
WEBAPP_ENDPOINT = GLOBAL_ENV.WEBAPP_ENDPOINT;
}
let combined = null;
if (null != WEBAPP_ENDPOINT) {
combined = null;
if ("" !== WEBAPP_ENDPOINT) {
const _URL = URL;
const _HermesInternal2 = HermesInternal;
let str3 = "https:";
const uRL = new URL("https:" + WEBAPP_ENDPOINT);
const hostname = uRL.hostname;
if ("localhost" !== hostname) {
if ("127.0.0.1" !== hostname) {
2026-07-23 10:11:24 +00:00
let obj = /^(10\.|192\.168\.|172\.(1[6-9]|2\d|3[01])\.)/;
2026-07-20 16:05:17 +00:00
}
const _HermesInternal = HermesInternal;
combined = "" + str3 + WEBAPP_ENDPOINT + closure_9;
}
str3 = "http:";
}
}
let flag = null != combined;
if (flag) {
callback(async () => {
2026-07-23 10:11:24 +00:00
yield outer2_1(combined[7]).requestPermission(outer2_10.CAMERA, { showAuthorizationError: true });
const obj = outer2_1(combined[7]);
yield outer2_1(combined[8]).pushLazy(outer2_3(async () => {
2026-07-20 16:05:17 +00:00
let closure_0;
2026-07-23 10:11:24 +00:00
closure_0 = yield outer4_0(combined[10])(combined[9], combined.paths).default;
return () => outer5_12(closure_0, { webviewUrl: outer4_2, onClose: outer4_0, onComplete: outer4_1 });
}), {}, outer2_5);
2026-07-20 16:05:17 +00:00
})();
flag = true;
}
return flag;
}
2026-07-23 10:11:24 +00:00
({ AGE_VERIFICATION_MODAL_KEY: closure_5, AGE_VERIFICATION_GET_STARTED_MODAL_KEY: closure_6, AGE_VERIFICATION_QUEST_UNSUPPORTED_ALERT_KEY: closure_7, VerificationVendorName: closure_8 } = set);
const result = set.fileFinishedImporting("modules/age_assurance/AgeVerificationActionCreators.native.tsx");
export default {
2026-07-20 16:05:17 +00:00
showAgeVerification(onClose) {
let shouldShowExpressiveModal;
let webviewUrl;
let fn = onClose.onClose;
if (fn === undefined) {
2026-07-24 07:16:23 +00:00
fn = function n(arg0) {
2026-07-20 16:05:17 +00:00
};
}
({ shouldShowExpressiveModal, webviewUrl } = onClose);
2026-07-23 10:11:24 +00:00
let obj = { onClose: 0, shouldShowExpressiveModal: 0, webviewUrl: 0, verificationVendorName: 0, incodeParameters: 0 };
2026-07-20 16:05:17 +00:00
Object.setPrototypeOf(null);
2026-07-23 10:11:24 +00:00
let merged = Object.assign(onClose, obj);
2026-07-20 16:05:17 +00:00
if (obj2.isMetaQuest()) {
2026-07-23 10:11:24 +00:00
fn(merged[13]).openAlert(closure_7, jsx(webviewUrl(merged[14]), {}), fn);
2026-07-20 16:05:17 +00:00
let flag = true;
2026-07-23 10:11:24 +00:00
const obj6 = fn(merged[13]);
2026-07-20 16:05:17 +00:00
} else {
if (onClose.verificationVendorName === constants.INCODE) {
if (obj3.isAgeVerificationIncodeEnabled(merged.entryPoint)) {
obj = { onClose: fn, onComplete: merged.onComplete };
flag = openIncodeAgeVerificationModal(obj);
}
2026-07-23 10:11:24 +00:00
obj3 = fn(merged[15]);
2026-07-20 16:05:17 +00:00
}
flag = null != webviewUrl;
if (flag) {
2026-07-23 10:11:24 +00:00
webviewUrl(merged[8]).pushLazy(callback(async () => {
2026-07-20 16:05:17 +00:00
let closure_0;
2026-07-23 10:11:24 +00:00
closure_0 = yield fn(merged[10])(merged[16], merged.paths).default;
2026-07-20 16:05:17 +00:00
return () => {
2026-07-23 10:11:24 +00:00
const merged = Object.assign(outer2_2);
return outer3_12(closure_0, { webviewUrl: outer2_1, onClose: outer2_0 });
2026-07-20 16:05:17 +00:00
};
}), {}, closure_5);
flag = true;
2026-07-23 10:11:24 +00:00
const obj4 = webviewUrl(merged[8]);
2026-07-20 16:05:17 +00:00
}
}
return flag;
},
showAgeVerificationGetStartedModal(entryPoint) {
entryPoint = entryPoint.entryPoint;
const onClose = entryPoint.onClose;
let dependencyMap;
2026-07-23 10:11:24 +00:00
let prop;
2026-07-20 16:05:17 +00:00
let currentUser;
function handleClose() {
2026-07-23 10:11:24 +00:00
let obj = onClose(_undefined[19]);
2026-07-20 16:05:17 +00:00
obj = { type: "CLOSE_AGE_VERIFICATION_MODAL", status: prop };
obj.dispatch(obj);
if (null != onClose) {
onClose();
}
}
2026-07-23 10:11:24 +00:00
let obj = entryPoint(1553);
2026-07-20 16:05:17 +00:00
if (obj.isMetaQuest()) {
2026-07-25 08:10:48 +00:00
let tmpResult = tmp(4473);
tmpResult.openAlert(closure_7, jsx(onClose(6710), {}), onClose);
2026-07-20 16:05:17 +00:00
} else {
2026-07-25 08:10:48 +00:00
tmpResult = tmp(4348);
2026-07-20 16:05:17 +00:00
let isAgeVerifiedResult = tmpResult.isAgeVerified();
if (isAgeVerifiedResult) {
2026-07-25 08:10:48 +00:00
isAgeVerifiedResult = entryPoint(3810).hasAgeGatedFeatures();
const obj3 = entryPoint(3810);
2026-07-20 16:05:17 +00:00
}
dependencyMap = isAgeVerifiedResult;
if (obj4.isAgeVerificationIncodeEnabled(entryPoint)) {
currentUser = currentUser.getCurrentUser();
2026-07-23 10:11:24 +00:00
prop = undefined;
2026-07-20 16:05:17 +00:00
if (null != currentUser) {
prop = currentUser.ageVerificationStatus;
}
obj = { type: "INITIATE_AGE_VERIFICATION" };
2026-07-23 10:11:24 +00:00
onClose(686).dispatch(obj);
2026-07-20 16:05:17 +00:00
obj = {
onClose: handleClose,
onComplete() {
}
};
if (!openIncodeAgeVerificationModal(obj)) {
handleClose();
}
} else {
2026-07-24 07:16:23 +00:00
if (!isAgeVerifiedResult) {
if (obj5.isExpressiveModalV2Enabled(entryPoint)) {
2026-07-25 08:10:48 +00:00
onClose(4338).pushLazy(prop(async () => {
2026-07-24 07:16:23 +00:00
let closure_0;
closure_0 = yield entryPoint(c2[10])(c2[21], c2.paths).default;
return () => outer3_12(closure_0, {
entryPoint: outer2_0,
onClose() {
let tmp;
if (null != outer3_1) {
tmp = outer3_1();
}
return tmp;
}
});
}), {}, closure_6);
2026-07-25 08:10:48 +00:00
const obj6 = onClose(4338);
2026-07-24 07:16:23 +00:00
}
2026-07-25 08:10:48 +00:00
obj5 = entryPoint(6713);
2026-07-24 07:16:23 +00:00
}
2026-07-25 08:10:48 +00:00
currentUser = entryPoint(7557).isAgeVerificationExpressiveModalEverywhereEnabled(entryPoint);
const obj7 = entryPoint(7557);
onClose(4338).pushLazy(prop(async () => {
2026-07-20 16:05:17 +00:00
let closure_0;
2026-07-24 07:16:23 +00:00
closure_0 = yield entryPoint(c2[10])(c2[23], c2.paths).default;
2026-07-23 10:11:24 +00:00
return () => outer3_12(closure_0, { entryPoint: outer2_0, isRetry: outer2_2, useEmbeddedMethods: outer2_4 });
2026-07-20 16:05:17 +00:00
}), {}, closure_6);
2026-07-25 08:10:48 +00:00
const obj8 = onClose(4338);
2026-07-20 16:05:17 +00:00
}
2026-07-25 08:10:48 +00:00
obj4 = entryPoint(6711);
2026-07-20 16:05:17 +00:00
}
},
openUrl(arg0) {
2026-07-25 08:10:48 +00:00
importDefault(3828).openURL(arg0);
2026-07-20 16:05:17 +00:00
}
};