mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 20:21:01 +00:00
1 line
18 KiB
Plaintext
1 line
18 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(_ref) {\n var router = _ref.router,\n getState = _ref.getState,\n setState = _ref.setState,\n key = _ref.key,\n actionListeners = _ref.actionListeners,\n beforeRemoveListeners = _ref.beforeRemoveListeners,\n routerConfigOptions = _ref.routerConfigOptions,\n emitter = _ref.emitter;\n var _React$useContext = React.useContext(_NavigationBuilderContextJs.NavigationBuilderContext),\n onActionParent = _React$useContext.onAction,\n onRouteFocusParent = _React$useContext.onRouteFocus,\n addListenerParent = _React$useContext.addListener,\n onDispatchAction = _React$useContext.onDispatchAction;\n var navigationInChildEnabled = React.useContext(_DeprecatedNavigationInChildContextJs.DeprecatedNavigationInChildContext);\n var routerConfigOptionsRef = React.useRef(routerConfigOptions);\n React.useEffect(() => {\n routerConfigOptionsRef.current = routerConfigOptions;\n });\n var onAction = React.useCallback(function (action) {\n var visitedNavigators = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Set();\n var 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 var 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 var 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 var 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 (var i = actionListeners.length - 1; i >= 0; i--) {\n var 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":120,"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,27,"_ref"],[37,27,16,27],[37,29,25,3],[38,4,25,3],[38,8,17,2,"router"],[38,14,17,8],[38,17,17,8,"_ref"],[38,21,17,8],[38,22,17,2,"router"],[38,28,17,8],[39,6,18,2,"getState"],[39,14,18,10],[39,17,18,10,"_ref"],[39,21,18,10],[39,22,18,2,"getState"],[39,30,18,10],[40,6,19,2,"setState"],[40,14,19,10],[40,17,19,10,"_ref"],[40,21,19,10],[40,22,19,2,"setState"],[40,30,19,10],[41,6,20,2,"key"],[41,9,20,5],[41,12,20,5,"_ref"],[41,16,20,5],[41,17,20,2,"key"],[41,20,20,5],[42,6,21,2,"actionListeners"],[42,21,21,17],[42,24,21,17,"_ref"],[42,28,21,17],[42,29,21,2,"actionListeners"],[42,44,21,17],[43,6,22,2,"beforeRemoveListeners"],[43,27,22,23],[43,30,22,23,"_ref"],[43,34,22,23],[43,35,22,2,"beforeRemoveListeners"],[43,56,22,23],[44,6,23,2,"routerConfigOptions"],[44,25,23,21],[44,28,23,21,"_ref"],[44,32,23,21],[44,33,23,2,"routerConfigOptions"],[44,52,23,21],[45,6,24,2,"emitter"],[45,13,24,9],[45,16,24,9,"_ref"],[45,20,24,9],[45,21,24,2,"emitter"],[45,28,24,9],[46,4,26,2],[46,8,26,2,"_React$useContext"],[46,25,26,2],[46,28,31,6,"React"],[46,33,31,11],[46,34,31,12,"useContext"],[46,44,31,22],[46,45,31,23,"NavigationBuilderContext"],[46,72,31,47],[46,73,31,47,"NavigationBuilderContext"],[46,97,31,47],[46,98,31,48],[47,6,27,14,"onActionParent"],[47,20,27,28],[47,23,27,28,"_React$useContext"],[47,40,27,28],[47,41,27,4,"onAction"],[47,49,27,12],[48,6,28,18,"onRouteFocusParent"],[48,24,28,36],[48,27,28,36,"_React$useContext"],[48,44,28,36],[48,45,28,4,"onRouteFocus"],[48,57,28,16],[49,6,29,17,"addListenerParent"],[49,23,29,34],[49,26,29,34,"_React$useContext"],[49,43,29,34],[49,44,29,4,"addListener"],[49,55,29,15],[50,6,30,4,"onDispatchAction"],[50,22,30,20],[50,25,30,20,"_React$useContext"],[50,42,30,20],[50,43,30,4,"onDispatchAction"],[50,59,30,20],[51,4,32,2],[51,8,32,8,"navigationInChildEnabled"],[51,32,32,32],[51,35,32,35,"React"],[51,40,32,40],[51,41,32,41,"useContext"],[51,51,32,51],[51,52,32,52,"DeprecatedNavigationInChildContext"],[51,89,32,86],[51,90,32,86,"DeprecatedNavigationInChildContext"],[51,124,32,86],[51,125,32,87],[52,4,33,2],[52,8,33,8,"routerConfigOptionsRef"],[52,30,33,30],[52,33,33,33,"React"],[52,38,33,38],[52,39,33,39,"useRef"],[52,45,33,45],[52,46,33,46,"routerConfigOptions"],[52,65,33,65],[52,66,33,66],[53,4,34,2,"React"],[53,9,34,7],[53,10,34,8,"useEffect"],[53,19,34,17],[53,20,34,18],[53,26,34,24],[54,6,35,4,"routerConfigOptionsRef"],[54,28,35,26],[54,29,35,27,"current"],[54,36,35,34],[54,39,35,37,"routerConfigOptions"],[54,58,35,56],[55,4,36,2],[55,5,36,3],[55,6,36,4],[56,4,37,2],[56,8,37,8,"onAction"],[56,16,37,16],[56,19,37,19,"React"],[56,24,37,24],[56,25,37,25,"useCallback"],[56,36,37,36],[56,37,37,37],[56,47,37,38,"action"],[56,53,37,44],[56,55,37,80],[57,6,37,80],[57,10,37,46,"visitedNavigators"],[57,27,37,63],[57,30,37,63,"arguments"],[57,39,37,63],[57,40,37,63,"length"],[57,46,37,63],[57,54,37,63,"arguments"],[57,63,37,63],[57,71,37,63,"undefined"],[57,80,37,63],[57,83,37,63,"arguments"],[57,92,37,63],[57,98,37,66],[57,102,37,70,"Set"],[57,105,37,73],[57,106,37,74],[57,107,37,75],[58,6,38,4],[58,10,38,10,"state"],[58,15,38,15],[58,18,38,18,"getState"],[58,26,38,26],[58,27,38,27],[58,28,38,28],[60,6,40,4],[61,6,41,4],[62,6,42,4],[62,10,42,8,"visitedNavigators"],[62,27,42,25],[62,28,42,26,"has"],[62,31,42,29],[62,32,42,30,"state"],[62,37,42,35],[62,38,42,36,"key"],[62,41,42,39],[62,42,42,40],[62,44,42,42],[63,8,43,6],[63,15,43,13],[63,20,43,18],[64,6,44,4],[65,6,45,4,"visitedNavigators"],[65,23,45,21],[65,24,45,22,"add"],[65,27,45,25],[65,28,45,26,"state"],[65,33,45,31],[65,34,45,32,"key"],[65,37,45,35],[65,38,45,36],[66,6,46,4],[66,10,46,8],[66,17,46,15,"action"],[66,23,46,21],[66,24,46,22,"target"],[66,30,46,28],[66,35,46,33],[66,43,46,41],[66,47,46,45,"action"],[66,53,46,51],[66,54,46,52,"target"],[66,60,46,58],[66,65,46,63,"state"],[66,70,46,68],[66,71,46,69,"key"],[66,74,46,72],[66,76,46,74],[67,8,47,6],[67,12,47,10,"result"],[67,18,47,16],[67,21,47,19,"router"],[67,27,47,25],[67,28,47,26,"getStateForAction"],[67,45,47,43],[67,46,47,44,"state"],[67,51,47,49],[67,53,47,51,"action"],[67,59,47,57],[67,61,47,59,"routerConfigOptionsRef"],[67,83,47,81],[67,84,47,82,"current"],[67,91,47,89],[67,92,47,90],[69,8,49,6],[70,8,50,6],[71,8,51,6,"result"],[71,14,51,12],[71,17,51,15,"result"],[71,23,51,21],[71,28,51,26],[71,32,51,30],[71,36,51,34,"action"],[71,42,51,40],[71,43,51,41,"target"],[71,49,51,47],[71,54,51,52,"state"],[71,59,51,57],[71,60,51,58,"key"],[71,63,51,61],[71,66,51,64,"state"],[71,71,51,69],[71,74,51,72,"result"],[71,80,51,78],[72,8,52,6],[72,12,52,10,"result"],[72,18,52,16],[72,23,52,21],[72,27,52,25],[72,29,52,27],[73,10,53,8,"onDispatchAction"],[73,26,53,24],[73,27,53,25,"action"],[73,33,53,31],[73,35,53,33,"state"],[73,40,53,38],[73,45,53,43,"result"],[73,51,53,49],[73,52,53,50],[74,10,54,8],[74,14,54,12,"state"],[74,19,54,17],[74,24,54,22,"result"],[74,30,54,28],[74,32,54,30],[75,12,55,10],[75,16,55,16,"isPrevented"],[75,27,55,27],[75,30,55,30],[75,34,55,30,"shouldPreventRemove"],[75,55,55,49],[75,56,55,49,"shouldPreventRemove"],[75,75,55,49],[75,77,55,50,"emitter"],[75,84,55,57],[75,86,55,59,"beforeRemoveListeners"],[75,107,55,80],[75,109,55,82,"state"],[75,114,55,87],[75,115,55,88,"routes"],[75,121,55,94],[75,123,55,96,"result"],[75,129,55,102],[75,130,55,103,"routes"],[75,136,55,109],[75,138,55,111,"action"],[75,144,55,117],[75,145,55,118],[76,12,56,10],[76,16,56,14,"isPrevented"],[76,27,56,25],[76,29,56,27],[77,14,57,12],[77,21,57,19],[77,25,57,23],[78,12,58,10],[79,12,59,10,"setState"],[79,20,59,18],[79,21,59,19,"result"],[79,27,59,25],[79,28,59,26],[80,10,60,8],[81,10,61,8],[81,14,61,12,"onRouteFocusParent"],[81,32,61,30],[81,37,61,35,"undefined"],[81,46,61,44],[81,48,61,46],[82,12,62,10],[83,12,63,10],[84,12,64,10],[84,16,64,16,"shouldFocus"],[84,27,64,27],[84,30,64,30,"router"],[84,36,64,36],[84,37,64,37,"shouldActionChangeFocus"],[84,60,64,60],[84,61,64,61,"action"],[84,67,64,67],[84,68,64,68],[85,12,65,10],[85,16,65,14,"shouldFocus"],[85,27,65,25],[85,31,65,29,"key"],[85,34,65,32],[85,39,65,37,"undefined"],[85,48,65,46],[85,50,65,48],[86,14,66,12,"onRouteFocusParent"],[86,32,66,30],[86,33,66,31,"key"],[86,36,66,34],[86,37,66,35],[87,12,67,10],[88,10,68,8],[89,10,69,8],[89,17,69,15],[89,21,69,19],[90,8,70,6],[91,6,71,4],[92,6,72,4],[92,10,72,8,"onActionParent"],[92,24,72,22],[92,29,72,27,"undefined"],[92,38,72,36],[92,40,72,38],[93,8,73,6],[94,8,74,6],[94,12,74,10,"onActionParent"],[94,26,74,24],[94,27,74,25,"action"],[94,33,74,31],[94,35,74,33,"visitedNavigators"],[94,52,74,50],[94,53,74,51],[94,55,74,53],[95,10,75,8],[95,17,75,15],[95,21,75,19],[96,8,76,6],[97,6,77,4],[98,6,78,4],[98,10,78,8],[98,17,78,15,"action"],[98,23,78,21],[98,24,78,22,"target"],[98,30,78,28],[98,35,78,33],[98,43,78,41],[99,6,79,4],[100,6,80,4,"action"],[100,12,80,10],[100,13,80,11,"type"],[100,17,80,15],[100,22,80,20],[100,43,80,41],[100,47,80,45,"navigationInChildEnabled"],[100,71,80,69],[100,73,80,71],[101,8,81,6],[102,8,82,6],[103,8,83,6],[103,13,83,11],[103,17,83,15,"i"],[103,18,83,16],[103,21,83,19,"actionListeners"],[103,36,83,34],[103,37,83,35,"length"],[103,43,83,41],[103,46,83,44],[103,47,83,45],[103,49,83,47,"i"],[103,50,83,48],[103,54,83,52],[103,55,83,53],[103,57,83,55,"i"],[103,58,83,56],[103,60,83,58],[103,62,83,60],[104,10,84,8],[104,14,84,14,"listener"],[104,22,84,22],[104,25,84,25,"actionListeners"],[104,40,84,40],[104,41,84,41,"i"],[104,42,84,42],[104,43,84,43],[105,10,85,8],[105,14,85,12,"listener"],[105,22,85,20],[105,23,85,21,"action"],[105,29,85,27],[105,31,85,29,"visitedNavigators"],[105,48,85,46],[105,49,85,47],[105,51,85,49],[106,12,86,10],[106,19,86,17],[106,23,86,21],[107,10,87,8],[108,8,88,6],[109,6,89,4],[110,6,90,4],[110,13,90,11],[110,18,90,16],[111,4,91,2],[111,5,91,3],[111,7,91,5],[111,8,91,6,"actionListeners"],[111,23,91,21],[111,25,91,23,"beforeRemoveListeners"],[111,46,91,44],[111,48,91,46,"emitter"],[111,55,91,53],[111,57,91,55,"getState"],[111,65,91,63],[111,67,91,65,"navigationInChildEnabled"],[111,91,91,89],[111,93,91,91,"key"],[111,96,91,94],[111,98,91,96,"onActionParent"],[111,112,91,110],[111,114,91,112,"onDispatchAction"],[111,130,91,128],[111,132,91,130,"onRouteFocusParent"],[111,150,91,148],[111,152,91,150,"router"],[111,158,91,156],[111,160,91,158,"setState"],[111,168,91,166],[111,169,91,167],[111,170,91,168],[112,4,92,2],[112,8,92,2,"useOnPreventRemove"],[112,29,92,20],[112,30,92,20,"useOnPreventRemove"],[112,48,92,20],[112,50,92,21],[113,6,93,4,"getState"],[113,14,93,12],[114,6,94,4,"emitter"],[114,13,94,11],[115,6,95,4,"beforeRemoveListeners"],[116,4,96,2],[116,5,96,3],[116,6,96,4],[117,4,97,2,"React"],[117,9,97,7],[117,10,97,8,"useEffect"],[117,19,97,17],[117,20,97,18],[117,26,97,24,"addListenerParent"],[117,43,97,41],[117,46,97,44],[117,54,97,52],[117,56,97,54,"onAction"],[117,64,97,62],[117,65,97,63],[117,67,97,65],[117,68,97,66,"addListenerParent"],[117,85,97,83],[117,87,97,85,"onAction"],[117,95,97,93],[117,96,97,94],[117,97,97,95],[118,4,98,2],[118,11,98,9,"onAction"],[118,19,98,17],[119,2,99,0],[120,0,99,1],[120,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"}]} |