// Module ID: 5553 // Function ID: 5554 // Name: n // Dependencies: [19, 5509, 5552] // Exports: useReanimatedEventHandler // Module 5553 (n) import noop from "noop"; import { Reanimated } from "module_5509"; let c3; let c4; let obj1; ({ useEffect: obj1, useMemo: c3, useRef: c4 } = noop); let closure_5 = ["onGestureHandlerReanimatedEvent", "onGestureHandlerReanimatedStateChange", "onGestureHandlerReanimatedTouchEvent"]; let fn = function n() { }; fn.__closure = {}; fn.__workletHash = 763644533783; fn.__initData = { code: "function pnpm_useReanimatedEventHandlerTs1(){}" }; let mutable; if (Reanimated != null) { mutable = Reanimated.makeMutable({}); } function deleteHandlerEventEntry(arg0) { delete tmp2[tmp]; } deleteHandlerEventEntry.__closure = { lastUpdateEventMap: mutable }; deleteHandlerEventEntry.__workletHash = 8348834805583; deleteHandlerEventEntry.__initData = { code: "function deleteHandlerEventEntry_Pnpm_useReanimatedEventHandlerTs2(handlerTag){const{lastUpdateEventMap}=this.__closure;delete lastUpdateEventMap.value[handlerTag];}" }; let closure_9 = { code: "function pnpm_useReanimatedEventHandlerTs3(event){const{lastUpdateEventMap,eventHandler,handlerTag,workletizedHandlers,changeEventCalculator,fillInDefaultValues}=this.__closure;let context=lastUpdateEventMap.value[event.handlerTag];if(context===undefined){context={lastUpdateEvent:undefined};lastUpdateEventMap.value[event.handlerTag]=context;}eventHandler(handlerTag,event,workletizedHandlers,changeEventCalculator,context,false,fillInDefaultValues);}" }; export const useReanimatedEventHandler = function useReanimatedEventHandler(handlerTag, memoizedGestureCallbacks, handler, changeEventCalculator, fillInDefaultValues) { const _require = handlerTag; const dependencyMap = memoizedGestureCallbacks; const callback = changeEventCalculator; const callback2 = fillInDefaultValues; const items = [memoizedGestureCallbacks]; let tmp = callback2(() => { const Reanimated = handlerTag(memoizedGestureCallbacks[1]).Reanimated; let isWorkletFunctionResult; if (Reanimated != null) { isWorkletFunctionResult = Reanimated.isWorkletFunction(memoizedGestureCallbacks.onUpdate); } if (isWorkletFunctionResult) { let obj = tmp3; } else { obj = {}; const merged = Object.assign(tmp3); obj.onUpdate = outer1_6; } return obj; }, items); const callback3 = tmp; const fn = function h(handlerTag) { let tmp = outer1_7.value[handlerTag.handlerTag]; if (undefined === tmp) { const obj = { lastUpdateEvent: "Array" }; iter.value[handlerTag.handlerTag] = obj; tmp = obj; } handlerTag(memoizedGestureCallbacks[2]).eventHandler(handlerTag, handlerTag, closure_4, closure_2, tmp, false, closure_3); }; fn.__closure = { lastUpdateEventMap: mutable, eventHandler: _require(5552).eventHandler, handlerTag, workletizedHandlers: tmp, changeEventCalculator, fillInDefaultValues }; fn.__workletHash = 3272953373395; fn.__initData = closure_9; const tmp2 = callback3(handlerTag); let closure_5 = tmp2; const items1 = [handlerTag]; callback(() => { closure_5.current = closure_0; return () => { const Reanimated = outer1_0(outer1_1[1]).Reanimated; if (Reanimated != null) { const runOnUI = Reanimated.runOnUI; if (runOnUI != null) { runOnUI(outer1_8)(closure_0); } } }; }, items1); let Reanimated = _require(5509).Reanimated; let event; if (Reanimated != null) { let tmp5 = tmp2.current !== handlerTag; if (!tmp5) { let doDependenciesDiffer; if (handler != null) { doDependenciesDiffer = handler.doDependenciesDiffer; } tmp5 = doDependenciesDiffer; } event = Reanimated.useEvent(fn, closure_5, tmp5); const tmp6 = closure_5; } return event; };