2026-09-28 16:18:32 +00:00
|
|
|
// Module ID: 17065
|
|
|
|
|
// Function ID: 17066
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: CaptchaModal
|
2026-09-28 16:18:32 +00:00
|
|
|
// Dependencies: [19, 17, 15570, 15571, 21, 4836, 6363, 1486, 17066, 6571, 5279, 17067, 4832, 1115, 5281, 5177, 17069, 15578, 2]
|
2026-09-26 17:57:22 +00:00
|
|
|
// Exports: default
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-09-28 16:18:32 +00:00
|
|
|
// Module 17065 (CaptchaModal)
|
2026-10-01 14:13:23 +00:00
|
|
|
import intl4 from "intl" /* 1115 */;
|
2026-09-28 16:18:32 +00:00
|
|
|
import Link from "Link" /* 1486 */;
|
|
|
|
|
import Text_Text from "Text/Text" /* 4832 */;
|
|
|
|
|
import SharedCaptchaUtils from "SharedCaptchaUtils" /* 5177 */;
|
|
|
|
|
import Stack_Stack from "Stack/Stack" /* 5279 */;
|
|
|
|
|
import Sheet_BottomSheet from "Sheet/BottomSheet" /* 6571 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import RegistrationUIStore from "RegistrationUIStore" /* 15570 */;
|
2026-09-28 16:18:32 +00:00
|
|
|
import RegistrationUtils from "RegistrationUtils" /* 15578 */;
|
|
|
|
|
import DisguiseSpotIllustration from "DisguiseSpotIllustration" /* 17067 */;
|
|
|
|
|
import CaptchaUtilsDefault from "CaptchaUtils" /* 17069 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import react from "react" /* 19 */;
|
|
|
|
|
import react_native from "react-native" /* 17 */;
|
|
|
|
|
import RegistrationConstants from "RegistrationConstants" /* 15571 */;
|
|
|
|
|
import Fragment from "Fragment" /* 21 */;
|
|
|
|
|
import createStyles from "createStyles" /* 4836 */;
|
|
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-01 14:13:23 +00:00
|
|
|
let BottomSheet, navigation;
|
|
|
|
|
|
|
|
|
|
let c10;
|
|
|
|
|
let c9;
|
|
|
|
|
let closure_4;
|
|
|
|
|
let hasOwnProperty;
|
|
|
|
|
let metroImportAll;
|
|
|
|
|
let metroImportDefault;
|
|
|
|
|
({ Keyboard: closure_4, View: hasOwnProperty } = react_native);
|
|
|
|
|
let closure_6 = RegistrationUIStore.doesRegistrationHaveIdentityType;
|
|
|
|
|
({ RegisterTransitionSteps: metroImportDefault, RegistrationTransitionActionTypes: metroImportAll } = RegistrationConstants);
|
|
|
|
|
({ jsx: c9, jsxs: c10 } = Fragment);
|
2026-09-18 19:45:33 +00:00
|
|
|
let closure_11 = createStyles.createStyles((arg0) => {
|
|
|
|
|
let num = 8;
|
2026-10-01 14:13:23 +00:00
|
|
|
const tmp = arg0;
|
|
|
|
|
if (tmp) {
|
2026-09-18 19:45:33 +00:00
|
|
|
num = 32;
|
|
|
|
|
}
|
|
|
|
|
return { contentContainer: { alignItems: "center", paddingVertical: 8, paddingHorizontal: num }, description: { paddingBottom: 12, paddingTop: 4 } };
|
|
|
|
|
});
|
|
|
|
|
let result = size.fileFinishedImporting("modules/captcha/native/CaptchaModal.tsx");
|
|
|
|
|
|
2026-09-26 17:57:22 +00:00
|
|
|
export default function CaptchaModal(arg0) {
|
2026-10-01 14:13:23 +00:00
|
|
|
let bodyText;
|
|
|
|
|
let closure_4;
|
|
|
|
|
let closure_5;
|
|
|
|
|
let closure_7;
|
|
|
|
|
let headerText;
|
|
|
|
|
let intl3;
|
|
|
|
|
let items1;
|
|
|
|
|
let onReject;
|
2026-09-18 19:45:33 +00:00
|
|
|
({ onCaptchaVerify: require, onReject } = arg0);
|
2026-10-01 14:13:23 +00:00
|
|
|
({ close: dependencyMap, sitekey: react, captchaService: closure_4, headerText, bodyText, rqdata: closure_5, rqtoken: closure_6, userflow: closure_7 } = arg0);
|
|
|
|
|
let tmp = dependencyMap;
|
2026-09-28 16:18:32 +00:00
|
|
|
const tmp2 = closure_11(onReject(6363)());
|
2026-10-01 14:13:23 +00:00
|
|
|
let obj = Link;
|
|
|
|
|
navigation = obj.useNavigation();
|
2026-09-18 19:45:33 +00:00
|
|
|
const items = [navigation];
|
2026-10-01 14:13:23 +00:00
|
|
|
const memo = react.useMemo(() => {
|
2026-09-26 17:57:22 +00:00
|
|
|
const state = navigation.getState();
|
2026-09-18 19:45:33 +00:00
|
|
|
let name;
|
|
|
|
|
if (state != null) {
|
|
|
|
|
const first = state.routes[0];
|
|
|
|
|
if (first != null) {
|
|
|
|
|
name = first.name;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let str = "Guild Join Captcha";
|
|
|
|
|
if ("auth" === name) {
|
|
|
|
|
str = "Guild Join Captcha";
|
|
|
|
|
if (closure_6()) {
|
|
|
|
|
str = "User Registration Captcha";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return str;
|
|
|
|
|
}, items);
|
2026-10-01 14:13:23 +00:00
|
|
|
let closure_9 = onReject(17066)({ onReject, analyticsType: memo });
|
|
|
|
|
const effect = react.useEffect(() => {
|
|
|
|
|
closure_4.dismiss();
|
2026-09-18 19:45:33 +00:00
|
|
|
}, []);
|
2026-10-01 14:13:23 +00:00
|
|
|
BottomSheet = Sheet_BottomSheet.BottomSheet;
|
|
|
|
|
let obj2 = { style: tmp2.contentContainer, spacing: 12, children: items1 };
|
|
|
|
|
const Stack = Stack_Stack.Stack;
|
|
|
|
|
items1 = [closure_9(DisguiseSpotIllustration.DisguiseSpotIllustration, { scale: 0.5 }), , ];
|
|
|
|
|
const Text = Text_Text.Text;
|
|
|
|
|
const tmp9 = closure_5;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (headerText == null) {
|
2026-09-26 17:57:22 +00:00
|
|
|
const intl = tmp3(1115).intl;
|
|
|
|
|
headerText = intl.string(tmp3(1115).t.FpoiHe);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
const items2 = [tmp7(Text, { variant: "heading-xl/bold", accessibilityRole: "header", children: headerText }), ];
|
|
|
|
|
let obj3 = { variant: "text-md/medium", color: "text-subtle", style: tmp2.description, children: bodyText };
|
|
|
|
|
const Text2 = tmp3(4832).Text;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (bodyText == null) {
|
2026-09-26 17:57:22 +00:00
|
|
|
const intl2 = tmp3(1115).intl;
|
|
|
|
|
bodyText = intl2.string(tmp3(1115).t["/CidxO"]);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
let obj4 = { startHeight: 900, startExpanded: true, children: tmp8(Stack, obj2) };
|
|
|
|
|
let obj5 = { children: items2 };
|
|
|
|
|
items2[1] = closure_9(Text2, obj3);
|
|
|
|
|
items1[1] = closure_10(tmp9, obj5);
|
2026-09-18 19:45:33 +00:00
|
|
|
const obj6 = {
|
|
|
|
|
grow: true,
|
|
|
|
|
onPress() {
|
2026-10-01 14:13:23 +00:00
|
|
|
const tmp = closure_9();
|
2026-09-18 19:45:33 +00:00
|
|
|
dependencyMap();
|
2026-10-01 14:13:23 +00:00
|
|
|
let obj = SharedCaptchaUtils;
|
|
|
|
|
const result = obj.emitCaptchaDistributionMetric(constants);
|
|
|
|
|
let obj2 = CaptchaUtilsDefault;
|
|
|
|
|
const showCaptchaResult = obj2.showCaptcha(closure_4, react, closure_5);
|
|
|
|
|
const nextPromise = showCaptchaResult.then((result) => {
|
|
|
|
|
const obj = state;
|
2026-09-18 19:45:33 +00:00
|
|
|
state = state.getState();
|
|
|
|
|
let name;
|
|
|
|
|
if (state != null) {
|
|
|
|
|
const first = state.routes[0];
|
|
|
|
|
if (first != null) {
|
|
|
|
|
name = first.name;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
const tmp4 = "auth" === name && closure_6();
|
2026-09-18 19:45:33 +00:00
|
|
|
if (tmp4) {
|
|
|
|
|
const obj3 = { step: constants.CAPTCHA, actionType: navigation.SUBMITTED };
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj2 = RegistrationUtils;
|
|
|
|
|
obj2.trackRegTransition(obj3);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
closure_1_0(result, closure_1_6);
|
2026-10-01 14:13:23 +00:00
|
|
|
const state1 = obj.getState();
|
2026-09-18 19:45:33 +00:00
|
|
|
let name1;
|
|
|
|
|
if (state1 != null) {
|
|
|
|
|
const first1 = state1.routes[0];
|
|
|
|
|
if (first1 != null) {
|
|
|
|
|
name1 = first1.name;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
const tmp15 = "auth" === name1 && closure_6();
|
2026-09-18 19:45:33 +00:00
|
|
|
if (tmp15) {
|
|
|
|
|
const obj5 = { step: constants.CAPTCHA, actionType: navigation.SUCCESS };
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj4 = RegistrationUtils;
|
|
|
|
|
obj4.trackRegTransition(obj5);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
});
|
|
|
|
|
nextPromise.catch((error) => {
|
2026-09-18 19:45:33 +00:00
|
|
|
if (onReject != null) {
|
|
|
|
|
tmp(error);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
2026-10-01 14:13:23 +00:00
|
|
|
text: intl3.string(intl4.t["cY+Oob"])
|
2026-09-18 19:45:33 +00:00
|
|
|
};
|
2026-10-01 14:13:23 +00:00
|
|
|
const Button = tmp3(5281).Button;
|
|
|
|
|
intl3 = tmp3(1115).intl;
|
|
|
|
|
items1[2] = closure_9(Button, obj6);
|
|
|
|
|
return closure_9(BottomSheet, obj4);
|
2026-09-26 17:57:22 +00:00
|
|
|
};
|