decord/alpha/source/modules/age_assurance/AgeVerificationMethodAvailability.native.tsx
github-actions 52331fb8ae chore: update source for alpha 349.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5051.js (118.4 MB)
2026-09-30 07:29:52 +00:00

102 lines
3.2 KiB
TypeScript

// Module ID: 8084
// Function ID: 8085
// Name: AgeVerificationMethodAvailability
// Dependencies: [5, 32, 19, 1380, 1364, 8085, 8086, 2]
// Exports: getAvailableMethodsV2, useAvailableMethodsV2
// Module 8084 (AgeVerificationMethodAvailability)
import PlatformUtils from "PlatformUtils" /* 1364 */;
import AppStoreAgeSignalSupport from "AppStoreAgeSignalSupport" /* 8085 */;
import GoogleWalletActionCreators from "GoogleWalletActionCreators" /* 8086 */;
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
require = fn;
function filterByAvailability(arr, arg1) {
({ googleWallet: require, appStoreSignal: dependencyMap } = arg1);
return arr.filter((method) => {
method = method.method;
if (closure_0(first[3]).AgeAssuranceMethod.GOOGLE_WALLET === method) {
return closure_0;
} else if (tmp(tmp2[3]).AgeAssuranceMethod.OS_SIGNAL === method) {
return closure_1;
} else {
return true;
}
tmp = closure_0;
tmp2 = first;
});
}
function isAppStoreSignalAvailable() {
let isIOSResult = PlatformUtils.isIOS();
if (isIOSResult) {
isIOSResult = AppStoreAgeSignalSupport.isAppStoreAgeSignalSupported();
const tmpResult = AppStoreAgeSignalSupport;
}
return isIOSResult;
}
let closure_7 = async function _getAvailableMethodsV() {
closure_3 = tmp2;
noop = filterByAvailability;
closure_2 = closure_0;
closure_1 = {};
closure_1.googleWallet = await GoogleWalletActionCreators.checkGoogleWalletAvailable();
closure_1.appStoreSignal = closure_131_6();
return noop(closure_2, closure_1);
};
const size = fn(2);
let result = size.fileFinishedImporting("modules/age_assurance/AgeVerificationMethodAvailability.native.tsx");
export const useAvailableMethodsV2 = function useAvailableMethodsV2(methods) {
let tmp = memo(noop.useState(false), 2);
const first = tmp[0];
closure_2 = tmp[1];
const effect = noop.useEffect(() => {
c0 = false;
const result = methods(first[6]).checkGoogleWalletAvailable();
result.then((result) => {
if (!c0) {
closure_2(result);
}
});
return () => {
c0 = true;
};
}, []);
memo = noop.useMemo(() => {
let isIOSResult = methods(first[4]).isIOS();
if (isIOSResult) {
isIOSResult = methods(first[5]).isAppStoreAgeSignalSupported();
const tmpResult = methods(first[5]);
}
return isIOSResult;
}, []);
const items = [methods, first, memo];
return noop.useMemo(() => {
methods = first;
closure_1 = memo;
return methods.filter((method) => {
method = method.method;
if (closure_0(first[3]).AgeAssuranceMethod.GOOGLE_WALLET === method) {
return closure_0;
} else if (tmp(tmp2[3]).AgeAssuranceMethod.OS_SIGNAL === method) {
return closure_1;
} else {
return true;
}
tmp = closure_0;
tmp2 = first;
});
}, items);
};
export const getAvailableMethodsV2 = function getAvailableMethodsV2() {
const self = this;
const apply = closure_7.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
};