Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
220 lines
9.1 KiB
TypeScript
220 lines
9.1 KiB
TypeScript
// Module ID: 15976
|
|
// Function ID: 15977
|
|
// Name: Auth
|
|
// Dependencies: [32, 19, 17, 12443, 1074, 21, 15977, 15978, 5638, 15987, 7016, 6965, 4574, 576, 16028, 6958, 1625, 6989, 16029, 6987, 7014, 1116, 1114, 16030, 7489, 16034, 2]
|
|
|
|
// Module 15976 (Auth)
|
|
import nativeDefault from "native" /* 576 */;
|
|
import KeyboardChatScrollView from "KeyboardChatScrollView" /* 1625 */;
|
|
import useWideAuthViewDefault from "useWideAuthView" /* 6958 */;
|
|
import BackgroundImageDefault from "BackgroundImage" /* 6989 */;
|
|
import StackNavigator from "StackNavigator" /* 7016 */;
|
|
import RegistrationHandoff from "RegistrationHandoff" /* 15977 */;
|
|
import RegistrationUtils from "RegistrationUtils" /* 15987 */;
|
|
import useIsHCaptchaModalOpenTracking from "useIsHCaptchaModalOpenTracking" /* 16028 */;
|
|
import _mod16029 from "module_16029" /* 16029 */;
|
|
import AuthManagerDefault from "AuthManager" /* 16030 */;
|
|
import useOrientationLockDefault from "useOrientationLock" /* 16034 */;
|
|
import _slicedToArray from "module_32" /* 32 */;
|
|
import noop from "module_19" /* 19 */;
|
|
import MultiAccountStore from "MultiAccountStore" /* 12443 */;
|
|
|
|
require = fn;
|
|
function getInitialAuthRouteStack() {
|
|
if (!obj.hasRegistrationHandoff()) {
|
|
const obj3 = { name: AuthStates.WELCOME };
|
|
const items = [obj3];
|
|
let items1 = items;
|
|
} else {
|
|
const obj4 = { name: AuthStates.WELCOME };
|
|
items1 = [obj4, ];
|
|
const obj5 = { name: AuthStates.LOGIN };
|
|
items1[1] = obj5;
|
|
}
|
|
return items1;
|
|
}
|
|
function NavigatorWithCaptchaHook() {
|
|
obj = useIsHCaptchaModalOpenTracking;
|
|
const isHCaptchaModalOpenTracking = obj.useIsHCaptchaModalOpenTracking();
|
|
const tmp6 = closure_16();
|
|
const first = _slicedToArray(noop.useState(getInitialAuthRouteStack), 1)[0];
|
|
const tmp5 = useWideAuthViewDefault();
|
|
[tmp8, require] = noop.useState(first[first.length - 1].name);
|
|
const effect = noop.useEffect(() => {
|
|
const result = RegistrationHandoff.clearRegistrationHandoff();
|
|
}, []);
|
|
const tmp10 = _slicedToArray(noop.useState(false), 2);
|
|
importDefault = tmp11;
|
|
const tmp7 = _slicedToArray(noop.useState(first[first.length - 1].name), 2);
|
|
const keyboardState = KeyboardChatScrollView.useKeyboardState((height) => height.height);
|
|
const callback = noop.useCallback((arg0) => {
|
|
let name;
|
|
if (arg0 != null) {
|
|
if (arg0.routes[arg0.index] != null) {
|
|
name = tmp3.name;
|
|
}
|
|
}
|
|
if (name == null) {
|
|
name = null;
|
|
}
|
|
require(name);
|
|
closure_1(false);
|
|
}, []);
|
|
const obj3 = { backgroundImageSource: null, backgroundImageCover: true };
|
|
const tmp15 = closure_11;
|
|
const tmp16 = closure_10;
|
|
obj3.backgroundImageSource = _mod16029;
|
|
const children = [closure_9(BackgroundImageDefault, obj3), ];
|
|
if (tmp5) {
|
|
const obj5 = { value: tmp11, children: null };
|
|
const items1 = [tmp6.wideOuterContainer, ];
|
|
let tmp24 = null;
|
|
if (tmp13) {
|
|
const obj6 = { paddingBottom: keyboardState };
|
|
tmp24 = obj6;
|
|
}
|
|
const obj7 = { style: null, children: null };
|
|
items1[1] = tmp24;
|
|
obj7.style = items1;
|
|
const items2 = [tmp6.wideCard, , ];
|
|
let tmp25 = null;
|
|
if (null != tmp8) {
|
|
let num = obj[tmp8];
|
|
if (num == null) {
|
|
num = 520;
|
|
}
|
|
const obj8 = { height: num };
|
|
tmp25 = obj8;
|
|
}
|
|
items2[1] = tmp25;
|
|
let obj9 = null;
|
|
if (tmp13) {
|
|
obj9 = { maxHeight: "100%", height: "100%", marginTop: 32, borderBottomLeftRadius: 0, borderBottomRightRadius: 0 };
|
|
}
|
|
const obj10 = { style: null, children: null };
|
|
items2[2] = obj9;
|
|
obj10.style = items2;
|
|
const obj11 = { screens, containerStyle: tmp6.cardContainer, viewStyle: null, headerStatusBarHeight: 0, cardOverlayEnabled: false, cardShadowEnabled: false, initialRouteStack: null, onWillFocus: null, onStateChange: null, headerStyle: null, headerLeftContainerStyle: null, disableHeaderAnimation: true };
|
|
let transparent = null;
|
|
if (tmp8 === AuthStates.WELCOME) {
|
|
transparent = tmp6.transparent;
|
|
}
|
|
obj11.viewStyle = transparent;
|
|
obj11.initialRouteStack = first;
|
|
obj11.onWillFocus = closure_5.dismiss;
|
|
obj11.onStateChange = callback;
|
|
obj11.headerStyle = tmp10[0] ? tmp6.wideHeader : tmp6.wideHeaderFlat;
|
|
let num2 = 20;
|
|
if (tmpResult.isAndroid()) {
|
|
num2 = tmp4(576).space.PX_12;
|
|
}
|
|
const obj12 = { paddingLeft: num2, paddingTop: tmp4(576).space.PX_24, paddingBottom: tmp4(576).space.PX_16 };
|
|
obj11.headerLeftContainerStyle = obj12;
|
|
obj10.children = tmp17(tmp(7014).Navigator, obj11);
|
|
obj7.children = tmp17(closure_6, obj10);
|
|
obj5.children = tmp17(closure_6, obj7);
|
|
let tmp17Result = tmp17(tmp(6987).WideAuthScrollContext.Provider, obj5);
|
|
tmpResult = tmp(1116);
|
|
} else {
|
|
const obj13 = { screens: RegistrationStepsUtils, viewStyle: null, containerStyle: null, headerBackTitle: null, initialRouteStack: null, onWillFocus: null, headerStyle: null };
|
|
({ transparent: obj4.viewStyle, transparent: obj4.containerStyle } = tmp6);
|
|
const intl = tmp(1114).intl;
|
|
obj13.headerBackTitle = intl.string(tmp(1114).t["13/7kX"]);
|
|
obj13.initialRouteStack = first;
|
|
obj13.onWillFocus = closure_5.dismiss;
|
|
obj13.headerStyle = { borderBottomWidth: 0 };
|
|
tmp17Result = tmp17(tmp(7014).Navigator, obj13);
|
|
}
|
|
children[1] = tmp17Result;
|
|
return tmp15(tmp16, { children });
|
|
}
|
|
get_ActivityIndicator = fn(17);
|
|
({ Keyboard: hasOwnProperty, View: metroRequire, StyleSheet } = get_ActivityIndicator);
|
|
const AuthStates = fn(1074).AuthStates;
|
|
const jsxProd = fn(21);
|
|
({ jsx: closure_9, Fragment: c10, jsxs: closure_11 } = jsxProd);
|
|
let RegistrationStepsUtils = fn(15978);
|
|
RegistrationStepsUtils = RegistrationStepsUtils.getAllAuthScreens();
|
|
RegistrationStepsUtils = Object.entries(RegistrationStepsUtils);
|
|
const screens = Object.fromEntries(RegistrationStepsUtils.map((item) => {
|
|
[tmp, tmp2] = item;
|
|
const items = [tmp, ];
|
|
obj = {};
|
|
let merged = Object.assign(tmp2);
|
|
obj.headerMode = "screen";
|
|
let obj2 = null;
|
|
if (tmp2.fullscreen) {
|
|
obj2 = { fullscreen: false, headerTransparent: false };
|
|
}
|
|
let merged1 = Object.assign(obj2);
|
|
let tmp6 = null;
|
|
if (tmp !== AuthStates.MFA) {
|
|
tmp6 = null;
|
|
if (tmp !== tmp5.WELCOME) {
|
|
let obj3 = {
|
|
headerLeft(arg0) {
|
|
function backImage() {
|
|
return closure_1_9(headerLeft(closure_1_2[8]).HeaderBackImage, {});
|
|
}
|
|
if (null != headerLeft.headerLeft) {
|
|
const obj2 = {};
|
|
const merged = Object.assign(arg0);
|
|
obj2.backImage = backImage;
|
|
let headerLeftResult = headerLeft.headerLeft(obj2);
|
|
} else {
|
|
const obj3 = {};
|
|
const merged1 = Object.assign(arg0);
|
|
obj3.backImage = backImage;
|
|
headerLeftResult = React7(RegistrationUtils.BackButtonWithTracking, obj3);
|
|
}
|
|
return headerLeftResult;
|
|
}
|
|
};
|
|
tmp6 = obj3;
|
|
}
|
|
}
|
|
const merged2 = Object.assign(tmp6);
|
|
const items1 = [, , ];
|
|
({ REGISTER_IDENTITY: arr2[0], LOGIN: arr2[1], AGE_GATE_UNDERAGE: arr2[2] } = AuthStates);
|
|
let tmp8 = null;
|
|
if (set.has(tmp)) {
|
|
const obj4 = { cardStyleInterpolator: StackNavigator.CardStyleInterpolators.forFadeFromCenter };
|
|
tmp8 = obj4;
|
|
}
|
|
const merged3 = Object.assign(tmp8);
|
|
items[1] = obj;
|
|
return items;
|
|
}));
|
|
let num = 540;
|
|
if (fn(6965).hasWebAuthn) {
|
|
num = 600;
|
|
}
|
|
let obj = {};
|
|
obj[AuthStates.LOGIN] = num;
|
|
obj[AuthStates.MFA] = 600;
|
|
const createStyles = fn(4574);
|
|
let obj3 = { transparent: { backgroundColor: "transparent" }, cardContainer: { flex: 1, position: "relative", backgroundColor: "transparent" }, wideOuterContainer: { flex: 1, justifyContent: "center" }, wideCard: null, wideHeaderFlat: null, wideHeader: null };
|
|
let size = { backgroundColor: "transparent", borderRadius: nativeDefault.radii.lg, maxWidth: 600, alignSelf: "center", width: "100%", maxHeight: "90%", overflow: "hidden", height: 520 };
|
|
obj3.wideCard = size;
|
|
obj3.wideHeaderFlat = { borderBottomWidth: 0, backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW };
|
|
let obj5 = { borderBottomWidth: 0, backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW };
|
|
obj3.wideHeader = { borderBottomWidth: StyleSheet.hairlineWidth, borderBottomColor: nativeDefault.colors.BORDER_SUBTLE, backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW };
|
|
let closure_16 = createStyles.createStyles(obj3);
|
|
const context = noop.createContext(() => {
|
|
|
|
});
|
|
let obj6 = { borderBottomWidth: StyleSheet.hairlineWidth, borderBottomColor: nativeDefault.colors.BORDER_SUBTLE, backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW };
|
|
size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/auth/native/components/Auth.tsx");
|
|
|
|
export default noop.memo(function Auth() {
|
|
const effect = noop.useEffect(() => {
|
|
AuthManagerDefault.initialize();
|
|
return () => closure_1_1(dependencyMap[23]).terminate();
|
|
}, []);
|
|
const layoutEffect = noop.useLayoutEffect(() => closure_0(7489).trackAppUIViewed(), []);
|
|
useOrientationLockDefault();
|
|
closure_0 = noop.useRef(undefined);
|
|
return closure_9(context.Provider, { value: noop.useCallback(() => RegistrationUtils.getTrackRegTransition(closure_0), [])(), children: closure_9(NavigatorWithCaptchaHook, {}) });
|
|
});
|
|
export const TrackRegistrationContext = context;
|