/* Metro module 5265; source: modules/age_assurance/native/AgeVerificationModal.tsx; dependencies: [31, 5262, 33, 5266, 4007, 4813, 5269, 4501, 697, 5080, 5277, 1244, 5280, 2] */ function _fun46822(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5443:6, offset: 0x011afb0a, size: 258 bytes, params: 8, frame: 21 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importAll(31) /* metro dependency 31 */; const env0_4 = (require(5262) /* metro dependency 5262: AgeVerificationConstants */).AGE_VERIFICATION_MODAL_KEY; const env0_5 = (require(33) /* metro dependency 33 */).jsx; object = {VERIFY_AGE: 'VERIFY_AGE'}; const createStylesModule = require(4501) /* metro dependency 4501: createStyles */; const createStyles = createStylesModule.createStyles; const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER; const env0_8 = Reflect.apply(createStyles, createStylesModule, [{headerStyle: {backgroundColor: BACKGROUND_BASE_LOWER}}]); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_assurance/native/AgeVerificationModal.tsx'); exports.default = AgeVerificationModal; } function getScreens({headerStyle}, a1, a2, a3, a4) { // fn#46823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5443:1022, offset: 0x011afc0c, size: 98 bytes, params: 6, frame: 5 const env0_0 = a1; const env0_1 = a2; const env0_2 = a3; const VERIFY_AGE = env0_6.VERIFY_AGE; return {[VERIFY_AGE]: {headerStyle: headerStyle, headerTitle: a4, headerLeft: headerLeft_46825, render: render_46826}}; } function AgeVerifyScreen({webviewUrl, onComplete, onClose}) { // fn#46827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5443:232, offset: 0x011afd3e, size: 241 bytes, params: 2, frame: 21 const value2 = (require(5266) /* metro dependency 5266: SafetyHubUtils */).useIsSuspendedUser(); const binding = env0_3; let useCallback = binding.useCallback; const value3 = Reflect.apply(useCallback, binding, [function() { onComplete(); onClose(); }, [onComplete, onClose]]); useCallback = binding.useCallback; (require(4813) /* metro dependency 4813: AgeVerificationUtils */).useWatchAgeVerificationStatusChange(Reflect.apply(useCallback, binding, [_fun46829, [value3]])); return ((Component) => )(importDefault(5269) /* metro dependency 5269 */); } function AgeVerificationModal({webviewUrl, onComplete, onClose}) { // fn#46831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5443:1448, offset: 0x011aff09, size: 258 bytes, params: 2, frame: 23 const styles = useStyles(); const env0_3 = styles; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const value3 = env0_3.useMemo(_fun46832, [styles, webviewUrl, onComplete, onClose, intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wJVyYR)]); const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator; const VERIFY_AGE = env0_6.VERIFY_AGE; return ( ); } function getScreensHandleClose() { // fn#46824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5443:1069, owner: getScreens.handleClose, offset: 0x011afc6e, size: 48 bytes, params: 1, frame: 12 importAll(); const value = environment.__proto__; (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop(); } function getScreensHeaderLeft() { // fn#46825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5443:1167, owner: getScreens.headerLeft, offset: 0x011afc9e, size: 107 bytes, params: 1, frame: 18 const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton; const getScreensHandleCloseBinding = getScreensHandleClose; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; return ( ); } function getScreensRender() { // fn#46826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5443:1276, owner: getScreens.render, offset: 0x011afd09, size: 53 bytes, params: 1, frame: 14 return ( ); } function _fun46829() { // fn#46829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5443:365, offset: 0x011afe2f, size: 56 bytes, params: 1, frame: 12 const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */; if (navigationRouteUtilsNativeModule.isModalOpen(AGE_VERIFICATION_MODAL_KEY)) { env0_3(); } } function _fun46830(a0) { // fn#46830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5443:473, offset: 0x011afe67, size: 162 bytes, params: 2, frame: 15 var r1; var eventType; var r2; var value2; var JSON; var parse; var value3; var value4; var binding; var value5; var value6; var error; const value = undefined; let nativeEvent = a0.nativeEvent; let data = nativeEvent.data; if (data != null) { try { nativeEvent = a0.nativeEvent; data = nativeEvent.data; value2 = typeof data === 'string'; if (value2) { JSON = global.JSON; parse = JSON.parse; nativeEvent = a0.nativeEvent; data = nativeEvent.data; value3 = Reflect.apply(parse, JSON, [data]); r1 = value3; } else { nativeEvent = a0.nativeEvent; data = nativeEvent.data; r1 = data; } value4 = environment; binding = env0_2; if (binding) { value5 = r1 == null; eventType = value5 ? value : r1.eventType; value6 = eventType === 'Verification.Result'; r2 = value6; } else { r2 = binding; } if (r2) { binding = env0_3; binding(); } } catch (error) { } } return value; } function _fun46832() { // fn#46832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5443:1582, offset: 0x011b000b, size: 38 bytes, params: 1, frame: 19 return getScreens(styles, webviewUrl, onComplete, onClose, env0_4); }