mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 16:51:02 +00:00
1 line
16 KiB
Plaintext
1 line
16 KiB
Plaintext
{"dependencies":[{"name":"react","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":15},"end":{"line":3,"column":31,"index":46}}],"key":"RtGiGa+/H7VrI7GDQDLhO1UbpU8=","exportNames":["*"],"imports":1}},{"name":"./DeprecatedNavigationInChildContext.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":4,"column":0,"index":47},"end":{"line":4,"column":93,"index":140}}],"key":"q52xm1L6GcwAHIDdgCYRmHsHIPQ=","exportNames":["*"],"imports":1}},{"name":"./NavigationBuilderContext.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":5,"column":0,"index":141},"end":{"line":5,"column":73,"index":214}}],"key":"vvb+tbs8cGp9hlTxgL5PZCjRz5E=","exportNames":["*"],"imports":1}},{"name":"./useOnPreventRemove.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":6,"column":0,"index":215},"end":{"line":6,"column":82,"index":297}}],"key":"PbhCaGdR39Jz0OkkS237FN1qkxU=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n function _interopNamespace(e) {\n if (e && e.__esModule) return e;\n var n = {};\n if (e) Object.keys(e).forEach(function (k) {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () {\n return e[k];\n }\n });\n });\n n.default = e;\n return n;\n }\n exports.useOnAction = useOnAction;\n var _react = require(_dependencyMap[0], \"react\");\n var React = _interopNamespace(_react);\n var _DeprecatedNavigationInChildContextJs = require(_dependencyMap[1], \"./DeprecatedNavigationInChildContext.js\");\n var _NavigationBuilderContextJs = require(_dependencyMap[2], \"./NavigationBuilderContext.js\");\n var _useOnPreventRemoveJs = require(_dependencyMap[3], \"./useOnPreventRemove.js\");\n /**\n * Hook to handle actions for a navigator, including state updates and bubbling.\n *\n * Bubbling an action is achieved in 2 ways:\n * 1. To bubble action to parent, we expose the action handler in context and then access the parent context\n * 2. To bubble action to child, child adds event listeners subscribing to actions from parent\n *\n * When the action handler handles as action, it returns `true`, otherwise `false`.\n */\n function useOnAction({\n router,\n getState,\n setState,\n key,\n actionListeners,\n beforeRemoveListeners,\n routerConfigOptions,\n emitter\n }) {\n const {\n onAction: onActionParent,\n onRouteFocus: onRouteFocusParent,\n addListener: addListenerParent,\n onDispatchAction\n } = React.useContext(_NavigationBuilderContextJs.NavigationBuilderContext);\n const navigationInChildEnabled = React.useContext(_DeprecatedNavigationInChildContextJs.DeprecatedNavigationInChildContext);\n const routerConfigOptionsRef = React.useRef(routerConfigOptions);\n React.useEffect(() => {\n routerConfigOptionsRef.current = routerConfigOptions;\n });\n const onAction = React.useCallback((action, visitedNavigators = new Set()) => {\n const state = getState();\n\n // Since actions can bubble both up and down, they could come to the same navigator again\n // We keep track of navigators which have already tried to handle the action and return if it's already visited\n if (visitedNavigators.has(state.key)) {\n return false;\n }\n visitedNavigators.add(state.key);\n if (typeof action.target !== 'string' || action.target === state.key) {\n let result = router.getStateForAction(state, action, routerConfigOptionsRef.current);\n\n // If a target is specified and set to current navigator, the action shouldn't bubble\n // So instead of `null`, we use the state object for such cases to signal that action was handled\n result = result === null && action.target === state.key ? state : result;\n if (result !== null) {\n onDispatchAction(action, state === result);\n if (state !== result) {\n const isPrevented = (0, _useOnPreventRemoveJs.shouldPreventRemove)(emitter, beforeRemoveListeners, state.routes, result.routes, action);\n if (isPrevented) {\n return true;\n }\n setState(result);\n }\n if (onRouteFocusParent !== undefined) {\n // Some actions such as `NAVIGATE` also want to bring the navigated route to focus in the whole tree\n // This means we need to focus all of the parent navigators of this navigator as well\n const shouldFocus = router.shouldActionChangeFocus(action);\n if (shouldFocus && key !== undefined) {\n onRouteFocusParent(key);\n }\n }\n return true;\n }\n }\n if (onActionParent !== undefined) {\n // Bubble action to the parent if the current navigator didn't handle it\n if (onActionParent(action, visitedNavigators)) {\n return true;\n }\n }\n if (typeof action.target === 'string' ||\n // For backward compatibility\n action.type === 'NAVIGATE_DEPRECATED' || navigationInChildEnabled) {\n // If the action wasn't handled by current navigator or a parent navigator, let children handle it\n // Handling this when target isn't specified is deprecated and will be removed in the future\n for (let i = actionListeners.length - 1; i >= 0; i--) {\n const listener = actionListeners[i];\n if (listener(action, visitedNavigators)) {\n return true;\n }\n }\n }\n return false;\n }, [actionListeners, beforeRemoveListeners, emitter, getState, navigationInChildEnabled, key, onActionParent, onDispatchAction, onRouteFocusParent, router, setState]);\n (0, _useOnPreventRemoveJs.useOnPreventRemove)({\n getState,\n emitter,\n beforeRemoveListeners\n });\n React.useEffect(() => addListenerParent?.('action', onAction), [addListenerParent, onAction]);\n return onAction;\n }\n});","lineCount":121,"map":[[2,2,1,0],[2,14,1,12],[4,2,1,13,"Object"],[4,8,1,13],[4,9,1,13,"defineProperty"],[4,23,1,13],[4,24,1,13,"exports"],[4,31,1,13],[5,4,1,13,"value"],[5,9,1,13],[6,2,1,13],[7,2,1,13],[7,11,1,13,"_interopNamespace"],[7,29,1,13,"e"],[7,30,1,13],[8,4,1,13],[8,8,1,13,"e"],[8,9,1,13],[8,13,1,13,"e"],[8,14,1,13],[8,15,1,13,"__esModule"],[8,25,1,13],[8,34,1,13,"e"],[8,35,1,13],[9,4,1,13],[9,8,1,13,"n"],[9,9,1,13],[10,4,1,13],[10,8,1,13,"e"],[10,9,1,13],[10,11,1,13,"Object"],[10,17,1,13],[10,18,1,13,"keys"],[10,22,1,13],[10,23,1,13,"e"],[10,24,1,13],[10,26,1,13,"forEach"],[10,33,1,13],[10,44,1,13,"k"],[10,45,1,13],[11,6,1,13],[11,10,1,13,"d"],[11,11,1,13],[11,14,1,13,"Object"],[11,20,1,13],[11,21,1,13,"getOwnPropertyDescriptor"],[11,45,1,13],[11,46,1,13,"e"],[11,47,1,13],[11,49,1,13,"k"],[11,50,1,13],[12,6,1,13,"Object"],[12,12,1,13],[12,13,1,13,"defineProperty"],[12,27,1,13],[12,28,1,13,"n"],[12,29,1,13],[12,31,1,13,"k"],[12,32,1,13],[12,34,1,13,"d"],[12,35,1,13],[12,36,1,13,"get"],[12,39,1,13],[12,42,1,13,"d"],[12,43,1,13],[13,8,1,13,"enumerable"],[13,18,1,13],[14,8,1,13,"get"],[14,11,1,13],[14,22,1,13,"get"],[14,23,1,13],[15,10,1,13],[15,17,1,13,"e"],[15,18,1,13],[15,19,1,13,"k"],[15,20,1,13],[16,8,1,13],[17,6,1,13],[18,4,1,13],[19,4,1,13,"n"],[19,5,1,13],[19,6,1,13,"default"],[19,13,1,13],[19,16,1,13,"e"],[19,17,1,13],[20,4,1,13],[20,11,1,13,"n"],[20,12,1,13],[21,2,1,13],[22,2,16,0,"exports"],[22,9,16,0],[22,10,16,0,"useOnAction"],[22,21,16,0],[22,24,16,0,"useOnAction"],[22,35,16,0],[23,2,3,0],[23,6,3,0,"_react"],[23,12,3,0],[23,15,3,0,"require"],[23,22,3,0],[23,23,3,0,"_dependencyMap"],[23,37,3,0],[24,2,3,0],[24,6,3,0,"React"],[24,11,3,0],[24,14,3,0,"_interopNamespace"],[24,31,3,0],[24,32,3,0,"_react"],[24,38,3,0],[25,2,4,0],[25,6,4,0,"_DeprecatedNavigationInChildContextJs"],[25,43,4,0],[25,46,4,0,"require"],[25,53,4,0],[25,54,4,0,"_dependencyMap"],[25,68,4,0],[26,2,5,0],[26,6,5,0,"_NavigationBuilderContextJs"],[26,33,5,0],[26,36,5,0,"require"],[26,43,5,0],[26,44,5,0,"_dependencyMap"],[26,58,5,0],[27,2,6,0],[27,6,6,0,"_useOnPreventRemoveJs"],[27,27,6,0],[27,30,6,0,"require"],[27,37,6,0],[27,38,6,0,"_dependencyMap"],[27,52,6,0],[28,2,7,0],[29,0,8,0],[30,0,9,0],[31,0,10,0],[32,0,11,0],[33,0,12,0],[34,0,13,0],[35,0,14,0],[36,0,15,0],[37,2,16,7],[37,11,16,16,"useOnAction"],[37,22,16,27,"useOnAction"],[37,23,16,28],[38,4,17,2,"router"],[38,10,17,8],[39,4,18,2,"getState"],[39,12,18,10],[40,4,19,2,"setState"],[40,12,19,10],[41,4,20,2,"key"],[41,7,20,5],[42,4,21,2,"actionListeners"],[42,19,21,17],[43,4,22,2,"beforeRemoveListeners"],[43,25,22,23],[44,4,23,2,"routerConfigOptions"],[44,23,23,21],[45,4,24,2,"emitter"],[46,2,25,0],[46,3,25,1],[46,5,25,3],[47,4,26,2],[47,10,26,8],[48,6,27,4,"onAction"],[48,14,27,12],[48,16,27,14,"onActionParent"],[48,30,27,28],[49,6,28,4,"onRouteFocus"],[49,18,28,16],[49,20,28,18,"onRouteFocusParent"],[49,38,28,36],[50,6,29,4,"addListener"],[50,17,29,15],[50,19,29,17,"addListenerParent"],[50,36,29,34],[51,6,30,4,"onDispatchAction"],[52,4,31,2],[52,5,31,3],[52,8,31,6,"React"],[52,13,31,11],[52,14,31,12,"useContext"],[52,24,31,22],[52,25,31,23,"NavigationBuilderContext"],[52,52,31,47],[52,53,31,47,"NavigationBuilderContext"],[52,77,31,47],[52,78,31,48],[53,4,32,2],[53,10,32,8,"navigationInChildEnabled"],[53,34,32,32],[53,37,32,35,"React"],[53,42,32,40],[53,43,32,41,"useContext"],[53,53,32,51],[53,54,32,52,"DeprecatedNavigationInChildContext"],[53,91,32,86],[53,92,32,86,"DeprecatedNavigationInChildContext"],[53,126,32,86],[53,127,32,87],[54,4,33,2],[54,10,33,8,"routerConfigOptionsRef"],[54,32,33,30],[54,35,33,33,"React"],[54,40,33,38],[54,41,33,39,"useRef"],[54,47,33,45],[54,48,33,46,"routerConfigOptions"],[54,67,33,65],[54,68,33,66],[55,4,34,2,"React"],[55,9,34,7],[55,10,34,8,"useEffect"],[55,19,34,17],[55,20,34,18],[55,26,34,24],[56,6,35,4,"routerConfigOptionsRef"],[56,28,35,26],[56,29,35,27,"current"],[56,36,35,34],[56,39,35,37,"routerConfigOptions"],[56,58,35,56],[57,4,36,2],[57,5,36,3],[57,6,36,4],[58,4,37,2],[58,10,37,8,"onAction"],[58,18,37,16],[58,21,37,19,"React"],[58,26,37,24],[58,27,37,25,"useCallback"],[58,38,37,36],[58,39,37,37],[58,40,37,38,"action"],[58,46,37,44],[58,48,37,46,"visitedNavigators"],[58,65,37,63],[58,68,37,66],[58,72,37,70,"Set"],[58,75,37,73],[58,76,37,74],[58,77,37,75],[58,82,37,80],[59,6,38,4],[59,12,38,10,"state"],[59,17,38,15],[59,20,38,18,"getState"],[59,28,38,26],[59,29,38,27],[59,30,38,28],[61,6,40,4],[62,6,41,4],[63,6,42,4],[63,10,42,8,"visitedNavigators"],[63,27,42,25],[63,28,42,26,"has"],[63,31,42,29],[63,32,42,30,"state"],[63,37,42,35],[63,38,42,36,"key"],[63,41,42,39],[63,42,42,40],[63,44,42,42],[64,8,43,6],[64,15,43,13],[64,20,43,18],[65,6,44,4],[66,6,45,4,"visitedNavigators"],[66,23,45,21],[66,24,45,22,"add"],[66,27,45,25],[66,28,45,26,"state"],[66,33,45,31],[66,34,45,32,"key"],[66,37,45,35],[66,38,45,36],[67,6,46,4],[67,10,46,8],[67,17,46,15,"action"],[67,23,46,21],[67,24,46,22,"target"],[67,30,46,28],[67,35,46,33],[67,43,46,41],[67,47,46,45,"action"],[67,53,46,51],[67,54,46,52,"target"],[67,60,46,58],[67,65,46,63,"state"],[67,70,46,68],[67,71,46,69,"key"],[67,74,46,72],[67,76,46,74],[68,8,47,6],[68,12,47,10,"result"],[68,18,47,16],[68,21,47,19,"router"],[68,27,47,25],[68,28,47,26,"getStateForAction"],[68,45,47,43],[68,46,47,44,"state"],[68,51,47,49],[68,53,47,51,"action"],[68,59,47,57],[68,61,47,59,"routerConfigOptionsRef"],[68,83,47,81],[68,84,47,82,"current"],[68,91,47,89],[68,92,47,90],[70,8,49,6],[71,8,50,6],[72,8,51,6,"result"],[72,14,51,12],[72,17,51,15,"result"],[72,23,51,21],[72,28,51,26],[72,32,51,30],[72,36,51,34,"action"],[72,42,51,40],[72,43,51,41,"target"],[72,49,51,47],[72,54,51,52,"state"],[72,59,51,57],[72,60,51,58,"key"],[72,63,51,61],[72,66,51,64,"state"],[72,71,51,69],[72,74,51,72,"result"],[72,80,51,78],[73,8,52,6],[73,12,52,10,"result"],[73,18,52,16],[73,23,52,21],[73,27,52,25],[73,29,52,27],[74,10,53,8,"onDispatchAction"],[74,26,53,24],[74,27,53,25,"action"],[74,33,53,31],[74,35,53,33,"state"],[74,40,53,38],[74,45,53,43,"result"],[74,51,53,49],[74,52,53,50],[75,10,54,8],[75,14,54,12,"state"],[75,19,54,17],[75,24,54,22,"result"],[75,30,54,28],[75,32,54,30],[76,12,55,10],[76,18,55,16,"isPrevented"],[76,29,55,27],[76,32,55,30],[76,36,55,30,"shouldPreventRemove"],[76,57,55,49],[76,58,55,49,"shouldPreventRemove"],[76,77,55,49],[76,79,55,50,"emitter"],[76,86,55,57],[76,88,55,59,"beforeRemoveListeners"],[76,109,55,80],[76,111,55,82,"state"],[76,116,55,87],[76,117,55,88,"routes"],[76,123,55,94],[76,125,55,96,"result"],[76,131,55,102],[76,132,55,103,"routes"],[76,138,55,109],[76,140,55,111,"action"],[76,146,55,117],[76,147,55,118],[77,12,56,10],[77,16,56,14,"isPrevented"],[77,27,56,25],[77,29,56,27],[78,14,57,12],[78,21,57,19],[78,25,57,23],[79,12,58,10],[80,12,59,10,"setState"],[80,20,59,18],[80,21,59,19,"result"],[80,27,59,25],[80,28,59,26],[81,10,60,8],[82,10,61,8],[82,14,61,12,"onRouteFocusParent"],[82,32,61,30],[82,37,61,35,"undefined"],[82,46,61,44],[82,48,61,46],[83,12,62,10],[84,12,63,10],[85,12,64,10],[85,18,64,16,"shouldFocus"],[85,29,64,27],[85,32,64,30,"router"],[85,38,64,36],[85,39,64,37,"shouldActionChangeFocus"],[85,62,64,60],[85,63,64,61,"action"],[85,69,64,67],[85,70,64,68],[86,12,65,10],[86,16,65,14,"shouldFocus"],[86,27,65,25],[86,31,65,29,"key"],[86,34,65,32],[86,39,65,37,"undefined"],[86,48,65,46],[86,50,65,48],[87,14,66,12,"onRouteFocusParent"],[87,32,66,30],[87,33,66,31,"key"],[87,36,66,34],[87,37,66,35],[88,12,67,10],[89,10,68,8],[90,10,69,8],[90,17,69,15],[90,21,69,19],[91,8,70,6],[92,6,71,4],[93,6,72,4],[93,10,72,8,"onActionParent"],[93,24,72,22],[93,29,72,27,"undefined"],[93,38,72,36],[93,40,72,38],[94,8,73,6],[95,8,74,6],[95,12,74,10,"onActionParent"],[95,26,74,24],[95,27,74,25,"action"],[95,33,74,31],[95,35,74,33,"visitedNavigators"],[95,52,74,50],[95,53,74,51],[95,55,74,53],[96,10,75,8],[96,17,75,15],[96,21,75,19],[97,8,76,6],[98,6,77,4],[99,6,78,4],[99,10,78,8],[99,17,78,15,"action"],[99,23,78,21],[99,24,78,22,"target"],[99,30,78,28],[99,35,78,33],[99,43,78,41],[100,6,79,4],[101,6,80,4,"action"],[101,12,80,10],[101,13,80,11,"type"],[101,17,80,15],[101,22,80,20],[101,43,80,41],[101,47,80,45,"navigationInChildEnabled"],[101,71,80,69],[101,73,80,71],[102,8,81,6],[103,8,82,6],[104,8,83,6],[104,13,83,11],[104,17,83,15,"i"],[104,18,83,16],[104,21,83,19,"actionListeners"],[104,36,83,34],[104,37,83,35,"length"],[104,43,83,41],[104,46,83,44],[104,47,83,45],[104,49,83,47,"i"],[104,50,83,48],[104,54,83,52],[104,55,83,53],[104,57,83,55,"i"],[104,58,83,56],[104,60,83,58],[104,62,83,60],[105,10,84,8],[105,16,84,14,"listener"],[105,24,84,22],[105,27,84,25,"actionListeners"],[105,42,84,40],[105,43,84,41,"i"],[105,44,84,42],[105,45,84,43],[106,10,85,8],[106,14,85,12,"listener"],[106,22,85,20],[106,23,85,21,"action"],[106,29,85,27],[106,31,85,29,"visitedNavigators"],[106,48,85,46],[106,49,85,47],[106,51,85,49],[107,12,86,10],[107,19,86,17],[107,23,86,21],[108,10,87,8],[109,8,88,6],[110,6,89,4],[111,6,90,4],[111,13,90,11],[111,18,90,16],[112,4,91,2],[112,5,91,3],[112,7,91,5],[112,8,91,6,"actionListeners"],[112,23,91,21],[112,25,91,23,"beforeRemoveListeners"],[112,46,91,44],[112,48,91,46,"emitter"],[112,55,91,53],[112,57,91,55,"getState"],[112,65,91,63],[112,67,91,65,"navigationInChildEnabled"],[112,91,91,89],[112,93,91,91,"key"],[112,96,91,94],[112,98,91,96,"onActionParent"],[112,112,91,110],[112,114,91,112,"onDispatchAction"],[112,130,91,128],[112,132,91,130,"onRouteFocusParent"],[112,150,91,148],[112,152,91,150,"router"],[112,158,91,156],[112,160,91,158,"setState"],[112,168,91,166],[112,169,91,167],[112,170,91,168],[113,4,92,2],[113,8,92,2,"useOnPreventRemove"],[113,29,92,20],[113,30,92,20,"useOnPreventRemove"],[113,48,92,20],[113,50,92,21],[114,6,93,4,"getState"],[114,14,93,12],[115,6,94,4,"emitter"],[115,13,94,11],[116,6,95,4,"beforeRemoveListeners"],[117,4,96,2],[117,5,96,3],[117,6,96,4],[118,4,97,2,"React"],[118,9,97,7],[118,10,97,8,"useEffect"],[118,19,97,17],[118,20,97,18],[118,26,97,24,"addListenerParent"],[118,43,97,41],[118,46,97,44],[118,54,97,52],[118,56,97,54,"onAction"],[118,64,97,62],[118,65,97,63],[118,67,97,65],[118,68,97,66,"addListenerParent"],[118,85,97,83],[118,87,97,85,"onAction"],[118,95,97,93],[118,96,97,94],[118,97,97,95],[119,4,98,2],[119,11,98,9,"onAction"],[119,19,98,17],[120,2,99,0],[121,0,99,1],[121,3]],"functionMap":{"names":["<global>","useOnAction","React.useEffect$argument_0","onAction"],"mappings":"AAA;OCe;kBCkB;GDE;qCEC;GFsD;kBCM,6CD;CDE"},"hasCjsExports":false},"type":"js/module"}]} |