loomrail 0.1.1 → 0.2.0
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/apps/cli/dist/index.js +2664 -783
- package/apps/cli/migrations/0062_agent_run_activity.sql +36 -0
- package/apps/web/dist/assets/{index-Ev7mo9dU.css → index-DItZd8Bz.css} +1 -1
- package/apps/web/dist/assets/index-DbAOELar.js +13 -0
- package/apps/web/dist/assets/index-DbAOELar.js.map +1 -0
- package/apps/web/dist/assets/{radix-vendor-CRdHXIPR.js → radix-vendor-CC__Vkax.js} +2 -2
- package/apps/web/dist/assets/radix-vendor-CC__Vkax.js.map +1 -0
- package/apps/web/dist/assets/react-vendor-D3MgmOsQ.js +10 -0
- package/apps/web/dist/assets/react-vendor-D3MgmOsQ.js.map +1 -0
- package/apps/web/dist/assets/tanstack-vendor-DT_E_B5V.js +3 -0
- package/apps/web/dist/assets/tanstack-vendor-DT_E_B5V.js.map +1 -0
- package/apps/web/dist/index.html +5 -5
- package/package.json +1 -1
- package/apps/web/dist/assets/index-DnefyhG4.js +0 -13
- package/apps/web/dist/assets/index-DnefyhG4.js.map +0 -1
- package/apps/web/dist/assets/radix-vendor-CRdHXIPR.js.map +0 -1
- package/apps/web/dist/assets/react-vendor-BicOiEU0.js +0 -10
- package/apps/web/dist/assets/react-vendor-BicOiEU0.js.map +0 -1
- package/apps/web/dist/assets/tanstack-vendor-Do8jh46X.js +0 -2
- package/apps/web/dist/assets/tanstack-vendor-Do8jh46X.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tanstack-vendor-DT_E_B5V.js","names":["#provider","isServer","functionalUpdate","isPlainObject","hasOwn","replaceEqualDeep","isPlainArray","hasObjectPrototype","#setup","#cleanup","#focused","#setup","#cleanup","#online","#gcTimeout","#abortSignalConsumed","#defaultOptions","#client","#cache","#initialState","getDefaultState","#queryType","#retryer","#dispatch","#revertState","#client","#selectError","#currentQuery","#executeFetch","#updateTimers","#clearStaleTimeout","#clearRefetchInterval","#updateQuery","#updateStaleTimeout","#computeRefetchInterval","#currentRefetchInterval","#updateRefetchInterval","#currentResult","#currentResultOptions","#currentResultState","#trackedProps","#shouldScheduleTimer","#staleTimeoutId","#refetchIntervalId","#currentQueryInitialState","#lastQueryWithDefinedData","#selectFn","#selectResult","#client","#mutationCache","#observers","#retryer","#dispatch","#mutations","#scopes","#mutationId","#client","#updateResult","#currentMutation","#notify","#currentResult","#mutateOptions","#queries","#queryCache","#mutationCache","#defaultOptions","#queryDefaults","#mutationDefaults","#mountCount","#unsubscribeFocus","#unsubscribeOnline","functionalUpdate","useCallback","useSyncExternalStoreWithSelector","Fragment","jsx","jsx","Fragment"],"sources":["../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/timeoutManager.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/utils.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/environmentManager.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/subscribable.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/focusManager.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/notifyManager.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/onlineManager.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/retryer.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/removable.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/query.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/queryObserver.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/mutation.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/mutationCache.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/queryCache.js","../../../../node_modules/.pnpm/@tanstack+query-core@5.102.8/node_modules/@tanstack/query-core/build/modern/queryClient.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/suspense.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useQuery.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/queryOptions.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useMutation.js","../../../../node_modules/.pnpm/@tanstack+react-query@5.102.8_react@19.3.0/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/utils.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/utils.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/invariant.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/path.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/not-found.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/scroll-restoration.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/qss.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/searchParams.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/root.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/redirect.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/sieve-cache.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/new-process-route-tree.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/rewrite.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/stores.js","../../../../node_modules/.pnpm/@tanstack+history@1.162.4/node_modules/@tanstack/history/dist/esm/index.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/router.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/load-client.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/link.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/route.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/CatchBoundary.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/ClientOnly.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/routerContext.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/useRouter.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/matchContext.js","../../../../node_modules/.pnpm/@tanstack+store@0.11.1/node_modules/@tanstack/store/dist/alien.js","../../../../node_modules/.pnpm/@tanstack+store@0.11.1/node_modules/@tanstack/store/dist/atom.js","../../../../node_modules/.pnpm/use-sync-external-store@1.7.0_react@19.3.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../../../../node_modules/.pnpm/use-sync-external-store@1.7.0_react@19.3.0/node_modules/use-sync-external-store/shim/index.js","../../../../node_modules/.pnpm/use-sync-external-store@1.7.0_react@19.3.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js","../../../../node_modules/.pnpm/use-sync-external-store@1.7.0_react@19.3.0/node_modules/use-sync-external-store/shim/with-selector.js","../../../../node_modules/.pnpm/@tanstack+react-store@0.11.1_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-store/dist/useSelector.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/useMatch.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/useLoaderData.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/useLoaderDeps.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/useParams.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/useSearch.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/useNavigate.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/useRouteContext.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/link.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/route.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/not-found.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/ScriptOnce.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/SafeFragment.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/renderRouteNotFound.js","../../../../node_modules/.pnpm/@tanstack+router-core@1.171.30/node_modules/@tanstack/router-core/dist/esm/scroll-restoration-script/client.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/scroll-restoration.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/Match.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/Transitioner.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/Matches.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/routerStores.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/router.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/RouterProvider.js","../../../../node_modules/.pnpm/@tanstack+react-router@1.170.36_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/useLocation.js"],"sourcesContent":["\"use client\";\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/QueryClientProvider.tsx\nconst QueryClientContext = React.createContext(void 0);\nconst useQueryClient = (queryClient) => {\n\tconst client = React.useContext(QueryClientContext);\n\tif (queryClient) return queryClient;\n\tif (!client) throw new Error(\"No QueryClient set, use QueryClientProvider to set one\");\n\treturn client;\n};\nconst QueryClientProvider = ({ client, children }) => {\n\tReact.useEffect(() => {\n\t\tclient.mount();\n\t\treturn () => {\n\t\t\tclient.unmount();\n\t\t};\n\t}, [client]);\n\treturn /* @__PURE__ */ jsx(QueryClientContext.Provider, {\n\t\tvalue: client,\n\t\tchildren\n\t});\n};\n//#endregion\nexport { QueryClientContext, QueryClientProvider, useQueryClient };\n\n//# sourceMappingURL=QueryClientProvider.js.map","//#region src/timeoutManager.ts\nconst defaultTimeoutProvider = {\n\tsetTimeout: (callback, delay) => setTimeout(callback, delay),\n\tclearTimeout: (timeoutId) => clearTimeout(timeoutId),\n\tsetInterval: (callback, delay) => setInterval(callback, delay),\n\tclearInterval: (intervalId) => clearInterval(intervalId)\n};\n/**\n* Allows customization of how timeouts are created.\n*\n* @tanstack/query-core makes liberal use of timeouts to implement `staleTime`\n* and `gcTime`. The default TimeoutManager provider uses the platform's global\n* `setTimeout` implementation, which is known to have scalability issues with\n* thousands of timeouts on the event loop.\n*\n* If you hit this limitation, consider providing a custom TimeoutProvider that\n* coalesces timeouts.\n*/\nvar TimeoutManager = class {\n\t#provider = defaultTimeoutProvider;\n\t#providerCalled = false;\n\tsetTimeoutProvider(provider) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (this.#providerCalled && provider !== this.#provider) console.error(`[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`, {\n\t\t\t\tprevious: this.#provider,\n\t\t\t\tprovider\n\t\t\t});\n\t\t}\n\t\tthis.#provider = provider;\n\t\tif (process.env.NODE_ENV !== \"production\") this.#providerCalled = false;\n\t}\n\tsetTimeout(callback, delay) {\n\t\tif (process.env.NODE_ENV !== \"production\") this.#providerCalled = true;\n\t\treturn this.#provider.setTimeout(callback, delay);\n\t}\n\tclearTimeout(timeoutId) {\n\t\tthis.#provider.clearTimeout(timeoutId);\n\t}\n\tsetInterval(callback, delay) {\n\t\tif (process.env.NODE_ENV !== \"production\") this.#providerCalled = true;\n\t\treturn this.#provider.setInterval(callback, delay);\n\t}\n\tclearInterval(intervalId) {\n\t\tthis.#provider.clearInterval(intervalId);\n\t}\n};\nconst timeoutManager = new TimeoutManager();\n/**\n* In many cases code wants to delay to the next event loop tick; this is not\n* mediated by {@link timeoutManager}.\n*\n* This function is provided to make auditing the `tanstack/query-core` for\n* incorrect use of system `setTimeout` easier.\n*/\nfunction systemSetTimeoutZero(callback) {\n\tsetTimeout(callback, 0);\n}\n//#endregion\nexport { TimeoutManager, defaultTimeoutProvider, systemSetTimeoutZero, timeoutManager };\n\n//# sourceMappingURL=timeoutManager.js.map","import { timeoutManager } from \"./timeoutManager.js\";\n//#region src/utils.ts\n/** @deprecated\n* use `environmentManager.isServer()` instead.\n*/\nconst isServer = typeof window === \"undefined\" || \"Deno\" in globalThis;\nfunction noop() {}\nfunction functionalUpdate(updater, input) {\n\treturn typeof updater === \"function\" ? updater(input) : updater;\n}\nfunction isValidTimeout(value) {\n\treturn typeof value === \"number\" && value >= 0 && value !== Infinity;\n}\nfunction timeUntilStale(updatedAt, staleTime) {\n\treturn Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nfunction resolveQueryValue(value, query) {\n\treturn typeof value === \"function\" ? value(query) : value;\n}\nfunction matchQuery(filters, query) {\n\tconst { type = \"all\", exact, fetchStatus, predicate, queryKey, stale } = filters;\n\tif (queryKey) {\n\t\tif (exact) {\n\t\t\tif (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) return false;\n\t\t} else if (!partialMatchKey(query.queryKey, queryKey)) return false;\n\t}\n\tif (type !== \"all\") {\n\t\tconst isActive = query.isActive();\n\t\tif (type === \"active\" && !isActive) return false;\n\t\tif (type === \"inactive\" && isActive) return false;\n\t}\n\tif (typeof stale === \"boolean\" && query.isStale() !== stale) return false;\n\tif (fetchStatus && fetchStatus !== query.state.fetchStatus) return false;\n\tif (predicate && !predicate(query)) return false;\n\treturn true;\n}\nfunction matchMutation(filters, mutation) {\n\tconst { exact, status, predicate, mutationKey } = filters;\n\tif (mutationKey) {\n\t\tif (!mutation.options.mutationKey) return false;\n\t\tif (exact) {\n\t\t\tif (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) return false;\n\t\t} else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) return false;\n\t}\n\tif (status && mutation.state.status !== status) return false;\n\tif (predicate && !predicate(mutation)) return false;\n\treturn true;\n}\nfunction hashQueryKeyByOptions(queryKey, options) {\n\treturn (options?.queryKeyHashFn || hashKey)(queryKey);\n}\n/**\n* Default query & mutation keys hash function.\n* Hashes the value into a stable hash.\n*/\nfunction hashKey(queryKey) {\n\treturn JSON.stringify(queryKey, (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {\n\t\tresult[key] = val[key];\n\t\treturn result;\n\t}, {}) : val);\n}\nfunction partialMatchKey(a, b) {\n\tif (a === b) return true;\n\tif (typeof a !== typeof b) return false;\n\tif (a && b && typeof a === \"object\" && typeof b === \"object\") {\n\t\tif (Array.isArray(a) && Array.isArray(b)) {\n\t\t\tfor (let i = 0; i < b.length; i++) if (!partialMatchKey(a[i], b[i])) return false;\n\t\t\treturn true;\n\t\t}\n\t\tconst bKeys = Object.keys(b);\n\t\tfor (const key of bKeys) if (!partialMatchKey(a[key], b[key])) return false;\n\t\treturn true;\n\t}\n\treturn false;\n}\nconst hasOwn = Object.prototype.hasOwnProperty;\nfunction replaceEqualDeep(a, b, depth = 0) {\n\tif (a === b) return a;\n\tif (depth > 500) return b;\n\tconst array = isPlainArray(a) && isPlainArray(b);\n\tif (!array && !(isPlainObject(a) && isPlainObject(b))) return b;\n\tconst aSize = (array ? a : Object.keys(a)).length;\n\tconst bItems = array ? b : Object.keys(b);\n\tconst bSize = bItems.length;\n\tconst copy = array ? new Array(bSize) : {};\n\tlet equalItems = 0;\n\tfor (let i = 0; i < bSize; i++) {\n\t\tconst key = array ? i : bItems[i];\n\t\tconst aItem = a[key];\n\t\tconst bItem = b[key];\n\t\tif (aItem === bItem) {\n\t\t\tcopy[key] = aItem;\n\t\t\tif (array ? i < aSize : hasOwn.call(a, key)) equalItems++;\n\t\t\tcontinue;\n\t\t}\n\t\tif (aItem === null || bItem === null || typeof aItem !== \"object\" || typeof bItem !== \"object\") {\n\t\t\tcopy[key] = bItem;\n\t\t\tcontinue;\n\t\t}\n\t\tconst v = replaceEqualDeep(aItem, bItem, depth + 1);\n\t\tcopy[key] = v;\n\t\tif (v === aItem) equalItems++;\n\t}\n\treturn aSize === bSize && equalItems === aSize ? a : copy;\n}\n/**\n* Shallow compare objects.\n*/\nfunction shallowEqualObjects(a, b) {\n\tif (!b || Object.keys(a).length !== Object.keys(b).length) return false;\n\tfor (const key in a) if (a[key] !== b[key]) return false;\n\treturn true;\n}\nfunction isPlainArray(value) {\n\treturn Array.isArray(value) && value.length === Object.keys(value).length;\n}\nfunction isPlainObject(o) {\n\tif (!hasObjectPrototype(o)) return false;\n\tconst ctor = o.constructor;\n\tif (ctor === void 0) return true;\n\tconst prot = ctor.prototype;\n\tif (!hasObjectPrototype(prot)) return false;\n\tif (!prot.hasOwnProperty(\"isPrototypeOf\")) return false;\n\tif (Object.getPrototypeOf(o) !== Object.prototype) return false;\n\treturn true;\n}\nfunction hasObjectPrototype(o) {\n\treturn Object.prototype.toString.call(o) === \"[object Object]\";\n}\nfunction sleep(timeout) {\n\treturn new Promise((resolve) => {\n\t\ttimeoutManager.setTimeout(resolve, timeout);\n\t});\n}\nfunction replaceData(prevData, data, options) {\n\tif (typeof options.structuralSharing === \"function\") return options.structuralSharing(prevData, data);\n\telse if (options.structuralSharing !== false) {\n\t\tif (process.env.NODE_ENV !== \"production\") try {\n\t\t\treturn replaceEqualDeep(prevData, data);\n\t\t} catch (error) {\n\t\t\tconsole.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${options.queryHash}]: ${error}`);\n\t\t\tthrow error;\n\t\t}\n\t\treturn replaceEqualDeep(prevData, data);\n\t}\n\treturn data;\n}\nfunction keepPreviousData(previousData) {\n\treturn previousData;\n}\nfunction addToEnd(items, item, max = 0) {\n\tconst newItems = [...items, item];\n\treturn max && newItems.length > max ? newItems.slice(1) : newItems;\n}\nfunction addToStart(items, item, max = 0) {\n\tconst newItems = [item, ...items];\n\treturn max && newItems.length > max ? newItems.slice(0, -1) : newItems;\n}\nconst skipToken = Symbol();\nfunction ensureQueryFn(options, fetchOptions) {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif (options.queryFn === skipToken) console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`);\n\t}\n\tif (!options.queryFn && fetchOptions?.initialPromise) return () => fetchOptions.initialPromise;\n\tif (!options.queryFn || options.queryFn === skipToken) return () => Promise.reject(/* @__PURE__ */ new Error(`Missing queryFn: '${options.queryHash}'`));\n\treturn options.queryFn;\n}\nfunction shouldThrowError(throwOnError, params) {\n\tif (typeof throwOnError === \"function\") return throwOnError(...params);\n\treturn !!throwOnError;\n}\nfunction addConsumeAwareSignal(object, getSignal, onCancelled) {\n\tlet consumed = false;\n\tlet signal;\n\tObject.defineProperty(object, \"signal\", {\n\t\tenumerable: true,\n\t\tget: () => {\n\t\t\tsignal ??= getSignal();\n\t\t\tif (consumed) return signal;\n\t\t\tconsumed = true;\n\t\t\tif (signal.aborted) onCancelled();\n\t\t\telse signal.addEventListener(\"abort\", onCancelled, { once: true });\n\t\t\treturn signal;\n\t\t}\n\t});\n\treturn object;\n}\n//#endregion\nexport { addConsumeAwareSignal, addToEnd, addToStart, ensureQueryFn, functionalUpdate, hashKey, hashQueryKeyByOptions, isPlainArray, isPlainObject, isServer, isValidTimeout, keepPreviousData, matchMutation, matchQuery, noop, partialMatchKey, replaceData, replaceEqualDeep, resolveQueryValue, shallowEqualObjects, shouldThrowError, skipToken, sleep, timeUntilStale };\n\n//# sourceMappingURL=utils.js.map","import { isServer as isServer$1 } from \"./utils.js\";\n//#region src/environmentManager.ts\nlet isServerFn = () => isServer$1;\n/**\n* Returns whether the current runtime should be treated as a server environment.\n*/\nconst isServer = () => isServerFn();\n/**\n* Manages environment detection used by TanStack Query internals.\n*/\nconst environmentManager = {\n\tisServer,\n\t/**\n\t* Overrides the server check globally.\n\t*/\n\tsetIsServer(isServerValue) {\n\t\tisServerFn = isServerValue;\n\t}\n};\n//#endregion\nexport { environmentManager, isServer };\n\n//# sourceMappingURL=environmentManager.js.map","//#region src/subscribable.ts\nvar Subscribable = class {\n\tconstructor() {\n\t\tthis.listeners = /* @__PURE__ */ new Set();\n\t\tthis.subscribe = this.subscribe.bind(this);\n\t}\n\tsubscribe(listener) {\n\t\tthis.listeners.add(listener);\n\t\tthis.onSubscribe();\n\t\treturn () => {\n\t\t\tthis.listeners.delete(listener);\n\t\t\tthis.onUnsubscribe();\n\t\t};\n\t}\n\thasListeners() {\n\t\treturn this.listeners.size > 0;\n\t}\n\tonSubscribe() {}\n\tonUnsubscribe() {}\n};\n//#endregion\nexport { Subscribable };\n\n//# sourceMappingURL=subscribable.js.map","import { Subscribable } from \"./subscribable.js\";\n//#region src/focusManager.ts\nvar FocusManager = class extends Subscribable {\n\t#focused;\n\t#cleanup;\n\t#setup;\n\tconstructor() {\n\t\tsuper();\n\t\tthis.#setup = (onFocus) => {\n\t\t\tif (typeof window !== \"undefined\" && window.addEventListener) {\n\t\t\t\tconst listener = () => onFocus();\n\t\t\t\twindow.addEventListener(\"visibilitychange\", listener, false);\n\t\t\t\treturn () => {\n\t\t\t\t\twindow.removeEventListener(\"visibilitychange\", listener);\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n\tonSubscribe() {\n\t\tif (!this.#cleanup) this.setEventListener(this.#setup);\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) {\n\t\t\tthis.#cleanup?.();\n\t\t\tthis.#cleanup = void 0;\n\t\t}\n\t}\n\tsetEventListener(setup) {\n\t\tthis.#setup = setup;\n\t\tthis.#cleanup?.();\n\t\tthis.#cleanup = setup((focused) => {\n\t\t\tif (typeof focused === \"boolean\") this.setFocused(focused);\n\t\t\telse this.onFocus();\n\t\t});\n\t}\n\tsetFocused(focused) {\n\t\tif (this.#focused !== focused) {\n\t\t\tthis.#focused = focused;\n\t\t\tthis.onFocus();\n\t\t}\n\t}\n\tonFocus() {\n\t\tconst isFocused = this.isFocused();\n\t\tthis.listeners.forEach((listener) => {\n\t\t\tlistener(isFocused);\n\t\t});\n\t}\n\tisFocused() {\n\t\tif (typeof this.#focused === \"boolean\") return this.#focused;\n\t\treturn globalThis.document?.visibilityState !== \"hidden\";\n\t}\n};\nconst focusManager = new FocusManager();\n//#endregion\nexport { FocusManager, focusManager };\n\n//# sourceMappingURL=focusManager.js.map","import { systemSetTimeoutZero } from \"./timeoutManager.js\";\n//#region src/notifyManager.ts\nconst defaultScheduler = systemSetTimeoutZero;\nfunction createNotifyManager() {\n\tlet queue = [];\n\tlet transactions = 0;\n\tlet notifyFn = (callback) => {\n\t\tcallback();\n\t};\n\tlet batchNotifyFn = (callback) => {\n\t\tcallback();\n\t};\n\tlet scheduleFn = defaultScheduler;\n\tconst schedule = (callback) => {\n\t\tif (transactions) queue.push(callback);\n\t\telse scheduleFn(() => {\n\t\t\tnotifyFn(callback);\n\t\t});\n\t};\n\tconst flush = () => {\n\t\tconst originalQueue = queue;\n\t\tqueue = [];\n\t\tif (originalQueue.length) scheduleFn(() => {\n\t\t\tbatchNotifyFn(() => {\n\t\t\t\toriginalQueue.forEach((callback) => {\n\t\t\t\t\tnotifyFn(callback);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n\treturn {\n\t\tbatch: (callback) => {\n\t\t\tlet result;\n\t\t\ttransactions++;\n\t\t\ttry {\n\t\t\t\tresult = callback();\n\t\t\t} finally {\n\t\t\t\ttransactions--;\n\t\t\t\tif (!transactions) flush();\n\t\t\t}\n\t\t\treturn result;\n\t\t},\n\t\t/**\n\t\t* All calls to the wrapped function will be batched.\n\t\t*/\n\t\tbatchCalls: (callback) => {\n\t\t\treturn (...args) => {\n\t\t\t\tschedule(() => {\n\t\t\t\t\tcallback(...args);\n\t\t\t\t});\n\t\t\t};\n\t\t},\n\t\tschedule,\n\t\t/**\n\t\t* Use this method to set a custom notify function.\n\t\t* This can be used to for example wrap notifications with `React.act` while running tests.\n\t\t*/\n\t\tsetNotifyFunction: (fn) => {\n\t\t\tnotifyFn = fn;\n\t\t},\n\t\t/**\n\t\t* Use this method to set a custom function to batch notifications together into a single tick.\n\t\t* By default React Query will use the batch function provided by ReactDOM or React Native.\n\t\t*/\n\t\tsetBatchNotifyFunction: (fn) => {\n\t\t\tbatchNotifyFn = fn;\n\t\t},\n\t\tsetScheduler: (fn) => {\n\t\t\tscheduleFn = fn;\n\t\t}\n\t};\n}\nconst notifyManager = createNotifyManager();\n//#endregion\nexport { createNotifyManager, defaultScheduler, notifyManager };\n\n//# sourceMappingURL=notifyManager.js.map","import { Subscribable } from \"./subscribable.js\";\n//#region src/onlineManager.ts\nvar OnlineManager = class extends Subscribable {\n\t#online = true;\n\t#cleanup;\n\t#setup;\n\tconstructor() {\n\t\tsuper();\n\t\tthis.#setup = (onOnline) => {\n\t\t\tif (typeof window !== \"undefined\" && window.addEventListener) {\n\t\t\t\tconst onlineListener = () => onOnline(true);\n\t\t\t\tconst offlineListener = () => onOnline(false);\n\t\t\t\twindow.addEventListener(\"online\", onlineListener, false);\n\t\t\t\twindow.addEventListener(\"offline\", offlineListener, false);\n\t\t\t\treturn () => {\n\t\t\t\t\twindow.removeEventListener(\"online\", onlineListener);\n\t\t\t\t\twindow.removeEventListener(\"offline\", offlineListener);\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n\tonSubscribe() {\n\t\tif (!this.#cleanup) this.setEventListener(this.#setup);\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) {\n\t\t\tthis.#cleanup?.();\n\t\t\tthis.#cleanup = void 0;\n\t\t}\n\t}\n\tsetEventListener(setup) {\n\t\tthis.#setup = setup;\n\t\tthis.#cleanup?.();\n\t\tthis.#cleanup = setup(this.setOnline.bind(this));\n\t}\n\tsetOnline(online) {\n\t\tif (this.#online !== online) {\n\t\t\tthis.#online = online;\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(online);\n\t\t\t});\n\t\t}\n\t}\n\tisOnline() {\n\t\treturn this.#online;\n\t}\n};\nconst onlineManager = new OnlineManager();\n//#endregion\nexport { OnlineManager, onlineManager };\n\n//# sourceMappingURL=onlineManager.js.map","import { noop, sleep } from \"./utils.js\";\nimport { isServer } from \"./environmentManager.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\n//#region src/retryer.ts\nfunction defaultRetryDelay(failureCount) {\n\treturn Math.min(1e3 * 2 ** failureCount, 3e4);\n}\nfunction canFetch(networkMode) {\n\treturn (networkMode ?? \"online\") === \"online\" ? onlineManager.isOnline() : true;\n}\nvar CancelledError = class extends Error {\n\tconstructor(options) {\n\t\tsuper(\"CancelledError\");\n\t\tthis.revert = options?.revert;\n\t\tthis.silent = options?.silent;\n\t}\n};\n/**\n* @deprecated Use instanceof `CancelledError` instead.\n*/\nfunction isCancelledError(value) {\n\treturn value instanceof CancelledError;\n}\nfunction createRetryer(config) {\n\tlet isRetryCancelled = false;\n\tlet failureCount = 0;\n\tlet continueFn;\n\tlet status = \"pending\";\n\tlet promiseResolve;\n\tlet promiseReject;\n\tconst promise = new Promise((resolve, reject) => {\n\t\tpromiseResolve = resolve;\n\t\tpromiseReject = reject;\n\t});\n\tpromise.catch(noop);\n\tconst isResolved = () => status !== \"pending\";\n\tconst cancel = (cancelOptions) => {\n\t\tif (!isResolved()) {\n\t\t\tconst error = new CancelledError(cancelOptions);\n\t\t\treject(error);\n\t\t\tconfig.onCancel?.(error);\n\t\t}\n\t};\n\tconst cancelRetry = () => {\n\t\tisRetryCancelled = true;\n\t};\n\tconst continueRetry = () => {\n\t\tisRetryCancelled = false;\n\t};\n\tconst canContinue = () => focusManager.isFocused() && (config.networkMode === \"always\" || onlineManager.isOnline()) && config.canRun();\n\tconst canStart = () => canFetch(config.networkMode) && config.canRun();\n\tconst resolve = (value) => {\n\t\tif (!isResolved()) {\n\t\t\tcontinueFn?.();\n\t\t\tstatus = \"resolved\";\n\t\t\tpromiseResolve(value);\n\t\t}\n\t};\n\tconst reject = (value) => {\n\t\tif (!isResolved()) {\n\t\t\tcontinueFn?.();\n\t\t\tstatus = \"rejected\";\n\t\t\tpromiseReject(value);\n\t\t}\n\t};\n\tconst pause = () => {\n\t\treturn new Promise((continueResolve) => {\n\t\t\tcontinueFn = (value) => {\n\t\t\t\tif (isResolved() || canContinue()) continueResolve(value);\n\t\t\t};\n\t\t\tconfig.onPause?.();\n\t\t}).then(() => {\n\t\t\tcontinueFn = void 0;\n\t\t\tif (!isResolved()) config.onContinue?.();\n\t\t});\n\t};\n\tconst run = () => {\n\t\tif (isResolved()) return;\n\t\tlet promiseOrValue;\n\t\tconst initialPromise = failureCount === 0 ? config.initialPromise : void 0;\n\t\ttry {\n\t\t\tpromiseOrValue = initialPromise ?? config.fn();\n\t\t} catch (error) {\n\t\t\tpromiseOrValue = Promise.reject(error);\n\t\t}\n\t\tPromise.resolve(promiseOrValue).then(resolve).catch((error) => {\n\t\t\tif (isResolved()) return;\n\t\t\tconst retry = config.retry ?? (isServer() ? 0 : 3);\n\t\t\tconst retryDelay = config.retryDelay ?? defaultRetryDelay;\n\t\t\tconst delay = typeof retryDelay === \"function\" ? retryDelay(failureCount, error) : retryDelay;\n\t\t\tconst shouldRetry = retry === true || typeof retry === \"number\" && failureCount < retry || typeof retry === \"function\" && retry(failureCount, error);\n\t\t\tif (isRetryCancelled || !shouldRetry) {\n\t\t\t\treject(error);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfailureCount++;\n\t\t\tconfig.onFail?.(failureCount, error);\n\t\t\tsleep(delay).then(() => {\n\t\t\t\treturn canContinue() ? void 0 : pause();\n\t\t\t}).then(() => {\n\t\t\t\tif (isRetryCancelled) reject(error);\n\t\t\t\telse run();\n\t\t\t});\n\t\t});\n\t};\n\treturn {\n\t\tpromise,\n\t\tstatus: () => status,\n\t\tcancel,\n\t\tcontinue: () => {\n\t\t\tcontinueFn?.();\n\t\t\treturn promise;\n\t\t},\n\t\tcancelRetry,\n\t\tcontinueRetry,\n\t\tcanStart,\n\t\tstart: () => {\n\t\t\tif (canStart()) run();\n\t\t\telse pause().then(run);\n\t\t\treturn promise;\n\t\t}\n\t};\n}\n//#endregion\nexport { CancelledError, canFetch, createRetryer, isCancelledError };\n\n//# sourceMappingURL=retryer.js.map","import { timeoutManager } from \"./timeoutManager.js\";\nimport { isValidTimeout } from \"./utils.js\";\nimport { isServer } from \"./environmentManager.js\";\n//#region src/removable.ts\nvar Removable = class {\n\t#gcTimeout;\n\tdestroy() {\n\t\tthis.clearGcTimeout();\n\t}\n\tscheduleGc() {\n\t\tthis.clearGcTimeout();\n\t\tif (isValidTimeout(this.gcTime)) this.#gcTimeout = timeoutManager.setTimeout(() => {\n\t\t\tthis.optionalRemove();\n\t\t}, this.gcTime);\n\t}\n\tupdateGcTime(newGcTime) {\n\t\tthis.gcTime = Math.max(this.gcTime || 0, newGcTime ?? (isServer() ? Infinity : 3e5));\n\t}\n\tclearGcTimeout() {\n\t\tif (this.#gcTimeout !== void 0) {\n\t\t\ttimeoutManager.clearTimeout(this.#gcTimeout);\n\t\t\tthis.#gcTimeout = void 0;\n\t\t}\n\t}\n};\n//#endregion\nexport { Removable };\n\n//# sourceMappingURL=removable.js.map","import { addConsumeAwareSignal, addToEnd, addToStart, ensureQueryFn } from \"./utils.js\";\n//#region src/infiniteQueryBehavior.ts\nfunction infiniteQueryBehavior(pages) {\n\treturn { onFetch: (context, query) => {\n\t\tconst options = context.options;\n\t\tconst direction = context.fetchOptions?.meta?.fetchMore?.direction;\n\t\tconst oldPages = context.state.data?.pages || [];\n\t\tconst oldPageParams = context.state.data?.pageParams || [];\n\t\tlet result = {\n\t\t\tpages: [],\n\t\t\tpageParams: []\n\t\t};\n\t\tlet currentPage = 0;\n\t\tconst fetchFn = async () => {\n\t\t\tlet cancelled = false;\n\t\t\tconst addSignalProperty = (object) => {\n\t\t\t\taddConsumeAwareSignal(object, () => context.signal, () => cancelled = true);\n\t\t\t};\n\t\t\tconst queryFn = ensureQueryFn(context.options, context.fetchOptions);\n\t\t\tconst fetchPage = async (data, param, previous) => {\n\t\t\t\tif (cancelled) return Promise.reject(context.signal.reason);\n\t\t\t\tif (param == null && data.pages.length) return Promise.resolve(data);\n\t\t\t\tconst createQueryFnContext = () => {\n\t\t\t\t\tconst queryFnContext = {\n\t\t\t\t\t\tclient: context.client,\n\t\t\t\t\t\tqueryKey: context.queryKey,\n\t\t\t\t\t\tpageParam: param,\n\t\t\t\t\t\tdirection: previous ? \"backward\" : \"forward\",\n\t\t\t\t\t\tmeta: context.options.meta\n\t\t\t\t\t};\n\t\t\t\t\taddSignalProperty(queryFnContext);\n\t\t\t\t\treturn queryFnContext;\n\t\t\t\t};\n\t\t\t\tconst queryFnContext = createQueryFnContext();\n\t\t\t\tconst page = await queryFn(queryFnContext);\n\t\t\t\tconst { maxPages } = context.options;\n\t\t\t\tconst addTo = previous ? addToStart : addToEnd;\n\t\t\t\treturn {\n\t\t\t\t\tpages: addTo(data.pages, page, maxPages),\n\t\t\t\t\tpageParams: addTo(data.pageParams, param, maxPages)\n\t\t\t\t};\n\t\t\t};\n\t\t\tif (direction && oldPages.length) {\n\t\t\t\tconst previous = direction === \"backward\";\n\t\t\t\tconst pageParamFn = previous ? getPreviousPageParam : getNextPageParam;\n\t\t\t\tconst oldData = {\n\t\t\t\t\tpages: oldPages,\n\t\t\t\t\tpageParams: oldPageParams\n\t\t\t\t};\n\t\t\t\tresult = await fetchPage(oldData, pageParamFn(options, oldData), previous);\n\t\t\t} else {\n\t\t\t\tconst remainingPages = pages ?? oldPages.length;\n\t\t\t\tdo {\n\t\t\t\t\tconst param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);\n\t\t\t\t\tif (currentPage > 0 && param == null) break;\n\t\t\t\t\tresult = await fetchPage(result, param);\n\t\t\t\t\tcurrentPage++;\n\t\t\t\t} while (currentPage < remainingPages);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\tif (context.options.persister) context.fetchFn = () => {\n\t\t\treturn context.options.persister?.(fetchFn, {\n\t\t\t\tclient: context.client,\n\t\t\t\tqueryKey: context.queryKey,\n\t\t\t\tmeta: context.options.meta,\n\t\t\t\tsignal: context.signal\n\t\t\t}, query);\n\t\t};\n\t\telse context.fetchFn = fetchFn;\n\t} };\n}\nfunction getNextPageParam(options, { pages, pageParams }) {\n\tconst lastIndex = pages.length - 1;\n\treturn pages.length > 0 ? options.getNextPageParam(pages[lastIndex], pages, pageParams[lastIndex], pageParams) : void 0;\n}\nfunction getPreviousPageParam(options, { pages, pageParams }) {\n\treturn pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;\n}\n/**\n* Checks if there is a next page.\n*/\nfunction hasNextPage(options, data) {\n\tif (!data) return false;\n\treturn getNextPageParam(options, data) != null;\n}\n/**\n* Checks if there is a previous page.\n*/\nfunction hasPreviousPage(options, data) {\n\tif (!data || !options.getPreviousPageParam) return false;\n\treturn getPreviousPageParam(options, data) != null;\n}\n//#endregion\nexport { hasNextPage, hasPreviousPage, infiniteQueryBehavior };\n\n//# sourceMappingURL=infiniteQueryBehavior.js.map","import { ensureQueryFn, noop, replaceData, resolveQueryValue, skipToken, timeUntilStale } from \"./utils.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { CancelledError, canFetch, createRetryer } from \"./retryer.js\";\nimport { Removable } from \"./removable.js\";\nimport { infiniteQueryBehavior } from \"./infiniteQueryBehavior.js\";\n//#region src/query.ts\nvar Query = class extends Removable {\n\t#queryType;\n\t#initialState;\n\t#revertState;\n\t#cache;\n\t#client;\n\t#retryer;\n\t#defaultOptions;\n\t#abortSignalConsumed;\n\tconstructor(config) {\n\t\tsuper();\n\t\tthis.#abortSignalConsumed = false;\n\t\tthis.#defaultOptions = config.defaultOptions;\n\t\tthis.setOptions(config.options);\n\t\tthis.observers = [];\n\t\tthis.#client = config.client;\n\t\tthis.#cache = this.#client.getQueryCache();\n\t\tthis.queryKey = config.queryKey;\n\t\tthis.queryHash = config.queryHash;\n\t\tthis.#initialState = getDefaultState(this.options);\n\t\tthis.state = config.state ?? this.#initialState;\n\t\tthis.scheduleGc();\n\t}\n\tget meta() {\n\t\treturn this.options.meta;\n\t}\n\tget queryType() {\n\t\treturn this.#queryType;\n\t}\n\tget promise() {\n\t\treturn this.#retryer?.promise;\n\t}\n\tsetOptions(options) {\n\t\tthis.options = {\n\t\t\t...this.#defaultOptions,\n\t\t\t...options\n\t\t};\n\t\tif (options?._type) this.#queryType = options._type;\n\t\tthis.updateGcTime(this.options.gcTime);\n\t\tif (this.state && this.state.data === void 0) {\n\t\t\tconst defaultState = getDefaultState(this.options);\n\t\t\tif (defaultState.data !== void 0) {\n\t\t\t\tthis.setState(successState(defaultState.data, defaultState.dataUpdatedAt));\n\t\t\t\tthis.#initialState = defaultState;\n\t\t\t}\n\t\t}\n\t}\n\toptionalRemove() {\n\t\tif (!this.observers.length && this.state.fetchStatus === \"idle\") this.#cache.remove(this);\n\t}\n\tsetData(newData, options) {\n\t\tconst data = replaceData(this.state.data, newData, this.options);\n\t\tthis.#dispatch({\n\t\t\tdata,\n\t\t\ttype: \"success\",\n\t\t\tdataUpdatedAt: options?.updatedAt,\n\t\t\tmanual: options?.manual\n\t\t});\n\t\treturn data;\n\t}\n\tsetState(state) {\n\t\tthis.#dispatch({\n\t\t\ttype: \"setState\",\n\t\t\tstate\n\t\t});\n\t}\n\tcancel(options) {\n\t\tconst promise = this.#retryer?.promise;\n\t\tthis.#retryer?.cancel(options);\n\t\treturn promise ? promise.then(noop).catch(noop) : Promise.resolve();\n\t}\n\tdestroy() {\n\t\tsuper.destroy();\n\t\tthis.cancel({ silent: true });\n\t}\n\tget resetState() {\n\t\treturn this.#initialState;\n\t}\n\treset() {\n\t\tthis.destroy();\n\t\tthis.setState(this.resetState);\n\t}\n\tisActive() {\n\t\treturn this.observers.some((observer) => resolveQueryValue(observer.options.enabled, this) !== false);\n\t}\n\tisDisabled() {\n\t\tif (this.getObserversCount() > 0) return !this.isActive();\n\t\treturn this.options.queryFn === skipToken || !this.isFetched();\n\t}\n\tisFetched() {\n\t\treturn this.state.dataUpdateCount + this.state.errorUpdateCount > 0;\n\t}\n\tisStatic() {\n\t\tif (this.getObserversCount() > 0) return this.observers.some((observer) => resolveQueryValue(observer.options.staleTime, this) === \"static\");\n\t\treturn false;\n\t}\n\tisStale() {\n\t\tif (this.getObserversCount() > 0) return this.observers.some((observer) => observer.getCurrentResult().isStale);\n\t\treturn this.state.data === void 0 || this.state.isInvalidated;\n\t}\n\tisStaleByTime(staleTime = 0) {\n\t\tif (this.state.data === void 0) return true;\n\t\tif (staleTime === \"static\") return false;\n\t\tif (this.state.isInvalidated) return true;\n\t\treturn !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n\t}\n\tonFocus() {\n\t\tthis.observers.find((x) => x.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: false });\n\t\tthis.#retryer?.continue();\n\t}\n\tonOnline() {\n\t\tthis.observers.find((x) => x.shouldFetchOnReconnect())?.refetch({ cancelRefetch: false });\n\t\tthis.#retryer?.continue();\n\t}\n\taddObserver(observer) {\n\t\tif (!this.observers.includes(observer)) {\n\t\t\tthis.observers.push(observer);\n\t\t\tthis.clearGcTimeout();\n\t\t\tthis.#cache.notify({\n\t\t\t\ttype: \"observerAdded\",\n\t\t\t\tquery: this,\n\t\t\t\tobserver\n\t\t\t});\n\t\t}\n\t}\n\tremoveObserver(observer) {\n\t\tconst index = this.observers.indexOf(observer);\n\t\tif (index !== -1) {\n\t\t\tthis.observers.splice(index, 1);\n\t\t\tif (!this.observers.length) {\n\t\t\t\tif (this.#retryer) {\n\t\t\t\t\tif (this.#abortSignalConsumed || this.state.fetchStatus === \"paused\" && this.state.status === \"pending\") this.#retryer.cancel({ revert: true });\n\t\t\t\t\telse this.#retryer.cancelRetry();\n\t\t\t\t}\n\t\t\t\tthis.scheduleGc();\n\t\t\t}\n\t\t\tthis.#cache.notify({\n\t\t\t\ttype: \"observerRemoved\",\n\t\t\t\tquery: this,\n\t\t\t\tobserver\n\t\t\t});\n\t\t}\n\t}\n\tgetObserversCount() {\n\t\treturn this.observers.length;\n\t}\n\tinvalidate() {\n\t\tif (!this.state.isInvalidated) this.#dispatch({ type: \"invalidate\" });\n\t}\n\tasync fetch(options, fetchOptions) {\n\t\tif (this.state.fetchStatus !== \"idle\" && this.#retryer?.status() !== \"rejected\") {\n\t\t\tif (this.state.data !== void 0 && fetchOptions?.cancelRefetch) this.cancel({ silent: true });\n\t\t\telse if (this.#retryer) {\n\t\t\t\tthis.#retryer.continueRetry();\n\t\t\t\treturn this.#retryer.promise;\n\t\t\t}\n\t\t}\n\t\tif (options) this.setOptions(options);\n\t\tif (!this.options.queryFn) {\n\t\t\tconst observer = this.observers.find((x) => x.options.queryFn);\n\t\t\tif (observer) this.setOptions(observer.options);\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (!Array.isArray(this.options.queryKey)) console.error(`As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`);\n\t\t}\n\t\tconst abortController = new AbortController();\n\t\tconst addSignalProperty = (object) => {\n\t\t\tObject.defineProperty(object, \"signal\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => {\n\t\t\t\t\tthis.#abortSignalConsumed = true;\n\t\t\t\t\treturn abortController.signal;\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\t\tconst fetchFn = () => {\n\t\t\tconst queryFn = ensureQueryFn(this.options, fetchOptions);\n\t\t\tconst createQueryFnContext = () => {\n\t\t\t\tconst queryFnContext = {\n\t\t\t\t\tclient: this.#client,\n\t\t\t\t\tqueryKey: this.queryKey,\n\t\t\t\t\tmeta: this.meta\n\t\t\t\t};\n\t\t\t\taddSignalProperty(queryFnContext);\n\t\t\t\treturn queryFnContext;\n\t\t\t};\n\t\t\tconst queryFnContext = createQueryFnContext();\n\t\t\tthis.#abortSignalConsumed = false;\n\t\t\tif (this.options.persister) return this.options.persister(queryFn, queryFnContext, this);\n\t\t\treturn queryFn(queryFnContext);\n\t\t};\n\t\tconst createFetchContext = () => {\n\t\t\tconst context = {\n\t\t\t\tfetchOptions,\n\t\t\t\toptions: this.options,\n\t\t\t\tqueryKey: this.queryKey,\n\t\t\t\tclient: this.#client,\n\t\t\t\tstate: this.state,\n\t\t\t\tfetchFn\n\t\t\t};\n\t\t\taddSignalProperty(context);\n\t\t\treturn context;\n\t\t};\n\t\tconst context = createFetchContext();\n\t\t(this.#queryType === \"infinite\" ? infiniteQueryBehavior(this.options.pages) : this.options.behavior)?.onFetch(context, this);\n\t\tthis.#revertState = this.state;\n\t\tif (this.state.fetchStatus === \"idle\" || this.state.fetchMeta !== context.fetchOptions?.meta) this.#dispatch({\n\t\t\ttype: \"fetch\",\n\t\t\tmeta: context.fetchOptions?.meta\n\t\t});\n\t\tconst retryer = this.#retryer = createRetryer({\n\t\t\tinitialPromise: fetchOptions?.initialPromise,\n\t\t\tfn: context.fetchFn,\n\t\t\tonCancel: (error) => {\n\t\t\t\tif (error instanceof CancelledError && error.revert) this.setState({\n\t\t\t\t\t...this.#revertState,\n\t\t\t\t\tfetchStatus: \"idle\"\n\t\t\t\t});\n\t\t\t\tabortController.abort();\n\t\t\t},\n\t\t\tonFail: (failureCount, error) => {\n\t\t\t\tthis.#dispatch({\n\t\t\t\t\ttype: \"failed\",\n\t\t\t\t\tfailureCount,\n\t\t\t\t\terror\n\t\t\t\t});\n\t\t\t},\n\t\t\tonPause: () => {\n\t\t\t\tthis.#dispatch({ type: \"pause\" });\n\t\t\t},\n\t\t\tonContinue: () => {\n\t\t\t\tthis.#dispatch({ type: \"continue\" });\n\t\t\t},\n\t\t\tretry: context.options.retry,\n\t\t\tretryDelay: context.options.retryDelay,\n\t\t\tnetworkMode: context.options.networkMode,\n\t\t\tcanRun: () => true\n\t\t});\n\t\ttry {\n\t\t\tconst data = await retryer.start();\n\t\t\tif (data === void 0) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`);\n\t\t\t\tthrow new Error(`${this.queryHash} data is undefined`);\n\t\t\t}\n\t\t\tthis.setData(data);\n\t\t\tthis.#cache.config.onSuccess?.(data, this);\n\t\t\tthis.#cache.config.onSettled?.(data, this.state.error, this);\n\t\t\treturn data;\n\t\t} catch (error) {\n\t\t\tif (error instanceof CancelledError) {\n\t\t\t\tif (error.silent) return this.#retryer.promise;\n\t\t\t\telse if (error.revert) {\n\t\t\t\t\tif (this.state.data === void 0) throw error;\n\t\t\t\t\treturn this.state.data;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.#dispatch({\n\t\t\t\ttype: \"error\",\n\t\t\t\terror\n\t\t\t});\n\t\t\tthis.#cache.config.onError?.(error, this);\n\t\t\tthis.#cache.config.onSettled?.(this.state.data, error, this);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tif (this.#retryer === retryer) this.#retryer = void 0;\n\t\t\tthis.scheduleGc();\n\t\t}\n\t}\n\t#dispatch(action) {\n\t\tconst reducer = (state) => {\n\t\t\tswitch (action.type) {\n\t\t\t\tcase \"failed\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tfetchFailureCount: action.failureCount,\n\t\t\t\t\tfetchFailureReason: action.error\n\t\t\t\t};\n\t\t\t\tcase \"pause\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tfetchStatus: \"paused\"\n\t\t\t\t};\n\t\t\t\tcase \"continue\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tfetchStatus: \"fetching\"\n\t\t\t\t};\n\t\t\t\tcase \"fetch\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\t...fetchState(state.data, this.options),\n\t\t\t\t\tfetchMeta: action.meta ?? null\n\t\t\t\t};\n\t\t\t\tcase \"success\":\n\t\t\t\t\tconst newState = {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\t...successState(action.data, action.dataUpdatedAt),\n\t\t\t\t\t\tdataUpdateCount: state.dataUpdateCount + 1,\n\t\t\t\t\t\t...!action.manual && {\n\t\t\t\t\t\t\tfetchStatus: \"idle\",\n\t\t\t\t\t\t\tfetchFailureCount: 0,\n\t\t\t\t\t\t\tfetchFailureReason: null\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tthis.#revertState = action.manual ? newState : void 0;\n\t\t\t\t\treturn newState;\n\t\t\t\tcase \"error\":\n\t\t\t\t\tconst error = action.error;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\terror,\n\t\t\t\t\t\terrorUpdateCount: state.errorUpdateCount + 1,\n\t\t\t\t\t\terrorUpdatedAt: Date.now(),\n\t\t\t\t\t\tfetchFailureCount: state.fetchFailureCount + 1,\n\t\t\t\t\t\tfetchFailureReason: error,\n\t\t\t\t\t\tfetchStatus: \"idle\",\n\t\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\t\tisInvalidated: true\n\t\t\t\t\t};\n\t\t\t\tcase \"invalidate\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tisInvalidated: true\n\t\t\t\t};\n\t\t\t\tcase \"setState\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\t...action.state\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\tthis.state = reducer(this.state);\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.observers.slice().forEach((observer) => {\n\t\t\t\tobserver.onQueryUpdate();\n\t\t\t});\n\t\t\tthis.#cache.notify({\n\t\t\t\tquery: this,\n\t\t\t\ttype: \"updated\",\n\t\t\t\taction\n\t\t\t});\n\t\t});\n\t}\n};\nfunction fetchState(data, options) {\n\treturn {\n\t\tfetchFailureCount: 0,\n\t\tfetchFailureReason: null,\n\t\tfetchStatus: canFetch(options.networkMode) ? \"fetching\" : \"paused\",\n\t\t...data === void 0 && {\n\t\t\terror: null,\n\t\t\tstatus: \"pending\"\n\t\t}\n\t};\n}\nfunction successState(data, dataUpdatedAt) {\n\treturn {\n\t\tdata,\n\t\tdataUpdatedAt: dataUpdatedAt ?? Date.now(),\n\t\terror: null,\n\t\tisInvalidated: false,\n\t\tstatus: \"success\"\n\t};\n}\nfunction getDefaultState(options) {\n\tconst data = typeof options.initialData === \"function\" ? options.initialData() : options.initialData;\n\tconst hasData = data !== void 0;\n\tconst initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === \"function\" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\n\treturn {\n\t\tdata,\n\t\tdataUpdateCount: 0,\n\t\tdataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,\n\t\terror: null,\n\t\terrorUpdateCount: 0,\n\t\terrorUpdatedAt: 0,\n\t\tfetchFailureCount: 0,\n\t\tfetchFailureReason: null,\n\t\tfetchMeta: null,\n\t\tisInvalidated: false,\n\t\tstatus: hasData ? \"success\" : \"pending\",\n\t\tfetchStatus: \"idle\"\n\t};\n}\n//#endregion\nexport { Query, fetchState };\n\n//# sourceMappingURL=query.js.map","import { timeoutManager } from \"./timeoutManager.js\";\nimport { isValidTimeout, noop, replaceData, resolveQueryValue, shallowEqualObjects, timeUntilStale } from \"./utils.js\";\nimport { isServer } from \"./environmentManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { fetchState } from \"./query.js\";\n//#region src/queryObserver.ts\nvar QueryObserver = class extends Subscribable {\n\t#client;\n\t#currentQuery = void 0;\n\t#currentQueryInitialState = void 0;\n\t#currentResult = void 0;\n\t#currentResultState;\n\t#currentResultOptions;\n\t#selectError;\n\t#selectFn;\n\t#selectResult;\n\t#lastQueryWithDefinedData;\n\t#staleTimeoutId;\n\t#refetchIntervalId;\n\t#currentRefetchInterval;\n\t#trackedProps = /* @__PURE__ */ new Set();\n\tconstructor(client, options) {\n\t\tsuper();\n\t\tthis.options = options;\n\t\tthis.#client = client;\n\t\tthis.#selectError = null;\n\t\tthis.bindMethods();\n\t\tthis.setOptions(options);\n\t}\n\tbindMethods() {\n\t\tthis.refetch = this.refetch.bind(this);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1) {\n\t\t\tthis.#currentQuery.addObserver(this);\n\t\t\tif (shouldFetchOnMount(this.#currentQuery, this.options)) this.#executeFetch();\n\t\t\telse this.updateResult();\n\t\t\tthis.#updateTimers();\n\t\t}\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) this.destroy();\n\t}\n\tshouldFetchOnReconnect() {\n\t\treturn shouldFetchOn(this.#currentQuery, this.options, this.options.refetchOnReconnect);\n\t}\n\tshouldFetchOnWindowFocus() {\n\t\treturn shouldFetchOn(this.#currentQuery, this.options, this.options.refetchOnWindowFocus);\n\t}\n\tdestroy() {\n\t\tthis.listeners = /* @__PURE__ */ new Set();\n\t\tthis.#clearStaleTimeout();\n\t\tthis.#clearRefetchInterval();\n\t\tthis.#currentQuery.removeObserver(this);\n\t}\n\tsetOptions(options) {\n\t\tconst prevOptions = this.options;\n\t\tconst prevQuery = this.#currentQuery;\n\t\tthis.options = this.#client.defaultQueryOptions(options);\n\t\tif (this.options.enabled !== void 0 && typeof this.options.enabled !== \"boolean\" && typeof this.options.enabled !== \"function\" && typeof resolveQueryValue(this.options.enabled, this.#currentQuery) !== \"boolean\") throw new Error(\"Expected enabled to be a boolean or a callback that returns a boolean\");\n\t\tthis.#updateQuery();\n\t\tthis.#currentQuery.setOptions(this.options);\n\t\tif (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) this.#client.getQueryCache().notify({\n\t\t\ttype: \"observerOptionsUpdated\",\n\t\t\tquery: this.#currentQuery,\n\t\t\tobserver: this\n\t\t});\n\t\tconst mounted = this.hasListeners();\n\t\tif (mounted && shouldFetchOptionally(this.#currentQuery, prevQuery, this.options, prevOptions)) this.#executeFetch();\n\t\tthis.updateResult();\n\t\tif (mounted && (this.#currentQuery !== prevQuery || resolveQueryValue(this.options.enabled, this.#currentQuery) !== resolveQueryValue(prevOptions.enabled, this.#currentQuery) || resolveQueryValue(this.options.staleTime, this.#currentQuery) !== resolveQueryValue(prevOptions.staleTime, this.#currentQuery))) this.#updateStaleTimeout();\n\t\tconst nextRefetchInterval = this.#computeRefetchInterval();\n\t\tif (mounted && (this.#currentQuery !== prevQuery || resolveQueryValue(this.options.enabled, this.#currentQuery) !== resolveQueryValue(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) this.#updateRefetchInterval(nextRefetchInterval);\n\t}\n\tgetOptimisticResult(options) {\n\t\tconst query = this.#client.getQueryCache().build(this.#client, options);\n\t\tconst result = this.createResult(query, options);\n\t\tif (!shallowEqualObjects(this.getCurrentResult(), result)) {\n\t\t\tthis.#currentResult = result;\n\t\t\tthis.#currentResultOptions = this.options;\n\t\t\tthis.#currentResultState = this.#currentQuery.state;\n\t\t}\n\t\treturn result;\n\t}\n\tgetCurrentResult() {\n\t\treturn this.#currentResult;\n\t}\n\ttrackResult(result, onPropTracked) {\n\t\treturn new Proxy(result, { get: (target, key) => {\n\t\t\tthis.trackProp(key);\n\t\t\tonPropTracked?.(key);\n\t\t\treturn Reflect.get(target, key);\n\t\t} });\n\t}\n\ttrackProp(key) {\n\t\tthis.#trackedProps.add(key);\n\t}\n\tgetCurrentQuery() {\n\t\treturn this.#currentQuery;\n\t}\n\trefetch({ ...options } = {}) {\n\t\treturn this.fetch({ ...options });\n\t}\n\tfetchOptimistic(options) {\n\t\tconst defaultedOptions = this.#client.defaultQueryOptions(options);\n\t\tconst query = this.#client.getQueryCache().build(this.#client, defaultedOptions);\n\t\tlet unsubscribe = () => {};\n\t\tlet resolveEarly;\n\t\tconst cachePromise = new Promise((resolve) => {\n\t\t\tresolveEarly = resolve;\n\t\t\tunsubscribe = this.#client.getQueryCache().subscribe((event) => {\n\t\t\t\tif (event.type === \"updated\" && event.query.queryHash === query.queryHash && query.state.data !== void 0) {\n\t\t\t\t\tunsubscribe();\n\t\t\t\t\tresolve(this.createResult(query, defaultedOptions));\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn Promise.race([query.fetch().then(() => {\n\t\t\tconst result = this.createResult(query, defaultedOptions);\n\t\t\tresolveEarly?.(result);\n\t\t\treturn result;\n\t\t}).finally(() => {\n\t\t\tunsubscribe();\n\t\t}), cachePromise]);\n\t}\n\tfetch(fetchOptions) {\n\t\treturn this.#executeFetch({\n\t\t\t...fetchOptions,\n\t\t\tcancelRefetch: fetchOptions.cancelRefetch ?? true\n\t\t}).then(() => {\n\t\t\tthis.updateResult();\n\t\t\treturn this.#currentResult;\n\t\t});\n\t}\n\t#executeFetch(fetchOptions) {\n\t\tthis.#updateQuery();\n\t\tlet promise = this.#currentQuery.fetch(this.options, fetchOptions);\n\t\tif (!fetchOptions?.throwOnError) promise = promise.catch(noop);\n\t\treturn promise;\n\t}\n\t#shouldScheduleTimer(timeout) {\n\t\treturn !isServer() && resolveQueryValue(this.options.enabled, this.#currentQuery) !== false && isValidTimeout(timeout);\n\t}\n\t#updateStaleTimeout() {\n\t\tthis.#clearStaleTimeout();\n\t\tconst staleTime = resolveQueryValue(this.options.staleTime, this.#currentQuery);\n\t\tif (this.#currentResult.isStale || !this.#shouldScheduleTimer(staleTime)) return;\n\t\tconst timeout = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime) + 1;\n\t\tthis.#staleTimeoutId = timeoutManager.setTimeout(() => {\n\t\t\tif (!this.#currentResult.isStale) this.updateResult();\n\t\t}, timeout);\n\t}\n\t#computeRefetchInterval() {\n\t\treturn (typeof this.options.refetchInterval === \"function\" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;\n\t}\n\t#updateRefetchInterval(nextInterval) {\n\t\tthis.#clearRefetchInterval();\n\t\tthis.#currentRefetchInterval = nextInterval;\n\t\tif (this.#currentRefetchInterval === 0 || !this.#shouldScheduleTimer(this.#currentRefetchInterval)) return;\n\t\tthis.#refetchIntervalId = timeoutManager.setInterval(() => {\n\t\t\tif (this.options.refetchIntervalInBackground || focusManager.isFocused()) this.#executeFetch();\n\t\t}, this.#currentRefetchInterval);\n\t}\n\t#updateTimers() {\n\t\tthis.#updateStaleTimeout();\n\t\tthis.#updateRefetchInterval(this.#computeRefetchInterval());\n\t}\n\t#clearStaleTimeout() {\n\t\tif (this.#staleTimeoutId !== void 0) {\n\t\t\ttimeoutManager.clearTimeout(this.#staleTimeoutId);\n\t\t\tthis.#staleTimeoutId = void 0;\n\t\t}\n\t}\n\t#clearRefetchInterval() {\n\t\tif (this.#refetchIntervalId !== void 0) {\n\t\t\ttimeoutManager.clearInterval(this.#refetchIntervalId);\n\t\t\tthis.#refetchIntervalId = void 0;\n\t\t}\n\t}\n\tcreateResult(query, options) {\n\t\tconst prevQuery = this.#currentQuery;\n\t\tconst prevOptions = this.options;\n\t\tconst prevResult = this.#currentResult;\n\t\tconst prevResultState = this.#currentResultState;\n\t\tconst prevResultOptions = this.#currentResultOptions;\n\t\tconst queryInitialState = query !== prevQuery ? query.state : this.#currentQueryInitialState;\n\t\tconst { state } = query;\n\t\tlet newState = { ...state };\n\t\tlet isPlaceholderData = false;\n\t\tlet data;\n\t\tif (options._optimisticResults) {\n\t\t\tconst mounted = this.hasListeners();\n\t\t\tconst fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n\t\t\tconst fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n\t\t\tif (fetchOnMount || fetchOptionally) newState = {\n\t\t\t\t...newState,\n\t\t\t\t...fetchState(state.data, query.options)\n\t\t\t};\n\t\t\tif (options._optimisticResults === \"isRestoring\") newState.fetchStatus = \"idle\";\n\t\t}\n\t\tlet { error, errorUpdatedAt, status } = newState;\n\t\tdata = newState.data;\n\t\tlet skipSelect = false;\n\t\tif (options.placeholderData !== void 0 && data === void 0 && status === \"pending\") {\n\t\t\tlet placeholderData;\n\t\t\tif (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {\n\t\t\t\tplaceholderData = prevResult.data;\n\t\t\t\tskipSelect = true;\n\t\t\t} else placeholderData = typeof options.placeholderData === \"function\" ? options.placeholderData(this.#lastQueryWithDefinedData?.state.data, this.#lastQueryWithDefinedData) : options.placeholderData;\n\t\t\tif (placeholderData !== void 0) {\n\t\t\t\tstatus = \"success\";\n\t\t\t\tdata = replaceData(prevResult?.data, placeholderData, options);\n\t\t\t\tisPlaceholderData = true;\n\t\t\t}\n\t\t}\n\t\tif (options.select && data !== void 0 && !skipSelect) {\n\t\t\tif (prevResult && data === prevResultState?.data && options.select === this.#selectFn) data = this.#selectResult;\n\t\t\telse try {\n\t\t\t\tthis.#selectFn = options.select;\n\t\t\t\tdata = options.select(data);\n\t\t\t\tdata = replaceData(prevResult?.data, data, options);\n\t\t\t\tthis.#selectResult = data;\n\t\t\t\tthis.#selectError = null;\n\t\t\t} catch (selectError) {\n\t\t\t\tthis.#selectError = selectError;\n\t\t\t}\n\t\t} else if (data === void 0) this.#selectError = null;\n\t\tif (this.#selectError) {\n\t\t\terror = this.#selectError;\n\t\t\tdata = this.#selectResult;\n\t\t\terrorUpdatedAt = Date.now();\n\t\t\tstatus = \"error\";\n\t\t\tisPlaceholderData = false;\n\t\t}\n\t\tconst isFetching = newState.fetchStatus === \"fetching\";\n\t\tconst isPending = status === \"pending\";\n\t\tconst isError = status === \"error\";\n\t\tconst isLoading = isPending && isFetching;\n\t\tconst hasData = data !== void 0;\n\t\treturn {\n\t\t\tstatus,\n\t\t\tfetchStatus: newState.fetchStatus,\n\t\t\tisPending,\n\t\t\tisSuccess: status === \"success\",\n\t\t\tisError,\n\t\t\tisInitialLoading: isLoading,\n\t\t\tisLoading,\n\t\t\tdata,\n\t\t\tdataUpdatedAt: newState.dataUpdatedAt,\n\t\t\terror,\n\t\t\terrorUpdatedAt,\n\t\t\tfailureCount: newState.fetchFailureCount,\n\t\t\tfailureReason: newState.fetchFailureReason,\n\t\t\terrorUpdateCount: newState.errorUpdateCount,\n\t\t\tisFetched: query.isFetched(),\n\t\t\tisFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,\n\t\t\tisFetching,\n\t\t\tisRefetching: isFetching && !isPending,\n\t\t\tisLoadingError: isError && !hasData,\n\t\t\tisPaused: newState.fetchStatus === \"paused\",\n\t\t\tisPlaceholderData,\n\t\t\tisRefetchError: isError && hasData,\n\t\t\tisStale: isStale(query, options),\n\t\t\trefetch: this.refetch,\n\t\t\tisEnabled: resolveQueryValue(options.enabled, query) !== false\n\t\t};\n\t}\n\tupdateResult() {\n\t\tconst prevResult = this.#currentResult;\n\t\tconst nextResult = this.createResult(this.#currentQuery, this.options);\n\t\tthis.#currentResultState = this.#currentQuery.state;\n\t\tthis.#currentResultOptions = this.options;\n\t\tif (this.#currentResultState.data !== void 0) this.#lastQueryWithDefinedData = this.#currentQuery;\n\t\tif (shallowEqualObjects(nextResult, prevResult)) return;\n\t\tthis.#currentResult = nextResult;\n\t\tconst shouldNotifyListeners = () => {\n\t\t\tif (!prevResult) return true;\n\t\t\tconst { notifyOnChangeProps } = this.options;\n\t\t\tconst notifyOnChangePropsValue = typeof notifyOnChangeProps === \"function\" ? notifyOnChangeProps() : notifyOnChangeProps;\n\t\t\tif (notifyOnChangePropsValue === \"all\" || !notifyOnChangePropsValue && !this.#trackedProps.size) return true;\n\t\t\tconst includedProps = new Set(notifyOnChangePropsValue ?? this.#trackedProps);\n\t\t\tif (this.options.throwOnError) includedProps.add(\"error\");\n\t\t\treturn Object.keys(this.#currentResult).some((key) => {\n\t\t\t\tconst typedKey = key;\n\t\t\t\treturn this.#currentResult[typedKey] !== prevResult[typedKey] && includedProps.has(typedKey);\n\t\t\t});\n\t\t};\n\t\tconst notifyListeners = shouldNotifyListeners();\n\t\tnotifyManager.batch(() => {\n\t\t\tif (notifyListeners) this.listeners.forEach((listener) => {\n\t\t\t\tlistener(this.#currentResult);\n\t\t\t});\n\t\t\tthis.#client.getQueryCache().notify({\n\t\t\t\tquery: this.#currentQuery,\n\t\t\t\ttype: \"observerResultsUpdated\"\n\t\t\t});\n\t\t});\n\t}\n\t#updateQuery() {\n\t\tconst query = this.#client.getQueryCache().build(this.#client, this.options);\n\t\tif (query === this.#currentQuery) return;\n\t\tconst prevQuery = this.#currentQuery;\n\t\tthis.#currentQuery = query;\n\t\tthis.#currentQueryInitialState = query.state;\n\t\tif (this.hasListeners()) {\n\t\t\tprevQuery?.removeObserver(this);\n\t\t\tquery.addObserver(this);\n\t\t}\n\t}\n\tonQueryUpdate() {\n\t\tthis.updateResult();\n\t\tif (this.hasListeners()) this.#updateTimers();\n\t}\n};\nfunction shouldLoadOnMount(query, options) {\n\treturn resolveQueryValue(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === \"error\" && resolveQueryValue(options.retryOnMount, query) === false);\n}\nfunction shouldFetchOnMount(query, options) {\n\treturn shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\nfunction shouldFetchOn(query, options, field) {\n\tif (resolveQueryValue(options.enabled, query) !== false && resolveQueryValue(options.staleTime, query) !== \"static\") {\n\t\tconst value = typeof field === \"function\" ? field(query) : field;\n\t\treturn value === \"always\" || value !== false && isStale(query, options);\n\t}\n\treturn false;\n}\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n\treturn (query !== prevQuery || resolveQueryValue(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== \"error\") && isStale(query, options);\n}\nfunction isStale(query, options) {\n\treturn resolveQueryValue(options.enabled, query) !== false && query.isStaleByTime(resolveQueryValue(options.staleTime, query));\n}\n//#endregion\nexport { QueryObserver };\n\n//# sourceMappingURL=queryObserver.js.map","import { hasNextPage, hasPreviousPage } from \"./infiniteQueryBehavior.js\";\nimport { QueryObserver } from \"./queryObserver.js\";\n//#region src/infiniteQueryObserver.ts\nvar InfiniteQueryObserver = class extends QueryObserver {\n\tconstructor(client, options) {\n\t\tsuper(client, options);\n\t}\n\tbindMethods() {\n\t\tsuper.bindMethods();\n\t\tthis.fetchNextPage = this.fetchNextPage.bind(this);\n\t\tthis.fetchPreviousPage = this.fetchPreviousPage.bind(this);\n\t}\n\tsetOptions(options) {\n\t\toptions._type = \"infinite\";\n\t\tsuper.setOptions(options);\n\t}\n\tgetOptimisticResult(options) {\n\t\toptions._type = \"infinite\";\n\t\treturn super.getOptimisticResult(options);\n\t}\n\tfetchNextPage(options) {\n\t\treturn this.fetch({\n\t\t\t...options,\n\t\t\tmeta: { fetchMore: { direction: \"forward\" } }\n\t\t});\n\t}\n\tfetchPreviousPage(options) {\n\t\treturn this.fetch({\n\t\t\t...options,\n\t\t\tmeta: { fetchMore: { direction: \"backward\" } }\n\t\t});\n\t}\n\tcreateResult(query, options) {\n\t\tconst { state } = query;\n\t\tconst parentResult = super.createResult(query, options);\n\t\tconst { isFetching, isRefetching, isError, isRefetchError } = parentResult;\n\t\tconst fetchDirection = state.fetchMeta?.fetchMore?.direction;\n\t\tconst isFetchNextPageError = isError && fetchDirection === \"forward\";\n\t\tconst isFetchingNextPage = isFetching && fetchDirection === \"forward\";\n\t\tconst isFetchPreviousPageError = isError && fetchDirection === \"backward\";\n\t\tconst isFetchingPreviousPage = isFetching && fetchDirection === \"backward\";\n\t\treturn {\n\t\t\t...parentResult,\n\t\t\tfetchNextPage: this.fetchNextPage,\n\t\t\tfetchPreviousPage: this.fetchPreviousPage,\n\t\t\thasNextPage: hasNextPage(options, state.data),\n\t\t\thasPreviousPage: hasPreviousPage(options, state.data),\n\t\t\tisFetchNextPageError,\n\t\t\tisFetchingNextPage,\n\t\t\tisFetchPreviousPageError,\n\t\t\tisFetchingPreviousPage,\n\t\t\tisRefetchError: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError,\n\t\t\tisRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage\n\t\t};\n\t}\n};\n//#endregion\nexport { InfiniteQueryObserver };\n\n//# sourceMappingURL=infiniteQueryObserver.js.map","import { notifyManager } from \"./notifyManager.js\";\nimport { createRetryer } from \"./retryer.js\";\nimport { Removable } from \"./removable.js\";\n//#region src/mutation.ts\nvar Mutation = class extends Removable {\n\t#client;\n\t#observers;\n\t#mutationCache;\n\t#retryer;\n\tconstructor(config) {\n\t\tsuper();\n\t\tthis.#client = config.client;\n\t\tthis.mutationId = config.mutationId;\n\t\tthis.#mutationCache = config.mutationCache;\n\t\tthis.#observers = [];\n\t\tthis.state = config.state || getDefaultState();\n\t\tthis.setOptions(config.options);\n\t\tthis.scheduleGc();\n\t}\n\tsetOptions(options) {\n\t\tthis.options = options;\n\t\tthis.updateGcTime(this.options.gcTime);\n\t}\n\tget meta() {\n\t\treturn this.options.meta;\n\t}\n\taddObserver(observer) {\n\t\tif (!this.#observers.includes(observer)) {\n\t\t\tthis.#observers.push(observer);\n\t\t\tthis.clearGcTimeout();\n\t\t\tthis.#mutationCache.notify({\n\t\t\t\ttype: \"observerAdded\",\n\t\t\t\tmutation: this,\n\t\t\t\tobserver\n\t\t\t});\n\t\t}\n\t}\n\tremoveObserver(observer) {\n\t\tthis.#observers = this.#observers.filter((x) => x !== observer);\n\t\tthis.scheduleGc();\n\t\tthis.#mutationCache.notify({\n\t\t\ttype: \"observerRemoved\",\n\t\t\tmutation: this,\n\t\t\tobserver\n\t\t});\n\t}\n\toptionalRemove() {\n\t\tif (!this.#observers.length) {\n\t\t\tif (this.state.status === \"pending\") this.scheduleGc();\n\t\t\telse this.#mutationCache.remove(this);\n\t\t}\n\t}\n\tcontinue() {\n\t\treturn this.#retryer?.continue() ?? (this.state.status === \"pending\" ? this.execute(this.state.variables) : Promise.resolve());\n\t}\n\tasync execute(variables) {\n\t\tconst onContinue = () => {\n\t\t\tthis.#dispatch({ type: \"continue\" });\n\t\t};\n\t\tconst mutationFnContext = {\n\t\t\tclient: this.#client,\n\t\t\tmeta: this.options.meta,\n\t\t\tmutationKey: this.options.mutationKey\n\t\t};\n\t\tconst retryer = this.#retryer = createRetryer({\n\t\t\tfn: () => {\n\t\t\t\tif (!this.options.mutationFn) return Promise.reject(/* @__PURE__ */ new Error(\"No mutationFn found\"));\n\t\t\t\treturn this.options.mutationFn(variables, mutationFnContext);\n\t\t\t},\n\t\t\tonFail: (failureCount, error) => {\n\t\t\t\tthis.#dispatch({\n\t\t\t\t\ttype: \"failed\",\n\t\t\t\t\tfailureCount,\n\t\t\t\t\terror\n\t\t\t\t});\n\t\t\t},\n\t\t\tonPause: () => {\n\t\t\t\tthis.#dispatch({ type: \"pause\" });\n\t\t\t},\n\t\t\tonContinue,\n\t\t\tretry: this.options.retry ?? 0,\n\t\t\tretryDelay: this.options.retryDelay,\n\t\t\tnetworkMode: this.options.networkMode,\n\t\t\tcanRun: () => this.#mutationCache.canRun(this)\n\t\t});\n\t\tconst restored = this.state.status === \"pending\";\n\t\tconst isPaused = !retryer.canStart();\n\t\ttry {\n\t\t\tif (restored) onContinue();\n\t\t\telse {\n\t\t\t\tthis.#dispatch({\n\t\t\t\t\ttype: \"pending\",\n\t\t\t\t\tvariables,\n\t\t\t\t\tisPaused\n\t\t\t\t});\n\t\t\t\tif (this.#mutationCache.config.onMutate) await this.#mutationCache.config.onMutate(variables, this, mutationFnContext);\n\t\t\t\tconst context = await this.options.onMutate?.(variables, mutationFnContext);\n\t\t\t\tif (context !== this.state.context) this.#dispatch({\n\t\t\t\t\ttype: \"pending\",\n\t\t\t\t\tcontext,\n\t\t\t\t\tvariables,\n\t\t\t\t\tisPaused\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst data = await retryer.start();\n\t\t\tawait this.#mutationCache.config.onSuccess?.(data, variables, this.state.context, this, mutationFnContext);\n\t\t\tawait this.options.onSuccess?.(data, variables, this.state.context, mutationFnContext);\n\t\t\tawait this.#mutationCache.config.onSettled?.(data, null, this.state.variables, this.state.context, this, mutationFnContext);\n\t\t\tawait this.options.onSettled?.(data, null, variables, this.state.context, mutationFnContext);\n\t\t\tthis.#dispatch({\n\t\t\t\ttype: \"success\",\n\t\t\t\tdata\n\t\t\t});\n\t\t\treturn data;\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\tawait this.#mutationCache.config.onError?.(error, variables, this.state.context, this, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.options.onError?.(error, variables, this.state.context, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.#mutationCache.config.onSettled?.(void 0, error, this.state.variables, this.state.context, this, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.options.onSettled?.(void 0, error, variables, this.state.context, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\tthis.#dispatch({\n\t\t\t\ttype: \"error\",\n\t\t\t\terror\n\t\t\t});\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tif (this.#retryer === retryer) this.#retryer = void 0;\n\t\t\tthis.#mutationCache.runNext(this);\n\t\t}\n\t}\n\t#dispatch(action) {\n\t\tconst reducer = (state) => {\n\t\t\tswitch (action.type) {\n\t\t\t\tcase \"failed\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tfailureCount: action.failureCount,\n\t\t\t\t\tfailureReason: action.error\n\t\t\t\t};\n\t\t\t\tcase \"pause\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tisPaused: true\n\t\t\t\t};\n\t\t\t\tcase \"continue\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tisPaused: false\n\t\t\t\t};\n\t\t\t\tcase \"pending\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tcontext: action.context,\n\t\t\t\t\tdata: void 0,\n\t\t\t\t\tfailureCount: 0,\n\t\t\t\t\tfailureReason: null,\n\t\t\t\t\terror: null,\n\t\t\t\t\tisPaused: action.isPaused,\n\t\t\t\t\tstatus: \"pending\",\n\t\t\t\t\tvariables: action.variables,\n\t\t\t\t\tsubmittedAt: Date.now()\n\t\t\t\t};\n\t\t\t\tcase \"success\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tdata: action.data,\n\t\t\t\t\tfailureCount: 0,\n\t\t\t\t\tfailureReason: null,\n\t\t\t\t\terror: null,\n\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\tisPaused: false\n\t\t\t\t};\n\t\t\t\tcase \"error\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tdata: void 0,\n\t\t\t\t\terror: action.error,\n\t\t\t\t\tfailureCount: state.failureCount + 1,\n\t\t\t\t\tfailureReason: action.error,\n\t\t\t\t\tisPaused: false,\n\t\t\t\t\tstatus: \"error\"\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\tthis.state = reducer(this.state);\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.#observers.forEach((observer) => {\n\t\t\t\tobserver.onMutationUpdate(action);\n\t\t\t});\n\t\t\tthis.#mutationCache.notify({\n\t\t\t\tmutation: this,\n\t\t\t\ttype: \"updated\",\n\t\t\t\taction\n\t\t\t});\n\t\t});\n\t}\n};\nfunction getDefaultState() {\n\treturn {\n\t\tcontext: void 0,\n\t\tdata: void 0,\n\t\terror: null,\n\t\tfailureCount: 0,\n\t\tfailureReason: null,\n\t\tisPaused: false,\n\t\tstatus: \"idle\",\n\t\tvariables: void 0,\n\t\tsubmittedAt: 0\n\t};\n}\n//#endregion\nexport { Mutation, getDefaultState };\n\n//# sourceMappingURL=mutation.js.map","import { matchMutation, noop } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Mutation } from \"./mutation.js\";\n//#region src/mutationCache.ts\nvar MutationCache = class extends Subscribable {\n\t#mutations;\n\t#scopes;\n\t#mutationId;\n\tconstructor(config = {}) {\n\t\tsuper();\n\t\tthis.config = config;\n\t\tthis.#mutations = /* @__PURE__ */ new Set();\n\t\tthis.#scopes = /* @__PURE__ */ new Map();\n\t\tthis.#mutationId = 0;\n\t}\n\tbuild(client, options, state) {\n\t\tconst mutation = new Mutation({\n\t\t\tclient,\n\t\t\tmutationCache: this,\n\t\t\tmutationId: ++this.#mutationId,\n\t\t\toptions: client.defaultMutationOptions(options),\n\t\t\tstate\n\t\t});\n\t\tthis.add(mutation);\n\t\treturn mutation;\n\t}\n\tadd(mutation) {\n\t\tthis.#mutations.add(mutation);\n\t\tconst scope = scopeFor(mutation);\n\t\tif (typeof scope === \"string\") {\n\t\t\tconst scopedMutations = this.#scopes.get(scope);\n\t\t\tif (scopedMutations) scopedMutations.push(mutation);\n\t\t\telse this.#scopes.set(scope, [mutation]);\n\t\t}\n\t\tthis.notify({\n\t\t\ttype: \"added\",\n\t\t\tmutation\n\t\t});\n\t}\n\tremove(mutation) {\n\t\tif (this.#mutations.delete(mutation)) {\n\t\t\tconst scope = scopeFor(mutation);\n\t\t\tif (typeof scope === \"string\") {\n\t\t\t\tconst scopedMutations = this.#scopes.get(scope);\n\t\t\t\tif (scopedMutations) {\n\t\t\t\t\tif (scopedMutations.length > 1) {\n\t\t\t\t\t\tconst index = scopedMutations.indexOf(mutation);\n\t\t\t\t\t\tif (index !== -1) scopedMutations.splice(index, 1);\n\t\t\t\t\t} else if (scopedMutations[0] === mutation) this.#scopes.delete(scope);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.notify({\n\t\t\ttype: \"removed\",\n\t\t\tmutation\n\t\t});\n\t}\n\tcanRun(mutation) {\n\t\tconst scope = scopeFor(mutation);\n\t\tif (typeof scope === \"string\") {\n\t\t\tconst firstPendingMutation = this.#scopes.get(scope)?.find((m) => m.state.status === \"pending\");\n\t\t\treturn !firstPendingMutation || firstPendingMutation === mutation;\n\t\t} else return true;\n\t}\n\trunNext(mutation) {\n\t\tconst scope = scopeFor(mutation);\n\t\tif (typeof scope === \"string\") return (this.#scopes.get(scope)?.find((m) => m !== mutation && m.state.isPaused))?.continue() ?? Promise.resolve();\n\t\telse return Promise.resolve();\n\t}\n\tclear() {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.#mutations.forEach((mutation) => {\n\t\t\t\tthis.notify({\n\t\t\t\t\ttype: \"removed\",\n\t\t\t\t\tmutation\n\t\t\t\t});\n\t\t\t});\n\t\t\tthis.#mutations.clear();\n\t\t\tthis.#scopes.clear();\n\t\t});\n\t}\n\tgetAll() {\n\t\treturn Array.from(this.#mutations);\n\t}\n\tfind(filters) {\n\t\tconst defaultedFilters = {\n\t\t\texact: true,\n\t\t\t...filters\n\t\t};\n\t\treturn this.getAll().find((mutation) => matchMutation(defaultedFilters, mutation));\n\t}\n\tfindAll(filters = {}) {\n\t\treturn this.getAll().filter((mutation) => matchMutation(filters, mutation));\n\t}\n\tnotify(event) {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(event);\n\t\t\t});\n\t\t});\n\t}\n\tresumePausedMutations() {\n\t\tconst pausedMutations = this.getAll().filter((x) => x.state.isPaused);\n\t\treturn notifyManager.batch(() => Promise.all(pausedMutations.map((mutation) => mutation.continue().catch(noop))));\n\t}\n};\nfunction scopeFor(mutation) {\n\treturn mutation.options.scope?.id;\n}\n//#endregion\nexport { MutationCache };\n\n//# sourceMappingURL=mutationCache.js.map","import { hashKey, shallowEqualObjects } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { getDefaultState } from \"./mutation.js\";\n//#region src/mutationObserver.ts\nvar MutationObserver = class extends Subscribable {\n\t#client;\n\t#currentResult = void 0;\n\t#currentMutation;\n\t#mutateOptions;\n\tconstructor(client, options) {\n\t\tsuper();\n\t\tthis.#client = client;\n\t\tthis.setOptions(options);\n\t\tthis.bindMethods();\n\t\tthis.#updateResult();\n\t}\n\tbindMethods() {\n\t\tthis.mutate = this.mutate.bind(this);\n\t\tthis.reset = this.reset.bind(this);\n\t}\n\tsetOptions(options) {\n\t\tconst prevOptions = this.options;\n\t\tthis.options = this.#client.defaultMutationOptions(options);\n\t\tif (!shallowEqualObjects(this.options, prevOptions)) this.#client.getMutationCache().notify({\n\t\t\ttype: \"observerOptionsUpdated\",\n\t\t\tmutation: this.#currentMutation,\n\t\t\tobserver: this\n\t\t});\n\t\tif (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) this.reset();\n\t\telse if (this.#currentMutation?.state.status === \"pending\") this.#currentMutation.setOptions(this.options);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1 && this.#currentMutation) {\n\t\t\tthis.#currentMutation.addObserver(this);\n\t\t\tthis.#updateResult();\n\t\t}\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) this.#currentMutation?.removeObserver(this);\n\t}\n\tonMutationUpdate(action) {\n\t\tthis.#updateResult();\n\t\tthis.#notify(action);\n\t}\n\tgetCurrentResult() {\n\t\treturn this.#currentResult;\n\t}\n\treset() {\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = void 0;\n\t\tthis.#updateResult();\n\t\tthis.#notify();\n\t}\n\tmutate(variables, options) {\n\t\tthis.#mutateOptions = options;\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);\n\t\tthis.#currentMutation.addObserver(this);\n\t\treturn this.#currentMutation.execute(variables);\n\t}\n\t#updateResult() {\n\t\tconst state = this.#currentMutation?.state ?? getDefaultState();\n\t\tthis.#currentResult = {\n\t\t\t...state,\n\t\t\tisPending: state.status === \"pending\",\n\t\t\tisSuccess: state.status === \"success\",\n\t\t\tisError: state.status === \"error\",\n\t\t\tisIdle: state.status === \"idle\",\n\t\t\tmutate: this.mutate,\n\t\t\treset: this.reset\n\t\t};\n\t}\n\t#notify(action) {\n\t\tnotifyManager.batch(() => {\n\t\t\tif (this.#mutateOptions && this.hasListeners()) {\n\t\t\t\tconst variables = this.#currentResult.variables;\n\t\t\t\tconst onMutateResult = this.#currentResult.context;\n\t\t\t\tconst context = {\n\t\t\t\t\tclient: this.#client,\n\t\t\t\t\tmeta: this.options.meta,\n\t\t\t\t\tmutationKey: this.options.mutationKey\n\t\t\t\t};\n\t\t\t\tif (action?.type === \"success\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSuccess?.(action.data, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(action.data, null, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t} else if (action?.type === \"error\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onError?.(action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(void 0, action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(this.#currentResult);\n\t\t\t});\n\t\t});\n\t}\n};\n//#endregion\nexport { MutationObserver };\n\n//# sourceMappingURL=mutationObserver.js.map","import { hashQueryKeyByOptions, matchQuery } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Query } from \"./query.js\";\n//#region src/queryCache.ts\nvar QueryCache = class extends Subscribable {\n\t#queries;\n\tconstructor(config = {}) {\n\t\tsuper();\n\t\tthis.config = config;\n\t\tthis.#queries = /* @__PURE__ */ new Map();\n\t}\n\tbuild(client, options, state) {\n\t\tconst queryKey = options.queryKey;\n\t\tconst queryHash = options.queryHash ?? hashQueryKeyByOptions(queryKey, options);\n\t\tlet query = this.get(queryHash);\n\t\tif (!query) {\n\t\t\tquery = new Query({\n\t\t\t\tclient,\n\t\t\t\tqueryKey,\n\t\t\t\tqueryHash,\n\t\t\t\toptions: client.defaultQueryOptions(options),\n\t\t\t\tstate,\n\t\t\t\tdefaultOptions: client.getQueryDefaults(queryKey)\n\t\t\t});\n\t\t\tthis.add(query);\n\t\t}\n\t\treturn query;\n\t}\n\tadd(query) {\n\t\tif (!this.#queries.has(query.queryHash)) {\n\t\t\tthis.#queries.set(query.queryHash, query);\n\t\t\tthis.notify({\n\t\t\t\ttype: \"added\",\n\t\t\t\tquery\n\t\t\t});\n\t\t}\n\t}\n\tremove(query) {\n\t\tconst queryInMap = this.#queries.get(query.queryHash);\n\t\tif (queryInMap) {\n\t\t\tquery.destroy();\n\t\t\tif (queryInMap === query) this.#queries.delete(query.queryHash);\n\t\t\tthis.notify({\n\t\t\t\ttype: \"removed\",\n\t\t\t\tquery\n\t\t\t});\n\t\t}\n\t}\n\tclear() {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.getAll().forEach((query) => {\n\t\t\t\tthis.remove(query);\n\t\t\t});\n\t\t});\n\t}\n\tget(queryHash) {\n\t\treturn this.#queries.get(queryHash);\n\t}\n\tgetAll() {\n\t\treturn [...this.#queries.values()];\n\t}\n\tfind(filters) {\n\t\tconst defaultedFilters = {\n\t\t\texact: true,\n\t\t\t...filters\n\t\t};\n\t\treturn this.getAll().find((query) => matchQuery(defaultedFilters, query));\n\t}\n\tfindAll(filters = {}) {\n\t\tconst queries = this.getAll();\n\t\treturn Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;\n\t}\n\tnotify(event) {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(event);\n\t\t\t});\n\t\t});\n\t}\n\tonFocus() {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.getAll().forEach((query) => {\n\t\t\t\tquery.onFocus();\n\t\t\t});\n\t\t});\n\t}\n\tonOnline() {\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.getAll().forEach((query) => {\n\t\t\t\tquery.onOnline();\n\t\t\t});\n\t\t});\n\t}\n};\n//#endregion\nexport { QueryCache };\n\n//# sourceMappingURL=queryCache.js.map","import { functionalUpdate, hashKey, hashQueryKeyByOptions, noop, partialMatchKey, resolveQueryValue, skipToken } from \"./utils.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { MutationCache } from \"./mutationCache.js\";\nimport { QueryCache } from \"./queryCache.js\";\n//#region src/queryClient.ts\nvar QueryClient = class {\n\t#queryCache;\n\t#mutationCache;\n\t#defaultOptions;\n\t#queryDefaults;\n\t#mutationDefaults;\n\t#mountCount;\n\t#unsubscribeFocus;\n\t#unsubscribeOnline;\n\tconstructor(config = {}) {\n\t\tthis.#queryCache = config.queryCache || new QueryCache();\n\t\tthis.#mutationCache = config.mutationCache || new MutationCache();\n\t\tthis.#defaultOptions = config.defaultOptions || {};\n\t\tthis.#queryDefaults = /* @__PURE__ */ new Map();\n\t\tthis.#mutationDefaults = /* @__PURE__ */ new Map();\n\t\tthis.#mountCount = 0;\n\t}\n\tmount() {\n\t\tthis.#mountCount++;\n\t\tif (this.#mountCount !== 1) return;\n\t\tthis.#unsubscribeFocus = focusManager.subscribe(async (focused) => {\n\t\t\tif (focused) {\n\t\t\t\tawait this.resumePausedMutations();\n\t\t\t\tthis.#queryCache.onFocus();\n\t\t\t}\n\t\t});\n\t\tthis.#unsubscribeOnline = onlineManager.subscribe(async (online) => {\n\t\t\tif (online) {\n\t\t\t\tawait this.resumePausedMutations();\n\t\t\t\tthis.#queryCache.onOnline();\n\t\t\t}\n\t\t});\n\t}\n\tunmount() {\n\t\tthis.#mountCount--;\n\t\tif (this.#mountCount !== 0) return;\n\t\tthis.#unsubscribeFocus?.();\n\t\tthis.#unsubscribeFocus = void 0;\n\t\tthis.#unsubscribeOnline?.();\n\t\tthis.#unsubscribeOnline = void 0;\n\t}\n\tisFetching(filters) {\n\t\treturn this.#queryCache.findAll({\n\t\t\t...filters,\n\t\t\tfetchStatus: \"fetching\"\n\t\t}).length;\n\t}\n\tisMutating(filters) {\n\t\treturn this.#mutationCache.findAll({\n\t\t\t...filters,\n\t\t\tstatus: \"pending\"\n\t\t}).length;\n\t}\n\t/**\n\t* Imperative (non-reactive) way to retrieve data for a QueryKey.\n\t* Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.\n\t*\n\t* Hint: Do not use this function inside a component, because it won't receive updates.\n\t* Use `useQuery` to create a `QueryObserver` that subscribes to changes.\n\t*/\n\tgetQueryData(queryKey) {\n\t\tconst options = this.defaultQueryOptions({ queryKey });\n\t\treturn this.#queryCache.get(options.queryHash)?.state.data;\n\t}\n\t/**\n\t* @deprecated Use queryClient.query({ ...options, staleTime: 'static' }) instead. This method will be removed in the next major version.\n\t*/\n\tensureQueryData(options) {\n\t\tconst defaultedOptions = this.defaultQueryOptions(options);\n\t\tconst query = this.#queryCache.build(this, defaultedOptions);\n\t\tconst cachedData = query.state.data;\n\t\tif (cachedData === void 0) return this.fetchQuery(options);\n\t\tif (options.revalidateIfStale && query.isStaleByTime(resolveQueryValue(defaultedOptions.staleTime, query))) this.prefetchQuery(defaultedOptions);\n\t\treturn Promise.resolve(cachedData);\n\t}\n\tgetQueriesData(filters) {\n\t\treturn this.#queryCache.findAll(filters).map(({ queryKey, state }) => {\n\t\t\treturn [queryKey, state.data];\n\t\t});\n\t}\n\tsetQueryData(queryKey, updater, options) {\n\t\tconst defaultedOptions = this.defaultQueryOptions({ queryKey });\n\t\tconst prevData = this.#queryCache.get(defaultedOptions.queryHash)?.state.data;\n\t\tconst data = functionalUpdate(updater, prevData);\n\t\tif (data === void 0) return;\n\t\treturn this.#queryCache.build(this, defaultedOptions).setData(data, {\n\t\t\t...options,\n\t\t\tmanual: true\n\t\t});\n\t}\n\tsetQueriesData(filters, updater, options) {\n\t\treturn notifyManager.batch(() => this.#queryCache.findAll(filters).map(({ queryKey }) => [queryKey, this.setQueryData(queryKey, updater, options)]));\n\t}\n\tgetQueryState(queryKey) {\n\t\tconst options = this.defaultQueryOptions({ queryKey });\n\t\treturn this.#queryCache.get(options.queryHash)?.state;\n\t}\n\tremoveQueries(filters) {\n\t\tconst queryCache = this.#queryCache;\n\t\tnotifyManager.batch(() => {\n\t\t\tqueryCache.findAll(filters).forEach((query) => {\n\t\t\t\tqueryCache.remove(query);\n\t\t\t});\n\t\t});\n\t}\n\tresetQueries(filters, options) {\n\t\tconst queryCache = this.#queryCache;\n\t\treturn notifyManager.batch(() => {\n\t\t\tconst matched = queryCache.findAll(filters);\n\t\t\tconst queriesToRefetch = new Set(matched);\n\t\t\tmatched.forEach((query) => {\n\t\t\t\tquery.reset();\n\t\t\t});\n\t\t\treturn this.refetchQueries({\n\t\t\t\ttype: \"active\",\n\t\t\t\tpredicate: (query) => queriesToRefetch.has(query)\n\t\t\t}, options);\n\t\t});\n\t}\n\tcancelQueries(filters, cancelOptions = {}) {\n\t\tconst defaultedCancelOptions = {\n\t\t\trevert: true,\n\t\t\t...cancelOptions\n\t\t};\n\t\tconst promises = notifyManager.batch(() => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions)));\n\t\treturn Promise.all(promises).then(noop).catch(noop);\n\t}\n\tinvalidateQueries(filters, options = {}) {\n\t\treturn notifyManager.batch(() => {\n\t\t\tthis.#queryCache.findAll(filters).forEach((query) => {\n\t\t\t\tquery.invalidate();\n\t\t\t});\n\t\t\tif (filters?.refetchType === \"none\") return Promise.resolve();\n\t\t\treturn this.refetchQueries({\n\t\t\t\t...filters,\n\t\t\t\ttype: filters?.refetchType ?? filters?.type ?? \"active\"\n\t\t\t}, options);\n\t\t});\n\t}\n\trefetchQueries(filters, options = {}) {\n\t\tconst fetchOptions = {\n\t\t\t...options,\n\t\t\tcancelRefetch: options.cancelRefetch ?? true\n\t\t};\n\t\tconst promises = notifyManager.batch(() => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {\n\t\t\tlet promise = query.fetch(void 0, fetchOptions);\n\t\t\tif (!fetchOptions.throwOnError) promise = promise.catch(noop);\n\t\t\treturn query.state.fetchStatus === \"paused\" ? Promise.resolve() : promise;\n\t\t}));\n\t\treturn Promise.all(promises).then(noop);\n\t}\n\tasync query(options) {\n\t\tconst defaultedOptions = this.defaultQueryOptions(options);\n\t\tif (defaultedOptions.retry === void 0) defaultedOptions.retry = false;\n\t\tconst query = this.#queryCache.build(this, defaultedOptions);\n\t\tconst queryData = query.isStaleByTime(resolveQueryValue(defaultedOptions.staleTime, query)) ? await query.fetch(defaultedOptions) : query.state.data;\n\t\tconst select = defaultedOptions.select;\n\t\tif (select) return select(queryData);\n\t\treturn queryData;\n\t}\n\t/**\n\t* @deprecated Use queryClient.query(options) instead. This method will be removed in the next major version.\n\t*/\n\tfetchQuery(options) {\n\t\tconst defaultedOptions = this.defaultQueryOptions(options);\n\t\tif (defaultedOptions.retry === void 0) defaultedOptions.retry = false;\n\t\tconst query = this.#queryCache.build(this, defaultedOptions);\n\t\treturn query.isStaleByTime(resolveQueryValue(defaultedOptions.staleTime, query)) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n\t}\n\t/**\n\t* @deprecated Use queryClient.query(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.\n\t*/\n\tprefetchQuery(options) {\n\t\treturn this.fetchQuery(options).then(noop).catch(noop);\n\t}\n\tinfiniteQuery(options) {\n\t\toptions._type = \"infinite\";\n\t\treturn this.query(options);\n\t}\n\t/**\n\t* @deprecated Use queryClient.infiniteQuery(options) instead. This method will be removed in the next major version.\n\t*/\n\tfetchInfiniteQuery(options) {\n\t\toptions._type = \"infinite\";\n\t\treturn this.fetchQuery(options);\n\t}\n\t/**\n\t* @deprecated Use queryClient.infiniteQuery(options) instead. You can swallow errors with `.catch(noop)`. This method will be removed in the next major version.\n\t*/\n\tprefetchInfiniteQuery(options) {\n\t\treturn this.fetchInfiniteQuery(options).then(noop).catch(noop);\n\t}\n\t/**\n\t* @deprecated Use queryClient.infiniteQuery({ ...options, staleTime: 'static' }) instead. This method will be removed in the next major version.\n\t*/\n\tensureInfiniteQueryData(options) {\n\t\toptions._type = \"infinite\";\n\t\treturn this.ensureQueryData(options);\n\t}\n\tresumePausedMutations() {\n\t\tif (onlineManager.isOnline()) return this.#mutationCache.resumePausedMutations();\n\t\treturn Promise.resolve();\n\t}\n\tgetQueryCache() {\n\t\treturn this.#queryCache;\n\t}\n\tgetMutationCache() {\n\t\treturn this.#mutationCache;\n\t}\n\tgetDefaultOptions() {\n\t\treturn this.#defaultOptions;\n\t}\n\tsetDefaultOptions(options) {\n\t\tthis.#defaultOptions = options;\n\t}\n\tsetQueryDefaults(queryKey, options) {\n\t\tthis.#queryDefaults.set(hashKey(queryKey), {\n\t\t\tqueryKey,\n\t\t\tdefaultOptions: options\n\t\t});\n\t}\n\tgetQueryDefaults(queryKey) {\n\t\tconst defaults = [...this.#queryDefaults.values()];\n\t\tconst result = {};\n\t\tdefaults.forEach((queryDefault) => {\n\t\t\tif (partialMatchKey(queryKey, queryDefault.queryKey)) Object.assign(result, queryDefault.defaultOptions);\n\t\t});\n\t\treturn result;\n\t}\n\tsetMutationDefaults(mutationKey, options) {\n\t\tthis.#mutationDefaults.set(hashKey(mutationKey), {\n\t\t\tmutationKey,\n\t\t\tdefaultOptions: options\n\t\t});\n\t}\n\tgetMutationDefaults(mutationKey) {\n\t\tconst defaults = [...this.#mutationDefaults.values()];\n\t\tconst result = {};\n\t\tdefaults.forEach((queryDefault) => {\n\t\t\tif (partialMatchKey(mutationKey, queryDefault.mutationKey)) Object.assign(result, queryDefault.defaultOptions);\n\t\t});\n\t\treturn result;\n\t}\n\tdefaultQueryOptions(options) {\n\t\tif (options._defaulted) return options;\n\t\tconst defaultedOptions = {\n\t\t\t...this.#defaultOptions.queries,\n\t\t\t...this.getQueryDefaults(options.queryKey),\n\t\t\t...options,\n\t\t\t_defaulted: true\n\t\t};\n\t\tif (!defaultedOptions.queryHash) defaultedOptions.queryHash = hashQueryKeyByOptions(defaultedOptions.queryKey, defaultedOptions);\n\t\tif (defaultedOptions.refetchOnReconnect === void 0) defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== \"always\";\n\t\tif (defaultedOptions.throwOnError === void 0) defaultedOptions.throwOnError = !!defaultedOptions.suspense;\n\t\tif (!defaultedOptions.networkMode && defaultedOptions.persister) defaultedOptions.networkMode = \"offlineFirst\";\n\t\tif (defaultedOptions.queryFn === skipToken) defaultedOptions.enabled = false;\n\t\treturn defaultedOptions;\n\t}\n\tdefaultMutationOptions(options) {\n\t\tif (options?._defaulted) return options;\n\t\treturn {\n\t\t\t...this.#defaultOptions.mutations,\n\t\t\t...options?.mutationKey && this.getMutationDefaults(options.mutationKey),\n\t\t\t...options,\n\t\t\t_defaulted: true\n\t\t};\n\t}\n\tclear() {\n\t\tthis.#queryCache.clear();\n\t\tthis.#mutationCache.clear();\n\t}\n};\n//#endregion\nexport { QueryClient };\n\n//# sourceMappingURL=queryClient.js.map","\"use client\";\nimport * as React from \"react\";\n//#region src/IsRestoringProvider.ts\nconst IsRestoringContext = React.createContext(false);\nconst useIsRestoring = () => React.useContext(IsRestoringContext);\nconst IsRestoringProvider = IsRestoringContext.Provider;\n//#endregion\nexport { IsRestoringProvider, useIsRestoring };\n\n//# sourceMappingURL=IsRestoringProvider.js.map","\"use client\";\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/QueryErrorResetBoundary.tsx\nfunction createValue() {\n\tlet isReset = false;\n\treturn {\n\t\tclearReset: () => {\n\t\t\tisReset = false;\n\t\t},\n\t\treset: () => {\n\t\t\tisReset = true;\n\t\t},\n\t\tisReset: () => {\n\t\t\treturn isReset;\n\t\t}\n\t};\n}\nconst QueryErrorResetBoundaryContext = React.createContext(createValue());\nconst useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);\nconst QueryErrorResetBoundary = ({ children }) => {\n\tconst [value] = React.useState(() => createValue());\n\treturn /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, {\n\t\tvalue,\n\t\tchildren: typeof children === \"function\" ? children(value) : children\n\t});\n};\n//#endregion\nexport { QueryErrorResetBoundary, useQueryErrorResetBoundary };\n\n//# sourceMappingURL=QueryErrorResetBoundary.js.map","\"use client\";\nimport * as React from \"react\";\nimport { shouldThrowError } from \"@tanstack/query-core\";\n//#region src/errorBoundaryUtils.ts\nconst ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {\n\tconst throwOnError = query?.state.error && typeof options.throwOnError === \"function\" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;\n\tif (options.suspense || throwOnError) {\n\t\tif (!errorResetBoundary.isReset()) options.retryOnMount = false;\n\t}\n};\nconst useClearResetErrorBoundary = (errorResetBoundary) => {\n\tReact.useEffect(() => {\n\t\terrorResetBoundary.clearReset();\n\t}, [errorResetBoundary]);\n};\nconst getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }) => {\n\treturn result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));\n};\n//#endregion\nexport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary };\n\n//# sourceMappingURL=errorBoundaryUtils.js.map","//#region src/suspense.ts\nconst defaultThrowOnError = (_error, query) => query.state.data === void 0;\nconst ensureSuspenseTimers = (defaultedOptions) => {\n\tif (defaultedOptions.suspense) {\n\t\tconst MIN_SUSPENSE_TIME_MS = 1e3;\n\t\tconst clamp = (value) => value === \"static\" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);\n\t\tconst originalStaleTime = defaultedOptions.staleTime;\n\t\tdefaultedOptions.staleTime = typeof originalStaleTime === \"function\" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);\n\t\tif (typeof defaultedOptions.gcTime === \"number\") defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, MIN_SUSPENSE_TIME_MS);\n\t}\n};\nconst shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;\nconst fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {\n\terrorResetBoundary.clearReset();\n});\n//#endregion\nexport { defaultThrowOnError, ensureSuspenseTimers, fetchOptimistic, shouldSuspend };\n\n//# sourceMappingURL=suspense.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useIsRestoring } from \"./IsRestoringProvider.js\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary } from \"./errorBoundaryUtils.js\";\nimport { ensureSuspenseTimers, fetchOptimistic, shouldSuspend } from \"./suspense.js\";\nimport * as React from \"react\";\nimport { noop, notifyManager } from \"@tanstack/query-core\";\n//#region src/useBaseQuery.ts\nfunction useBaseQuery(options, Observer, queryClient) {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif (typeof options !== \"object\" || Array.isArray(options)) throw new Error(\"Bad argument type. Starting with v5, only the \\\"Object\\\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object\");\n\t}\n\tconst isRestoring = useIsRestoring();\n\tconst errorResetBoundary = useQueryErrorResetBoundary();\n\tconst client = useQueryClient(queryClient);\n\tconst defaultedOptions = client.defaultQueryOptions(options);\n\tconst query = client.getQueryCache().get(defaultedOptions.queryHash);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif (!defaultedOptions.queryFn) console.error(`[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`);\n\t}\n\tconst subscribed = options.subscribed !== false;\n\tdefaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : subscribed ? \"optimistic\" : void 0;\n\tensureSuspenseTimers(defaultedOptions);\n\tensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary, query);\n\tuseClearResetErrorBoundary(errorResetBoundary);\n\tconst [observer] = React.useState(() => new Observer(client, defaultedOptions));\n\tconst result = observer.getOptimisticResult(defaultedOptions);\n\tconst shouldSubscribe = !isRestoring && subscribed;\n\tReact.useSyncExternalStore(React.useCallback((onStoreChange) => {\n\t\tconst unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;\n\t\tobserver.updateResult();\n\t\treturn unsubscribe;\n\t}, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tReact.useEffect(() => {\n\t\tobserver.setOptions(defaultedOptions);\n\t}, [defaultedOptions, observer]);\n\tif (shouldSuspend(defaultedOptions, result)) throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);\n\tif (getHasError({\n\t\tresult,\n\t\terrorResetBoundary,\n\t\tthrowOnError: defaultedOptions.throwOnError,\n\t\tquery,\n\t\tsuspense: defaultedOptions.suspense\n\t})) throw result.error;\n\treturn !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;\n}\n//#endregion\nexport { useBaseQuery };\n\n//# sourceMappingURL=useBaseQuery.js.map","\"use client\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nimport { QueryObserver } from \"@tanstack/query-core\";\n//#region src/useQuery.ts\nfunction useQuery(options, queryClient) {\n\treturn useBaseQuery(options, QueryObserver, queryClient);\n}\n//#endregion\nexport { useQuery };\n\n//# sourceMappingURL=useQuery.js.map","//#region src/queryOptions.ts\nfunction queryOptions(options) {\n\treturn options;\n}\n//#endregion\nexport { queryOptions };\n\n//# sourceMappingURL=queryOptions.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport * as React from \"react\";\nimport { MutationObserver, noop, notifyManager, shouldThrowError } from \"@tanstack/query-core\";\n//#region src/useMutation.ts\nfunction useMutation(options, queryClient) {\n\tconst client = useQueryClient(queryClient);\n\tconst [observer] = React.useState(() => new MutationObserver(client, options));\n\tReact.useEffect(() => {\n\t\tobserver.setOptions(options);\n\t}, [observer, options]);\n\tconst result = React.useSyncExternalStore(React.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tconst mutate = React.useCallback((...args) => {\n\t\tobserver.mutate(args[0], args[1]).catch(noop);\n\t}, [observer]);\n\tif (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;\n\treturn {\n\t\t...result,\n\t\tmutate,\n\t\tmutateAsync: result.mutate\n\t};\n}\n//#endregion\nexport { useMutation };\n\n//# sourceMappingURL=useMutation.js.map","\"use client\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nimport { InfiniteQueryObserver } from \"@tanstack/query-core\";\n//#region src/useInfiniteQuery.ts\nfunction useInfiniteQuery(options, queryClient) {\n\treturn useBaseQuery(options, InfiniteQueryObserver, queryClient);\n}\n//#endregion\nexport { useInfiniteQuery };\n\n//# sourceMappingURL=useInfiniteQuery.js.map","\"use client\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\n/**\n* React.use if available (React 19+), undefined otherwise.\n* Use dynamic lookup to avoid Webpack compilation errors with React 18.\n*/\nvar reactUse = React$1[\"use\"];\nvar useLayoutEffect = isServer ?? typeof window === \"undefined\" ? React$1.useEffect : React$1.useLayoutEffect;\n//#endregion\nexport { reactUse, useLayoutEffect };\n\n//# sourceMappingURL=utils.js.map","import { isServer } from \"@tanstack/router-core/isServer\";\n//#region src/utils.ts\n/**\n* Return the last element of an array.\n* Intended for non-empty arrays used within router internals.\n*/\nfunction last(arr) {\n\treturn arr[arr.length - 1];\n}\n/**\n* Apply a value-or-updater to a previous value.\n* Accepts either a literal value or a function of the previous value.\n*/\nfunction functionalUpdate(updater, previous) {\n\tif (typeof updater === \"function\") return updater(previous);\n\treturn updater;\n}\nconst hasOwn = Object.prototype.hasOwnProperty;\nconst isEnumerable = Object.prototype.propertyIsEnumerable;\nfunction hasKeys(obj) {\n\tfor (const key in obj) if (hasOwn.call(obj, key)) return true;\n\treturn false;\n}\nconst createNull = () => Object.create(null);\nconst nullReplaceEqualDeep = (prev, next) => replaceEqualDeep(prev, next, createNull);\n/**\n* This function returns `prev` if `_next` is deeply equal.\n* If not, it will replace any deeply equal children of `b` with those of `a`.\n* This can be used for structural sharing between immutable JSON values for example.\n* Do not use this with signals\n*/\nfunction replaceEqualDeep(prev, _next, _makeObj = () => ({}), _depth = 0) {\n\tif (isServer) return _next;\n\tif (prev === _next) return prev;\n\tif (_depth > 500) return _next;\n\tconst next = _next;\n\tconst array = isPlainArray(prev) && isPlainArray(next);\n\tif (!array && !(isPlainObject(prev) && isPlainObject(next))) return next;\n\tconst prevItems = array ? prev : getEnumerableOwnKeys(prev);\n\tif (!prevItems) return next;\n\tconst nextItems = array ? next : getEnumerableOwnKeys(next);\n\tif (!nextItems) return next;\n\tconst prevSize = prevItems.length;\n\tconst nextSize = nextItems.length;\n\tconst copy = array ? new Array(nextSize) : _makeObj();\n\tlet equalItems = 0;\n\tfor (let i = 0; i < nextSize; i++) {\n\t\tconst key = array ? i : nextItems[i];\n\t\tconst p = prev[key];\n\t\tconst n = next[key];\n\t\tif (p === n) {\n\t\t\tcopy[key] = p;\n\t\t\tif (array ? i < prevSize : hasOwn.call(prev, key)) equalItems++;\n\t\t\tcontinue;\n\t\t}\n\t\tif (p === null || n === null || typeof p !== \"object\" || typeof n !== \"object\") {\n\t\t\tcopy[key] = n;\n\t\t\tcontinue;\n\t\t}\n\t\tconst v = replaceEqualDeep(p, n, _makeObj, _depth + 1);\n\t\tcopy[key] = v;\n\t\tif (v === p) equalItems++;\n\t}\n\treturn prevSize === nextSize && equalItems === prevSize ? prev : copy;\n}\n/**\n* Equivalent to `Reflect.ownKeys`, but ensures that objects are \"clone-friendly\":\n* will return false if object has any non-enumerable properties.\n*\n* Optimized for the common case where objects have no symbol properties.\n*/\nfunction getEnumerableOwnKeys(o) {\n\tconst keys = Object.keys(o);\n\tif (keys.length !== Object.getOwnPropertyNames(o).length) return false;\n\tconst symbols = Object.getOwnPropertySymbols(o);\n\tif (symbols.length === 0) return keys;\n\tfor (const symbol of symbols) {\n\t\tif (!isEnumerable.call(o, symbol)) return false;\n\t\tkeys.push(symbol);\n\t}\n\treturn keys;\n}\nfunction isPlainObject(o) {\n\tif (!hasObjectPrototype(o)) return false;\n\tconst ctor = o.constructor;\n\tif (typeof ctor === \"undefined\") return true;\n\tconst prot = ctor.prototype;\n\tif (!hasObjectPrototype(prot)) return false;\n\tif (!prot.hasOwnProperty(\"isPrototypeOf\")) return false;\n\treturn true;\n}\nfunction hasObjectPrototype(o) {\n\treturn Object.prototype.toString.call(o) === \"[object Object]\";\n}\n/**\n* Check if a value is a \"plain\" array (no extra enumerable keys).\n*/\nfunction isPlainArray(value) {\n\treturn Array.isArray(value) && value.length === Object.keys(value).length;\n}\n/**\n* Perform a deep equality check with options for partial comparison and\n* ignoring `undefined` values. Optimized for router state comparisons.\n*/\nfunction deepEqual(a, b, opts) {\n\tif (a === b) return true;\n\tif (typeof a !== typeof b) return false;\n\tif (Array.isArray(a) && Array.isArray(b)) {\n\t\tif (a.length !== b.length) return false;\n\t\tfor (let i = 0, l = a.length; i < l; i++) if (!deepEqual(a[i], b[i], opts)) return false;\n\t\treturn true;\n\t}\n\tif (isPlainObject(a) && isPlainObject(b)) {\n\t\tconst ignoreUndefined = opts?.ignoreUndefined ?? true;\n\t\tif (opts?.partial) {\n\t\t\tfor (const k in b) if (!ignoreUndefined || b[k] !== void 0) {\n\t\t\t\tif (!deepEqual(a[k], b[k], opts)) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\tlet aCount = 0;\n\t\tif (!ignoreUndefined) aCount = Object.keys(a).length;\n\t\telse for (const k in a) if (a[k] !== void 0) aCount++;\n\t\tlet bCount = 0;\n\t\tfor (const k in b) if (!ignoreUndefined || b[k] !== void 0) {\n\t\t\tbCount++;\n\t\t\tif (bCount > aCount || !deepEqual(a[k], b[k], opts)) return false;\n\t\t}\n\t\treturn aCount === bCount;\n\t}\n\treturn false;\n}\n/**\n* Create a promise with exposed resolve/reject and status fields.\n* Useful for coordinating async router lifecycle operations.\n*/\nfunction createControlledPromise(onResolve) {\n\tlet resolveLoadPromise;\n\tlet rejectLoadPromise;\n\tconst controlledPromise = new Promise((resolve, reject) => {\n\t\tresolveLoadPromise = resolve;\n\t\trejectLoadPromise = reject;\n\t});\n\tcontrolledPromise.status = \"pending\";\n\tcontrolledPromise.resolve = (value) => {\n\t\tcontrolledPromise.status = \"resolved\";\n\t\tcontrolledPromise.value = value;\n\t\tresolveLoadPromise(value);\n\t\tonResolve?.(value);\n\t};\n\tcontrolledPromise.reject = (e) => {\n\t\tcontrolledPromise.status = \"rejected\";\n\t\trejectLoadPromise(e);\n\t};\n\treturn controlledPromise;\n}\n/**\n* Heuristically detect dynamic import \"module not found\" errors\n* across major browsers for lazy route component handling.\n*/\nfunction isModuleNotFoundError(error) {\n\tif (typeof error?.message !== \"string\") return false;\n\treturn error.message.startsWith(\"Failed to fetch dynamically imported module\") || error.message.startsWith(\"error loading dynamically imported module\") || error.message.startsWith(\"Importing a module script failed\");\n}\nfunction findLast(array, predicate) {\n\tfor (let i = array.length - 1; i >= 0; i--) {\n\t\tconst item = array[i];\n\t\tif (predicate(item)) return item;\n\t}\n}\n/**\n* Re-encode characters that are unsafe in URL paths.\n* Includes ASCII control characters (0x00-0x1F, 0x7F) and a subset of the\n* WHATWG URL \"path percent-encode set\" (\", <, >, `, {, }).\n*\n* Space (0x20) is intentionally excluded — decodeURI decodes %20 to space\n* and the router stores decoded spaces in location.pathname. The existing\n* encodePathLikeUrl already handles re-encoding spaces for outgoing URLs.\n*\n* These characters are decoded by decodeURI but must remain percent-encoded\n* in paths to match how upstream layers (CDNs, edge middleware, browsers)\n* interpret the URL, preventing infinite redirect loops and path mismatches.\n*/\nconst PATH_UNSAFE_RE = /[\\x00-\\x1f\\x7f\"<>`{}]/g;\nfunction sanitizePathSegment(segment) {\n\treturn segment.replace(PATH_UNSAFE_RE, (ch) => \"%\" + ch.charCodeAt(0).toString(16).toUpperCase().padStart(2, \"0\"));\n}\nfunction decodeSegment(segment) {\n\tlet decoded;\n\ttry {\n\t\tdecoded = decodeURI(segment);\n\t} catch {\n\t\tdecoded = segment.replaceAll(/%[0-9A-F]{2}/gi, (match) => {\n\t\t\ttry {\n\t\t\t\treturn decodeURI(match);\n\t\t\t} catch {\n\t\t\t\treturn match;\n\t\t\t}\n\t\t});\n\t}\n\treturn sanitizePathSegment(decoded);\n}\n/**\n* Default list of URL protocols to allow in links, redirects, and navigation.\n* Any absolute URL protocol not in this list is treated as dangerous by default.\n*/\nconst DEFAULT_PROTOCOL_ALLOWLIST = [\n\t\"http:\",\n\t\"https:\",\n\t\"mailto:\",\n\t\"tel:\"\n];\n/**\n* Extract the explicit URL scheme, including its colon, using WHATWG\n* normalization rules. This does not validate the rest of the URL.\n*\n* Returning `undefined` means \"no explicit scheme\", not \"safe URL\";\n* protocol-relative URLs such as \"//evil.example\" require a separate check.\n*/\nfunction getUrlScheme(url) {\n\tif (url[0] === \"/\") return;\n\tif (!url.includes(\":\")) return;\n\treturn /^[\\x00-\\x20]*([a-z][a-z\\d+.\\t\\n\\r-]*:)/i.exec(url)?.[1]?.replace(/[\\t\\n\\r]/g, \"\").toLowerCase();\n}\nconst protocolRelativePrefixRegex = /^[\\x00-\\x20]*[\\\\/][\\t\\n\\r]*[\\\\/]/;\n/**\n* Check if a URL string uses a protocol that is not in the allowlist or is\n* protocol-relative (e.g. \"//evil.example\"), which can navigate to another host.\n* Returns true for blocked protocols like javascript:, blob:, and data:, as\n* well as slash/backslash variants of protocol-relative URLs.\n*\n* Scheme parsing normalizes:\n* - Mixed case (JavaScript: → javascript:)\n* - Whitespace/control characters (java\\nscript: → javascript:)\n* - Leading whitespace\n*\n* For relative URLs without a protocol-relative prefix, returns false.\n*\n* @param url - The URL string to check\n* @param allowlist - Set of protocols to allow\n* @returns true if the URL uses a protocol that is not allowed or can escape\n* the current origin through a protocol-relative URL\n*/\nfunction isDangerousProtocol(url, allowlist) {\n\tif (!url) return false;\n\tif (protocolRelativePrefixRegex.test(url)) return true;\n\tconst scheme = getUrlScheme(url);\n\treturn scheme ? !allowlist.has(scheme) : false;\n}\nconst HTML_ESCAPE_LOOKUP = {\n\t\"&\": \"\\\\u0026\",\n\t\">\": \"\\\\u003e\",\n\t\"<\": \"\\\\u003c\",\n\t\"\\u2028\": \"\\\\u2028\",\n\t\"\\u2029\": \"\\\\u2029\"\n};\nconst HTML_ESCAPE_REGEX = /[&><\\u2028\\u2029]/g;\n/**\n* Escape HTML special characters in a string to prevent XSS attacks\n* when embedding strings in script tags during SSR.\n*\n* This is essential for preventing XSS vulnerabilities when user-controlled\n* content is embedded in inline scripts.\n*/\nfunction escapeHtml(str) {\n\treturn str.replace(HTML_ESCAPE_REGEX, (match) => HTML_ESCAPE_LOOKUP[match]);\n}\nfunction decodePath(path) {\n\tif (!path) return path;\n\tlet result = path;\n\tif (/[%\\\\\\x00-\\x1f\\x7f]/.test(path)) {\n\t\tconst re = /%25|%5C/gi;\n\t\tlet cursor = 0;\n\t\tlet match;\n\t\tresult = \"\";\n\t\twhile (null !== (match = re.exec(path))) {\n\t\t\tresult += decodeSegment(path.slice(cursor, match.index)) + match[0];\n\t\t\tcursor = re.lastIndex;\n\t\t}\n\t\tresult += decodeSegment(cursor ? path.slice(cursor) : path);\n\t}\n\treturn result;\n}\n/**\n* Encodes a path the same way `new URL()` would, but without the overhead of full URL parsing.\n*\n* This function encodes:\n* - Whitespace characters (spaces → %20, tabs → %09, etc.)\n* - Non-ASCII/Unicode characters (emojis, accented characters, etc.)\n*\n* It preserves:\n* - Already percent-encoded sequences (won't double-encode %2F, %25, etc.)\n* - ASCII special characters valid in URL paths (@, $, &, +, etc.)\n* - Forward slashes as path separators\n*\n* Used to generate proper href values for SSR without constructing URL objects.\n*\n* @example\n* encodePathLikeUrl('/path/file name.pdf') // '/path/file%20name.pdf'\n* encodePathLikeUrl('/path/日本語') // '/path/%E6%97%A5%E6%9C%AC%E8%AA%9E'\n* encodePathLikeUrl('/path/already%20encoded') // '/path/already%20encoded' (preserved)\n*/\nfunction encodePathLikeUrl(path) {\n\tif (!/[\\s\\u0080-\\uFFFF]/.test(path)) return path;\n\treturn path.replace(/\\s|[^\\u0000-\\u007F]/gu, encodeURIComponent);\n}\n/**\n* Builds the dev-mode CSS styles URL for route-scoped CSS collection.\n* Used by HeadContent components in all framework implementations to construct\n* the URL for the `/@tanstack-start/styles.css` endpoint.\n*\n* @param basepath - The router's basepath (may or may not have leading slash)\n* @param routeIds - Array of matched route IDs to include in the CSS collection\n* @returns The full URL path for the dev styles CSS endpoint\n*/\nfunction buildDevStylesUrl(basepath, routeIds) {\n\tconst trimmedBasepath = basepath.replace(/^\\/+|\\/+$/g, \"\");\n\treturn `${trimmedBasepath === \"\" ? \"\" : `/${trimmedBasepath}`}/@tanstack-start/styles.css?routes=${encodeURIComponent(routeIds.join(\",\"))}`;\n}\nfunction arraysEqual(a, b) {\n\tif (a === b) return true;\n\tif (a.length !== b.length) return false;\n\tfor (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\n\treturn true;\n}\n//#endregion\nexport { DEFAULT_PROTOCOL_ALLOWLIST, arraysEqual, buildDevStylesUrl, createControlledPromise, createNull, decodePath, deepEqual, encodePathLikeUrl, escapeHtml, findLast, functionalUpdate, getUrlScheme, hasKeys, hasOwn, isDangerousProtocol, isModuleNotFoundError, last, nullReplaceEqualDeep, protocolRelativePrefixRegex, replaceEqualDeep };\n\n//# sourceMappingURL=utils.js.map","//#region src/invariant.ts\nfunction invariant() {\n\tthrow new Error(\"Invariant failed\");\n}\n//#endregion\nexport { invariant };\n\n//# sourceMappingURL=invariant.js.map","import { last } from \"./utils.js\";\n//#region src/path.ts\n/** Join path segments, cleaning duplicate slashes between parts. */\nfunction joinPaths(paths) {\n\treturn cleanPath(paths.filter((val) => {\n\t\treturn val !== void 0;\n\t}).join(\"/\"));\n}\n/** Remove repeated slashes from a path string. */\nfunction cleanPath(path) {\n\treturn path.replace(/\\/{2,}/g, \"/\");\n}\n/** Trim leading slashes (except preserving root '/'). */\nfunction trimPathLeft(path) {\n\treturn path === \"/\" ? path : path.replace(/^\\/+/, \"\");\n}\n/** Trim trailing slashes (except preserving root '/'). */\nfunction trimPathRight(path) {\n\tconst len = path.length;\n\treturn len > 1 && path[len - 1] === \"/\" ? path.replace(/\\/+$/, \"\") : path;\n}\n/** Trim both leading and trailing slashes. */\nfunction trimPath(path) {\n\treturn trimPathRight(trimPathLeft(path));\n}\n/** Remove a trailing slash from value when appropriate for comparisons. */\nfunction removeTrailingSlash(value, basepath) {\n\tif (value?.endsWith(\"/\") && value !== \"/\" && value !== `${basepath}/`) return value.slice(0, -1);\n\treturn value;\n}\n/**\n* Compare two pathnames for exact equality after normalizing trailing slashes\n* relative to the provided `basepath`.\n*/\nfunction exactPathTest(pathName1, pathName2, basepath) {\n\treturn removeTrailingSlash(pathName1, basepath) === removeTrailingSlash(pathName2, basepath);\n}\n/**\n* Resolve a destination path against a base, honoring trailing-slash policy\n* and supporting relative segments (`.`/`..`) and absolute `to` values.\n*/\nfunction resolvePath({ base, to, trailingSlash = \"never\", cache }) {\n\tif (to.includes(\"//\")) to = cleanPath(to);\n\tif (to.startsWith(\"/\")) {\n\t\tif (to.length === 1 || trailingSlash === \"preserve\") return to;\n\t\tif (trailingSlash === \"always\") return to.endsWith(\"/\") ? to : `${to}/`;\n\t\treturn to.endsWith(\"/\") ? to.slice(0, -1) : to;\n\t}\n\tconst isBase = to === \".\";\n\tlet key;\n\tif (cache) {\n\t\tkey = isBase ? base : base + \"\\0\" + to;\n\t\tconst cached = cache.get(key);\n\t\tif (cached) return cached;\n\t}\n\tlet baseSegments;\n\tif (isBase) baseSegments = base.split(\"/\");\n\telse {\n\t\tif (base.includes(\"//\")) base = cleanPath(base);\n\t\tbaseSegments = base.split(\"/\");\n\t\twhile (baseSegments.length > 1 && last(baseSegments) === \"\") baseSegments.pop();\n\t\tconst toSegments = to.split(\"/\");\n\t\tfor (let index = 0, length = toSegments.length; index < length; index++) {\n\t\t\tconst value = toSegments[index];\n\t\t\tif (value === \"\") {\n\t\t\t\tif (!index) baseSegments = [value];\n\t\t\t\telse if (index === length - 1) baseSegments.push(value);\n\t\t\t} else if (value === \"..\") if (baseSegments.length > 1) baseSegments.pop();\n\t\t\telse baseSegments = [\"\"];\n\t\t\telse if (value === \".\") {} else baseSegments.push(value);\n\t\t}\n\t}\n\tif (baseSegments.length > 1) {\n\t\tif (last(baseSegments) === \"\") {\n\t\t\tif (trailingSlash === \"never\") baseSegments.pop();\n\t\t} else if (trailingSlash === \"always\") baseSegments.push(\"\");\n\t}\n\tconst joined = baseSegments.join(\"/\");\n\tconst result = (isBase ? cleanPath(joined) : joined) || \"/\";\n\tif (key && cache) cache.set(key, result);\n\treturn result;\n}\n/**\n* Create a pre-compiled decode config from allowed characters.\n* Created once for the router's fixed encoding configuration.\n*/\nfunction compileDecodeCharMap(pathParamsAllowedCharacters) {\n\tconst charMap = new Map(pathParamsAllowedCharacters.map((char) => [encodeURIComponent(char), char]));\n\tconst regex = new RegExp([...charMap.keys()].join(\"|\").replace(/[.*()]/g, \"\\\\$&\"), \"g\");\n\treturn (encoded) => encoded.replace(regex, (match) => charMap.get(match) ?? match);\n}\nfunction getRouteSegments(route) {\n\treturn route._interpolation;\n}\n/** A splat is missing when it has no value; `0` and `false` are stringified like any other param. */\nfunction isMissingSplat(value) {\n\treturn value == null || value === \"\";\n}\n/** Devtools checks navigation availability separately from the hot formatter. */\nfunction hasMissingPathParams(segments, params) {\n\treturn segments.some((part) => {\n\t\tif (typeof part === \"string\") return false;\n\t\tconst [kind, key] = part;\n\t\treturn kind === 2 ? isMissingSplat(params[key]) : kind === 1 && !(key in params);\n\t});\n}\nfunction encodeParam(key, value, decoder) {\n\tif (typeof value !== \"string\") return \"\" + (value ?? void 0);\n\tconst splat = key === \"_splat\";\n\tif (splat && (!value || /^[a-zA-Z0-9\\-._~!/]*$/.test(value))) return value;\n\tlet encoded = encodeURIComponent(value);\n\tif (splat) encoded = encoded.replaceAll(\"%2F\", \"/\");\n\treturn decoder ? decoder(encoded) : encoded;\n}\n/** Substitute current values into parsed segments, optionally collecting raw params. */\nfunction interpolatePath(path, segments, params, decoder, usedParams) {\n\tconst trailingSlash = path.endsWith(\"/\") ? \"/\" : \"\";\n\tlet joined = \"\";\n\tfor (const part of segments) {\n\t\tif (typeof part === \"string\") {\n\t\t\tjoined += part;\n\t\t\tcontinue;\n\t\t}\n\t\tconst [kind, key, prefix, rawSuffix] = part;\n\t\tconst splat = kind === 2;\n\t\tconst suffix = splat && rawSuffix !== void 0 ? rawSuffix + trailingSlash : rawSuffix;\n\t\tlet paramValue = params[key];\n\t\tif (kind === 3 && paramValue == null) continue;\n\t\tif (usedParams) {\n\t\t\tusedParams[key] = paramValue;\n\t\t\tif (splat) usedParams[\"*\"] = paramValue;\n\t\t}\n\t\tif (splat && isMissingSplat(paramValue)) {\n\t\t\tif (prefix === \"/\" && !suffix) continue;\n\t\t\tparamValue = \"\";\n\t\t}\n\t\tjoined += prefix + encodeParam(key, paramValue, decoder) + (suffix || \"\");\n\t}\n\treturn joined + trailingSlash || \"/\";\n}\n//#endregion\nexport { cleanPath, compileDecodeCharMap, exactPathTest, getRouteSegments, hasMissingPathParams, interpolatePath, joinPaths, removeTrailingSlash, resolvePath, trimPath, trimPathLeft, trimPathRight };\n\n//# sourceMappingURL=path.js.map","//#region src/not-found.ts\n/**\n* Create a not-found error object recognized by TanStack Router.\n*\n* Throw this from loaders/actions to trigger the nearest `notFoundComponent`.\n* Use `routeId` to target a specific route's not-found boundary. If `throw`\n* is true, the error is thrown instead of returned.\n*\n* @param options Optional settings including `routeId`, `headers`, and `throw`.\n* @returns A not-found error object that can be thrown or returned.\n* @link https://tanstack.com/router/latest/docs/router/framework/react/api/router/notFoundFunction\n*/\nfunction notFound(options = {}) {\n\toptions.isNotFound = true;\n\tif (options.throw) throw options;\n\treturn options;\n}\n/** Determine if a value is a TanStack Router not-found error. */\nfunction isNotFound(obj) {\n\treturn obj?.isNotFound === true;\n}\n//#endregion\nexport { isNotFound, notFound };\n\n//# sourceMappingURL=not-found.js.map","import { isServer } from \"@tanstack/router-core/isServer\";\n//#region src/scroll-restoration.ts\nfunction getSafeSessionStorage() {\n\ttry {\n\t\treturn sessionStorage;\n\t} catch {\n\t\treturn;\n\t}\n}\nconst storageKey = \"tsr-scroll-restoration-v1_3\";\nconst safeSessionStorage = getSafeSessionStorage();\nfunction createScrollRestorationCache() {\n\ttry {\n\t\treturn JSON.parse(safeSessionStorage?.getItem(\"tsr-scroll-restoration-v1_3\") || \"{}\");\n\t} catch {\n\t\treturn {};\n\t}\n}\nfunction persistScrollRestorationCache() {\n\ttry {\n\t\tsafeSessionStorage?.setItem(storageKey, JSON.stringify(scrollRestorationCache));\n\t} catch {\n\t\tif (process.env.NODE_ENV !== \"production\") console.warn(\"[ts-router] Could not persist scroll restoration state to sessionStorage.\");\n\t}\n}\nconst scrollRestorationCache = /* @__PURE__ */ createScrollRestorationCache();\nconst scrollRestorationIdAttribute = \"data-scroll-restoration-id\";\n/**\n* The default `getKey` function for `useScrollRestoration`.\n* It returns the `key` from the location state or the `href` of the location.\n*\n* The `location.href` is used as a fallback to support the use case where the location state is not available like the initial render.\n*/\nconst defaultGetScrollRestorationKey = (location) => {\n\treturn location.state.__TSR_key || location.href;\n};\nfunction getScrollRestorationSelector(element) {\n\tconst attrId = element.getAttribute(scrollRestorationIdAttribute);\n\tif (attrId) return `[${scrollRestorationIdAttribute}=\"${attrId}\"]`;\n\tlet selector = \"\";\n\tlet el = element;\n\tlet parent;\n\twhile (parent = el.parentNode) {\n\t\tlet index = 1;\n\t\tlet sibling = el;\n\t\twhile (sibling = sibling.previousElementSibling) index++;\n\t\tconst part = `${el.localName}:nth-child(${index})`;\n\t\tselector = selector ? `${part} > ${selector}` : part;\n\t\tel = parent;\n\t}\n\treturn selector;\n}\nfunction getElementScrollRestorationEntry(router, options) {\n\tconst entries = scrollRestorationCache[(options.getKey || defaultGetScrollRestorationKey)(router.latestLocation)];\n\tif (!entries) return;\n\tif (options.id) return entries[`[${scrollRestorationIdAttribute}=\"${options.id}\"]`];\n\tconst element = options.getElement?.();\n\tif (!element) return;\n\treturn entries[element === window ? windowScrollTarget : getScrollRestorationSelector(element)];\n}\nlet ignoreScroll = false;\nconst windowScrollTarget = \"window\";\nfunction getElement(selector) {\n\ttry {\n\t\treturn typeof selector === \"function\" ? selector() : document.querySelector(selector);\n\t} catch {}\n}\nfunction getScrollToTopElements(scrollToTopSelectors) {\n\tconst elements = /* @__PURE__ */ new Set();\n\tfor (const selector of scrollToTopSelectors) {\n\t\tif (selector === windowScrollTarget) continue;\n\t\tconst element = getElement(selector);\n\t\tif (element) elements.add(element);\n\t}\n\treturn elements;\n}\nfunction setupScrollRestoration(router, force) {\n\tconst shouldSetupScrollRestoration = force ?? router.options.scrollRestoration;\n\tconst scroll = router._scroll;\n\tif (shouldSetupScrollRestoration) scroll.restoring = true;\n\tif (isServer ?? router.isServer) return;\n\tconst getKey = router.options.getScrollRestorationKey || defaultGetScrollRestorationKey;\n\tconst trackedScrollTargets = /* @__PURE__ */ new Set();\n\tconst snapshotCurrentScrollTargets = (restoreKey) => {\n\t\tconst keyEntry = scrollRestorationCache[restoreKey] ||= {};\n\t\tfor (const target of trackedScrollTargets) if (target === document) keyEntry[windowScrollTarget] = {\n\t\t\tscrollX,\n\t\t\tscrollY\n\t\t};\n\t\telse if (target.isConnected) keyEntry[getScrollRestorationSelector(target)] = {\n\t\t\tscrollX: target.scrollLeft,\n\t\t\tscrollY: target.scrollTop\n\t\t};\n\t};\n\tif (shouldSetupScrollRestoration && !scroll.restoration) {\n\t\tscroll.restoration = true;\n\t\tignoreScroll = false;\n\t\thistory.scrollRestoration = \"manual\";\n\t\tdocument.addEventListener(\"scroll\", (event) => {\n\t\t\tif (ignoreScroll) return;\n\t\t\ttrackedScrollTargets.add(event.target);\n\t\t}, true);\n\t\trouter.subscribe(\"onBeforeLoad\", (event) => {\n\t\t\tif (event.fromLocation) snapshotCurrentScrollTargets(getKey(event.fromLocation));\n\t\t\ttrackedScrollTargets.clear();\n\t\t});\n\t\taddEventListener(\"pagehide\", () => {\n\t\t\tsnapshotCurrentScrollTargets(getKey(router.stores.resolvedLocation.get() ?? router.stores.location.get()));\n\t\t\tpersistScrollRestorationCache();\n\t\t});\n\t}\n\tif (scroll.reset) return;\n\tscroll.reset = true;\n\trouter.subscribe(\"onRendered\", (event) => {\n\t\tconst behavior = router.options.scrollRestorationBehavior;\n\t\tconst scrollToTopSelectors = router.options.scrollToTopSelectors;\n\t\tconst shouldResetScroll = scroll.next;\n\t\tconst hashNavigation = scroll.hash;\n\t\tlet scrollToTopElements;\n\t\ttrackedScrollTargets.clear();\n\t\tscroll.next = true;\n\t\tscroll.hash = false;\n\t\tif (typeof router.options.scrollRestoration === \"function\" && !router.options.scrollRestoration({ location: router.latestLocation })) return;\n\t\tconst cacheKey = getKey(event.toLocation);\n\t\tconst fromCacheKey = event.fromLocation && getKey(event.fromLocation);\n\t\tif (scroll.restoring && fromCacheKey && fromCacheKey !== cacheKey) {\n\t\t\tconst fromElementEntries = scrollRestorationCache[fromCacheKey];\n\t\t\tif (fromElementEntries) {\n\t\t\t\tlet toElementEntries = scrollRestorationCache[cacheKey];\n\t\t\t\tfor (const elementSelector in fromElementEntries) {\n\t\t\t\t\tif (elementSelector === windowScrollTarget) {\n\t\t\t\t\t\tif (shouldResetScroll) continue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst element = getElement(elementSelector);\n\t\t\t\t\t\tif (!element) continue;\n\t\t\t\t\t\tif (shouldResetScroll && scrollToTopSelectors) {\n\t\t\t\t\t\t\tscrollToTopElements ??= getScrollToTopElements(scrollToTopSelectors);\n\t\t\t\t\t\t\tif (scrollToTopElements.has(element)) continue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!toElementEntries) toElementEntries = scrollRestorationCache[cacheKey] = {};\n\t\t\t\t\ttoElementEntries[elementSelector] ??= fromElementEntries[elementSelector];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tignoreScroll = true;\n\t\ttry {\n\t\t\tconst hash = event.toLocation.hash;\n\t\t\tconst hashScrollIntoViewOptions = event.toLocation.state.__hashScrollIntoViewOptions ?? true;\n\t\t\tlet windowRestored = false;\n\t\t\tif (shouldResetScroll) {\n\t\t\t\tif (!hash && scrollToTopSelectors) scrollToTopElements ??= getScrollToTopElements(scrollToTopSelectors);\n\t\t\t\tconst skipWindowRestore = hash && hashScrollIntoViewOptions && hashNavigation;\n\t\t\t\tconst elementEntries = scroll.restoring ? scrollRestorationCache[cacheKey] : void 0;\n\t\t\t\tif (elementEntries) for (const elementSelector in elementEntries) {\n\t\t\t\t\tconst { scrollX, scrollY } = elementEntries[elementSelector];\n\t\t\t\t\tif (elementSelector === windowScrollTarget) {\n\t\t\t\t\t\tif (skipWindowRestore) continue;\n\t\t\t\t\t\tscrollTo({\n\t\t\t\t\t\t\ttop: scrollY,\n\t\t\t\t\t\t\tleft: scrollX,\n\t\t\t\t\t\t\tbehavior\n\t\t\t\t\t\t});\n\t\t\t\t\t\twindowRestored = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst element = getElement(elementSelector);\n\t\t\t\t\t\tif (element) {\n\t\t\t\t\t\t\telement.scrollLeft = scrollX;\n\t\t\t\t\t\t\telement.scrollTop = scrollY;\n\t\t\t\t\t\t\tscrollToTopElements?.delete(element);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!hash) {\n\t\t\t\t\tconst scrollOptions = {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\tbehavior\n\t\t\t\t\t};\n\t\t\t\t\tif (!windowRestored) scrollTo(scrollOptions);\n\t\t\t\t\tif (scrollToTopElements) for (const element of scrollToTopElements) element.scrollTo(scrollOptions);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!windowRestored && hash && hashScrollIntoViewOptions) document.getElementById(hash)?.scrollIntoView(hashScrollIntoViewOptions);\n\t\t} finally {\n\t\t\tignoreScroll = false;\n\t\t}\n\t});\n}\n//#endregion\nexport { defaultGetScrollRestorationKey, getElementScrollRestorationEntry, setupScrollRestoration, storageKey };\n\n//# sourceMappingURL=scroll-restoration.js.map","//#region src/qss.ts\n/**\n* Program is a reimplementation of the `qss` package:\n* Copyright (c) Luke Edwards luke.edwards05@gmail.com, MIT License\n* https://github.com/lukeed/qss/blob/master/license.md\n*\n* This reimplementation uses modern browser APIs\n* (namely URLSearchParams) and TypeScript while still\n* maintaining the original functionality and interface.\n*\n* Update: this implementation has also been mangled to\n* fit exactly our use-case (single value per key in encoding).\n*/\n/**\n* Encodes an object into a query string.\n* @param obj - The object to encode into a query string.\n* @param stringify - An optional custom stringify function.\n* @returns The encoded query string.\n* @example\n* ```\n* // Example input: encode({ token: 'foo', key: 'value' })\n* // Expected output: \"token=foo&key=value\"\n* ```\n*/\nfunction encode(obj, stringify = String) {\n\tlet result;\n\tfor (const key in obj) {\n\t\tconst val = obj[key];\n\t\tif (val !== void 0) (result ||= new URLSearchParams()).set(key, stringify(val));\n\t}\n\treturn result ? result.toString() : \"\";\n}\n/**\n* Converts a string value to its appropriate type (string, number, boolean).\n* @param mix - The string value to convert.\n* @returns The converted value.\n* @example\n* // Example input: toValue(\"123\")\n* // Expected output: 123\n*/\nfunction toValue(str) {\n\tif (!str) return \"\";\n\tif (str === \"false\") return false;\n\tif (str === \"true\") return true;\n\treturn +str * 0 === 0 && +str + \"\" === str ? +str : str;\n}\n/**\n* Decodes a query string into an object.\n* @param str - The query string to decode.\n* @returns The decoded key-value pairs in an object format.\n* @example\n* // Example input: decode(\"token=foo&key=value\")\n* // Expected output: { \"token\": \"foo\", \"key\": \"value\" }\n*/\nfunction decode(str) {\n\tconst searchParams = new URLSearchParams(str);\n\tconst result = Object.create(null);\n\tfor (const [key, value] of searchParams.entries()) {\n\t\tconst previousValue = result[key];\n\t\tif (previousValue == null) result[key] = toValue(value);\n\t\telse if (Array.isArray(previousValue)) previousValue.push(toValue(value));\n\t\telse result[key] = [previousValue, toValue(value)];\n\t}\n\treturn result;\n}\n//#endregion\nexport { decode, encode };\n\n//# sourceMappingURL=qss.js.map","import { decode, encode } from \"./qss.js\";\n//#region src/searchParams.ts\nconst jsonStart = /^(?:\\s|[\"[{\\d-]|fa|nu|tr)/;\n/** Default `parseSearch` that strips leading '?' and JSON-parses values. */\nconst defaultParseSearch = parseSearchWith(JSON.parse);\n/** Default `stringifySearch` using JSON.stringify for complex values. */\nconst defaultStringifySearch = stringifySearchWith(JSON.stringify, JSON.parse);\n/**\n* Build a `parseSearch` function using a provided JSON-like parser.\n*\n* The returned function strips a leading `?`, decodes values, and attempts to\n* JSON-parse string values using the given `parser`.\n*\n* @param parser Function to parse a string value (e.g. `JSON.parse`).\n* @returns A `parseSearch` function compatible with `Router` options.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization\n*/\nfunction parseSearchWith(parser) {\n\tconst isJsonParser = parser === JSON.parse;\n\treturn (searchStr) => {\n\t\tif (searchStr[0] === \"?\") searchStr = searchStr.substring(1);\n\t\tconst query = decode(searchStr);\n\t\tfor (const key in query) {\n\t\t\tconst value = query[key];\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tif (isJsonParser && !jsonStart.test(value)) continue;\n\t\t\t\ttry {\n\t\t\t\t\tquery[key] = parser(value);\n\t\t\t\t} catch (_err) {}\n\t\t\t}\n\t\t}\n\t\treturn query;\n\t};\n}\n/**\n* Build a `stringifySearch` function using a provided serializer.\n*\n* Non-primitive values are serialized with `stringify`. If a `parser` is\n* supplied, string values that are parseable are re-serialized to ensure\n* symmetry with `parseSearch`.\n*\n* @param stringify Function to serialize a value (e.g. `JSON.stringify`).\n* @param parser Optional parser to detect parseable strings.\n* @returns A `stringifySearch` function compatible with `Router` options.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization\n*/\nfunction stringifySearchWith(stringify, parser) {\n\tconst isJsonParser = parser === JSON.parse;\n\tfunction stringifyValue(val) {\n\t\tif (val && typeof val === \"object\") try {\n\t\t\treturn stringify(val);\n\t\t} catch (_err) {}\n\t\telse if (parser && typeof val === \"string\") {\n\t\t\tif (isJsonParser && !jsonStart.test(val)) return val;\n\t\t\ttry {\n\t\t\t\tparser(val);\n\t\t\t\treturn stringify(val);\n\t\t\t} catch (_err) {}\n\t\t}\n\t\treturn val;\n\t}\n\treturn (search) => {\n\t\tconst searchStr = encode(search, stringifyValue);\n\t\treturn searchStr ? `?${searchStr}` : \"\";\n\t};\n}\n//#endregion\nexport { defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith };\n\n//# sourceMappingURL=searchParams.js.map","//#region src/root.ts\n/** Stable identifier used for the root route in a route tree. */\nconst rootRouteId = \"__root__\";\n//#endregion\nexport { rootRouteId };\n\n//# sourceMappingURL=root.js.map","//#region src/redirect.ts\n/**\n* Create a redirect Response understood by TanStack Router.\n*\n* Use from route `loader`/`beforeLoad` or server functions to trigger a\n* navigation. If `throw: true` is set, the redirect is thrown instead of\n* returned. External `href` values are classified as full-document\n* navigations when the router resolves the redirect.\n*\n* @param opts Options for the redirect. Common fields:\n* - `href`: absolute URL for external redirects.\n* - `statusCode`: HTTP status code to use (defaults to 307).\n* - `headers`: additional headers to include on the Response.\n* - Standard navigation options like `to`, `params`, `search`, `replace`,\n* and `reloadDocument` for internal redirects.\n* @returns A Response augmented with router navigation options.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/redirectFunction\n*/\nfunction redirect(opts) {\n\topts.statusCode = opts.statusCode || opts.code || 307;\n\tconst headers = new Headers(opts.headers);\n\tif (opts.href && headers.get(\"Location\") === null) headers.set(\"Location\", opts.href);\n\tconst response = new Response(null, {\n\t\tstatus: opts.statusCode,\n\t\theaders\n\t});\n\tresponse.options = opts;\n\tif (opts.throw) throw response;\n\treturn response;\n}\n/** Check whether a value is a TanStack Router redirect Response. */\nfunction isRedirect(obj) {\n\treturn obj instanceof Response && !!obj.options;\n}\n/** True if value is a redirect with a resolved `href` location. */\nfunction isResolvedRedirect(obj) {\n\treturn isRedirect(obj) && !!obj.options.href;\n}\n/** Parse a serialized redirect object back into a redirect Response. */\nfunction parseRedirect(obj) {\n\tif (obj !== null && typeof obj === \"object\" && obj.isSerializedRedirect) return redirect(obj);\n}\n//#endregion\nexport { isRedirect, isResolvedRedirect, parseRedirect, redirect };\n\n//# sourceMappingURL=redirect.js.map","//#region src/sieve-cache.ts\n/**\n* A fixed-capacity cache using the SIEVE eviction algorithm\n* (https://cachemon.github.io/SIEVE-website/).\n*\n* Entries live in the Map's FIFO insertion order; a hit only flips a `visited`\n* bit instead of relinking the entry, which makes `get` (by far the hottest\n* operation here) one `Map.get` plus a boolean store. Eviction sweeps a `hand`\n* from the oldest entry towards the newest, clearing `visited` bits until it\n* finds an unvisited entry to drop, so entries touched since the last sweep\n* survive one more round. This keeps LRU-like hit ratios while being\n* scan-resistant.\n*/\nfunction createSieveCache(max) {\n\tconst cache = /* @__PURE__ */ new Map();\n\tlet hand;\n\tlet newest;\n\treturn {\n\t\tget(key) {\n\t\t\tconst entry = cache.get(key);\n\t\t\tif (!entry) return;\n\t\t\tentry.visited = true;\n\t\t\treturn entry.value;\n\t\t},\n\t\tset(key, value) {\n\t\t\tconst existing = cache.get(key);\n\t\t\tif (existing) {\n\t\t\t\texisting.value = value;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (cache.size >= max) {\n\t\t\t\tlet node = hand?.next().value;\n\t\t\t\twhile (!node || node.visited) {\n\t\t\t\t\tif (node) node.visited = false;\n\t\t\t\t\telse hand = cache.values();\n\t\t\t\t\tnode = hand.next().value;\n\t\t\t\t}\n\t\t\t\tif (node === newest) hand = void 0;\n\t\t\t\tcache.delete(node.key);\n\t\t\t}\n\t\t\tconst entry = {\n\t\t\t\tkey,\n\t\t\t\tvalue,\n\t\t\t\tvisited: false\n\t\t\t};\n\t\t\tnewest = entry;\n\t\t\tcache.set(key, entry);\n\t\t},\n\t\tclear() {\n\t\t\tcache.clear();\n\t\t\thand = void 0;\n\t\t\tnewest = void 0;\n\t\t}\n\t};\n}\n//#endregion\nexport { createSieveCache };\n\n//# sourceMappingURL=sieve-cache.js.map","import { last } from \"./utils.js\";\nimport { invariant } from \"./invariant.js\";\nimport { trimPathRight } from \"./path.js\";\nimport { createSieveCache } from \"./sieve-cache.js\";\nconst SEGMENT_TYPE_INDEX = 4;\nconst SEGMENT_TYPE_PATHLESS = 5;\nfunction getParamNames(data) {\n\tconst cached = data.names;\n\tif (cached) return cached;\n\tconst keys = [];\n\tfor (const segment of data) if (typeof segment !== \"string\") keys.push(segment[1]);\n\treturn data.names = keys;\n}\n/** Parse one segment for matching and retain the same record for interpolation. */\nfunction parseSegment(path, start, end) {\n\tconst part = path.substring(start, end);\n\tif (part.charCodeAt(0) === 36) return part.length === 1 ? [\n\t\t2,\n\t\t\"_splat\",\n\t\t\"\",\n\t\tvoid 0\n\t] : [\n\t\t1,\n\t\tpart.substring(1),\n\t\t\"\",\n\t\t\"\"\n\t];\n\tconst open = part.indexOf(\"{\");\n\tif (open >= 0) {\n\t\tconst close = part.indexOf(\"}\", open);\n\t\tconst optional = part.charCodeAt(open + 1) === 45;\n\t\tconst nameStart = open + (optional ? 3 : 2);\n\t\tif (close >= 0 && part.charCodeAt(nameStart - 1) === 36 && (!optional || nameStart < close)) {\n\t\t\tconst key = part.substring(nameStart, close);\n\t\t\treturn [\n\t\t\t\toptional ? 3 : key ? 1 : 2,\n\t\t\t\tkey || \"_splat\",\n\t\t\t\tpart.substring(0, open),\n\t\t\t\tpath.substring(start + close + 1, key ? end : path.length)\n\t\t\t];\n\t\t}\n\t}\n\treturn part;\n}\nfunction parseSegments(defaultCaseSensitive, route, start, node, dynamicListsToSort, parentInterpolation) {\n\tlet cursor = start;\n\tconst path = route.fullPath ?? route.from;\n\tconst options = route.options;\n\tconst length = path.length;\n\tconst literalEnd = path.endsWith(\"/\") ? length - 1 : length;\n\tconst caseSensitive = options?.caseSensitive ?? defaultCaseSensitive;\n\tconst parseParams = options?.params?.parse ?? options?.parseParams;\n\tlet interpolation;\n\tlet literalStart = parentInterpolation ? start - 1 : 0;\n\tif (!node || path.includes(\"$\")) {\n\t\tinterpolation = parentInterpolation?.slice() ?? [];\n\t\tconst tail = last(interpolation);\n\t\tif (tail && typeof tail !== \"string\" && tail[0] === 2) {\n\t\t\tinterpolation[interpolation.length - 1] = [\n\t\t\t\ttail[0],\n\t\t\t\ttail[1],\n\t\t\t\ttail[2],\n\t\t\t\ttail[3] === void 0 ? void 0 : tail[3] + path.substring(start - (path[start - 2] === \"/\" ? 2 : 1), literalEnd)\n\t\t\t];\n\t\t\tliteralStart = length;\n\t\t}\n\t}\n\twhile (cursor < length) {\n\t\tconst start = cursor;\n\t\tconst next = path.indexOf(\"/\", start);\n\t\tlet end = next === -1 ? length : next;\n\t\tconst segment = parseSegment(path, start, end);\n\t\tcursor = end + 1;\n\t\tlet nextNode;\n\t\tif (typeof segment === \"string\") {\n\t\t\tif (!node) continue;\n\t\t\tlet name = segment;\n\t\t\tlet staticChildren;\n\t\t\tif (caseSensitive) staticChildren = node.static ??= /* @__PURE__ */ new Map();\n\t\t\telse {\n\t\t\t\tname = segment.toLowerCase();\n\t\t\t\tstaticChildren = node.staticInsensitive ??= /* @__PURE__ */ new Map();\n\t\t\t}\n\t\t\tconst existingNode = staticChildren.get(name);\n\t\t\tif (existingNode) nextNode = existingNode;\n\t\t\telse {\n\t\t\t\tconst next = createSegmentNode(node);\n\t\t\t\tnextNode = next;\n\t\t\t\tstaticChildren.set(name, next);\n\t\t\t}\n\t\t} else {\n\t\t\tconst kind = segment[0];\n\t\t\tlet prefix = segment[2];\n\t\t\tlet suffix = segment[3] ?? \"\";\n\t\t\tif (kind === 2) {\n\t\t\t\tend = length;\n\t\t\t\tcursor = end + 1;\n\t\t\t}\n\t\t\tif (interpolation && literalStart < end) {\n\t\t\t\tif (literalStart < start - 1) interpolation.push(path.substring(literalStart, start - 1));\n\t\t\t\tsegment[2] = \"/\" + prefix;\n\t\t\t\tif (kind === 2 && segment[3] !== void 0 && literalEnd < length) segment[3] = suffix.slice(0, -1);\n\t\t\t\tinterpolation.push(segment);\n\t\t\t\tliteralStart = end;\n\t\t\t}\n\t\t\tif (!node) continue;\n\t\t\tconst actuallyCaseSensitive = caseSensitive && !!(prefix || suffix);\n\t\t\tif (!caseSensitive) {\n\t\t\t\tprefix = prefix.toLowerCase();\n\t\t\t\tsuffix = suffix.toLowerCase();\n\t\t\t}\n\t\t\tconst siblings = kind === 1 ? node.dynamic ??= [] : kind === 3 ? node.optional ??= [] : node.wildcard ??= [];\n\t\t\tconst existingNode = kind !== 2 && !parseParams && siblings.find((s) => !s.parse && s.caseSensitive === actuallyCaseSensitive && s.prefix === prefix && s.suffix === suffix);\n\t\t\tif (existingNode) nextNode = existingNode;\n\t\t\telse {\n\t\t\t\tconst next = createSegmentNode(node, kind, actuallyCaseSensitive, prefix, suffix);\n\t\t\t\tnextNode = next;\n\t\t\t\tsiblings.push(next);\n\t\t\t\tif (siblings.length === 2) dynamicListsToSort?.push(siblings);\n\t\t\t}\n\t\t}\n\t\tnode = nextNode;\n\t}\n\tif (interpolation && literalStart < literalEnd) interpolation.push(path.substring(literalStart, literalEnd));\n\tconst segmentData = interpolation?.slice();\n\tif (!node) return segmentData;\n\tif (parseParams && route.children && !route.isRoot && route.id && route.id.charCodeAt(route.id.lastIndexOf(\"/\") + 1) === 95) {\n\t\tconst pathlessNode = createSegmentNode(node, SEGMENT_TYPE_PATHLESS);\n\t\t(node.pathless ??= []).push(pathlessNode);\n\t\tnode = pathlessNode;\n\t}\n\tconst isLeaf = (route.path || !route.children) && !route.isRoot;\n\tif (isLeaf && literalEnd < length) {\n\t\tconst indexNode = createSegmentNode(node, SEGMENT_TYPE_INDEX);\n\t\tnode.index = indexNode;\n\t\tnode = indexNode;\n\t}\n\tnode.parse = parseParams ?? null;\n\tnode.priority = options?.params?.priority ?? 0;\n\tif (!node.route) {\n\t\tnode.data = segmentData;\n\t\tif (isLeaf) node.route = route;\n\t}\n\treturn [\n\t\tnode,\n\t\tcursor,\n\t\tsegmentData\n\t];\n}\nfunction sortDynamic(a, b) {\n\tif (a.parse && !b.parse) return -1;\n\tif (!a.parse && b.parse) return 1;\n\tif (a.parse && b.parse && (a.priority || b.priority)) return b.priority - a.priority;\n\tif (a.prefix && b.prefix && a.prefix !== b.prefix) {\n\t\tif (a.prefix.startsWith(b.prefix)) return -1;\n\t\tif (b.prefix.startsWith(a.prefix)) return 1;\n\t}\n\tif (a.suffix && b.suffix && a.suffix !== b.suffix) {\n\t\tif (a.suffix.endsWith(b.suffix)) return -1;\n\t\tif (b.suffix.endsWith(a.suffix)) return 1;\n\t}\n\tif (a.prefix && !b.prefix) return -1;\n\tif (!a.prefix && b.prefix) return 1;\n\tif (a.suffix && !b.suffix) return -1;\n\tif (!a.suffix && b.suffix) return 1;\n\tif (a.caseSensitive && !b.caseSensitive) return -1;\n\tif (!a.caseSensitive && b.caseSensitive) return 1;\n\treturn 0;\n}\nfunction createSegmentNode(parent, kind = 0, caseSensitive, prefix, suffix) {\n\treturn {\n\t\tkind,\n\t\tdepth: parent ? parent.depth + 1 : 0,\n\t\tpathless: null,\n\t\tindex: null,\n\t\tstatic: null,\n\t\tstaticInsensitive: null,\n\t\tdynamic: null,\n\t\toptional: null,\n\t\twildcard: null,\n\t\troute: null,\n\t\tdata: void 0,\n\t\tparent,\n\t\tparse: null,\n\t\tpriority: 0,\n\t\tcaseSensitive,\n\t\tprefix,\n\t\tsuffix\n\t};\n}\nfunction processRouteMasks(routeList, processedTree) {\n\tconst segmentTree = createSegmentNode();\n\tconst dynamicListsToSort = [];\n\tfunction visit(route, start, parentNode, parentInterpolation) {\n\t\tconst [node, cursor, segments] = parseSegments(false, route, start, parentNode, dynamicListsToSort, parentInterpolation);\n\t\tif (route.children) for (const child of route.children) visit(child, cursor, node, segments);\n\t}\n\tfor (const route of routeList) visit(route, 1, segmentTree);\n\tfor (const nodes of dynamicListsToSort) nodes.sort(sortDynamic);\n\tprocessedTree.masksTree = segmentTree;\n\tprocessedTree.flatCache = createSieveCache(1e3);\n}\n/**\n* Take an arbitrary list of routes, create a tree from them (if it hasn't been created already), and match a path against it.\n*/\nfunction findFlatMatch(path, processedTree) {\n\tpath ||= \"/\";\n\tconst cached = processedTree.flatCache.get(path);\n\tif (cached !== void 0) return cached;\n\tconst result = findMatch(path, processedTree.masksTree);\n\tprocessedTree.flatCache.set(path, result);\n\treturn result;\n}\n/**\n* @deprecated keep until v2 so that `router.matchRoute` can keep not caring about the actual route tree\n*/\nfunction findSingleMatch(from, caseSensitive, fuzzy, path, processedTree) {\n\tfrom ||= \"/\";\n\tpath ||= \"/\";\n\tconst key = caseSensitive ? `case\\0${from}` : from;\n\tlet tree = processedTree.singleCache.get(key);\n\tif (!tree) {\n\t\ttree = createSegmentNode();\n\t\tparseSegments(caseSensitive, { from }, 1, tree);\n\t\tprocessedTree.singleCache.set(key, tree);\n\t}\n\treturn findMatch(path, tree, fuzzy);\n}\nfunction findRouteMatch(path, processedTree, fuzzy = false) {\n\tconst key = fuzzy ? path : `nofuzz\\0${path}`;\n\tconst cached = processedTree.matchCache.get(key);\n\tif (cached !== void 0) return cached;\n\tpath ||= \"/\";\n\tlet result;\n\ttry {\n\t\tresult = findMatch(path, processedTree.segmentTree, fuzzy);\n\t} catch (err) {\n\t\tif (err instanceof URIError) result = null;\n\t\telse throw err;\n\t}\n\tif (result) result.branch = buildRouteBranch(result.route);\n\tprocessedTree.matchCache.set(key, result);\n\treturn result;\n}\n/**\n* Processes a route tree into a segment trie for efficient path matching.\n* Also builds lookup maps for routes by ID and by trimmed full path.\n*/\nfunction processRouteTree(routeTree, caseSensitive = false) {\n\tconst segmentTree = createSegmentNode();\n\tconst dynamicListsToSort = [];\n\tconst routesById = {};\n\tconst routesByPath = {};\n\tlet index = 0;\n\tfunction visit(route, start, parentNode, parentInterpolation) {\n\t\troute.init(index);\n\t\tif (route.id in routesById) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") throw new Error(`Invariant failed: Duplicate routes found with id: ${String(route.id)}`);\n\t\t\tinvariant();\n\t\t}\n\t\troutesById[route.id] = route;\n\t\tif (index !== 0 && route.path) {\n\t\t\tconst trimmedFullPath = trimPathRight(route.fullPath);\n\t\t\tif (!routesByPath[trimmedFullPath] || route.fullPath.endsWith(\"/\")) routesByPath[trimmedFullPath] = route;\n\t\t}\n\t\tindex++;\n\t\tconst [node, cursor, segments] = parseSegments(caseSensitive, route, start, parentNode, dynamicListsToSort, parentInterpolation);\n\t\troute._interpolation = segments;\n\t\tif (route.children) for (const child of route.children) visit(child, cursor, node, segments);\n\t}\n\tvisit(routeTree, 1, segmentTree);\n\tfor (const nodes of dynamicListsToSort) nodes.sort(sortDynamic);\n\treturn {\n\t\tprocessedTree: {\n\t\t\tsegmentTree,\n\t\t\tsingleCache: createSieveCache(1e3),\n\t\t\tmatchCache: createSieveCache(1e3),\n\t\t\tflatCache: null,\n\t\t\tmasksTree: null\n\t\t},\n\t\troutesById,\n\t\troutesByPath\n\t};\n}\nfunction findMatch(path, segmentTree, fuzzy = false) {\n\tconst parts = path.split(\"/\");\n\tconst leaf = getNodeMatch(path, parts, segmentTree, fuzzy);\n\tif (!leaf) return null;\n\tconst [rawParams] = extractParams(path, parts, leaf);\n\treturn {\n\t\troute: leaf.node.route,\n\t\trawParams\n\t};\n}\n/**\n* This function is \"resumable\":\n* - the `leaf` input can contain `extract` and `rawParams` properties from a previous `extractParams` call\n* - the returned `state` can be passed back as `extract` in a future call to continue extracting params from where we left off\n*\n* Inputs are *not* mutated.\n*/\nfunction extractParams(path, parts, leaf) {\n\tconst list = buildBranch(leaf.node);\n\tconst names = leaf.node.data && getParamNames(leaf.node.data);\n\tconst rawParams = Object.create(null);\n\t/** which segment of the path we're currently processing */\n\tlet partIndex = leaf.extract?.part ?? 0;\n\t/** which node of the route tree branch we're currently processing */\n\tlet nodeIndex = leaf.extract?.node ?? 0;\n\t/** index of the 1st character of the segment we're processing in the path string */\n\tlet pathIndex = leaf.extract?.path ?? 0;\n\t/** Next original parameter name, independent of pathless/static nodes. */\n\tlet paramIndex = leaf.extract?.param ?? 0;\n\tfor (; nodeIndex < list.length; partIndex++, nodeIndex++, pathIndex++) {\n\t\tconst node = list[nodeIndex];\n\t\tif (node.kind === SEGMENT_TYPE_INDEX) break;\n\t\tif (node.kind === SEGMENT_TYPE_PATHLESS) {\n\t\t\tpartIndex--;\n\t\t\tpathIndex--;\n\t\t\tcontinue;\n\t\t}\n\t\tconst part = parts[partIndex];\n\t\tconst currentPathIndex = pathIndex;\n\t\tif (part) pathIndex += part.length;\n\t\tif (node.kind === 1 || node.kind === 3) {\n\t\t\tconst name = names[paramIndex++];\n\t\t\tif (node.kind === 3 && leaf.skipped & 1 << nodeIndex) {\n\t\t\t\tpartIndex--;\n\t\t\t\tpathIndex = currentPathIndex - 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst value = node.suffix || node.prefix ? part.substring(node.prefix.length, part.length - node.suffix.length) : part;\n\t\t\tif (value || node.kind === 1) rawParams[name] = decodeURIComponent(value);\n\t\t} else if (node.kind === 2) {\n\t\t\tconst n = node;\n\t\t\tconst value = path.substring(currentPathIndex + n.prefix.length, path.length - n.suffix.length);\n\t\t\tconst splat = decodeURIComponent(value);\n\t\t\trawParams[\"*\"] = splat;\n\t\t\trawParams._splat = splat;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (leaf.rawParams) Object.assign(rawParams, leaf.rawParams);\n\treturn [rawParams, {\n\t\tpart: partIndex,\n\t\tnode: nodeIndex,\n\t\tpath: pathIndex,\n\t\tparam: paramIndex\n\t}];\n}\nfunction buildRouteBranch(route) {\n\tconst list = [route];\n\twhile (route.parentRoute) {\n\t\troute = route.parentRoute;\n\t\tlist.push(route);\n\t}\n\tlist.reverse();\n\treturn list;\n}\nfunction buildBranch(node) {\n\tconst list = Array(node.depth + 1);\n\tdo {\n\t\tlist[node.depth] = node;\n\t\tnode = node.parent;\n\t} while (node);\n\treturn list;\n}\nfunction getNodeMatch(path, parts, segmentTree, fuzzy) {\n\tif (path === \"/\" && segmentTree.index) return {\n\t\tnode: segmentTree.index,\n\t\tskipped: 0\n\t};\n\tconst trailingSlash = !last(parts);\n\tconst pathIsIndex = trailingSlash && path !== \"/\";\n\tconst partsLength = parts.length - (trailingSlash ? 1 : 0);\n\tconst stack = [{\n\t\tnode: segmentTree,\n\t\tindex: 1,\n\t\tskipped: 0,\n\t\tstatics: 0,\n\t\tdynamics: 0,\n\t\toptionals: 0\n\t}];\n\tlet bestFuzzy = null;\n\tlet bestMatch = null;\n\twhile (stack.length) {\n\t\tconst frame = stack.pop();\n\t\tconst { node, index, skipped, statics, dynamics, optionals } = frame;\n\t\tlet { extract, rawParams } = frame;\n\t\tif (node.kind === 2 && node.route && !isFrameMoreSpecific(bestMatch, frame)) continue;\n\t\tif (node.parse) {\n\t\t\tif (!validateParseParams(path, parts, frame)) continue;\n\t\t\trawParams = frame.rawParams;\n\t\t\textract = frame.extract;\n\t\t}\n\t\tif (fuzzy && node.route && node.kind !== SEGMENT_TYPE_INDEX && isFrameMoreSpecific(bestFuzzy, frame)) bestFuzzy = frame;\n\t\tconst isBeyondPath = index === partsLength;\n\t\tif (isBeyondPath) {\n\t\t\tif (node.route && (!pathIsIndex || node.kind === SEGMENT_TYPE_INDEX || node.kind === 2) && isFrameMoreSpecific(bestMatch, frame)) bestMatch = frame;\n\t\t\tif (!node.optional && !node.wildcard && !node.index && !node.pathless) continue;\n\t\t}\n\t\tconst part = isBeyondPath ? void 0 : parts[index];\n\t\tlet lowerPart;\n\t\tif (isBeyondPath && node.index) {\n\t\t\tconst indexFrame = {\n\t\t\t\tnode: node.index,\n\t\t\t\tindex,\n\t\t\t\tskipped,\n\t\t\t\tstatics,\n\t\t\t\tdynamics,\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t};\n\t\t\tlet indexValid = true;\n\t\t\tif (node.index.parse) {\n\t\t\t\tif (!validateParseParams(path, parts, indexFrame)) indexValid = false;\n\t\t\t}\n\t\t\tif (indexValid) {\n\t\t\t\tif (!dynamics && !optionals && !skipped && isPerfectStaticMatch(statics, partsLength)) return indexFrame;\n\t\t\t\tif (isFrameMoreSpecific(bestMatch, indexFrame)) bestMatch = indexFrame;\n\t\t\t}\n\t\t}\n\t\tif (node.wildcard) for (let i = node.wildcard.length - 1; i >= 0; i--) {\n\t\t\tconst segment = node.wildcard[i];\n\t\t\tconst { prefix, suffix } = segment;\n\t\t\tif (prefix) {\n\t\t\t\tif (isBeyondPath) continue;\n\t\t\t\tif (!(segment.caseSensitive ? part : lowerPart ??= part.toLowerCase()).startsWith(prefix)) continue;\n\t\t\t}\n\t\t\tif (suffix) {\n\t\t\t\tif (isBeyondPath) continue;\n\t\t\t\tconst end = parts.slice(index).join(\"/\");\n\t\t\t\tconst suffixPart = end.slice(-suffix.length);\n\t\t\t\tif ((segment.caseSensitive ? suffixPart : suffixPart.toLowerCase()) !== suffix || end.length - suffix.length < prefix.length) continue;\n\t\t\t}\n\t\t\tstack.push({\n\t\t\t\tnode: segment,\n\t\t\t\tindex: partsLength,\n\t\t\t\tskipped,\n\t\t\t\tstatics,\n\t\t\t\tdynamics,\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t});\n\t\t}\n\t\tif (node.optional) {\n\t\t\tconst nextSkipped = skipped | 1 << node.depth + 1;\n\t\t\tfor (let i = node.optional.length - 1; i >= 0; i--) {\n\t\t\t\tconst segment = node.optional[i];\n\t\t\t\tstack.push({\n\t\t\t\t\tnode: segment,\n\t\t\t\t\tindex,\n\t\t\t\t\tskipped: nextSkipped,\n\t\t\t\t\tstatics,\n\t\t\t\t\tdynamics,\n\t\t\t\t\toptionals,\n\t\t\t\t\textract,\n\t\t\t\t\trawParams\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (!isBeyondPath) for (let i = node.optional.length - 1; i >= 0; i--) {\n\t\t\t\tconst segment = node.optional[i];\n\t\t\t\tconst { prefix, suffix } = segment;\n\t\t\t\tif (prefix || suffix) {\n\t\t\t\t\tconst casePart = segment.caseSensitive ? part : lowerPart ??= part.toLowerCase();\n\t\t\t\t\tif (prefix && !casePart.startsWith(prefix)) continue;\n\t\t\t\t\tif (suffix && casePart.indexOf(suffix, casePart.length - suffix.length) < prefix.length) continue;\n\t\t\t\t}\n\t\t\t\tstack.push({\n\t\t\t\t\tnode: segment,\n\t\t\t\t\tindex: index + 1,\n\t\t\t\t\tskipped,\n\t\t\t\t\tstatics,\n\t\t\t\t\tdynamics,\n\t\t\t\t\toptionals: optionals + segmentScore(partsLength, index),\n\t\t\t\t\textract,\n\t\t\t\t\trawParams\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif (!isBeyondPath && node.dynamic && part) for (let i = node.dynamic.length - 1; i >= 0; i--) {\n\t\t\tconst segment = node.dynamic[i];\n\t\t\tconst { prefix, suffix } = segment;\n\t\t\tif (prefix || suffix) {\n\t\t\t\tconst casePart = segment.caseSensitive ? part : lowerPart ??= part.toLowerCase();\n\t\t\t\tif (prefix && !casePart.startsWith(prefix)) continue;\n\t\t\t\tif (suffix && casePart.indexOf(suffix, casePart.length - suffix.length) < prefix.length) continue;\n\t\t\t}\n\t\t\tstack.push({\n\t\t\t\tnode: segment,\n\t\t\t\tindex: index + 1,\n\t\t\t\tskipped,\n\t\t\t\tstatics,\n\t\t\t\tdynamics: dynamics + segmentScore(partsLength, index),\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t});\n\t\t}\n\t\tif (!isBeyondPath && node.staticInsensitive) {\n\t\t\tconst match = node.staticInsensitive.get(lowerPart ??= part.toLowerCase());\n\t\t\tif (match) stack.push({\n\t\t\t\tnode: match,\n\t\t\t\tindex: index + 1,\n\t\t\t\tskipped,\n\t\t\t\tstatics: statics + segmentScore(partsLength, index),\n\t\t\t\tdynamics,\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t});\n\t\t}\n\t\tif (!isBeyondPath && node.static) {\n\t\t\tconst match = node.static.get(part);\n\t\t\tif (match) stack.push({\n\t\t\t\tnode: match,\n\t\t\t\tindex: index + 1,\n\t\t\t\tskipped,\n\t\t\t\tstatics: statics + segmentScore(partsLength, index),\n\t\t\t\tdynamics,\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t});\n\t\t}\n\t\tif (node.pathless) for (let i = node.pathless.length - 1; i >= 0; i--) {\n\t\t\tconst segment = node.pathless[i];\n\t\t\tstack.push({\n\t\t\t\tnode: segment,\n\t\t\t\tindex,\n\t\t\t\tskipped,\n\t\t\t\tstatics,\n\t\t\t\tdynamics,\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t});\n\t\t}\n\t}\n\tif (bestMatch) return bestMatch;\n\tif (fuzzy && bestFuzzy) {\n\t\tlet sliceIndex = bestFuzzy.index;\n\t\tfor (let i = 0; i < bestFuzzy.index; i++) sliceIndex += parts[i].length;\n\t\tconst splat = sliceIndex === path.length ? \"/\" : path.slice(sliceIndex);\n\t\tbestFuzzy.rawParams ??= Object.create(null);\n\t\tbestFuzzy.rawParams[\"**\"] = decodeURIComponent(splat);\n\t\treturn bestFuzzy;\n\t}\n\treturn null;\n}\nfunction segmentScore(partsLength, index) {\n\treturn 2 ** (partsLength - index - 1);\n}\nfunction isPerfectStaticMatch(statics, partsLength) {\n\treturn statics === 2 ** (partsLength - 1) - 1;\n}\nfunction validateParseParams(path, parts, frame) {\n\tlet rawParams;\n\tlet state;\n\ttry {\n\t\t[rawParams, state] = extractParams(path, parts, frame);\n\t} catch {\n\t\treturn null;\n\t}\n\tframe.rawParams = rawParams;\n\tframe.extract = state;\n\tif (!frame.node.parse) return true;\n\ttry {\n\t\tif (frame.node.parse(rawParams) === false) return null;\n\t} catch {}\n\treturn true;\n}\nfunction isFrameMoreSpecific(prev, next) {\n\tif (!prev) return true;\n\treturn next.statics > prev.statics || next.statics === prev.statics && (next.dynamics > prev.dynamics || next.dynamics === prev.dynamics && (next.optionals > prev.optionals || next.optionals === prev.optionals && ((next.node.kind === SEGMENT_TYPE_INDEX) > (prev.node.kind === SEGMENT_TYPE_INDEX) || next.node.kind === SEGMENT_TYPE_INDEX === (prev.node.kind === SEGMENT_TYPE_INDEX) && next.node.depth > prev.node.depth)));\n}\n//#endregion\nexport { buildRouteBranch, findFlatMatch, findRouteMatch, findSingleMatch, parseSegments, processRouteMasks, processRouteTree };\n\n//# sourceMappingURL=new-process-route-tree.js.map","import { joinPaths, trimPath } from \"./path.js\";\n//#region src/rewrite.ts\n/** Compose multiple rewrite pairs into a single in/out rewrite. */\nfunction composeRewrites(rewrites) {\n\treturn {\n\t\tinput: ({ url }) => {\n\t\t\tfor (const rewrite of rewrites) url = executeRewriteInput(rewrite, url);\n\t\t\treturn url;\n\t\t},\n\t\toutput: ({ url }) => {\n\t\t\tfor (let i = rewrites.length - 1; i >= 0; i--) url = executeRewriteOutput(rewrites[i], url);\n\t\t\treturn url;\n\t\t}\n\t};\n}\n/** Create a rewrite pair that strips/adds a basepath on input/output. */\nfunction rewriteBasepath(opts) {\n\tconst trimmedBasepath = trimPath(opts.basepath);\n\tconst normalizedBasepath = `/${trimmedBasepath}`;\n\tconst checkBasepath = opts.caseSensitive ? normalizedBasepath : normalizedBasepath.toLowerCase();\n\tconst checkBasepathWithSlash = `${checkBasepath}/`;\n\treturn {\n\t\tinput: ({ url }) => {\n\t\t\tconst pathname = opts.caseSensitive ? url.pathname : url.pathname.toLowerCase();\n\t\t\tif (pathname === checkBasepath) url.pathname = \"/\";\n\t\t\telse if (pathname.startsWith(checkBasepathWithSlash)) url.pathname = url.pathname.slice(normalizedBasepath.length);\n\t\t\treturn url;\n\t\t},\n\t\toutput: ({ url }) => {\n\t\t\turl.pathname = joinPaths([\n\t\t\t\t\"/\",\n\t\t\t\ttrimmedBasepath,\n\t\t\t\turl.pathname\n\t\t\t]);\n\t\t\treturn url;\n\t\t}\n\t};\n}\n/** Execute a location input rewrite if provided. */\nfunction executeRewriteInput(rewrite, url) {\n\tconst res = rewrite?.input?.({ url });\n\tif (res) {\n\t\tif (typeof res === \"string\") return new URL(res);\n\t\telse if (res instanceof URL) return res;\n\t}\n\treturn url;\n}\n/** Execute a location output rewrite if provided. */\nfunction executeRewriteOutput(rewrite, url) {\n\tconst res = rewrite?.output?.({ url });\n\tif (res) {\n\t\tif (typeof res === \"string\") return new URL(res);\n\t\telse if (res instanceof URL) return res;\n\t}\n\treturn url;\n}\n//#endregion\nexport { composeRewrites, executeRewriteInput, executeRewriteOutput, rewriteBasepath };\n\n//# sourceMappingURL=rewrite.js.map","import { arraysEqual, functionalUpdate } from \"./utils.js\";\n//#region src/stores.ts\n/** SSR non-reactive createMutableStore */\nfunction createNonReactiveMutableStore(initialValue) {\n\tlet value = initialValue;\n\treturn {\n\t\tget() {\n\t\t\treturn value;\n\t\t},\n\t\tset(nextOrUpdater) {\n\t\t\tvalue = functionalUpdate(nextOrUpdater, value);\n\t\t}\n\t};\n}\n/** SSR non-reactive createReadonlyStore */\nfunction createNonReactiveReadonlyStore(read) {\n\treturn { get() {\n\t\treturn read();\n\t} };\n}\nfunction createRouterStores(initialLocation, config) {\n\tconst { createMutableStore, createReadonlyStore, batch } = config;\n\tconst byRoute = /* @__PURE__ */ new Map();\n\tconst status = createMutableStore(\"idle\");\n\tconst location = createMutableStore(initialLocation);\n\tconst resolvedLocation = createMutableStore(void 0);\n\tconst ids = createMutableStore([]);\n\tconst matches = createReadonlyStore(() => ids.get().map((id) => byRoute.get(id).get()));\n\tconst __store = createReadonlyStore(() => ({\n\t\tstatus: status.get(),\n\t\tisLoading: status.get() === \"pending\",\n\t\tmatches: matches.get(),\n\t\tlocation: location.get(),\n\t\tresolvedLocation: resolvedLocation.get()\n\t}));\n\tfunction getMatchStore(routeId) {\n\t\tlet matchStore = byRoute.get(routeId);\n\t\tif (!matchStore) {\n\t\t\tmatchStore = createMutableStore(void 0);\n\t\t\tbyRoute.set(routeId, matchStore);\n\t\t}\n\t\treturn matchStore;\n\t}\n\tconst store = {\n\t\tstatus,\n\t\tlocation,\n\t\tresolvedLocation,\n\t\tids,\n\t\tmatches,\n\t\tbyRoute,\n\t\t__store,\n\t\tgetMatchStore,\n\t\tsetMatches\n\t};\n\tfunction setMatches(nextMatches) {\n\t\tconst previousIds = ids.get();\n\t\tconst nextIds = nextMatches.map((match) => match.routeId);\n\t\tbatch(() => {\n\t\t\tif (!arraysEqual(previousIds, nextIds)) ids.set(nextIds);\n\t\t\tfor (const id of previousIds) if (!nextIds.includes(id)) byRoute.get(id).set(() => void 0);\n\t\t\tfor (const nextMatch of nextMatches) {\n\t\t\t\tconst matchStore = getMatchStore(nextMatch.routeId);\n\t\t\t\tif (matchStore.get() !== nextMatch) matchStore.set(nextMatch);\n\t\t\t}\n\t\t});\n\t}\n\treturn store;\n}\n//#endregion\nexport { createNonReactiveMutableStore, createNonReactiveReadonlyStore, createRouterStores };\n\n//# sourceMappingURL=stores.js.map","//#region src/index.ts\nvar stateIndexKey = \"__TSR_index\";\nvar popStateEvent = \"popstate\";\nvar beforeUnloadEvent = \"beforeunload\";\n/**\n* Turn protocol-relative inputs such as \"//evil.example\" into paths\n* such as \"/evil.example\", keeping navigation on the current origin.\n*\n* For HTTP(S) URLs, WHATWG parsing ignores leading C0 controls and spaces,\n* removes tabs/newlines, and treats backslashes as slashes, so inputs like\n* \"/\\evil.example\" also need normalization. This only allocates when those\n* rules would make the input protocol-relative.\n*/\nvar protocolRelativePrefix = /^[\\x00-\\x20]*(?:[\\\\/][\\t\\n\\r]*){2,}/;\nfunction normalizeProtocolRelative(url) {\n\tconst match = protocolRelativePrefix.exec(url);\n\treturn match ? \"/\" + url.slice(match[0].length) : url;\n}\nfunction normalizeHref(href) {\n\tif (/[\\x00-\\x1f\\x7f]/.test(href)) href = href.replace(/[\\x00-\\x1f\\x7f]/g, (character) => \"\t\\n\\r\".includes(character) ? \"\" : encodeURIComponent(character));\n\treturn normalizeProtocolRelative(href);\n}\nfunction createHistory(opts) {\n\tlet location = opts.getLocation();\n\tconst subscribers = /* @__PURE__ */ new Set();\n\tconst notify = (action) => {\n\t\tlocation = opts.getLocation();\n\t\tsubscribers.forEach((subscriber) => subscriber({\n\t\t\tlocation,\n\t\t\taction\n\t\t}));\n\t};\n\tconst handleIndexChange = (action) => {\n\t\tif (opts.notifyOnIndexChange ?? true) notify(action);\n\t\telse location = opts.getLocation();\n\t};\n\tconst tryNavigation = async ({ task, navigateOpts, ...actionInfo }) => {\n\t\tif (navigateOpts?.ignoreBlocker ?? false) {\n\t\t\ttask();\n\t\t\treturn;\n\t\t}\n\t\tconst blockers = opts.getBlockers?.() ?? [];\n\t\tconst isPushOrReplace = actionInfo.type === \"PUSH\" || actionInfo.type === \"REPLACE\";\n\t\tif (typeof document !== \"undefined\" && blockers.length && isPushOrReplace) for (const blocker of blockers) {\n\t\t\tconst nextLocation = parseHref(actionInfo.path, actionInfo.state);\n\t\t\tif (await blocker.blockerFn({\n\t\t\t\tcurrentLocation: location,\n\t\t\t\tnextLocation,\n\t\t\t\taction: actionInfo.type\n\t\t\t})) {\n\t\t\t\topts.onBlocked?.();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\ttask();\n\t};\n\treturn {\n\t\tget location() {\n\t\t\treturn location;\n\t\t},\n\t\tget length() {\n\t\t\treturn opts.getLength();\n\t\t},\n\t\tsubscribers,\n\t\tsubscribe: (cb) => {\n\t\t\tsubscribers.add(cb);\n\t\t\treturn () => {\n\t\t\t\tsubscribers.delete(cb);\n\t\t\t};\n\t\t},\n\t\tpush: (path, state, navigateOpts) => {\n\t\t\tconst currentIndex = location.state[stateIndexKey];\n\t\t\tstate = assignKeyAndIndex(currentIndex + 1, state);\n\t\t\ttryNavigation({\n\t\t\t\ttask: () => {\n\t\t\t\t\topts.pushState(path, state);\n\t\t\t\t\tnotify({ type: \"PUSH\" });\n\t\t\t\t},\n\t\t\t\tnavigateOpts,\n\t\t\t\ttype: \"PUSH\",\n\t\t\t\tpath,\n\t\t\t\tstate\n\t\t\t});\n\t\t},\n\t\treplace: (path, state, navigateOpts) => {\n\t\t\tconst currentIndex = location.state[stateIndexKey];\n\t\t\tstate = assignKeyAndIndex(currentIndex, state);\n\t\t\ttryNavigation({\n\t\t\t\ttask: () => {\n\t\t\t\t\topts.replaceState(path, state);\n\t\t\t\t\tnotify({ type: \"REPLACE\" });\n\t\t\t\t},\n\t\t\t\tnavigateOpts,\n\t\t\t\ttype: \"REPLACE\",\n\t\t\t\tpath,\n\t\t\t\tstate\n\t\t\t});\n\t\t},\n\t\tgo: (index, navigateOpts) => {\n\t\t\ttryNavigation({\n\t\t\t\ttask: () => {\n\t\t\t\t\topts.go(index, navigateOpts?.ignoreBlocker ?? false);\n\t\t\t\t\thandleIndexChange({\n\t\t\t\t\t\ttype: \"GO\",\n\t\t\t\t\t\tindex\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tnavigateOpts,\n\t\t\t\ttype: \"GO\"\n\t\t\t});\n\t\t},\n\t\tback: (navigateOpts) => {\n\t\t\ttryNavigation({\n\t\t\t\ttask: () => {\n\t\t\t\t\topts.back(navigateOpts?.ignoreBlocker ?? false);\n\t\t\t\t\thandleIndexChange({ type: \"BACK\" });\n\t\t\t\t},\n\t\t\t\tnavigateOpts,\n\t\t\t\ttype: \"BACK\"\n\t\t\t});\n\t\t},\n\t\tforward: (navigateOpts) => {\n\t\t\ttryNavigation({\n\t\t\t\ttask: () => {\n\t\t\t\t\topts.forward(navigateOpts?.ignoreBlocker ?? false);\n\t\t\t\t\thandleIndexChange({ type: \"FORWARD\" });\n\t\t\t\t},\n\t\t\t\tnavigateOpts,\n\t\t\t\ttype: \"FORWARD\"\n\t\t\t});\n\t\t},\n\t\tcanGoBack: () => location.state[stateIndexKey] !== 0,\n\t\tcreateHref: (str) => opts.createHref(str),\n\t\tblock: (blocker) => {\n\t\t\tif (!opts.setBlockers) return () => {};\n\t\t\tconst blockers = opts.getBlockers?.() ?? [];\n\t\t\topts.setBlockers([...blockers, blocker]);\n\t\t\treturn () => {\n\t\t\t\tconst blockers = opts.getBlockers?.() ?? [];\n\t\t\t\topts.setBlockers?.(blockers.filter((b) => b !== blocker));\n\t\t\t};\n\t\t},\n\t\tflush: () => opts.flush?.(),\n\t\tdestroy: () => opts.destroy?.(),\n\t\tnotify,\n\t\t_getBlockers: () => opts.getBlockers?.() ?? []\n\t};\n}\nfunction assignKeyAndIndex(index, state) {\n\tconst key = createRandomKey();\n\treturn {\n\t\t...state,\n\t\tkey,\n\t\t__TSR_key: key,\n\t\t[stateIndexKey]: index\n\t};\n}\n/**\n* Creates a history object that can be used to interact with the browser's\n* navigation. This is a lightweight API wrapping the browser's native methods.\n* It is designed to work with TanStack Router, but could be used as a standalone API as well.\n* IMPORTANT: This API implements history throttling via a microtask to prevent\n* excessive calls to the history API. In some browsers, calling history.pushState or\n* history.replaceState in quick succession can cause the browser to ignore subsequent\n* calls. This API smooths out those differences and ensures that your application\n* state will *eventually* match the browser state. In most cases, this is not a problem,\n* but if you need to ensure that the browser state is up to date, you can use the\n* `history.flush` method to immediately flush all pending state changes to the browser URL.\n* @param opts\n* @param opts.getHref A function that returns the current href (path + search + hash)\n* @param opts.createHref A function that takes a path and returns a href (path + search + hash)\n* @returns A history instance\n*/\nfunction createBrowserHistory(opts) {\n\tconst win = opts?.window ?? (typeof document !== \"undefined\" ? window : void 0);\n\tconst originalPushState = win.history.pushState;\n\tconst originalReplaceState = win.history.replaceState;\n\tlet blockers = [];\n\tconst _getBlockers = () => blockers;\n\tconst _setBlockers = (newBlockers) => blockers = newBlockers;\n\tconst createHref = (path) => normalizeHref(opts?.createHref ? opts.createHref(path) : path);\n\tconst parseLocation = opts?.parseLocation ?? (() => parseHref(`${win.location.pathname}${win.location.search}${win.location.hash}`, win.history.state));\n\tif (!win.history.state?.__TSR_key && !win.history.state?.key) {\n\t\tconst addedKey = createRandomKey();\n\t\twin.history.replaceState({\n\t\t\t[stateIndexKey]: 0,\n\t\t\tkey: addedKey,\n\t\t\t__TSR_key: addedKey\n\t\t}, \"\");\n\t}\n\tlet currentLocation = parseLocation();\n\tlet rollbackLocation;\n\tlet nextPopIsGo = false;\n\tlet ignoreNextPop = false;\n\tlet skipBlockerNextPop = false;\n\tlet ignoreNextBeforeUnload = false;\n\tconst getLocation = () => currentLocation;\n\tlet next;\n\tconst flush = () => {\n\t\tif (!next) return;\n\t\thistory._ignoreSubscribers = true;\n\t\t(next[2] ? win.history.pushState : win.history.replaceState)(next[1], \"\", next[0]);\n\t\thistory._ignoreSubscribers = false;\n\t\tnext = void 0;\n\t\trollbackLocation = void 0;\n\t};\n\tconst queueHistoryAction = (isPush, destHref, state) => {\n\t\tconst href = opts?.createHref ? createHref(destHref) : void 0;\n\t\tconst hasPendingAction = !!next;\n\t\tif (!hasPendingAction) rollbackLocation = currentLocation;\n\t\tcurrentLocation = parseHref(destHref, state);\n\t\tnext = [\n\t\t\thref ?? currentLocation.href,\n\t\t\tstate,\n\t\t\tnext?.[2] || isPush\n\t\t];\n\t\tif (!hasPendingAction) queueMicrotask(() => flush());\n\t};\n\tconst onPushPop = (type) => {\n\t\tcurrentLocation = parseLocation();\n\t\thistory.notify({ type });\n\t};\n\tconst onPushPopEvent = async () => {\n\t\tignoreNextBeforeUnload = false;\n\t\tif (ignoreNextPop) {\n\t\t\tignoreNextPop = false;\n\t\t\treturn;\n\t\t}\n\t\tconst nextLocation = parseLocation();\n\t\tconst delta = nextLocation.state[stateIndexKey] - currentLocation.state[stateIndexKey];\n\t\tconst isForward = delta === 1;\n\t\tconst isBack = delta === -1;\n\t\tconst isGo = !isForward && !isBack || nextPopIsGo;\n\t\tnextPopIsGo = false;\n\t\tconst action = isGo ? \"GO\" : isBack ? \"BACK\" : \"FORWARD\";\n\t\tconst notify = isGo ? {\n\t\t\ttype: \"GO\",\n\t\t\tindex: delta\n\t\t} : { type: isBack ? \"BACK\" : \"FORWARD\" };\n\t\tif (skipBlockerNextPop) skipBlockerNextPop = false;\n\t\telse {\n\t\t\tconst blockers = _getBlockers();\n\t\t\tif (typeof document !== \"undefined\" && blockers.length) {\n\t\t\t\tfor (const blocker of blockers) if (await blocker.blockerFn({\n\t\t\t\t\tcurrentLocation,\n\t\t\t\t\tnextLocation,\n\t\t\t\t\taction\n\t\t\t\t})) {\n\t\t\t\t\tignoreNextPop = true;\n\t\t\t\t\twin.history.go(-delta);\n\t\t\t\t\thistory.notify(notify);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcurrentLocation = parseLocation();\n\t\thistory.notify(notify);\n\t};\n\tconst onBeforeUnload = (e) => {\n\t\tif (ignoreNextBeforeUnload) {\n\t\t\tignoreNextBeforeUnload = false;\n\t\t\treturn;\n\t\t}\n\t\tlet shouldBlock = false;\n\t\tconst blockers = _getBlockers();\n\t\tif (typeof document !== \"undefined\" && blockers.length) for (const blocker of blockers) {\n\t\t\tconst shouldHaveBeforeUnload = blocker.enableBeforeUnload ?? true;\n\t\t\tif (shouldHaveBeforeUnload === true) {\n\t\t\t\tshouldBlock = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (typeof shouldHaveBeforeUnload === \"function\" && shouldHaveBeforeUnload() === true) {\n\t\t\t\tshouldBlock = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (shouldBlock) {\n\t\t\te.preventDefault();\n\t\t\treturn e.returnValue = \"\";\n\t\t}\n\t};\n\tconst history = createHistory({\n\t\tgetLocation,\n\t\tgetLength: () => win.history.length,\n\t\tpushState: (href, state) => queueHistoryAction(true, href, state),\n\t\treplaceState: (href, state) => queueHistoryAction(false, href, state),\n\t\tback: (ignoreBlocker) => {\n\t\t\tif (ignoreBlocker) {\n\t\t\t\tskipBlockerNextPop = true;\n\t\t\t\tignoreNextBeforeUnload = true;\n\t\t\t}\n\t\t\treturn win.history.back();\n\t\t},\n\t\tforward: (ignoreBlocker) => {\n\t\t\tif (ignoreBlocker) {\n\t\t\t\tskipBlockerNextPop = true;\n\t\t\t\tignoreNextBeforeUnload = true;\n\t\t\t}\n\t\t\twin.history.forward();\n\t\t},\n\t\tgo: (n, ignoreBlocker) => {\n\t\t\tnextPopIsGo = true;\n\t\t\tif (ignoreBlocker) {\n\t\t\t\tskipBlockerNextPop = true;\n\t\t\t\tignoreNextBeforeUnload = true;\n\t\t\t}\n\t\t\twin.history.go(n);\n\t\t},\n\t\tcreateHref: (href) => createHref(href),\n\t\tflush,\n\t\tdestroy: () => {\n\t\t\twin.history.pushState = originalPushState;\n\t\t\twin.history.replaceState = originalReplaceState;\n\t\t\twin.removeEventListener(beforeUnloadEvent, onBeforeUnload, { capture: true });\n\t\t\twin.removeEventListener(popStateEvent, onPushPopEvent);\n\t\t},\n\t\tonBlocked: () => {\n\t\t\tif (rollbackLocation && currentLocation !== rollbackLocation) currentLocation = rollbackLocation;\n\t\t},\n\t\tgetBlockers: _getBlockers,\n\t\tsetBlockers: _setBlockers,\n\t\tnotifyOnIndexChange: false\n\t});\n\thistory._ignoreNextBeforeUnload = (href) => {\n\t\tignoreNextBeforeUnload = false;\n\t\ttry {\n\t\t\thref = new URL(href, win.document.baseURI).href;\n\t\t\tignoreNextBeforeUnload = /^https?:/.test(href) && (!href.includes(\"#\") || href.split(\"#\")[0] !== win.location.href.split(\"#\")[0]);\n\t\t} catch {}\n\t};\n\twin.addEventListener(beforeUnloadEvent, onBeforeUnload, { capture: true });\n\twin.addEventListener(popStateEvent, onPushPopEvent);\n\twin.history.pushState = function(...args) {\n\t\tconst res = originalPushState.apply(win.history, args);\n\t\tif (!history._ignoreSubscribers) onPushPop(\"PUSH\");\n\t\treturn res;\n\t};\n\twin.history.replaceState = function(...args) {\n\t\tconst res = originalReplaceState.apply(win.history, args);\n\t\tif (!history._ignoreSubscribers) onPushPop(\"REPLACE\");\n\t\treturn res;\n\t};\n\treturn history;\n}\n/**\n* Create a hash-based history implementation.\n* Useful for static hosts or environments without server URL rewriting.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/history-types\n*/\nfunction createHashHistory(opts) {\n\tconst win = opts?.window ?? (typeof document !== \"undefined\" ? window : void 0);\n\treturn createBrowserHistory({\n\t\twindow: win,\n\t\tparseLocation: () => {\n\t\t\tconst hashSplit = win.location.hash.split(\"#\").slice(1);\n\t\t\tconst pathPart = hashSplit[0] ?? \"/\";\n\t\t\tconst searchPart = win.location.search;\n\t\t\tconst hashEntries = hashSplit.slice(1);\n\t\t\treturn parseHref(`${pathPart}${searchPart}${hashEntries.length === 0 ? \"\" : `#${hashEntries.join(\"#\")}`}`, win.history.state);\n\t\t},\n\t\tcreateHref: (href) => `${win.location.pathname}${win.location.search}#${href}`\n\t});\n}\n/**\n* Create an in-memory history implementation.\n* Ideal for server rendering, tests, and non-DOM environments.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/history-types\n*/\nfunction createMemoryHistory(opts = { initialEntries: [\"/\"] }) {\n\tconst entries = opts.initialEntries;\n\tlet index = opts.initialIndex ? Math.min(Math.max(opts.initialIndex, 0), entries.length - 1) : entries.length - 1;\n\tconst states = entries.map((_entry, index) => assignKeyAndIndex(index, void 0));\n\tconst getLocation = () => parseHref(entries[index], states[index]);\n\tlet blockers = [];\n\tconst _getBlockers = () => blockers;\n\tconst _setBlockers = (newBlockers) => blockers = newBlockers;\n\treturn createHistory({\n\t\tgetLocation,\n\t\tgetLength: () => entries.length,\n\t\tpushState: (path, state) => {\n\t\t\tindex = index < entries.length - 1 ? index + 1 : entries.length;\n\t\t\tstates[index] = state;\n\t\t\tentries[index] = path;\n\t\t\tif (index < entries.length - 1) {\n\t\t\t\tentries.length = index + 1;\n\t\t\t\tstates.length = index + 1;\n\t\t\t}\n\t\t},\n\t\treplaceState: (path, state) => {\n\t\t\tstates[index] = state;\n\t\t\tentries[index] = path;\n\t\t},\n\t\tback: () => {\n\t\t\tindex = Math.max(index - 1, 0);\n\t\t},\n\t\tforward: () => {\n\t\t\tindex = Math.min(index + 1, entries.length - 1);\n\t\t},\n\t\tgo: (n) => {\n\t\t\tindex = Math.min(Math.max(index + n, 0), entries.length - 1);\n\t\t},\n\t\tcreateHref: normalizeHref,\n\t\tgetBlockers: _getBlockers,\n\t\tsetBlockers: _setBlockers\n\t});\n}\nvar noop = () => {};\nvar ServerHistory = class {\n\tconstructor(location) {\n\t\tthis.location = location;\n\t}\n\tget length() {\n\t\treturn 1;\n\t}\n\tget subscribers() {\n\t\treturn this._subscribers ??= /* @__PURE__ */ new Set();\n\t}\n\tsubscribe() {\n\t\treturn noop;\n\t}\n\tpush() {}\n\treplace() {}\n\tgo() {}\n\tback() {}\n\tforward() {}\n\tcanGoBack() {\n\t\treturn false;\n\t}\n\tcreateHref(href) {\n\t\treturn normalizeHref(href);\n\t}\n\tblock() {\n\t\treturn noop;\n\t}\n\tflush() {}\n\tdestroy() {}\n\tnotify() {}\n\t_getBlockers() {\n\t\treturn [];\n\t}\n};\n/** A fixed request location; server navigation is a no-op. */\nfunction createServerHistory(href) {\n\treturn new ServerHistory(parseHref(href, void 0));\n}\nfunction parseHref(href, state) {\n\tconst sanitizedHref = normalizeHref(href);\n\tconst hashIndex = sanitizedHref.indexOf(\"#\");\n\tconst searchIndex = sanitizedHref.indexOf(\"?\");\n\tif (!state) {\n\t\tconst key = createRandomKey();\n\t\tstate = {\n\t\t\t[stateIndexKey]: 0,\n\t\t\tkey,\n\t\t\t__TSR_key: key\n\t\t};\n\t}\n\treturn {\n\t\thref: sanitizedHref,\n\t\tpathname: sanitizedHref.substring(0, hashIndex > 0 ? searchIndex > 0 ? Math.min(hashIndex, searchIndex) : hashIndex : searchIndex > 0 ? searchIndex : sanitizedHref.length),\n\t\thash: hashIndex > -1 ? sanitizedHref.substring(hashIndex) : \"\",\n\t\tsearch: searchIndex > -1 ? sanitizedHref.slice(searchIndex, hashIndex === -1 ? void 0 : hashIndex) : \"\",\n\t\tstate\n\t};\n}\nfunction createRandomKey() {\n\treturn (Math.random() + 1).toString(36).substring(7);\n}\n//#endregion\nexport { createBrowserHistory, createHashHistory, createHistory, createMemoryHistory, createServerHistory, normalizeProtocolRelative, parseHref };\n\n//# sourceMappingURL=index.js.map","import { DEFAULT_PROTOCOL_ALLOWLIST, createNull, decodePath, deepEqual, encodePathLikeUrl, findLast, functionalUpdate, getUrlScheme, hasKeys, hasOwn, isDangerousProtocol, last, nullReplaceEqualDeep, protocolRelativePrefixRegex, replaceEqualDeep } from \"./utils.js\";\nimport { compileDecodeCharMap, interpolatePath, resolvePath, trimPath, trimPathRight } from \"./path.js\";\nimport { createSieveCache } from \"./sieve-cache.js\";\nimport { buildRouteBranch, findFlatMatch, findRouteMatch, findSingleMatch, parseSegments, processRouteMasks, processRouteTree } from \"./new-process-route-tree.js\";\nimport { isNotFound } from \"./not-found.js\";\nimport { setupScrollRestoration } from \"./scroll-restoration.js\";\nimport { defaultParseSearch, defaultStringifySearch } from \"./searchParams.js\";\nimport { rootRouteId } from \"./root.js\";\nimport { isRedirect } from \"./redirect.js\";\nimport { loadClientRoute, loadRouteChunk, preloadClientRoute, refreshClientRoute, replaceRouteChunk } from \"./load-client.js\";\nimport { composeRewrites, executeRewriteInput, executeRewriteOutput, rewriteBasepath } from \"./rewrite.js\";\nimport { createRouterStores } from \"./stores.js\";\nimport { createBrowserHistory, normalizeProtocolRelative, parseHref } from \"@tanstack/history\";\nimport { isServer, loadServerRoute } from \"@tanstack/router-core/isServer\";\n//#region src/router.ts\nfunction isExternalUrl(url, origin) {\n\treturn url.protocol !== \"http:\" && url.protocol !== \"https:\" || url.origin !== origin || !!url.username || !!url.password;\n}\nfunction getUrlPath(url) {\n\treturn url.pathname + url.search + url.hash;\n}\nfunction routeNeedsLoad(route) {\n\treturn route.options.loader || route.options.beforeLoad || route.lazyFn || route.options.component?.preload || route.options.pendingComponent?.preload;\n}\n/**\n* Convert an unknown error into a minimal, serializable object.\n* Includes name and message (and stack in development).\n*/\nfunction defaultSerializeError(err) {\n\tif (err instanceof Error) {\n\t\tconst obj = {\n\t\t\tname: err.name,\n\t\t\tmessage: err.message\n\t\t};\n\t\tif (process.env.NODE_ENV === \"development\") obj.stack = err.stack;\n\t\treturn obj;\n\t}\n\treturn { data: err };\n}\n/** Options for configuring trailing-slash behavior. */\nconst trailingSlashOptions = {\n\talways: \"always\",\n\tnever: \"never\",\n\tpreserve: \"preserve\"\n};\n/**\n* Compute whether path, href or hash changed between previous and current\n* resolved locations.\n*/\nfunction getLocationChangeInfo(location, resolvedLocation) {\n\treturn {\n\t\tfromLocation: resolvedLocation,\n\t\ttoLocation: location,\n\t\tpathChanged: resolvedLocation?.pathname !== location.pathname,\n\t\threfChanged: resolvedLocation?.href !== location.href,\n\t\thashChanged: resolvedLocation?.hash !== location.hash\n\t};\n}\n/**\n* Return only state owned by the application, excluding volatile history\n* bookkeeping. Mask payloads (`__tempLocation`/`__tempKey`) are kept: they\n* distinguish otherwise-identical locations.\n*/\nfunction _getUserHistoryState({ key: _key, __TSR_key: _tsrKey, __TSR_index: _tsrIndex, __hashScrollIntoViewOptions: _hashScroll, ...state }) {\n\treturn state;\n}\nfunction lifecycleEnd(matches) {\n\treturn matches.findIndex((match) => match.status === \"error\" || match.status === \"notFound\" || match._notFound) + 1;\n}\n/** Run route lifecycle callbacks in leave/enter/stay phases. */\nfunction runRouteLifecycle(router, previous, matches, previousEnd, nextEnd, owner) {\n\tif (previousEnd) previous = previous.slice(0, previousEnd);\n\tif (nextEnd) matches = matches.slice(0, nextEnd);\n\tfor (const match of previous) {\n\t\tif (owner && router._tx !== owner) return;\n\t\tif (!matches.some((candidate) => candidate.routeId === match.routeId)) router.routesById[match.routeId].options.onLeave?.(match);\n\t}\n\tfor (const match of matches) {\n\t\tif (owner && router._tx !== owner) return;\n\t\trouter.routesById[match.routeId].options[previous.some((candidate) => candidate.routeId === match.routeId) ? \"onStay\" : \"onEnter\"]?.(match);\n\t}\n}\n/**\n* Core, framework-agnostic router engine that powers TanStack Router.\n*\n* Provides navigation, matching, loading, preloading, caching and event APIs\n* used by framework adapters (React/Solid). Prefer framework helpers like\n* `createRouter` in app code.\n*\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/RouterType\n*/\nvar RouterCore = class {\n\t/**\n\t* @deprecated Use the `createRouter` function instead\n\t*/\n\tconstructor(options, getStoreConfig) {\n\t\tthis.tempLocationKey = `${Math.round(Math.random() * 1e7)}`;\n\t\tthis._scroll = { next: true };\n\t\tthis.subscribers = /* @__PURE__ */ new Set();\n\t\tthis._cache = /* @__PURE__ */ new Map();\n\t\tthis._committed = [];\n\t\tthis.startTransition = async (fn) => {\n\t\t\tfn();\n\t\t\treturn false;\n\t\t};\n\t\tthis.update = (newOptions) => {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (newOptions.notFoundRoute) console.warn(\"The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.\");\n\t\t\t}\n\t\t\tconst prevOptions = this.options;\n\t\t\tconst prevBasepath = this.basepath ?? prevOptions?.basepath ?? \"/\";\n\t\t\tconst basepathWasUnset = this.basepath === void 0;\n\t\t\tconst prevRewriteOption = prevOptions?.rewrite;\n\t\t\tthis.options = {\n\t\t\t\t...prevOptions,\n\t\t\t\t...newOptions\n\t\t\t};\n\t\t\tthis.isServer = this.options.isServer ?? isServer ?? typeof document === \"undefined\";\n\t\t\tif (!(isServer ?? this.isServer)) this.staticLocations = /* @__PURE__ */ new WeakMap();\n\t\t\tthis.protocolAllowlist = new Set(this.options.protocolAllowlist);\n\t\t\tif (!this.history || this.options.history && this.options.history !== this.history) if (!this.options.history) {\n\t\t\t\tif (!(isServer ?? this.isServer)) this.history = createBrowserHistory();\n\t\t\t} else this.history = this.options.history;\n\t\t\tthis.origin = this.options.origin;\n\t\t\tif (!this.origin) if (!(isServer ?? this.isServer) && window?.origin && window.origin !== \"null\") this.origin = window.origin;\n\t\t\telse this.origin = \"http://localhost\";\n\t\t\tif (this.history) this.updateLatestLocation();\n\t\t\tif (this.options.routeTree !== this.routeTree) {\n\t\t\t\tthis.routeTree = this.options.routeTree;\n\t\t\t\tlet processRouteTreeResult;\n\t\t\t\tif (process.env.NODE_ENV !== \"development\" && (isServer ?? this.isServer) && globalThis.__TSR_CACHE__ && globalThis.__TSR_CACHE__.routeTree === this.routeTree) processRouteTreeResult = globalThis.__TSR_CACHE__.processRouteTreeResult;\n\t\t\t\telse {\n\t\t\t\t\tprocessRouteTreeResult = this.buildRouteTree();\n\t\t\t\t\tif (process.env.NODE_ENV !== \"development\" && (isServer ?? this.isServer) && globalThis.__TSR_CACHE__ === void 0) globalThis.__TSR_CACHE__ = {\n\t\t\t\t\t\trouteTree: this.routeTree,\n\t\t\t\t\t\tprocessRouteTreeResult\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tthis.setRoutes(processRouteTreeResult);\n\t\t\t}\n\t\t\tif (!this.stores && this.latestLocation) {\n\t\t\t\tconst config = this.getStoreConfig(this);\n\t\t\t\tthis.batch = config.batch;\n\t\t\t\tthis.stores = createRouterStores(this.latestLocation, config);\n\t\t\t\tif (!(isServer ?? this.isServer)) setupScrollRestoration(this);\n\t\t\t}\n\t\t\tconst nextBasepath = this.options.basepath ?? \"/\";\n\t\t\tconst nextRewriteOption = this.options.rewrite;\n\t\t\tif (basepathWasUnset || prevBasepath !== nextBasepath || prevRewriteOption !== nextRewriteOption) {\n\t\t\t\tthis.basepath = nextBasepath;\n\t\t\t\tconst rewrites = [];\n\t\t\t\tconst trimmed = trimPath(nextBasepath);\n\t\t\t\tif (trimmed && trimmed !== \"/\") rewrites.push(rewriteBasepath({ basepath: nextBasepath }));\n\t\t\t\tif (nextRewriteOption) rewrites.push(nextRewriteOption);\n\t\t\t\tthis.rewrite = rewrites.length === 0 ? void 0 : rewrites.length === 1 ? rewrites[0] : composeRewrites(rewrites);\n\t\t\t\tif (this.history) this.updateLatestLocation();\n\t\t\t\tif (this.stores) this.stores.location.set(this.latestLocation);\n\t\t\t}\n\t\t};\n\t\tthis.updateLatestLocation = () => {\n\t\t\tthis.latestLocation = this.parseLocation(this.history.location, this.latestLocation);\n\t\t};\n\t\tthis.buildRouteTree = () => {\n\t\t\tconst result = processRouteTree(this.routeTree, this.options.caseSensitive);\n\t\t\tif (this.options.routeMasks) processRouteMasks(this.options.routeMasks, result.processedTree);\n\t\t\treturn {\n\t\t\t\t...result,\n\t\t\t\tresolvePathCache: createSieveCache(1e3)\n\t\t\t};\n\t\t};\n\t\tthis.subscribe = (eventType, fn) => {\n\t\t\tconst listener = {\n\t\t\t\teventType,\n\t\t\t\tfn\n\t\t\t};\n\t\t\tthis.subscribers.add(listener);\n\t\t\treturn () => {\n\t\t\t\tthis.subscribers.delete(listener);\n\t\t\t};\n\t\t};\n\t\tthis.emit = (routerEvent) => {\n\t\t\tfor (const listener of this.subscribers) if (listener.eventType === routerEvent.type) try {\n\t\t\t\tlistener.fn(routerEvent);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e);\n\t\t\t}\n\t\t};\n\t\tthis.parseLocation = (locationToParse, previousLocation) => {\n\t\t\tconst parse = ({ pathname, search, hash, href, state }) => {\n\t\t\t\tif (!this.rewrite && !/[ \\x00-\\x1f\\x7f\\u0080-\\uffff]/.test(pathname)) {\n\t\t\t\t\tconst parsedSearch = this.options.parseSearch(search);\n\t\t\t\t\tconst searchStr = this.options.stringifySearch(parsedSearch);\n\t\t\t\t\treturn {\n\t\t\t\t\t\thref: pathname + searchStr + hash,\n\t\t\t\t\t\tpublicHref: pathname + searchStr + hash,\n\t\t\t\t\t\tpathname: decodePath(pathname),\n\t\t\t\t\t\texternal: false,\n\t\t\t\t\t\tsearchStr,\n\t\t\t\t\t\tsearch: nullReplaceEqualDeep(previousLocation?.search, parsedSearch),\n\t\t\t\t\t\thash: decodePath(hash.slice(1)),\n\t\t\t\t\t\tstate: replaceEqualDeep(previousLocation?.state, state)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tconst fullUrl = new URL(href, this.origin);\n\t\t\t\tconst url = executeRewriteInput(this.rewrite, fullUrl);\n\t\t\t\tconst parsedSearch = this.options.parseSearch(url.search);\n\t\t\t\tconst searchStr = this.options.stringifySearch(parsedSearch);\n\t\t\t\turl.search = searchStr;\n\t\t\t\treturn {\n\t\t\t\t\thref: url.href.replace(url.origin, \"\"),\n\t\t\t\t\tpublicHref: href,\n\t\t\t\t\tpathname: decodePath(normalizeProtocolRelative(url.pathname)),\n\t\t\t\t\texternal: !!this.rewrite && isExternalUrl(url, this.origin),\n\t\t\t\t\tsearchStr,\n\t\t\t\t\tsearch: nullReplaceEqualDeep(previousLocation?.search, parsedSearch),\n\t\t\t\t\thash: decodePath(url.hash.slice(1)),\n\t\t\t\t\tstate: replaceEqualDeep(previousLocation?.state, state)\n\t\t\t\t};\n\t\t\t};\n\t\t\tconst location = parse(locationToParse);\n\t\t\tconst { __tempLocation, __tempKey } = location.state;\n\t\t\tif (__tempLocation && (!__tempKey || __tempKey === this.tempLocationKey)) {\n\t\t\t\tconst parsedTempLocation = parse(__tempLocation);\n\t\t\t\tparsedTempLocation.state.key = location.state.key;\n\t\t\t\tparsedTempLocation.state.__TSR_key = location.state.__TSR_key;\n\t\t\t\tdelete parsedTempLocation.state.__tempLocation;\n\t\t\t\treturn {\n\t\t\t\t\t...parsedTempLocation,\n\t\t\t\t\tmaskedLocation: location\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn location;\n\t\t};\n\t\tthis.resolvePathWithBase = (from, path) => {\n\t\t\treturn resolvePath({\n\t\t\t\tbase: from,\n\t\t\t\tto: path,\n\t\t\t\ttrailingSlash: this.options.trailingSlash,\n\t\t\t\tcache: this.resolvePathCache\n\t\t\t});\n\t\t};\n\t\tthis.matchRoutes = (pathnameOrNext, locationSearchOrOpts, opts) => {\n\t\t\tif (typeof pathnameOrNext === \"string\") return this.matchRoutesInternal({\n\t\t\t\tpathname: pathnameOrNext,\n\t\t\t\tsearch: locationSearchOrOpts\n\t\t\t}, opts);\n\t\t\treturn this.matchRoutesInternal(pathnameOrNext, locationSearchOrOpts);\n\t\t};\n\t\tthis.getMatchedRoutes = (pathname) => {\n\t\t\tconst rawParams = Object.create(null);\n\t\t\tconst match = findRouteMatch(trimPathRight(pathname), this.processedTree, true);\n\t\t\tif (match) Object.assign(rawParams, match.rawParams);\n\t\t\treturn [\n\t\t\t\tmatch?.branch || [this.routesById[\"__root__\"]],\n\t\t\t\trawParams,\n\t\t\t\tmatch?.route\n\t\t\t];\n\t\t};\n\t\tthis.buildLocation = (opts) => {\n\t\t\tif (!(isServer ?? this.isServer)) {\n\t\t\t\tconst cached = this.staticLocations.get(opts);\n\t\t\t\tif (cached) return cached;\n\t\t\t}\n\t\t\tlet usedCurrent = false;\n\t\t\tconst build = (dest = {}) => {\n\t\t\t\tif (dest.href) {\n\t\t\t\t\tconst parsed = parseHref(dest.href, {});\n\t\t\t\t\tdest = {\n\t\t\t\t\t\t...dest,\n\t\t\t\t\t\tto: executeRewriteInput(this.rewrite, new URL(parsed.pathname, this.origin)).pathname,\n\t\t\t\t\t\tsearch: this.options.parseSearch(parsed.search),\n\t\t\t\t\t\thash: parsed.hash.slice(1)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tconst currentLocation = dest._fromLocation || this._pendingLocation || this.latestLocation;\n\t\t\t\tlet lightweight;\n\t\t\t\tconst current = () => {\n\t\t\t\t\tusedCurrent = true;\n\t\t\t\t\treturn currentLocation;\n\t\t\t\t};\n\t\t\t\tconst currentMatch = () => {\n\t\t\t\t\tusedCurrent = true;\n\t\t\t\t\treturn lightweight ??= this.matchRoutesLightweight(currentLocation);\n\t\t\t\t};\n\t\t\t\tif (process.env.NODE_ENV !== \"production\" && dest.from && dest._isNavigate) {\n\t\t\t\t\tconst [allFromMatches] = this.getMatchedRoutes(dest.from);\n\t\t\t\t\tconst [matchedRoutes, fullPath] = currentMatch();\n\t\t\t\t\tconst matchedFrom = findLast(matchedRoutes, (d) => {\n\t\t\t\t\t\treturn comparePaths(d.fullPath, dest.from);\n\t\t\t\t\t});\n\t\t\t\t\tconst matchedCurrent = findLast(allFromMatches, (d) => {\n\t\t\t\t\t\treturn comparePaths(d.fullPath, fullPath);\n\t\t\t\t\t});\n\t\t\t\t\tif (!matchedFrom && !matchedCurrent) console.warn(`Could not find match for from: ${dest.from}`);\n\t\t\t\t}\n\t\t\t\tconst to = dest.to ? `${dest.to}` : \".\";\n\t\t\t\tconst nextTo = this.resolvePathWithBase(to[0] === \"/\" ? \"\" : dest.unsafeRelative === \"path\" ? current().pathname : dest.from ?? currentMatch()[1], to);\n\t\t\t\tconst destRoute = this.routesByPath[trimPathRight(nextTo)];\n\t\t\t\tconst isTemplate = nextTo.includes(\"$\");\n\t\t\t\tlet destRoutes;\n\t\t\t\tif (destRoute) destRoutes = destRoute._branch ??= buildRouteBranch(destRoute);\n\t\t\t\telse if (isTemplate) destRoutes = [];\n\t\t\t\telse {\n\t\t\t\t\tconst [matchedRoutes, rawParams, foundRoute] = this.getMatchedRoutes(nextTo);\n\t\t\t\t\tdestRoutes = matchedRoutes;\n\t\t\t\t\tif (this.options.notFoundRoute && (!foundRoute || foundRoute.path !== \"/\" && rawParams[\"**\"])) destRoutes = [...destRoutes, this.options.notFoundRoute];\n\t\t\t\t}\n\t\t\t\tconst interpolation = isTemplate ? destRoute?._interpolation ?? parseSegments(false, { fullPath: nextTo }, 0) : void 0;\n\t\t\t\tlet nextParams;\n\t\t\t\tfor (const route of destRoutes) {\n\t\t\t\t\tconst fn = route.options.params?.stringify ?? route.options.stringifyParams;\n\t\t\t\t\tif (fn) {\n\t\t\t\t\t\tconst fromParams = currentMatch()[3];\n\t\t\t\t\t\tnextParams ??= resolveNextParams(dest.params, fromParams);\n\t\t\t\t\t\tif (!hasKeys(nextParams)) break;\n\t\t\t\t\t\tif (nextParams === fromParams) nextParams = Object.assign(createNull(), nextParams);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tObject.assign(nextParams, fn(nextParams));\n\t\t\t\t\t\t} catch {}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnextParams ??= resolveNextParams(dest.params, needsInheritedParams(dest.params, interpolation) ? currentMatch()[3] : EMPTY_RECORD);\n\t\t\t\tconst nextPathname = opts.leaveParams ? nextTo : normalizeProtocolRelative(decodePath(interpolation ? interpolatePath(nextTo, interpolation, nextParams, this.pathParamsDecoder) : nextTo));\n\t\t\t\tif (process.env.NODE_ENV !== \"production\" && destRoute && !opts.leaveParams) try {\n\t\t\t\t\tconst foundRoute = this.getMatchedRoutes(nextPathname)[2];\n\t\t\t\t\tif (foundRoute?.id !== destRoute.id) console.warn(`Generated path \"${nextPathname}\" for route \"${destRoute.id}\" matched route \"${foundRoute?.id}\" instead. This can happen when multiple route templates resolve to the same URL. Use the route template that matches the intended route, or adjust params.stringify if it changed the target path.`);\n\t\t\t\t} catch {}\n\t\t\t\tconst middlewares = getSearchMiddlewares(destRoutes, opts._includeValidateSearch);\n\t\t\t\tconst fromSearch = () => {\n\t\t\t\t\tlet search = currentMatch()[2];\n\t\t\t\t\tif (opts._includeValidateSearch && this.options.search?.strict) {\n\t\t\t\t\t\tconst validatedSearch = {};\n\t\t\t\t\t\tdestRoutes.forEach((route) => {\n\t\t\t\t\t\t\tif (route.options.validateSearch) try {\n\t\t\t\t\t\t\t\tObject.assign(validatedSearch, validateSearch(route.options.validateSearch, {\n\t\t\t\t\t\t\t\t\t...validatedSearch,\n\t\t\t\t\t\t\t\t\t...search\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t} catch {}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tsearch = validatedSearch;\n\t\t\t\t\t}\n\t\t\t\t\treturn search;\n\t\t\t\t};\n\t\t\t\tconst nextSearch = middlewares.length ? applySearchMiddleware(middlewares, fromSearch(), dest) : dest.search === true ? fromSearch() : typeof dest.search === \"function\" ? dest.search(fromSearch()) : dest.search || EMPTY_RECORD;\n\t\t\t\tconst searchStr = this.options.stringifySearch(nextSearch);\n\t\t\t\tconst hash = dest.hash === true ? current().hash : typeof dest.hash === \"function\" ? dest.hash(current().hash) : dest.hash || void 0;\n\t\t\t\tconst hashStr = hash ? `#${hash}` : \"\";\n\t\t\t\tconst nextState = !dest.state ? EMPTY_RECORD : dest.state === true ? current().state : typeof dest.state === \"function\" ? dest.state(current().state) : dest.state;\n\t\t\t\tconst fullPath = `${nextPathname}${searchStr}${hashStr}`;\n\t\t\t\tlet href;\n\t\t\t\tlet publicHref;\n\t\t\t\tlet external = false;\n\t\t\t\tif (this.rewrite) {\n\t\t\t\t\tconst url = new URL(fullPath, this.origin);\n\t\t\t\t\tconst origin = url.origin;\n\t\t\t\t\tconst rewrittenUrl = executeRewriteOutput(this.rewrite, url);\n\t\t\t\t\thref = getUrlPath(url);\n\t\t\t\t\tif (isExternalUrl(rewrittenUrl, origin)) {\n\t\t\t\t\t\tpublicHref = rewrittenUrl.href;\n\t\t\t\t\t\texternal = true;\n\t\t\t\t\t} else publicHref = normalizeProtocolRelative(getUrlPath(rewrittenUrl));\n\t\t\t\t} else {\n\t\t\t\t\thref = encodePathLikeUrl(fullPath);\n\t\t\t\t\tpublicHref = href;\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tpublicHref,\n\t\t\t\t\thref,\n\t\t\t\t\tpathname: nextPathname,\n\t\t\t\t\tsearch: nextSearch,\n\t\t\t\t\tsearchStr,\n\t\t\t\t\tstate: nextState,\n\t\t\t\t\thash: hash ?? \"\",\n\t\t\t\t\texternal,\n\t\t\t\t\tunmaskOnReload: dest.unmaskOnReload\n\t\t\t\t};\n\t\t\t};\n\t\t\tconst next = build(opts);\n\t\t\tif (opts.mask) next.maskedLocation = build({\n\t\t\t\tfrom: opts.from,\n\t\t\t\t...opts.mask\n\t\t\t});\n\t\t\telse if (this.options.routeMasks) {\n\t\t\t\tconst match = findFlatMatch(next.pathname, this.processedTree);\n\t\t\t\tif (match) {\n\t\t\t\t\tconst params = Object.assign(createNull(), match.rawParams);\n\t\t\t\t\tconst { from: _from, params: maskParams, ...maskProps } = match.route;\n\t\t\t\t\tconst nextParams = resolveNextParams(maskParams, params);\n\t\t\t\t\tnext.maskedLocation = build({\n\t\t\t\t\t\tfrom: opts.from,\n\t\t\t\t\t\t...maskProps,\n\t\t\t\t\t\tparams: nextParams\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!(isServer ?? this.isServer) && !usedCurrent && opts._fromLocation && !next.maskedLocation) this.staticLocations.set(opts, next);\n\t\t\treturn next;\n\t\t};\n\t\tthis.commitLocation = async ({ viewTransition, ignoreBlocker, ...next }) => {\n\t\t\tif (isServer ?? this.isServer) return;\n\t\t\tconst nextLocation = next.maskedLocation ?? next;\n\t\t\tif (nextLocation.external && !(isServer ?? this.isServer)) return documentNavigation(this, nextLocation.publicHref, {\n\t\t\t\treplace: next.replace,\n\t\t\t\tignoreBlocker\n\t\t\t});\n\t\t\tlet historyAction;\n\t\t\tconst isSameLocation = trimPathRight(this.latestLocation.href) === trimPathRight(next.href) && deepEqual(_getUserHistoryState(next.state), _getUserHistoryState(this.latestLocation.state));\n\t\t\tconst previousCommitPromise = this._commitPromise;\n\t\t\tlet resolve;\n\t\t\tconst commitPromise = new Promise((done) => {\n\t\t\t\tresolve = done;\n\t\t\t});\n\t\t\tcommitPromise.resolve = () => {\n\t\t\t\tresolve();\n\t\t\t\tpreviousCommitPromise?.resolve();\n\t\t\t};\n\t\t\tthis._commitPromise = commitPromise;\n\t\t\tif (isSameLocation) this.load();\n\t\t\telse {\n\t\t\t\tlet { maskedLocation, hashScrollIntoView, ...nextHistory } = next;\n\t\t\t\tif (maskedLocation) {\n\t\t\t\t\tnextHistory = {\n\t\t\t\t\t\t...maskedLocation,\n\t\t\t\t\t\tstate: {\n\t\t\t\t\t\t\t...maskedLocation.state,\n\t\t\t\t\t\t\t__tempKey: void 0,\n\t\t\t\t\t\t\t__tempLocation: {\n\t\t\t\t\t\t\t\t...nextHistory,\n\t\t\t\t\t\t\t\tsearch: nextHistory.searchStr,\n\t\t\t\t\t\t\t\tstate: {\n\t\t\t\t\t\t\t\t\t...nextHistory.state,\n\t\t\t\t\t\t\t\t\t__tempKey: void 0,\n\t\t\t\t\t\t\t\t\t__tempLocation: void 0,\n\t\t\t\t\t\t\t\t\t__TSR_key: void 0,\n\t\t\t\t\t\t\t\t\tkey: void 0\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tif (nextHistory.unmaskOnReload ?? this.options.unmaskOnReload ?? false) nextHistory.state.__tempKey = this.tempLocationKey;\n\t\t\t\t}\n\t\t\t\tnextHistory.state = {\n\t\t\t\t\t...nextHistory.state,\n\t\t\t\t\t__hashScrollIntoViewOptions: hashScrollIntoView ?? this.options.defaultHashScrollIntoView ?? true\n\t\t\t\t};\n\t\t\t\tthis.shouldViewTransition = viewTransition;\n\t\t\t\thistoryAction = next.replace ? \"REPLACE\" : \"PUSH\";\n\t\t\t\tthis.history[historyAction === \"REPLACE\" ? \"replace\" : \"push\"](nextHistory.publicHref, nextHistory.state, { ignoreBlocker });\n\t\t\t\tif (!this.history.subscribers.size) this.load({ action: { type: historyAction } });\n\t\t\t}\n\t\t\tthis._scroll.next = next.resetScroll ?? true;\n\t\t\treturn this._commitPromise;\n\t\t};\n\t\tthis.buildAndCommitLocation = ({ replace, resetScroll, hashScrollIntoView, viewTransition, ignoreBlocker, ...rest } = {}) => {\n\t\t\tif (isServer ?? this.isServer) return Promise.resolve();\n\t\t\tconst location = this.buildLocation({\n\t\t\t\t...rest,\n\t\t\t\t_includeValidateSearch: true\n\t\t\t});\n\t\t\tthis._pendingLocation = location;\n\t\t\tconst commitPromise = this.commitLocation({\n\t\t\t\t...location,\n\t\t\t\tviewTransition,\n\t\t\t\treplace,\n\t\t\t\tresetScroll,\n\t\t\t\thashScrollIntoView,\n\t\t\t\tignoreBlocker\n\t\t\t});\n\t\t\tqueueMicrotask(() => {\n\t\t\t\tif (this._pendingLocation === location) this._pendingLocation = void 0;\n\t\t\t});\n\t\t\treturn commitPromise;\n\t\t};\n\t\tthis.navigate = async ({ to, reloadDocument, href, publicHref, ...rest }) => {\n\t\t\tif (isServer ?? this.isServer) return;\n\t\t\tconst hrefScheme = href ? getUrlScheme(href) : void 0;\n\t\t\tif (hrefScheme || reloadDocument) {\n\t\t\t\tif (to !== void 0 || !href) {\n\t\t\t\t\tconst location = this.buildLocation({\n\t\t\t\t\t\tto,\n\t\t\t\t\t\t...rest\n\t\t\t\t\t});\n\t\t\t\t\tconst publicLocation = location.maskedLocation ?? location;\n\t\t\t\t\thref ??= publicLocation.publicHref;\n\t\t\t\t\tpublicHref ??= publicLocation.publicHref;\n\t\t\t\t}\n\t\t\t\tconst reloadHref = !hrefScheme && publicHref ? publicHref : href;\n\t\t\t\treturn documentNavigation(this, reloadHref, rest);\n\t\t\t}\n\t\t\treturn this.buildAndCommitLocation({\n\t\t\t\t...rest,\n\t\t\t\thref,\n\t\t\t\tto,\n\t\t\t\t_isNavigate: true\n\t\t\t});\n\t\t};\n\t\tthis.load = async (opts) => {\n\t\t\tif (isServer ?? this.isServer) return loadServerRoute(this, opts);\n\t\t\tthis.updateLatestLocation();\n\t\t\tif (opts?.action) this._scroll.hash = opts.action.type === \"PUSH\" || opts.action.type === \"REPLACE\";\n\t\t\tawait loadClientRoute(this, opts);\n\t\t};\n\t\tthis.startViewTransition = (fn) => {\n\t\t\tconst shouldViewTransition = this.shouldViewTransition ?? this.options.defaultViewTransition;\n\t\t\tthis.shouldViewTransition = void 0;\n\t\t\tif (shouldViewTransition && !(isServer ?? typeof document === \"undefined\") && typeof document.startViewTransition === \"function\") {\n\t\t\t\tlet startViewTransitionParams;\n\t\t\t\tif (typeof shouldViewTransition === \"object\" && window.CSS?.supports?.(\"selector(:active-view-transition-type(a))\")) {\n\t\t\t\t\tconst next = this.latestLocation;\n\t\t\t\t\tconst prevLocation = this.stores.resolvedLocation.get();\n\t\t\t\t\tconst resolvedViewTransitionTypes = typeof shouldViewTransition.types === \"function\" ? shouldViewTransition.types(getLocationChangeInfo(next, prevLocation)) : shouldViewTransition.types;\n\t\t\t\t\tif (resolvedViewTransitionTypes === false) return fn();\n\t\t\t\t\tstartViewTransitionParams = {\n\t\t\t\t\t\tupdate: fn,\n\t\t\t\t\t\ttypes: resolvedViewTransitionTypes\n\t\t\t\t\t};\n\t\t\t\t} else startViewTransitionParams = fn;\n\t\t\t\treturn document.startViewTransition(startViewTransitionParams).updateCallbackDone;\n\t\t\t}\n\t\t\treturn fn();\n\t\t};\n\t\tthis.invalidate = (opts) => {\n\t\t\tconst committedMatches = this._committed;\n\t\t\tconst filter = opts?.filter;\n\t\t\tconst preloads = this._preloads;\n\t\t\tconst invalidIds = new Set([\n\t\t\t\t...committedMatches,\n\t\t\t\t...this._cache.values(),\n\t\t\t\t...[...preloads?.values() ?? []].flat(),\n\t\t\t\t...this._tx?.[3] ?? []\n\t\t\t].filter((match) => !filter || filter(match)).map((match) => match.id));\n\t\t\tconst discardedPreloads = [];\n\t\t\tfor (const [controller, matches] of preloads ?? []) if (matches.some((match) => invalidIds.has(match.id))) {\n\t\t\t\tpreloads.delete(controller);\n\t\t\t\tdiscardedPreloads.push(controller);\n\t\t\t}\n\t\t\tconst invalidate = (d) => {\n\t\t\t\tif (invalidIds.has(d.id)) {\n\t\t\t\t\tconst route = this.routesById[d.routeId];\n\t\t\t\t\tconst next = {\n\t\t\t\t\t\t...d,\n\t\t\t\t\t\tinvalid: true,\n\t\t\t\t\t\t...(opts?.forcePending || d.status === \"error\" || d.status === \"notFound\") && routeNeedsLoad(route) ? {\n\t\t\t\t\t\t\tstatus: \"pending\",\n\t\t\t\t\t\t\terror: void 0\n\t\t\t\t\t\t} : void 0\n\t\t\t\t\t};\n\t\t\t\t\td._flight = void 0;\n\t\t\t\t\treturn next;\n\t\t\t\t}\n\t\t\t\treturn d;\n\t\t\t};\n\t\t\tthis._committed = committedMatches.map(invalidate);\n\t\t\tfor (const [id, match] of this._cache) if (invalidIds.has(id)) {\n\t\t\t\tmatch.invalid = true;\n\t\t\t\tif (opts?.forcePending) match.status = \"pending\";\n\t\t\t}\n\t\t\tfor (const id of invalidIds) this._flights?.delete(id);\n\t\t\tfor (const controller of discardedPreloads) controller.abort();\n\t\t\tthis.shouldViewTransition = false;\n\t\t\treturn this.load({ sync: opts?.sync });\n\t\t};\n\t\tthis.resolveRedirect = (redirect) => {\n\t\t\tconst options = redirect.options;\n\t\t\tlet href = redirect.headers.get(\"Location\") || options.href;\n\t\t\tif (!href) {\n\t\t\t\tconst location = this.buildLocation(options);\n\t\t\t\thref = (location.maskedLocation ?? location).publicHref || \"/\";\n\t\t\t}\n\t\t\tlet scheme;\n\t\t\tif (protocolRelativePrefixRegex.test(href) || (scheme = getUrlScheme(href)) && !this.protocolAllowlist.has(scheme)) throw new Error(process.env.NODE_ENV !== \"production\" ? `Redirect blocked: unsafe protocol in href \"${href}\". Allowed protocols: ${Array.from(this.protocolAllowlist).join(\", \")}.` : \"Redirect blocked: unsafe protocol\");\n\t\t\tif (scheme === \"http:\" || scheme === \"https:\") {\n\t\t\t\tconst url = new URL(href);\n\t\t\t\tif (url.pathname.startsWith(\"//\")) href = url.href;\n\t\t\t\telse if (!isExternalUrl(url, this.origin)) {\n\t\t\t\t\thref = getUrlPath(url);\n\t\t\t\t\tscheme = void 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (scheme) options.reloadDocument = true;\n\t\t\toptions.href = href;\n\t\t\tredirect.headers.set(\"Location\", href);\n\t\t\treturn redirect;\n\t\t};\n\t\tthis.clearCache = (opts) => {\n\t\t\tconst cached = this._cache;\n\t\t\tconst preloads = this._preloads;\n\t\t\tconst filter = opts?.filter;\n\t\t\tconst discarded = [];\n\t\t\tconst discardedIds = [];\n\t\t\tfor (const [id, match] of cached) if (!filter || filter(match)) {\n\t\t\t\tdiscardedIds.push(id);\n\t\t\t\tdiscarded.push(match);\n\t\t\t}\n\t\t\tconst abort = [];\n\t\t\tfor (const [controller, matches] of preloads ?? []) if (!filter || matches.some(filter)) {\n\t\t\t\tabort.push(controller);\n\t\t\t\tdiscarded.push(...matches);\n\t\t\t}\n\t\t\tfor (const id of discardedIds) cached.delete(id);\n\t\t\tfor (const controller of abort) preloads.delete(controller);\n\t\t\tfor (const match of discarded) {\n\t\t\t\tconst flight = match._flight;\n\t\t\t\tmatch._flight = void 0;\n\t\t\t\tif (flight && !--flight[2]) {\n\t\t\t\t\tif (this._flights?.get(match.id) === flight) this._flights.delete(match.id);\n\t\t\t\t\tabort.push(flight[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const controller of abort) controller.abort();\n\t\t};\n\t\tthis.loadRouteChunk = loadRouteChunk;\n\t\tthis.preloadRoute = (opts) => preloadClientRoute(this, opts);\n\t\tthis.matchRoute = (location, opts) => {\n\t\t\tconst matchLocation = {\n\t\t\t\t...location,\n\t\t\t\tto: location.to ? this.resolvePathWithBase(location.from || \"\", location.to) : void 0,\n\t\t\t\tparams: location.params || {},\n\t\t\t\tleaveParams: true\n\t\t\t};\n\t\t\tconst next = this.buildLocation(matchLocation);\n\t\t\tconst isPending = this.stores.status.get() === \"pending\";\n\t\t\tif (opts?.pending && !isPending) return false;\n\t\t\tconst baseLocation = opts?.pending ?? !isPending ? this.latestLocation : this.stores.resolvedLocation.get() || this.stores.location.get();\n\t\t\tconst match = findSingleMatch(next.pathname, opts?.caseSensitive ?? false, opts?.fuzzy ?? false, baseLocation.pathname, this.processedTree);\n\t\t\tif (!match) return false;\n\t\t\tif (location.params) {\n\t\t\t\tif (!deepEqual(match.rawParams, location.params, { partial: true })) return false;\n\t\t\t}\n\t\t\tif (opts?.includeSearch ?? true) return deepEqual(baseLocation.search, next.search, { partial: true }) ? match.rawParams : false;\n\t\t\treturn match.rawParams;\n\t\t};\n\t\tthis.getStoreConfig = getStoreConfig;\n\t\tif (options.pathParamsAllowedCharacters?.length) this.pathParamsDecoder = compileDecodeCharMap(options.pathParamsAllowedCharacters);\n\t\tthis.update({\n\t\t\tdefaultPreloadDelay: 50,\n\t\t\tdefaultPendingMs: 1e3,\n\t\t\tdefaultPendingMinMs: 500,\n\t\t\tcontext: void 0,\n\t\t\t...options,\n\t\t\tcaseSensitive: options.caseSensitive ?? false,\n\t\t\tnotFoundMode: options.notFoundMode ?? \"fuzzy\",\n\t\t\tstringifySearch: options.stringifySearch ?? defaultStringifySearch,\n\t\t\tparseSearch: options.parseSearch ?? defaultParseSearch,\n\t\t\tprotocolAllowlist: options.protocolAllowlist ?? DEFAULT_PROTOCOL_ALLOWLIST\n\t\t});\n\t\tif (!(isServer ?? typeof document === \"undefined\")) self.__TSR_ROUTER__ = this;\n\t}\n\tisShell() {\n\t\treturn !!this.options.isShell;\n\t}\n\tget state() {\n\t\treturn this.stores.__store.get();\n\t}\n\tsetRoutes(caches) {\n\t\tObject.assign(this, caches);\n\t\tthis.lightweightCache = /* @__PURE__ */ new WeakMap();\n\t\tif (!(isServer ?? this.isServer)) this.staticLocations = /* @__PURE__ */ new WeakMap();\n\t\tconst notFoundRoute = this.options.notFoundRoute;\n\t\tif (notFoundRoute) {\n\t\t\tnotFoundRoute.init(99999999999);\n\t\t\tif (this.routesById[notFoundRoute.id] !== notFoundRoute) notFoundRoute._interpolation = parseSegments(false, notFoundRoute, 0);\n\t\t\tthis.routesById[notFoundRoute.id] = notFoundRoute;\n\t\t}\n\t}\n\tmatchRoutesInternal(next, opts) {\n\t\tconst [initialMatchedRoutes, rawParams, foundRoute] = this.getMatchedRoutes(next.pathname);\n\t\tlet matchedRoutes = initialMatchedRoutes;\n\t\tlet isGlobalNotFound = false;\n\t\tif (foundRoute ? foundRoute.path !== \"/\" && rawParams[\"**\"] : trimPathRight(next.pathname)) if (this.options.notFoundRoute) matchedRoutes = [...matchedRoutes, this.options.notFoundRoute];\n\t\telse isGlobalNotFound = true;\n\t\tconst _notFoundRouteId = isGlobalNotFound ? findGlobalNotFoundRouteId(this.options.notFoundMode, matchedRoutes) : void 0;\n\t\tconst matches = new Array(matchedRoutes.length);\n\t\tconst committed = this._committed;\n\t\tconst previousAt = (route, index) => {\n\t\t\tconst match = committed[index];\n\t\t\treturn match?.routeId === route.id ? match : route === this.options.notFoundRoute ? committed.find((candidate) => candidate.routeId === route.id) : void 0;\n\t\t};\n\t\tlet strictParams;\n\t\tfor (let index = 0; index < matchedRoutes.length; index++) {\n\t\t\tconst route = matchedRoutes[index];\n\t\t\tconst parentMatch = matches[index - 1];\n\t\t\tlet preMatchSearch;\n\t\t\tlet strictMatchSearch;\n\t\t\tlet searchError;\n\t\t\t{\n\t\t\t\tconst parentSearch = parentMatch?.search ?? next.search;\n\t\t\t\tconst parentStrictSearch = parentMatch?._strictSearch ?? void 0;\n\t\t\t\ttry {\n\t\t\t\t\tconst strictSearch = validateSearch(route.options.validateSearch, { ...parentSearch }) ?? void 0;\n\t\t\t\t\tpreMatchSearch = {\n\t\t\t\t\t\t...parentSearch,\n\t\t\t\t\t\t...strictSearch\n\t\t\t\t\t};\n\t\t\t\t\tstrictMatchSearch = {\n\t\t\t\t\t\t...parentStrictSearch,\n\t\t\t\t\t\t...strictSearch\n\t\t\t\t\t};\n\t\t\t\t} catch (err) {\n\t\t\t\t\tlet searchParamError = err;\n\t\t\t\t\tif (!(err instanceof SearchParamError)) searchParamError = new SearchParamError(err.message, { cause: err });\n\t\t\t\t\tif (opts?.throwOnError) throw searchParamError;\n\t\t\t\t\tpreMatchSearch = parentSearch;\n\t\t\t\t\tstrictMatchSearch = {};\n\t\t\t\t\tsearchError = searchParamError;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet loaderDeps = \"\";\n\t\t\tlet loaderDepsHash = \"\";\n\t\t\ttry {\n\t\t\t\tloaderDeps = route.options.loaderDeps?.({ search: preMatchSearch }) ?? \"\";\n\t\t\t\tloaderDepsHash = loaderDeps ? JSON.stringify(loaderDeps) || \"\" : \"\";\n\t\t\t} catch (cause) {\n\t\t\t\tif (opts?.throwOnError) throw cause;\n\t\t\t\tsearchError ??= cause;\n\t\t\t}\n\t\t\tconst usedParams = createNull();\n\t\t\tconst interpolatedPath = route._interpolation ? interpolatePath(route.fullPath, route._interpolation, rawParams, this.pathParamsDecoder, usedParams) : route.fullPath;\n\t\t\tconst matchId = route.id + interpolatedPath + loaderDepsHash;\n\t\t\tconst previousMatch = previousAt(route, index);\n\t\t\tconst existingMatch = process.env.NODE_ENV !== \"production\" && opts?._rematerialize ? void 0 : this._cache.get(matchId) ?? (previousMatch?.id === matchId ? previousMatch : void 0);\n\t\t\tstrictParams = existingMatch?._strictParams ?? Object.assign(usedParams, strictParams);\n\t\t\tlet paramsError;\n\t\t\tif (!existingMatch) try {\n\t\t\t\textractStrictParams(route, strictParams);\n\t\t\t} catch (err) {\n\t\t\t\tif (isNotFound(err) || isRedirect(err)) paramsError = err;\n\t\t\t\telse paramsError = new PathParamError(err.message, { cause: err });\n\t\t\t\tif (opts?.throwOnError) throw paramsError;\n\t\t\t}\n\t\t\tconst cause = previousMatch ? \"stay\" : \"enter\";\n\t\t\tlet match;\n\t\t\tif (existingMatch) match = {\n\t\t\t\t...existingMatch,\n\t\t\t\tcause,\n\t\t\t\tsearch: previousMatch ? nullReplaceEqualDeep(previousMatch.search, preMatchSearch) : nullReplaceEqualDeep(existingMatch.search, preMatchSearch),\n\t\t\t\t_strictSearch: strictMatchSearch,\n\t\t\t\tsearchError\n\t\t\t};\n\t\t\telse {\n\t\t\t\tconst status = routeNeedsLoad(route) ? \"pending\" : \"success\";\n\t\t\t\tmatch = {\n\t\t\t\t\tid: matchId,\n\t\t\t\t\tssr: isServer ?? this.isServer ? void 0 : route.options.ssr,\n\t\t\t\t\tindex,\n\t\t\t\t\trouteId: route.id,\n\t\t\t\t\tparams: previousMatch?.params ?? strictParams,\n\t\t\t\t\t_strictParams: strictParams,\n\t\t\t\t\tpathname: interpolatedPath,\n\t\t\t\t\tupdatedAt: Date.now(),\n\t\t\t\t\tsearch: previousMatch ? nullReplaceEqualDeep(previousMatch.search, preMatchSearch) : preMatchSearch,\n\t\t\t\t\t_strictSearch: strictMatchSearch,\n\t\t\t\t\tsearchError,\n\t\t\t\t\tstatus,\n\t\t\t\t\tisFetching: false,\n\t\t\t\t\terror: void 0,\n\t\t\t\t\tparamsError,\n\t\t\t\t\tcontext: {},\n\t\t\t\t\tabortController: opts?._controller ?? new AbortController(),\n\t\t\t\t\tcause,\n\t\t\t\t\tloaderDeps: previousMatch ? replaceEqualDeep(previousMatch.loaderDeps, loaderDeps) : loaderDeps,\n\t\t\t\t\tinvalid: false,\n\t\t\t\t\tpreload: false,\n\t\t\t\t\tstaticData: route.options.staticData || {},\n\t\t\t\t\tfullPath: route.fullPath\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst _notFound = _notFoundRouteId === route.id;\n\t\t\tif (match._notFound && !_notFound) match.error = void 0;\n\t\t\tmatch._notFound = _notFound;\n\t\t\tmatches[index] = match;\n\t\t}\n\t\tfor (let index = 0; index < matches.length; index++) {\n\t\t\tconst match = matches[index];\n\t\t\tmatch.params = match.cause === \"stay\" ? nullReplaceEqualDeep(match.params, strictParams) : strictParams;\n\t\t\tif (opts?._controller) match.context = {};\n\t\t}\n\t\treturn matches;\n\t}\n\t/**\n\t* Lightweight route matching for buildLocation.\n\t* Only computes fullPath, accumulated search, and params - skipping expensive\n\t* operations like AbortController, loaderDeps, and full match objects.\n\t*/\n\tmatchRoutesLightweight(location) {\n\t\tconst lastRouteId = last(this.stores.ids.get());\n\t\tconst lastStateMatch = lastRouteId ? this.stores.byRoute.get(lastRouteId).get() : void 0;\n\t\tconst lastStateMatchId = lastStateMatch?.id;\n\t\tconst cached = this.lightweightCache.get(location);\n\t\tif (cached && cached[0] === lastStateMatchId) return cached[1];\n\t\tconst [matchedRoutes, rawParams] = this.getMatchedRoutes(location.pathname);\n\t\tconst lastRoute = last(matchedRoutes);\n\t\tconst accumulatedSearch = { ...location.search };\n\t\tfor (const route of matchedRoutes) try {\n\t\t\tObject.assign(accumulatedSearch, validateSearch(route.options.validateSearch, accumulatedSearch));\n\t\t} catch {}\n\t\tconst canReuseParams = lastStateMatch && lastStateMatch.routeId === lastRoute.id && lastStateMatch.pathname === location.pathname;\n\t\tlet params;\n\t\tif (canReuseParams) params = lastStateMatch.params;\n\t\telse {\n\t\t\tconst strictParams = rawParams;\n\t\t\tfor (const route of matchedRoutes) try {\n\t\t\t\textractStrictParams(route, strictParams);\n\t\t\t} catch {}\n\t\t\tparams = strictParams;\n\t\t}\n\t\tconst result = [\n\t\t\tmatchedRoutes,\n\t\t\tlastRoute.fullPath,\n\t\t\taccumulatedSearch,\n\t\t\tparams\n\t\t];\n\t\tthis.lightweightCache.set(location, [lastStateMatchId, result]);\n\t\treturn result;\n\t}\n};\nasync function documentNavigation(router, href, { replace, ignoreBlocker }) {\n\tif (isDangerousProtocol(href, router.protocolAllowlist)) {\n\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Blocked navigation to dangerous protocol: ${href}`);\n\t\treturn;\n\t}\n\tif (!ignoreBlocker) {\n\t\tconst blockers = router.history._getBlockers();\n\t\tfor (const blocker of blockers) if (blocker?.blockerFn) {\n\t\t\tif (await blocker.blockerFn({\n\t\t\t\tcurrentLocation: router.history.location,\n\t\t\t\tnextLocation: router.history.location,\n\t\t\t\taction: replace ? \"REPLACE\" : \"PUSH\"\n\t\t\t})) return;\n\t\t}\n\t}\n\trouter.history._ignoreNextBeforeUnload?.(href);\n\tif (replace) window.location.replace(href);\n\telse window.location.href = href;\n}\n/**\n* In non-production environments,\n* augment the RouterCore class with a `_refreshRoute` method\n* dedicated to HMR.\n*/\nif (process.env.NODE_ENV !== \"production\") {\n\tRouterCore.prototype._replaceRouteChunk = replaceRouteChunk;\n\tRouterCore.prototype._refreshRoute = async function() {\n\t\tthis._serverResult = void 0;\n\t\tthis.updateLatestLocation();\n\t\tawait refreshClientRoute(this);\n\t};\n}\n/** Error thrown when search parameter validation fails. */\nvar SearchParamError = class extends Error {};\n/** Error thrown when path parameter parsing/validation fails. */\nvar PathParamError = class extends Error {};\nconst normalize = (str) => str.endsWith(\"/\") && str.length > 1 ? str.slice(0, -1) : str;\nfunction comparePaths(a, b) {\n\treturn normalize(a) === normalize(b);\n}\n/**\n* Lazily import a module function and forward arguments to it, retaining\n* parameter and return types for the selected export key.\n*/\nfunction lazyFn(fn, key) {\n\treturn async (...args) => {\n\t\treturn (await fn())[key || \"default\"](...args);\n\t};\n}\n/** Create an initial RouterState from a parsed location. */\nfunction getInitialRouterState(location) {\n\treturn {\n\t\tisLoading: false,\n\t\tstatus: \"idle\",\n\t\tresolvedLocation: void 0,\n\t\tlocation,\n\t\tmatches: []\n\t};\n}\nfunction validateSearch(validateSearch, input) {\n\tif (validateSearch == null) return {};\n\tif (\"~standard\" in validateSearch) {\n\t\tconst result = validateSearch[\"~standard\"].validate(input);\n\t\tif (result instanceof Promise) throw new SearchParamError(\"Async validation not supported\");\n\t\tif (result.issues) throw new SearchParamError(JSON.stringify(result.issues, void 0, 2), { cause: result });\n\t\treturn result.value;\n\t}\n\tif (\"parse\" in validateSearch) return validateSearch.parse(input);\n\tif (typeof validateSearch === \"function\") return validateSearch(input);\n\treturn {};\n}\nfunction resolveNextParams(spec, base) {\n\tif (spec === void 0 || spec === true) return base;\n\tconst next = Object.create(null);\n\tif (spec === false || spec === null) return next;\n\tif (typeof spec === \"function\") {\n\t\tObject.assign(next, base);\n\t\treturn Object.assign(next, spec(next));\n\t}\n\treturn Object.assign(next, base, spec);\n}\nfunction needsInheritedParams(spec, interpolation) {\n\tif (typeof spec === \"function\") return true;\n\tif (!interpolation || spec === false || spec === null) return false;\n\treturn spec === void 0 || spec === true || interpolation.some((part) => typeof part !== \"string\" && !hasOwn.call(spec, part[1]));\n}\nconst EMPTY_RECORD = Object.freeze({});\nfunction getSearchMiddlewares(destRoutes, includeValidateSearch) {\n\tconst middlewares = [];\n\tfor (let i = 0; i < destRoutes.length; i++) {\n\t\tconst routeOptions = destRoutes[i].options;\n\t\tif (\"search\" in routeOptions) {\n\t\t\tif (routeOptions.search?.middlewares) middlewares.push(...routeOptions.search.middlewares);\n\t\t} else if (routeOptions.preSearchFilters || routeOptions.postSearchFilters) {\n\t\t\tconst legacyMiddleware = ({ search, next }) => {\n\t\t\t\tconst result = next(routeOptions.preSearchFilters ? routeOptions.preSearchFilters.reduce((prev, next) => next(prev), search) : search);\n\t\t\t\treturn routeOptions.postSearchFilters ? routeOptions.postSearchFilters.reduce((prev, next) => next(prev), result) : result;\n\t\t\t};\n\t\t\tmiddlewares.push(legacyMiddleware);\n\t\t}\n\t\tconst routeValidateSearch = routeOptions.validateSearch;\n\t\tif (includeValidateSearch && routeValidateSearch) {\n\t\t\tconst validate = ({ search, next, meta }) => {\n\t\t\t\tconst result = next(search);\n\t\t\t\ttry {\n\t\t\t\t\tconst validated = validateSearch(routeValidateSearch, result);\n\t\t\t\t\tif (meta && validated) {\n\t\t\t\t\t\tfor (const key in validated) if (!(key in result)) (meta.defaulted ||= /* @__PURE__ */ new Map()).set(key, validated[key]);\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...result,\n\t\t\t\t\t\t...validated\n\t\t\t\t\t};\n\t\t\t\t} catch {}\n\t\t\t\treturn result;\n\t\t\t};\n\t\t\tmiddlewares.push(validate);\n\t\t}\n\t}\n\treturn middlewares;\n}\nfunction applySearchMiddleware(middlewares, search, dest) {\n\tconst applyNext = (index, currentSearch, meta) => {\n\t\tif (index >= middlewares.length) {\n\t\t\tif (!dest.search) return {};\n\t\t\tif (dest.search === true) return currentSearch;\n\t\t\tconst result = functionalUpdate(dest.search, currentSearch);\n\t\t\tif (meta) meta.explicit = result;\n\t\t\treturn result;\n\t\t}\n\t\tconst next = (newSearch, collectMeta) => {\n\t\t\tif (collectMeta) {\n\t\t\t\tconst nextMeta = meta || {};\n\t\t\t\treturn {\n\t\t\t\t\tsearch: applyNext(index + 1, newSearch, nextMeta),\n\t\t\t\t\tmeta: nextMeta\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn applyNext(index + 1, newSearch, meta);\n\t\t};\n\t\treturn middlewares[index]({\n\t\t\tsearch: currentSearch,\n\t\t\tnext,\n\t\t\tmeta\n\t\t});\n\t};\n\treturn applyNext(0, search);\n}\nfunction findGlobalNotFoundRouteId(notFoundMode, routes) {\n\tif (notFoundMode !== \"root\") {\n\t\tlet fallback;\n\t\tfor (let i = routes.length - 1; i >= 0; i--) {\n\t\t\tconst route = routes[i];\n\t\t\tif (route.options.notFoundComponent) return route.id;\n\t\t\tfallback ||= route.children && route.id;\n\t\t}\n\t\tif (fallback) return fallback;\n\t}\n\treturn rootRouteId;\n}\nfunction extractStrictParams(route, accumulatedParams) {\n\tconst parseParams = route.options.params?.parse ?? route.options.parseParams;\n\tif (parseParams) Object.assign(accumulatedParams, parseParams(accumulatedParams));\n}\n//#endregion\nexport { PathParamError, RouterCore, SearchParamError, defaultSerializeError, getInitialRouterState, getLocationChangeInfo, lazyFn, lifecycleEnd, runRouteLifecycle, trailingSlashOptions };\n\n//# sourceMappingURL=router.js.map","import { isNotFound } from \"./not-found.js\";\nimport { isRedirect } from \"./redirect.js\";\nimport { hydrateSsrMatchId } from \"./ssr/ssr-match-id.js\";\nimport { getLocationChangeInfo, lifecycleEnd, runRouteLifecycle } from \"./router.js\";\n//#region src/load-client.ts\nfunction replaceRouteChunk(route, lazyFn) {\n\troute.lazyFn = lazyFn ?? route.lazyFn;\n\troute._lazy = void 0;\n}\nfunction preloadComponent(route, type) {\n\treturn route.options[type]?.preload?.();\n}\nfunction loadComponents(route, onPendingReady) {\n\tconst component = preloadComponent(route, \"component\");\n\tlet pending = preloadComponent(route, \"pendingComponent\");\n\tif (onPendingReady) if (pending) pending = pending.then(onPendingReady);\n\telse onPendingReady();\n\tif (component && pending) return Promise.all([component, pending]).then(() => {});\n\treturn component ?? pending;\n}\nfunction loadRouteChunk(route, componentType, onPendingReady) {\n\tconst afterLazy = () => componentType === false ? void 0 : componentType ? preloadComponent(route, componentType) : loadComponents(route, onPendingReady);\n\tconst current = route._lazy;\n\tif (current) return current === true ? afterLazy() : current.then(afterLazy);\n\tif (!route.lazyFn) return afterLazy();\n\tconst promise = route.lazyFn().then((lazyRoute) => {\n\t\tif (process.env.NODE_ENV === \"production\" || route._lazy === promise) {\n\t\t\tconst { id: _id, ...options } = lazyRoute.options;\n\t\t\tObject.assign(route.options, options);\n\t\t\troute._lazy = true;\n\t\t}\n\t}, (error) => {\n\t\tif (process.env.NODE_ENV === \"production\" || route._lazy === promise) route._lazy = void 0;\n\t\tthrow error;\n\t});\n\troute._lazy = promise;\n\treturn promise.then(afterLazy);\n}\n/** Return the structural lane through the first terminal render boundary. */\nfunction _getRenderedMatches(matches) {\n\tconst end = matches.findIndex((match) => match.status !== \"success\" || match._notFound) + 1;\n\treturn end && end < matches.length ? matches.slice(0, end) : matches;\n}\n/** Return the lane whose document assets belong to the current presentation. */\nfunction _getAssetMatches(matches) {\n\tlet end = matches.length;\n\tfor (let index = 0; index < end; index++) {\n\t\tconst match = matches[index];\n\t\tif (match._assetEnd !== void 0) {\n\t\t\tend = Math.min(end, Math.max(index + 1, match._assetEnd));\n\t\t\tcontinue;\n\t\t}\n\t\tif (match.status !== \"success\" || match._notFound) {\n\t\t\tend = index + 1;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn end < matches.length ? matches.slice(0, end) : matches;\n}\nconst SUCCESS = 0;\nconst ERROR = 1;\nconst NOT_FOUND = 2;\nconst REDIRECTED = 3;\nconst CANCELED_OUTCOME = [4];\nfunction isControl(result) {\n\treturn typeof result[0] === \"number\";\n}\nfunction waitFor(value, signal) {\n\tif (signal.aborted) return Promise.race([Promise.reject(signal), value]);\n\treturn new Promise((resolve, reject) => {\n\t\tconst abort = () => reject(signal);\n\t\tsignal.addEventListener(\"abort\", abort, { once: true });\n\t\tPromise.resolve(value).then(resolve, reject).then(() => signal.removeEventListener(\"abort\", abort));\n\t});\n}\nfunction getRoute(router, match) {\n\treturn router.routesById[match.routeId];\n}\nfunction normalize(value, rejected, routeId) {\n\tif (isRedirect(value)) return [REDIRECTED, value];\n\tif (isNotFound(value)) {\n\t\tvalue.routeId ||= routeId;\n\t\treturn [NOT_FOUND, value];\n\t}\n\tif (!rejected) return [SUCCESS, value];\n\tif (typeof value?.then === \"function\") value = new Error(\"A Promise was thrown\", { cause: value });\n\treturn [ERROR, value];\n}\nfunction normalizeError(route, cause) {\n\tlet outcome = normalize(cause, true, route.id);\n\tif (outcome[0] !== ERROR) return outcome;\n\ttry {\n\t\troute.options.onError?.(outcome[1]);\n\t} catch (onErrorCause) {\n\t\toutcome = normalize(onErrorCause, true, route.id);\n\t}\n\treturn outcome;\n}\nfunction normalizeLaneError(router, lane, route, cause, options) {\n\tif (options[0].signal.aborted) return CANCELED_OUTCOME;\n\treturn materializeRedirect(router, lane, route, normalizeError(route, cause), options);\n}\nasync function contextualize(router, lane, options, end, planSuccessfulLane, retainedEnd) {\n\tconst [location, matches] = lane;\n\tconst signal = options[0].signal;\n\tconst preload = !!options[3];\n\tfor (let index = options[6] ?? 0; index < end; index++) {\n\t\tconst match = matches[index];\n\t\tconst route = getRoute(router, match);\n\t\tmatch.abortController = options[0];\n\t\tconst parentContext = matches[index - 1]?.context ?? router.options.context ?? {};\n\t\tconst common = {\n\t\t\tparams: match.params,\n\t\t\tlocation,\n\t\t\tnavigate: (opts) => router.navigate({\n\t\t\t\t...opts,\n\t\t\t\t_fromLocation: location\n\t\t\t}),\n\t\t\tbuildLocation: router.buildLocation,\n\t\t\tcause: preload ? \"preload\" : match.cause,\n\t\t\tabortController: options[0],\n\t\t\tpreload,\n\t\t\tmatches,\n\t\t\trouteId: route.id\n\t\t};\n\t\ttry {\n\t\t\tconst routeContext = match._ctx ||= route.options.context ? route.options.context({\n\t\t\t\t...common,\n\t\t\t\tdeps: match.loaderDeps,\n\t\t\t\tcontext: parentContext\n\t\t\t}) || {} : void 0;\n\t\t\tmatch.context = {\n\t\t\t\t...parentContext,\n\t\t\t\t...routeContext\n\t\t\t};\n\t\t} catch (cause) {\n\t\t\treleaseFlight(router, match);\n\t\t\treturn [index, normalizeLaneError(router, lane, route, cause, options)];\n\t\t}\n\t\tif (signal.aborted) return [index, CANCELED_OUTCOME];\n\t\tconst validationError = match.paramsError ?? match.searchError;\n\t\tif (validationError !== void 0) {\n\t\t\treleaseFlight(router, match);\n\t\t\treturn [index, normalizeLaneError(router, lane, route, validationError, options)];\n\t\t}\n\t\tconst beforeLoad = route.options.beforeLoad;\n\t\tif (!beforeLoad) continue;\n\t\tconst previousStatus = match.status;\n\t\tif (index >= retainedEnd) {\n\t\t\tmatch.status = \"pending\";\n\t\t\toptions[7]?.();\n\t\t}\n\t\ttry {\n\t\t\tsetFetching(router, match, \"beforeLoad\", options[0]);\n\t\t\tconst value = beforeLoad({\n\t\t\t\t...common,\n\t\t\t\tsearch: match.search,\n\t\t\t\tcontext: match.context,\n\t\t\t\t...router.options.additionalContext\n\t\t\t});\n\t\t\tconst result = await (typeof value?.then === \"function\" ? waitFor(value, signal) : value);\n\t\t\tif (signal.aborted) return [index, CANCELED_OUTCOME];\n\t\t\tconst outcome = materializeRedirect(router, lane, route, normalize(result, false, route.id), options);\n\t\t\tif (outcome[0] !== SUCCESS) {\n\t\t\t\treleaseFlight(router, match);\n\t\t\t\treturn [index, outcome];\n\t\t\t}\n\t\t\tmatch.context = {\n\t\t\t\t...match.context,\n\t\t\t\t...result\n\t\t\t};\n\t\t} catch (cause) {\n\t\t\treleaseFlight(router, match);\n\t\t\treturn [index, normalizeLaneError(router, lane, route, cause, options)];\n\t\t} finally {\n\t\t\tmatch.status = previousStatus;\n\t\t\tsetFetching(router, match, false, options[0]);\n\t\t}\n\t}\n\tplanSuccessfulLane();\n}\nfunction releaseOwnedFlight(router, match, flight) {\n\tif (!flight || --flight[2]) return;\n\tif (router._flights?.get(match.id) === flight) {\n\t\tconst current = router._tx;\n\t\tif (current && !current[0].signal.aborted && !current[3].includes(match) && current[3].some((candidate) => candidate.id === match.id) && current[3].some((candidate) => candidate.isFetching === \"beforeLoad\")) return;\n\t\trouter._flights.delete(match.id);\n\t}\n\treturn flight[1];\n}\nfunction releaseFlight(router, match) {\n\tconst flight = match._flight;\n\tmatch._flight = void 0;\n\treleaseOwnedFlight(router, match, flight)?.abort();\n}\n/**\n* Not passing in a `next` ownership recipient\n* is equivalent to discarding the match resources\n*/\nfunction transferMatchResources(router, previous, next, deferSameIdFlight) {\n\tconst abort = [];\n\tfor (const match of previous) if (!next?.includes(match)) {\n\t\tconst flight = match._flight;\n\t\tmatch._flight = void 0;\n\t\tif (deferSameIdFlight && flight?.[2] === 1 && router._flights?.get(match.id) === flight && next?.some((candidate) => candidate.id === match.id)) flight[2] = 0;\n\t\telse {\n\t\t\tconst controller = releaseOwnedFlight(router, match, flight);\n\t\t\tif (controller) abort.push(controller);\n\t\t}\n\t}\n\tfor (const controller of abort) controller.abort();\n}\nfunction acquireMatchResources(matches) {\n\tfor (const match of matches) {\n\t\tconst flight = match._flight;\n\t\tif (flight) flight[2]++;\n\t}\n}\nfunction setFetching(router, match, value, owner) {\n\tmatch.isFetching = value;\n\tif (owner && router._tx?.[0] !== owner) return;\n\tconst store = router.stores.byRoute.get(match.routeId);\n\tconst presented = store?.get();\n\tif (presented?.id === match.id) store.set({\n\t\t...presented,\n\t\tisFetching: value\n\t});\n}\nfunction getLoaderContext(router, lane, match, route, controller, parentMatchPromise, preload) {\n\tconst location = lane[0];\n\treturn {\n\t\tparams: match.params,\n\t\tlocation,\n\t\tnavigate: (opts) => router.navigate({\n\t\t\t...opts,\n\t\t\t_fromLocation: location\n\t\t}),\n\t\tcause: preload ? \"preload\" : match.cause,\n\t\tabortController: controller,\n\t\tpreload,\n\t\tdeps: match.loaderDeps,\n\t\tparentMatchPromise,\n\t\tcontext: match.context,\n\t\troute,\n\t\t...router.options.additionalContext\n\t};\n}\nasync function loadResource(router, lane, match, route, loader, parentMatchPromise, options) {\n\tconst owner = options[0];\n\tconst signal = owner.signal;\n\tif (signal.aborted) return CANCELED_OUTCOME;\n\tif (!loader) return [SUCCESS, void 0];\n\tlet flight = match._flight;\n\tsetFetching(router, match, \"loader\", owner);\n\ttry {\n\t\tif (!flight) {\n\t\t\tconst controller = new AbortController();\n\t\t\tflight = [\n\t\t\t\tPromise.resolve().then(() => loader(getLoaderContext(router, lane, match, route, controller, parentMatchPromise, !!options[3]))).then((value) => normalize(value, false, route.id), (cause) => normalize(cause, true, route.id)).then((result) => {\n\t\t\t\t\tif (result[0] !== SUCCESS && router._flights?.get(match.id) === flight) {\n\t\t\t\t\t\trouter._flights.delete(match.id);\n\t\t\t\t\t\tif (!flight[2]) controller.abort();\n\t\t\t\t\t}\n\t\t\t\t\treturn result[0] === ERROR && flight[2] ? normalizeError(route, result[1]) : result;\n\t\t\t\t}),\n\t\t\t\tcontroller,\n\t\t\t\t1\n\t\t\t];\n\t\t\t(router._flights ??= /* @__PURE__ */ new Map()).set(match.id, flight);\n\t\t}\n\t\tmatch._flight = flight;\n\t\tmatch.abortController = flight[1];\n\t\treturn materializeRedirect(router, lane, route, await waitFor(flight[0], signal), options);\n\t} catch (cause) {\n\t\tif (cause !== signal || !signal.aborted) throw cause;\n\t\treleaseFlight(router, match);\n\t\treturn CANCELED_OUTCOME;\n\t} finally {\n\t\tsetFetching(router, match, false, owner);\n\t}\n}\nfunction settleInto(match, result, preload) {\n\tif (result[0] === REDIRECTED) return;\n\tmatch.status = \"success\";\n\tmatch.error = void 0;\n\tif (result[0] === SUCCESS) {\n\t\tmatch.loaderData = result[1];\n\t\tmatch.invalid = false;\n\t\tmatch.updatedAt = Date.now();\n\t\tmatch.preload = preload;\n\t} else match.invalid = true;\n}\nfunction cacheLoaderMatch(router, match, planned) {\n\tconst current = router._cache.get(match.id);\n\tif (current !== planned || router._committed.some((candidate) => candidate.id === match.id && candidate._flight === match._flight)) return;\n\tconst cached = {\n\t\t...match,\n\t\t_notFound: void 0,\n\t\tcontext: {}\n\t};\n\tif (cached._flight) cached._flight[2]++;\n\trouter._cache.set(match.id, cached);\n\tif (current) releaseFlight(router, current);\n}\nfunction getParentSnapshot(match, outcome) {\n\tif (outcome[0] === ERROR || outcome[0] === NOT_FOUND) return {\n\t\t...match,\n\t\tstatus: outcome[0] === ERROR ? \"error\" : \"notFound\",\n\t\terror: outcome[1],\n\t\t_flight: void 0\n\t};\n\treturn match;\n}\nfunction createLoaderTask(router, lane, index, tasks, semanticParent, options, retainedEnd) {\n\tconst match = lane[1][index];\n\tconst route = getRoute(router, match);\n\tconst preload = !!options[3];\n\tconst plannedCacheMatch = router._cache.get(match.id);\n\tlet configured;\n\tlet reload = false;\n\tlet reloadFailure;\n\ttry {\n\t\tif (match.status === \"success\") {\n\t\t\tconfigured = route.options.shouldReload;\n\t\t\tif (typeof configured === \"function\") configured = configured(getLoaderContext(router, lane, match, route, options[0], semanticParent, preload));\n\t\t\tif (options[0].signal.aborted) reloadFailure = CANCELED_OUTCOME;\n\t\t}\n\t\tif (!reloadFailure) if (match.status !== \"success\") reload = true;\n\t\telse {\n\t\t\tconst staleAge = preload || match.preload ? route.options.preloadStaleTime ?? router.options.defaultPreloadStaleTime ?? 3e4 : route.options.staleTime ?? router.options.defaultStaleTime ?? 0;\n\t\t\treload = !!(match.invalid || configured || configured === void 0 && Date.now() - match.updatedAt >= staleAge && (options[5] || match.cause === \"enter\" || options[2].some((candidate) => candidate.routeId === match.routeId && candidate.id !== match.id)));\n\t\t}\n\t} catch (cause) {\n\t\tmatch.invalid = true;\n\t\treleaseFlight(router, match);\n\t\treloadFailure = normalizeLaneError(router, lane, route, cause, options);\n\t}\n\tconst routeLoader = route.options.loader;\n\tconst isLoaderFn = typeof routeLoader === \"function\";\n\tconst loader = isLoaderFn ? routeLoader : routeLoader?.handler;\n\tconst preloadable = !preload || route.options.preload !== false;\n\tlet donor = preloadable && routeLoader && !(process.env.NODE_ENV !== \"production\" && router._tx?.[6]) ? router._flights?.get(match.id) : void 0;\n\tif (donor === match._flight || reloadFailure) donor = void 0;\n\telse if (donor && !reload && !preload && configured === void 0) reload = true;\n\telse if (!reload) donor = void 0;\n\tconst background = !!(routeLoader && reload && match.status === \"success\" && !preload && !options[4] && ((isLoaderFn ? void 0 : routeLoader.staleReloadMode) ?? router.options.defaultStaleReloadMode) !== \"blocking\");\n\tconst loaded = reload && preloadable;\n\tconst blocking = loaded && !background && (match.status !== \"success\" || !!routeLoader);\n\tconst onReady = index >= retainedEnd ? options[7] : void 0;\n\tconst onLazyReady = route.lazyFn && route._lazy !== true ? onReady : void 0;\n\tif (loaded && !routeLoader) {\n\t\tmatch.invalid = false;\n\t\tmatch.updatedAt = Date.now();\n\t}\n\tif (donor) donor[2]++;\n\tif (blocking) {\n\t\tconst acceptedFlight = match._flight;\n\t\tmatch._flight = donor;\n\t\treleaseOwnedFlight(router, match, acceptedFlight)?.abort();\n\t\tif (index >= retainedEnd) match.status = \"pending\";\n\t\tonReady?.();\n\t}\n\tif (!loaded) match.isFetching = false;\n\tconst outcome = !reloadFailure && blocking ? loadResource(router, lane, match, route, loader, semanticParent, options).then((result) => {\n\t\tsettleInto(match, result, preload);\n\t\tif (result[0] === SUCCESS) {\n\t\t\tif (routeLoader && !options[0].signal.aborted) cacheLoaderMatch(router, match, plannedCacheMatch);\n\t\t\tif (index >= retainedEnd) match.status = \"pending\";\n\t\t}\n\t\treturn result;\n\t}) : Promise.resolve(reloadFailure ?? [SUCCESS, match.loaderData]);\n\tconst chunkFailure = (async () => {\n\t\ttry {\n\t\t\tconst chunk = loadRouteChunk(route, void 0, onLazyReady);\n\t\t\tif (chunk) await waitFor(chunk, options[0].signal);\n\t\t} catch (cause) {\n\t\t\tif (!lane[1].some((candidate, candidateIndex) => candidateIndex <= index && (candidate.status === \"error\" || candidate.status === \"notFound\" || candidate._notFound))) return [index, normalizeLaneError(router, lane, route, cause, options)];\n\t\t}\n\t\tconst result = await outcome;\n\t\tif (blocking && result[0] === SUCCESS && match.status === \"pending\" && !options[0].signal.aborted) {\n\t\t\tmatch.status = \"success\";\n\t\t\tonReady?.();\n\t\t}\n\t})();\n\ttasks.push([\n\t\tindex,\n\t\toutcome,\n\t\tchunkFailure\n\t]);\n\tif (!background) return outcome.then((result) => getParentSnapshot(match, result));\n\tconst candidate = {\n\t\t...match,\n\t\tstatus: \"pending\",\n\t\tpreload: false,\n\t\t_flight: donor\n\t};\n\tmatch.invalid = false;\n\tmatch.isFetching = \"loader\";\n\tconst backgroundOutcome = loadResource(router, lane, candidate, route, loader, semanticParent, options).then((result) => {\n\t\tmatch.isFetching = false;\n\t\tsettleInto(candidate, result, false);\n\t\treturn result;\n\t});\n\t(lane[2] ??= []).push([\n\t\tindex,\n\t\tbackgroundOutcome,\n\t\tchunkFailure,\n\t\tcandidate\n\t]);\n\treturn backgroundOutcome.then((result) => getParentSnapshot(candidate, result));\n}\nasync function getNotFoundBoundary(router, matches, indexed, signal, fallback = 0) {\n\tconst cause = indexed?.[1][1];\n\tlet index = cause?.routeId ? matches.findIndex((match) => match.routeId === cause.routeId) : indexed?.[0] ?? matches.length - 1;\n\tif (index < 0) index = 0;\n\tfor (let i = index; i >= 0; i--) {\n\t\tconst route = getRoute(router, matches[i]);\n\t\ttry {\n\t\t\tconst loading = loadRouteChunk(route, false);\n\t\t\tif (loading) await waitFor(loading, signal);\n\t\t} catch (cause) {\n\t\t\tif (cause === signal && signal.aborted) throw cause;\n\t\t}\n\t\tif (route.options.notFoundComponent) return i;\n\t}\n\treturn cause?.routeId ? index : fallback;\n}\nfunction discardBackground(router, lane) {\n\tif (lane[2]) {\n\t\ttransferMatchResources(router, lane[2].map((task) => task[3]));\n\t\tlane[2] = void 0;\n\t}\n}\nasync function settleTasks(tasks, serialFailure, redirectTasks, gate) {\n\tlet loaderFailure;\n\ttry {\n\t\tawait Promise.all(tasks.map((task) => task[1].then(async (outcome) => {\n\t\t\tconst taskIndex = task[0];\n\t\t\tif (gate && taskIndex >= await gate) return;\n\t\t\tif (outcome[0] >= REDIRECTED) throw [taskIndex, outcome];\n\t\t\tif (!loaderFailure && outcome[0] !== SUCCESS) {\n\t\t\t\tloaderFailure = [taskIndex, outcome];\n\t\t\t\tawait Promise.all((redirectTasks ?? []).map((nextTask) => {\n\t\t\t\t\tif (nextTask[0] <= taskIndex) return;\n\t\t\t\t\treturn nextTask[1].then((nextOutcome) => {\n\t\t\t\t\t\tif (nextOutcome[0] === REDIRECTED) throw [nextTask[0], nextOutcome];\n\t\t\t\t\t});\n\t\t\t\t}));\n\t\t\t}\n\t\t})));\n\t} catch (cause) {\n\t\treturn cause;\n\t}\n\treturn serialFailure ?? loaderFailure;\n}\nfunction materializeRedirect(router, lane, route, outcome, options, failed) {\n\twhile (outcome[0] === REDIRECTED) {\n\t\tconst redirect = outcome[1];\n\t\tconst redirectOptions = redirect.options;\n\t\ttry {\n\t\t\tif (redirectOptions.href || redirect.headers.has(\"Location\")) {\n\t\t\t\trouter.resolveRedirect(redirect);\n\t\t\t\tif (redirectOptions.reloadDocument) return outcome;\n\t\t\t}\n\t\t\tif (redirectOptions.reloadDocument ? options[3] : options[1] >= 20) return outcome;\n\t\t\tconst location = router.buildLocation({\n\t\t\t\t...redirectOptions,\n\t\t\t\t_fromLocation: lane[0],\n\t\t\t\t_includeValidateSearch: true\n\t\t\t});\n\t\t\tconst publicLocation = location.maskedLocation ?? location;\n\t\t\tif (publicLocation.external) {\n\t\t\t\tconst resolved = redirect.clone();\n\t\t\t\tresolved.options = { ...redirectOptions };\n\t\t\t\tresolved.headers.set(\"Location\", publicLocation.publicHref);\n\t\t\t\trouter.resolveRedirect(resolved);\n\t\t\t\treturn options[3] ? [REDIRECTED, resolved] : [\n\t\t\t\t\tREDIRECTED,\n\t\t\t\t\tresolved,\n\t\t\t\t\tpublicLocation\n\t\t\t\t];\n\t\t\t}\n\t\t\treturn [\n\t\t\t\tREDIRECTED,\n\t\t\t\tredirect,\n\t\t\t\tlocation\n\t\t\t];\n\t\t} catch (cause) {\n\t\t\toutcome = failed ? [ERROR, cause] : normalizeError(route, cause);\n\t\t\tfailed = true;\n\t\t}\n\t}\n\treturn outcome;\n}\nasync function reduceLane(router, lane, tasks, controller, settlement, onReady) {\n\tconst matches = lane[1];\n\tlet failure = await settlement;\n\tlet redirectLimitExceeded = false;\n\tconst plannedBoundary = matches.findIndex((match) => match._notFound);\n\tconst boundaryOf = (found) => found[1][0] === NOT_FOUND ? getNotFoundBoundary(router, matches, found, controller.signal) : found[0];\n\tlet readinessEnd = plannedBoundary < 0 ? matches.length : plannedBoundary;\n\tif ((failure?.[1][0] ?? 0) >= REDIRECTED) readinessEnd = 0;\n\telse if (failure) {\n\t\treadinessEnd = failure[2] ??= await boundaryOf(failure);\n\t\tfor (const task of tasks) {\n\t\t\tif (task[0] >= readinessEnd) break;\n\t\t\tconst outcome = await task[1];\n\t\t\tif (outcome[0] !== SUCCESS && outcome[0] < REDIRECTED && !(\"loaderData\" in matches[task[0]])) {\n\t\t\t\tfailure = [task[0], outcome];\n\t\t\t\treadinessEnd = failure[2] = await boundaryOf(failure);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tfor (const task of tasks) {\n\t\tif (task[0] >= readinessEnd) break;\n\t\tconst chunkFailure = await task[2];\n\t\tif (!chunkFailure) continue;\n\t\tfailure = chunkFailure;\n\t\tbreak;\n\t}\n\tif ((failure?.[1][0] ?? 0) >= REDIRECTED) {\n\t\tconst outcome = failure[1];\n\t\tif (outcome[0] !== REDIRECTED || outcome[1].options.reloadDocument || outcome[2]) {\n\t\t\tdiscardBackground(router, lane);\n\t\t\treturn outcome;\n\t\t}\n\t\tredirectLimitExceeded = true;\n\t\tfailure = [0, [ERROR, /* @__PURE__ */ new Error(\"Too many redirects\")]];\n\t}\n\tconst boundary = failure ? failure[2] ?? await boundaryOf(failure) : plannedBoundary;\n\tif (boundary >= 0) {\n\t\tconst outcome = failure?.[1];\n\t\tconst kind = outcome?.[0];\n\t\tconst match = matches[boundary];\n\t\tconst cause = outcome?.[1];\n\t\tconst install = () => {\n\t\t\tif (outcome) {\n\t\t\t\tmatch._notFound = void 0;\n\t\t\t\tif (kind === ERROR) match.status = \"error\";\n\t\t\t\telse {\n\t\t\t\t\tcause.routeId = match.routeId;\n\t\t\t\t\tif (match.routeId === router.routeTree.id) {\n\t\t\t\t\t\tmatch.status = \"success\";\n\t\t\t\t\t\tmatch._notFound = true;\n\t\t\t\t\t} else match.status = \"notFound\";\n\t\t\t\t}\n\t\t\t\tmatch.error = cause;\n\t\t\t\tmatch.isFetching = false;\n\t\t\t}\n\t\t};\n\t\tinstall();\n\t\tif (!outcome) onReady?.();\n\t\tconst route = getRoute(router, match);\n\t\ttry {\n\t\t\tawait waitFor(outcome ? Promise.resolve().then(() => loadRouteChunk(route, kind === ERROR ? \"errorComponent\" : \"notFoundComponent\")) : Promise.all([loadRouteChunk(route), loadRouteChunk(route, \"notFoundComponent\")]), controller.signal);\n\t\t} catch (cause) {\n\t\t\tif (cause === controller.signal && controller.signal.aborted) {\n\t\t\t\tdiscardBackground(router, lane);\n\t\t\t\treturn CANCELED_OUTCOME;\n\t\t\t}\n\t\t}\n\t\tif (!outcome) match.status = \"success\";\n\t\telse if (redirectLimitExceeded) {\n\t\t\tcontroller.abort();\n\t\t\tawait Promise.all([\n\t\t\t\t...tasks.map((task) => task[1]),\n\t\t\t\t...tasks.map((task) => task[2]),\n\t\t\t\t...(lane[2] ?? []).map((task) => task[1])\n\t\t\t]);\n\t\t\tdiscardBackground(router, lane);\n\t\t\ttransferMatchResources(router, matches);\n\t\t\tinstall();\n\t\t}\n\t}\n\treturn lane;\n}\nasync function projectLane(router, lane, signal, start = 0, end = lane[1].length) {\n\tconst matches = lane[1];\n\tfor (let index = start; index < end; index++) {\n\t\tconst match = matches[index];\n\t\tconst routeOptions = getRoute(router, match).options;\n\t\tif (routeOptions.head || routeOptions.scripts) try {\n\t\t\tconst context = {\n\t\t\t\tssr: router.options.ssr,\n\t\t\t\tmatches,\n\t\t\t\tmatch,\n\t\t\t\tparams: match.params,\n\t\t\t\tloaderData: match.loaderData\n\t\t\t};\n\t\t\tconst [head, scripts] = await waitFor(Promise.all([routeOptions.head?.(context), routeOptions.scripts?.(context)]), signal);\n\t\t\tmatch.meta = head?.meta;\n\t\t\tmatch.links = head?.links;\n\t\t\tmatch.headScripts = head?.scripts;\n\t\t\tmatch.styles = head?.styles;\n\t\t\tmatch.scripts = scripts;\n\t\t} catch (cause) {\n\t\t\tif (cause === signal && signal.aborted) break;\n\t\t\tconsole.error(cause);\n\t\t}\n\t\tif (match.status !== \"success\" || match._notFound) break;\n\t}\n\treturn lane;\n}\nasync function executeClientLane(router, location, matches, options) {\n\tconst matched = [location, matches];\n\tconst signal = options[0].signal;\n\tlet reduced;\n\ttry {\n\t\tconst presented = router.stores.matches.get();\n\t\tlet plannedBoundary = matches.findIndex((match) => match._notFound);\n\t\tif (router.options.notFoundMode !== \"root\" && plannedBoundary >= 0) {\n\t\t\tconst boundary = await getNotFoundBoundary(router, matches, void 0, signal, plannedBoundary);\n\t\t\tmatches[plannedBoundary]._notFound = void 0;\n\t\t\tmatches[boundary]._notFound = true;\n\t\t\tplannedBoundary = boundary;\n\t\t}\n\t\tlet end = plannedBoundary < 0 ? matches.length : plannedBoundary + 1;\n\t\tlet retainedEnd = 0;\n\t\twhile (retainedEnd < end && retainedEnd !== plannedBoundary) {\n\t\t\tconst match = matches[retainedEnd];\n\t\t\tconst committed = options[2][retainedEnd];\n\t\t\tconst visible = presented[retainedEnd];\n\t\t\tif (committed?.id !== match.id || committed.status !== \"success\" || match.preload || visible?.id !== match.id || visible.status !== \"success\") break;\n\t\t\tretainedEnd++;\n\t\t\tif (committed._notFound || visible._notFound) break;\n\t\t}\n\t\tconst tasks = [];\n\t\tconst start = options[6] ?? 0;\n\t\tlet semanticParent = start ? Promise.resolve(matches[start - 1]) : void 0;\n\t\tconst planSuccessfulLane = () => {\n\t\t\tfor (let index = start; index < end; index++) {\n\t\t\t\tif (signal.aborted) break;\n\t\t\t\tsemanticParent = createLoaderTask(router, matched, index, tasks, semanticParent, options, retainedEnd);\n\t\t\t}\n\t\t};\n\t\tconst failure = await contextualize(router, matched, options, end, planSuccessfulLane, retainedEnd);\n\t\tif (failure) {\n\t\t\toptions[4] = true;\n\t\t\tend = failure[0];\n\t\t\tif (failure[1][0] === NOT_FOUND) {\n\t\t\t\tconst boundary = await getNotFoundBoundary(router, matches, failure, signal);\n\t\t\t\tfailure[2] = boundary;\n\t\t\t\tend = Math.min(end, boundary + 1);\n\t\t\t} else if (failure[1][0] >= REDIRECTED) end = 0;\n\t\t\tplanSuccessfulLane();\n\t\t}\n\t\tif (!signal.aborted && !options[3]) {\n\t\t\tconst abort = [];\n\t\t\tfor (const [id, flight] of router._flights ?? []) if (!flight[2]) {\n\t\t\t\trouter._flights.delete(id);\n\t\t\t\tabort.push(flight[1]);\n\t\t\t}\n\t\t\tfor (const controller of abort) controller.abort();\n\t\t}\n\t\tconst reduction = reduceLane(router, matched, tasks, options[0], settleTasks(tasks, failure, matched[2]), options[7]);\n\t\tif (matched[2]?.length) matched[3] = settleTasks(matched[2], void 0, void 0, reduction.then((foreground) => isControl(foreground) ? 0 : _getRenderedMatches(matches).length, () => 0));\n\t\treduced = await reduction;\n\t} catch (cause) {\n\t\tdiscardBackground(router, matched);\n\t\tif (cause === signal && signal.aborted) return CANCELED_OUTCOME;\n\t\tthrow cause;\n\t}\n\tif (isControl(reduced)) return reduced;\n\treturn projectLane(router, reduced, signal, options[6] === matches.length ? options[6] : 0);\n}\n/**\n* Waits for `pendingMs`, then presents the complete lane. Rendering applies the\n* selected boundary cutoff while retaining every match's structural state.\n* A replacement load for the same match keeps the timer; choosing a different\n* match resets it. `pendingMinMs` starts after the fallback renders.\n*/\nfunction offerPending(router, tx) {\n\tif (router._tx !== tx) return;\n\tconst matches = tx[3];\n\tconst presented = router.stores.matches.get();\n\tlet session = router._pending;\n\tfor (let index = 0; index < matches.length; index++) {\n\t\tconst match = matches[index];\n\t\tconst success = match.status === \"success\" && !match._notFound;\n\t\tconst presentedPending = presented[index]?.id === match.id && presented[index]?.status === \"pending\";\n\t\tif (success && !presentedPending) continue;\n\t\tconst route = getRoute(router, match);\n\t\tconst delay = success || match.invalid ? 0 : route.options.pendingMs ?? router.options.defaultPendingMs;\n\t\tconst component = route.options.pendingComponent ?? router.options.defaultPendingComponent;\n\t\tif (!component || typeof delay !== \"number\" || delay === Infinity) {\n\t\t\tif (session) {\n\t\t\t\tsession[0] = tx;\n\t\t\t\tsession[2] = 0;\n\t\t\t\tsession[4] = true;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tconst min = route.options.pendingMinMs ?? router.options.defaultPendingMinMs ?? 0;\n\t\tlet tookOver = false;\n\t\tif (session?.[1] === match.id) {\n\t\t\ttookOver = session[0] !== tx;\n\t\t\tsession[0] = tx;\n\t\t} else {\n\t\t\tclearTimeout(session?.[3]);\n\t\t\trouter._pending = session = void 0;\n\t\t}\n\t\tif (!session) router._pending = session = [\n\t\t\ttx,\n\t\t\tmatch.id,\n\t\t\tpresentedPending ? Date.now() + min : tx[4] + delay,\n\t\t\tvoid 0,\n\t\t\tpresentedPending || void 0,\n\t\t\tcomponent\n\t\t];\n\t\tif (session[4] && !tookOver && session[5] === component) return;\n\t\tsession[5] = component;\n\t\tif (!session[4]) {\n\t\t\tclearTimeout(session[3]);\n\t\t\tconst remaining = session[2] - Date.now();\n\t\t\tif (remaining > 0) {\n\t\t\t\tsession[3] = setTimeout(() => offerPending(router, tx), remaining);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsession[2] = 0;\n\t\t}\n\t\tconst offered = matches.map((match) => ({\n\t\t\t...match,\n\t\t\t_flight: void 0\n\t\t}));\n\t\toffered[index].status = \"pending\";\n\t\tconst ack = session[4] = router.startTransition(() => router.stores.setMatches(offered), offered).then((rendered) => {\n\t\t\tif (rendered && router._pending === session && session[4] === ack && !session[2]) session[2] = Date.now() + min;\n\t\t\treturn rendered;\n\t\t});\n\t\treturn;\n\t}\n}\n/**\n* Cancels pending UI timing unless the current successor can take over the\n* same boundary that remains painted.\n*/\nfunction finishPending(router, tx) {\n\tconst session = router._pending;\n\tif (router._tx === tx || !router._tx?.[3].some((match) => match.id === session?.[1])) {\n\t\tclearTimeout(session?.[3]);\n\t\trouter._pending = void 0;\n\t}\n}\nasync function awaitPendingMinimum(router, tx) {\n\tconst session = router._pending;\n\tif (!session) return;\n\tclearTimeout(session[3]);\n\tconst remaining = session[2] - Date.now();\n\tif (!session[4] || remaining <= 0 || !_getRenderedMatches(tx[3]).some((match) => match.id === session[1])) return;\n\tlet timer;\n\ttry {\n\t\tawait waitFor(new Promise((resolve) => {\n\t\t\ttimer = setTimeout(resolve, remaining);\n\t\t}), tx[0].signal);\n\t} catch {}\n\tclearTimeout(timer);\n}\nfunction publishMatches(router, matches) {\n\trouter._committed = matches;\n\trouter.stores.setMatches(matches);\n}\nfunction commitMatches(router, tx, matches, resolvedPrefix) {\n\tconst previous = router._committed;\n\tconst previousEnd = router._lifecycleEnd;\n\tconst previousCached = router._cache;\n\tfor (const match of matches) {\n\t\tmatch.preload = false;\n\t\tif (resolvedPrefix) match._assetEnd = void 0;\n\t}\n\tconst cut = _getRenderedMatches(matches).length;\n\tconst cached = /* @__PURE__ */ new Map();\n\tif (process.env.NODE_ENV === \"production\" || !tx[6]) {\n\t\tconst now = Date.now();\n\t\tconst superseded = /* @__PURE__ */ new Set();\n\t\tfor (let index = 0; index < matches.length; index++) {\n\t\t\tconst match = matches[index];\n\t\t\tif (index < cut || match.status === \"success\") superseded.add(match.id);\n\t\t}\n\t\tfor (const match of [...previous, ...previousCached.values()]) {\n\t\t\tif (match.status !== \"success\" || superseded.has(match.id)) continue;\n\t\t\tconst route = getRoute(router, match);\n\t\t\tif (!route.options.loader || now - match.updatedAt >= (match.preload ? route.options.preloadGcTime ?? router.options.defaultPreloadGcTime ?? 3e5 : route.options.gcTime ?? router.options.defaultGcTime ?? 3e5)) continue;\n\t\t\tcached.set(match.id, previousCached.get(match.id) === match ? match : {\n\t\t\t\t...match,\n\t\t\t\t_flight: void 0,\n\t\t\t\tisFetching: false,\n\t\t\t\tcontext: {}\n\t\t\t});\n\t\t}\n\t}\n\ttx[3] = [];\n\trouter._cache = cached;\n\tconst nextEnd = router._lifecycleEnd = lifecycleEnd(matches);\n\tpublishMatches(router, matches);\n\ttransferMatchResources(router, [...previousCached.values(), ...previous].filter((match) => match._flight && cached.get(match.id) !== match), matches);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst handoff = tx[6]?.[0];\n\t\tif (handoff && router._handoff === handoff) handoff[1]();\n\t}\n\trunRouteLifecycle(router, previous, matches, previousEnd, nextEnd, tx);\n}\n/**\n* Resolve once the router has settled on a transaction other than `owner`.\n* Each transaction's completion follows its current successor, so all waiters\n* share the same chain instead of polling every successor independently.\n*/\nasync function awaitCurrent(router, owner) {\n\tlet current = router._tx;\n\twhile (current && current !== owner) {\n\t\towner = current;\n\t\tawait current[5];\n\t\tcurrent = router._tx;\n\t}\n}\nfunction followRedirect(router, tx, outcome) {\n\tconst options = outcome[1].options;\n\tconst location = outcome[2];\n\tif (!location) return router.navigate({\n\t\t...options,\n\t\treplace: true,\n\t\tignoreBlocker: true\n\t});\n\tif (options.reloadDocument) return router.navigate({\n\t\thref: (location.maskedLocation ?? location).publicHref,\n\t\treloadDocument: true,\n\t\treplace: true,\n\t\tignoreBlocker: true\n\t});\n\tlocation._redirects = tx[1] + 1;\n\trouter._pendingLocation = location;\n\tconst committed = router.commitLocation({\n\t\t...location,\n\t\tviewTransition: options.viewTransition,\n\t\treplace: true,\n\t\tresetScroll: options.resetScroll,\n\t\thashScrollIntoView: options.hashScrollIntoView,\n\t\tignoreBlocker: true\n\t});\n\tqueueMicrotask(() => {\n\t\tif (router._pendingLocation === location) router._pendingLocation = void 0;\n\t});\n\treturn committed;\n}\nasync function runBackground(router, tx, base, tasks, settlement) {\n\tconst next = base.map((match) => ({ ...match }));\n\tacquireMatchResources(next);\n\tfor (const task of tasks) {\n\t\treleaseFlight(router, next[task[0]]);\n\t\tnext[task[0]] = task[3];\n\t}\n\tconst lane = [tx[2], next];\n\tlet reduced;\n\ttry {\n\t\treduced = await reduceLane(router, lane, tasks, tx[0], settlement);\n\t} catch (cause) {\n\t\ttransferMatchResources(router, next);\n\t\tthrow cause;\n\t}\n\tif (isControl(reduced)) {\n\t\ttransferMatchResources(router, next);\n\t\tif (reduced[0] === REDIRECTED && router._tx === tx && router._committed === base) await followRedirect(router, tx, reduced);\n\t\treturn;\n\t}\n\tawait projectLane(router, reduced, tx[0].signal);\n\tif (router._tx !== tx || router._committed !== base) {\n\t\ttransferMatchResources(router, next);\n\t\treturn;\n\t}\n\tfor (const match of next) {\n\t\tconst cached = router._cache.get(match.id);\n\t\tif (cached?._flight && cached._flight === match._flight) {\n\t\t\trouter._cache.delete(match.id);\n\t\t\treleaseFlight(router, cached);\n\t\t}\n\t}\n\tpublishMatches(router, next);\n\ttransferMatchResources(router, base, next);\n}\nasync function runClientTransaction(router, tx, forceStaleReload, onReady, sync, resolvedPrefix) {\n\tconst result = await executeClientLane(router, tx[2], tx[3], [\n\t\ttx[0],\n\t\ttx[1],\n\t\trouter._committed,\n\t\tvoid 0,\n\t\tsync,\n\t\tforceStaleReload,\n\t\tresolvedPrefix,\n\t\tonReady\n\t]);\n\tif (isControl(result)) {\n\t\tconst follow = result[0] === REDIRECTED && router._tx === tx;\n\t\tif (!follow || result[1].options.reloadDocument) finishPending(router, tx);\n\t\ttransferMatchResources(router, tx[3]);\n\t\ttx[3] = [];\n\t\tif (!follow) return;\n\t\tif (router._tx !== tx) {\n\t\t\tfinishPending(router, tx);\n\t\t\treturn;\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\" && tx[6]) router._refreshNextLoad = true;\n\t\tawait followRedirect(router, tx, result);\n\t\treturn;\n\t}\n\tconst matches = result[1];\n\tif (router._tx === tx) await awaitPendingMinimum(router, tx);\n\tif (router._tx !== tx) {\n\t\tfinishPending(router, tx);\n\t\ttransferMatchResources(router, matches);\n\t\tdiscardBackground(router, result);\n\t\treturn;\n\t}\n\tconst toLocation = tx[2];\n\tconst changeInfo = getLocationChangeInfo(toLocation, router.stores.resolvedLocation.get());\n\tconst background = result[2];\n\tawait router.startViewTransition(async () => {\n\t\tif (router._tx === tx) await awaitPendingMinimum(router, tx);\n\t\tif (router._tx !== tx) {\n\t\t\tfinishPending(router, tx);\n\t\t\ttransferMatchResources(router, matches);\n\t\t\tdiscardBackground(router, result);\n\t\t\treturn;\n\t\t}\n\t\tconst commit = () => {\n\t\t\tfinishPending(router, tx);\n\t\t\tcommitMatches(router, tx, matches, resolvedPrefix);\n\t\t\tif (router._tx !== tx) return;\n\t\t\trouter.emit({\n\t\t\t\ttype: \"onLoad\",\n\t\t\t\t...changeInfo\n\t\t\t});\n\t\t\tif (router._tx === tx) router.emit({\n\t\t\t\ttype: \"onBeforeRouteMount\",\n\t\t\t\t...changeInfo\n\t\t\t});\n\t\t};\n\t\tconst rendered = await router.startTransition(commit, matches);\n\t\tif (process.env.NODE_ENV !== \"production\" && tx[6]) tx[6] = void 0;\n\t\tif (router._tx !== tx) {\n\t\t\tdiscardBackground(router, result);\n\t\t\treturn;\n\t\t}\n\t\tif (background?.length) runBackground(router, tx, matches, background, result[3]).catch(console.error);\n\t\trouter.batch(() => {\n\t\t\trouter.stores.resolvedLocation.set(toLocation);\n\t\t\trouter.stores.status.set(\"idle\");\n\t\t\tif (router._tx === tx) router.emit({\n\t\t\t\ttype: \"onResolved\",\n\t\t\t\t...changeInfo\n\t\t\t});\n\t\t\tif (rendered && router._tx === tx) router.emit({\n\t\t\t\ttype: \"onRendered\",\n\t\t\t\t...changeInfo\n\t\t\t});\n\t\t});\n\t\tif (router._tx !== tx) return;\n\t\trouter._commitPromise?.resolve();\n\t\trouter._commitPromise = void 0;\n\t});\n}\nasync function loadClientRoute(router, opts) {\n\tlet rematerialize = false;\n\tif (process.env.NODE_ENV !== \"production\") rematerialize = !!router._refreshNextLoad || !!router._tx?.[6];\n\tconst previousOwner = router._tx;\n\tconst resolvedLocation = router.stores.resolvedLocation.get();\n\tconst previousLocation = resolvedLocation ?? router.stores.location.get();\n\tconst location = router.latestLocation;\n\tconst pendingLocation = router._pendingLocation;\n\tconst redirects = pendingLocation?.href === location.href ? pendingLocation._redirects ?? 0 : 0;\n\tconst handoff = router._handoff;\n\tconst hydrationController = rematerialize ? void 0 : handoff?.[0]();\n\tconst preflight = new AbortController();\n\tconst previousPreflight = router._preflight;\n\trouter._preflight = preflight;\n\tif (!rematerialize && !hydrationController) handoff?.[1]();\n\tpreviousPreflight?.abort();\n\tif (!preflight.signal.aborted) {\n\t\tconst changeInfo = getLocationChangeInfo(location, resolvedLocation);\n\t\trouter.emit({\n\t\t\ttype: \"onBeforeNavigate\",\n\t\t\t...changeInfo\n\t\t});\n\t\tif (!preflight.signal.aborted) router.emit({\n\t\t\ttype: \"onBeforeLoad\",\n\t\t\t...changeInfo\n\t\t});\n\t}\n\tif (preflight.signal.aborted) {\n\t\tawait awaitCurrent(router, previousOwner);\n\t\treturn;\n\t}\n\tconst sameHref = previousLocation.href === location.href;\n\tlet controller = preflight;\n\tconst matches = process.env.NODE_ENV !== \"production\" && rematerialize ? router.matchRoutes(location, {\n\t\t_controller: preflight,\n\t\t_rematerialize: true\n\t}) : router.matchRoutes(location, { _controller: preflight });\n\tacquireMatchResources(matches);\n\tconst resolvedPrefix = hydrationController ? handoff[1](matches) : void 0;\n\tif (resolvedPrefix) controller = hydrationController;\n\telse hydrationController?.abort();\n\tif (preflight.signal.aborted) {\n\t\ttransferMatchResources(router, matches);\n\t\tawait awaitCurrent(router, previousOwner);\n\t\treturn;\n\t}\n\trouter._preflight = void 0;\n\tlet settle;\n\tconst run = () => runClientTransaction(router, tx, sameHref, () => offerPending(router, tx), opts?.sync, resolvedPrefix);\n\tconst done = opts?.sync ? new Promise((resolve) => settle = resolve) : Promise.resolve().then(run);\n\tconst tx = [\n\t\tcontroller,\n\t\tredirects,\n\t\tlocation,\n\t\tmatches,\n\t\tDate.now(),\n\t\tdone.then(() => awaitCurrent(router, tx))\n\t];\n\tif (process.env.NODE_ENV !== \"production\" && rematerialize) {\n\t\ttx[6] = [handoff];\n\t\trouter._refreshNextLoad = void 0;\n\t}\n\trouter._tx = tx;\n\tif (previousOwner) {\n\t\tfor (const match of router.stores.matches.get()) {\n\t\t\tif (router._tx !== tx) break;\n\t\t\tif (match.isFetching) setFetching(router, match, false);\n\t\t}\n\t\tpreviousOwner[0].abort();\n\t\ttransferMatchResources(router, previousOwner[3], tx[3], true);\n\t}\n\tif (router._tx !== tx) {\n\t\ttransferMatchResources(router, tx[3]);\n\t\ttx[3] = [];\n\t\tsettle?.();\n\t\tawait awaitCurrent(router, tx);\n\t\treturn;\n\t}\n\trouter.batch(() => {\n\t\trouter.stores.status.set(\"pending\");\n\t\trouter.stores.location.set(location);\n\t});\n\tif (resolvedPrefix || !router._committed.length && matches[0]?.status !== \"success\" && !matches.some((match) => match._notFound)) offerPending(router, tx);\n\tsettle?.(run());\n\tawait tx[5];\n}\nasync function refreshClientRoute(router) {\n\tconst pending = router._tx;\n\tif (pending && !pending[6] && router.stores.status.get() === \"pending\") {\n\t\tawait pending[5];\n\t\tif (router._tx !== pending) await awaitCurrent(router, pending);\n\t}\n\trouter._flights?.clear();\n\trouter.clearCache();\n\trouter._refreshNextLoad = true;\n\tawait loadClientRoute(router, { sync: true });\n}\nasync function preloadClientRoute(router, opts) {\n\tif (process.env.NODE_ENV !== \"production\" && (router._refreshNextLoad || router._tx?.[6])) return;\n\tlet location = router.buildLocation(opts);\n\tfor (let redirects = 0;; redirects++) {\n\t\tconst base = router._committed;\n\t\tconst controller = new AbortController();\n\t\tlet matches;\n\t\tlet active;\n\t\tlet result;\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tmatches = router.matchRoutes(location, { _controller: controller });\n\t\t\t\tacquireMatchResources(matches);\n\t\t\t\tactive = (router._preloads ??= /* @__PURE__ */ new Map()).set(controller, matches);\n\t\t\t\tresult = await executeClientLane(router, location, matches, [\n\t\t\t\t\tcontroller,\n\t\t\t\t\tredirects,\n\t\t\t\t\tbase,\n\t\t\t\t\ttrue\n\t\t\t\t]);\n\t\t\t} finally {\n\t\t\t\tif (active) {\n\t\t\t\t\tactive = active.delete(controller);\n\t\t\t\t\ttransferMatchResources(router, matches);\n\t\t\t\t}\n\t\t\t\tcontroller.abort();\n\t\t\t}\n\t\t\tif (!isControl(result)) return result[1];\n\t\t\tif (!active || result.length < 3 || process.env.NODE_ENV !== \"production\" && (router._refreshNextLoad || router._tx?.[6])) return;\n\t\t\tlocation = result[2];\n\t\t} catch (cause) {\n\t\t\tif (!isNotFound(cause)) console.error(cause);\n\t\t\treturn;\n\t\t}\n\t}\n}\nasync function hydrate(router) {\n\tif (process.env.NODE_ENV !== \"production\" && !window.$_TSR) throw new Error(\"Invariant failed: Expected to find bootstrap data on window.$_TSR, but we did not. Please file an issue!\");\n\tconst tsr = window.$_TSR;\n\tconst adapters = router.options.serializationAdapters;\n\tif (adapters?.length) {\n\t\ttsr.t = new Map(adapters.map((adapter) => [adapter.key, adapter.fromSerializable]));\n\t\ttsr.buffer.forEach((script) => script());\n\t}\n\ttsr.initialized = true;\n\tconst dehydratedRouter = tsr.router;\n\tif (process.env.NODE_ENV !== \"production\" && !dehydratedRouter) throw new Error(\"Invariant failed: Expected to find a dehydrated data on window.$_TSR.router, but we did not. Please file an issue!\");\n\trouter.ssr = { manifest: dehydratedRouter.manifest };\n\trouter.options.ssr = { nonce: document.querySelector(\"meta[property=\\\"csp-nonce\\\"]\")?.content };\n\tconst dehydratedMatches = dehydratedRouter.matches;\n\tconst controller = new AbortController();\n\tconst previousPreflight = router._preflight;\n\trouter._preflight = controller;\n\tpreviousPreflight?.abort();\n\tconst isCurrent = () => router._preflight === controller;\n\tlet location;\n\tlet candidates;\n\tlet handoffHistoryHref;\n\tlet handoffHistoryState;\n\ttry {\n\t\tawait waitFor(router.options.hydrate?.(dehydratedRouter.dehydratedData), controller.signal);\n\t\tif (!isCurrent()) return;\n\t\tconst historyLocation = router.history.location;\n\t\thandoffHistoryHref = historyLocation.href;\n\t\thandoffHistoryState = historyLocation.state;\n\t\trouter.updateLatestLocation();\n\t\tlocation = router.latestLocation;\n\t\trouter.stores.location.set(location);\n\t\tcandidates = router.matchRoutes(location, { _controller: controller });\n\t} catch (cause) {\n\t\tif (isCurrent()) router._preflight = void 0;\n\t\tcontroller.abort(cause);\n\t\tif (cause !== controller.signal) throw cause;\n\t}\n\tif (!isCurrent()) return;\n\tconst committed = [];\n\tlet pendingBoundary;\n\tlet verifiedAssetEnd = 0;\n\tconst retryFrom = (index) => {\n\t\tverifiedAssetEnd = Math.min(verifiedAssetEnd, index + 1);\n\t\tconst removed = committed.splice(index);\n\t\tfor (const match of removed) if (getRoute(router, match).options.loader && (match.status === \"success\" || !match.invalid && \"loaderData\" in match)) cacheLoaderMatch(router, {\n\t\t\t...match,\n\t\t\tstatus: \"success\",\n\t\t\terror: void 0,\n\t\t\tpreload: true\n\t\t}, router._cache.get(match.id));\n\t\ttransferMatchResources(router, removed);\n\t};\n\tconst shared = dehydratedMatches.length > candidates.length ? candidates.findIndex((match) => match._notFound) + 1 : dehydratedMatches.length;\n\tlet isTerminal = false;\n\tfor (let index = 0; index < shared; index++) {\n\t\tconst candidate = candidates[index];\n\t\tconst dehydrated = dehydratedMatches[index];\n\t\tif (typeof dehydrated.i !== \"string\" || hydrateSsrMatchId(dehydrated.i) !== candidate.id) {\n\t\t\tpendingBoundary ??= index;\n\t\t\tbreak;\n\t\t}\n\t\tverifiedAssetEnd = index + 1;\n\t\tconst route = getRoute(router, candidate);\n\t\tif (\"l\" in dehydrated || dehydrated.s === \"success\" && dehydrated.e === void 0 && route.options.loader) candidate.loaderData = dehydrated.l;\n\t\tcandidate.status = dehydrated.s;\n\t\tcandidate.ssr = dehydrated.ssr;\n\t\troute.options.ssr = candidate.ssr;\n\t\tcandidate.updatedAt = dehydrated.u;\n\t\tcandidate.error = dehydrated.e;\n\t\tcandidate._notFound ||= dehydrated.g;\n\t\tif (candidate.status === \"error\" || candidate.status === \"notFound\" || candidate._notFound) {\n\t\t\tisTerminal = true;\n\t\t\tcommitted.push(candidate);\n\t\t\tif (candidate.ssr === false || candidate.ssr === \"data-only\") pendingBoundary ??= index;\n\t\t\tbreak;\n\t\t}\n\t\tif (candidate.status === \"pending\") {\n\t\t\tpendingBoundary ??= index;\n\t\t\tbreak;\n\t\t}\n\t\tcommitted.push(candidate);\n\t\tif (candidate.ssr === \"data-only\") pendingBoundary ??= index;\n\t}\n\tif (!isTerminal && committed.length === shared && shared < candidates.length) pendingBoundary = shared;\n\tconst chunks = committed.map(async (match) => {\n\t\ttry {\n\t\t\tconst route = getRoute(router, match);\n\t\t\tawait (match._notFound ? Promise.all([loadRouteChunk(route), loadRouteChunk(route, \"notFoundComponent\")]) : loadRouteChunk(route, match.status === \"error\" ? \"errorComponent\" : match.status === \"notFound\" ? \"notFoundComponent\" : void 0));\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t});\n\tlet chunkFailure = 0;\n\ttry {\n\t\twhile (chunkFailure < chunks.length && await waitFor(chunks[chunkFailure], controller.signal)) chunkFailure++;\n\t} catch {\n\t\treturn;\n\t}\n\tif (!isCurrent()) return;\n\tif (chunkFailure < committed.length) retryFrom(chunkFailure);\n\tconst contextEnd = Math.max(pendingBoundary === committed.length ? committed.length + 1 : committed.length, chunkFailure < chunks.length ? chunkFailure : verifiedAssetEnd);\n\tfor (let index = 0; index < contextEnd; index++) {\n\t\tconst match = candidates[index];\n\t\tconst route = getRoute(router, match);\n\t\tconst parentContext = candidates[index - 1]?.context ?? router.options.context ?? {};\n\t\tlet routeContext;\n\t\tif (route.options.context) {\n\t\t\ttry {\n\t\t\t\trouteContext = match._ctx = route.options.context({\n\t\t\t\t\tdeps: match.loaderDeps,\n\t\t\t\t\tparams: match.params,\n\t\t\t\t\tcontext: parentContext,\n\t\t\t\t\tlocation,\n\t\t\t\t\tnavigate: (opts) => router.navigate({\n\t\t\t\t\t\t...opts,\n\t\t\t\t\t\t_fromLocation: location\n\t\t\t\t\t}),\n\t\t\t\t\tbuildLocation: router.buildLocation,\n\t\t\t\t\tcause: match.cause,\n\t\t\t\t\tabortController: controller,\n\t\t\t\t\tpreload: false,\n\t\t\t\t\tmatches: candidates,\n\t\t\t\t\trouteId: route.id\n\t\t\t\t}) || {};\n\t\t\t} catch {\n\t\t\t\tif (!isCurrent()) return;\n\t\t\t\tif (match.status !== \"error\" && match.status !== \"notFound\" && !match._notFound) {\n\t\t\t\t\tpendingBoundary = Math.min(pendingBoundary ?? index, index);\n\t\t\t\t\tretryFrom(index);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!isCurrent()) return;\n\t\t}\n\t\tmatch.context = {\n\t\t\t...parentContext,\n\t\t\t...routeContext,\n\t\t\t...committed[index] && dehydratedMatches[index].b\n\t\t};\n\t}\n\tawait projectLane(router, [location, candidates], controller.signal, 0, verifiedAssetEnd);\n\tif (!isCurrent()) return;\n\tconst needsClientLoad = pendingBoundary !== void 0 || committed.length < shared;\n\tconst committedMatches = isTerminal && committed.length === shared ? candidates : committed;\n\tlet presented = needsClientLoad ? candidates : committedMatches;\n\tlet dataOnlyAssetEnd;\n\tif (needsClientLoad && pendingBoundary !== void 0) {\n\t\tconst boundary = presented[pendingBoundary];\n\t\tdataOnlyAssetEnd = boundary.ssr === \"data-only\" && verifiedAssetEnd > pendingBoundary + 1 ? verifiedAssetEnd : void 0;\n\t\tpresented = presented.slice();\n\t\tpresented[pendingBoundary] = {\n\t\t\t...boundary,\n\t\t\tstatus: \"pending\",\n\t\t\tssr: boundary.ssr === \"data-only\" ? \"data-only\" : false,\n\t\t\t_assetEnd: dataOnlyAssetEnd\n\t\t};\n\t}\n\tconst claim = () => {\n\t\tconst historyLocation = router.history.location;\n\t\treturn needsClientLoad && !router._tx && historyLocation.href === handoffHistoryHref && historyLocation.state === handoffHistoryState && router._committed === committedMatches && committedMatches.length && !controller.signal.aborted ? controller : void 0;\n\t};\n\tconst handoff = [claim, (matches) => {\n\t\tif (router._handoff !== handoff) return;\n\t\trouter._handoff = void 0;\n\t\tconst prefix = committedMatches.length;\n\t\tif (!matches || !claim() || committedMatches.some((match, index) => match.id !== matches[index]?.id)) {\n\t\t\tcontroller.abort();\n\t\t\treturn;\n\t\t}\n\t\tlet handoffAssetEnd = dataOnlyAssetEnd;\n\t\tif (handoffAssetEnd !== void 0) {\n\t\t\tfor (let index = prefix; index < handoffAssetEnd; index++) if (candidates[index]?.id !== matches[index]?.id) {\n\t\t\t\thandoffAssetEnd = index > pendingBoundary + 1 ? index : void 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tconst clones = committedMatches.map((match) => ({ ...match }));\n\t\tif (handoffAssetEnd !== void 0) clones[pendingBoundary]._assetEnd = handoffAssetEnd;\n\t\ttransferMatchResources(router, matches.splice(0, prefix, ...clones));\n\t\tfor (let index = prefix; index < matches.length; index++) {\n\t\t\tconst match = matches[index];\n\t\t\tconst hydrated = candidates[index];\n\t\t\tif (hydrated?.id === match.id && hydrated._ctx) match._ctx = hydrated._ctx;\n\t\t\tmatch.abortController = controller;\n\t\t}\n\t\treturn prefix;\n\t}];\n\trouter._committed = committedMatches;\n\trouter._lifecycleEnd = lifecycleEnd(committedMatches);\n\trouter._handoff = handoff;\n\trouter._preflight = void 0;\n\trouter.batch(() => {\n\t\trouter.stores.setMatches(presented);\n\t\trouter.stores.status.set(\"idle\");\n\t\tif (!needsClientLoad) router.stores.resolvedLocation.set(router.stores.location.get());\n\t});\n}\n//#endregion\nexport { _getAssetMatches, _getRenderedMatches, hydrate, loadClientRoute, loadRouteChunk, preloadClientRoute, refreshClientRoute, replaceRouteChunk };\n\n//# sourceMappingURL=load-client.js.map","//#region src/link.ts\nconst preloadWarning = \"Error preloading route! ☝️\";\n//#endregion\nexport { preloadWarning };\n\n//# sourceMappingURL=link.js.map","import { invariant } from \"./invariant.js\";\nimport { cleanPath, trimPathLeft, trimPathRight } from \"./path.js\";\nimport { notFound } from \"./not-found.js\";\nimport { rootRouteId } from \"./root.js\";\nimport { redirect } from \"./redirect.js\";\n//#region src/route.ts\nvar BaseRoute = class {\n\tget to() {\n\t\treturn this._to;\n\t}\n\tget id() {\n\t\treturn this._id;\n\t}\n\tget path() {\n\t\treturn this._path;\n\t}\n\tget fullPath() {\n\t\treturn this._fullPath;\n\t}\n\tconstructor(options) {\n\t\tthis.init = (originalIndex) => {\n\t\t\tthis.originalIndex = originalIndex;\n\t\t\tthis._branch = void 0;\n\t\t\tconst options = this.options;\n\t\t\tconst isRoot = !options?.path && !options?.id;\n\t\t\tthis.parentRoute = this.options.getParentRoute?.();\n\t\t\tif (isRoot) this._path = rootRouteId;\n\t\t\telse if (!this.parentRoute) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") throw new Error(`Invariant failed: Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.`);\n\t\t\t\tinvariant();\n\t\t\t}\n\t\t\tlet path = isRoot ? rootRouteId : options?.path;\n\t\t\tif (path && path !== \"/\") path = trimPathLeft(path);\n\t\t\tconst customId = options?.id || path;\n\t\t\tconst id = isRoot ? rootRouteId : cleanPath((this.parentRoute.id === \"__root__\" ? \"\" : this.parentRoute.id) + \"/\" + (customId ?? \"\"));\n\t\t\tif (path === \"__root__\") path = \"/\";\n\t\t\tconst fullPath = id === \"__root__\" ? \"/\" : path === void 0 ? this.parentRoute.fullPath : cleanPath(this.parentRoute.fullPath + \"/\" + path);\n\t\t\tthis._path = path;\n\t\t\tthis._id = id;\n\t\t\tthis._fullPath = fullPath;\n\t\t\tthis._to = trimPathRight(fullPath);\n\t\t};\n\t\tthis.addChildren = (children) => {\n\t\t\treturn this._addFileChildren(children);\n\t\t};\n\t\tthis._addFileChildren = (children) => {\n\t\t\tif (Array.isArray(children)) this.children = children;\n\t\t\tif (typeof children === \"object\" && children !== null) this.children = Object.values(children);\n\t\t\treturn this;\n\t\t};\n\t\tthis._addFileTypes = () => {\n\t\t\treturn this;\n\t\t};\n\t\tthis.updateLoader = (options) => {\n\t\t\tObject.assign(this.options, options);\n\t\t\treturn this;\n\t\t};\n\t\tthis.update = (options) => {\n\t\t\tObject.assign(this.options, options);\n\t\t\treturn this;\n\t\t};\n\t\tthis.lazy = (lazyFn) => {\n\t\t\tthis.lazyFn = lazyFn;\n\t\t\treturn this;\n\t\t};\n\t\tthis.redirect = (opts) => redirect({\n\t\t\tfrom: this.fullPath,\n\t\t\t...opts\n\t\t});\n\t\tthis.options = options || {};\n\t\tthis.isRoot = !options?.getParentRoute;\n\t\tif (options?.id && options?.path) throw new Error(`Route cannot have both an 'id' and a 'path' option.`);\n\t}\n};\nvar BaseRouteApi = class {\n\tconstructor({ id }) {\n\t\tthis.notFound = (opts) => {\n\t\t\treturn notFound({\n\t\t\t\trouteId: this.id,\n\t\t\t\t...opts\n\t\t\t});\n\t\t};\n\t\tthis.redirect = (opts) => redirect({\n\t\t\tfrom: this.id,\n\t\t\t...opts\n\t\t});\n\t\tthis.id = id;\n\t}\n};\nvar BaseRootRoute = class extends BaseRoute {\n\tconstructor(options) {\n\t\tsuper(options);\n\t}\n};\n//#endregion\nexport { BaseRootRoute, BaseRoute, BaseRouteApi };\n\n//# sourceMappingURL=route.js.map","\"use client\";\nimport { wrapInNonRouteComponentContext } from \"./nonRouteComponentContext.js\";\nimport * as React$1 from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\n//#region src/CatchBoundary.tsx\nvar CatchBoundary = class extends React$1.Component {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\tthis.state = { error: 0 };\n\t\tthis.reset = () => {\n\t\t\tthis.setState({ error: 0 });\n\t\t};\n\t}\n\tstatic getDerivedStateFromProps(props, state) {\n\t\tconst resetKey = props.getResetKey();\n\t\tif (state.error && state.resetKey !== resetKey) return {\n\t\t\tresetKey,\n\t\t\terror: 0\n\t\t};\n\t\treturn { resetKey };\n\t}\n\tstatic getDerivedStateFromError(error) {\n\t\treturn { error: [error] };\n\t}\n\tcomponentDidCatch(error, errorInfo) {\n\t\tthis.props.onCatch?.(error, errorInfo);\n\t}\n\trender() {\n\t\tconst error = this.state.error;\n\t\tif (error) {\n\t\t\tconst element = React$1.createElement(this.props.errorComponent ?? ErrorComponent, {\n\t\t\t\terror: error[0],\n\t\t\t\treset: this.reset\n\t\t\t});\n\t\t\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(element, \"errorComponent\") : element;\n\t\t}\n\t\treturn this.props.children;\n\t}\n};\nfunction ErrorComponent({ error }) {\n\tconst [show, setShow] = React$1.useState(process.env.NODE_ENV !== \"production\");\n\treturn /* @__PURE__ */ jsxs(\"div\", {\n\t\tstyle: {\n\t\t\tpadding: \".5rem\",\n\t\t\tmaxWidth: \"100%\"\n\t\t},\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ jsxs(\"div\", {\n\t\t\t\tstyle: {\n\t\t\t\t\tdisplay: \"flex\",\n\t\t\t\t\talignItems: \"center\",\n\t\t\t\t\tgap: \".5rem\"\n\t\t\t\t},\n\t\t\t\tchildren: [/* @__PURE__ */ jsx(\"strong\", {\n\t\t\t\t\tstyle: { fontSize: \"1rem\" },\n\t\t\t\t\tchildren: \"Something went wrong!\"\n\t\t\t\t}), /* @__PURE__ */ jsx(\"button\", {\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tappearance: \"none\",\n\t\t\t\t\t\tfontSize: \".6em\",\n\t\t\t\t\t\tborder: \"1px solid currentColor\",\n\t\t\t\t\t\tpadding: \".1rem .2rem\",\n\t\t\t\t\t\tfontWeight: \"bold\",\n\t\t\t\t\t\tborderRadius: \".25rem\"\n\t\t\t\t\t},\n\t\t\t\t\tonClick: () => setShow((d) => !d),\n\t\t\t\t\tchildren: show ? \"Hide Error\" : \"Show Error\"\n\t\t\t\t})]\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"div\", { style: { height: \".25rem\" } }),\n\t\t\tshow ? /* @__PURE__ */ jsx(\"div\", { children: /* @__PURE__ */ jsx(\"pre\", {\n\t\t\t\tstyle: {\n\t\t\t\t\tfontSize: \".7em\",\n\t\t\t\t\tborder: \"1px solid red\",\n\t\t\t\t\tborderRadius: \".25rem\",\n\t\t\t\t\tpadding: \".3rem\",\n\t\t\t\t\tcolor: \"red\",\n\t\t\t\t\toverflow: \"auto\"\n\t\t\t\t},\n\t\t\t\tchildren: error?.message ? /* @__PURE__ */ jsx(\"code\", { children: error.message }) : null\n\t\t\t}) }) : null\n\t\t]\n\t});\n}\n//#endregion\nexport { CatchBoundary, ErrorComponent };\n\n//# sourceMappingURL=CatchBoundary.js.map","\"use client\";\nimport React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/ClientOnly.tsx\nvar getSnapshot = () => true;\nvar getServerSnapshot = () => false;\n/**\n* Render the children only after the JS has loaded client-side. Use an optional\n* fallback component if the JS is not yet loaded.\n*\n* @example\n* Render a Chart component if JS loads, renders a simple FakeChart\n* component server-side or if there is no JS. The FakeChart can have only the\n* UI without the behavior or be a loading spinner or skeleton.\n*\n* ```tsx\n* return (\n* <ClientOnly fallback={<FakeChart />}>\n* <Chart />\n* </ClientOnly>\n* )\n* ```\n*/\nfunction ClientOnly({ children, fallback = null }) {\n\treturn /* @__PURE__ */ jsx(React.Fragment, { children: useHydrated() ? children : fallback });\n}\n/**\n* Return a boolean indicating if the JS has been hydrated already.\n* When doing Server-Side Rendering, the result will always be false.\n* When doing Client-Side Rendering, the result will always be false on the\n* first render and true from then on. Even if a new component renders it will\n* always start with true.\n*\n* @example\n* ```tsx\n* // Disable a button that needs JS to work.\n* let hydrated = useHydrated()\n* return (\n* <button type=\"button\" disabled={!hydrated} onClick={doSomethingCustom}>\n* Click me\n* </button>\n* )\n* ```\n* @returns True if the JS has been hydrated already, false otherwise.\n*/\nfunction useHydrated() {\n\treturn React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\nfunction subscribe() {\n\treturn () => {};\n}\n//#endregion\nexport { ClientOnly, useHydrated };\n\n//# sourceMappingURL=ClientOnly.js.map","\"use client\";\nimport * as React$1 from \"react\";\n//#region src/routerContext.tsx\nvar routerContext = React$1.createContext(null);\n//#endregion\nexport { routerContext };\n\n//# sourceMappingURL=routerContext.js.map","\"use client\";\nimport { routerContext } from \"./routerContext.js\";\nimport * as React$1 from \"react\";\n//#region src/useRouter.tsx\n/**\n* Access the current TanStack Router instance from React context.\n* Must be used within a `RouterProvider`.\n*\n* Options:\n* - `warn`: Log a warning if no router context is found (default: true).\n*\n* @returns The registered router instance.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useRouterHook\n*/\nfunction useRouter(opts) {\n\tconst value = React$1.useContext(routerContext);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif ((opts?.warn ?? true) && !value) console.warn(\"Warning: useRouter must be used inside a <RouterProvider> component!\");\n\t}\n\treturn value;\n}\n//#endregion\nexport { useRouter };\n\n//# sourceMappingURL=useRouter.js.map","\"use client\";\nimport * as React$1 from \"react\";\n//#region src/matchContext.tsx\nvar matchContext = React$1.createContext(void 0);\nvar dummyMatchContext = React$1.createContext(void 0);\n//#endregion\nexport { dummyMatchContext, matchContext };\n\n//# sourceMappingURL=matchContext.js.map","//#region src/alien.ts\nconst NONE = 0;\nconst MUTABLE = 1;\nconst WATCHING = 2;\nconst RECURSED_CHECK = 4;\nconst RECURSED = 8;\nconst DIRTY = 16;\nconst PENDING = 32;\n/* @__NO_SIDE_EFFECTS__ */\nfunction createReactiveSystem({ update, notify, unwatched }) {\n\treturn {\n\t\tlink,\n\t\tunlink,\n\t\tpropagate,\n\t\tcheckDirty,\n\t\tshallowPropagate\n\t};\n\tfunction link(dep, sub, version) {\n\t\tconst prevDep = sub.depsTail;\n\t\tif (prevDep !== void 0 && prevDep.dep === dep) return;\n\t\tconst nextDep = prevDep !== void 0 ? prevDep.nextDep : sub.deps;\n\t\tif (nextDep !== void 0 && nextDep.dep === dep) {\n\t\t\tnextDep.version = version;\n\t\t\tsub.depsTail = nextDep;\n\t\t\treturn;\n\t\t}\n\t\tconst prevSub = dep.subsTail;\n\t\tif (prevSub !== void 0 && prevSub.version === version && prevSub.sub === sub) return;\n\t\tconst newLink = sub.depsTail = dep.subsTail = {\n\t\t\tversion,\n\t\t\tdep,\n\t\t\tsub,\n\t\t\tprevDep,\n\t\t\tnextDep,\n\t\t\tprevSub,\n\t\t\tnextSub: void 0\n\t\t};\n\t\tif (nextDep !== void 0) nextDep.prevDep = newLink;\n\t\tif (prevDep !== void 0) prevDep.nextDep = newLink;\n\t\telse sub.deps = newLink;\n\t\tif (prevSub !== void 0) prevSub.nextSub = newLink;\n\t\telse dep.subs = newLink;\n\t}\n\tfunction unlink(link, sub = link.sub) {\n\t\tconst dep = link.dep;\n\t\tconst prevDep = link.prevDep;\n\t\tconst nextDep = link.nextDep;\n\t\tconst nextSub = link.nextSub;\n\t\tconst prevSub = link.prevSub;\n\t\tif (nextDep !== void 0) nextDep.prevDep = prevDep;\n\t\telse sub.depsTail = prevDep;\n\t\tif (prevDep !== void 0) prevDep.nextDep = nextDep;\n\t\telse sub.deps = nextDep;\n\t\tif (nextSub !== void 0) nextSub.prevSub = prevSub;\n\t\telse dep.subsTail = prevSub;\n\t\tif (prevSub !== void 0) prevSub.nextSub = nextSub;\n\t\telse if ((dep.subs = nextSub) === void 0) unwatched(dep);\n\t\treturn nextDep;\n\t}\n\tfunction propagate(link) {\n\t\tlet next = link.nextSub;\n\t\tlet stack;\n\t\ttop: do {\n\t\t\tconst sub = link.sub;\n\t\t\tlet flags = sub.flags;\n\t\t\tif (!(flags & 60)) sub.flags = flags | 32;\n\t\t\telse if (!(flags & (4 | 8))) flags = 0;\n\t\t\telse if (!(flags & 4)) sub.flags = flags & ~8 | 32;\n\t\t\telse if (!(flags & (16 | 32)) && isValidLink(link, sub)) {\n\t\t\t\tsub.flags = flags | (8 | 32);\n\t\t\t\tflags &= 1;\n\t\t\t} else flags = 0;\n\t\t\tif (flags & 2) notify(sub);\n\t\t\tif (flags & 1) {\n\t\t\t\tconst subSubs = sub.subs;\n\t\t\t\tif (subSubs !== void 0) {\n\t\t\t\t\tconst nextSub = (link = subSubs).nextSub;\n\t\t\t\t\tif (nextSub !== void 0) {\n\t\t\t\t\t\tstack = {\n\t\t\t\t\t\t\tvalue: next,\n\t\t\t\t\t\t\tprev: stack\n\t\t\t\t\t\t};\n\t\t\t\t\t\tnext = nextSub;\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((link = next) !== void 0) {\n\t\t\t\tnext = link.nextSub;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\twhile (stack !== void 0) {\n\t\t\t\tlink = stack.value;\n\t\t\t\tstack = stack.prev;\n\t\t\t\tif (link !== void 0) {\n\t\t\t\t\tnext = link.nextSub;\n\t\t\t\t\tcontinue top;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t} while (true);\n\t}\n\tfunction checkDirty(link, sub) {\n\t\tlet stack;\n\t\tlet checkDepth = 0;\n\t\tlet dirty = false;\n\t\ttop: do {\n\t\t\tconst dep = link.dep;\n\t\t\tconst flags = dep.flags;\n\t\t\tif (sub.flags & 16) dirty = true;\n\t\t\telse if ((flags & (1 | 16)) === (1 | 16)) {\n\t\t\t\tif (update(dep)) {\n\t\t\t\t\tconst subs = dep.subs;\n\t\t\t\t\tif (subs.nextSub !== void 0) shallowPropagate(subs);\n\t\t\t\t\tdirty = true;\n\t\t\t\t}\n\t\t\t} else if ((flags & (1 | 32)) === (1 | 32)) {\n\t\t\t\tif (link.nextSub !== void 0 || link.prevSub !== void 0) stack = {\n\t\t\t\t\tvalue: link,\n\t\t\t\t\tprev: stack\n\t\t\t\t};\n\t\t\t\tlink = dep.deps;\n\t\t\t\tsub = dep;\n\t\t\t\t++checkDepth;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!dirty) {\n\t\t\t\tconst nextDep = link.nextDep;\n\t\t\t\tif (nextDep !== void 0) {\n\t\t\t\t\tlink = nextDep;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (checkDepth--) {\n\t\t\t\tconst firstSub = sub.subs;\n\t\t\t\tconst hasMultipleSubs = firstSub.nextSub !== void 0;\n\t\t\t\tif (hasMultipleSubs) {\n\t\t\t\t\tlink = stack.value;\n\t\t\t\t\tstack = stack.prev;\n\t\t\t\t} else link = firstSub;\n\t\t\t\tif (dirty) {\n\t\t\t\t\tif (update(sub)) {\n\t\t\t\t\t\tif (hasMultipleSubs) shallowPropagate(firstSub);\n\t\t\t\t\t\tsub = link.sub;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tdirty = false;\n\t\t\t\t} else sub.flags &= ~32;\n\t\t\t\tsub = link.sub;\n\t\t\t\tconst nextDep = link.nextDep;\n\t\t\t\tif (nextDep !== void 0) {\n\t\t\t\t\tlink = nextDep;\n\t\t\t\t\tcontinue top;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dirty;\n\t\t} while (true);\n\t}\n\tfunction shallowPropagate(link) {\n\t\tdo {\n\t\t\tconst sub = link.sub;\n\t\t\tconst flags = sub.flags;\n\t\t\tif ((flags & (32 | 16)) === 32) {\n\t\t\t\tsub.flags = flags | 16;\n\t\t\t\tif ((flags & (2 | 4)) === 2) notify(sub);\n\t\t\t}\n\t\t} while ((link = link.nextSub) !== void 0);\n\t}\n\tfunction isValidLink(checkLink, sub) {\n\t\tlet link = sub.depsTail;\n\t\twhile (link !== void 0) {\n\t\t\tif (link === checkLink) return true;\n\t\t\tlink = link.prevDep;\n\t\t}\n\t\treturn false;\n\t}\n}\n\n//#endregion\nexport { createReactiveSystem };\n//# sourceMappingURL=alien.js.map","import { createReactiveSystem } from \"./alien.js\";\n\n//#region src/atom.ts\nfunction toObserver(nextHandler, errorHandler, completionHandler) {\n\tconst isObserver = typeof nextHandler === \"object\";\n\tconst self = isObserver ? nextHandler : void 0;\n\treturn {\n\t\tnext: (isObserver ? nextHandler.next : nextHandler)?.bind(self),\n\t\terror: (isObserver ? nextHandler.error : errorHandler)?.bind(self),\n\t\tcomplete: (isObserver ? nextHandler.complete : completionHandler)?.bind(self)\n\t};\n}\nconst queuedEffects = [];\nlet cycle = 0;\nconst { link, unlink, propagate, checkDirty, shallowPropagate } = /* @__PURE__ */ createReactiveSystem({\n\tupdate(atom) {\n\t\treturn atom._update();\n\t},\n\tnotify(effect) {\n\t\tqueuedEffects[queuedEffectsLength++] = effect;\n\t\teffect.flags &= ~2;\n\t},\n\tunwatched(atom) {\n\t\tif (atom.depsTail !== void 0) {\n\t\t\tatom.depsTail = void 0;\n\t\t\tatom.flags = 1 | 16;\n\t\t\tpurgeDeps(atom);\n\t\t}\n\t}\n});\nlet notifyIndex = 0;\nlet queuedEffectsLength = 0;\nlet activeSub;\nlet batchDepth = 0;\nfunction batch(fn) {\n\ttry {\n\t\t++batchDepth;\n\t\tfn();\n\t} finally {\n\t\tif (!--batchDepth) flush();\n\t}\n}\nfunction purgeDeps(sub) {\n\tconst depsTail = sub.depsTail;\n\tlet dep = depsTail !== void 0 ? depsTail.nextDep : sub.deps;\n\twhile (dep !== void 0) dep = unlink(dep, sub);\n}\nfunction flush() {\n\tif (batchDepth > 0) return;\n\twhile (notifyIndex < queuedEffectsLength) {\n\t\tconst effect = queuedEffects[notifyIndex];\n\t\tqueuedEffects[notifyIndex++] = void 0;\n\t\teffect.notify();\n\t}\n\tnotifyIndex = 0;\n\tqueuedEffectsLength = 0;\n}\nfunction createAsyncAtom(getValue, options) {\n\tconst ref = {};\n\tconst atom = createAtom(() => {\n\t\tgetValue().then((data) => {\n\t\t\tconst internalAtom = ref.current;\n\t\t\tif (internalAtom._update({\n\t\t\t\tstatus: \"done\",\n\t\t\t\tdata\n\t\t\t})) {\n\t\t\t\tconst subs = internalAtom.subs;\n\t\t\t\tif (subs !== void 0) {\n\t\t\t\t\tpropagate(subs);\n\t\t\t\t\tshallowPropagate(subs);\n\t\t\t\t\tflush();\n\t\t\t\t}\n\t\t\t}\n\t\t}, (error) => {\n\t\t\tconst internalAtom = ref.current;\n\t\t\tif (internalAtom._update({\n\t\t\t\tstatus: \"error\",\n\t\t\t\terror\n\t\t\t})) {\n\t\t\t\tconst subs = internalAtom.subs;\n\t\t\t\tif (subs !== void 0) {\n\t\t\t\t\tpropagate(subs);\n\t\t\t\t\tshallowPropagate(subs);\n\t\t\t\t\tflush();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn { status: \"pending\" };\n\t}, options);\n\tref.current = atom;\n\treturn atom;\n}\nfunction createAtom(valueOrFn, options) {\n\tconst isComputed = typeof valueOrFn === \"function\";\n\tconst getter = valueOrFn;\n\tconst atom = {\n\t\t_snapshot: isComputed ? void 0 : valueOrFn,\n\t\tsubs: void 0,\n\t\tsubsTail: void 0,\n\t\tdeps: void 0,\n\t\tdepsTail: void 0,\n\t\tflags: isComputed ? 0 : 1,\n\t\tget() {\n\t\t\tif (activeSub !== void 0) link(atom, activeSub, cycle);\n\t\t\treturn atom._snapshot;\n\t\t},\n\t\tsubscribe(observerOrFn) {\n\t\t\tconst obs = toObserver(observerOrFn);\n\t\t\tconst observed = { current: false };\n\t\t\tconst e = effect(() => {\n\t\t\t\tatom.get();\n\t\t\t\tif (!observed.current) observed.current = true;\n\t\t\t\telse obs.next?.(atom._snapshot);\n\t\t\t});\n\t\t\treturn { unsubscribe: () => {\n\t\t\t\te.stop();\n\t\t\t} };\n\t\t},\n\t\t_update(getValue) {\n\t\t\tconst prevSub = activeSub;\n\t\t\tconst compare = options?.compare ?? Object.is;\n\t\t\tif (isComputed) {\n\t\t\t\tactiveSub = atom;\n\t\t\t\t++cycle;\n\t\t\t\tatom.depsTail = void 0;\n\t\t\t} else if (getValue === void 0) return false;\n\t\t\tif (isComputed) atom.flags = 1 | 4;\n\t\t\ttry {\n\t\t\t\tconst oldValue = atom._snapshot;\n\t\t\t\tconst newValue = typeof getValue === \"function\" ? getValue(oldValue) : getValue === void 0 && isComputed ? getter(oldValue) : getValue;\n\t\t\t\tif (oldValue === void 0 || !compare(oldValue, newValue)) {\n\t\t\t\t\tatom._snapshot = newValue;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} finally {\n\t\t\t\tactiveSub = prevSub;\n\t\t\t\tif (isComputed) atom.flags &= ~4;\n\t\t\t\tpurgeDeps(atom);\n\t\t\t}\n\t\t}\n\t};\n\tif (isComputed) {\n\t\tatom.flags = 1 | 16;\n\t\tatom.get = function() {\n\t\t\tconst flags = atom.flags;\n\t\t\tif (flags & 16 || flags & 32 && checkDirty(atom.deps, atom)) {\n\t\t\t\tif (atom._update()) {\n\t\t\t\t\tconst subs = atom.subs;\n\t\t\t\t\tif (subs !== void 0) shallowPropagate(subs);\n\t\t\t\t}\n\t\t\t} else if (flags & 32) atom.flags = flags & ~32;\n\t\t\tif (activeSub !== void 0) link(atom, activeSub, cycle);\n\t\t\treturn atom._snapshot;\n\t\t};\n\t} else atom.set = function(valueOrFn) {\n\t\tif (atom._update(valueOrFn)) {\n\t\t\tconst subs = atom.subs;\n\t\t\tif (subs !== void 0) {\n\t\t\t\tpropagate(subs);\n\t\t\t\tshallowPropagate(subs);\n\t\t\t\tflush();\n\t\t\t}\n\t\t}\n\t};\n\treturn atom;\n}\nfunction effect(fn) {\n\tconst run = () => {\n\t\tconst prevSub = activeSub;\n\t\tactiveSub = effectObj;\n\t\t++cycle;\n\t\teffectObj.depsTail = void 0;\n\t\teffectObj.flags = 2 | 4;\n\t\ttry {\n\t\t\treturn fn();\n\t\t} finally {\n\t\t\tactiveSub = prevSub;\n\t\t\teffectObj.flags &= ~4;\n\t\t\tpurgeDeps(effectObj);\n\t\t}\n\t};\n\tconst effectObj = {\n\t\tdeps: void 0,\n\t\tdepsTail: void 0,\n\t\tsubs: void 0,\n\t\tsubsTail: void 0,\n\t\tflags: 2 | 4,\n\t\tnotify() {\n\t\t\tconst flags = this.flags;\n\t\t\tif (flags & 16 || flags & 32 && checkDirty(this.deps, this)) run();\n\t\t\telse this.flags = 2;\n\t\t},\n\t\tstop() {\n\t\t\tthis.flags = 0;\n\t\t\tthis.depsTail = void 0;\n\t\t\tpurgeDeps(this);\n\t\t}\n\t};\n\trun();\n\treturn effectObj;\n}\n\n//#endregion\nexport { batch, createAsyncAtom, createAtom, flush, toObserver };\n//# sourceMappingURL=atom.js.map","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n","import { useCallback } from \"react\";\nimport { useSyncExternalStoreWithSelector } from \"use-sync-external-store/shim/with-selector\";\n\n//#region src/useSelector.ts\nfunction defaultCompare(a, b) {\n\treturn a === b;\n}\n/**\n* Selects a slice of state from an atom or store and subscribes the component\n* to that selection.\n*\n* This is the primary React read hook for TanStack Store. It works with any\n* source that exposes `get()` and `subscribe()`, including atoms, readonly\n* atoms, stores, and readonly stores.\n*\n* Omit the selector to subscribe to the whole value.\n*\n* @example\n* ```tsx\n* const count = useSelector(counterStore, (state) => state.count)\n* ```\n*\n* @example\n* ```tsx\n* const value = useSelector(countAtom)\n* ```\n*/\nfunction useSelector(source, selector = (s) => s, options) {\n\tconst compare = options?.compare ?? defaultCompare;\n\tconst subscribe = useCallback((handleStoreChange) => {\n\t\tconst { unsubscribe } = source.subscribe(handleStoreChange);\n\t\treturn unsubscribe;\n\t}, [source]);\n\tconst getSnapshot = useCallback(() => source.get(), [source]);\n\treturn useSyncExternalStoreWithSelector(subscribe, getSnapshot, getSnapshot, selector, compare);\n}\n\n//#endregion\nexport { useSelector };\n//# sourceMappingURL=useSelector.js.map","\"use client\";\nimport { dummyMatchContext, matchContext } from \"./matchContext.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { invariant, replaceEqualDeep } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { useSelector } from \"@tanstack/react-store\";\n//#region src/useMatch.tsx\nvar dummyMatch = {};\nfunction useStructuralSharing(opts, router) {\n\tconst previousResult = React$1.useRef();\n\treturn (slice) => {\n\t\tconst selected = opts?.select ? opts.select(slice) : slice;\n\t\tif (opts?.structuralSharing ?? router.options.defaultStructuralSharing) return previousResult.current = replaceEqualDeep(previousResult.current, selected);\n\t\treturn selected;\n\t};\n}\n/**\n* Read and select the nearest or targeted route match.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useMatchHook\n*/\nfunction useMatch(opts) {\n\tconst router = useRouter();\n\tconst nearestRouteId = React$1.useContext(opts.from ? dummyMatchContext : matchContext);\n\tconst routeId = opts.from ?? nearestRouteId;\n\tconst matchStore = router.stores.getMatchStore(routeId);\n\tif (isServer ?? router.isServer) {\n\t\tconst match = matchStore.get();\n\t\tif (!match) {\n\t\t\tif (opts.shouldThrow ?? true) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") throw new Error(`Invariant failed: Could not find ${opts.from ? `an active match from \"${opts.from}\"` : \"a nearest match!\"}`);\n\t\t\t\tinvariant();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\treturn opts.select ? opts.select(match) : match;\n\t}\n\tconst selector = useStructuralSharing(opts, router);\n\tconst matchSelection = useSelector(matchStore, (match) => match ? selector(match) : dummyMatch);\n\tif (matchSelection !== dummyMatch) return matchSelection;\n\tif (opts.shouldThrow ?? true) {\n\t\tif (process.env.NODE_ENV !== \"production\") throw new Error(`Invariant failed: Could not find ${opts.from ? `an active match from \"${opts.from}\"` : \"a nearest match!\"}`);\n\t\tinvariant();\n\t}\n}\n//#endregion\nexport { useMatch, useStructuralSharing };\n\n//# sourceMappingURL=useMatch.js.map","import { useMatch } from \"./useMatch.js\";\n//#region src/useLoaderData.tsx\n/**\n* Read and select the current route's loader data with type‑safety.\n*\n* Options:\n* - `from`/`strict`: Choose which route's data to read and strictness\n* - `select`: Map the loader data to a derived value\n* - `structuralSharing`: Enable structural sharing for stable references\n*\n* @returns The loader data (or selected value) for the matched route.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLoaderDataHook\n*/\nfunction useLoaderData(opts) {\n\treturn useMatch({\n\t\tfrom: opts.from,\n\t\tstrict: opts.strict,\n\t\tstructuralSharing: opts.structuralSharing,\n\t\tselect: (match) => {\n\t\t\treturn opts.select ? opts.select(match.loaderData) : match.loaderData;\n\t\t}\n\t});\n}\n//#endregion\nexport { useLoaderData };\n\n//# sourceMappingURL=useLoaderData.js.map","import { useMatch } from \"./useMatch.js\";\n//#region src/useLoaderDeps.tsx\n/**\n* Read and select the current route's loader dependencies object.\n*\n* Options:\n* - `from`: Choose which route's loader deps to read\n* - `select`: Map the deps to a derived value\n* - `structuralSharing`: Enable structural sharing for stable references\n*\n* @returns The loader deps (or selected value) for the matched route.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLoaderDepsHook\n*/\nfunction useLoaderDeps(opts) {\n\tconst { select, ...rest } = opts;\n\treturn useMatch({\n\t\t...rest,\n\t\tselect: (match) => {\n\t\t\treturn select ? select(match.loaderDeps) : match.loaderDeps;\n\t\t}\n\t});\n}\n//#endregion\nexport { useLoaderDeps };\n\n//# sourceMappingURL=useLoaderDeps.js.map","import { useMatch } from \"./useMatch.js\";\n//#region src/useParams.tsx\n/**\n* Access the current route's path parameters with type-safety.\n*\n* Options:\n* - `from`/`strict`: Specify the matched route and whether to enforce strict typing\n* - `select`: Project the params object to a derived value for memoized renders\n* - `structuralSharing`: Enable structural sharing for stable references\n* - `shouldThrow`: Throw if the route is not found in strict contexts\n*\n* @returns The params object (or selected value) for the matched route.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useParamsHook\n*/\nfunction useParams(opts) {\n\treturn useMatch({\n\t\tfrom: opts.from,\n\t\tshouldThrow: opts.shouldThrow,\n\t\tstructuralSharing: opts.structuralSharing,\n\t\tstrict: opts.strict,\n\t\tselect: (match) => {\n\t\t\tconst params = opts.strict === false ? match.params : match._strictParams;\n\t\t\treturn opts.select ? opts.select(params) : params;\n\t\t}\n\t});\n}\n//#endregion\nexport { useParams };\n\n//# sourceMappingURL=useParams.js.map","import { useMatch } from \"./useMatch.js\";\n//#region src/useSearch.tsx\n/**\n* Read and select the current route's search parameters with type-safety.\n*\n* Options:\n* - `from`/`strict`: Control which route's search is read and how strictly it's typed\n* - `select`: Map the search object to a derived value for render optimization\n* - `structuralSharing`: Enable structural sharing for stable references\n* - `shouldThrow`: Throw when the route is not found (strict contexts)\n*\n* @returns The search object (or selected value) for the matched route.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useSearchHook\n*/\nfunction useSearch(opts) {\n\treturn useMatch({\n\t\tfrom: opts.from,\n\t\tstrict: opts.strict,\n\t\tshouldThrow: opts.shouldThrow,\n\t\tstructuralSharing: opts.structuralSharing,\n\t\tselect: (match) => {\n\t\t\treturn opts.select ? opts.select(match.search) : match.search;\n\t\t}\n\t});\n}\n//#endregion\nexport { useSearch };\n\n//# sourceMappingURL=useSearch.js.map","\"use client\";\nimport { useLayoutEffect } from \"./utils.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport * as React$1 from \"react\";\n//#region src/useNavigate.tsx\n/**\n* Imperative navigation hook.\n*\n* Returns a stable `navigate(options)` function to change the current location\n* programmatically. Prefer the `Link` component for user-initiated navigation,\n* and use this hook from effects, callbacks, or handlers where imperative\n* navigation is required.\n*\n* Options:\n* - `from`: Optional route base used to resolve relative `to` paths.\n*\n* @returns A function that accepts `NavigateOptions`.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useNavigateHook\n*/\nfunction useNavigate(_defaultOpts) {\n\tconst router = useRouter();\n\treturn React$1.useCallback((options) => {\n\t\treturn router.navigate({\n\t\t\t...options,\n\t\t\tfrom: options.from ?? _defaultOpts?.from\n\t\t});\n\t}, [_defaultOpts?.from, router]);\n}\n/**\n* Component that triggers a navigation when rendered. Navigation executes\n* in an effect after mount/update.\n*\n* Props are the same as `NavigateOptions` used by `navigate()`.\n*\n* @returns null\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/navigateComponent\n*/\nfunction Navigate(props) {\n\tconst router = useRouter();\n\tconst navigate = useNavigate();\n\tconst previousPropsRef = React$1.useRef(null);\n\tuseLayoutEffect(() => {\n\t\tif (previousPropsRef.current !== props) {\n\t\t\tnavigate(props);\n\t\t\tpreviousPropsRef.current = props;\n\t\t}\n\t}, [\n\t\trouter,\n\t\tprops,\n\t\tnavigate\n\t]);\n\treturn null;\n}\n//#endregion\nexport { Navigate, useNavigate };\n\n//# sourceMappingURL=useNavigate.js.map","import { useMatch } from \"./useMatch.js\";\n//#region src/useRouteContext.ts\nfunction useRouteContext(opts) {\n\treturn useMatch({\n\t\t...opts,\n\t\tselect: (match) => opts.select ? opts.select(match.context) : match.context\n\t});\n}\n//#endregion\nexport { useRouteContext };\n\n//# sourceMappingURL=useRouteContext.js.map","\"use client\";\nimport { useHydrated } from \"./ClientOnly.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { deepEqual, functionalUpdate, getUrlScheme, isDangerousProtocol, preloadWarning, removeTrailingSlash } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useSelector } from \"@tanstack/react-store\";\n//#region src/link.tsx\nfunction useStableValues(...values) {\n\tconst ref = React$1.useRef(values);\n\tconst stable = ref.current;\n\tvalues.forEach((value, index) => {\n\t\tif (!deepEqual(stable[index], value, { ignoreUndefined: false })) stable[index] = value;\n\t});\n\treturn ref.current;\n}\nfunction preloadLink(router, options) {\n\trouter.preloadRoute(options).catch((err) => {\n\t\tconsole.warn(err);\n\t\tconsole.warn(preloadWarning);\n\t});\n}\nvar LINK_SELECTOR_OPTIONS = { compare: (a, b) => a[0] === b[0] && a[1] === b[1] };\nfunction resolveExternalLink(to, protocolAllowlist) {\n\tconst scheme = typeof to === \"string\" && getUrlScheme(to);\n\tif (!scheme) return;\n\tif (!protocolAllowlist.has(scheme)) {\n\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Blocked Link with dangerous protocol: ${to}`);\n\t\treturn null;\n\t}\n\treturn to;\n}\nfunction resolveIsActive(location, next, activeOptions, basepath, isHydrated) {\n\tconst currentPath = removeTrailingSlash(location.pathname, basepath);\n\tconst nextPath = removeTrailingSlash(next.pathname, basepath);\n\tif (activeOptions?.exact ? currentPath !== nextPath : !(currentPath.startsWith(nextPath) && (currentPath.length === nextPath.length || currentPath[nextPath.length] === \"/\"))) return false;\n\tif (activeOptions?.includeSearch ?? true) {\n\t\tif (!deepEqual(location.search, next.search, {\n\t\t\tpartial: !activeOptions?.exact,\n\t\t\tignoreUndefined: !activeOptions?.explicitUndefined\n\t\t})) return false;\n\t}\n\tif (activeOptions?.includeHash) return isHydrated && location.hash === next.hash;\n\treturn true;\n}\n/**\n* Build anchor-like props for declarative navigation and preloading.\n*\n* Returns stable `href`, event handlers and accessibility props derived from\n* router options and active state. Used internally by `Link` and custom links.\n*\n* Options cover `to`, `params`, `search`, `hash`, `state`, `preload`,\n* `activeProps`, `inactiveProps`, and more.\n*\n* @returns React anchor props suitable for `<a>` or custom components.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLinkPropsHook\n*/\nfunction useLinkProps(options, forwardedRef) {\n\treturn useLinkPropsFor(options, forwardedRef);\n}\nfunction useLinkPropsFor(options, forwardedRef, host) {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) return getServerLinkProps(router, options, forwardedRef, host);\n\tconst innerRef = React$1.useRef(null);\n\tconst mergedRef = React$1.useCallback((element) => {\n\t\tinnerRef.current = element;\n\t\tif (typeof forwardedRef === \"function\") return forwardedRef(element);\n\t\tif (forwardedRef) forwardedRef.current = element;\n\t}, [forwardedRef]);\n\tconst { activeOptions, to, preload: userPreload, preloadDelay: userPreloadDelay, hashScrollIntoView, replace, startTransition, resetScroll, viewTransition, ignoreBlocker, disabled, target, onClick, onBlur, onFocus, onMouseEnter, onMouseLeave, onTouchStart } = options;\n\tconst isHydrated = useHydrated();\n\tconst [stableSearch, stableParams, stableActiveOptions] = useStableValues(options.search, options.params, activeOptions);\n\tconst [_options, dest] = React$1.useMemo(() => [options, { ...options }], [\n\t\trouter,\n\t\toptions.from,\n\t\toptions._fromLocation,\n\t\toptions.hash,\n\t\toptions.to,\n\t\tstableSearch,\n\t\tstableParams,\n\t\toptions.state,\n\t\toptions.mask,\n\t\toptions.unsafeRelative\n\t]);\n\tconst selectLinkState = React$1.useCallback((location) => {\n\t\tconst directExternalLink = resolveExternalLink(to, router.protocolAllowlist);\n\t\tif (directExternalLink !== void 0) return [directExternalLink ?? void 0];\n\t\tif (!_options._fromLocation) dest._fromLocation = location;\n\t\tconst next = router.buildLocation(dest);\n\t\tconst hrefOption = getHrefOption(next, router, disabled);\n\t\treturn [hrefOption, !disabled && (!hrefOption || getUrlScheme(hrefOption)) ? void 0 : resolveIsActive(location, next, stableActiveOptions, router.basepath, isHydrated)];\n\t}, [\n\t\tstableActiveOptions,\n\t\tdisabled,\n\t\tisHydrated,\n\t\t_options,\n\t\tdest,\n\t\trouter,\n\t\tto\n\t]);\n\tconst [href, isActive] = useSelector(router.stores.location, selectLinkState, LINK_SELECTOR_OPTIONS);\n\tconst externalLink = isActive === void 0 ? href : void 0;\n\tconst linkDisabled = disabled || href === void 0;\n\tconst hasRenderFetched = React$1.useRef(false);\n\tconst preload = options.reloadDocument || externalLink || linkDisabled ? false : userPreload ?? router.options.defaultPreload;\n\tconst preloadDelay = userPreloadDelay ?? router.options.defaultPreloadDelay ?? 0;\n\tconst enqueuePreload = React$1.useCallback((e) => {\n\t\tconst isIntersecting = e?.isIntersecting;\n\t\tif (!(isIntersecting ?? preload === \"intent\")) {\n\t\t\tif (isIntersecting === false) cancelPreload(innerRef);\n\t\t\treturn;\n\t\t}\n\t\tif (!preloadDelay) {\n\t\t\tpreloadLink(router, _options);\n\t\t\treturn;\n\t\t}\n\t\tif (timeoutMap.has(innerRef)) return;\n\t\ttimeoutMap.set(innerRef, setTimeout(() => {\n\t\t\ttimeoutMap.delete(innerRef);\n\t\t\tpreloadLink(router, _options);\n\t\t}, preloadDelay));\n\t}, [\n\t\trouter,\n\t\t_options,\n\t\tinnerRef,\n\t\tpreload,\n\t\tpreloadDelay\n\t]);\n\tReact$1.useEffect(() => {\n\t\tif (preload === \"render\" && !hasRenderFetched.current) {\n\t\t\thasRenderFetched.current = true;\n\t\t\tpreloadLink(router, _options);\n\t\t}\n\t\tlet observer;\n\t\tif (preload === \"viewport\" && innerRef.current && typeof IntersectionObserver === \"function\") {\n\t\t\tobserver = new IntersectionObserver((entries) => enqueuePreload(entries.pop()), { rootMargin: \"100px\" });\n\t\t\tobserver.observe(innerRef.current);\n\t\t}\n\t\treturn () => {\n\t\t\tobserver?.disconnect();\n\t\t\tcancelPreload(innerRef);\n\t\t};\n\t}, [\n\t\trouter,\n\t\t_options,\n\t\tpreload,\n\t\tenqueuePreload,\n\t\tinnerRef\n\t]);\n\tconst props = collectElementProps(options, host);\n\tprops.ref = forwardedRef ? mergedRef : innerRef;\n\tif (externalLink) {\n\t\tprops.href = externalLink;\n\t\treturn props;\n\t}\n\tconst handleClick = (e) => {\n\t\tconst effectiveTarget = target ?? e.currentTarget.getAttribute(\"target\");\n\t\tif (!linkDisabled && !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && (!effectiveTarget || effectiveTarget === \"_self\") && e.button === 0) {\n\t\t\te.preventDefault();\n\t\t\trouter.navigate({\n\t\t\t\t..._options,\n\t\t\t\treplace,\n\t\t\t\tresetScroll,\n\t\t\t\thashScrollIntoView,\n\t\t\t\tstartTransition,\n\t\t\t\tviewTransition,\n\t\t\t\tignoreBlocker\n\t\t\t});\n\t\t}\n\t};\n\tconst handleTouchStart = () => {\n\t\tif (preload === \"intent\") preloadLink(router, _options);\n\t};\n\tconst handleLeave = () => {\n\t\tif (preload === \"intent\") cancelPreload(innerRef);\n\t};\n\tprops.onClick = composeHandlers(onClick, handleClick);\n\tprops.onBlur = composeHandlers(onBlur, handleLeave);\n\tprops.onFocus = composeHandlers(onFocus, enqueuePreload);\n\tprops.onMouseEnter = composeHandlers(onMouseEnter, enqueuePreload);\n\tprops.onMouseLeave = composeHandlers(onMouseLeave, handleLeave);\n\tprops.onTouchStart = composeHandlers(onTouchStart, handleTouchStart);\n\treturn applyLinkState(props, options, isActive, href, linkDisabled, host);\n}\nvar STATIC_EMPTY_OBJECT = {};\nvar STATIC_ACTIVE_OBJECT = { className: \"active\" };\nvar ROUTER_OPTION_KEYS = /* @__PURE__ */ new Set([\n\t\"to\",\n\t\"params\",\n\t\"search\",\n\t\"hash\",\n\t\"state\",\n\t\"mask\",\n\t\"from\",\n\t\"unsafeRelative\",\n\t\"_fromLocation\",\n\t\"reloadDocument\",\n\t\"preload\",\n\t\"preloadDelay\",\n\t\"preloadIntentProximity\",\n\t\"hashScrollIntoView\",\n\t\"replace\",\n\t\"startTransition\",\n\t\"resetScroll\",\n\t\"viewTransition\",\n\t\"ignoreBlocker\",\n\t\"activeProps\",\n\t\"inactiveProps\",\n\t\"activeOptions\",\n\t\"_asChild\"\n]);\nfunction collectElementProps(options, host) {\n\tconst props = {};\n\tfor (const key in options) {\n\t\tif (ROUTER_OPTION_KEYS.has(key) || key === \"type\" && host !== void 0 || key === \"disabled\" && host === \"a\") continue;\n\t\tprops[key] = options[key];\n\t}\n\treturn props;\n}\nfunction applyLinkState(props, options, isActive, href, linkDisabled, host) {\n\tconst { activeProps, inactiveProps, className, style, target } = options;\n\tconst stateProps = functionalUpdate(isActive ? activeProps : inactiveProps, {}) ?? (isActive ? STATIC_ACTIVE_OBJECT : STATIC_EMPTY_OBJECT);\n\tObject.assign(props, stateProps);\n\tprops.href = href;\n\tif (host !== \"a\") props.disabled = linkDisabled;\n\tprops.target = target;\n\tconst stateStyle = stateProps.style;\n\tif (style || stateStyle) props.style = style && stateStyle ? {\n\t\t...style,\n\t\t...stateStyle\n\t} : style || stateStyle;\n\tconst stateClassName = stateProps.className;\n\tif (className || stateClassName) props.className = className ? stateClassName ? `${className} ${stateClassName}` : className : stateClassName;\n\tif (linkDisabled) {\n\t\tprops.role = \"link\";\n\t\tprops[\"aria-disabled\"] = true;\n\t}\n\tif (isActive) {\n\t\tprops[\"data-status\"] = \"active\";\n\t\tprops[\"aria-current\"] = \"page\";\n\t}\n\treturn props;\n}\nfunction getServerLinkProps(router, options, forwardedRef, host) {\n\tconst { to, disabled, activeOptions } = options;\n\tconst directExternalLink = resolveExternalLink(to, router.protocolAllowlist);\n\tconst next = directExternalLink === void 0 ? router.buildLocation(options) : void 0;\n\tconst hrefOption = next ? getHrefOption(next, router, disabled) : directExternalLink ?? void 0;\n\tconst linkDisabled = disabled || !hrefOption;\n\tconst externalLink = directExternalLink ?? (hrefOption && getUrlScheme(hrefOption) ? hrefOption : void 0);\n\tconst props = collectElementProps(options, host);\n\tprops.ref = forwardedRef;\n\tif (externalLink) {\n\t\tprops.href = externalLink;\n\t\treturn props;\n\t}\n\treturn applyLinkState(props, options, !!next && !(!disabled && !hrefOption) && resolveIsActive(router.stores.location.get(), next, activeOptions, router.basepath, false), hrefOption, linkDisabled, host);\n}\nvar timeoutMap = /* @__PURE__ */ new WeakMap();\nvar cancelPreload = (eventTarget) => {\n\tclearTimeout(timeoutMap.get(eventTarget));\n\ttimeoutMap.delete(eventTarget);\n};\nvar composeHandlers = (first, second) => {\n\tif (!first) return second;\n\treturn (event) => event.defaultPrevented || (first(event), event.defaultPrevented || second(event));\n};\nfunction getHrefOption(next, router, disabled) {\n\tif (disabled) return;\n\tconst location = next.maskedLocation ?? next;\n\tconst href = location.external ? location.publicHref : router.history.createHref(location.publicHref) || \"/\";\n\tif ((location.external || href !== location.publicHref) && isDangerousProtocol(href, router.protocolAllowlist)) {\n\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Blocked Link with dangerous protocol: ${href}`);\n\t\treturn;\n\t}\n\treturn href;\n}\n/**\n* Creates a typed Link-like component that preserves TanStack Router's\n* navigation semantics and type-safety while delegating rendering to the\n* provided host component.\n*\n* Useful for integrating design system anchors/buttons while keeping\n* router-aware props (eg. `to`, `params`, `search`, `preload`).\n*\n* @param Comp The host component to render (eg. a design-system Link/Button)\n* @returns A router-aware component with the same API as `Link`.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-link\n*/\nfunction createLink(Comp) {\n\treturn React$1.forwardRef(function CreatedLink(props, ref) {\n\t\treturn /* @__PURE__ */ jsx(Link, {\n\t\t\t...props,\n\t\t\t_asChild: Comp,\n\t\t\tref\n\t\t});\n\t});\n}\n/**\n* A strongly-typed anchor component for declarative navigation.\n* Handles path, search, hash and state updates with optional route preloading\n* and active-state styling.\n*\n* Props:\n* - `preload`: Controls route preloading (eg. 'intent', 'render', 'viewport', true/false)\n* - `preloadDelay`: Delay in ms before preloading on focus, hover, or viewport entry\n* - `activeProps`/`inactiveProps`: Additional props merged when link is active/inactive\n* - `resetScroll`/`hashScrollIntoView`: Control scroll behavior on navigation\n* - `viewTransition`/`startTransition`: Use View Transitions/React transitions for navigation\n* - `ignoreBlocker`: Bypass registered blockers\n*\n* @returns An anchor-like element that navigates without full page reloads.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/linkComponent\n*/\nvar Link = React$1.memo(React$1.forwardRef((props, ref) => {\n\tconst host = props._asChild || \"a\";\n\tconst linkProps = useLinkPropsFor(props, ref, host);\n\tconst children = typeof props.children === \"function\" ? props.children({ isActive: linkProps[\"data-status\"] === \"active\" }) : props.children;\n\treturn React$1.createElement(host, linkProps, children);\n}), areLinkPropsEqual);\nfunction areLinkPropsEqual(prev, next) {\n\tlet extraKeys = 0;\n\tfor (const key in next) {\n\t\textraKeys++;\n\t\tif (prev[key] === next[key]) continue;\n\t\tif (!ROUTER_OPTION_KEYS.has(key) || !deepEqual(prev[key], next[key], { ignoreUndefined: false })) return false;\n\t}\n\tfor (const _key in prev) extraKeys--;\n\treturn extraKeys === 0;\n}\n/**\n* Validate and reuse navigation options for `Link`, `navigate` or `redirect`.\n* Accepts a literal options object and returns it typed for later spreading.\n* @example\n* const opts = linkOptions({ to: '/dashboard', search: { tab: 'home' } })\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/linkOptions\n*/\nvar linkOptions = (options) => {\n\treturn options;\n};\n/**\n* Type-check a literal object for use with `Link`, `navigate` or `redirect`.\n* Use to validate and reuse navigation options across your app.\n* @example\n* const opts = linkOptions({ to: '/dashboard', search: { tab: 'home' } })\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/linkOptions\n*/\n//#endregion\nexport { Link, createLink, linkOptions, useLinkProps };\n\n//# sourceMappingURL=link.js.map","import { useRouter } from \"./useRouter.js\";\nimport { useMatch } from \"./useMatch.js\";\nimport { useLoaderData } from \"./useLoaderData.js\";\nimport { useLoaderDeps } from \"./useLoaderDeps.js\";\nimport { useParams } from \"./useParams.js\";\nimport { useSearch } from \"./useSearch.js\";\nimport { useNavigate } from \"./useNavigate.js\";\nimport { useRouteContext } from \"./useRouteContext.js\";\nimport { Link } from \"./link.js\";\nimport { BaseRootRoute, BaseRoute, BaseRouteApi, notFound } from \"@tanstack/router-core\";\nimport React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/route.tsx\n/**\n* Returns a route-specific API that exposes type-safe hooks pre-bound\n* to a single route ID. Useful for consuming a route's APIs from files\n* where the route object isn't directly imported (e.g. code-split files).\n*\n* @param id Route ID string literal for the target route.\n* @returns A `RouteApi` instance bound to the given route ID.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/getRouteApiFunction\n*/\nfunction getRouteApi(id) {\n\treturn new RouteApi({ id });\n}\nvar RouteApi = class extends BaseRouteApi {\n\t/**\n\t* @deprecated Use the `getRouteApi` function instead.\n\t*/\n\tconstructor({ id }) {\n\t\tsuper({ id });\n\t\tthis.useMatch = (opts) => {\n\t\t\treturn useMatch({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useRouteContext = (opts) => {\n\t\t\treturn useRouteContext({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useSearch = (opts) => {\n\t\t\treturn useSearch({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useParams = (opts) => {\n\t\t\treturn useParams({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderDeps = (opts) => {\n\t\t\treturn useLoaderDeps({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id,\n\t\t\t\tstrict: false\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderData = (opts) => {\n\t\t\treturn useLoaderData({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id,\n\t\t\t\tstrict: false\n\t\t\t});\n\t\t};\n\t\tthis.useNavigate = () => {\n\t\t\treturn useNavigate({ from: useRouter().routesById[this.id].fullPath });\n\t\t};\n\t\tthis.notFound = (opts) => {\n\t\t\treturn notFound({\n\t\t\t\trouteId: this.id,\n\t\t\t\t...opts\n\t\t\t});\n\t\t};\n\t\tthis.Link = React.forwardRef((props, ref) => {\n\t\t\tconst fullPath = useRouter().routesById[this.id].fullPath;\n\t\t\treturn /* @__PURE__ */ jsx(Link, {\n\t\t\t\tref,\n\t\t\t\tfrom: fullPath,\n\t\t\t\t...props\n\t\t\t});\n\t\t});\n\t}\n};\nvar Route = class extends BaseRoute {\n\t/**\n\t* @deprecated Use the `createRoute` function instead.\n\t*/\n\tconstructor(options) {\n\t\tsuper(options);\n\t\tthis.useMatch = (opts) => {\n\t\t\treturn useMatch({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useRouteContext = (opts) => {\n\t\t\treturn useRouteContext({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useSearch = (opts) => {\n\t\t\treturn useSearch({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useParams = (opts) => {\n\t\t\treturn useParams({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderDeps = (opts) => {\n\t\t\treturn useLoaderDeps({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderData = (opts) => {\n\t\t\treturn useLoaderData({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useNavigate = () => {\n\t\t\treturn useNavigate({ from: this.fullPath });\n\t\t};\n\t\tthis.Link = React.forwardRef((props, ref) => {\n\t\t\treturn /* @__PURE__ */ jsx(Link, {\n\t\t\t\tref,\n\t\t\t\tfrom: this.fullPath,\n\t\t\t\t...props\n\t\t\t});\n\t\t});\n\t}\n};\n/**\n* Creates a non-root Route instance for code-based routing.\n*\n* Use this to define a route that will be composed into a route tree\n* (typically via a parent route's `addChildren`). If you're using file-based\n* routing, prefer `createFileRoute`.\n*\n* @param options Route options (path, component, loader, context, etc.).\n* @returns A Route instance to be attached to the route tree.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouteFunction\n*/\nfunction createRoute(options) {\n\treturn new Route(options);\n}\n/**\n* Creates a root route factory that requires a router context type.\n*\n* Use when your root route expects `context` to be provided to `createRouter`.\n* The returned function behaves like `createRootRoute` but enforces a context type.\n*\n* @returns A factory function to configure and return a root route.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRootRouteWithContextFunction\n*/\nfunction createRootRouteWithContext() {\n\treturn (options) => {\n\t\treturn createRootRoute(options);\n\t};\n}\n/**\n* @deprecated Use the `createRootRouteWithContext` function instead.\n*/\nvar rootRouteWithContext = createRootRouteWithContext;\nvar RootRoute = class extends BaseRootRoute {\n\t/**\n\t* @deprecated `RootRoute` is now an internal implementation detail. Use `createRootRoute()` instead.\n\t*/\n\tconstructor(options) {\n\t\tsuper(options);\n\t\tthis.useMatch = (opts) => {\n\t\t\treturn useMatch({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useRouteContext = (opts) => {\n\t\t\treturn useRouteContext({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useSearch = (opts) => {\n\t\t\treturn useSearch({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useParams = (opts) => {\n\t\t\treturn useParams({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderDeps = (opts) => {\n\t\t\treturn useLoaderDeps({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderData = (opts) => {\n\t\t\treturn useLoaderData({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useNavigate = () => {\n\t\t\treturn useNavigate({ from: this.fullPath });\n\t\t};\n\t\tthis.Link = React.forwardRef((props, ref) => {\n\t\t\treturn /* @__PURE__ */ jsx(Link, {\n\t\t\t\tref,\n\t\t\t\tfrom: this.fullPath,\n\t\t\t\t...props\n\t\t\t});\n\t\t});\n\t}\n};\n/**\n* Creates a root Route instance used to build your route tree.\n*\n* Typically paired with `createRouter({ routeTree })`. If you need to require\n* a typed router context, use `createRootRouteWithContext` instead.\n*\n* @param options Root route options (component, error, pending, etc.).\n* @returns A root route instance.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRootRouteFunction\n*/\nfunction createRootRoute(options) {\n\treturn new RootRoute(options);\n}\nfunction createRouteMask(opts) {\n\treturn opts;\n}\nvar NotFoundRoute = class extends Route {\n\tconstructor(options) {\n\t\tsuper({\n\t\t\t...options,\n\t\t\tid: \"404\"\n\t\t});\n\t}\n};\n//#endregion\nexport { NotFoundRoute, RootRoute, Route, RouteApi, createRootRoute, createRootRouteWithContext, createRoute, createRouteMask, getRouteApi, rootRouteWithContext };\n\n//# sourceMappingURL=route.js.map","import { CatchBoundary } from \"./CatchBoundary.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { isNotFound } from \"@tanstack/router-core\";\nimport \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useSelector } from \"@tanstack/react-store\";\n//#region src/not-found.tsx\nfunction CatchNotFound(props) {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) {\n\t\tconst resetKey = `not-found-${router.stores.location.get().pathname}-${router.stores.status.get()}`;\n\t\treturn /* @__PURE__ */ jsx(CatchBoundary, {\n\t\t\tgetResetKey: () => resetKey,\n\t\t\tonCatch: (error, errorInfo) => {\n\t\t\t\tif (isNotFound(error)) props.onCatch?.(error, errorInfo);\n\t\t\t\telse throw error;\n\t\t\t},\n\t\t\terrorComponent: ({ error }) => {\n\t\t\t\tif (isNotFound(error)) return props.fallback?.(error);\n\t\t\t\telse throw error;\n\t\t\t},\n\t\t\tchildren: props.children\n\t\t});\n\t}\n\tconst resetKey = `not-found-${useSelector(router.stores.location, (location) => location.pathname)}-${useSelector(router.stores.status)}`;\n\treturn /* @__PURE__ */ jsx(CatchBoundary, {\n\t\tgetResetKey: () => resetKey,\n\t\tonCatch: (error, errorInfo) => {\n\t\t\tif (isNotFound(error)) props.onCatch?.(error, errorInfo);\n\t\t\telse throw error;\n\t\t},\n\t\terrorComponent: ({ error }) => {\n\t\t\tif (isNotFound(error)) return props.fallback?.(error);\n\t\t\telse throw error;\n\t\t},\n\t\tchildren: props.children\n\t});\n}\nfunction DefaultGlobalNotFound() {\n\treturn /* @__PURE__ */ jsx(\"p\", { children: \"Not Found\" });\n}\n//#endregion\nexport { CatchNotFound, DefaultGlobalNotFound };\n\n//# sourceMappingURL=not-found.js.map","import { useRouter } from \"./useRouter.js\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/ScriptOnce.tsx\n/**\n* Server-only helper to emit a script tag exactly once during SSR.\n*/\nfunction ScriptOnce({ children }) {\n\tconst router = useRouter();\n\tif (!(isServer ?? router.isServer)) return null;\n\treturn /* @__PURE__ */ jsx(\"script\", {\n\t\tnonce: router.options.ssr?.nonce,\n\t\tdangerouslySetInnerHTML: { __html: children + \";document.currentScript.remove()\" }\n\t});\n}\n//#endregion\nexport { ScriptOnce };\n\n//# sourceMappingURL=ScriptOnce.js.map","import \"react\";\nimport { Fragment, jsx } from \"react/jsx-runtime\";\n//#region src/SafeFragment.tsx\nfunction SafeFragment(props) {\n\treturn /* @__PURE__ */ jsx(Fragment, { children: props.children });\n}\n//#endregion\nexport { SafeFragment };\n\n//# sourceMappingURL=SafeFragment.js.map","import { wrapInNonRouteComponentContext } from \"./nonRouteComponentContext.js\";\nimport { DefaultGlobalNotFound } from \"./not-found.js\";\nimport \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/renderRouteNotFound.tsx\n/**\n* Renders a not found component for a route when no matching route is found.\n*\n* @param router - The router instance containing the route configuration\n* @param route - The route that triggered the not found state\n* @param data - Additional data to pass to the not found component\n* @returns The rendered not found component or a default fallback component\n*/\nfunction renderRouteNotFound(router, route, data) {\n\tif (!route.options.notFoundComponent) {\n\t\tif (router.options.defaultNotFoundComponent) {\n\t\t\tconst notFoundElement = /* @__PURE__ */ jsx(router.options.defaultNotFoundComponent, { ...data });\n\t\t\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(notFoundElement, \"notFoundComponent\") : notFoundElement;\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (!route.options.notFoundComponent) console.warn(`Warning: A notFoundError was encountered on the route with ID \"${route.id}\", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`);\n\t\t}\n\t\treturn /* @__PURE__ */ jsx(DefaultGlobalNotFound, {});\n\t}\n\tconst notFoundElement = /* @__PURE__ */ jsx(route.options.notFoundComponent, { ...data });\n\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(notFoundElement, \"notFoundComponent\") : notFoundElement;\n}\n//#endregion\nexport { renderRouteNotFound };\n\n//# sourceMappingURL=renderRouteNotFound.js.map","//#region src/scroll-restoration-script/client.ts\nfunction getScrollRestorationScriptForRouter(_router) {\n\treturn null;\n}\n//#endregion\nexport { getScrollRestorationScriptForRouter };\n\n//# sourceMappingURL=client.js.map","import { useRouter } from \"./useRouter.js\";\nimport { ScriptOnce } from \"./ScriptOnce.js\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { getScrollRestorationScriptForRouter } from \"@tanstack/router-core/scroll-restoration-script\";\n//#region src/scroll-restoration.tsx\nfunction ScrollRestoration() {\n\tconst script = getScrollRestorationScriptForRouter(useRouter());\n\tif (!script) return null;\n\treturn /* @__PURE__ */ jsx(ScriptOnce, { children: script });\n}\n//#endregion\nexport { ScrollRestoration };\n\n//# sourceMappingURL=scroll-restoration.js.map","\"use client\";\nimport { nonRouteComponentContext, wrapInNonRouteComponentContext } from \"./nonRouteComponentContext.js\";\nimport { CatchBoundary, ErrorComponent } from \"./CatchBoundary.js\";\nimport { ClientOnly } from \"./ClientOnly.js\";\nimport { matchContext } from \"./matchContext.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { CatchNotFound } from \"./not-found.js\";\nimport { SafeFragment } from \"./SafeFragment.js\";\nimport { renderRouteNotFound } from \"./renderRouteNotFound.js\";\nimport { ScrollRestoration } from \"./scroll-restoration.js\";\nimport { isNotFound, rootRouteId } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { useSelector } from \"@tanstack/react-store\";\n//#region src/Match.tsx\nfunction renderPending(router, route) {\n\tconst PendingComponent = route?.options.pendingComponent ?? router.options.defaultPendingComponent;\n\tif (!PendingComponent) return null;\n\tconst pendingElement = /* @__PURE__ */ jsx(PendingComponent, {});\n\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(pendingElement, \"pendingComponent\") : pendingElement;\n}\nvar outletMatchSelectionEqual = (a, b) => a[0] === b[0] && a[1] === b[1];\nvar canWrapInSuspense = (router, route, ssr) => !route.isRoot || route.options.shellComponent || route.options.wrapInSuspense || ssr === false || ssr === \"data-only\" || !((isServer ?? router.isServer) || router.ssr);\nvar Match = React$1.memo(function MatchImpl({ routeId }) {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) return /* @__PURE__ */ jsx(MatchView, {\n\t\trouter,\n\t\tmatch: router.stores.byRoute.get(routeId).get()\n\t});\n\treturn /* @__PURE__ */ jsx(MatchView, {\n\t\trouter,\n\t\tmatch: useSelector(router.stores.getMatchStore(routeId))\n\t});\n});\nfunction MatchView({ router, match }) {\n\tconst route = router.routesById[match.routeId];\n\tconst pendingElement = renderPending(router, route);\n\tconst routeErrorComponent = route.options.errorComponent ?? router.options.defaultErrorComponent;\n\tconst routeOnCatch = route.options.onCatch ?? router.options.defaultOnCatch;\n\tconst routeNotFoundComponent = route.isRoot ? route.options.notFoundComponent ?? router.options.notFoundRoute?.options.component : route.options.notFoundComponent;\n\tconst resolvedNoSsr = match.ssr === false || match.ssr === \"data-only\";\n\tconst ResolvedSuspenseBoundary = canWrapInSuspense(router, route, match.ssr) && (route.options.wrapInSuspense ?? pendingElement ?? (route.options.errorComponent?.preload || resolvedNoSsr)) ? React$1.Suspense : SafeFragment;\n\tconst ResolvedCatchBoundary = routeErrorComponent ? CatchBoundary : SafeFragment;\n\tconst ResolvedNotFoundBoundary = routeNotFoundComponent ? CatchNotFound : SafeFragment;\n\treturn /* @__PURE__ */ jsxs(route.isRoot ? route.options.shellComponent ?? SafeFragment : SafeFragment, { children: [/* @__PURE__ */ jsx(matchContext.Provider, {\n\t\tvalue: match.routeId,\n\t\tchildren: /* @__PURE__ */ jsx(ResolvedSuspenseBoundary, {\n\t\t\tfallback: pendingElement,\n\t\t\tchildren: /* @__PURE__ */ jsx(ResolvedCatchBoundary, {\n\t\t\t\tgetResetKey: () => match,\n\t\t\t\terrorComponent: routeErrorComponent,\n\t\t\t\tonCatch: (error, errorInfo) => {\n\t\t\t\t\tif (isNotFound(error)) {\n\t\t\t\t\t\terror.routeId ??= match.routeId;\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Warning: Error in route match: ${match.id}`);\n\t\t\t\t\trouteOnCatch?.(error, errorInfo);\n\t\t\t\t},\n\t\t\t\tchildren: /* @__PURE__ */ jsx(ResolvedNotFoundBoundary, {\n\t\t\t\t\tfallback: (error) => {\n\t\t\t\t\t\terror.routeId ??= match.routeId;\n\t\t\t\t\t\tif (error.routeId !== match.routeId) throw error;\n\t\t\t\t\t\tconst notFoundElement = React$1.createElement(routeNotFoundComponent, error);\n\t\t\t\t\t\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(notFoundElement, \"notFoundComponent\") : notFoundElement;\n\t\t\t\t\t},\n\t\t\t\t\tchildren: resolvedNoSsr ? /* @__PURE__ */ jsx(ClientOnly, {\n\t\t\t\t\t\tfallback: pendingElement,\n\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(MatchInner, { match })\n\t\t\t\t\t}) : /* @__PURE__ */ jsx(MatchInner, { match })\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t}), (isServer ?? router.isServer) && route.parentRoute?.id === rootRouteId && router.options.scrollRestoration ? /* @__PURE__ */ jsx(ScrollRestoration, {}) : null] });\n}\nvar MatchInner = React$1.memo(function MatchInnerImpl({ match }) {\n\tconst router = useRouter();\n\tconst routeId = match.routeId;\n\tconst route = router.routesById[routeId];\n\tconst key = React$1.useMemo(() => {\n\t\tconst remountDeps = (route.options.remountDeps ?? router.options.defaultRemountDeps)?.({\n\t\t\trouteId,\n\t\t\tloaderDeps: match.loaderDeps,\n\t\t\tparams: match._strictParams,\n\t\t\tsearch: match._strictSearch\n\t\t});\n\t\treturn remountDeps ? JSON.stringify(remountDeps) : void 0;\n\t}, [\n\t\trouteId,\n\t\tmatch.loaderDeps,\n\t\tmatch._strictParams,\n\t\tmatch._strictSearch,\n\t\troute.options.remountDeps,\n\t\trouter.options.defaultRemountDeps\n\t]);\n\tconst out = React$1.useMemo(() => {\n\t\tconst Comp = route.options.component ?? router.options.defaultComponent;\n\t\treturn Comp ? /* @__PURE__ */ jsx(Comp, {}, key) : /* @__PURE__ */ jsx(Outlet, {});\n\t}, [\n\t\tkey,\n\t\troute.options.component,\n\t\trouter.options.defaultComponent\n\t]);\n\tif (match.status === \"pending\") {\n\t\tif (router.ssr && !canWrapInSuspense(router, route, match.ssr)) return out;\n\t\tif (router._tx) throw router._tx[5];\n\t\treturn renderPending(router, route);\n\t}\n\tif (match.status === \"notFound\") return renderRouteNotFound(router, route, match.error);\n\tif (match.status === \"error\") {\n\t\tif (isServer ?? router.isServer) {\n\t\t\tconst errorElement = /* @__PURE__ */ jsx((route.options.errorComponent ?? router.options.defaultErrorComponent) || ErrorComponent, {\n\t\t\t\terror: match.error,\n\t\t\t\treset: void 0,\n\t\t\t\tinfo: { componentStack: \"\" }\n\t\t\t});\n\t\t\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(errorElement, \"errorComponent\") : errorElement;\n\t\t}\n\t\tthrow match.error;\n\t}\n\treturn out;\n});\n/**\n* Render the next child match in the route tree. Typically used inside\n* a route component to render nested routes.\n*\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/outletComponent\n*/\nvar Outlet = React$1.memo(function OutletImpl() {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst nonRouteComponent = React$1.useContext(nonRouteComponentContext);\n\t\tif (nonRouteComponent) console.warn(`Warning: An <Outlet /> was rendered inside a ${nonRouteComponent}. <Outlet /> should only be rendered inside a route component.`);\n\t}\n\tconst router = useRouter();\n\tconst routeId = React$1.useContext(matchContext);\n\tlet parentGlobalNotFound;\n\tlet parentNotFoundError;\n\tlet childRouteId;\n\tif (isServer ?? router.isServer) {\n\t\tconst matches = router.stores.matches.get();\n\t\tconst parentIndex = matches.findIndex((match) => match.routeId === routeId);\n\t\tconst parentMatch = matches[parentIndex];\n\t\tparentGlobalNotFound = !!parentMatch._notFound;\n\t\tparentNotFoundError = parentMatch.error;\n\t\tchildRouteId = matches[parentIndex + 1]?.routeId;\n\t} else {\n\t\tconst parentMatchStore = router.stores.getMatchStore(routeId);\n\t\t[parentGlobalNotFound, parentNotFoundError] = useSelector(parentMatchStore, (match) => [!!match._notFound, match.error], { compare: outletMatchSelectionEqual });\n\t\tchildRouteId = useSelector(router.stores.ids, (ids) => {\n\t\t\treturn ids[ids.indexOf(routeId) + 1];\n\t\t});\n\t}\n\tif (parentGlobalNotFound) return renderRouteNotFound(router, router.routesById[routeId], parentNotFoundError);\n\tif (!childRouteId) return null;\n\tconst nextMatch = /* @__PURE__ */ jsx(Match, { routeId: childRouteId });\n\tif (routeId === rootRouteId) return /* @__PURE__ */ jsx(React$1.Suspense, {\n\t\tfallback: renderPending(router),\n\t\tchildren: nextMatch\n\t});\n\treturn nextMatch;\n});\n//#endregion\nexport { Match, Outlet, renderPending };\n\n//# sourceMappingURL=Match.js.map","\"use client\";\nimport { useLayoutEffect } from \"./utils.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { getLocationChangeInfo, trimPathRight } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\n//#region src/Transitioner.tsx\nfunction settleOwner(owner, rendered) {\n\tconst settle = owner[1];\n\towner.length = 0;\n\tsettle?.(rendered);\n}\nfunction Transitioner({ t }) {\n\tconst router = useRouter();\n\tconst acknowledgement = router._rendered ??= [];\n\tconst mounted = process.env.NODE_ENV !== \"production\" ? React$1.useRef(false) : void 0;\n\trouter.startTransition = (fn, expected) => new Promise((resolve) => {\n\t\tsettleOwner(acknowledgement, false);\n\t\tacknowledgement.push(expected, resolve);\n\t\tt(router);\n\t\tReact$1.startTransition(fn);\n\t});\n\tuseLayoutEffect(() => {\n\t\tconst unsub = router.history.subscribe(router.load);\n\t\tif (mounted?.current) return unsub;\n\t\tif (mounted) mounted.current = true;\n\t\trouter.updateLatestLocation();\n\t\tconst location = router.latestLocation;\n\t\tconst nextLocation = router.buildLocation({\n\t\t\tto: location.pathname,\n\t\t\tsearch: true,\n\t\t\tparams: true,\n\t\t\thash: true,\n\t\t\tstate: true,\n\t\t\t_includeValidateSearch: true\n\t\t});\n\t\tif (trimPathRight(location.publicHref) !== trimPathRight(nextLocation.publicHref)) {\n\t\t\trouter.commitLocation({\n\t\t\t\t...nextLocation,\n\t\t\t\treplace: true,\n\t\t\t\tignoreBlocker: true\n\t\t\t});\n\t\t\treturn unsub;\n\t\t}\n\t\tconst resolvedLocation = router.stores.resolvedLocation.get();\n\t\tif (resolvedLocation?.href === location.href && resolvedLocation.state.__TSR_key === location.state.__TSR_key) acknowledgement.push(router.stores.matches.get(), (rendered) => {\n\t\t\tif (rendered) router.emit({\n\t\t\t\ttype: \"onRendered\",\n\t\t\t\t...getLocationChangeInfo(resolvedLocation, resolvedLocation)\n\t\t\t});\n\t\t});\n\t\telse if (!router._tx) router.load({ sync: true }).catch(console.error);\n\t\treturn unsub;\n\t}, [router, router.history]);\n\treturn null;\n}\n//#endregion\nexport { Transitioner, settleOwner };\n\n//# sourceMappingURL=Transitioner.js.map","\"use client\";\nimport { useLayoutEffect } from \"./utils.js\";\nimport { CatchBoundary } from \"./CatchBoundary.js\";\nimport { matchContext } from \"./matchContext.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { useStructuralSharing } from \"./useMatch.js\";\nimport { Transitioner, settleOwner } from \"./Transitioner.js\";\nimport { SafeFragment } from \"./SafeFragment.js\";\nimport { Match, renderPending } from \"./Match.js\";\nimport { rootRouteId } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nimport { useSelector } from \"@tanstack/react-store\";\n//#region src/Matches.tsx\n/**\n* Internal component that renders the router's active match tree with\n* suspense, error, and not-found boundaries. Rendered by `RouterProvider`.\n*/\nfunction Matches() {\n\tconst router = useRouter();\n\tconst rootRoute = router.routesById[rootRouteId];\n\tconst pendingElement = renderPending(router, rootRoute);\n\tconst ResolvedSuspense = (isServer ?? router.isServer) || router.ssr ? SafeFragment : React$1.Suspense;\n\tconst inner = /* @__PURE__ */ jsxs(Fragment, { children: [!(isServer ?? router.isServer) && /* @__PURE__ */ jsx(Transitioner, { t: React$1.useState()[1] }), /* @__PURE__ */ jsx(ResolvedSuspense, {\n\t\tfallback: pendingElement,\n\t\tchildren: /* @__PURE__ */ jsx(MatchesInner, {})\n\t})] });\n\treturn router.options.InnerWrap ? /* @__PURE__ */ jsx(router.options.InnerWrap, { children: inner }) : inner;\n}\nfunction MatchesInner() {\n\tconst router = useRouter();\n\tconst acknowledgement = router._rendered;\n\tconst matches = isServer ?? router.isServer ? router.stores.matches.get() : useSelector(router.stores.matches, (value) => acknowledgement[0] ?? value);\n\tconst match = matches[0];\n\tconst routeId = match?.routeId;\n\tuseLayoutEffect(() => {\n\t\tif (acknowledgement[0] === matches) settleOwner(acknowledgement, true);\n\t}, [acknowledgement, matches]);\n\tconst matchComponent = routeId ? /* @__PURE__ */ jsx(Match, { routeId }) : null;\n\treturn /* @__PURE__ */ jsx(matchContext.Provider, {\n\t\tvalue: routeId,\n\t\tchildren: router.options.disableGlobalCatchBoundary ? matchComponent : /* @__PURE__ */ jsx(CatchBoundary, {\n\t\t\tgetResetKey: () => match,\n\t\t\tonCatch: process.env.NODE_ENV !== \"production\" ? (error) => {\n\t\t\t\tconsole.warn(`Warning: The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!`);\n\t\t\t\tconsole.warn(\"Warning:\", error);\n\t\t\t} : void 0,\n\t\t\tchildren: matchComponent\n\t\t})\n\t});\n}\n/**\n* Create a matcher function for testing locations against route definitions.\n*\n* The returned function accepts standard navigation options (`to`, `params`,\n* `search`, etc.) and returns either `false` (no match) or the matched params\n* object when the route matches the current or pending location.\n*\n* Useful for conditional rendering and active UI states because it subscribes\n* the component to the router state used for matching. The returned function's\n* identity changes when that state changes. For imperative checks in event\n* handlers, get the router with `useRouter` and call `router.matchRoute(...)`\n* to avoid that subscription.\n*\n* @returns A `matchRoute(options)` function that returns `false` or params.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useMatchRouteHook\n*/\nfunction useMatchRoute() {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) return (opts) => {\n\t\tconst { pending, caseSensitive, fuzzy, includeSearch, ...rest } = opts;\n\t\treturn router.matchRoute(rest, {\n\t\t\tpending,\n\t\t\tcaseSensitive,\n\t\t\tfuzzy,\n\t\t\tincludeSearch\n\t\t});\n\t};\n\treturn React$1.useCallback((opts) => {\n\t\tconst { pending, caseSensitive, fuzzy, includeSearch, ...rest } = opts;\n\t\treturn router.matchRoute(rest, {\n\t\t\tpending,\n\t\t\tcaseSensitive,\n\t\t\tfuzzy,\n\t\t\tincludeSearch\n\t\t});\n\t}, [\n\t\trouter,\n\t\tuseSelector(router.stores.location, (location) => location.href),\n\t\tuseSelector(router.stores.resolvedLocation, (location) => location?.href),\n\t\tuseSelector(router.stores.status)\n\t]);\n}\n/**\n* Component that conditionally renders its children based on whether a route\n* matches the provided `from`/`to` options. If `children` is a function, it\n* receives the matched params object.\n*\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/matchRouteComponent\n*/\nfunction MatchRoute(props) {\n\tconst params = useMatchRoute()(props);\n\tif (typeof props.children === \"function\") return props.children(params);\n\treturn params ? props.children : null;\n}\nfunction useMatches(opts) {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) {\n\t\tconst matches = router.stores.matches.get();\n\t\treturn opts?.select ? opts.select(matches) : matches;\n\t}\n\treturn useSelector(router.stores.matches, useStructuralSharing(opts, router));\n}\n/**\n* Read the presented route matches above the current match, or select a\n* derived value from them.\n*/\nfunction useParentMatches(opts) {\n\tconst contextRouteId = React$1.useContext(matchContext);\n\treturn useMatches({\n\t\tselect: (matches) => {\n\t\t\tmatches = matches.slice(0, matches.findIndex((d) => d.routeId === contextRouteId));\n\t\t\treturn opts?.select ? opts.select(matches) : matches;\n\t\t},\n\t\tstructuralSharing: opts?.structuralSharing\n\t});\n}\n/**\n* Read the presented route matches below the current match, or select a\n* derived value from them.\n*/\nfunction useChildMatches(opts) {\n\tconst contextRouteId = React$1.useContext(matchContext);\n\treturn useMatches({\n\t\tselect: (matches) => {\n\t\t\tmatches = matches.slice(matches.findIndex((d) => d.routeId === contextRouteId) + 1);\n\t\t\treturn opts?.select ? opts.select(matches) : matches;\n\t\t},\n\t\tstructuralSharing: opts?.structuralSharing\n\t});\n}\n//#endregion\nexport { MatchRoute, Matches, useChildMatches, useMatchRoute, useMatches, useParentMatches };\n\n//# sourceMappingURL=Matches.js.map","import { createNonReactiveMutableStore, createNonReactiveReadonlyStore } from \"@tanstack/router-core\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { batch, createAtom } from \"@tanstack/react-store\";\n//#region src/routerStores.ts\nvar getStoreFactory = (opts) => {\n\tif (isServer ?? opts.isServer) return {\n\t\tcreateMutableStore: createNonReactiveMutableStore,\n\t\tcreateReadonlyStore: createNonReactiveReadonlyStore,\n\t\tbatch: (fn) => fn()\n\t};\n\treturn {\n\t\tcreateMutableStore: createAtom,\n\t\tcreateReadonlyStore: createAtom,\n\t\tbatch\n\t};\n};\n//#endregion\nexport { getStoreFactory };\n\n//# sourceMappingURL=routerStores.js.map","import { getStoreFactory } from \"./routerStores.js\";\nimport { RouterCore } from \"@tanstack/router-core\";\n//#region src/router.ts\n/**\n* Creates a new Router instance for React.\n*\n* Pass the returned router to `RouterProvider` to enable routing.\n* Notable options: `routeTree` (your route definitions) and `context`\n* (required if the root route was created with `createRootRouteWithContext`).\n*\n* @param options Router options used to configure the router.\n* @returns A Router instance to be provided to `RouterProvider`.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouterFunction\n*/\nvar createRouter = (options) => {\n\treturn new Router(options);\n};\nvar Router = class extends RouterCore {\n\tconstructor(options) {\n\t\tsuper(options, getStoreFactory);\n\t}\n};\n//#endregion\nexport { Router, createRouter };\n\n//# sourceMappingURL=router.js.map","\"use client\";\nimport { routerContext } from \"./routerContext.js\";\nimport { Matches } from \"./Matches.js\";\nimport { hasKeys } from \"@tanstack/router-core\";\nimport \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/RouterProvider.tsx\n/**\n* Low-level provider that places the router into React context and optionally\n* updates router options from props. Most apps should use `RouterProvider`.\n*/\nfunction RouterContextProvider({ router, children, ...rest }) {\n\tif (hasKeys(rest)) router.update({\n\t\t...router.options,\n\t\t...rest,\n\t\tcontext: {\n\t\t\t...router.options.context,\n\t\t\t...rest.context\n\t\t}\n\t});\n\tconst provider = /* @__PURE__ */ jsx(routerContext.Provider, {\n\t\tvalue: router,\n\t\tchildren\n\t});\n\tif (router.options.Wrap) return /* @__PURE__ */ jsx(router.options.Wrap, { children: provider });\n\treturn provider;\n}\n/**\n* Renders the current match presentation and provides the router to the React\n* tree via context.\n*\n* Accepts mutable router options via props. Configure initialization-only\n* options with `createRouter`.\n*\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouterFunction\n*/\nfunction RouterProvider({ router, ...rest }) {\n\treturn /* @__PURE__ */ jsx(RouterContextProvider, {\n\t\trouter,\n\t\t...rest,\n\t\tchildren: /* @__PURE__ */ jsx(Matches, {})\n\t});\n}\n//#endregion\nexport { RouterContextProvider, RouterProvider };\n\n//# sourceMappingURL=RouterProvider.js.map","\"use client\";\nimport { useRouter } from \"./useRouter.js\";\nimport { useStructuralSharing } from \"./useMatch.js\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { useSelector } from \"@tanstack/react-store\";\n//#region src/useLocation.tsx\n/**\n* Read the current location from the router state with optional selection.\n* Useful for subscribing to just the pieces of location you care about.\n*\n* Options:\n* - `select`: Project the `location` object to a derived value\n* - `structuralSharing`: Enable structural sharing for stable references\n*\n* @returns The current location (or selected value).\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLocationHook\n*/\nfunction useLocation(opts) {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) {\n\t\tconst location = router.stores.location.get();\n\t\treturn opts?.select ? opts.select(location) : location;\n\t}\n\treturn useSelector(router.stores.location, useStructuralSharing(opts, router));\n}\n//#endregion\nexport { useLocation };\n\n//# sourceMappingURL=useLocation.js.map"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80],"mappings":"gIAIM,EAAA,EAA2B,cAAc,IAAK,EAAC,EAC/C,EAAkB,GAAgB,CACvC,IAAM,EAAA,EA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