// Module ID: 16195 // Function ID: 16196 // Dependencies: [32, 109, 19, 17, 1636, 16136] // Module 16195 import _mod16136 from "module_16136" /* 16136 */; import _slicedToArray from "module_32" /* 32 */; import _objectWithoutProperties from "_objectWithoutProperties" /* 109 */; import noop from "module_19" /* 19 */; import get_ActivityIndicator from "module_17" /* 17 */; import cancelAnimation_mod from "cancelAnimation" /* 1636 */; const require = globalThis.__r; let closure_4 = ["id", "horizontal", "style", "refView", "stickyScrollOffset", "stickyHeaderConfig", "children"]; let closure_5 = ["id", "horizontal", "style", "refView", "children", "recycleItems", "layoutTransition"]; let closure_6 = ["itemLayoutAnimation", "recycleItems", "refLegendList", "renderScrollComponent", "sharedValues"]; let closure_7 = ["ref"]; let closure_8 = ["refScrollView"]; let closure_129_0 = noop; let closure_129_1; if (!noop) { let _Object = Object; let obj = Object.create(null); closure_129_1 = obj; if (noop) { const _Object2 = Object; const keys = Object.keys(noop); const item = keys.forEach((item) => { closure_0 = item; if ("default" !== item) { const _Object = Object; let ownPropertyDescriptor = Object.getOwnPropertyDescriptor(closure_0, item); if (!ownPropertyDescriptor.get) { const obj = { enumerable: true, get() { return require[closure_0]; } }; ownPropertyDescriptor = obj; } Object.defineProperty(dependencyMap, item, ownPropertyDescriptor); } }); } obj.default = noop; const _Object3 = Object; let frozen = Object.freeze(obj); } else { frozen = noop; } let cancelAnimation = cancelAnimation_mod; if (!cancelAnimation) { let obj2 = { default: cancelAnimation }; let tmp7 = obj2; } else { tmp7 = cancelAnimation; } cancelAnimation = tmp7; const POSITION_OUT_OF_VIEW = _mod16136.internal.POSITION_OUT_OF_VIEW; const IsNewArchitecture = _mod16136.internal.IsNewArchitecture; const getStickyPushLimit = _mod16136.internal.getStickyPushLimit; const typedMemo = _mod16136.internal.typedMemo; const useArr$ = _mod16136.internal.useArr$; const useCombinedRef = _mod16136.internal.useCombinedRef; const useLatestRef = _mod16136.internal.useLatestRef; const useStableRenderComponent = _mod16136.internal.useStableRenderComponent; const getComponent = _mod16136.internal.getComponent; const peek$ = _mod16136.internal.peek$; const useStateContext = _mod16136.internal.useStateContext; function ReanimatedScrollOffsetTracker(arg0) { ({ animatedScrollRef, scrollOffset } = arg0); const scrollViewOffset = cancelAnimation.useScrollViewOffset(animatedScrollRef, scrollOffset); return null; } let closure_24 = typedMemo(function ReanimatedScrollBridgeComponent(forwardedRef) { ({ scrollOffset, renderScrollComponent } = forwardedRef); let merged = Object.assign(forwardedRef, Object.assign({ forwardedRef: 0, scrollOffset: 0, renderScrollComponent: 0 })); const animatedRef = cancelAnimation.useAnimatedRef(); let ScrollView = useStableRenderComponent(renderScrollComponent, (arg0, ref) => { const obj = {}; const merged = Object.assign(arg0); obj.ref = ref; obj.scrollEventThrottle = 1; return obj; }); if (!renderScrollComponent) { ScrollView = cancelAnimation.default.ScrollView; } let element = scrollOffset; if (scrollOffset) { const obj3 = { animatedScrollRef: animatedRef, scrollOffset }; element = ; } const obj4 = {}; const merged1 = Object.assign(merged); obj4.ref = useCombinedRef(animatedRef, forwardedRef.forwardedRef); return <>{element}; }); let closure_25 = typedMemo(function StickyOverlayComponent(stickyHeaderConfig) { stickyHeaderConfig = stickyHeaderConfig.stickyHeaderConfig; let backdropComponent; if (null != stickyHeaderConfig) { backdropComponent = stickyHeaderConfig.backdropComponent; } let element = null; if (backdropComponent) { const obj = { style: { inset: 0, pointerEvents: "none", position: "absolute" } }; let backdropComponent1; if (null != stickyHeaderConfig) { backdropComponent1 = stickyHeaderConfig.backdropComponent; } element = {getComponent(backdropComponent1)}; } return element; }); const __initData = { code: "function pnpm_reanimatedJs1(){const{stickyScrollOffset,stickyStart,position,pushLimit,horizontal}=this.__closure;const delta=Math.max(0,stickyScrollOffset.value-stickyStart);const stickyPosition=position+delta;const resolvedPosition=pushLimit!==void 0?Math.min(stickyPosition,pushLimit):stickyPosition;return horizontal?{transform:[{translateX:resolvedPosition}]}:{transform:[{translateY:resolvedPosition}]};}" }; let closure_27 = typedMemo(function ReanimatedPositionViewStickyComponent(ref) { const tmp = useStateContext(); _require = tmp; ({ id, horizontal } = ref); const style = ref.style; const stickyScrollOffset = ref.stickyScrollOffset; ({ stickyHeaderConfig, children } = ref); let items = ["containerPosition" + id, "headerSize", "stylePaddingTop", "containerItemKey" + id, "containerItemIndex" + id, "totalSize"]; const tmp3 = style(useArr$(items), 6); let position = tmp3[0]; if (undefined === position) { position = POSITION_OUT_OF_VIEW; } let num = 0; if (undefined !== tmp3[1]) { num = tmp5; } let num2 = 0; if (undefined !== tmp3[2]) { num2 = tmp6; } closure_5 = tmp7; closure_6 = tmp8; let num3 = 0; if (undefined !== tmp3[5]) { num3 = tmp9; } let items1 = [tmp.state, tmp3[4], tmp3[3], num3]; const memo = frozen.useMemo(() => getStickyPushLimit(state.state, closure_6, closure_5), items1); let offset; if (null != stickyHeaderConfig) { offset = stickyHeaderConfig.offset; } let num4 = 0; if (null != offset) { num4 = offset; } const diff = position + num + num2 - num4; const tmp2 = stickyScrollOffset(ref, position); const fn = function l() { const sum = first + Math.max(0, stickyScrollOffset.value - diff); let bound = sum; if (undefined !== memo) { const _Math = Math; bound = Math.min(sum, tmp2); } const obj = { transform: null }; if (horizontal) { const obj2 = { translateX: bound }; const items = [obj2]; obj.transform = items; let tmp4 = obj; } else { const obj3 = { translateY: bound }; const items1 = [obj3]; obj.transform = items1; tmp4 = obj; } return tmp4; }; fn.__closure = { stickyScrollOffset, stickyStart: diff, position, pushLimit: memo, horizontal }; fn.__workletHash = 15276407844125; fn.__initData = __initData; const items2 = [horizontal, position, memo, diff]; const animatedStyle = require("cancelAnimation").useAnimatedStyle(fn, items2); const items3 = [tmp3[4], animatedStyle, style]; let obj2 = require("cancelAnimation"); const merged = Object.assign(tmp2); return frozen.createElement(cancelAnimation.default.View, { ref: ref.refView, style: frozen.useMemo(() => { const items = [style, { zIndex: closure_6 + 1000 }, animatedStyle]; return items; }, items3) }, , children); }); let closure_28 = typedMemo(function ReanimatedPositionViewComponent(style) { ({ id, horizontal } = style); style = style.style; const layoutTransition = style.layoutTransition; ({ refView, children, recycleItems } = style); const tmp2 = _objectWithoutProperties(style, closure_5); let items = ["containerPosition" + id]; let first = _slicedToArray(useArr$(items), 1)[0]; if (undefined === first) { first = POSITION_OUT_OF_VIEW; } const ref = frozen.useRef(undefined); if (recycleItems) { if (layoutTransition) { const _HermesInternal = HermesInternal; const tmp6 = peek$(tmp, "containerItemKey" + id); let tmp8 = tmp7; if (undefined !== tmp6) { tmp8 = undefined !== ref.current; } if (tmp8) { tmp8 = ref.current !== tmp6; } let flag = tmp8; if (undefined !== tmp6) { ref.current = tmp6; flag = tmp8; } } const items1 = [horizontal, first, style]; let tmp11; const memo = obj.useMemo(() => { const items = [style, ]; if (horizontal) { const obj2 = { left: top }; let obj = obj2; } else { obj = { top }; } items[1] = obj; return items; }, items1); if (!flag) { tmp11 = layoutTransition; } let obj2 = { layout: tmp11, ref: refView, style: memo }; const merged = Object.assign(tmp2); return obj.createElement(cancelAnimation.default.View, { layout: tmp11, ref: refView, style: memo }, children); } ref.current = undefined; flag = false; }); let closure_29 = tmp7.default.createAnimatedComponent(typedMemo(frozen.forwardRef(function LegendListForwardedRef2(refLegendList, refScrollView) { ({ itemLayoutAnimation, recycleItems } = refLegendList); refLegendList = refLegendList.refLegendList; const renderScrollComponent = refLegendList.renderScrollComponent; const sharedValues = refLegendList.sharedValues; const tmp = sharedValue(refLegendList, closure_6); const items = [refLegendList]; const callback = noop.useCallback((arg0) => { refLegendList(arg0); }, items); sharedValue = recycleItems(refLegendList[4]).useSharedValue(0); let scrollOffset; if (null != sharedValues) { scrollOffset = sharedValues.scrollOffset; } if (null != scrollOffset) { sharedValue = scrollOffset; } let scrollOffset1; if (null != sharedValues) { scrollOffset1 = sharedValues.scrollOffset; } if (undefined === scrollOffset1) { const stickyHeaderIndices = tmp.stickyHeaderIndices; let length; if (null != stickyHeaderIndices) { length = stickyHeaderIndices.length; } } sharedValue = tmp9; const items1 = [renderScrollComponent]; const memo = frozen.useMemo(() => { let fn; if (renderScrollComponent) { fn = (arg0) => renderScrollComponent(arg0); } return fn; }, items1); const items2 = [memo, tmp9]; const items3 = [sharedValue]; const callback1 = noop.useCallback((ref) => { const obj = {}; const merged = Object.assign(_objectWithoutProperties(ref, closure_7)); obj.forwardedRef = ref.ref; obj.renderScrollComponent = memo; obj.scrollOffset = sharedValue; return ; }, items2); const memo1 = frozen.useMemo(() => function StickyPositionComponent(arg0) { const obj = {}; const merged = Object.assign(arg0); obj.stickyScrollOffset = stickyScrollOffset; return ; }, items3); closure_6 = useLatestRef(itemLayoutAnimation); itemLayoutAnimation = tmp13; const items4 = [itemLayoutAnimation, recycleItems]; const obj4 = {}; const memo2 = frozen.useMemo(() => itemLayoutAnimation ? (function PositionComponent(arg0) { const obj = {}; const merged = Object.assign(arg0); obj.layoutTransition = ref.current; obj.recycleItems = recycleItems; return ; }) : undefined, items4); let merged = Object.assign(tmp); obj4.positionComponentInternal = memo2; obj4.recycleItems = recycleItems; if (IsNewArchitecture) { const obj6 = { stickyPositionComponentInternal: memo1 }; let obj7 = obj6; } else { obj7 = {}; } const merged1 = Object.assign(obj7); const merged2 = Object.assign({ renderScrollComponent: callback1 }); const merged3 = Object.assign(obj4); return frozen.createElement(recycleItems(refLegendList[5]).LegendList, { ref: callback, refScrollView }); }))); export const AnimatedLegendList = typedMemo(frozen.forwardRef(function AnimatedLegendList2(sharedValues, forwardedRef) { sharedValues = sharedValues.sharedValues; let tmp = _objectWithoutProperties(sharedValues, closure_8); [tmp3, require] = frozen.useState(null); require = tmp3; let items = [tmp3, sharedValues]; const tmp2 = _slicedToArray(frozen.useState(null), 2); const effect = frozen.useEffect(() => { if (items) { if (sharedValues) { const state = items.getState(); let activeStickyIndex = tmp.activeStickyIndex; const activeStickyIndex2 = state.activeStickyIndex; if (activeStickyIndex) { if (typeof activeStickyIndex.set === "function") { let result = activeStickyIndex.set(activeStickyIndex2); } else { activeStickyIndex.value = activeStickyIndex2; } } let isAtEnd = tmp.isAtEnd; const isAtEnd2 = state.isAtEnd; if (isAtEnd) { if (typeof isAtEnd.set === "function") { const result1 = isAtEnd.set(isAtEnd2); } else { isAtEnd.value = isAtEnd2; } } let isAtStart = tmp.isAtStart; const isAtStart2 = state.isAtStart; if (isAtStart) { if (typeof isAtStart.set === "function") { const result2 = isAtStart.set(isAtStart2); } else { isAtStart.value = isAtStart2; } } let isNearEnd = tmp.isNearEnd; const isNearEnd2 = state.isNearEnd; if (isNearEnd) { if (typeof isNearEnd.set === "function") { const result3 = isNearEnd.set(isNearEnd2); } else { isNearEnd.value = isNearEnd2; } } let isNearStart = tmp.isNearStart; const isNearStart2 = state.isNearStart; if (isNearStart) { if (typeof isNearStart.set === "function") { const result4 = isNearStart.set(isNearStart2); } else { isNearStart.value = isNearStart2; } } let isWithinMaintainScrollAtEndThreshold = tmp.isWithinMaintainScrollAtEndThreshold; const isWithinMaintainScrollAtEndThreshold2 = state.isWithinMaintainScrollAtEndThreshold; if (isWithinMaintainScrollAtEndThreshold) { if (typeof isWithinMaintainScrollAtEndThreshold.set === "function") { const result5 = isWithinMaintainScrollAtEndThreshold.set(isWithinMaintainScrollAtEndThreshold2); } else { isWithinMaintainScrollAtEndThreshold.value = isWithinMaintainScrollAtEndThreshold2; } } const scrollOffset = tmp.scrollOffset; const scroll = state.scroll; if (scrollOffset) { if (typeof scrollOffset.set === "function") { const result6 = scrollOffset.set(scroll); } else { scrollOffset.value = scroll; } } let listenResult; if (tmp.activeStickyIndex) { listenResult = state.listen("activeStickyIndex", (value) => { const activeStickyIndex = sharedValues.activeStickyIndex; if (activeStickyIndex) { if (typeof activeStickyIndex.set === "function") { const result = activeStickyIndex.set(value); } else { activeStickyIndex.value = value; } } }); } items = [listenResult, , , , , ]; let listenResult1; if (tmp.isAtEnd) { listenResult1 = state.listen("isAtEnd", (value) => { const isAtEnd = sharedValues.isAtEnd; if (isAtEnd) { if (typeof isAtEnd.set === "function") { const result = isAtEnd.set(value); } else { isAtEnd.value = value; } } }); } items[1] = listenResult1; let listenResult2; if (tmp.isAtStart) { listenResult2 = state.listen("isAtStart", (value) => { const isAtStart = sharedValues.isAtStart; if (isAtStart) { if (typeof isAtStart.set === "function") { const result = isAtStart.set(value); } else { isAtStart.value = value; } } }); } items[2] = listenResult2; let listenResult3; if (tmp.isNearEnd) { listenResult3 = state.listen("isNearEnd", (value) => { const isNearEnd = sharedValues.isNearEnd; if (isNearEnd) { if (typeof isNearEnd.set === "function") { const result = isNearEnd.set(value); } else { isNearEnd.value = value; } } }); } items[3] = listenResult3; let listenResult4; if (tmp.isNearStart) { listenResult4 = state.listen("isNearStart", (value) => { const isNearStart = sharedValues.isNearStart; if (isNearStart) { if (typeof isNearStart.set === "function") { const result = isNearStart.set(value); } else { isNearStart.value = value; } } }); } items[4] = listenResult4; let listenResult5; if (tmp.isWithinMaintainScrollAtEndThreshold) { listenResult5 = state.listen("isWithinMaintainScrollAtEndThreshold", (value) => { const isWithinMaintainScrollAtEndThreshold = sharedValues.isWithinMaintainScrollAtEndThreshold; if (isWithinMaintainScrollAtEndThreshold) { if (typeof isWithinMaintainScrollAtEndThreshold.set === "function") { const result = isWithinMaintainScrollAtEndThreshold.set(value); } else { isWithinMaintainScrollAtEndThreshold.value = value; } } }); } items[5] = listenResult5; return () => { const iter = items[Symbol.iterator](); const nextResult = iter.next(); while (iter !== undefined) { if (null != nextResult) { let tmp3Result = tmp3(); } continue; } }; } } }, items); const obj = {}; const merged = Object.assign(tmp); obj.animatedPropsInternal = sharedValues.animatedProps; obj.refLegendList = useCombinedRef(frozen.useCallback((arg0) => { arg0((arg0) => { let tmp = closure_0; if (arg0 === closure_0) { tmp = arg0; } return tmp; }); }, []), forwardedRef); const obj2 = {}; const merged1 = Object.assign(obj); obj2.ref = sharedValues.refScrollView; return ; }));