decord/source/1602_weakMap.js
2026-08-11 06:20:06 +00:00

136 lines
4.4 KiB
JavaScript

// Module ID: 1602
// Function ID: 1603
// Name: weakMap
// Dependencies: [32, 19, 17, 21, 1603, 1502, 1605, 1606, 1607, 1609, 1610, 1599]
// Module 1602 (weakMap)
import _slicedToArray from "_slicedToArray";
import importAllResult from "noop";
import { I18nManager } from "get ActivityIndicator";
import { jsx } from "jsxProd";
const require = arg1;
let c3 = importAllResult;
const weakMap = new WeakMap();
globalThis.REACT_NAVIGATION_DEVTOOLS = weakMap;
export const NavigationContainer = importAllResult.forwardRef(function NavigationContainerInner(direction, ref) {
let initialState;
let tmp20;
direction = direction.direction;
if (direction === undefined) {
let str = "ltr";
if (I18nManager.getConstants().isRTL) {
str = "rtl";
}
direction = str;
}
let DefaultTheme = direction.theme;
if (DefaultTheme === undefined) {
DefaultTheme = linking(1603).DefaultTheme;
}
linking = direction.linking;
let fallback = direction.fallback;
if (fallback === undefined) {
fallback = null;
}
let merged = Object.assign(direction, Object.create(null));
let dependencyMap;
ref = undefined;
let tmp6 = linking;
if (tmp6) {
tmp6 = false !== linking.enabled;
}
dependencyMap = tmp6;
let config;
if (linking != null) {
config = linking.config;
}
if (config) {
let obj = linking(1502);
obj.validatePathConfig(linking.config);
}
ref = importAllResult.useRef(null);
let obj1 = linking(1605);
const backButton = obj1.useBackButton(ref);
let obj2 = linking(1606);
const documentTitle = obj2.useDocumentTitle(ref, direction.documentTitle);
let obj3 = linking(1607);
obj = { enabled: tmp6, prefixes: [] };
const merged1 = Object.assign(linking);
const items = [linking];
const memo = importAllResult.useMemo(() => ({ options: linking }), items);
const effect = importAllResult.useEffect(() => {
if (ref.current) {
let obj = {};
Object.defineProperty(obj, "linking", {
get: () => {
const obj = {};
const merged = Object.assign(closure_0);
obj.enabled = closure_1;
let prefixes;
if (closure_0 != null) {
prefixes = tmp.prefixes;
}
if (prefixes == null) {
prefixes = [];
}
obj.prefixes = prefixes;
let getStateFromPath;
if (closure_0 != null) {
getStateFromPath = tmp.getStateFromPath;
}
if (getStateFromPath == null) {
getStateFromPath = outer1_0(outer1_1[5]).getStateFromPath;
}
obj.getStateFromPath = getStateFromPath;
let getPathFromState;
if (closure_0 != null) {
getPathFromState = tmp.getPathFromState;
}
if (getPathFromState == null) {
getPathFromState = outer1_0(outer1_1[5]).getPathFromState;
}
obj.getPathFromState = getPathFromState;
let getActionFromState;
if (closure_0 != null) {
getActionFromState = tmp.getActionFromState;
}
if (getActionFromState == null) {
getActionFromState = outer1_0(outer1_1[5]).getActionFromState;
}
obj.getActionFromState = getActionFromState;
return obj;
},
set: undefined
});
const result = globalThis.REACT_NAVIGATION_DEVTOOLS.set(tmp.current, obj);
}
});
const obj6 = linking(1609);
[tmp20, initialState] = ref(linking(1609).useThenable(obj3.useLinking(ref, obj).getInitialState), 2);
const imperativeHandle = importAllResult.useImperativeHandle(ref, () => ref.current);
obj = { value: direction, children: null };
if (tmp22) {
obj1 = { value: null, children: null };
obj1[0] = memo;
obj2 = {};
const merged2 = Object.assign(merged);
obj2.theme = DefaultTheme;
if (null != merged.initialState) {
initialState = merged.initialState;
}
obj2.initialState = initialState;
obj2.ref = ref;
obj1[1] = tmp23(tmp12(1502).BaseNavigationContainer, obj2);
obj[1] = tmp23(tmp12(1599).LinkingContext.Provider, obj1);
let tmp24 = obj;
} else {
obj3 = { value: null, children: null };
obj3[0] = DefaultTheme;
obj3[1] = fallback;
obj[1] = tmp23(tmp12(1502).ThemeProvider, obj3);
tmp24 = obj;
}
return jsx(linking(1610).LocaleDirContext.Provider, tmp24);
});