one 2.23.0 → 2.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/fork/getPathFromState.cjs +2 -1
- package/dist/cjs/fork/getPathFromState.native.cjs +4 -1
- package/dist/cjs/fork/getPathFromState.native.js +4 -1
- package/dist/cjs/fork/getPathFromState.native.js.map +1 -1
- package/dist/cjs/router/router.cjs +1 -1
- package/dist/cjs/router/router.native.cjs +1 -1
- package/dist/cjs/router/router.native.js +1 -1
- package/dist/cjs/router/router.native.js.map +1 -1
- package/dist/esm/fork/getPathFromState.mjs +2 -1
- package/dist/esm/fork/getPathFromState.mjs.map +1 -1
- package/dist/esm/fork/getPathFromState.native.js +4 -1
- package/dist/esm/fork/getPathFromState.native.js.map +1 -1
- package/dist/esm/router/router.mjs +2 -2
- package/dist/esm/router/router.mjs.map +1 -1
- package/dist/esm/router/router.native.js +2 -2
- package/dist/esm/router/router.native.js.map +1 -1
- package/ios/OneNativeSlot.swift +17 -0
- package/package.json +13 -13
- package/src/fork/getPathFromState.test.ts +20 -0
- package/src/fork/getPathFromState.ts +8 -2
- package/src/router/linkToColdRoute.test.ts +61 -1
- package/src/router/router.ts +2 -7
- package/types/fork/getPathFromState.d.ts.map +1 -1
- package/types/router/router.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPathFromState.native.js","names":[],"sources":["esm/fork/getPathFromState.native.js"],"sourcesContent":["import * as sharedModUtils from \"./_shared\";\nimport { appendBaseUrl, getPathWithConventionsCollapsed } from \"./getPathFromState-mods\";\nimport { validatePathConfig } from \"./validatePathConfig\";\nvar NAV_PARAM_SCREEN = \"screen\";\nvar NAV_PARAM_PARAMS = \"params\";\nvar NAV_PARAM_KEY = \"key\";\nvar getActiveRoute = function getActiveRoute1(state) {\n var route = typeof state.index === \"number\" ? state.routes[state.index] : state.routes[state.routes.length - 1];\n if (route.state) {\n return getActiveRoute(route.state);\n }\n return route;\n};\nvar cachedNormalizedConfigs = /* @__PURE__ */ new WeakMap();\nvar getNormalizedConfigs = function getNormalizedConfigs2(options) {\n if (!(options === null || options === void 0 ? void 0 : options.screens)) return {};\n var cached = cachedNormalizedConfigs.get(options === null || options === void 0 ? void 0 : options.screens);\n if (cached) return cached;\n var normalizedConfigs = createNormalizedConfigs(options.screens);\n cachedNormalizedConfigs.set(options.screens, normalizedConfigs);\n return normalizedConfigs;\n};\nfunction getPathFromState(state, options) {\n return getPathDataFromState(state, options).path;\n}\nfunction getPathDataFromState(state, options) {\n var _loop = function() {\n var _loop2 = function() {\n pattern = currentOptions[route.name].pattern;\n nestedRouteNames.push(route.name);\n if (route.params) {\n var _currentOptions_route_name;\n var stringify = (_currentOptions_route_name = currentOptions[route.name]) === null || _currentOptions_route_name === void 0 ? void 0 : _currentOptions_route_name.stringify;\n var currentParams = Object.fromEntries(Object.entries(route.params).flatMap(function(param2) {\n var [key2, value2] = param2;\n if (key2 === NAV_PARAM_SCREEN || key2 === NAV_PARAM_PARAMS || key2 === NAV_PARAM_KEY) {\n return [];\n }\n return [\n [\n key2,\n (stringify === null || stringify === void 0 ? void 0 : stringify[key2]) ? stringify[key2](value2) : Array.isArray(value2) ? value2.map(String) : typeof value2 === \"undefined\" ? value2 : String(value2)\n ]\n ];\n }));\n Object.assign(allParams, currentParams);\n if (focusedRoute === route) {\n focusedParams = {\n ...currentParams\n };\n pattern === null || pattern === void 0 ? void 0 : pattern.split(\"/\").filter(function(p) {\n return sharedModUtils.isDynamicPart(p);\n }).forEach(function(p) {\n var name = sharedModUtils.getParamName(p);\n if (focusedParams) {\n delete focusedParams[name];\n }\n });\n }\n }\n if (!currentOptions[route.name].screens || route.state === void 0) {\n var _route_params_NAV_PARAM_SCREEN, _currentOptions_route_name_screens;\n var screens = currentOptions[route.name].screens;\n var screen = route.params && NAV_PARAM_SCREEN in route.params ? (_route_params_NAV_PARAM_SCREEN = route.params[NAV_PARAM_SCREEN]) === null || _route_params_NAV_PARAM_SCREEN === void 0 ? void 0 : _route_params_NAV_PARAM_SCREEN.toString() : screens ? Object.keys(screens)[0] : void 0;\n if (screen && screens && ((_currentOptions_route_name_screens = currentOptions[route.name].screens) === null || _currentOptions_route_name_screens === void 0 ? void 0 : _currentOptions_route_name_screens[screen])) {\n var _route_params;\n route = {\n ...screens[screen],\n name: screen,\n key: screen,\n params: (_route_params = route.params) === null || _route_params === void 0 ? void 0 : _route_params[NAV_PARAM_PARAMS]\n };\n currentOptions = screens;\n } else {\n hasNext = false;\n }\n } else {\n index = typeof route.state.index === \"number\" ? route.state.index : route.state.routes.length - 1;\n var nextRoute = route.state.routes[index];\n var nestedConfig = currentOptions[route.name].screens;\n if (nestedConfig && nextRoute.name in nestedConfig) {\n route = nextRoute;\n currentOptions = nestedConfig;\n } else {\n hasNext = false;\n }\n }\n };\n var _current_routes;\n if (!((_current_routes = current.routes) === null || _current_routes === void 0 ? void 0 : _current_routes.length)) {\n return \"break\";\n }\n var index = typeof current.index === \"number\" ? current.index : 0;\n var route = current.routes[index];\n var pattern = void 0;\n var focusedParams = void 0;\n var focusedRoute = getActiveRoute(state);\n var currentOptions = configs;\n var nestedRouteNames = [];\n var hasNext = true;\n while (route.name in currentOptions && hasNext) _loop2();\n if (currentOptions[route.name] !== void 0) {\n var _configs_route_name;\n if (pattern === void 0) {\n pattern = nestedRouteNames.join(\"/\");\n }\n path += getPathWithConventionsCollapsed({\n ...options,\n pattern,\n route,\n params: allParams,\n initialRouteName: (_configs_route_name = configs[route.name]) === null || _configs_route_name === void 0 ? void 0 : _configs_route_name.initialRouteName\n });\n } else if (!route.name.startsWith(\"+\")) {\n path += encodeURIComponent(route.name);\n }\n if (!focusedParams) {\n focusedParams = {\n ...focusedRoute.params\n };\n }\n if (route.state) {\n path += \"/\";\n } else if (focusedParams) {\n for (var param in focusedParams) {\n if (focusedParams[param] === \"undefined\") {\n delete focusedParams[param];\n }\n }\n delete focusedParams[\"#\"];\n var queryParams = new URLSearchParams();\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.entries(focusedParams)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [key, value] = _step.value;\n if (Array.isArray(value)) {\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = value[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var item = _step1.value;\n queryParams.append(key, String(item));\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\n } else {\n queryParams.append(key, String(value));\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n var query = queryParams.toString();\n if (query) {\n path += `?${query}`;\n }\n }\n current = route.state;\n };\n if (state == null) {\n throw Error(\"Got 'undefined' for the navigation state. You must pass a valid state object.\");\n }\n if (options) {\n validatePathConfig(options);\n }\n var configs = getNormalizedConfigs(options);\n var path = \"/\";\n var current = state;\n var allParams = {};\n while (current) {\n var _ret = _loop();\n if (_ret === \"break\") break;\n }\n path = path.replace(/\\/+/g, \"/\");\n path = path.length > 1 ? path.replace(/\\/$/, \"\") : path;\n if (options === null || options === void 0 ? void 0 : options.path) {\n path = joinPaths(options.path, path);\n }\n path = appendBaseUrl(path);\n if (allParams[\"#\"]) {\n path += `#${allParams[\"#\"]}`;\n }\n return {\n path,\n params: allParams\n };\n}\nvar joinPaths = function joinPaths2() {\n for (var _len = arguments.length, paths = new Array(_len), _key = 0; _key < _len; _key++) {\n paths[_key] = arguments[_key];\n }\n return [].concat(...paths.map(function(p) {\n return p.split(\"/\");\n })).filter(Boolean).join(\"/\");\n};\nvar createConfigItem = function createConfigItem2(config, parentPattern) {\n if (typeof config === \"string\") {\n var pattern = parentPattern ? joinPaths(parentPattern, config) : config;\n return {\n pattern\n };\n }\n if (config.exact && config.path === void 0) {\n throw new Error(\"A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.\");\n }\n var pattern1 = config.exact !== true ? joinPaths(parentPattern || \"\", config.path || \"\") : config.path || \"\";\n var screens = config.screens ? createNormalizedConfigs(config.screens, pattern1) : void 0;\n return {\n // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc.\n pattern: pattern1 === null || pattern1 === void 0 ? void 0 : pattern1.split(\"/\").filter(Boolean).join(\"/\"),\n stringify: config.stringify,\n screens\n };\n};\nvar createNormalizedConfigs = function createNormalizedConfigs2(options, pattern) {\n return Object.fromEntries(Object.entries(options).map(function(param) {\n var [name, c] = param;\n var result = createConfigItem(c, pattern);\n return [\n name,\n result\n ];\n }));\n};\nvar getPathFromState_default = getPathFromState;\nexport {\n getPathFromState_default as default,\n getPathDataFromState,\n getPathFromState\n};\n//# sourceMappingURL=getPathFromState.js.map\n"],"mappings":";;;;;AAGA,IAAI,mBAAmB;AACvB,IAAI,mBAAmB;AACvB,IAAI,gBAAgB;AACpB,IAAI,iBAAiB,SAAS,gBAAgB,OAAO;CACnD,IAAI,QAAQ,OAAO,MAAM,UAAU,WAAW,MAAM,OAAO,MAAM,SAAS,MAAM,OAAO,MAAM,OAAO,SAAS;CAC7G,IAAI,MAAM,OAAO;EACf,OAAO,eAAe,MAAM,KAAK;CACnC;CACA,OAAO;AACT;AACA,IAAI,0CAA0C,IAAI,QAAQ;AAC1D,IAAI,uBAAuB,SAAS,sBAAsB,SAAS;CACjE,IAAI,EAAE,YAAY,QAAQ,YAAY,KAAK,IAAI,KAAK,IAAI,QAAQ,UAAU,OAAO,CAAC;C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"}
|
|
1
|
+
{"version":3,"file":"getPathFromState.native.js","names":[],"sources":["esm/fork/getPathFromState.native.js"],"sourcesContent":["import * as sharedModUtils from \"./_shared\";\nimport { appendBaseUrl, getPathWithConventionsCollapsed } from \"./getPathFromState-mods\";\nimport { validatePathConfig } from \"./validatePathConfig\";\nvar NAV_PARAM_SCREEN = \"screen\";\nvar NAV_PARAM_PARAMS = \"params\";\nvar NAV_PARAM_KEY = \"key\";\nvar getActiveRoute = function getActiveRoute1(state) {\n var route = typeof state.index === \"number\" ? state.routes[state.index] : state.routes[state.routes.length - 1];\n if (route.state) {\n return getActiveRoute(route.state);\n }\n return route;\n};\nvar cachedNormalizedConfigs = /* @__PURE__ */ new WeakMap();\nvar getNormalizedConfigs = function getNormalizedConfigs2(options) {\n if (!(options === null || options === void 0 ? void 0 : options.screens)) return {};\n var cached = cachedNormalizedConfigs.get(options === null || options === void 0 ? void 0 : options.screens);\n if (cached) return cached;\n var normalizedConfigs = createNormalizedConfigs(options.screens);\n cachedNormalizedConfigs.set(options.screens, normalizedConfigs);\n return normalizedConfigs;\n};\nfunction getPathFromState(state, options) {\n return getPathDataFromState(state, options).path;\n}\nfunction getPathDataFromState(state, options) {\n var _loop = function() {\n var _loop2 = function() {\n pattern = currentOptions[route.name].pattern;\n nestedRouteNames.push(route.name);\n if (route.params) {\n var _currentOptions_route_name;\n var stringify = (_currentOptions_route_name = currentOptions[route.name]) === null || _currentOptions_route_name === void 0 ? void 0 : _currentOptions_route_name.stringify;\n var hasKeySegment = pattern === null || pattern === void 0 ? void 0 : pattern.split(\"/\").some(function(part) {\n return sharedModUtils.isDynamicPart(part) && sharedModUtils.getParamName(part) === NAV_PARAM_KEY;\n });\n var currentParams = Object.fromEntries(Object.entries(route.params).flatMap(function(param2) {\n var [key2, value2] = param2;\n if (key2 === NAV_PARAM_SCREEN || key2 === NAV_PARAM_PARAMS || key2 === NAV_PARAM_KEY && !hasKeySegment) {\n return [];\n }\n return [\n [\n key2,\n (stringify === null || stringify === void 0 ? void 0 : stringify[key2]) ? stringify[key2](value2) : Array.isArray(value2) ? value2.map(String) : typeof value2 === \"undefined\" ? value2 : String(value2)\n ]\n ];\n }));\n Object.assign(allParams, currentParams);\n if (focusedRoute === route) {\n focusedParams = {\n ...currentParams\n };\n pattern === null || pattern === void 0 ? void 0 : pattern.split(\"/\").filter(function(p) {\n return sharedModUtils.isDynamicPart(p);\n }).forEach(function(p) {\n var name = sharedModUtils.getParamName(p);\n if (focusedParams) {\n delete focusedParams[name];\n }\n });\n }\n }\n if (!currentOptions[route.name].screens || route.state === void 0) {\n var _route_params_NAV_PARAM_SCREEN, _currentOptions_route_name_screens;\n var screens = currentOptions[route.name].screens;\n var screen = route.params && NAV_PARAM_SCREEN in route.params ? (_route_params_NAV_PARAM_SCREEN = route.params[NAV_PARAM_SCREEN]) === null || _route_params_NAV_PARAM_SCREEN === void 0 ? void 0 : _route_params_NAV_PARAM_SCREEN.toString() : screens ? Object.keys(screens)[0] : void 0;\n if (screen && screens && ((_currentOptions_route_name_screens = currentOptions[route.name].screens) === null || _currentOptions_route_name_screens === void 0 ? void 0 : _currentOptions_route_name_screens[screen])) {\n var _route_params;\n route = {\n ...screens[screen],\n name: screen,\n key: screen,\n params: (_route_params = route.params) === null || _route_params === void 0 ? void 0 : _route_params[NAV_PARAM_PARAMS]\n };\n currentOptions = screens;\n } else {\n hasNext = false;\n }\n } else {\n index = typeof route.state.index === \"number\" ? route.state.index : route.state.routes.length - 1;\n var nextRoute = route.state.routes[index];\n var nestedConfig = currentOptions[route.name].screens;\n if (nestedConfig && nextRoute.name in nestedConfig) {\n route = nextRoute;\n currentOptions = nestedConfig;\n } else {\n hasNext = false;\n }\n }\n };\n var _current_routes;\n if (!((_current_routes = current.routes) === null || _current_routes === void 0 ? void 0 : _current_routes.length)) {\n return \"break\";\n }\n var index = typeof current.index === \"number\" ? current.index : 0;\n var route = current.routes[index];\n var pattern = void 0;\n var focusedParams = void 0;\n var focusedRoute = getActiveRoute(state);\n var currentOptions = configs;\n var nestedRouteNames = [];\n var hasNext = true;\n while (route.name in currentOptions && hasNext) _loop2();\n if (currentOptions[route.name] !== void 0) {\n var _configs_route_name;\n if (pattern === void 0) {\n pattern = nestedRouteNames.join(\"/\");\n }\n path += getPathWithConventionsCollapsed({\n ...options,\n pattern,\n route,\n params: allParams,\n initialRouteName: (_configs_route_name = configs[route.name]) === null || _configs_route_name === void 0 ? void 0 : _configs_route_name.initialRouteName\n });\n } else if (!route.name.startsWith(\"+\")) {\n path += encodeURIComponent(route.name);\n }\n if (!focusedParams) {\n focusedParams = {\n ...focusedRoute.params\n };\n }\n if (route.state) {\n path += \"/\";\n } else if (focusedParams) {\n for (var param in focusedParams) {\n if (focusedParams[param] === \"undefined\") {\n delete focusedParams[param];\n }\n }\n delete focusedParams[\"#\"];\n var queryParams = new URLSearchParams();\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.entries(focusedParams)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [key, value] = _step.value;\n if (Array.isArray(value)) {\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = value[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var item = _step1.value;\n queryParams.append(key, String(item));\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\n } else {\n queryParams.append(key, String(value));\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n var query = queryParams.toString();\n if (query) {\n path += `?${query}`;\n }\n }\n current = route.state;\n };\n if (state == null) {\n throw Error(\"Got 'undefined' for the navigation state. You must pass a valid state object.\");\n }\n if (options) {\n validatePathConfig(options);\n }\n var configs = getNormalizedConfigs(options);\n var path = \"/\";\n var current = state;\n var allParams = {};\n while (current) {\n var _ret = _loop();\n if (_ret === \"break\") break;\n }\n path = path.replace(/\\/+/g, \"/\");\n path = path.length > 1 ? path.replace(/\\/$/, \"\") : path;\n if (options === null || options === void 0 ? void 0 : options.path) {\n path = joinPaths(options.path, path);\n }\n path = appendBaseUrl(path);\n if (allParams[\"#\"]) {\n path += `#${allParams[\"#\"]}`;\n }\n return {\n path,\n params: allParams\n };\n}\nvar joinPaths = function joinPaths2() {\n for (var _len = arguments.length, paths = new Array(_len), _key = 0; _key < _len; _key++) {\n paths[_key] = arguments[_key];\n }\n return [].concat(...paths.map(function(p) {\n return p.split(\"/\");\n })).filter(Boolean).join(\"/\");\n};\nvar createConfigItem = function createConfigItem2(config, parentPattern) {\n if (typeof config === \"string\") {\n var pattern = parentPattern ? joinPaths(parentPattern, config) : config;\n return {\n pattern\n };\n }\n if (config.exact && config.path === void 0) {\n throw new Error(\"A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.\");\n }\n var pattern1 = config.exact !== true ? joinPaths(parentPattern || \"\", config.path || \"\") : config.path || \"\";\n var screens = config.screens ? createNormalizedConfigs(config.screens, pattern1) : void 0;\n return {\n // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc.\n pattern: pattern1 === null || pattern1 === void 0 ? void 0 : pattern1.split(\"/\").filter(Boolean).join(\"/\"),\n stringify: config.stringify,\n screens\n };\n};\nvar createNormalizedConfigs = function createNormalizedConfigs2(options, pattern) {\n return Object.fromEntries(Object.entries(options).map(function(param) {\n var [name, c] = param;\n var result = createConfigItem(c, pattern);\n return [\n name,\n result\n ];\n }));\n};\nvar getPathFromState_default = getPathFromState;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AgB,UAAU,eAAe,MAAM,IAAI;EACjE,OAAO,EACL,QACF;CACF;CACA,IAAI,OAAO,SAAS,OAAO,SAAS,KAAK,GAAG;EAC1C,MAAM,IAAI,MAAM,sJAAsJ;CACxK;CACA,IAAI,WAAW,OAAO,UAAU,OAAO,UAAU,iBAAiB,IAAI,OAAO,QAAQ,EAAE,IAAI,OAAO,QAAQ;CAC1G,IAAI,UAAU,OAAO,UAAU,wBAAwB,OAAO,SAAS,QAAQ,IAAI,KAAK;CACxF,OAAO;EAEL,SAAS,aAAa,QAAQ,aAAa,KAAK,IAAI,KAAK,IAAI,SAAS,MAAM,GAAG,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EACzG,WAAW,OAAO;EAClB;CACF;AACF;AACA,IAAI,0BAA0B,SAAS,yBAAyB,SAAS,SAAS;CAChF,OAAO,OAAO,YAAY,OAAO,QAAQ,OAAO,CAAC,CAAC,IAAI,SAAS,OAAO;EACpE,IAAI,CAAC,MAAM,KAAK;EAChB,IAAI,SAAS,iBAAiB,GAAG,OAAO;EACxC,OAAO,CACL,MACA,MACF;CACF,CAAC,CAAC;AACJ;AACA,IAAI,2BAA2B"}
|
|
@@ -20,7 +20,7 @@ import { getRoutes } from "./getRoutes.mjs";
|
|
|
20
20
|
import { setLastAction } from "./lastAction.mjs";
|
|
21
21
|
import { getResolvedLinking, resetLinking, setupLinking } from "./linkingConfig.mjs";
|
|
22
22
|
import { consumeWarmInitialNavigationState, isWarmStateEnabled, isWarmWebRestoreEligible, scheduleWarmStatePersist, shouldAttemptWarmRouteRestore, trackRestoredLaunch } from "./warmState.mjs";
|
|
23
|
-
import { getSafeWindowPath, getSafeWindowPathname, getSafeWindowPathname as getSafeWindowPathname2, normalizeRoutePathname
|
|
23
|
+
import { getSafeWindowPath, getSafeWindowPathname, getSafeWindowPathname as getSafeWindowPathname2, normalizeRoutePathname } from "./path.mjs";
|
|
24
24
|
import { sortRoutes } from "./sortRoutes.mjs";
|
|
25
25
|
import { getQualifiedRouteComponent } from "./useScreens.mjs";
|
|
26
26
|
import { preloadRouteModules } from "./useViteRoutes.mjs";
|
|
@@ -799,7 +799,7 @@ async function linkTo(href, event, options) {
|
|
|
799
799
|
if (currentRootState?.key && hash > 0) hashes[currentRootState.key] = href.slice(hash);
|
|
800
800
|
clearNotFoundState();
|
|
801
801
|
nextOptions = options ?? null;
|
|
802
|
-
pendingNavigationPathname =
|
|
802
|
+
pendingNavigationPathname = getRouteInfo(state).pathname;
|
|
803
803
|
pendingNavigationAction = event === "PUSH" || event === "REPLACE" || event === "NAVIGATE" ? event : void 0;
|
|
804
804
|
lastIntendedPathname = pendingNavigationPathname;
|
|
805
805
|
const freshRootState = navigationRef.getRootState();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.js","names":[],"sources":["esm/router/router.js"],"sourcesContent":["import { StackActions } from \"@react-navigation/native\";\nimport { Fragment, startTransition, useDeferredValue, useEffect, useReducer, useSyncExternalStore } from \"react\";\nimport { devtoolsRegistry } from \"../devtools/registry\";\nimport { resolveHref } from \"../link/href\";\nimport { openExternalURL } from \"../link/openExternalURL\";\nimport { resolve } from \"../link/path\";\nimport { checkBlocker } from \"../useBlocker\";\nimport { assertIsReady } from \"../utils/assertIsReady\";\nimport { getLoaderPath, getPreloadCSSPath, getPreloadPath, isLoaderBadRequest, splitLoaderKey, toLoaderKey } from \"../utils/cleanUrl\";\nimport { dynamicImport, isChunkLoadError } from \"../utils/dynamicImport\";\nimport { PLATFORM } from \"../utils/platform\";\nimport { isVersionStale } from \"../skewProtection\";\nimport { hasFileExtension, shouldLinkExternally, shouldPreloadRoute } from \"../utils/url\";\nimport { ParamValidationError, RouteValidationError, validateParams } from \"../validateParams\";\nimport { extractParamsFromState, extractPathnameFromHref, extractSearchFromHref, findRouteNodeFromState } from \"./findRouteNode\";\nimport { getRouteInfo } from \"./getRouteInfo\";\nimport { isStateAwaitingNavigatorMount } from \"./isStateAwaitingNavigatorMount\";\nimport { getRouteArtifactPaths } from \"./getRouteArtifactPath\";\nimport { getRoutes } from \"./getRoutes\";\nimport { setLastAction } from \"./lastAction\";\nimport { getResolvedLinking, resetLinking, setupLinking } from \"./linkingConfig\";\nimport { consumeWarmInitialNavigationState, isWarmStateEnabled, isWarmWebRestoreEligible, scheduleWarmStatePersist, shouldAttemptWarmRouteRestore, trackRestoredLaunch } from \"./warmState\";\nimport { getSafeWindowPath, getSafeWindowPathname, getSafeWindowPathname as getSafeWindowPathname2, normalizeRoutePathname, stripTrailingSlash } from \"./path\";\nimport { sortRoutes } from \"./sortRoutes\";\nimport { getQualifiedRouteComponent } from \"./useScreens\";\nimport { preloadRouteModules } from \"./useViteRoutes\";\nimport { getNavigateAction } from \"./utils/getNavigateAction\";\nimport { setClientMatches } from \"../useMatches\";\nimport { findInterceptRoute, setNavigationType, storeInterceptState, updateURLWithoutNavigation } from \"./interceptRoutes\";\nimport { setSlotState } from \"../views/Navigator\";\nimport { clearNotFoundState, findNearestNotFoundRoute, setNotFoundState } from \"../notFoundState\";\n\n// dist/esm/router/router.js?tamagui-build-prune\nlet routeNode = null;\nlet rootComponent;\nconst protectedRouteRegistry = /* @__PURE__ */ new Map();\nfunction registerProtectedRoutes(contextKey, guardedRedirects) {\n\tif (guardedRedirects.size === 0) protectedRouteRegistry.delete(contextKey);\n\telse protectedRouteRegistry.set(contextKey, guardedRedirects);\n}\nfunction unregisterProtectedRoutes(contextKey) {\n\tprotectedRouteRegistry.delete(contextKey);\n}\nfunction getProtectedRedirect(href) {\n\tconst normalizedHref = extractPathnameFromHref(href).replace(/^\\/+|\\/+$/g, \"\");\n\tfor (const [contextKey, guardedRedirects] of protectedRouteRegistry) {\n\t\tconst normalizedContextKey = contextKey.replace(/^\\/+|\\/+$/g, \"\");\n\t\tif (!normalizedContextKey || normalizedHref === normalizedContextKey || normalizedHref.startsWith(`${normalizedContextKey}/`)) {\n\t\t\tconst routeName = normalizedHref.slice(normalizedContextKey.length).replace(/^\\//, \"\").split(\"/\")[0] || \"index\";\n\t\t\tconst normalizedRouteName = routeName.replace(/\\/index$/, \"\");\n\t\t\tif (guardedRedirects.has(routeName)) return guardedRedirects.get(routeName);\n\t\t\tif (guardedRedirects.has(normalizedRouteName)) return guardedRedirects.get(normalizedRouteName);\n\t\t}\n\t}\n\treturn false;\n}\nfunction resolveProtectedHref(href) {\n\tlet target = href;\n\tconst visited = /* @__PURE__ */ new Set();\n\twhile (!visited.has(target)) {\n\t\tvisited.add(target);\n\t\tconst redirectTo = getProtectedRedirect(target);\n\t\tif (redirectTo === false) return target;\n\t\tif (redirectTo === void 0) return;\n\t\ttarget = resolveHref(redirectTo);\n\t}\n}\nfunction isRouteProtected(href) {\n\treturn getProtectedRedirect(href) !== false;\n}\nlet hasAttemptedToHideSplash = false;\nlet initialState;\nlet rootState;\nlet initialPathname;\nlet lastIntendedPathname;\nlet nextState;\nlet routeInfo;\nlet splashScreenAnimationFrame;\nlet pendingNavigationPathname;\nlet pendingNavigationAction;\nlet navigationRef = null;\nconst rootStateSubscribers = /* @__PURE__ */ new Set();\nconst loadingStateSubscribers = /* @__PURE__ */ new Set();\nconst storeSubscribers = /* @__PURE__ */ new Set();\nlet currentMatches = [];\nlet validationState = { status: \"idle\" };\nconst validationStateSubscribers = /* @__PURE__ */ new Set();\nfunction subscribeToValidationState(subscriber) {\n\tvalidationStateSubscribers.add(subscriber);\n\treturn () => validationStateSubscribers.delete(subscriber);\n}\nfunction setValidationState(state) {\n\tvalidationState = state;\n\tfor (const subscriber of validationStateSubscribers) subscriber(state);\n\tif (state.status === \"error\" && state.error) window.dispatchEvent(new CustomEvent(\"one-validation-error\", { detail: {\n\t\terror: {\n\t\t\tmessage: state.error.message,\n\t\t\tname: state.error.name,\n\t\t\tstack: state.error.stack\n\t\t},\n\t\thref: state.lastValidatedHref,\n\t\ttimestamp: Date.now()\n\t} }));\n}\nfunction getValidationState() {\n\treturn validationState;\n}\nfunction useValidationState() {\n\treturn useSyncExternalStore(subscribeToValidationState, getValidationState, getValidationState);\n}\nlet cachedRouteNode = null;\nlet cachedRootComponent = null;\nlet cachedContext = null;\nfunction initialize(context, ref, initialLocation, linking) {\n\tcleanUpState();\n\tif (context !== cachedContext || !cachedRouteNode) {\n\t\tcachedRouteNode = getRoutes(context, {\n\t\t\tignoreEntryPoints: true,\n\t\t\tplatform: PLATFORM\n\t\t});\n\t\tcachedRootComponent = cachedRouteNode ? getQualifiedRouteComponent(cachedRouteNode) : Fragment;\n\t\tcachedContext = context;\n\t}\n\trouteNode = cachedRouteNode;\n\trootComponent = cachedRootComponent || Fragment;\n\tif (!routeNode && process.env.NODE_ENV === \"production\") throw new Error(\"No routes found\");\n\tif (process.env.ONE_DEBUG_ROUTER && routeNode) {\n\t\tconst formatRouteTree = (node, indent = \"\", isLast = true) => {\n\t\t\tconst prefix = indent + (isLast ? \"└─ \" : \"├─ \");\n\t\t\tconst childIndent = indent + (isLast ? \" \" : \"│ \");\n\t\t\tconst dynamicBadge = node.dynamic ? ` [${node.dynamic.map((d) => d.name).join(\", \")}]` : \"\";\n\t\t\tconst typeBadge = node.type !== \"layout\" ? ` (${node.type})` : \"\";\n\t\t\tconst slotsBadge = node.slots?.size ? ` {@${Array.from(node.slots.keys()).join(\", @\")}}` : \"\";\n\t\t\tlet line = `${prefix}${node.route || \"/\"}${dynamicBadge}${typeBadge}${slotsBadge}`;\n\t\t\tconst visibleChildren = node.children.filter((child) => !child.internal);\n\t\t\tfor (let i = 0; i < visibleChildren.length; i++) {\n\t\t\t\tconst child = visibleChildren[i];\n\t\t\t\tconst childIsLast = i === visibleChildren.length - 1;\n\t\t\t\tline += \"\\n\" + formatRouteTree(child, childIndent, childIsLast);\n\t\t\t}\n\t\t\treturn line;\n\t\t};\n\t\tconsole.info(`[one] \\u{1F4CD} Route structure:\n${formatRouteTree(routeNode)}`);\n\t\tif (routeNode.slots?.size) {\n\t\t\tconsole.info(`[one] \\u{1F4E6} Slots on root layout:`);\n\t\t\tfor (const [slotName, slotConfig] of routeNode.slots) console.info(` @${slotName}:`, {\n\t\t\t\tdefaultRoute: slotConfig.defaultRoute?.route,\n\t\t\t\tinterceptRoutes: slotConfig.interceptRoutes.map((r) => ({\n\t\t\t\t\troute: r.route,\n\t\t\t\t\tintercept: r.intercept\n\t\t\t\t}))\n\t\t\t});\n\t\t}\n\t}\n\tnavigationRef = ref;\n\tsetupLinkingAndRouteInfo(initialLocation, linking);\n\tsubscribeToNavigationChanges();\n}\nfunction cleanUpState() {\n\tinitialState = void 0;\n\tinitialPathname = void 0;\n\tlastIntendedPathname = void 0;\n\trootState = void 0;\n\tnextState = void 0;\n\trouteInfo = void 0;\n\tpendingNavigationPathname = void 0;\n\tpendingNavigationAction = void 0;\n\tresetLinking();\n\trootStateSubscribers.clear();\n\tstoreSubscribers.clear();\n}\nfunction setupLinkingAndRouteInfo(initialLocation, linking) {\n\tinitialState = setupLinking(routeNode, initialLocation, linking);\n\tinitialPathname = initialLocation?.pathname ?? getSafeWindowPathname();\n\tif (shouldAttemptWarmRouteRestore(initialLocation)) {\n\t\tconst warmState = consumeWarmInitialNavigationState(routeNode, getResolvedLinking());\n\t\tif (warmState) initialState = warmState;\n\t}\n\tif (initialState) {\n\t\trootState = initialState;\n\t\trouteInfo = getRouteInfo(initialState);\n\t\tif (!initialLocation) initialPathname = routeInfo.pathname;\n\t\telse if (routeInfo.pathname && routeInfo.pathname !== initialLocation.pathname && isWarmWebRestoreEligible(initialLocation)) window.history.replaceState(window.history.state, \"\", routeInfo.unstable_globalHref || routeInfo.pathname);\n\t} else routeInfo = {\n\t\tunstable_globalHref: \"\",\n\t\tpathname: \"\",\n\t\tisIndex: false,\n\t\tparams: {},\n\t\tsegments: []\n\t};\n}\nfunction handleNavigationContainerStateChange(navState) {\n\tif (!navState) return;\n\tlet state = { ...navState };\n\tif (state.key) {\n\t\tif (hashes[state.key]) {\n\t\t\tstate.hash = hashes[state.key];\n\t\t\tdelete hashes[state.key];\n\t\t}\n\t}\n\tif (!hasAttemptedToHideSplash) {\n\t\thasAttemptedToHideSplash = true;\n\t\tsplashScreenAnimationFrame = requestAnimationFrame(() => {});\n\t}\n\tif (shouldKeepPendingNavigationState(state)) return;\n\tif (nextOptions) {\n\t\tstate = {\n\t\t\t...state,\n\t\t\tlinkOptions: nextOptions\n\t\t};\n\t\tnextOptions = null;\n\t}\n\tlet shouldUpdateSubscribers = nextState === state;\n\tnextState = void 0;\n\tif (state && state !== rootState) {\n\t\tupdateState(state, void 0);\n\t\tshouldUpdateSubscribers = true;\n\t\tif (isWarmStateEnabled()) {\n\t\t\ttrackRestoredLaunch(routeInfo?.pathname);\n\t\t\tscheduleWarmStatePersist(state, routeInfo?.pathname);\n\t\t}\n\t}\n\tif (shouldUpdateSubscribers) startTransition(() => {\n\t\tfor (const subscriber of rootStateSubscribers) subscriber(state);\n\t});\n}\nfunction subscribeToNavigationChanges() {\n\tstartTransition(() => {\n\t\tupdateSnapshot();\n\t\tfor (const subscriber of storeSubscribers) subscriber();\n\t});\n}\nfunction navigate(url, options) {\n\treturn linkTo(resolveHref(url), \"NAVIGATE\", options);\n}\nfunction push(url, options) {\n\treturn linkTo(resolveHref(url), \"PUSH\", options);\n}\nfunction dismiss(count) {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} dismiss${count ? ` (${count})` : \"\"}`);\n\tnavigationRef?.dispatch(StackActions.pop(count));\n}\nfunction replace(url, options) {\n\treturn linkTo(resolveHref(url), \"REPLACE\", options);\n}\nfunction setParams(params = {}) {\n\tassertIsReady(navigationRef);\n\treturn navigationRef?.current?.setParams(params);\n}\nfunction dismissAll() {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} dismissAll`);\n\tnavigationRef?.dispatch(StackActions.popToTop());\n}\nfunction resetToRoot() {\n\tconst linking = getResolvedLinking();\n\tconst state = linking?.getStateFromPath?.(\"/\", linking.config);\n\tif (!state || !navigationRef?.isReady()) return;\n\tnavigationRef.resetRoot(state);\n}\nfunction goBack() {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} goBack`);\n\tassertIsReady(navigationRef);\n\tnavigationRef?.current?.goBack();\n}\nfunction canGoBack() {\n\tif (!navigationRef.isReady()) return false;\n\treturn navigationRef?.current?.canGoBack() ?? false;\n}\nfunction canDismiss() {\n\tlet state = rootState;\n\twhile (state) {\n\t\tif (state.type === \"stack\" && state.routes.length > 1) return true;\n\t\tif (state.index === void 0) return false;\n\t\tstate = state.routes?.[state.index]?.state;\n\t}\n\treturn false;\n}\nfunction getSortedRoutes() {\n\tif (!routeNode) throw new Error(\"No routes\");\n\treturn routeNode.children.filter((route) => !route.internal).sort(sortRoutes);\n}\nfunction updateState(state, nextStateParam = state) {\n\trootState = state;\n\tnextState = nextStateParam;\n\tif (isStateAwaitingNavigatorMount(state, routeNode)) {\n\t\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F9ED} keeping ${routeInfo?.pathname}: a navigator has not mounted`);\n\t\treturn;\n\t}\n\tconst nextRouteInfo = getRouteInfo(state);\n\tif (pendingNavigationPathname === nextRouteInfo.pathname) pendingNavigationPathname = void 0;\n\tif (!deepEqual(routeInfo, nextRouteInfo)) {\n\t\tif (process.env.ONE_DEBUG_ROUTER) {\n\t\t\tconst from = routeInfo?.pathname || \"(initial)\";\n\t\t\tconst to = nextRouteInfo.pathname;\n\t\t\tconst params = Object.keys(nextRouteInfo.params || {}).length ? nextRouteInfo.params : void 0;\n\t\t\tconsole.info(`[one] \\u{1F9ED} ${from} \\u2192 ${to}`, params ? { params } : \"\");\n\t\t}\n\t\trouteInfo = nextRouteInfo;\n\t}\n\tif (process.env.NODE_ENV === \"development\" && typeof window !== \"undefined\") {\n\t\twindow.__oneDevtools = Object.assign(window.__oneDevtools || {}, {\n\t\t\trouteInfo: nextRouteInfo,\n\t\t\trootState: state,\n\t\t\trouteNode,\n\t\t\tgetRoutes: () => routeNode?.children || [],\n\t\t\tgetLoaderTimingHistory: () => devtoolsRegistry.getLoaderTimingHistory?.() ?? [],\n\t\t\tgetPreloadHistory\n\t\t});\n\t\twindow.dispatchEvent(new CustomEvent(\"one-route-change\", { detail: nextRouteInfo }));\n\t}\n}\nfunction consumePendingNavigationAction() {\n\tconst action = pendingNavigationAction;\n\tpendingNavigationAction = void 0;\n\treturn action;\n}\nfunction subscribeToRootState(subscriber) {\n\trootStateSubscribers.add(subscriber);\n\treturn () => {\n\t\trootStateSubscribers.delete(subscriber);\n\t};\n}\nfunction notifyRootStateSubscribers(state) {\n\tfor (const subscriber of rootStateSubscribers) subscriber(state);\n}\nfunction subscribeToStore(subscriber) {\n\tstoreSubscribers.add(subscriber);\n\treturn () => {\n\t\tstoreSubscribers.delete(subscriber);\n\t};\n}\nfunction subscribeToLoadingState(subscriber) {\n\tloadingStateSubscribers.add(subscriber);\n\treturn () => {\n\t\tloadingStateSubscribers.delete(subscriber);\n\t};\n}\nfunction setLoadingState(state) {\n\tstartTransition(() => {\n\t\tfor (const listener of loadingStateSubscribers) listener(state);\n\t});\n}\nlet currentSnapshot = null;\nfunction updateSnapshot() {\n\tcurrentSnapshot = getSnapshot();\n}\nfunction snapshot() {\n\treturn currentSnapshot;\n}\nfunction getSnapshot() {\n\treturn {\n\t\tlinkTo,\n\t\trouteNode,\n\t\trootComponent,\n\t\tlinking: getResolvedLinking(),\n\t\thasAttemptedToHideSplash,\n\t\tinitialState,\n\t\trootState,\n\t\tnextState,\n\t\trouteInfo,\n\t\tsplashScreenAnimationFrame,\n\t\tnavigationRef,\n\t\trootStateSubscribers,\n\t\tstoreSubscribers\n\t};\n}\nfunction rootStateSnapshot() {\n\treturn rootState;\n}\nfunction routeInfoSnapshot() {\n\treturn routeInfo;\n}\nfunction getBrowserPathname() {\n\tconst pathname = getSafeWindowPathname();\n\treturn pathname === void 0 ? void 0 : normalizeRoutePathname(pathname);\n}\nfunction shouldKeepPendingNavigationState(currentState) {\n\tif (!pendingNavigationPathname) return false;\n\treturn getRouteInfo(currentState).pathname !== pendingNavigationPathname;\n}\nfunction shouldPreserveInitialRouteInfo(currentState) {\n\tif (!initialState || !routeInfo?.pathname) return false;\n\tconst nextPathname = getRouteInfo(currentState).pathname;\n\tif (nextPathname === routeInfo.pathname) return false;\n\tif (nextPathname && nextPathname === pendingNavigationPathname) return false;\n\tconst browserPathname = getBrowserPathname();\n\tif (nextPathname && browserPathname && nextPathname === browserPathname) return false;\n\treturn true;\n}\nfunction useOneRouter() {\n\treturn useDeferredValue(useSyncExternalStore(subscribeToStore, snapshot, snapshot));\n}\nfunction syncStoreRootState() {\n\tif (!navigationRef) throw new Error(`No navigationRef, possible duplicate One dep`);\n\tif (navigationRef.isReady()) {\n\t\tconst currentState = navigationRef.getRootState();\n\t\tif (rootState !== currentState) {\n\t\t\tif (shouldKeepPendingNavigationState(currentState)) return;\n\t\t\tif (shouldPreserveInitialRouteInfo(currentState)) return;\n\t\t\tupdateState(currentState);\n\t\t}\n\t}\n}\nfunction useRootStateSnapshot(snapshot2) {\n\tconst [state, rerender] = useReducer(snapshot2, void 0, snapshot2);\n\tuseEffect(() => {\n\t\tconst unsubscribe = subscribeToRootState(rerender);\n\t\trerender();\n\t\treturn unsubscribe;\n\t}, []);\n\tconst browserPath = getSafeWindowPath();\n\treturn browserPath !== void 0 && routeInfo?.unstable_globalHref === browserPath + window.location.hash ? snapshot2() : state;\n}\nfunction useStoreRootState() {\n\tsyncStoreRootState();\n\treturn useDeferredValue(useRootStateSnapshot(rootStateSnapshot));\n}\nfunction useStoreRouteInfo() {\n\tsyncStoreRootState();\n\treturn useRootStateSnapshot(routeInfoSnapshot);\n}\nfunction cleanup() {\n\tif (splashScreenAnimationFrame) cancelAnimationFrame(splashScreenAnimationFrame);\n}\nconst preloadingLoader = {};\nconst PRELOAD_MAP_MAX = 200;\nfunction setBoundedPreloadRecord(record, key, value) {\n\tif (!(key in record)) {\n\t\tconst keys = Object.keys(record);\n\t\tif (keys.length >= PRELOAD_MAP_MAX) delete record[keys[0]];\n\t}\n\trecord[key] = value;\n}\nasync function doPreloadDev(href) {\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tconst startTime = performance.now();\n\t\tconst normalizedPath = normalizeLoaderPath(href);\n\t\tif (globalThis[\"__vxrnHeadless\"]) return null;\n\t\ttry {\n\t\t\tconst loaderJSUrl = getLoaderPath(href, true, void 0, splitLoaderKey(normalizedPath)[1]);\n\t\t\tconst moduleLoadStart = performance.now();\n\t\t\tconst modulePromise = dynamicImport(loaderJSUrl, false);\n\t\t\tif (!modulePromise) return null;\n\t\t\tconst module = await modulePromise.catch(() => null);\n\t\t\tconst moduleLoadTime = performance.now() - moduleLoadStart;\n\t\t\tif (!module?.loader) return null;\n\t\t\tconst executionStart = performance.now();\n\t\t\tconst result = await module.loader();\n\t\t\tconst executionTime = performance.now() - executionStart;\n\t\t\tconst totalTime = performance.now() - startTime;\n\t\t\tif (result?.__oneRedirect) return result;\n\t\t\tdevtoolsRegistry.recordLoaderTiming?.({\n\t\t\t\tpath: normalizedPath,\n\t\t\t\tstartTime,\n\t\t\t\tmoduleLoadTime,\n\t\t\t\texecutionTime,\n\t\t\t\ttotalTime,\n\t\t\t\tsource: \"preload\"\n\t\t\t});\n\t\t\treturn result ?? null;\n\t\t} catch (err) {\n\t\t\tconst totalTime = performance.now() - startTime;\n\t\t\tdevtoolsRegistry.recordLoaderTiming?.({\n\t\t\t\tpath: normalizedPath,\n\t\t\t\tstartTime,\n\t\t\t\ttotalTime,\n\t\t\t\terror: err instanceof Error ? err.message : String(err),\n\t\t\t\tsource: \"preload\"\n\t\t\t});\n\t\t\tif (process.env.ONE_DEBUG_ROUTER) console.warn(`[one] dev preload failed for ${href}:`, err);\n\t\t\treturn null;\n\t\t}\n\t}\n}\nasync function doPreload(href) {\n\tif (globalThis[\"__vxrnHeadless\"]) return null;\n\tconst artifactPaths = getRouteArtifactPaths(href, getResolvedLinking(), routeNode);\n\tconst preloadPath = getPreloadPath(artifactPaths.preload);\n\tconst loaderPath = getLoaderPath(artifactPaths.loader, void 0, void 0, splitLoaderKey(normalizeLoaderPath(href))[1]);\n\tconst cssPreloadPath = getPreloadCSSPath(artifactPaths.preload);\n\trecordPreloadStart(href);\n\ttry {\n\t\tconst [_preload, cssPreloadModule, loader] = await Promise.all([\n\t\t\tdynamicImport(preloadPath, false),\n\t\t\tdynamicImport(cssPreloadPath, false),\n\t\t\tdynamicImport(loaderPath, false),\n\t\t\tpreloadRouteModules(href)\n\t\t]);\n\t\tconst hasCss = !!cssPreloadModule?.injectCSS;\n\t\tif (hasCss) setBoundedCssInject(href, cssPreloadModule.injectCSS);\n\t\tif (!!!loader?.loader) {\n\t\t\trecordPreloadComplete(href, false, hasCss);\n\t\t\treturn null;\n\t\t}\n\t\tconst result = await loader.loader();\n\t\tif (result?.__oneRedirect) return result;\n\t\trecordPreloadComplete(href, true, hasCss);\n\t\treturn result ?? null;\n\t} catch (err) {\n\t\tconst errorMessage = err instanceof Error ? err.message : String(err);\n\t\tconsole.error(`[one] preload error for ${href}:`, err);\n\t\trecordPreloadError(href, errorMessage);\n\t\tthrow err;\n\t}\n}\nconst preloadedLoaderData = {};\nconst cssInjectFunctions = {};\nfunction setBoundedCssInject(key, value) {\n\tif (!(key in cssInjectFunctions)) {\n\t\tconst keys = Object.keys(cssInjectFunctions);\n\t\tif (keys.length >= PRELOAD_MAP_MAX) delete cssInjectFunctions[keys[0]];\n\t}\n\tcssInjectFunctions[key] = value;\n}\nconst preloadHistory = [];\nconst MAX_PRELOAD_HISTORY = 30;\nfunction recordPreloadStart(href) {\n\tif (process.env.NODE_ENV !== \"development\") return;\n\tconst existing = preloadHistory.find((p) => p.href === href);\n\tif (existing) {\n\t\texisting.status = \"loading\";\n\t\texisting.startTime = performance.now();\n\t\treturn;\n\t}\n\tpreloadHistory.unshift({\n\t\thref,\n\t\tstatus: \"loading\",\n\t\tstartTime: performance.now(),\n\t\thasLoader: false,\n\t\thasCss: false\n\t});\n\tif (preloadHistory.length > MAX_PRELOAD_HISTORY) preloadHistory.pop();\n\tdispatchPreloadEvent();\n}\nfunction recordPreloadComplete(href, hasLoader, hasCss) {\n\tif (process.env.NODE_ENV !== \"development\") return;\n\tconst entry = preloadHistory.find((p) => p.href === href);\n\tif (entry) {\n\t\tentry.status = \"loaded\";\n\t\tentry.endTime = performance.now();\n\t\tentry.hasLoader = hasLoader;\n\t\tentry.hasCss = hasCss;\n\t}\n\tdispatchPreloadEvent();\n}\nfunction recordPreloadError(href, error) {\n\tif (process.env.NODE_ENV !== \"development\") return;\n\tconst entry = preloadHistory.find((p) => p.href === href);\n\tif (entry) {\n\t\tentry.status = \"error\";\n\t\tentry.endTime = performance.now();\n\t\tentry.error = error;\n\t}\n\tdispatchPreloadEvent();\n}\nfunction dispatchPreloadEvent() {\n\twindow.dispatchEvent(new CustomEvent(\"one-preload-update\"));\n}\nfunction getPreloadHistory() {\n\treturn preloadHistory;\n}\nfunction preloadRoute(href, injectCSS = false) {\n\t{\n\t\tif (!shouldPreloadRoute(href)) return;\n\t\tif (process.env.NODE_ENV === \"development\") {\n\t\t\tconst normalizedHref = normalizeLoaderPath(href);\n\t\t\tif (!preloadingLoader[normalizedHref]) setBoundedPreloadRecord(preloadingLoader, normalizedHref, doPreloadDev(href).then((data) => {\n\t\t\t\tif (isLoaderBadRequest(data)) {\n\t\t\t\t\tdelete preloadingLoader[normalizedHref];\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\tsetBoundedPreloadRecord(preloadedLoaderData, normalizedHref, data);\n\t\t\t\treturn data;\n\t\t\t}));\n\t\t\treturn preloadingLoader[normalizedHref];\n\t\t}\n\t\tconst preloadKey = splitLoaderKey(normalizeLoaderPath(href))[1] ? normalizeLoaderPath(href) : href;\n\t\tif (!preloadingLoader[preloadKey]) setBoundedPreloadRecord(preloadingLoader, preloadKey, doPreload(href).then((data) => {\n\t\t\tif (isLoaderBadRequest(data)) {\n\t\t\t\tdelete preloadingLoader[preloadKey];\n\t\t\t\treturn data;\n\t\t\t}\n\t\t\tsetBoundedPreloadRecord(preloadedLoaderData, preloadKey, data);\n\t\t\treturn data;\n\t\t}).catch((err) => {\n\t\t\tdelete preloadingLoader[preloadKey];\n\t\t\tthrow err;\n\t\t}));\n\t\treturn preloadingLoader[preloadKey]?.then(async (data) => {\n\t\t\tif (injectCSS) {\n\t\t\t\tconst inject = cssInjectFunctions[href];\n\t\t\t\tif (inject) await Promise.race([inject(), new Promise((r) => setTimeout(r, 800))]);\n\t\t\t}\n\t\t\treturn data;\n\t\t}, (err) => {\n\t\t\tif (injectCSS && process.env.ONE_SKEW_PROTECTION !== \"false\" && isChunkLoadError(err)) {\n\t\t\t\twindow.location.href = href;\n\t\t\t\treturn new Promise(() => {});\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t}\n}\nfunction isSsrHref(href) {\n\tconst linking = getResolvedLinking();\n\tif (!linking?.getStateFromPath || !routeNode) return false;\n\treturn findRouteNodeFromState(linking.getStateFromPath(href, linking.config), routeNode)?.type === \"ssr\";\n}\nfunction normalizeLoaderPath(href) {\n\tconst url = new URL(href, \"http://example.com\");\n\tconst path = url.pathname.replace(/\\/index$/, \"\").replace(/\\/$/, \"\") || \"/\";\n\treturn url.search && isSsrHref(href) ? toLoaderKey(path, url.search) : path;\n}\nfunction buildClientMatches(href, matchingNode, params, loaderData) {\n\tconst pathname = extractPathnameFromHref(href);\n\tconst routeId = matchingNode?.contextKey || pathname;\n\tconst layoutMatches = currentMatches.filter((m) => m.routeId.includes(\"_layout\"));\n\tconst pageMatch = {\n\t\trouteId,\n\t\tpathname,\n\t\tparams,\n\t\tloaderData\n\t};\n\treturn [...layoutMatches, pageMatch];\n}\nfunction initClientMatches(matches) {\n\tcurrentMatches = matches;\n\tsetClientMatches(matches);\n}\nasync function linkTo(href, event, options) {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F517} ${event || \"NAVIGATE\"} ${href}`);\n\tsetNavigationType(\"soft\");\n\tif (href[0] === \"#\") return;\n\tif (shouldLinkExternally(href)) {\n\t\topenExternalURL(href);\n\t\treturn;\n\t}\n\tif (hasFileExtension(href)) {\n\t\twindow.location.href = href;\n\t\treturn;\n\t}\n\tif (isVersionStale()) {\n\t\twindow.location.href = href;\n\t\treturn;\n\t}\n\tif (checkBlocker(href, event === \"REPLACE\" ? \"replace\" : \"push\")) return;\n\tconst protectedHref = resolveProtectedHref(href);\n\tif (!protectedHref) return;\n\tif (protectedHref !== href) return linkTo(protectedHref, \"REPLACE\", options);\n\tconst currentLayoutNode = routeNode;\n\tconst currentPath = routeInfo?.pathname || \"/\";\n\tconst interceptResult = findInterceptRoute(href, currentLayoutNode, currentPath);\n\tif (interceptResult) {\n\t\tconst { interceptRoute, slotName, layoutContextKey, params: params2 } = interceptResult;\n\t\tconst scopedSlotKey = `${layoutContextKey}:${slotName}`;\n\t\tstoreInterceptState(scopedSlotKey, interceptRoute, params2);\n\t\tupdateURLWithoutNavigation(href);\n\t\tclearNotFoundState();\n\t\tsetSlotState(scopedSlotKey, {\n\t\t\tactiveRouteKey: interceptRoute.contextKey,\n\t\t\tactiveRouteNode: interceptRoute,\n\t\t\tparams: params2,\n\t\t\tisIntercepted: true\n\t\t});\n\t\treturn;\n\t}\n\tassertIsReady(navigationRef);\n\tconst current = navigationRef.current;\n\tif (current == null) throw new Error(\"Couldn't find a navigation object. Is your component inside NavigationContainer?\");\n\tconst linking = getResolvedLinking();\n\tif (!linking) throw new Error(\"Attempted to link to route when no routes are present\");\n\tsetLastAction();\n\tif (href === \"..\" || href === \"../\") {\n\t\tclearNotFoundState();\n\t\tcurrent.goBack();\n\t\treturn;\n\t}\n\tif (href.startsWith(\".\")) {\n\t\tlet base = routeInfo?.segments?.map((segment) => {\n\t\t\tif (!segment.startsWith(\"[\")) return segment;\n\t\t\tif (segment.startsWith(\"[...\")) {\n\t\t\t\tsegment = segment.slice(4, -1);\n\t\t\t\tconst params2 = routeInfo?.params?.[segment];\n\t\t\t\tif (Array.isArray(params2)) return params2.join(\"/\");\n\t\t\t\treturn params2?.split(\",\")?.join(\"/\") ?? \"\";\n\t\t\t}\n\t\t\tsegment = segment.slice(1, -1);\n\t\t\treturn routeInfo?.params?.[segment];\n\t\t}).filter(Boolean).join(\"/\") ?? \"/\";\n\t\tif (!routeInfo?.isIndex) base += \"/..\";\n\t\thref = resolve(base, href);\n\t}\n\tconst state = linking.getStateFromPath(href, linking.config);\n\tif (!state || state.routes.length === 0) {\n\t\tconsole.error(\"Could not generate a valid navigation state for the given path: \" + href);\n\t\tconsole.error(`linking.config`, linking.config);\n\t\tconsole.error(`routes`, getSortedRoutes());\n\t\treturn;\n\t}\n\tsetLoadingState(\"loading\");\n\tconst normalizedPreloadPath = normalizeLoaderPath(href);\n\tif (!(normalizedPreloadPath in preloadedLoaderData) && !(href in preloadedLoaderData)) {\n\t\tif (isLoaderBadRequest(await preloadRoute(href, true))) {\n\t\t\tsetLoadingState(\"loaded\");\n\t\t\twindow.location.assign(href);\n\t\t\treturn;\n\t\t}\n\t} else if (process.env.NODE_ENV !== \"development\") {\n\t\tconst inject = cssInjectFunctions[href];\n\t\tif (inject) inject().catch(() => {});\n\t}\n\tconst preloadResult = preloadedLoaderData[normalizedPreloadPath];\n\tif (preloadResult?.__oneRedirect) {\n\t\tconst redirectTarget = preloadResult.__oneRedirect;\n\t\tdelete preloadedLoaderData[normalizedPreloadPath];\n\t\tdelete preloadingLoader[normalizedPreloadPath];\n\t\tdelete preloadedLoaderData[href];\n\t\tdelete preloadingLoader[href];\n\t\tsetLoadingState(\"loaded\");\n\t\tlinkTo(redirectTarget, \"REPLACE\");\n\t\treturn;\n\t}\n\tif (preloadResult?.__oneError === 404) {\n\t\tdelete preloadedLoaderData[normalizedPreloadPath];\n\t\tdelete preloadingLoader[normalizedPreloadPath];\n\t\tdelete preloadedLoaderData[href];\n\t\tdelete preloadingLoader[href];\n\t\tsetLoadingState(\"loaded\");\n\t\tconst notFoundRoute = findNearestNotFoundRoute(href, routeNode);\n\t\tsetNotFoundState({\n\t\t\tnotFoundPath: preloadResult.__oneNotFoundPath || \"/+not-found\",\n\t\t\tnotFoundRouteNode: notFoundRoute || void 0,\n\t\t\toriginalPath: href\n\t\t});\n\t\treturn;\n\t}\n\tconst matchingRouteNode = findRouteNodeFromState(state, routeNode);\n\tif (matchingRouteNode?.loadRoute) {\n\t\tsetValidationState({\n\t\t\tstatus: \"validating\",\n\t\t\tlastValidatedHref: href\n\t\t});\n\t\ttry {\n\t\t\tconst loadedRoute = matchingRouteNode.loadRoute();\n\t\t\tconst params2 = extractParamsFromState(state);\n\t\t\tconst search = extractSearchFromHref(href);\n\t\t\tconst pathname = extractPathnameFromHref(href);\n\t\t\tif (loadedRoute.validateParams) validateParams(loadedRoute.validateParams, params2);\n\t\t\tif (loadedRoute.validateRoute) {\n\t\t\t\tconst validationResult = await loadedRoute.validateRoute({\n\t\t\t\t\tparams: params2,\n\t\t\t\t\tsearch,\n\t\t\t\t\tpathname,\n\t\t\t\t\thref\n\t\t\t\t});\n\t\t\t\tif (validationResult && !validationResult.valid) {\n\t\t\t\t\tconst error = new RouteValidationError(validationResult.error || \"Route validation failed\", validationResult.details);\n\t\t\t\t\tsetValidationState({\n\t\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\t\terror,\n\t\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t\t});\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetValidationState({\n\t\t\t\tstatus: \"valid\",\n\t\t\t\tlastValidatedHref: href\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif (error && typeof error.then === \"function\") {\n\t\t\t\tawait error.catch(() => {});\n\t\t\t\tsetValidationState({\n\t\t\t\t\tstatus: \"valid\",\n\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t});\n\t\t\t} else if (error instanceof ParamValidationError || error instanceof RouteValidationError) {\n\t\t\t\tsetValidationState({\n\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\terror,\n\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t});\n\t\t\t\tthrow error;\n\t\t\t} else throw error;\n\t\t}\n\t}\n\tconst loaderData = preloadedLoaderData[normalizeLoaderPath(href)];\n\tconst params = extractParamsFromState(state);\n\tconst newMatches = buildClientMatches(href, matchingRouteNode, params, loaderData);\n\tcurrentMatches = newMatches;\n\tsetClientMatches(newMatches);\n\tif (!navigationRef.isReady()) {\n\t\tsetLoadingState(\"loaded\");\n\t\treturn;\n\t}\n\tconst currentRootState = navigationRef.getRootState();\n\tconst hash = href.indexOf(\"#\");\n\tif (currentRootState?.key && hash > 0) hashes[currentRootState.key] = href.slice(hash);\n\tclearNotFoundState();\n\tnextOptions = options ?? null;\n\tpendingNavigationPathname = stripTrailingSlash(extractPathnameFromHref(href));\n\tpendingNavigationAction = event === \"PUSH\" || event === \"REPLACE\" || event === \"NAVIGATE\" ? event : void 0;\n\tlastIntendedPathname = pendingNavigationPathname;\n\tconst freshRootState = navigationRef.getRootState();\n\tconst currentRouteBeforeDispatch = navigationRef.getCurrentRoute();\n\tconst targetPathname = pendingNavigationPathname;\n\tconst optimisticState = nextOptions ? {\n\t\t...state,\n\t\tlinkOptions: nextOptions\n\t} : state;\n\tconst action = event === \"REPLACE\" ? null : getNavigateAction(state, freshRootState, event);\n\tstartTransition(() => {\n\t\tupdateState(optimisticState);\n\t\tpendingNavigationPathname = targetPathname;\n\t\tnotifyRootStateSubscribers(optimisticState);\n\t\tif (!action) navigationRef.resetRoot(state);\n\t\telse {\n\t\t\tconst targetName = action.payload?.name;\n\t\t\tconst isGroupTarget = typeof targetName === \"string\" && targetName.startsWith(\"(\") && targetName.endsWith(\")\");\n\t\t\tconst hasFreshRootState = freshRootState.type === \"stack\";\n\t\t\tconst isRootTarget = action.target === freshRootState.key;\n\t\t\tconst currentFocusedRoute = freshRootState.routes[freshRootState.index];\n\t\t\tconst currentFocusedName = currentFocusedRoute?.name;\n\t\t\tif (event !== \"REPLACE\" && isRootTarget && isGroupTarget && hasFreshRootState) {\n\t\t\t\tconst targetRoute = state.routes[state.index ?? state.routes.length - 1];\n\t\t\t\tconst targetRootName = targetRoute.name;\n\t\t\t\tif (currentFocusedName === targetRootName) {\n\t\t\t\t\tconst routes = [...freshRootState.routes];\n\t\t\t\t\troutes[freshRootState.index] = {\n\t\t\t\t\t\t...targetRoute,\n\t\t\t\t\t\tkey: currentFocusedRoute?.key ?? targetRoute.key\n\t\t\t\t\t};\n\t\t\t\t\tnavigationRef.resetRoot({\n\t\t\t\t\t\t...freshRootState,\n\t\t\t\t\t\troutes\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tconst existingTargetRoute = freshRootState.routes.find((route) => route.name === targetRootName);\n\t\t\t\t\tconst existingRoutes = freshRootState.routes.filter((route) => route.name !== targetRootName);\n\t\t\t\t\tconst nextRootState = {\n\t\t\t\t\t\t...freshRootState,\n\t\t\t\t\t\troutes: [...existingRoutes, {\n\t\t\t\t\t\t\t...targetRoute,\n\t\t\t\t\t\t\tkey: existingTargetRoute?.key ?? `${targetRootName}-${freshRootState.key}`\n\t\t\t\t\t\t}],\n\t\t\t\t\t\tindex: existingRoutes.length\n\t\t\t\t\t};\n\t\t\t\t\tnavigationRef.resetRoot(nextRootState);\n\t\t\t\t}\n\t\t\t} else navigationRef.dispatch(action);\n\t\t}\n\t});\n\tlet warningTm;\n\tconst interval = setInterval(() => {\n\t\tif (!navigationRef.isReady()) {\n\t\t\tclearTimeout(warningTm);\n\t\t\tclearInterval(interval);\n\t\t\treturn;\n\t\t}\n\t\tif (currentRouteBeforeDispatch !== navigationRef.getCurrentRoute()) setTimeout(() => {\n\t\t\tsetLoadingState(\"loaded\");\n\t\t});\n\t\tclearTimeout(warningTm);\n\t\tclearInterval(interval);\n\t}, 16);\n\tif (process.env.NODE_ENV === \"development\") warningTm = setTimeout(() => {\n\t\tconsole.warn(`Routing took more than 8 seconds`);\n\t}, 1e3);\n}\nconst hashes = {};\nlet nextOptions = null;\nfunction deepEqual(a, b) {\n\tif (a === b) return true;\n\tif (Array.isArray(a) && Array.isArray(b)) {\n\t\tif (a.length !== b.length) return false;\n\t\tfor (let i = 0; i < a.length; i++) if (!deepEqual(a[i], b[i])) return false;\n\t\treturn true;\n\t}\n\tif (typeof a === \"object\" && typeof b === \"object\") {\n\t\tconst keysA = Object.keys(a);\n\t\tconst keysB = Object.keys(b);\n\t\tif (keysA.length !== keysB.length) return false;\n\t\tfor (const key of keysA) if (!deepEqual(a[key], b[key])) return false;\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nexport { canDismiss, canGoBack, cleanup, consumePendingNavigationAction, dismiss, dismissAll, getPreloadHistory, getSafeWindowPathname2 as getSafeWindowPathname, getSortedRoutes, getValidationState, goBack, handleNavigationContainerStateChange, hasAttemptedToHideSplash, initClientMatches, initialPathname, initialState, initialize, isRouteProtected, lastIntendedPathname, linkTo, navigate, navigationRef, normalizeLoaderPath, preloadRoute, preloadedLoaderData, preloadingLoader, push, registerProtectedRoutes, replace, resetToRoot, resolveProtectedHref, rootComponent, rootState, rootStateSnapshot, routeInfo, routeInfoSnapshot, routeNode, setLoadingState, setParams, setValidationState, snapshot, subscribeToLoadingState, subscribeToRootState, subscribeToStore, subscribeToValidationState, unregisterProtectedRoutes, updateState, useOneRouter, useStoreRootState, useStoreRouteInfo, useValidationState };"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAI,YAAY;AAChB,IAAI;AACJ,MAAM,yCAAyC,IAAI,IAAI;AACvD,SAAS,wBAAwB,YAAY,kBAAkB;CAC9D,IAAI,iBAAiB,SAAS,GAAG,uBAAuB,OAAO,UAAU;MACpE,uBAAuB,IAAI,YAAY,gBAAgB;AAC7D;AACA,SAAS,0BAA0B,YAAY;CAC9C,uBAAuB,OAAO,UAAU;AACzC;AACA,SAAS,qBAAqB,MAAM;CACnC,MAAM,iBAAiB,wBAAwB,IAAI,CAAC,CAAC,QAAQ,cAAc,EAAE;CAC7E,KAAK,MAAM,CAAC,YAAY,qBAAqB,wBAAwB;EACpE,MAAM,uBAAuB,WAAW,QAAQ,cAAc,EAAE;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,QAAQ,KAAK,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO;EACtE,OAAO;CACR;CACA,IAAI,OAAO,MAAM,YAAY,OAAO,MAAM,UAAU;EACnD,MAAM,QAAQ,OAAO,KAAK,CAAC;EAC3B,MAAM,QAAQ,OAAO,KAAK,CAAC;EAC3B,IAAI,MAAM,WAAW,MAAM,QAAQ,OAAO;EAC1C,KAAK,MAAM,OAAO,OAAO,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,GAAG,OAAO;EAChE,OAAO;CACR;CACA,OAAO;AACR"}
|
|
1
|
+
{"version":3,"file":"router.js","names":[],"sources":["esm/router/router.js"],"sourcesContent":["import { StackActions } from \"@react-navigation/native\";\nimport { Fragment, startTransition, useDeferredValue, useEffect, useReducer, useSyncExternalStore } from \"react\";\nimport { devtoolsRegistry } from \"../devtools/registry\";\nimport { resolveHref } from \"../link/href\";\nimport { openExternalURL } from \"../link/openExternalURL\";\nimport { resolve } from \"../link/path\";\nimport { checkBlocker } from \"../useBlocker\";\nimport { assertIsReady } from \"../utils/assertIsReady\";\nimport { getLoaderPath, getPreloadCSSPath, getPreloadPath, isLoaderBadRequest, splitLoaderKey, toLoaderKey } from \"../utils/cleanUrl\";\nimport { dynamicImport, isChunkLoadError } from \"../utils/dynamicImport\";\nimport { PLATFORM } from \"../utils/platform\";\nimport { isVersionStale } from \"../skewProtection\";\nimport { hasFileExtension, shouldLinkExternally, shouldPreloadRoute } from \"../utils/url\";\nimport { ParamValidationError, RouteValidationError, validateParams } from \"../validateParams\";\nimport { extractParamsFromState, extractPathnameFromHref, extractSearchFromHref, findRouteNodeFromState } from \"./findRouteNode\";\nimport { getRouteInfo } from \"./getRouteInfo\";\nimport { isStateAwaitingNavigatorMount } from \"./isStateAwaitingNavigatorMount\";\nimport { getRouteArtifactPaths } from \"./getRouteArtifactPath\";\nimport { getRoutes } from \"./getRoutes\";\nimport { setLastAction } from \"./lastAction\";\nimport { getResolvedLinking, resetLinking, setupLinking } from \"./linkingConfig\";\nimport { consumeWarmInitialNavigationState, isWarmStateEnabled, isWarmWebRestoreEligible, scheduleWarmStatePersist, shouldAttemptWarmRouteRestore, trackRestoredLaunch } from \"./warmState\";\nimport { getSafeWindowPath, getSafeWindowPathname, getSafeWindowPathname as getSafeWindowPathname2, normalizeRoutePathname } from \"./path\";\nimport { sortRoutes } from \"./sortRoutes\";\nimport { getQualifiedRouteComponent } from \"./useScreens\";\nimport { preloadRouteModules } from \"./useViteRoutes\";\nimport { getNavigateAction } from \"./utils/getNavigateAction\";\nimport { setClientMatches } from \"../useMatches\";\nimport { findInterceptRoute, setNavigationType, storeInterceptState, updateURLWithoutNavigation } from \"./interceptRoutes\";\nimport { setSlotState } from \"../views/Navigator\";\nimport { clearNotFoundState, findNearestNotFoundRoute, setNotFoundState } from \"../notFoundState\";\n\n// dist/esm/router/router.js?tamagui-build-prune\nlet routeNode = null;\nlet rootComponent;\nconst protectedRouteRegistry = /* @__PURE__ */ new Map();\nfunction registerProtectedRoutes(contextKey, guardedRedirects) {\n\tif (guardedRedirects.size === 0) protectedRouteRegistry.delete(contextKey);\n\telse protectedRouteRegistry.set(contextKey, guardedRedirects);\n}\nfunction unregisterProtectedRoutes(contextKey) {\n\tprotectedRouteRegistry.delete(contextKey);\n}\nfunction getProtectedRedirect(href) {\n\tconst normalizedHref = extractPathnameFromHref(href).replace(/^\\/+|\\/+$/g, \"\");\n\tfor (const [contextKey, guardedRedirects] of protectedRouteRegistry) {\n\t\tconst normalizedContextKey = contextKey.replace(/^\\/+|\\/+$/g, \"\");\n\t\tif (!normalizedContextKey || normalizedHref === normalizedContextKey || normalizedHref.startsWith(`${normalizedContextKey}/`)) {\n\t\t\tconst routeName = normalizedHref.slice(normalizedContextKey.length).replace(/^\\//, \"\").split(\"/\")[0] || \"index\";\n\t\t\tconst normalizedRouteName = routeName.replace(/\\/index$/, \"\");\n\t\t\tif (guardedRedirects.has(routeName)) return guardedRedirects.get(routeName);\n\t\t\tif (guardedRedirects.has(normalizedRouteName)) return guardedRedirects.get(normalizedRouteName);\n\t\t}\n\t}\n\treturn false;\n}\nfunction resolveProtectedHref(href) {\n\tlet target = href;\n\tconst visited = /* @__PURE__ */ new Set();\n\twhile (!visited.has(target)) {\n\t\tvisited.add(target);\n\t\tconst redirectTo = getProtectedRedirect(target);\n\t\tif (redirectTo === false) return target;\n\t\tif (redirectTo === void 0) return;\n\t\ttarget = resolveHref(redirectTo);\n\t}\n}\nfunction isRouteProtected(href) {\n\treturn getProtectedRedirect(href) !== false;\n}\nlet hasAttemptedToHideSplash = false;\nlet initialState;\nlet rootState;\nlet initialPathname;\nlet lastIntendedPathname;\nlet nextState;\nlet routeInfo;\nlet splashScreenAnimationFrame;\nlet pendingNavigationPathname;\nlet pendingNavigationAction;\nlet navigationRef = null;\nconst rootStateSubscribers = /* @__PURE__ */ new Set();\nconst loadingStateSubscribers = /* @__PURE__ */ new Set();\nconst storeSubscribers = /* @__PURE__ */ new Set();\nlet currentMatches = [];\nlet validationState = { status: \"idle\" };\nconst validationStateSubscribers = /* @__PURE__ */ new Set();\nfunction subscribeToValidationState(subscriber) {\n\tvalidationStateSubscribers.add(subscriber);\n\treturn () => validationStateSubscribers.delete(subscriber);\n}\nfunction setValidationState(state) {\n\tvalidationState = state;\n\tfor (const subscriber of validationStateSubscribers) subscriber(state);\n\tif (state.status === \"error\" && state.error) window.dispatchEvent(new CustomEvent(\"one-validation-error\", { detail: {\n\t\terror: {\n\t\t\tmessage: state.error.message,\n\t\t\tname: state.error.name,\n\t\t\tstack: state.error.stack\n\t\t},\n\t\thref: state.lastValidatedHref,\n\t\ttimestamp: Date.now()\n\t} }));\n}\nfunction getValidationState() {\n\treturn validationState;\n}\nfunction useValidationState() {\n\treturn useSyncExternalStore(subscribeToValidationState, getValidationState, getValidationState);\n}\nlet cachedRouteNode = null;\nlet cachedRootComponent = null;\nlet cachedContext = null;\nfunction initialize(context, ref, initialLocation, linking) {\n\tcleanUpState();\n\tif (context !== cachedContext || !cachedRouteNode) {\n\t\tcachedRouteNode = getRoutes(context, {\n\t\t\tignoreEntryPoints: true,\n\t\t\tplatform: PLATFORM\n\t\t});\n\t\tcachedRootComponent = cachedRouteNode ? getQualifiedRouteComponent(cachedRouteNode) : Fragment;\n\t\tcachedContext = context;\n\t}\n\trouteNode = cachedRouteNode;\n\trootComponent = cachedRootComponent || Fragment;\n\tif (!routeNode && process.env.NODE_ENV === \"production\") throw new Error(\"No routes found\");\n\tif (process.env.ONE_DEBUG_ROUTER && routeNode) {\n\t\tconst formatRouteTree = (node, indent = \"\", isLast = true) => {\n\t\t\tconst prefix = indent + (isLast ? \"└─ \" : \"├─ \");\n\t\t\tconst childIndent = indent + (isLast ? \" \" : \"│ \");\n\t\t\tconst dynamicBadge = node.dynamic ? ` [${node.dynamic.map((d) => d.name).join(\", \")}]` : \"\";\n\t\t\tconst typeBadge = node.type !== \"layout\" ? ` (${node.type})` : \"\";\n\t\t\tconst slotsBadge = node.slots?.size ? ` {@${Array.from(node.slots.keys()).join(\", @\")}}` : \"\";\n\t\t\tlet line = `${prefix}${node.route || \"/\"}${dynamicBadge}${typeBadge}${slotsBadge}`;\n\t\t\tconst visibleChildren = node.children.filter((child) => !child.internal);\n\t\t\tfor (let i = 0; i < visibleChildren.length; i++) {\n\t\t\t\tconst child = visibleChildren[i];\n\t\t\t\tconst childIsLast = i === visibleChildren.length - 1;\n\t\t\t\tline += \"\\n\" + formatRouteTree(child, childIndent, childIsLast);\n\t\t\t}\n\t\t\treturn line;\n\t\t};\n\t\tconsole.info(`[one] \\u{1F4CD} Route structure:\n${formatRouteTree(routeNode)}`);\n\t\tif (routeNode.slots?.size) {\n\t\t\tconsole.info(`[one] \\u{1F4E6} Slots on root layout:`);\n\t\t\tfor (const [slotName, slotConfig] of routeNode.slots) console.info(` @${slotName}:`, {\n\t\t\t\tdefaultRoute: slotConfig.defaultRoute?.route,\n\t\t\t\tinterceptRoutes: slotConfig.interceptRoutes.map((r) => ({\n\t\t\t\t\troute: r.route,\n\t\t\t\t\tintercept: r.intercept\n\t\t\t\t}))\n\t\t\t});\n\t\t}\n\t}\n\tnavigationRef = ref;\n\tsetupLinkingAndRouteInfo(initialLocation, linking);\n\tsubscribeToNavigationChanges();\n}\nfunction cleanUpState() {\n\tinitialState = void 0;\n\tinitialPathname = void 0;\n\tlastIntendedPathname = void 0;\n\trootState = void 0;\n\tnextState = void 0;\n\trouteInfo = void 0;\n\tpendingNavigationPathname = void 0;\n\tpendingNavigationAction = void 0;\n\tresetLinking();\n\trootStateSubscribers.clear();\n\tstoreSubscribers.clear();\n}\nfunction setupLinkingAndRouteInfo(initialLocation, linking) {\n\tinitialState = setupLinking(routeNode, initialLocation, linking);\n\tinitialPathname = initialLocation?.pathname ?? getSafeWindowPathname();\n\tif (shouldAttemptWarmRouteRestore(initialLocation)) {\n\t\tconst warmState = consumeWarmInitialNavigationState(routeNode, getResolvedLinking());\n\t\tif (warmState) initialState = warmState;\n\t}\n\tif (initialState) {\n\t\trootState = initialState;\n\t\trouteInfo = getRouteInfo(initialState);\n\t\tif (!initialLocation) initialPathname = routeInfo.pathname;\n\t\telse if (routeInfo.pathname && routeInfo.pathname !== initialLocation.pathname && isWarmWebRestoreEligible(initialLocation)) window.history.replaceState(window.history.state, \"\", routeInfo.unstable_globalHref || routeInfo.pathname);\n\t} else routeInfo = {\n\t\tunstable_globalHref: \"\",\n\t\tpathname: \"\",\n\t\tisIndex: false,\n\t\tparams: {},\n\t\tsegments: []\n\t};\n}\nfunction handleNavigationContainerStateChange(navState) {\n\tif (!navState) return;\n\tlet state = { ...navState };\n\tif (state.key) {\n\t\tif (hashes[state.key]) {\n\t\t\tstate.hash = hashes[state.key];\n\t\t\tdelete hashes[state.key];\n\t\t}\n\t}\n\tif (!hasAttemptedToHideSplash) {\n\t\thasAttemptedToHideSplash = true;\n\t\tsplashScreenAnimationFrame = requestAnimationFrame(() => {});\n\t}\n\tif (shouldKeepPendingNavigationState(state)) return;\n\tif (nextOptions) {\n\t\tstate = {\n\t\t\t...state,\n\t\t\tlinkOptions: nextOptions\n\t\t};\n\t\tnextOptions = null;\n\t}\n\tlet shouldUpdateSubscribers = nextState === state;\n\tnextState = void 0;\n\tif (state && state !== rootState) {\n\t\tupdateState(state, void 0);\n\t\tshouldUpdateSubscribers = true;\n\t\tif (isWarmStateEnabled()) {\n\t\t\ttrackRestoredLaunch(routeInfo?.pathname);\n\t\t\tscheduleWarmStatePersist(state, routeInfo?.pathname);\n\t\t}\n\t}\n\tif (shouldUpdateSubscribers) startTransition(() => {\n\t\tfor (const subscriber of rootStateSubscribers) subscriber(state);\n\t});\n}\nfunction subscribeToNavigationChanges() {\n\tstartTransition(() => {\n\t\tupdateSnapshot();\n\t\tfor (const subscriber of storeSubscribers) subscriber();\n\t});\n}\nfunction navigate(url, options) {\n\treturn linkTo(resolveHref(url), \"NAVIGATE\", options);\n}\nfunction push(url, options) {\n\treturn linkTo(resolveHref(url), \"PUSH\", options);\n}\nfunction dismiss(count) {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} dismiss${count ? ` (${count})` : \"\"}`);\n\tnavigationRef?.dispatch(StackActions.pop(count));\n}\nfunction replace(url, options) {\n\treturn linkTo(resolveHref(url), \"REPLACE\", options);\n}\nfunction setParams(params = {}) {\n\tassertIsReady(navigationRef);\n\treturn navigationRef?.current?.setParams(params);\n}\nfunction dismissAll() {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} dismissAll`);\n\tnavigationRef?.dispatch(StackActions.popToTop());\n}\nfunction resetToRoot() {\n\tconst linking = getResolvedLinking();\n\tconst state = linking?.getStateFromPath?.(\"/\", linking.config);\n\tif (!state || !navigationRef?.isReady()) return;\n\tnavigationRef.resetRoot(state);\n}\nfunction goBack() {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} goBack`);\n\tassertIsReady(navigationRef);\n\tnavigationRef?.current?.goBack();\n}\nfunction canGoBack() {\n\tif (!navigationRef.isReady()) return false;\n\treturn navigationRef?.current?.canGoBack() ?? false;\n}\nfunction canDismiss() {\n\tlet state = rootState;\n\twhile (state) {\n\t\tif (state.type === \"stack\" && state.routes.length > 1) return true;\n\t\tif (state.index === void 0) return false;\n\t\tstate = state.routes?.[state.index]?.state;\n\t}\n\treturn false;\n}\nfunction getSortedRoutes() {\n\tif (!routeNode) throw new Error(\"No routes\");\n\treturn routeNode.children.filter((route) => !route.internal).sort(sortRoutes);\n}\nfunction updateState(state, nextStateParam = state) {\n\trootState = state;\n\tnextState = nextStateParam;\n\tif (isStateAwaitingNavigatorMount(state, routeNode)) {\n\t\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F9ED} keeping ${routeInfo?.pathname}: a navigator has not mounted`);\n\t\treturn;\n\t}\n\tconst nextRouteInfo = getRouteInfo(state);\n\tif (pendingNavigationPathname === nextRouteInfo.pathname) pendingNavigationPathname = void 0;\n\tif (!deepEqual(routeInfo, nextRouteInfo)) {\n\t\tif (process.env.ONE_DEBUG_ROUTER) {\n\t\t\tconst from = routeInfo?.pathname || \"(initial)\";\n\t\t\tconst to = nextRouteInfo.pathname;\n\t\t\tconst params = Object.keys(nextRouteInfo.params || {}).length ? nextRouteInfo.params : void 0;\n\t\t\tconsole.info(`[one] \\u{1F9ED} ${from} \\u2192 ${to}`, params ? { params } : \"\");\n\t\t}\n\t\trouteInfo = nextRouteInfo;\n\t}\n\tif (process.env.NODE_ENV === \"development\" && typeof window !== \"undefined\") {\n\t\twindow.__oneDevtools = Object.assign(window.__oneDevtools || {}, {\n\t\t\trouteInfo: nextRouteInfo,\n\t\t\trootState: state,\n\t\t\trouteNode,\n\t\t\tgetRoutes: () => routeNode?.children || [],\n\t\t\tgetLoaderTimingHistory: () => devtoolsRegistry.getLoaderTimingHistory?.() ?? [],\n\t\t\tgetPreloadHistory\n\t\t});\n\t\twindow.dispatchEvent(new CustomEvent(\"one-route-change\", { detail: nextRouteInfo }));\n\t}\n}\nfunction consumePendingNavigationAction() {\n\tconst action = pendingNavigationAction;\n\tpendingNavigationAction = void 0;\n\treturn action;\n}\nfunction subscribeToRootState(subscriber) {\n\trootStateSubscribers.add(subscriber);\n\treturn () => {\n\t\trootStateSubscribers.delete(subscriber);\n\t};\n}\nfunction notifyRootStateSubscribers(state) {\n\tfor (const subscriber of rootStateSubscribers) subscriber(state);\n}\nfunction subscribeToStore(subscriber) {\n\tstoreSubscribers.add(subscriber);\n\treturn () => {\n\t\tstoreSubscribers.delete(subscriber);\n\t};\n}\nfunction subscribeToLoadingState(subscriber) {\n\tloadingStateSubscribers.add(subscriber);\n\treturn () => {\n\t\tloadingStateSubscribers.delete(subscriber);\n\t};\n}\nfunction setLoadingState(state) {\n\tstartTransition(() => {\n\t\tfor (const listener of loadingStateSubscribers) listener(state);\n\t});\n}\nlet currentSnapshot = null;\nfunction updateSnapshot() {\n\tcurrentSnapshot = getSnapshot();\n}\nfunction snapshot() {\n\treturn currentSnapshot;\n}\nfunction getSnapshot() {\n\treturn {\n\t\tlinkTo,\n\t\trouteNode,\n\t\trootComponent,\n\t\tlinking: getResolvedLinking(),\n\t\thasAttemptedToHideSplash,\n\t\tinitialState,\n\t\trootState,\n\t\tnextState,\n\t\trouteInfo,\n\t\tsplashScreenAnimationFrame,\n\t\tnavigationRef,\n\t\trootStateSubscribers,\n\t\tstoreSubscribers\n\t};\n}\nfunction rootStateSnapshot() {\n\treturn rootState;\n}\nfunction routeInfoSnapshot() {\n\treturn routeInfo;\n}\nfunction getBrowserPathname() {\n\tconst pathname = getSafeWindowPathname();\n\treturn pathname === void 0 ? void 0 : normalizeRoutePathname(pathname);\n}\nfunction shouldKeepPendingNavigationState(currentState) {\n\tif (!pendingNavigationPathname) return false;\n\treturn getRouteInfo(currentState).pathname !== pendingNavigationPathname;\n}\nfunction shouldPreserveInitialRouteInfo(currentState) {\n\tif (!initialState || !routeInfo?.pathname) return false;\n\tconst nextPathname = getRouteInfo(currentState).pathname;\n\tif (nextPathname === routeInfo.pathname) return false;\n\tif (nextPathname && nextPathname === pendingNavigationPathname) return false;\n\tconst browserPathname = getBrowserPathname();\n\tif (nextPathname && browserPathname && nextPathname === browserPathname) return false;\n\treturn true;\n}\nfunction useOneRouter() {\n\treturn useDeferredValue(useSyncExternalStore(subscribeToStore, snapshot, snapshot));\n}\nfunction syncStoreRootState() {\n\tif (!navigationRef) throw new Error(`No navigationRef, possible duplicate One dep`);\n\tif (navigationRef.isReady()) {\n\t\tconst currentState = navigationRef.getRootState();\n\t\tif (rootState !== currentState) {\n\t\t\tif (shouldKeepPendingNavigationState(currentState)) return;\n\t\t\tif (shouldPreserveInitialRouteInfo(currentState)) return;\n\t\t\tupdateState(currentState);\n\t\t}\n\t}\n}\nfunction useRootStateSnapshot(snapshot2) {\n\tconst [state, rerender] = useReducer(snapshot2, void 0, snapshot2);\n\tuseEffect(() => {\n\t\tconst unsubscribe = subscribeToRootState(rerender);\n\t\trerender();\n\t\treturn unsubscribe;\n\t}, []);\n\tconst browserPath = getSafeWindowPath();\n\treturn browserPath !== void 0 && routeInfo?.unstable_globalHref === browserPath + window.location.hash ? snapshot2() : state;\n}\nfunction useStoreRootState() {\n\tsyncStoreRootState();\n\treturn useDeferredValue(useRootStateSnapshot(rootStateSnapshot));\n}\nfunction useStoreRouteInfo() {\n\tsyncStoreRootState();\n\treturn useRootStateSnapshot(routeInfoSnapshot);\n}\nfunction cleanup() {\n\tif (splashScreenAnimationFrame) cancelAnimationFrame(splashScreenAnimationFrame);\n}\nconst preloadingLoader = {};\nconst PRELOAD_MAP_MAX = 200;\nfunction setBoundedPreloadRecord(record, key, value) {\n\tif (!(key in record)) {\n\t\tconst keys = Object.keys(record);\n\t\tif (keys.length >= PRELOAD_MAP_MAX) delete record[keys[0]];\n\t}\n\trecord[key] = value;\n}\nasync function doPreloadDev(href) {\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tconst startTime = performance.now();\n\t\tconst normalizedPath = normalizeLoaderPath(href);\n\t\tif (globalThis[\"__vxrnHeadless\"]) return null;\n\t\ttry {\n\t\t\tconst loaderJSUrl = getLoaderPath(href, true, void 0, splitLoaderKey(normalizedPath)[1]);\n\t\t\tconst moduleLoadStart = performance.now();\n\t\t\tconst modulePromise = dynamicImport(loaderJSUrl, false);\n\t\t\tif (!modulePromise) return null;\n\t\t\tconst module = await modulePromise.catch(() => null);\n\t\t\tconst moduleLoadTime = performance.now() - moduleLoadStart;\n\t\t\tif (!module?.loader) return null;\n\t\t\tconst executionStart = performance.now();\n\t\t\tconst result = await module.loader();\n\t\t\tconst executionTime = performance.now() - executionStart;\n\t\t\tconst totalTime = performance.now() - startTime;\n\t\t\tif (result?.__oneRedirect) return result;\n\t\t\tdevtoolsRegistry.recordLoaderTiming?.({\n\t\t\t\tpath: normalizedPath,\n\t\t\t\tstartTime,\n\t\t\t\tmoduleLoadTime,\n\t\t\t\texecutionTime,\n\t\t\t\ttotalTime,\n\t\t\t\tsource: \"preload\"\n\t\t\t});\n\t\t\treturn result ?? null;\n\t\t} catch (err) {\n\t\t\tconst totalTime = performance.now() - startTime;\n\t\t\tdevtoolsRegistry.recordLoaderTiming?.({\n\t\t\t\tpath: normalizedPath,\n\t\t\t\tstartTime,\n\t\t\t\ttotalTime,\n\t\t\t\terror: err instanceof Error ? err.message : String(err),\n\t\t\t\tsource: \"preload\"\n\t\t\t});\n\t\t\tif (process.env.ONE_DEBUG_ROUTER) console.warn(`[one] dev preload failed for ${href}:`, err);\n\t\t\treturn null;\n\t\t}\n\t}\n}\nasync function doPreload(href) {\n\tif (globalThis[\"__vxrnHeadless\"]) return null;\n\tconst artifactPaths = getRouteArtifactPaths(href, getResolvedLinking(), routeNode);\n\tconst preloadPath = getPreloadPath(artifactPaths.preload);\n\tconst loaderPath = getLoaderPath(artifactPaths.loader, void 0, void 0, splitLoaderKey(normalizeLoaderPath(href))[1]);\n\tconst cssPreloadPath = getPreloadCSSPath(artifactPaths.preload);\n\trecordPreloadStart(href);\n\ttry {\n\t\tconst [_preload, cssPreloadModule, loader] = await Promise.all([\n\t\t\tdynamicImport(preloadPath, false),\n\t\t\tdynamicImport(cssPreloadPath, false),\n\t\t\tdynamicImport(loaderPath, false),\n\t\t\tpreloadRouteModules(href)\n\t\t]);\n\t\tconst hasCss = !!cssPreloadModule?.injectCSS;\n\t\tif (hasCss) setBoundedCssInject(href, cssPreloadModule.injectCSS);\n\t\tif (!!!loader?.loader) {\n\t\t\trecordPreloadComplete(href, false, hasCss);\n\t\t\treturn null;\n\t\t}\n\t\tconst result = await loader.loader();\n\t\tif (result?.__oneRedirect) return result;\n\t\trecordPreloadComplete(href, true, hasCss);\n\t\treturn result ?? null;\n\t} catch (err) {\n\t\tconst errorMessage = err instanceof Error ? err.message : String(err);\n\t\tconsole.error(`[one] preload error for ${href}:`, err);\n\t\trecordPreloadError(href, errorMessage);\n\t\tthrow err;\n\t}\n}\nconst preloadedLoaderData = {};\nconst cssInjectFunctions = {};\nfunction setBoundedCssInject(key, value) {\n\tif (!(key in cssInjectFunctions)) {\n\t\tconst keys = Object.keys(cssInjectFunctions);\n\t\tif (keys.length >= PRELOAD_MAP_MAX) delete cssInjectFunctions[keys[0]];\n\t}\n\tcssInjectFunctions[key] = value;\n}\nconst preloadHistory = [];\nconst MAX_PRELOAD_HISTORY = 30;\nfunction recordPreloadStart(href) {\n\tif (process.env.NODE_ENV !== \"development\") return;\n\tconst existing = preloadHistory.find((p) => p.href === href);\n\tif (existing) {\n\t\texisting.status = \"loading\";\n\t\texisting.startTime = performance.now();\n\t\treturn;\n\t}\n\tpreloadHistory.unshift({\n\t\thref,\n\t\tstatus: \"loading\",\n\t\tstartTime: performance.now(),\n\t\thasLoader: false,\n\t\thasCss: false\n\t});\n\tif (preloadHistory.length > MAX_PRELOAD_HISTORY) preloadHistory.pop();\n\tdispatchPreloadEvent();\n}\nfunction recordPreloadComplete(href, hasLoader, hasCss) {\n\tif (process.env.NODE_ENV !== \"development\") return;\n\tconst entry = preloadHistory.find((p) => p.href === href);\n\tif (entry) {\n\t\tentry.status = \"loaded\";\n\t\tentry.endTime = performance.now();\n\t\tentry.hasLoader = hasLoader;\n\t\tentry.hasCss = hasCss;\n\t}\n\tdispatchPreloadEvent();\n}\nfunction recordPreloadError(href, error) {\n\tif (process.env.NODE_ENV !== \"development\") return;\n\tconst entry = preloadHistory.find((p) => p.href === href);\n\tif (entry) {\n\t\tentry.status = \"error\";\n\t\tentry.endTime = performance.now();\n\t\tentry.error = error;\n\t}\n\tdispatchPreloadEvent();\n}\nfunction dispatchPreloadEvent() {\n\twindow.dispatchEvent(new CustomEvent(\"one-preload-update\"));\n}\nfunction getPreloadHistory() {\n\treturn preloadHistory;\n}\nfunction preloadRoute(href, injectCSS = false) {\n\t{\n\t\tif (!shouldPreloadRoute(href)) return;\n\t\tif (process.env.NODE_ENV === \"development\") {\n\t\t\tconst normalizedHref = normalizeLoaderPath(href);\n\t\t\tif (!preloadingLoader[normalizedHref]) setBoundedPreloadRecord(preloadingLoader, normalizedHref, doPreloadDev(href).then((data) => {\n\t\t\t\tif (isLoaderBadRequest(data)) {\n\t\t\t\t\tdelete preloadingLoader[normalizedHref];\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\tsetBoundedPreloadRecord(preloadedLoaderData, normalizedHref, data);\n\t\t\t\treturn data;\n\t\t\t}));\n\t\t\treturn preloadingLoader[normalizedHref];\n\t\t}\n\t\tconst preloadKey = splitLoaderKey(normalizeLoaderPath(href))[1] ? normalizeLoaderPath(href) : href;\n\t\tif (!preloadingLoader[preloadKey]) setBoundedPreloadRecord(preloadingLoader, preloadKey, doPreload(href).then((data) => {\n\t\t\tif (isLoaderBadRequest(data)) {\n\t\t\t\tdelete preloadingLoader[preloadKey];\n\t\t\t\treturn data;\n\t\t\t}\n\t\t\tsetBoundedPreloadRecord(preloadedLoaderData, preloadKey, data);\n\t\t\treturn data;\n\t\t}).catch((err) => {\n\t\t\tdelete preloadingLoader[preloadKey];\n\t\t\tthrow err;\n\t\t}));\n\t\treturn preloadingLoader[preloadKey]?.then(async (data) => {\n\t\t\tif (injectCSS) {\n\t\t\t\tconst inject = cssInjectFunctions[href];\n\t\t\t\tif (inject) await Promise.race([inject(), new Promise((r) => setTimeout(r, 800))]);\n\t\t\t}\n\t\t\treturn data;\n\t\t}, (err) => {\n\t\t\tif (injectCSS && process.env.ONE_SKEW_PROTECTION !== \"false\" && isChunkLoadError(err)) {\n\t\t\t\twindow.location.href = href;\n\t\t\t\treturn new Promise(() => {});\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t}\n}\nfunction isSsrHref(href) {\n\tconst linking = getResolvedLinking();\n\tif (!linking?.getStateFromPath || !routeNode) return false;\n\treturn findRouteNodeFromState(linking.getStateFromPath(href, linking.config), routeNode)?.type === \"ssr\";\n}\nfunction normalizeLoaderPath(href) {\n\tconst url = new URL(href, \"http://example.com\");\n\tconst path = url.pathname.replace(/\\/index$/, \"\").replace(/\\/$/, \"\") || \"/\";\n\treturn url.search && isSsrHref(href) ? toLoaderKey(path, url.search) : path;\n}\nfunction buildClientMatches(href, matchingNode, params, loaderData) {\n\tconst pathname = extractPathnameFromHref(href);\n\tconst routeId = matchingNode?.contextKey || pathname;\n\tconst layoutMatches = currentMatches.filter((m) => m.routeId.includes(\"_layout\"));\n\tconst pageMatch = {\n\t\trouteId,\n\t\tpathname,\n\t\tparams,\n\t\tloaderData\n\t};\n\treturn [...layoutMatches, pageMatch];\n}\nfunction initClientMatches(matches) {\n\tcurrentMatches = matches;\n\tsetClientMatches(matches);\n}\nasync function linkTo(href, event, options) {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F517} ${event || \"NAVIGATE\"} ${href}`);\n\tsetNavigationType(\"soft\");\n\tif (href[0] === \"#\") return;\n\tif (shouldLinkExternally(href)) {\n\t\topenExternalURL(href);\n\t\treturn;\n\t}\n\tif (hasFileExtension(href)) {\n\t\twindow.location.href = href;\n\t\treturn;\n\t}\n\tif (isVersionStale()) {\n\t\twindow.location.href = href;\n\t\treturn;\n\t}\n\tif (checkBlocker(href, event === \"REPLACE\" ? \"replace\" : \"push\")) return;\n\tconst protectedHref = resolveProtectedHref(href);\n\tif (!protectedHref) return;\n\tif (protectedHref !== href) return linkTo(protectedHref, \"REPLACE\", options);\n\tconst currentLayoutNode = routeNode;\n\tconst currentPath = routeInfo?.pathname || \"/\";\n\tconst interceptResult = findInterceptRoute(href, currentLayoutNode, currentPath);\n\tif (interceptResult) {\n\t\tconst { interceptRoute, slotName, layoutContextKey, params: params2 } = interceptResult;\n\t\tconst scopedSlotKey = `${layoutContextKey}:${slotName}`;\n\t\tstoreInterceptState(scopedSlotKey, interceptRoute, params2);\n\t\tupdateURLWithoutNavigation(href);\n\t\tclearNotFoundState();\n\t\tsetSlotState(scopedSlotKey, {\n\t\t\tactiveRouteKey: interceptRoute.contextKey,\n\t\t\tactiveRouteNode: interceptRoute,\n\t\t\tparams: params2,\n\t\t\tisIntercepted: true\n\t\t});\n\t\treturn;\n\t}\n\tassertIsReady(navigationRef);\n\tconst current = navigationRef.current;\n\tif (current == null) throw new Error(\"Couldn't find a navigation object. Is your component inside NavigationContainer?\");\n\tconst linking = getResolvedLinking();\n\tif (!linking) throw new Error(\"Attempted to link to route when no routes are present\");\n\tsetLastAction();\n\tif (href === \"..\" || href === \"../\") {\n\t\tclearNotFoundState();\n\t\tcurrent.goBack();\n\t\treturn;\n\t}\n\tif (href.startsWith(\".\")) {\n\t\tlet base = routeInfo?.segments?.map((segment) => {\n\t\t\tif (!segment.startsWith(\"[\")) return segment;\n\t\t\tif (segment.startsWith(\"[...\")) {\n\t\t\t\tsegment = segment.slice(4, -1);\n\t\t\t\tconst params2 = routeInfo?.params?.[segment];\n\t\t\t\tif (Array.isArray(params2)) return params2.join(\"/\");\n\t\t\t\treturn params2?.split(\",\")?.join(\"/\") ?? \"\";\n\t\t\t}\n\t\t\tsegment = segment.slice(1, -1);\n\t\t\treturn routeInfo?.params?.[segment];\n\t\t}).filter(Boolean).join(\"/\") ?? \"/\";\n\t\tif (!routeInfo?.isIndex) base += \"/..\";\n\t\thref = resolve(base, href);\n\t}\n\tconst state = linking.getStateFromPath(href, linking.config);\n\tif (!state || state.routes.length === 0) {\n\t\tconsole.error(\"Could not generate a valid navigation state for the given path: \" + href);\n\t\tconsole.error(`linking.config`, linking.config);\n\t\tconsole.error(`routes`, getSortedRoutes());\n\t\treturn;\n\t}\n\tsetLoadingState(\"loading\");\n\tconst normalizedPreloadPath = normalizeLoaderPath(href);\n\tif (!(normalizedPreloadPath in preloadedLoaderData) && !(href in preloadedLoaderData)) {\n\t\tif (isLoaderBadRequest(await preloadRoute(href, true))) {\n\t\t\tsetLoadingState(\"loaded\");\n\t\t\twindow.location.assign(href);\n\t\t\treturn;\n\t\t}\n\t} else if (process.env.NODE_ENV !== \"development\") {\n\t\tconst inject = cssInjectFunctions[href];\n\t\tif (inject) inject().catch(() => {});\n\t}\n\tconst preloadResult = preloadedLoaderData[normalizedPreloadPath];\n\tif (preloadResult?.__oneRedirect) {\n\t\tconst redirectTarget = preloadResult.__oneRedirect;\n\t\tdelete preloadedLoaderData[normalizedPreloadPath];\n\t\tdelete preloadingLoader[normalizedPreloadPath];\n\t\tdelete preloadedLoaderData[href];\n\t\tdelete preloadingLoader[href];\n\t\tsetLoadingState(\"loaded\");\n\t\tlinkTo(redirectTarget, \"REPLACE\");\n\t\treturn;\n\t}\n\tif (preloadResult?.__oneError === 404) {\n\t\tdelete preloadedLoaderData[normalizedPreloadPath];\n\t\tdelete preloadingLoader[normalizedPreloadPath];\n\t\tdelete preloadedLoaderData[href];\n\t\tdelete preloadingLoader[href];\n\t\tsetLoadingState(\"loaded\");\n\t\tconst notFoundRoute = findNearestNotFoundRoute(href, routeNode);\n\t\tsetNotFoundState({\n\t\t\tnotFoundPath: preloadResult.__oneNotFoundPath || \"/+not-found\",\n\t\t\tnotFoundRouteNode: notFoundRoute || void 0,\n\t\t\toriginalPath: href\n\t\t});\n\t\treturn;\n\t}\n\tconst matchingRouteNode = findRouteNodeFromState(state, routeNode);\n\tif (matchingRouteNode?.loadRoute) {\n\t\tsetValidationState({\n\t\t\tstatus: \"validating\",\n\t\t\tlastValidatedHref: href\n\t\t});\n\t\ttry {\n\t\t\tconst loadedRoute = matchingRouteNode.loadRoute();\n\t\t\tconst params2 = extractParamsFromState(state);\n\t\t\tconst search = extractSearchFromHref(href);\n\t\t\tconst pathname = extractPathnameFromHref(href);\n\t\t\tif (loadedRoute.validateParams) validateParams(loadedRoute.validateParams, params2);\n\t\t\tif (loadedRoute.validateRoute) {\n\t\t\t\tconst validationResult = await loadedRoute.validateRoute({\n\t\t\t\t\tparams: params2,\n\t\t\t\t\tsearch,\n\t\t\t\t\tpathname,\n\t\t\t\t\thref\n\t\t\t\t});\n\t\t\t\tif (validationResult && !validationResult.valid) {\n\t\t\t\t\tconst error = new RouteValidationError(validationResult.error || \"Route validation failed\", validationResult.details);\n\t\t\t\t\tsetValidationState({\n\t\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\t\terror,\n\t\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t\t});\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetValidationState({\n\t\t\t\tstatus: \"valid\",\n\t\t\t\tlastValidatedHref: href\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif (error && typeof error.then === \"function\") {\n\t\t\t\tawait error.catch(() => {});\n\t\t\t\tsetValidationState({\n\t\t\t\t\tstatus: \"valid\",\n\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t});\n\t\t\t} else if (error instanceof ParamValidationError || error instanceof RouteValidationError) {\n\t\t\t\tsetValidationState({\n\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\terror,\n\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t});\n\t\t\t\tthrow error;\n\t\t\t} else throw error;\n\t\t}\n\t}\n\tconst loaderData = preloadedLoaderData[normalizeLoaderPath(href)];\n\tconst params = extractParamsFromState(state);\n\tconst newMatches = buildClientMatches(href, matchingRouteNode, params, loaderData);\n\tcurrentMatches = newMatches;\n\tsetClientMatches(newMatches);\n\tif (!navigationRef.isReady()) {\n\t\tsetLoadingState(\"loaded\");\n\t\treturn;\n\t}\n\tconst currentRootState = navigationRef.getRootState();\n\tconst hash = href.indexOf(\"#\");\n\tif (currentRootState?.key && hash > 0) hashes[currentRootState.key] = href.slice(hash);\n\tclearNotFoundState();\n\tnextOptions = options ?? null;\n\tpendingNavigationPathname = getRouteInfo(state).pathname;\n\tpendingNavigationAction = event === \"PUSH\" || event === \"REPLACE\" || event === \"NAVIGATE\" ? event : void 0;\n\tlastIntendedPathname = pendingNavigationPathname;\n\tconst freshRootState = navigationRef.getRootState();\n\tconst currentRouteBeforeDispatch = navigationRef.getCurrentRoute();\n\tconst targetPathname = pendingNavigationPathname;\n\tconst optimisticState = nextOptions ? {\n\t\t...state,\n\t\tlinkOptions: nextOptions\n\t} : state;\n\tconst action = event === \"REPLACE\" ? null : getNavigateAction(state, freshRootState, event);\n\tstartTransition(() => {\n\t\tupdateState(optimisticState);\n\t\tpendingNavigationPathname = targetPathname;\n\t\tnotifyRootStateSubscribers(optimisticState);\n\t\tif (!action) navigationRef.resetRoot(state);\n\t\telse {\n\t\t\tconst targetName = action.payload?.name;\n\t\t\tconst isGroupTarget = typeof targetName === \"string\" && targetName.startsWith(\"(\") && targetName.endsWith(\")\");\n\t\t\tconst hasFreshRootState = freshRootState.type === \"stack\";\n\t\t\tconst isRootTarget = action.target === freshRootState.key;\n\t\t\tconst currentFocusedRoute = freshRootState.routes[freshRootState.index];\n\t\t\tconst currentFocusedName = currentFocusedRoute?.name;\n\t\t\tif (event !== \"REPLACE\" && isRootTarget && isGroupTarget && hasFreshRootState) {\n\t\t\t\tconst targetRoute = state.routes[state.index ?? state.routes.length - 1];\n\t\t\t\tconst targetRootName = targetRoute.name;\n\t\t\t\tif (currentFocusedName === targetRootName) {\n\t\t\t\t\tconst routes = [...freshRootState.routes];\n\t\t\t\t\troutes[freshRootState.index] = {\n\t\t\t\t\t\t...targetRoute,\n\t\t\t\t\t\tkey: currentFocusedRoute?.key ?? targetRoute.key\n\t\t\t\t\t};\n\t\t\t\t\tnavigationRef.resetRoot({\n\t\t\t\t\t\t...freshRootState,\n\t\t\t\t\t\troutes\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tconst existingTargetRoute = freshRootState.routes.find((route) => route.name === targetRootName);\n\t\t\t\t\tconst existingRoutes = freshRootState.routes.filter((route) => route.name !== targetRootName);\n\t\t\t\t\tconst nextRootState = {\n\t\t\t\t\t\t...freshRootState,\n\t\t\t\t\t\troutes: [...existingRoutes, {\n\t\t\t\t\t\t\t...targetRoute,\n\t\t\t\t\t\t\tkey: existingTargetRoute?.key ?? `${targetRootName}-${freshRootState.key}`\n\t\t\t\t\t\t}],\n\t\t\t\t\t\tindex: existingRoutes.length\n\t\t\t\t\t};\n\t\t\t\t\tnavigationRef.resetRoot(nextRootState);\n\t\t\t\t}\n\t\t\t} else navigationRef.dispatch(action);\n\t\t}\n\t});\n\tlet warningTm;\n\tconst interval = setInterval(() => {\n\t\tif (!navigationRef.isReady()) {\n\t\t\tclearTimeout(warningTm);\n\t\t\tclearInterval(interval);\n\t\t\treturn;\n\t\t}\n\t\tif (currentRouteBeforeDispatch !== navigationRef.getCurrentRoute()) setTimeout(() => {\n\t\t\tsetLoadingState(\"loaded\");\n\t\t});\n\t\tclearTimeout(warningTm);\n\t\tclearInterval(interval);\n\t}, 16);\n\tif (process.env.NODE_ENV === \"development\") warningTm = setTimeout(() => {\n\t\tconsole.warn(`Routing took more than 8 seconds`);\n\t}, 1e3);\n}\nconst hashes = {};\nlet nextOptions = null;\nfunction deepEqual(a, b) {\n\tif (a === b) return true;\n\tif (Array.isArray(a) && Array.isArray(b)) {\n\t\tif (a.length !== b.length) return false;\n\t\tfor (let i = 0; i < a.length; i++) if (!deepEqual(a[i], b[i])) return false;\n\t\treturn true;\n\t}\n\tif (typeof a === \"object\" && typeof b === \"object\") {\n\t\tconst keysA = Object.keys(a);\n\t\tconst keysB = Object.keys(b);\n\t\tif (keysA.length !== keysB.length) return false;\n\t\tfor (const key of keysA) if (!deepEqual(a[key], b[key])) return false;\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nexport { canDismiss, canGoBack, cleanup, consumePendingNavigationAction, dismiss, dismissAll, getPreloadHistory, getSafeWindowPathname2 as getSafeWindowPathname, getSortedRoutes, getValidationState, goBack, handleNavigationContainerStateChange, hasAttemptedToHideSplash, initClientMatches, initialPathname, initialState, initialize, isRouteProtected, lastIntendedPathname, linkTo, navigate, navigationRef, normalizeLoaderPath, preloadRoute, preloadedLoaderData, preloadingLoader, push, registerProtectedRoutes, replace, resetToRoot, resolveProtectedHref, rootComponent, rootState, rootStateSnapshot, routeInfo, routeInfoSnapshot, routeNode, setLoadingState, setParams, setValidationState, snapshot, subscribeToLoadingState, subscribeToRootState, subscribeToStore, subscribeToValidationState, unregisterProtectedRoutes, updateState, useOneRouter, useStoreRootState, useStoreRouteInfo, useValidationState };"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAI,YAAY;AAChB,IAAI;AACJ,MAAM,yCAAyC,IAAI,IAAI;AACvD,SAAS,wBAAwB,YAAY,kBAAkB;CAC9D,IAAI,iBAAiB,SAAS,GAAG,uBAAuB,OAAO,UAAU;MACpE,uBAAuB,IAAI,YAAY,gBAAgB;AAC7D;AACA,SAAS,0BAA0B,YAAY;CAC9C,uBAAuB,OAAO,UAAU;AACzC;AACA,SAAS,qBAAqB,MAAM;CACnC,MAAM,iBAAiB,wBAAwB,IAAI,CAAC,CAAC,QAAQ,cAAc,EAAE;CAC7E,KAAK,MAAM,CAAC,YAAY,qBAAqB,wBAAwB;EACpE,MAAM,uBAAuB,WAAW,QAAQ,cAAc,EAAE;EAChE,IAAI,CAAC,wBAAwB,mBAAmB,wBAAwB,eAAe,WAAW,GAAG,qBAAqB,EAAE,GAAG;GAC9H,MAAM,YAAY,eAAe,MAAM,qBAAqB,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AAU;EACnD,MAAM,QAAQ,OAAO,KAAK,CAAC;EAC3B,MAAM,QAAQ,OAAO,KAAK,CAAC;EAC3B,IAAI,MAAM,WAAW,MAAM,QAAQ,OAAO;EAC1C,KAAK,MAAM,OAAO,OAAO,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,GAAG,OAAO;EAChE,OAAO;CACR;CACA,OAAO;AACR"}
|
|
@@ -18,7 +18,7 @@ import { getRoutes } from "./getRoutes.native.js";
|
|
|
18
18
|
import { setLastAction } from "./lastAction.native.js";
|
|
19
19
|
import { getResolvedLinking, resetLinking, setupLinking } from "./linkingConfig.native.js";
|
|
20
20
|
import { consumeWarmInitialNavigationState, isWarmStateEnabled, isWarmWebRestoreEligible, scheduleWarmStatePersist, shouldAttemptWarmRouteRestore, trackRestoredLaunch } from "./warmState.native.js";
|
|
21
|
-
import { getSafeWindowPath, getSafeWindowPathname, getSafeWindowPathname as getSafeWindowPathname2, normalizeRoutePathname
|
|
21
|
+
import { getSafeWindowPath, getSafeWindowPathname, getSafeWindowPathname as getSafeWindowPathname2, normalizeRoutePathname } from "./path.native.js";
|
|
22
22
|
import { sortRoutes } from "./sortRoutes.native.js";
|
|
23
23
|
import { getQualifiedRouteComponent } from "./useScreens.native.js";
|
|
24
24
|
import { getNavigateAction } from "./utils/getNavigateAction.native.js";
|
|
@@ -769,7 +769,7 @@ async function linkTo(href, event, options) {
|
|
|
769
769
|
if ((currentRootState === null || currentRootState === void 0 ? void 0 : currentRootState.key) && hash > 0) hashes[currentRootState.key] = href.slice(hash);
|
|
770
770
|
clearNotFoundState();
|
|
771
771
|
nextOptions = options !== null && options !== void 0 ? options : null;
|
|
772
|
-
pendingNavigationPathname =
|
|
772
|
+
pendingNavigationPathname = getRouteInfo(state).pathname;
|
|
773
773
|
pendingNavigationAction = event === "PUSH" || event === "REPLACE" || event === "NAVIGATE" ? event : void 0;
|
|
774
774
|
lastIntendedPathname = pendingNavigationPathname;
|
|
775
775
|
var freshRootState = navigationRef.getRootState();
|