498 lines
23 KiB
TypeScript
498 lines
23 KiB
TypeScript
/* Metro module 14227; source: modules/captcha/tooling/native/CaptchaTestModal.tsx; dependencies: [5, 57, 31, 27, 33, 4501, 697, 14228, 14229, 3857, 4573, 1305, 6618, 4578, 5282, 5080, 5280, 1244, 2] */
|
|
function _fun107581(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14424:6, offset: 0x02301683, size: 716 bytes, params: 8, frame: 25
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_5 = importAll(31) /* metro dependency 31 */;
|
|
const env0_6 = (require(27) /* metro dependency 27 */).View;
|
|
let value = require(33) /* metro dependency 33 */;
|
|
const env0_7 = value.jsx;
|
|
const env0_8 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
let createStyles = value.createStyles;
|
|
object2 = {};
|
|
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object2.container = {'flex': 1, 'justifyContent': 'space-between', backgroundColor: BACKGROUND_BASE_LOW};
|
|
const object4 = {height: 1};
|
|
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object4.backgroundColor = BORDER_SUBTLE;
|
|
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object4.marginVertical = PX_24;
|
|
object2.separator = object4;
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object2.footerContainer = {marginBottom: PX_16};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object2.footerButton = {paddingHorizontal: PX_16};
|
|
const object5 = {};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object5.margin = PX_16;
|
|
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object5.gap = PX_24;
|
|
object2.content = object5;
|
|
const env0_9 = Reflect.apply(createStyles, value, [object2]);
|
|
const HCAPTCHA_DIFFICULTY_OPTIONS = (require(14228) /* metro dependency 14228: CaptchaTestUtils */).HCAPTCHA_DIFFICULTY_OPTIONS;
|
|
const env0_10 = HCAPTCHA_DIFFICULTY_OPTIONS.map(function({label, value}) {
|
|
return {name: label, value: value};
|
|
});
|
|
const Set = global.Set;
|
|
const {HCAPTCHA_RQDATA,
|
|
SMITE_RQDATA} = (require(14229) /* metro dependency 14229: CaptchaTestActionCreators */).CaptchaDeciderType;
|
|
let set = new Set([HCAPTCHA_RQDATA, SMITE_RQDATA]);
|
|
const CAPTCHA_DECIDER_TYPE_OPTIONS = (require(14228) /* metro dependency 14228: CaptchaTestUtils */).CAPTCHA_DECIDER_TYPE_OPTIONS;
|
|
const env0_12 = CAPTCHA_DECIDER_TYPE_OPTIONS.map(function({label, value}) {
|
|
return {name: label, value: value};
|
|
}).filter(_fun107584);
|
|
object2 = {TEST_CAPTCHA: 'TEST_CAPTCHA'};
|
|
set = require(4501) /* metro dependency 4501: createStyles */;
|
|
createStyles = set.createStyles;
|
|
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
|
const env0_15 = Reflect.apply(createStyles, set, [{headerStyle: {backgroundColor: BACKGROUND_BASE_LOWER}}]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/captcha/tooling/native/CaptchaTestModal.tsx');
|
|
exports.default = CaptchaTestModal;
|
|
}
|
|
|
|
function _fun107584({value}) { // fn#107584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14424:838, offset: 0x02301968, size: 27 bytes, params: 2, frame: 11
|
|
return env0_11.has(value);
|
|
}
|
|
|
|
function CaptchaTestScreen(a0) { // fn#107585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14424:941, offset: 0x02301983, size: 676 bytes, params: 2, frame: 32
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
const RadioGroup = (require(1305) /* metro dependency 1305: native */).RadioGroup;
|
|
if (a0 == null) {
|
|
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
|
|
throw undefined;
|
|
}
|
|
const styles = useStyles();
|
|
const binding = env0_5;
|
|
let useState = binding.useState;
|
|
const value2 = Reflect.apply(useState, binding, [null]);
|
|
const binding2 = env0_4;
|
|
const value3 = binding2(value2, 2);
|
|
const property = value3[0];
|
|
const env0_1 = value3[1];
|
|
useState = binding.useState;
|
|
const value4 = binding2(Reflect.apply(useState, binding, [null]), 2);
|
|
const property2 = value4[0];
|
|
const env0_3 = value4[1];
|
|
const value5 = _fun107586();
|
|
const view = <View><Text variant="heading-lg/bold" color="mobile-text-heading-primary">{'Decider'}</Text><RadioGroup withSpacing value={property} options={env0_12} onChange={onChange_107590} /></View>;
|
|
const CaptchaDeciderType = (require(14229) /* metro dependency 14229: CaptchaTestActionCreators */).CaptchaDeciderType;
|
|
const HCAPTCHA_RQDATA = CaptchaDeciderType.HCAPTCHA_RQDATA;
|
|
const view2 = <View style={styles.content}>{view}{property === HCAPTCHA_RQDATA && <View><Text variant="heading-lg/bold" color="mobile-text-heading-primary">{'Difficulty'}</Text><RadioGroup withSpacing value={property2} options={env0_10} onChange={onChange_107591} /></View>}</View>;
|
|
const view3 = <View style={styles.separator} />;
|
|
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
|
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
return (
|
|
<View style={styles.container}>
|
|
{view2}
|
|
<View style={styles.footerContainer}>
|
|
{view3}
|
|
<SafeAreaPaddingView bottom style={styles.footerButton}>
|
|
<Button onPress={value5} text="Submit" />
|
|
</SafeAreaPaddingView>
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function CaptchaTestModal() { // fn#107592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14424:2414, offset: 0x02301dc9, size: 161 bytes, params: 1, frame: 18
|
|
const styles = useStyles();
|
|
const value2 = env0_5.useMemo(function() {
|
|
return _fun107594(styles);
|
|
}, [styles]);
|
|
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
|
const TEST_CAPTCHA = env0_13.TEST_CAPTCHA;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
return (
|
|
<Navigator
|
|
screens={value2}
|
|
initialRouteName={TEST_CAPTCHA}
|
|
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function _fun107586() { // fn#107586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14424:1044, offset: 0x02301c27, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = env1_3(_fun107588);
|
|
return _fun107589;
|
|
}
|
|
|
|
function CaptchaTestScreenOnChange({value}) { // fn#107590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14424:1610, owner: CaptchaTestScreen.onChange, offset: 0x02301d32, size: 79 bytes, params: 2, frame: 12
|
|
const CaptchaDeciderType = (require(14229) /* metro dependency 14229: CaptchaTestActionCreators */).CaptchaDeciderType;
|
|
const HCAPTCHA_RQDATA = CaptchaDeciderType.HCAPTCHA_RQDATA;
|
|
if (value !== HCAPTCHA_RQDATA) {
|
|
env0_3(null);
|
|
}
|
|
env0_1(value);
|
|
}
|
|
|
|
function CaptchaTestScreenOnChange_107591({value}) { // fn#107591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14424:1939, owner: CaptchaTestScreen.onChange, offset: 0x02301d81, size: 72 bytes, params: 2, frame: 14
|
|
const binding = env0_0;
|
|
const CaptchaDeciderType = (require(14229) /* metro dependency 14229: CaptchaTestActionCreators */).CaptchaDeciderType;
|
|
const HCAPTCHA_RQDATA = CaptchaDeciderType.HCAPTCHA_RQDATA;
|
|
if (binding === HCAPTCHA_RQDATA) {
|
|
env0_3(value);
|
|
}
|
|
}
|
|
|
|
function _fun107593() { // fn#107593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14424:2465, offset: 0x02301e6a, size: 25 bytes, params: 1, frame: 11
|
|
return getScreens_107594(styles);
|
|
}
|
|
|
|
function* _fun107588() { // fn#107588, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14424:1064, offset: 0x02301c56, size: 220 bytes, params: 1, frame: 19
|
|
var dependencyMap2;
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value5;
|
|
var testCaptcha;
|
|
var object2;
|
|
var value6;
|
|
var value7;
|
|
var binding3;
|
|
var open;
|
|
var error;
|
|
var message;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
if (require != null) {
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding2 = env3_2;
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
property = binding2[8];
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
var value4 = undefined;
|
|
try {
|
|
value5 = binding(property);
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
testCaptcha = value5.testCaptcha;
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
value6 = dependencyMap != null;
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
if (value6) {
|
|
try {
|
|
dependencyMap2 = dependencyMap;
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
object2.difficulty = dependencyMap2;
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
value = Reflect.apply(testCaptcha, value5, [require, object2]);
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
yield value;
|
|
try {
|
|
value = undefined;
|
|
value7 = false;
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
if (value7) {
|
|
return value;
|
|
}
|
|
try {
|
|
binding = env3_1;
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding3 = env3_2;
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
property = binding3[9];
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
value = binding(property);
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
open = value.open;
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
object2 = {'key': 'captcha-test-modal-success', 'content': 'Captcha completed!'};
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
Reflect.apply(open, value, [object2]);
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
}
|
|
return undefined;
|
|
}
|
|
dependencyMap2 = value4;
|
|
try {
|
|
object2.difficulty = dependencyMap2;
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
value = Reflect.apply(testCaptcha, value5, [require, object2]);
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
yield value;
|
|
try {
|
|
value = undefined;
|
|
value7 = false;
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
if (value7) {
|
|
return value;
|
|
}
|
|
try {
|
|
binding = env3_1;
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding3 = env3_2;
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
property = binding3[9];
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
value = binding(property);
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
open = value.open;
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
object2 = {'key': 'captcha-test-modal-success', 'content': 'Captcha completed!'};
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
Reflect.apply(open, value, [object2]);
|
|
} catch (error) {
|
|
binding = env3_1;
|
|
value = binding(env3_2[9]);
|
|
open = value.open;
|
|
message = error.message;
|
|
Reflect.apply(open, value, [{key: 'captcha-test-modal-error', content: message}]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function getScreens_107594({headerStyle}) { // fn#107594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14424:2469, offset: 0x02301e83, size: 108 bytes, params: 2, frame: 15
|
|
var environment;
|
|
const value = environment.__proto__.__proto__;
|
|
const TEST_CAPTCHA = env2_13.TEST_CAPTCHA;
|
|
const object = {};
|
|
object.headerStyle = headerStyle;
|
|
object.headerTitle = 'Captcha Test Tool';
|
|
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun107595);
|
|
object.render = render_107596;
|
|
return {[TEST_CAPTCHA]: object};
|
|
}
|
|
|
|
function _fun107595() { // fn#107595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14424:2617, offset: 0x02301eef, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
return (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
|
}
|
|
|
|
function getScreens_107594Render() { // fn#107596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14424:2645, owner: getScreens_107594.render, offset: 0x02301f14, size: 23 bytes, params: 1, frame: 13
|
|
return <CaptchaTestScreen />;
|
|
}
|
|
|