mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 19:11:02 +00:00
1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
{"dependencies":[{"name":"@react-navigation/core","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":15},"end":{"line":3,"column":196,"index":211}}],"key":"Wm75LgE4xYscVWo0KoLFlflJQCo=","exportNames":["*"]}},{"name":"react","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":4,"column":0,"index":212},"end":{"line":4,"column":31,"index":243}}],"key":"RtGiGa+/H7VrI7GDQDLhO1UbpU8=","exportNames":["*"]}},{"name":"./LinkingContext.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":5,"column":0,"index":244},"end":{"line":5,"column":53,"index":297}}],"key":"r/0Yvi+HouDAqn4vN4m4I6AMfEI=","exportNames":["*"]}}],"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 exports.useLinkBuilder = useLinkBuilder;\n var _core = require(_dependencyMap[0], \"@react-navigation/core\");\n var React = _interopRequireWildcard(require(_dependencyMap[1], \"react\"));\n var _LinkingContext = require(_dependencyMap[2], \"./LinkingContext.js\");\n function _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n /**\n * Helpers to build href or action based on the linking options.\n *\n * @returns `buildHref` to build an `href` for screen and `buildAction` to build an action from an `href`.\n */\n function useLinkBuilder() {\n const navigation = React.useContext(_core.NavigationHelpersContext);\n const route = React.useContext(_core.NavigationRouteContext);\n const {\n options\n } = React.useContext(_LinkingContext.LinkingContext);\n const focusedRouteState = (0, _core.useStateForPath)();\n const getPathFromStateHelper = options?.getPathFromState ?? _core.getPathFromState;\n const getStateFromPathHelper = options?.getStateFromPath ?? _core.getStateFromPath;\n const getActionFromStateHelper = options?.getActionFromState ?? _core.getActionFromState;\n const buildHref = React.useCallback((name, params) => {\n if (options?.enabled === false) {\n return undefined;\n }\n\n // Check that we're inside:\n // - navigator's context\n // - route context of the navigator (could be a screen, tab, etc.)\n // - route matches the state for path (from the screen's context)\n // This ensures that we're inside a screen\n const isScreen = navigation && route?.key && focusedRouteState ? route.key === (0, _core.findFocusedRoute)(focusedRouteState)?.key && navigation.getState().routes.some(r => r.key === route.key) : false;\n const stateForRoute = {\n routes: [{\n name,\n params\n }]\n };\n const constructState = state => {\n if (state) {\n const route = state.routes[0];\n\n // If we're inside a screen and at the innermost route\n // We need to replace the state with the provided one\n // This assumes that we're navigating to a sibling route\n if (isScreen && !route.state) {\n return stateForRoute;\n }\n\n // Otherwise, dive into the nested state of the route\n return {\n routes: [{\n ...route,\n state: constructState(route.state)\n }]\n };\n }\n\n // Once there is no more nested state, we're at the innermost route\n // We can add a state based on provided parameters\n // This assumes that we're navigating to a child of this route\n // In this case, the helper is used in a navigator for its routes\n return stateForRoute;\n };\n const state = constructState(focusedRouteState);\n const path = getPathFromStateHelper(state, options?.config);\n return path;\n }, [options?.enabled, options?.config, route?.key, navigation, focusedRouteState, getPathFromStateHelper]);\n const buildAction = React.useCallback(href => {\n if (!href.startsWith('/')) {\n throw new Error(`The href must start with '/' (${href}).`);\n }\n const state = getStateFromPathHelper(href, options?.config);\n if (state) {\n const action = getActionFromStateHelper(state, options?.config);\n return action ?? _core.CommonActions.reset(state);\n } else {\n throw new Error('Failed to parse the href to a navigation state.');\n }\n }, [options?.config, getStateFromPathHelper, getActionFromStateHelper]);\n return {\n buildHref,\n buildAction\n };\n }\n});","lineCount":91,"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,"exports"],[7,9,1,13],[7,10,1,13,"useLinkBuilder"],[7,24,1,13],[7,27,1,13,"useLinkBuilder"],[7,41,1,13],[8,2,3,0],[8,6,3,0,"_core"],[8,11,3,0],[8,14,3,0,"require"],[8,21,3,0],[8,22,3,0,"_dependencyMap"],[8,36,3,0],[9,2,4,0],[9,6,4,0,"React"],[9,11,4,0],[9,14,4,0,"_interopRequireWildcard"],[9,37,4,0],[9,38,4,0,"require"],[9,45,4,0],[9,46,4,0,"_dependencyMap"],[9,60,4,0],[10,2,5,0],[10,6,5,0,"_LinkingContext"],[10,21,5,0],[10,24,5,0,"require"],[10,31,5,0],[10,32,5,0,"_dependencyMap"],[10,46,5,0],[11,2,5,53],[11,11,5,53,"_interopRequireWildcard"],[11,35,5,53,"e"],[11,36,5,53],[11,38,5,53,"t"],[11,39,5,53],[11,68,5,53,"WeakMap"],[11,75,5,53],[11,81,5,53,"r"],[11,82,5,53],[11,89,5,53,"WeakMap"],[11,96,5,53],[11,100,5,53,"n"],[11,101,5,53],[11,108,5,53,"WeakMap"],[11,115,5,53],[11,127,5,53,"_interopRequireWildcard"],[11,150,5,53],[11,162,5,53,"_interopRequireWildcard"],[11,163,5,53,"e"],[11,164,5,53],[11,166,5,53,"t"],[11,167,5,53],[11,176,5,53,"t"],[11,177,5,53],[11,181,5,53,"e"],[11,182,5,53],[11,186,5,53,"e"],[11,187,5,53],[11,188,5,53,"__esModule"],[11,198,5,53],[11,207,5,53,"e"],[11,208,5,53],[11,214,5,53,"o"],[11,215,5,53],[11,217,5,53,"i"],[11,218,5,53],[11,220,5,53,"f"],[11,221,5,53],[11,226,5,53,"__proto__"],[11,235,5,53],[11,243,5,53,"default"],[11,250,5,53],[11,252,5,53,"e"],[11,253,5,53],[11,270,5,53,"e"],[11,271,5,53],[11,294,5,53,"e"],[11,295,5,53],[11,320,5,53,"e"],[11,321,5,53],[11,330,5,53,"f"],[11,331,5,53],[11,337,5,53,"o"],[11,338,5,53],[11,341,5,53,"t"],[11,342,5,53],[11,345,5,53,"n"],[11,346,5,53],[11,349,5,53,"r"],[11,350,5,53],[11,358,5,53,"o"],[11,359,5,53],[11,360,5,53,"has"],[11,363,5,53],[11,364,5,53,"e"],[11,365,5,53],[11,375,5,53,"o"],[11,376,5,53],[11,377,5,53,"get"],[11,380,5,53],[11,381,5,53,"e"],[11,382,5,53],[11,385,5,53,"o"],[11,386,5,53],[11,387,5,53,"set"],[11,390,5,53],[11,391,5,53,"e"],[11,392,5,53],[11,394,5,53,"f"],[11,395,5,53],[11,411,5,53,"t"],[11,412,5,53],[11,416,5,53,"e"],[11,417,5,53],[11,433,5,53,"t"],[11,434,5,53],[11,441,5,53,"hasOwnProperty"],[11,455,5,53],[11,456,5,53,"call"],[11,460,5,53],[11,461,5,53,"e"],[11,462,5,53],[11,464,5,53,"t"],[11,465,5,53],[11,472,5,53,"i"],[11,473,5,53],[11,477,5,53,"o"],[11,478,5,53],[11,481,5,53,"Object"],[11,487,5,53],[11,488,5,53,"defineProperty"],[11,502,5,53],[11,507,5,53,"Object"],[11,513,5,53],[11,514,5,53,"getOwnPropertyDescriptor"],[11,538,5,53],[11,539,5,53,"e"],[11,540,5,53],[11,542,5,53,"t"],[11,543,5,53],[11,550,5,53,"i"],[11,551,5,53],[11,552,5,53,"get"],[11,555,5,53],[11,559,5,53,"i"],[11,560,5,53],[11,561,5,53,"set"],[11,564,5,53],[11,568,5,53,"o"],[11,569,5,53],[11,570,5,53,"f"],[11,571,5,53],[11,573,5,53,"t"],[11,574,5,53],[11,576,5,53,"i"],[11,577,5,53],[11,581,5,53,"f"],[11,582,5,53],[11,583,5,53,"t"],[11,584,5,53],[11,588,5,53,"e"],[11,589,5,53],[11,590,5,53,"t"],[11,591,5,53],[11,602,5,53,"f"],[11,603,5,53],[11,608,5,53,"e"],[11,609,5,53],[11,611,5,53,"t"],[11,612,5,53],[12,2,6,0],[13,0,7,0],[14,0,8,0],[15,0,9,0],[16,0,10,0],[17,2,11,7],[17,11,11,16,"useLinkBuilder"],[17,25,11,30,"useLinkBuilder"],[17,26,11,30],[17,28,11,33],[18,4,12,2],[18,10,12,8,"navigation"],[18,20,12,18],[18,23,12,21,"React"],[18,28,12,26],[18,29,12,27,"useContext"],[18,39,12,37],[18,40,12,38,"NavigationHelpersContext"],[18,70,12,62],[18,71,12,63],[19,4,13,2],[19,10,13,8,"route"],[19,15,13,13],[19,18,13,16,"React"],[19,23,13,21],[19,24,13,22,"useContext"],[19,34,13,32],[19,35,13,33,"NavigationRouteContext"],[19,63,13,55],[19,64,13,56],[20,4,14,2],[20,10,14,8],[21,6,15,4,"options"],[22,4,16,2],[22,5,16,3],[22,8,16,6,"React"],[22,13,16,11],[22,14,16,12,"useContext"],[22,24,16,22],[22,25,16,23,"LinkingContext"],[22,55,16,37],[22,56,16,38],[23,4,17,2],[23,10,17,8,"focusedRouteState"],[23,27,17,25],[23,30,17,28],[23,34,17,28,"useStateForPath"],[23,55,17,43],[23,57,17,44],[23,58,17,45],[24,4,18,2],[24,10,18,8,"getPathFromStateHelper"],[24,32,18,30],[24,35,18,33,"options"],[24,42,18,40],[24,44,18,42,"getPathFromState"],[24,60,18,58],[24,64,18,62,"getPathFromState"],[24,86,18,78],[25,4,19,2],[25,10,19,8,"getStateFromPathHelper"],[25,32,19,30],[25,35,19,33,"options"],[25,42,19,40],[25,44,19,42,"getStateFromPath"],[25,60,19,58],[25,64,19,62,"getStateFromPath"],[25,86,19,78],[26,4,20,2],[26,10,20,8,"getActionFromStateHelper"],[26,34,20,32],[26,37,20,35,"options"],[26,44,20,42],[26,46,20,44,"getActionFromState"],[26,64,20,62],[26,68,20,66,"getActionFromState"],[26,92,20,84],[27,4,21,2],[27,10,21,8,"buildHref"],[27,19,21,17],[27,22,21,20,"React"],[27,27,21,25],[27,28,21,26,"useCallback"],[27,39,21,37],[27,40,21,38],[27,41,21,39,"name"],[27,45,21,43],[27,47,21,45,"params"],[27,53,21,51],[27,58,21,56],[28,6,22,4],[28,10,22,8,"options"],[28,17,22,15],[28,19,22,17,"enabled"],[28,26,22,24],[28,31,22,29],[28,36,22,34],[28,38,22,36],[29,8,23,6],[29,15,23,13,"undefined"],[29,24,23,22],[30,6,24,4],[32,6,26,4],[33,6,27,4],[34,6,28,4],[35,6,29,4],[36,6,30,4],[37,6,31,4],[37,12,31,10,"isScreen"],[37,20,31,18],[37,23,31,21,"navigation"],[37,33,31,31],[37,37,31,35,"route"],[37,42,31,40],[37,44,31,42,"key"],[37,47,31,45],[37,51,31,49,"focusedRouteState"],[37,68,31,66],[37,71,31,69,"route"],[37,76,31,74],[37,77,31,75,"key"],[37,80,31,78],[37,85,31,83],[37,89,31,83,"findFocusedRoute"],[37,111,31,99],[37,113,31,100,"focusedRouteState"],[37,130,31,117],[37,131,31,118],[37,133,31,120,"key"],[37,136,31,123],[37,140,31,127,"navigation"],[37,150,31,137],[37,151,31,138,"getState"],[37,159,31,146],[37,160,31,147],[37,161,31,148],[37,162,31,149,"routes"],[37,168,31,155],[37,169,31,156,"some"],[37,173,31,160],[37,174,31,161,"r"],[37,175,31,162],[37,179,31,166,"r"],[37,180,31,167],[37,181,31,168,"key"],[37,184,31,171],[37,189,31,176,"route"],[37,194,31,181],[37,195,31,182,"key"],[37,198,31,185],[37,199,31,186],[37,202,31,189],[37,207,31,194],[38,6,32,4],[38,12,32,10,"stateForRoute"],[38,25,32,23],[38,28,32,26],[39,8,33,6,"routes"],[39,14,33,12],[39,16,33,14],[39,17,33,15],[40,10,34,8,"name"],[40,14,34,12],[41,10,35,8,"params"],[42,8,36,6],[42,9,36,7],[43,6,37,4],[43,7,37,5],[44,6,38,4],[44,12,38,10,"constructState"],[44,26,38,24],[44,29,38,27,"state"],[44,34,38,32],[44,38,38,36],[45,8,39,6],[45,12,39,10,"state"],[45,17,39,15],[45,19,39,17],[46,10,40,8],[46,16,40,14,"route"],[46,21,40,19],[46,24,40,22,"state"],[46,29,40,27],[46,30,40,28,"routes"],[46,36,40,34],[46,37,40,35],[46,38,40,36],[46,39,40,37],[48,10,42,8],[49,10,43,8],[50,10,44,8],[51,10,45,8],[51,14,45,12,"isScreen"],[51,22,45,20],[51,26,45,24],[51,27,45,25,"route"],[51,32,45,30],[51,33,45,31,"state"],[51,38,45,36],[51,40,45,38],[52,12,46,10],[52,19,46,17,"stateForRoute"],[52,32,46,30],[53,10,47,8],[55,10,49,8],[56,10,50,8],[56,17,50,15],[57,12,51,10,"routes"],[57,18,51,16],[57,20,51,18],[57,21,51,19],[58,14,52,12],[58,17,52,15,"route"],[58,22,52,20],[59,14,53,12,"state"],[59,19,53,17],[59,21,53,19,"constructState"],[59,35,53,33],[59,36,53,34,"route"],[59,41,53,39],[59,42,53,40,"state"],[59,47,53,45],[60,12,54,10],[60,13,54,11],[61,10,55,8],[61,11,55,9],[62,8,56,6],[64,8,58,6],[65,8,59,6],[66,8,60,6],[67,8,61,6],[68,8,62,6],[68,15,62,13,"stateForRoute"],[68,28,62,26],[69,6,63,4],[69,7,63,5],[70,6,64,4],[70,12,64,10,"state"],[70,17,64,15],[70,20,64,18,"constructState"],[70,34,64,32],[70,35,64,33,"focusedRouteState"],[70,52,64,50],[70,53,64,51],[71,6,65,4],[71,12,65,10,"path"],[71,16,65,14],[71,19,65,17,"getPathFromStateHelper"],[71,41,65,39],[71,42,65,40,"state"],[71,47,65,45],[71,49,65,47,"options"],[71,56,65,54],[71,58,65,56,"config"],[71,64,65,62],[71,65,65,63],[72,6,66,4],[72,13,66,11,"path"],[72,17,66,15],[73,4,67,2],[73,5,67,3],[73,7,67,5],[73,8,67,6,"options"],[73,15,67,13],[73,17,67,15,"enabled"],[73,24,67,22],[73,26,67,24,"options"],[73,33,67,31],[73,35,67,33,"config"],[73,41,67,39],[73,43,67,41,"route"],[73,48,67,46],[73,50,67,48,"key"],[73,53,67,51],[73,55,67,53,"navigation"],[73,65,67,63],[73,67,67,65,"focusedRouteState"],[73,84,67,82],[73,86,67,84,"getPathFromStateHelper"],[73,108,67,106],[73,109,67,107],[73,110,67,108],[74,4,68,2],[74,10,68,8,"buildAction"],[74,21,68,19],[74,24,68,22,"React"],[74,29,68,27],[74,30,68,28,"useCallback"],[74,41,68,39],[74,42,68,40,"href"],[74,46,68,44],[74,50,68,48],[75,6,69,4],[75,10,69,8],[75,11,69,9,"href"],[75,15,69,13],[75,16,69,14,"startsWith"],[75,26,69,24],[75,27,69,25],[75,30,69,28],[75,31,69,29],[75,33,69,31],[76,8,70,6],[76,14,70,12],[76,18,70,16,"Error"],[76,23,70,21],[76,24,70,22],[76,57,70,55,"href"],[76,61,70,59],[76,65,70,63],[76,66,70,64],[77,6,71,4],[78,6,72,4],[78,12,72,10,"state"],[78,17,72,15],[78,20,72,18,"getStateFromPathHelper"],[78,42,72,40],[78,43,72,41,"href"],[78,47,72,45],[78,49,72,47,"options"],[78,56,72,54],[78,58,72,56,"config"],[78,64,72,62],[78,65,72,63],[79,6,73,4],[79,10,73,8,"state"],[79,15,73,13],[79,17,73,15],[80,8,74,6],[80,14,74,12,"action"],[80,20,74,18],[80,23,74,21,"getActionFromStateHelper"],[80,47,74,45],[80,48,74,46,"state"],[80,53,74,51],[80,55,74,53,"options"],[80,62,74,60],[80,64,74,62,"config"],[80,70,74,68],[80,71,74,69],[81,8,75,6],[81,15,75,13,"action"],[81,21,75,19],[81,25,75,23,"CommonActions"],[81,44,75,36],[81,45,75,37,"reset"],[81,50,75,42],[81,51,75,43,"state"],[81,56,75,48],[81,57,75,49],[82,6,76,4],[82,7,76,5],[82,13,76,11],[83,8,77,6],[83,14,77,12],[83,18,77,16,"Error"],[83,23,77,21],[83,24,77,22],[83,73,77,71],[83,74,77,72],[84,6,78,4],[85,4,79,2],[85,5,79,3],[85,7,79,5],[85,8,79,6,"options"],[85,15,79,13],[85,17,79,15,"config"],[85,23,79,21],[85,25,79,23,"getStateFromPathHelper"],[85,47,79,45],[85,49,79,47,"getActionFromStateHelper"],[85,73,79,71],[85,74,79,72],[85,75,79,73],[86,4,80,2],[86,11,80,9],[87,6,81,4,"buildHref"],[87,15,81,13],[88,6,82,4,"buildAction"],[89,4,83,2],[89,5,83,3],[90,2,84,0],[91,0,84,1],[91,3]],"functionMap":{"names":["<global>","useLinkBuilder","buildHref","navigation.getState.routes.some$argument_0","constructState","buildAction"],"mappings":"AAA;OCU;sCCU;iKCU,wBD;2BEO;KFyB;GDI;wCIC;GJW;CDK"}},"type":"js/module"}]} |