decord/source/4714_ScreenStack.js

112 lines
3.9 KiB
JavaScript
Raw Normal View History

2026-08-12 06:57:52 +00:00
// Module ID: 4714
// Function ID: 4715
2026-07-23 10:11:24 +00:00
// Name: ScreenStack
2026-08-12 06:57:52 +00:00
// Dependencies: [109, 19, 21, 4699, 4715, 4693, 4700, 4716, 4703]
2026-07-23 10:11:24 +00:00
// Exports: default
2026-08-12 06:57:52 +00:00
// Module 4714 (ScreenStack)
2026-07-23 10:11:24 +00:00
import _objectWithoutProperties from "_objectWithoutProperties";
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
import { jsx } from "jsxProd";
const require = arg1;
let closure_4 = ["goBackGesture", "screensRefs", "currentScreenId", "transitionAnimation", "screenEdgeGesture", "onFinishTransitioning", "children"];
export default function ScreenStack(arg0) {
let children;
let currentScreenId;
let goBackGesture;
let onFinishTransitioning;
let screenEdgeGesture;
let screensRefs;
let transitionAnimation;
({ goBackGesture, screensRefs, currentScreenId, screenEdgeGesture, children } = arg0);
({ transitionAnimation, onFinishTransitioning } = arg0);
2026-07-29 08:29:29 +00:00
let obj = React;
2026-07-23 10:11:24 +00:00
let current;
2026-07-29 08:29:29 +00:00
if (screensRefs != null) {
2026-07-23 10:11:24 +00:00
current = screensRefs.current;
}
2026-07-29 08:29:29 +00:00
if (current == null) {
2026-07-23 10:11:24 +00:00
current = {};
}
const ref = React.useRef(current);
2026-07-29 08:29:29 +00:00
const ref1 = obj.useRef(null);
let Children = obj.Children;
2026-07-23 10:11:24 +00:00
const _require = Children.count(children);
2026-08-12 06:57:52 +00:00
const context = obj.useContext(_require(4715).GHContext);
2026-07-29 08:29:29 +00:00
obj = {
2026-07-23 10:11:24 +00:00
stackUseEffectCallback(ref1) {
}
};
2026-07-29 08:29:29 +00:00
const ref2 = obj.useRef(obj);
Children = obj.Children;
const mapped = Children.map(children, (children) => {
const props = children.props;
2026-07-23 10:11:24 +00:00
let descriptor;
2026-07-29 08:29:29 +00:00
if (props != null) {
2026-07-23 10:11:24 +00:00
descriptor = props.descriptor;
}
2026-07-29 08:29:29 +00:00
if (descriptor == null) {
2026-07-23 10:11:24 +00:00
let tmp2;
2026-07-29 08:29:29 +00:00
if (props != null) {
2026-07-23 10:11:24 +00:00
const descriptors = props.descriptors;
2026-07-29 08:29:29 +00:00
if (descriptors != null) {
tmp2 = descriptors[children.key];
2026-07-23 10:11:24 +00:00
}
}
descriptor = tmp2;
}
let freezeOnBlur;
2026-07-29 08:29:29 +00:00
if (descriptor != null) {
2026-07-23 10:11:24 +00:00
const options = descriptor.options;
2026-07-29 08:29:29 +00:00
if (options != null) {
2026-07-23 10:11:24 +00:00
freezeOnBlur = options.freezeOnBlur;
}
}
2026-07-29 08:29:29 +00:00
if (freezeOnBlur == null) {
2026-07-23 10:11:24 +00:00
let obj = callback(outer1_3[5]);
freezeOnBlur = obj.freezeEnabled();
}
const diff = callback - arg1;
if ("nativeFabricUIManager" in ref1) {
let tmp7 = diff > 2;
} else {
tmp7 = diff > 1;
}
if (freezeOnBlur) {
freezeOnBlur = tmp7;
}
2026-07-29 08:29:29 +00:00
obj = { freeze: freezeOnBlur, children };
2026-07-23 10:11:24 +00:00
return outer1_7(ref2(outer1_3[6]), obj);
});
2026-07-29 08:29:29 +00:00
const effect = obj.useEffect(() => {
2026-07-23 10:11:24 +00:00
const current = ref2.current;
const result = current.stackUseEffectCallback(ref1);
});
2026-08-12 06:57:52 +00:00
ref2(4699)("GHWrapper" !== context.name && undefined !== goBackGesture, "Cannot detect GestureDetectorProvider in a screen that uses `goBackGesture`. Make sure your navigator is wrapped in GestureDetectorProvider.");
ref2(4699)(undefined !== goBackGesture && null === ref && undefined === currentScreenId, "Custom Screen Transition require screensRefs and currentScreenId to be provided.");
2026-07-29 08:29:29 +00:00
obj = { value: ref, children: null };
const obj1 = { gestureDetectorBridge: ref2, goBackGesture, transitionAnimation, screenEdgeGesture: null, screensRefs: null, currentScreenId: null, children: null };
if (screenEdgeGesture == null) {
screenEdgeGesture = false;
2026-07-23 10:11:24 +00:00
}
2026-07-29 08:29:29 +00:00
obj1[3] = screenEdgeGesture;
obj1[4] = ref;
obj1[5] = currentScreenId;
2026-07-23 10:11:24 +00:00
const obj2 = {};
const tmp = callback(arg0, closure_4);
2026-07-29 08:29:29 +00:00
const tmp10 = "GHWrapper" !== context.name && undefined !== goBackGesture;
2026-07-23 10:11:24 +00:00
const tmp13 = undefined !== goBackGesture && null === ref && undefined === currentScreenId;
2026-07-29 08:29:29 +00:00
const tmp4 = _require;
const merged = Object.assign(tmp);
2026-08-12 06:57:52 +00:00
obj2.iosPreventReattachmentOfDismissedScreens = ref2(4703).experiment.iosPreventReattachmentOfDismissedScreens;
2026-07-23 10:11:24 +00:00
obj2.onFinishTransitioning = onFinishTransitioning;
obj2.ref = ref1;
obj2.children = mapped;
2026-08-12 06:57:52 +00:00
obj1[6] = jsx(ref2(4716), {});
2026-07-29 08:29:29 +00:00
obj[1] = <context gestureDetectorBridge={ref2} goBackGesture={goBackGesture} transitionAnimation={transitionAnimation} screenEdgeGesture={null} screensRefs={null} currentScreenId={null}>{null}</context>;
2026-08-12 06:57:52 +00:00
return jsx(tmp4(4715).RNSScreensRefContext.Provider, { value: ref, children: null });
2026-07-23 10:11:24 +00:00
};