Files
2026-07-28 01:06:53 +03:00

933 lines
48 KiB
TypeScript

/* Metro module 4813; source: modules/age_assurance/AgeVerificationUtils.tsx; dependencies: [5, 57, 31, 3836, 1226, 4814, 1878, 5261, 5262, 661, 1229, 6263, 5074, 4861, 3835, 1909, 566, 694, 6257, 5263, 6264, 6266, 1244, 2742, 6267, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RegionalFeatureConfigStore from '../regional_feature_config/RegionalFeatureConfigStore.tsx'; /* Metro dependency 3836 */
import MessageStore from '../../stores/MessageStore.tsx'; /* Metro dependency 4814 */
import AgeVerificationStore from './AgeVerificationStore.tsx'; /* Metro dependency 5261 */
import UsePrevious from '../../hooks/usePrevious.tsx'; /* Metro dependency 6266 */
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 FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as AgeGateConstantsModule from '../age_gate/AgeGateConstants.tsx'; /* Metro dependency 1229 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ServerModule from '../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as RegionalFeatureConfigUtilsModule from '../regional_feature_config/RegionalFeatureConfigUtils.tsx'; /* Metro dependency 3835 */
import * as AgeGatedFeatureModule from '../../external/discord_common/js/shared/shared-constants/AgeGatedFeature.tsx'; /* Metro dependency 4861 */
import * as AgeVerificationAnalyticsUtilsModule from './AgeVerificationAnalyticsUtils.tsx'; /* Metro dependency 5074 */
import * as AgeVerificationConstantsModule from './AgeVerificationConstants.tsx'; /* Metro dependency 5262 */
import * as ConstantsModule2 from '../safety_common/Constants.tsx'; /* Metro dependency 6263 */
function _fun41747(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:6, offset: 0x01127097, size: 940 bytes, params: 8, frame: 26
const env0_0 = require;
const isReactiveCheckEnabled = function() {
return RegionalFeatureConfigStore.isFeatureAgeGated(require(dependencyMap[13]).AgeGatedFeature.REACTIVE_CHECK);
};
const closure = function() {
return require(dependencyMap[16]).useStateFromStores([UserStore], _fun41751);
};
const isAgeVerified2 = isAgeVerified;
const useIsAgeVerified2 = useIsAgeVerified;
const useShouldCallReactiveCheck2 = useShouldCallReactiveCheck;
const shouldCallReactiveCheck2 = shouldCallReactiveCheck;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const AgeGateSource = AgeGateConstantsModule.AgeGateSource;
let Set = global.Set;
const {STAGE_CHANNEL_AGE_VERIFICATION_PROMPT, START_STAGE_PROMPT,
STAGE_CHANNEL_RAISE_HAND} = (AgeVerificationAnalyticsUtilsModule).AgeVerificationModalEntryPoint;
let set = new Set([STAGE_CHANNEL_AGE_VERIFICATION_PROMPT, START_STAGE_PROMPT, STAGE_CHANNEL_RAISE_HAND]);
Set = global.Set;
const NSFW_SERVER = AgeGateSource.NSFW_SERVER;
const NSFW_SERVER_INVITE = AgeGateSource.NSFW_SERVER_INVITE;
const NSFW_SERVER_INVITE_EMBED = AgeGateSource.NSFW_SERVER_INVITE_EMBED;
const LARGE_GUILD = AgeGateSource.LARGE_GUILD;
const JOIN_LARGE_GUILD_UNDERAGE = AgeGateSource.JOIN_LARGE_GUILD_UNDERAGE;
const ACCESS_LARGE_GUILD_UNDERAGE = AgeGateSource.ACCESS_LARGE_GUILD_UNDERAGE;
set = new Set([NSFW_SERVER, NSFW_SERVER_INVITE, NSFW_SERVER_INVITE_EMBED, LARGE_GUILD, JOIN_LARGE_GUILD_UNDERAGE,
ACCESS_LARGE_GUILD_UNDERAGE]);
(FileImportTrackerModule).fileFinishedImporting('modules/age_assurance/AgeVerificationUtils.tsx');
exports.ageGateSourceHasLightboxBackdrop = ageGateSourceHasLightboxBackdrop;
exports.shouldShowTiggerPawtect = shouldShowTiggerPawtect;
exports.useShouldShowTiggerPawtect = useShouldShowTiggerPawtect;
exports.isVerifiedTeen = function() {
return UserStore.getCurrentUser()?.ageVerificationStatus === require(dependencyMap[15]).AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
};
exports.useIsVerifiedTeen = function() {
var value2 = undefined;
var value3 = require(dependencyMap[16]).useStateFromStores([UserStore], _fun41767);
return (value3 == null ? value2 : value3.ageVerificationStatus) === require(dependencyMap[15]).AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
};
exports.isVerifiedAdult = isVerifiedAdult;
exports.useIsVerifiedAdult = useIsVerifiedAdult;
exports.useIsExplicitlyVerifiedAdult = function() {
var value2 = undefined;
var value3 = require(dependencyMap[16]).useStateFromStores([UserStore], _fun41772);
return (value3 == null ? value2 : value3.ageVerificationStatus) === require(dependencyMap[15]).AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT;
};
exports.isAssignedByDiscord = function() {
return UserStore.getCurrentUser()?.ageVerificationStatus === require(dependencyMap[15]).AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT;
};
exports.useIsAssignedByDiscord = closure;
exports.useShowAssignedAgeGroupSettings = useShowAssignedAgeGroupSettings;
exports.AgeVerificationSystemNotificationEmbedKeys = {CTAS: 'ctas', CONTENT_TYPE: 'content_type'};
exports.AgeVerificationSystemNotificationCtaTypes = {RETRY: 'retry'};
exports.AgeVerificationSystemNotificationContentType = {VERIFIED_ADULT: 'verified_adult',
VERIFIED_TEEN: 'verified_teen', ERROR: 'error'};
exports.isAgeVerificationMessageWithRetryCta = isAgeVerificationMessageWithRetryCta;
exports.isAgeVerified = isAgeVerified2;
exports.useIsAgeVerified = useIsAgeVerified2;
exports.useInitiateAgeVerification = useInitiateAgeVerification;
exports.useWatchAgeVerificationStatusChange = useWatchAgeVerificationStatusChange;
exports.isFullscreenAgeVerificationEntryPoint = isFullscreenAgeVerificationEntryPoint;
exports.getAgeVerificationGetStartedTitle = getAgeVerificationGetStartedTitle;
exports.getAgeVerificationGetStartedSubtitle = getAgeVerificationGetStartedSubtitle;
exports.useShouldCallReactiveCheck = useShouldCallReactiveCheck2;
exports.useMaybePerformReactiveCheckForSource = useMaybePerformReactiveCheckForSource;
exports.shouldCallReactiveCheck = shouldCallReactiveCheck2;
exports.maybePerformReactiveCheck = function() {
return _maybePerformReactiveCheck.apply(this, arguments);
};
function useIsReactiveCheckEnabled() { // fn#41749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:813, offset: 0x01127479, size: 62 bytes, params: 1, frame: 14
const useIsFeatureAgeGated = RegionalFeatureConfigUtilsModule.useIsFeatureAgeGated;
const AgeGatedFeature = (AgeGatedFeatureModule).AgeGatedFeature;
const REACTIVE_CHECK = AgeGatedFeature.REACTIVE_CHECK;
return Reflect.apply(useIsFeatureAgeGated, RegionalFeatureConfigUtilsModule, [REACTIVE_CHECK]);
}
function useIsAssignedByDiscord() { // fn#41750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:928, offset: 0x011274b7, size: 57 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser()?.ageVerificationStatus === require(dependencyMap[15]).AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT;
});
function _fun41751() { // fn#41751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:1002, offset: 0x011274f0, size: 73 bytes, params: 1, frame: 13
const ageVerificationStatus = UserStore.getCurrentUser()?.ageVerificationStatus;
const AgeVerificationStatusUkAndAusOnly = (ServerModule).AgeVerificationStatusUkAndAusOnly;
const INFERRED_ADULT = AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT;
return ageVerificationStatus === INFERRED_ADULT;
}
}
function isAgeVerified() { // fn#41752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:1374, offset: 0x01127539, size: 124 bytes, params: 1, frame: 16
const currentUser = UserStore.getCurrentUser();
const value3 = undefined;
const ageVerificationStatus = currentUser == null ? value3 : currentUser.ageVerificationStatus;
const AgeVerificationStatusUkAndAusOnly = (ServerModule).AgeVerificationStatusUkAndAusOnly;
const UNVERIFIED = AgeVerificationStatusUkAndAusOnly.UNVERIFIED;
return ageVerificationStatus !== UNVERIFIED && (currentUser == null ? value3 : currentUser.ageVerificationStatus) !== AgeVerificationStatusUkAndAusOnly.CLIENT_ONLY_PENDING;
}
function useIsAgeVerified() { // fn#41753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:1634, offset: 0x011275b5, size: 161 bytes, params: 1, frame: 17
const value2 = undefined;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const ageVerificationStatus = currentUser == null ? value2 : currentUser.ageVerificationStatus;
const AgeVerificationStatusUkAndAusOnly = (ServerModule).AgeVerificationStatusUkAndAusOnly;
const UNVERIFIED = AgeVerificationStatusUkAndAusOnly.UNVERIFIED;
return ageVerificationStatus !== UNVERIFIED && (currentUser == null ? value2 : currentUser.ageVerificationStatus) !== AgeVerificationStatusUkAndAusOnly.CLIENT_ONLY_PENDING;
}
function useShouldCallReactiveCheck() { // fn#41755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:1936, offset: 0x01127668, size: 133 bytes, params: 1, frame: 19
const value2 = useIsAgeVerified();
const useIsFeatureAgeGated = RegionalFeatureConfigUtilsModule.useIsFeatureAgeGated;
const AgeGatedFeature = (AgeGatedFeatureModule).AgeGatedFeature;
const REACTIVE_CHECK = AgeGatedFeature.REACTIVE_CHECK;
return (FluxModule).useStateFromStores([AgeVerificationStore], _fun41756,
[value2, Reflect.apply(useIsFeatureAgeGated, RegionalFeatureConfigUtilsModule, [REACTIVE_CHECK])]);
function _fun41756() { // fn#41756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:2112, offset: 0x011276ed, size: 42 bytes, params: 1, frame: 11
var r1;
var r0;
var value;
let binding = env0_0;
if (binding) {
r0 = !binding;
} else {
binding = env0_1;
if (binding) {
value = environment.__proto__;
value = AgeVerificationStore.shouldCallReactiveCheck();
r1 = value;
} else {
r1 = binding;
}
r0 = r1;
}
return r0;
}
}
function shouldCallReactiveCheck() { // fn#41757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:2161, offset: 0x01127717, size: 49 bytes, params: 1, frame: 11
return !isAgeVerified() && (isReactiveCheckEnabled() && AgeVerificationStore.shouldCallReactiveCheck());
}
function _maybePerformReactiveCheck() { // fn#41758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:2276, offset: 0x01127748, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun41760).apply(this, arguments);
function* _fun41760() { // fn#41760, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:2351, offset: 0x01127781, size: 77 bytes, params: 1, frame: 14
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const value3 = env2_25();
const value4 = null;
if (value3) {
value = env2_0(env2_2[24]);
yield value.fetchReactiveCheckResult();
value = undefined;
if (false) {
return value;
}
return value;
}
return value4;
}
}
function ageGateSourceHasLightboxBackdrop(a0) { // fn#41761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:2586, offset: 0x00e4b577, size: 22 bytes, params: 2, frame: 11
return env0_16.has(a0);
}
function shouldShowTiggerPawtect() { // fn#41762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:2625, offset: 0x011277ce, size: 126 bytes, params: 1, frame: 15
var r0;
var isReactiveCheckEnabled2;
const ageVerificationStatus = UserStore.getCurrentUser()?.ageVerificationStatus;
const AgeVerificationStatusUkAndAusOnly = (ServerModule).AgeVerificationStatusUkAndAusOnly;
const VERIFIED_ADULT = AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT;
const value4 = ageVerificationStatus !== VERIFIED_ADULT;
if (value4) {
isReactiveCheckEnabled2 = isReactiveCheckEnabled();
r0 = isReactiveCheckEnabled2 ? ageVerificationStatus !== AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT : !isReactiveCheckEnabled2;
} else {
r0 = value4;
}
return r0;
}
function useShouldShowTiggerPawtect() { // fn#41763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:2918, offset: 0x0112784c, size: 180 bytes, params: 1, frame: 17
const AgeVerificationStatusUkAndAusOnly = (ServerModule).AgeVerificationStatusUkAndAusOnly;
const value2 = undefined;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const r1 = useIsReactiveCheckEnabled() && (currentUser == null ? value2 : currentUser.ageVerificationStatus) === AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT;
const ageVerificationStatus = currentUser == null ? value2 : currentUser.ageVerificationStatus;
const VERIFIED_ADULT = AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT;
return ageVerificationStatus !== VERIFIED_ADULT && !r1;
}
function useIsVerifiedTeen() { // fn#41766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:3461, offset: 0x01127949, size: 110 bytes, params: 1, frame: 15
const value2 = undefined;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const ageVerificationStatus = currentUser == null ? value2 : currentUser.ageVerificationStatus;
const AgeVerificationStatusUkAndAusOnly = (ServerModule).AgeVerificationStatusUkAndAusOnly;
const VERIFIED_TEEN = AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
return ageVerificationStatus === VERIFIED_TEEN;
function _fun41767() { // fn#41767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:3529, offset: 0x01127656, size: 18 bytes, params: 1, frame: 9
return UserStore.getCurrentUser();
}
}
function isVerifiedAdult() { // fn#41768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:3680, offset: 0x011279b7, size: 123 bytes, params: 1, frame: 15
const ageVerificationStatus = UserStore.getCurrentUser()?.ageVerificationStatus;
const AgeVerificationStatusUkAndAusOnly = (ServerModule).AgeVerificationStatusUkAndAusOnly;
const VERIFIED_ADULT = AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT;
return ageVerificationStatus === VERIFIED_ADULT || isReactiveCheckEnabled() && ageVerificationStatus === AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT;
}
function useIsVerifiedAdult() { // fn#41769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:3954, offset: 0x01127a32, size: 180 bytes, params: 1, frame: 17
const AgeVerificationStatusUkAndAusOnly = (ServerModule).AgeVerificationStatusUkAndAusOnly;
const value2 = undefined;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const r1 = useIsReactiveCheckEnabled() && (currentUser == null ? value2 : currentUser.ageVerificationStatus) === AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT;
const ageVerificationStatus = currentUser == null ? value2 : currentUser.ageVerificationStatus;
const VERIFIED_ADULT = AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT;
return ageVerificationStatus === VERIFIED_ADULT || r1;
}
function useIsExplicitlyVerifiedAdult() { // fn#41771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:4323, offset: 0x01127ae6, size: 110 bytes, params: 1, frame: 15
const value2 = undefined;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const ageVerificationStatus = currentUser == null ? value2 : currentUser.ageVerificationStatus;
const AgeVerificationStatusUkAndAusOnly = (ServerModule).AgeVerificationStatusUkAndAusOnly;
const VERIFIED_ADULT = AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT;
return ageVerificationStatus === VERIFIED_ADULT;
function _fun41772() { // fn#41772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:4402, offset: 0x01127656, size: 18 bytes, params: 1, frame: 9
return UserStore.getCurrentUser();
}
}
function useShowAssignedAgeGroupSettings() { // fn#41774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:4806, offset: 0x01127b9d, size: 76 bytes, params: 1, frame: 15
var value;
const value2 = useIsAssignedByDiscord();
const useIsFeatureAgeGated = (RegionalFeatureConfigUtilsModule).useIsFeatureAgeGated;
const AgeGatedFeature = (AgeGatedFeatureModule).AgeGatedFeature;
const REACTIVE_CHECK = AgeGatedFeature.REACTIVE_CHECK;
value = Reflect.apply(useIsFeatureAgeGated, value, [REACTIVE_CHECK]);
return value && value2;
}
function isAgeVerificationMessageWithRetryCta(a0, a1) { // fn#41775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:5147, offset: 0x01127be9, size: 205 bytes, params: 3, frame: 15
var r0;
var value5;
const message = MessageStore.getMessage(a0, a1);
if (message == null) {
return false;
}
if (message.embeds == null) {
return false;
}
if (message.embeds.length === 0) {
return false;
}
if (message.embeds[0].fields == null) {
return false;
}
const type = message.embeds[0].type;
const AGE_VERIFICATION_SYSTEM_NOTIFICATION = MessageEmbedTypes.AGE_VERIFICATION_SYSTEM_NOTIFICATION;
if (type !== AGE_VERIFICATION_SYSTEM_NOTIFICATION) {
return false;
}
const value3 = message.embeds[0].fields.find(_fun41776);
if (value3 == null) {
r0 = undefined;
} else {
value5 = value3.rawValue.split(',');
r0 = value5.includes(env0_18.RETRY);
}
return r0;
function _fun41776({rawName}) { // fn#41776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:5395, offset: 0x01127cb6, size: 28 bytes, params: 2, frame: 2
const CTAS = env1_17.CTAS;
return rawName === CTAS;
}
}
function useInitiateAgeVerification({onComplete, entryPoint, shouldShowExpressiveModal, classificationId}) { // fn#41777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:5580, offset: 0x01127cd2, size: 294 bytes, params: 2, frame: 22
let value = undefined;
shouldShowExpressiveModal = !(shouldShowExpressiveModal === value) && shouldShowExpressiveModal;
classificationId = classificationId === value ? null : classificationId;
var env0_4Binding = value;
let binding = value;
var [property, env0_4] = env0_4Binding(binding.useState(false), 2);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const useRef = binding.useRef;
const current = Reflect.apply(useRef, binding,
[currentUser == null ? value : currentUser.ageVerificationStatus]).current;
binding = current;
let useCallback = binding.useCallback;
const value7 = Reflect.apply(useCallback, binding, [_fun41779, [current]]);
useCallback = binding.useCallback;
value = _fun41780();
value = Reflect.apply(useCallback, binding, [value, [onComplete, value7, shouldShowExpressiveModal,
classificationId, entryPoint]]);
return {loading: property, initiateAgeVerification: value};
function _fun41779() { // fn#41779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:5880, offset: 0x01127df8, size: 60 bytes, params: 1, frame: 13
const value = environment.__proto__;
(Dispatcher).dispatch({type: 'CLOSE_AGE_VERIFICATION_MODAL',
status: current});
}
function _fun41780() { // fn#41780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:5974, offset: 0x01127e34, size: 32 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun41782);
return _fun41783;
function* _fun41782(a0) { // fn#41782, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:5994, offset: 0x01127e5d, size: 359 bytes, params: 2, frame: 18
var r7;
var value;
var value2;
var value3;
var value4;
var binding;
var binding2;
var property;
var value5;
var dispatch;
var object;
var value6;
var requestAgeVerification;
var value7;
var value8;
var value9;
var value10;
var binding3;
var value11;
var showAgeVerification;
var verification_webview_url;
var verification_request_id;
var verification_vendor_name;
var regionalFeatureConfigStoreBinding;
var error;
var binding4;
var value12;
var showFailedToast;
var TIGGER_PAWTECT_ERROR;
exceptionLanding70: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = environment.__proto__.__proto__;
value3 = undefined;
env2_4(true);
value4 = environment.__proto__.__proto__.__proto__;
reducibleJoin4: while (true) {
reduciblePort69: while (true) {
exceptionLanding56: while (true) {
try {
try {
binding = env3_1;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
break reducibleJoin4;
}
try {
binding = env3_1;
} catch (error) {
break exceptionLanding70;
}
try {
binding4 = env3_2;
} catch (error) {
break exceptionLanding70;
}
try {
property = binding4[20];
} catch (error) {
break exceptionLanding70;
}
try {
value12 = binding(property);
} catch (error) {
break exceptionLanding70;
}
try {
showFailedToast = value12.showFailedToast;
} catch (error) {
break exceptionLanding70;
}
try {
binding = env3_14;
} catch (error) {
break exceptionLanding70;
}
try {
TIGGER_PAWTECT_ERROR = binding.TIGGER_PAWTECT_ERROR;
} catch (error) {
break exceptionLanding70;
}
try {
Reflect.apply(showFailedToast, value12, [TIGGER_PAWTECT_ERROR]);
} catch (error) {
break exceptionLanding70;
}
try {
regionalFeatureConfigStoreBinding = RegionalFeatureConfigStore;
} catch (error) {
break exceptionLanding70;
}
try {
regionalFeatureConfigStoreBinding();
} catch (error) {
break exceptionLanding70;
}
break reduciblePort69;
}
env2_4(false);
return value3;
}
try {
try {
binding2 = env3_2;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
property = binding2[17];
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
value5 = binding(property);
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
dispatch = value5.dispatch;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
object = {};
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
object.type = 'INITIATE_AGE_VERIFICATION';
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
Reflect.apply(dispatch, value5, [object]);
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
binding = env3_0;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
property = binding2[18];
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
requestAgeVerification = value6.requestAgeVerification;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
object = {};
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
object.method = a0;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
binding = env2_3;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
value7 = binding != null;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
reducibleJoin25: while (true) {
if (value7) {
try {
try {
binding = env2_3;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
r7 = binding;
break reducibleJoin25;
}
r7 = value3;
break reducibleJoin25;
}
try {
try {
object.classificationId = r7;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
value8 = Reflect.apply(requestAgeVerification, value6, [object]);
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
yield value8;
try {
try {
value9 = undefined;
value10 = false;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
if (value10) {
env2_4(false);
return value9;
}
try {
try {
binding = env3_1;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
binding3 = env3_2;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
property = binding3[19];
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
value11 = binding(property);
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
showAgeVerification = value11.showAgeVerification;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
object = {};
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
verification_webview_url = value9.verification_webview_url;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
object.webviewUrl = verification_webview_url;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
verification_request_id = value9.verification_request_id;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
object.verificationRequestId = verification_request_id;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
verification_vendor_name = value9.verification_vendor_name;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
object.verificationVendorName = verification_vendor_name;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
object.onComplete = require;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
regionalFeatureConfigStoreBinding = RegionalFeatureConfigStore;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
object.onClose = regionalFeatureConfigStoreBinding;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
regionalFeatureConfigStoreBinding = RegionalFeatureConfigStore;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
object.onCancel = regionalFeatureConfigStoreBinding;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
object.entryPoint = importDefault;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
object.shouldShowExpressiveModal = dependencyMap;
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
try {
try {
Reflect.apply(showAgeVerification, value11, [object]);
} catch (error) {
break exceptionLanding56;
}
} catch (error) {
break exceptionLanding70;
}
env2_4(false);
return value3;
}
env2_4(false);
throw error;
}
function _fun41783() { // fn#41783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:6491, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
function useWatchAgeVerificationStatusChange(a0) { // fn#41784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:6634, offset: 0x01127fc4, size: 228 bytes, params: 2, frame: 23
const env0_0 = a0;
let useStateFromStores = FluxModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, FluxModule, [[UserStore], _fun41785]);
const value3 = (UsePrevious)(value2);
useStateFromStores = FluxModule.useStateFromStores;
const authenticationStoreBinding = AuthenticationStore;
ReactModule.useEffect(_fun41788, [a0, value3 != null && value2 != null && value3 !== value2,
!Reflect.apply(useStateFromStores, FluxModule, [[authenticationStoreBinding],
_fun41786]) && !FluxModule.useStateFromStores([authenticationStoreBinding], function() {
return AuthenticationStore.isAuthenticated();
})]);
function _fun41785() { // fn#41785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:6721, offset: 0x011280a8, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.ageVerificationStatus;
}
function _fun41786() { // fn#41786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:6851, offset: 0x011280cb, size: 25 bytes, params: 1, frame: 9
const value = environment.__proto__;
return AuthenticationStore.getSuspendedUserToken() != null;
}
function _fun41788() { // fn#41788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:6998, offset: 0x011280f7, size: 31 bytes, params: 1, frame: 10
if (env0_1 || env0_2) {
env0_0();
}
}
}
function isFullscreenAgeVerificationEntryPoint(a0) { // fn#41789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:7068, offset: 0x01128116, size: 31 bytes, params: 2, frame: 12
return a0 != null && FULLSCREEN_AGE_VERIFICATION_ENTRY_POINTS.has(a0);
}
function getAgeVerificationGetStartedTitle(a0) { // fn#41790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:7181, offset: 0x01128135, size: 99 bytes, params: 2, frame: 15
const value2 = env0_15.has(a0);
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return value2 ? Reflect.apply(string, intl, [t.lSWVTM]) : Reflect.apply(string, intl, [t.xYXsr6]);
}
function getAgeVerificationGetStartedSubtitle(a0, a1) { // fn#41791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:7364, offset: 0x01128198, size: 298 bytes, params: 3, frame: 18
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const value = a2;
let r0 = value !== undefined ? value : false;
const binding = env0_15;
r0 = binding.has(a0) ? intl.string(t['S/xS/w']) : r0 ? intl.string((importDefault(2742) /* metro dependency 2742: AgeAssuranceMessages */).h7qzoa) : a1 != null ? intl.format((importDefault(2742) /* metro dependency 2742: AgeAssuranceMessages */).RpMIT0,
{handleOnHelpUrlHook: a1}) : intl.string(t.HxS3oQ);
return r0;
}
function useMaybePerformReactiveCheckForSource(a0) { // fn#41792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:7728, offset: 0x011282c2, size: 60 bytes, params: 2, frame: 16
const env0_0 = a0;
ReactModule.useEffect(_fun41793, [useShouldCallReactiveCheck(), a0]);
function _fun41793() { // fn#41793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4991:7826, offset: 0x011282fe, size: 73 bytes, params: 1, frame: 12
var value;
if (env0_1 && REACTIVE_CHECK_AGE_GATE_SOURCES.has(env0_0)) {
value = environment.__proto__;
value = require(6267) /* metro dependency 6267: ReactiveCheckActionCreators */;
value.fetchReactiveCheckResult();
}
}
}
}
global.__d(_fun41747, 4813, [5, 57, 31, 3836, 1226, 4814, 1878, 5261, 5262, 661, 1229, 6263, 5074, 4861, 3835, 1909,
566, 694, 6257, 5263, 6264, 6266, 1244, 2742, 6267,
2]) /* metro module 4813, dependencies: [5, 57, 31, 3836, 1226, 4814, 1878, 5261, 5262, 661, 1229, 6263, 5074, 4861, 3835, 1909, 566, 694, 6257, 5263, 6264, 6266, 1244, 2742, 6267, 2] */;