{"version":3,"file":"app-page.runtime.dev.js","sources":["webpack://next/webpack/runtime/create_fake_namespace_object","webpack://next/webpack/runtime/require_chunk_loading","webpack://next/./src/build/webpack/alias/react-dom-server.js","webpack://next/./dist/compiled/@edge-runtime/cookies/index.js","webpack://next/./dist/compiled/busboy/index.js","webpack://next/./dist/compiled/bytes/index.js","webpack://next/./dist/compiled/cookie/index.js","webpack://next/./dist/compiled/p-queue/index.js","webpack://next/./dist/compiled/path-to-regexp/index.js","webpack://next/./dist/compiled/react-dom/cjs/react-dom-server.node.development.js","webpack://next/./dist/compiled/react-dom/cjs/react-dom.development.js","webpack://next/./dist/compiled/react-dom/index.js","webpack://next/./dist/compiled/react-dom/static.node.js","webpack://next/./dist/compiled/react-is/cjs/react-is.development.js","webpack://next/./dist/compiled/react-is/index.js","webpack://next/./dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js","webpack://next/./dist/compiled/react-server-dom-webpack/client.node.js","webpack://next/./dist/compiled/react/cjs/react-compiler-runtime.development.js","webpack://next/./dist/compiled/react/cjs/react-jsx-dev-runtime.development.js","webpack://next/./dist/compiled/react/cjs/react-jsx-runtime.development.js","webpack://next/./dist/compiled/react/cjs/react.development.js","webpack://next/./dist/compiled/react/compiler-runtime.js","webpack://next/./dist/compiled/react/index.js","webpack://next/./dist/compiled/react/jsx-dev-runtime.js","webpack://next/./dist/compiled/react/jsx-runtime.js","webpack://next/./dist/compiled/safe-stable-stringify/index.js","webpack://next/./dist/compiled/string-hash/index.js","webpack://next/./dist/compiled/strip-ansi/index.js","webpack://next/./src/client/app-call-server.ts","webpack://next/./src/client/app-find-source-map-url.ts","webpack://next/./src/client/components/app-router-headers.ts","webpack://next/./src/client/add-base-path.ts","webpack://next/./src/client/normalize-trailing-slash.ts","webpack://next/./src/client/components/app-router-utils.ts","webpack://next/./src/client/components/router-reducer/reducers/server-action-reducer.ts","webpack://next/./src/client/components/app-router-instance.ts","webpack://next/./src/client/components/segment-cache/prefetch.ts","webpack://next/./src/client/components/builtin/error-styles.tsx","webpack://next/./src/client/components/builtin/global-error.tsx","webpack://next/./src/client/components/http-access-fallback/error-boundary.tsx","webpack://next/./src/client/components/dev-root-http-access-fallback-boundary.tsx","webpack://next/./src/client/components/error-boundary.tsx","webpack://next/./src/client/components/handle-isr-error.tsx","webpack://next/./src/client/components/hooks-server-context.ts","webpack://next/./src/client/components/http-access-fallback/http-access-fallback.ts","webpack://next/./src/client/components/is-next-router-error.ts","webpack://next/./src/client/components/links.ts","webpack://next/./src/client/components/match-segments.ts","webpack://next/./src/client/components/nav-failure-handler.ts","webpack://next/./src/client/components/navigation-devtools.ts","webpack://next/./src/client/components/navigation-untracked.ts","webpack://next/./src/client/components/not-found.ts","webpack://next/./src/client/components/readonly-url-search-params.ts","webpack://next/./src/client/components/redirect-error.ts","webpack://next/./src/client/components/redirect-status-code.ts","webpack://next/./src/client/components/redirect.ts","webpack://next/./src/client/components/router-reducer/compute-changed-path.ts","webpack://next/./src/client/components/router-reducer/create-href-from-url.ts","webpack://next/./src/client/components/router-reducer/fetch-server-response.ts","webpack://next/./src/client/components/router-reducer/ppr-navigations.ts","webpack://next/./src/client/components/router-reducer/is-navigating-to-new-root-layout.ts","webpack://next/./src/client/components/router-reducer/reducers/committed-state.ts","webpack://next/./src/client/components/router-reducer/reducers/navigate-reducer.ts","webpack://next/./src/client/components/router-reducer/router-reducer-types.ts","webpack://next/./src/client/components/router-reducer/set-cache-busting-search-param.ts","webpack://next/./src/client/components/segment-cache/bfcache.ts","webpack://next/./src/client/components/segment-cache/cache-key.ts","webpack://next/./src/client/components/segment-cache/cache-map.ts","webpack://next/./src/shared/lib/segment-cache/vary-params-decoding.ts","webpack://next/./src/client/components/segment-cache/cache.ts","webpack://next/./src/client/components/segment-cache/lru.ts","webpack://next/./src/client/components/segment-cache/navigation-testing-lock.ts","webpack://next/./src/client/components/segment-cache/navigation.ts","webpack://next/./src/client/components/segment-cache/optimistic-routes.ts","webpack://next/./src/client/components/segment-cache/scheduler.ts","webpack://next/./src/client/components/segment-cache/types.ts","webpack://next/./src/client/components/segment-cache/vary-path.ts","webpack://next/./src/client/components/static-generation-bailout.ts","webpack://next/./src/client/components/unrecognized-action-error.ts","webpack://next/./src/client/components/unstable-rethrow.server.ts","webpack://next/./src/client/components/use-action-queue.ts","webpack://next/./src/client/dev/debug-channel.ts","webpack://next/./src/server/dev/hot-reloader-types.ts","webpack://next/./src/shared/lib/format-webpack-messages.ts","webpack://next/./src/client/dev/hot-reloader/shared.ts","webpack://next/./src/next-devtools/userspace/app/terminal-logging-config.ts","webpack://next/./src/next-devtools/shared/console-error.ts","webpack://next/./src/next-devtools/userspace/app/errors/stitched-error.ts","webpack://next/./src/shared/lib/error-source.ts","webpack://next/./src/next-devtools/userspace/app/forward-logs-utils.ts","webpack://next/./src/next-devtools/userspace/app/forward-logs.ts","webpack://next/./src/next-devtools/userspace/app/errors/use-error-handler.ts","webpack://next/./src/next-devtools/userspace/app/errors/replay-ssr-only-errors.tsx","webpack://next/./src/client/dev/runtime-error-handler.ts","webpack://next/./src/next-devtools/userspace/app/app-dev-overlay-error-boundary.tsx","webpack://next/./src/next-devtools/userspace/app/segment-explorer-node.tsx","webpack://next/./src/client/dev/hot-reloader/app/web-socket.ts","webpack://next/./src/client/dev/report-hmr-latency.ts","webpack://next/./src/client/dev/hot-reloader/app/hot-reloader-app.tsx","webpack://next/./src/client/flight-data-helpers.ts","webpack://next/./src/client/has-base-path.ts","webpack://next/./src/client/lib/javascript-url.ts","webpack://next/./src/client/navigation-build-id.ts","webpack://next/./src/client/remove-base-path.ts","webpack://next/./src/client/route-params.ts","webpack://next/./src/lib/constants.ts","webpack://next/./src/lib/format-dynamic-import-path.ts","webpack://next/./src/lib/framework/boundary-constants.tsx","webpack://next/./src/lib/is-error.ts","webpack://next/./src/lib/scheduler.ts","webpack://next/./src/next-devtools/userspace/use-app-dev-rendering-indicator.tsx","webpack://next/./src/server/after/after-context.ts","webpack://next/./src/server/api-utils/index.ts","webpack://next/./src/server/api-utils/node/try-get-preview-data.ts","webpack://next/./src/server/app-render/async-local-storage.ts","webpack://next/./src/server/app-render/dynamic-rendering.ts","webpack://next/./src/server/app-render/instant-validation/boundary-constants.ts","webpack://next/./src/server/app-render/instant-validation/instant-samples-client.ts","webpack://next/./src/server/app-render/instant-validation/instant-samples.ts","webpack://next/./src/server/app-render/instant-validation/instant-validation-error.ts","webpack://next/./src/server/app-render/staged-rendering.ts","webpack://next/./src/server/crypto-utils.ts","webpack://next/./src/server/dynamic-rendering-utils.ts","webpack://next/./src/server/lib/cache-handlers/default.ts","webpack://next/./src/server/lib/lru-cache.ts","webpack://next/./src/server/lib/node-fs-methods.ts","webpack://next/./src/server/lib/router-utils/is-postpone.ts","webpack://next/./src/server/lib/source-maps.ts","webpack://next/./src/server/lib/trace/constants.ts","webpack://next/./src/server/node-environment-extensions/process-error-handlers.ts","webpack://next/./src/server/revalidation-utils.ts","webpack://next/./src/server/route-modules/app-page/vendored/ssr/entrypoints.ts","webpack://next/./src/server/use-cache/handlers.ts","webpack://next/./src/server/web/spec-extension/adapters/headers.ts","webpack://next/./src/server/web/spec-extension/adapters/reflect.ts","webpack://next/./src/server/web/spec-extension/adapters/request-cookies.ts","webpack://next/./src/shared/lib/action-revalidation-kind.ts","webpack://next/./src/shared/lib/app-router-context.shared-runtime.ts","webpack://next/./src/shared/lib/app-router-types.ts","webpack://next/./src/shared/lib/deployment-id.ts","webpack://next/./src/shared/lib/errors/constants.ts","webpack://next/./src/shared/lib/hash.ts","webpack://next/./src/shared/lib/head-manager-context.shared-runtime.ts","webpack://next/./src/shared/lib/hooks-client-context.shared-runtime.ts","webpack://next/./src/shared/lib/invariant-error.ts","webpack://next/./src/shared/lib/is-plain-object.ts","webpack://next/./src/shared/lib/is-thenable.ts","webpack://next/./src/shared/lib/isomorphic/path.js","webpack://next/./src/shared/lib/lazy-dynamic/bailout-to-csr.ts","webpack://next/./src/shared/lib/modern-browserslist-target.js","webpack://next/./src/shared/lib/page-path/ensure-leading-slash.ts","webpack://next/./src/shared/lib/promise-with-resolvers.ts","webpack://next/./src/shared/lib/router/utils/add-path-prefix.ts","webpack://next/./src/shared/lib/router/utils/app-paths.ts","webpack://next/./src/shared/lib/router/utils/cache-busting-search-param.ts","webpack://next/./src/shared/lib/router/utils/get-segment-param.tsx","webpack://next/./src/shared/lib/router/utils/interception-routes.ts","webpack://next/./src/shared/lib/router/utils/html-bots.ts","webpack://next/./src/shared/lib/router/utils/is-bot.ts","webpack://next/./src/shared/lib/router/utils/parse-path.ts","webpack://next/./src/shared/lib/router/utils/parse-relative-url.ts","webpack://next/./src/shared/lib/router/utils/path-has-prefix.ts","webpack://next/./src/shared/lib/router/utils/querystring.ts","webpack://next/./src/shared/lib/router/utils/remove-trailing-slash.ts","webpack://next/./src/shared/lib/segment-cache/segment-value-encoding.ts","webpack://next/./src/shared/lib/segment.ts","webpack://next/./src/shared/lib/server-reference-info.ts","webpack://next/./src/shared/lib/utils.ts","webpack://next/./src/shared/lib/utils/reflect-utils.ts","webpack://next/./src/shared/lib/utils/warn-once.ts","webpack://next/./dist/compiled/react-dom/cjs/react-dom.react-server.development.js","webpack://next/./dist/compiled/react-dom/react-dom.react-server.js","webpack://next/./dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js","webpack://next/./dist/compiled/react-server-dom-webpack/server.node.js","webpack://next/./dist/compiled/react-server-dom-webpack/static.node.js","webpack://next/./dist/compiled/react/cjs/react-jsx-dev-runtime.react-server.development.js","webpack://next/./dist/compiled/react/cjs/react-jsx-runtime.react-server.development.js","webpack://next/./dist/compiled/react/cjs/react.react-server.development.js","webpack://next/./dist/compiled/react/jsx-dev-runtime.react-server.js","webpack://next/./dist/compiled/react/jsx-runtime.react-server.js","webpack://next/./dist/compiled/react/react.react-server.js","webpack://next/./src/server/route-modules/app-page/vendored/rsc/entrypoints.ts","webpack://next/./dist/compiled/nanoid/index.cjs","webpack://next/./dist/compiled/superstruct/index.cjs","webpack://next/webpack/runtime/compat_get_default_export","webpack://next/webpack/runtime/define_property_getters","webpack://next/webpack/runtime/ensure_chunk","webpack://next/webpack/runtime/esm_module_decorator","webpack://next/webpack/runtime/get javascript chunk filename","webpack://next/webpack/runtime/get_full_hash","webpack://next/webpack/runtime/has_own_property","webpack://next/webpack/runtime/make_namespace_object","webpack://next/webpack/runtime/node_module_decorator","webpack://next/./src/client/components/app-router.tsx","webpack://next/./src/server/route-modules/app-page/module.ts","webpack://next/./src/server/response-cache/types.ts","webpack://next/./src/server/route-kind.ts","webpack://next/./src/server/app-render/postponed-state.ts","webpack://next/./src/server/app-render/prospective-render-utils.ts","webpack://next/./src/lib/picocolors.ts","webpack://next/./src/server/request-meta.ts","webpack://next/./src/lib/detached-promise.ts","webpack://next/./src/server/stream-utils/encoded-tags.ts","webpack://next/./src/server/stream-utils/uint8array-helpers.ts","webpack://next/./src/server/stream-utils/node-web-streams-helper.ts","webpack://next/./src/server/web/utils.ts","webpack://next/./src/shared/lib/i18n/detect-domain-locale.ts","webpack://next/./src/shared/lib/router/utils/add-path-suffix.ts","webpack://next/./src/shared/lib/get-hostname.ts","webpack://next/./src/shared/lib/i18n/normalize-locale-path.ts","webpack://next/./src/shared/lib/router/utils/remove-path-prefix.ts","webpack://next/./src/server/web/next-url.ts","webpack://next/./src/shared/lib/router/utils/get-next-pathname-info.ts","webpack://next/./src/shared/lib/router/utils/format-next-pathname-info.ts","webpack://next/./src/shared/lib/router/utils/add-locale.ts","webpack://next/./src/server/web/spec-extension/request.ts","webpack://next/./src/server/web/spec-extension/adapters/next-request.ts","webpack://next/./src/server/client-component-renderer-logger.ts","webpack://next/./src/server/pipe-readable.ts","webpack://next/./src/server/render-result.ts","webpack://next/./src/server/htmlescape.ts","webpack://next/./src/server/app-render/manifests-singleton.ts","webpack://next/./src/server/app-render/use-flight-response.tsx","webpack://next/./src/server/app-render/app-render-prerender-utils.ts","webpack://next/./src/server/app-render/stream-ops.web.ts","webpack://next/./src/server/internal-utils.ts","webpack://next/./src/lib/metadata/metadata-context.tsx","webpack://next/./src/server/async-storage/draft-mode-provider.ts","webpack://next/./src/server/async-storage/request-store.ts","webpack://next/./src/server/lib/lazy-result.ts","webpack://next/./src/server/lib/implicit-tags.ts","webpack://next/./src/server/app-render/flight-render-result.ts","webpack://next/./src/lib/format-server-error.ts","webpack://next/./src/lib/error-telemetry-utils.ts","webpack://next/./src/server/app-render/react-large-shell-error.ts","webpack://next/./src/server/app-render/create-error-handler.tsx","webpack://next/./src/server/app-render/get-short-dynamic-param-type.tsx","webpack://next/./src/server/app-render/types.ts","webpack://next/./src/server/app-render/create-flight-router-state-from-loader-tree.ts","webpack://next/./src/server/lib/server-ipc/utils.ts","webpack://next/./src/server/lib/server-action-request-meta.ts","webpack://next/./src/build/output/log.ts","webpack://next/./src/server/app-render/segment-explorer-path.ts","webpack://next/./src/server/app-render/action-handler.ts","webpack://next/./src/server/app-render/csrf-protection.ts","webpack://next/./src/shared/lib/server-inserted-html.shared-runtime.tsx","webpack://next/./src/server/app-render/server-inserted-html.tsx","webpack://next/./src/shared/lib/encode-uri-path.ts","webpack://next/./src/server/app-render/required-scripts.tsx","webpack://next/./src/server/app-render/make-get-server-inserted-html.tsx","webpack://next/./src/server/app-render/get-css-inlined-link-tags.tsx","webpack://next/./src/server/app-render/get-preloadable-fonts.tsx","webpack://next/./src/server/app-render/has-loading-component-in-tree.tsx","webpack://next/./src/lib/client-and-server-references.ts","webpack://next/./src/server/lib/app-dir-module.ts","webpack://next/./src/server/app-render/interop-default.ts","webpack://next/./src/shared/lib/router/utils/parse-loader-tree.ts","webpack://next/./src/server/app-render/get-asset-query-string.ts","webpack://next/./src/server/app-render/render-css-resource.tsx","webpack://next/./src/server/app-render/create-component-styles-and-scripts.tsx","webpack://next/./src/server/lib/clone-response.ts","webpack://next/./src/lib/batcher.ts","webpack://next/./src/server/response-cache/utils.ts","webpack://next/./src/server/response-cache/index.ts","webpack://next/./src/server/lib/patch-fetch.ts","webpack://next/./src/server/app-render/vary-params.ts","webpack://next/./src/server/app-render/create-component-tree.tsx","webpack://next/./src/server/app-render/get-layer-assets.tsx","webpack://next/./src/client/components/builtin/default.tsx","webpack://next/./src/server/app-render/walk-tree-with-flight-router-state.tsx","webpack://next/./src/shared/lib/router/routes/app.ts","webpack://next/./src/shared/lib/router/utils/interception-prefix-from-param-type.ts","webpack://next/./src/shared/lib/router/utils/resolve-param-value.ts","webpack://next/./src/shared/lib/router/utils/get-dynamic-param.ts","webpack://next/./src/server/resume-data-cache/cache-store.ts","webpack://next/./src/server/use-cache/constants.ts","webpack://next/./src/server/app-render/encryption-utils.ts","webpack://next/./src/server/resume-data-cache/resume-data-cache.ts","webpack://next/./src/client/components/app-router-announcer.tsx","webpack://next/./src/client/components/forbidden.ts","webpack://next/./src/client/components/unauthorized.ts","webpack://next/./src/client/components/unstable-rethrow.ts","webpack://next/./src/client/components/navigation.ts","webpack://next/./src/client/components/redirect-boundary.tsx","webpack://next/./src/client/components/router-reducer/create-router-cache-key.ts","webpack://next/./src/client/components/unresolved-thenable.ts","webpack://next/./src/client/components/errors/graceful-degrade-boundary.tsx","webpack://next/./src/client/components/errors/root-error-boundary.tsx","webpack://next/./src/lib/framework/boundary-components.tsx","webpack://next/./src/client/components/router-reducer/reducers/find-head-in-cache.ts","webpack://next/./src/client/components/router-reducer/create-initial-router-state.ts","webpack://next/./src/server/app-render/app-render-scheduling.ts","webpack://next/./src/server/app-render/app-render-render-utils.ts","webpack://next/./src/server/app-render/cache-signal.ts","webpack://next/./src/server/lib/trace/utils.ts","webpack://next/./src/server/app-render/stale-time.ts","webpack://next/./src/server/app-render/metadata-insertion/create-server-inserted-metadata.tsx","webpack://next/./src/shared/lib/escape-regexp.ts","webpack://next/./src/shared/lib/router/utils/route-regex.ts","webpack://next/./src/lib/route-pattern-normalizer.ts","webpack://next/./src/shared/lib/router/utils/route-match-utils.ts","webpack://next/./src/shared/lib/router/utils/route-matcher.ts","webpack://next/./src/shared/lib/router/utils/prepare-destination.ts","webpack://next/./src/server/lib/decode-query-path-parameter.ts","webpack://next/./src/lib/url.ts","webpack://next/./src/shared/lib/router/utils/format-url.ts","webpack://next/./src/server/server-utils.ts","webpack://next/./src/shared/lib/image-config.ts","webpack://next/./src/shared/lib/image-config-context.shared-runtime.ts","webpack://next/./src/server/app-render/instant-validation/instant-config.tsx","webpack://next/./src/server/app-render/debug-channel-server.web.ts","webpack://next/./src/server/app-render/instant-validation/stream-utils.ts","webpack://next/./src/server/app-render/app-render.tsx","webpack://next/./src/server/instrumentation/utils.ts","webpack://next/./src/server/app-render/parse-and-validate-flight-router-state.tsx","webpack://next/./src/server/app-render/get-script-nonce-from-header.tsx","webpack://next/./src/server/async-storage/work-store.ts","webpack://next/./src/server/app-render/instant-validation/boundary-tracking.tsx","webpack://next/./src/server/request/fallback-params.ts","webpack://next/./src/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.ts","webpack://next/./src/build/static-paths/utils.ts","webpack://next/./src/shared/lib/constants.ts","webpack://next/./src/shared/lib/router/utils/is-dynamic.ts","webpack://next/./src/shared/lib/page-path/normalize-data-path.ts","webpack://next/./src/shared/lib/page-path/normalize-page-path.ts","webpack://next/./src/lib/metadata/is-metadata-route.ts","webpack://next/./src/lib/multi-file-writer.ts","webpack://next/./src/server/lib/incremental-cache/file-system-cache.ts","webpack://next/./src/server/lib/to-route.ts","webpack://next/./src/server/lib/incremental-cache/index.ts","webpack://next/./src/server/lib/router-utils/router-server-context.ts","webpack://next/./src/lib/is-interception-route-rewrite.ts","webpack://next/./src/server/route-modules/route-module.ts","webpack://next/./src/lib/is-app-route-route.ts","webpack://next/./src/shared/lib/page-path/normalize-path-sep.ts","webpack://next/./src/shared/lib/router/utils/path-match.ts","webpack://next/./src/server/api-utils/get-cookie-parser.ts","webpack://next/./src/shared/lib/router/utils/parse-url.ts","webpack://next/./src/server/lib/router-utils/decode-path-params.ts","webpack://next/./src/shared/lib/router/utils/escape-path-delimiters.ts","webpack://next/./src/shared/lib/router-context.shared-runtime.ts","webpack://next/./src/server/route-modules/app-page/helpers/prerender-manifest-matcher.ts","webpack://next/./src/server/normalizers/request/suffix.ts","webpack://next/./src/server/normalizers/request/rsc.ts","webpack://next/./src/server/normalizers/request/segment-prefix-rsc.ts","webpack://next/./src/server/route-modules/app-page/normalize-request-url.ts"],"sourcesContent":["var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n  __webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => { def[key] = () => (value[key]) });\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var installedChunks = {\"app-page\": 1,};\n// object to store loaded chunks\n// \"1\" means \"loaded\", otherwise not loaded yet\nvar installChunk = (chunk) => {\n\tvar moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;\n\tfor (var moduleId in moreModules) {\n\t\tif (__webpack_require__.o(moreModules, moduleId)) {\n\t\t __webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif (runtime) runtime(__webpack_require__);\n\tfor (var i = 0; i < chunkIds.length; i++) installedChunks[chunkIds[i]] = 1;\n\t\n};// require() chunk loading for javascript\n__webpack_require__.f.require = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif (!installedChunks[chunkId]) {\n\t\tif (true) {\n\t\t\tinstallChunk(require(\"./\" + __webpack_require__.u(chunkId)));\n\t\t} else installedChunks[chunkId] = 1;\n\t}\n};","const ERROR_MESSAGE =\n  'Internal Error: do not use legacy react-dom/server APIs. If you encountered this error, please open an issue on the Next.js repo.'\n\nfunction error() {\n  throw new Error(ERROR_MESSAGE)\n}\n\nvar b\nif (process.env.NEXT_RUNTIME === 'nodejs') {\n  if (process.env.NODE_ENV === 'production') {\n    b = require('next/dist/compiled/react-dom/cjs/react-dom-server.node.production.js')\n  } else {\n    b = require('next/dist/compiled/react-dom/cjs/react-dom-server.node.development.js')\n  }\n} else {\n  if (process.env.NODE_ENV === 'production') {\n    b = require('next/dist/compiled/react-dom/cjs/react-dom-server.edge.production.js')\n  } else {\n    b = require('next/dist/compiled/react-dom/cjs/react-dom-server.edge.development.js')\n  }\n}\n\nexports.version = b.version\nexports.renderToReadableStream = b.renderToReadableStream\nexports.renderToString = error\nexports.renderToStaticMarkup = error\nif (b.resume) {\n  exports.resume = b.resume\n}\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n  RequestCookies: () => RequestCookies,\n  ResponseCookies: () => ResponseCookies,\n  parseCookie: () => parseCookie,\n  parseSetCookie: () => parseSetCookie,\n  stringifyCookie: () => stringifyCookie\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/serialize.ts\nfunction stringifyCookie(c) {\n  var _a;\n  const attrs = [\n    \"path\" in c && c.path && `Path=${c.path}`,\n    \"expires\" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === \"number\" ? new Date(c.expires) : c.expires).toUTCString()}`,\n    \"maxAge\" in c && typeof c.maxAge === \"number\" && `Max-Age=${c.maxAge}`,\n    \"domain\" in c && c.domain && `Domain=${c.domain}`,\n    \"secure\" in c && c.secure && \"Secure\",\n    \"httpOnly\" in c && c.httpOnly && \"HttpOnly\",\n    \"sameSite\" in c && c.sameSite && `SameSite=${c.sameSite}`,\n    \"partitioned\" in c && c.partitioned && \"Partitioned\",\n    \"priority\" in c && c.priority && `Priority=${c.priority}`\n  ].filter(Boolean);\n  const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : \"\")}`;\n  return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join(\"; \")}`;\n}\nfunction parseCookie(cookie) {\n  const map = /* @__PURE__ */ new Map();\n  for (const pair of cookie.split(/; */)) {\n    if (!pair)\n      continue;\n    const splitAt = pair.indexOf(\"=\");\n    if (splitAt === -1) {\n      map.set(pair, \"true\");\n      continue;\n    }\n    const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)];\n    try {\n      map.set(key, decodeURIComponent(value != null ? value : \"true\"));\n    } catch {\n    }\n  }\n  return map;\n}\nfunction parseSetCookie(setCookie) {\n  if (!setCookie) {\n    return void 0;\n  }\n  const [[name, value], ...attributes] = parseCookie(setCookie);\n  const {\n    domain,\n    expires,\n    httponly,\n    maxage,\n    path,\n    samesite,\n    secure,\n    partitioned,\n    priority\n  } = Object.fromEntries(\n    attributes.map(([key, value2]) => [\n      key.toLowerCase().replace(/-/g, \"\"),\n      value2\n    ])\n  );\n  const cookie = {\n    name,\n    value: decodeURIComponent(value),\n    domain,\n    ...expires && { expires: new Date(expires) },\n    ...httponly && { httpOnly: true },\n    ...typeof maxage === \"string\" && { maxAge: Number(maxage) },\n    path,\n    ...samesite && { sameSite: parseSameSite(samesite) },\n    ...secure && { secure: true },\n    ...priority && { priority: parsePriority(priority) },\n    ...partitioned && { partitioned: true }\n  };\n  return compact(cookie);\n}\nfunction compact(t) {\n  const newT = {};\n  for (const key in t) {\n    if (t[key]) {\n      newT[key] = t[key];\n    }\n  }\n  return newT;\n}\nvar SAME_SITE = [\"strict\", \"lax\", \"none\"];\nfunction parseSameSite(string) {\n  string = string.toLowerCase();\n  return SAME_SITE.includes(string) ? string : void 0;\n}\nvar PRIORITY = [\"low\", \"medium\", \"high\"];\nfunction parsePriority(string) {\n  string = string.toLowerCase();\n  return PRIORITY.includes(string) ? string : void 0;\n}\nfunction splitCookiesString(cookiesString) {\n  if (!cookiesString)\n    return [];\n  var cookiesStrings = [];\n  var pos = 0;\n  var start;\n  var ch;\n  var lastComma;\n  var nextStart;\n  var cookiesSeparatorFound;\n  function skipWhitespace() {\n    while (pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))) {\n      pos += 1;\n    }\n    return pos < cookiesString.length;\n  }\n  function notSpecialChar() {\n    ch = cookiesString.charAt(pos);\n    return ch !== \"=\" && ch !== \";\" && ch !== \",\";\n  }\n  while (pos < cookiesString.length) {\n    start = pos;\n    cookiesSeparatorFound = false;\n    while (skipWhitespace()) {\n      ch = cookiesString.charAt(pos);\n      if (ch === \",\") {\n        lastComma = pos;\n        pos += 1;\n        skipWhitespace();\n        nextStart = pos;\n        while (pos < cookiesString.length && notSpecialChar()) {\n          pos += 1;\n        }\n        if (pos < cookiesString.length && cookiesString.charAt(pos) === \"=\") {\n          cookiesSeparatorFound = true;\n          pos = nextStart;\n          cookiesStrings.push(cookiesString.substring(start, lastComma));\n          start = pos;\n        } else {\n          pos = lastComma + 1;\n        }\n      } else {\n        pos += 1;\n      }\n    }\n    if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n      cookiesStrings.push(cookiesString.substring(start, cookiesString.length));\n    }\n  }\n  return cookiesStrings;\n}\n\n// src/request-cookies.ts\nvar RequestCookies = class {\n  constructor(requestHeaders) {\n    /** @internal */\n    this._parsed = /* @__PURE__ */ new Map();\n    this._headers = requestHeaders;\n    const header = requestHeaders.get(\"cookie\");\n    if (header) {\n      const parsed = parseCookie(header);\n      for (const [name, value] of parsed) {\n        this._parsed.set(name, { name, value });\n      }\n    }\n  }\n  [Symbol.iterator]() {\n    return this._parsed[Symbol.iterator]();\n  }\n  /**\n   * The amount of cookies received from the client\n   */\n  get size() {\n    return this._parsed.size;\n  }\n  get(...args) {\n    const name = typeof args[0] === \"string\" ? args[0] : args[0].name;\n    return this._parsed.get(name);\n  }\n  getAll(...args) {\n    var _a;\n    const all = Array.from(this._parsed);\n    if (!args.length) {\n      return all.map(([_, value]) => value);\n    }\n    const name = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n    return all.filter(([n]) => n === name).map(([_, value]) => value);\n  }\n  has(name) {\n    return this._parsed.has(name);\n  }\n  set(...args) {\n    const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args;\n    const map = this._parsed;\n    map.set(name, { name, value });\n    this._headers.set(\n      \"cookie\",\n      Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join(\"; \")\n    );\n    return this;\n  }\n  /**\n   * Delete the cookies matching the passed name or names in the request.\n   */\n  delete(names) {\n    const map = this._parsed;\n    const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name));\n    this._headers.set(\n      \"cookie\",\n      Array.from(map).map(([_, value]) => stringifyCookie(value)).join(\"; \")\n    );\n    return result;\n  }\n  /**\n   * Delete all the cookies in the cookies in the request.\n   */\n  clear() {\n    this.delete(Array.from(this._parsed.keys()));\n    return this;\n  }\n  /**\n   * Format the cookies in the request as a string for logging\n   */\n  [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n    return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n  }\n  toString() {\n    return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join(\"; \");\n  }\n};\n\n// src/response-cookies.ts\nvar ResponseCookies = class {\n  constructor(responseHeaders) {\n    /** @internal */\n    this._parsed = /* @__PURE__ */ new Map();\n    var _a, _b, _c;\n    this._headers = responseHeaders;\n    const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get(\"set-cookie\")) != null ? _c : [];\n    const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie);\n    for (const cookieString of cookieStrings) {\n      const parsed = parseSetCookie(cookieString);\n      if (parsed)\n        this._parsed.set(parsed.name, parsed);\n    }\n  }\n  /**\n   * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise.\n   */\n  get(...args) {\n    const key = typeof args[0] === \"string\" ? args[0] : args[0].name;\n    return this._parsed.get(key);\n  }\n  /**\n   * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise.\n   */\n  getAll(...args) {\n    var _a;\n    const all = Array.from(this._parsed.values());\n    if (!args.length) {\n      return all;\n    }\n    const key = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n    return all.filter((c) => c.name === key);\n  }\n  has(name) {\n    return this._parsed.has(name);\n  }\n  /**\n   * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise.\n   */\n  set(...args) {\n    const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args;\n    const map = this._parsed;\n    map.set(name, normalizeCookie({ name, value, ...cookie }));\n    replace(map, this._headers);\n    return this;\n  }\n  /**\n   * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.\n   */\n  delete(...args) {\n    const [name, options] = typeof args[0] === \"string\" ? [args[0]] : [args[0].name, args[0]];\n    return this.set({ ...options, name, value: \"\", expires: /* @__PURE__ */ new Date(0) });\n  }\n  [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n    return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n  }\n  toString() {\n    return [...this._parsed.values()].map(stringifyCookie).join(\"; \");\n  }\n};\nfunction replace(bag, headers) {\n  headers.delete(\"set-cookie\");\n  for (const [, value] of bag) {\n    const serialized = stringifyCookie(value);\n    headers.append(\"set-cookie\", serialized);\n  }\n}\nfunction normalizeCookie(cookie = { name: \"\", value: \"\" }) {\n  if (typeof cookie.expires === \"number\") {\n    cookie.expires = new Date(cookie.expires);\n  }\n  if (cookie.maxAge) {\n    cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3);\n  }\n  if (cookie.path === null || cookie.path === void 0) {\n    cookie.path = \"/\";\n  }\n  return cookie;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  RequestCookies,\n  ResponseCookies,\n  parseCookie,\n  parseSetCookie,\n  stringifyCookie\n});\n","(function(){\"use strict\";var e={900:function(e,t,i){const{parseContentType:s}=i(318);function getInstance(e){const t=e.headers;const i=s(t[\"content-type\"]);if(!i)throw new Error(\"Malformed content type\");for(const s of r){const r=s.detect(i);if(!r)continue;const n={limits:e.limits,headers:t,conType:i,highWaterMark:undefined,fileHwm:undefined,defCharset:undefined,defParamCharset:undefined,preservePath:false};if(e.highWaterMark)n.highWaterMark=e.highWaterMark;if(e.fileHwm)n.fileHwm=e.fileHwm;n.defCharset=e.defCharset;n.defParamCharset=e.defParamCharset;n.preservePath=e.preservePath;return new s(n)}throw new Error(`Unsupported content type: ${t[\"content-type\"]}`)}const r=[i(104),i(506)].filter((function(e){return typeof e.detect===\"function\"}));e.exports=e=>{if(typeof e!==\"object\"||e===null)e={};if(typeof e.headers!==\"object\"||e.headers===null||typeof e.headers[\"content-type\"]!==\"string\"){throw new Error(\"Missing Content-Type\")}return getInstance(e)}},104:function(e,t,i){const{Readable:s,Writable:r}=i(781);const n=i(542);const{basename:a,convertToUTF8:o,getDecoder:f,parseContentType:l,parseDisposition:c}=i(318);const h=Buffer.from(\"\\r\\n\");const u=Buffer.from(\"\\r\");const d=Buffer.from(\"-\");function noop(){}const _=2e3;const b=16*1024;const p=0;const y=1;const m=2;class HeaderParser{constructor(e){this.header=Object.create(null);this.pairCount=0;this.byteCount=0;this.state=p;this.name=\"\";this.value=\"\";this.crlf=0;this.cb=e}reset(){this.header=Object.create(null);this.pairCount=0;this.byteCount=0;this.state=p;this.name=\"\";this.value=\"\";this.crlf=0}push(e,t,i){let s=t;while(t<i){switch(this.state){case p:{let r=false;for(;t<i;++t){if(this.byteCount===b)return-1;++this.byteCount;const i=e[t];if(g[i]!==1){if(i!==58)return-1;this.name+=e.latin1Slice(s,t);if(this.name.length===0)return-1;++t;r=true;this.state=y;break}}if(!r){this.name+=e.latin1Slice(s,t);break}}case y:{let r=false;for(;t<i;++t){if(this.byteCount===b)return-1;++this.byteCount;const i=e[t];if(i!==32&&i!==9){s=t;r=true;this.state=m;break}}if(!r)break}case m:switch(this.crlf){case 0:for(;t<i;++t){if(this.byteCount===b)return-1;++this.byteCount;const i=e[t];if(w[i]!==1){if(i!==13)return-1;++this.crlf;break}}this.value+=e.latin1Slice(s,t++);break;case 1:if(this.byteCount===b)return-1;++this.byteCount;if(e[t++]!==10)return-1;++this.crlf;break;case 2:{if(this.byteCount===b)return-1;++this.byteCount;const i=e[t];if(i===32||i===9){s=t;this.crlf=0}else{if(++this.pairCount<_){this.name=this.name.toLowerCase();if(this.header[this.name]===undefined)this.header[this.name]=[this.value];else this.header[this.name].push(this.value)}if(i===13){++this.crlf;++t}else{s=t;this.crlf=0;this.state=p;this.name=\"\";this.value=\"\"}}break}case 3:{if(this.byteCount===b)return-1;++this.byteCount;if(e[t++]!==10)return-1;const i=this.header;this.reset();this.cb(i);return t}}break}}return t}}class FileStream extends s{constructor(e,t){super(e);this.truncated=false;this._readcb=null;this.once(\"end\",(()=>{this._read();if(--t._fileEndsLeft===0&&t._finalcb){const e=t._finalcb;t._finalcb=null;process.nextTick(e)}}))}_read(e){const t=this._readcb;if(t){this._readcb=null;t()}}}const k={push:(e,t)=>{},destroy:()=>{}};function callAndUnsetCb(e,t){const i=e._writecb;e._writecb=null;if(t)e.destroy(t);else if(i)i()}function nullDecoder(e,t){return e}class Multipart extends r{constructor(e){const t={autoDestroy:true,emitClose:true,highWaterMark:typeof e.highWaterMark===\"number\"?e.highWaterMark:undefined};super(t);if(!e.conType.params||typeof e.conType.params.boundary!==\"string\")throw new Error(\"Multipart: Boundary not found\");const i=e.conType.params.boundary;const s=typeof e.defParamCharset===\"string\"&&e.defParamCharset?f(e.defParamCharset):nullDecoder;const r=e.defCharset||\"utf8\";const _=e.preservePath;const b={autoDestroy:true,emitClose:true,highWaterMark:typeof e.fileHwm===\"number\"?e.fileHwm:undefined};const p=e.limits;const y=p&&typeof p.fieldSize===\"number\"?p.fieldSize:1*1024*1024;const m=p&&typeof p.fileSize===\"number\"?p.fileSize:Infinity;const g=p&&typeof p.files===\"number\"?p.files:Infinity;const w=p&&typeof p.fields===\"number\"?p.fields:Infinity;const C=p&&typeof p.parts===\"number\"?p.parts:Infinity;let S=-1;let P=0;let T=0;let v=false;this._fileEndsLeft=0;this._fileStream=undefined;this._complete=false;let x=0;let z;let B=0;let E;let M;let L;let A;let K=false;let D=false;let U=false;this._hparser=null;const V=new HeaderParser((e=>{this._hparser=null;v=false;L=\"text/plain\";E=r;M=\"7bit\";A=undefined;K=false;let t;if(!e[\"content-disposition\"]){v=true;return}const i=c(e[\"content-disposition\"][0],s);if(!i||i.type!==\"form-data\"){v=true;return}if(i.params){if(i.params.name)A=i.params.name;if(i.params[\"filename*\"])t=i.params[\"filename*\"];else if(i.params.filename)t=i.params.filename;if(t!==undefined&&!_)t=a(t)}if(e[\"content-type\"]){const t=l(e[\"content-type\"][0]);if(t){L=`${t.type}/${t.subtype}`;if(t.params&&typeof t.params.charset===\"string\")E=t.params.charset.toLowerCase()}}if(e[\"content-transfer-encoding\"])M=e[\"content-transfer-encoding\"][0].toLowerCase();if(L===\"application/octet-stream\"||t!==undefined){if(T===g){if(!D){D=true;this.emit(\"filesLimit\")}v=true;return}++T;if(this.listenerCount(\"file\")===0){v=true;return}x=0;this._fileStream=new FileStream(b,this);++this._fileEndsLeft;this.emit(\"file\",A,this._fileStream,{filename:t,encoding:M,mimeType:L})}else{if(P===w){if(!U){U=true;this.emit(\"fieldsLimit\")}v=true;return}++P;if(this.listenerCount(\"field\")===0){v=true;return}z=[];B=0}}));let W=0;const ssCb=(e,t,i,s,r)=>{e:while(t){if(this._hparser!==null){const e=this._hparser.push(t,i,s);if(e===-1){this._hparser=null;V.reset();this.emit(\"error\",new Error(\"Malformed part header\"));break}i=e}if(i===s)break;if(W!==0){if(W===1){switch(t[i]){case 45:W=2;++i;break;case 13:W=3;++i;break;default:W=0}if(i===s)return}if(W===2){W=0;if(t[i]===45){this._complete=true;this._bparser=k;return}const e=this._writecb;this._writecb=noop;ssCb(false,d,0,1,false);this._writecb=e}else if(W===3){W=0;if(t[i]===10){++i;if(S>=C)break;this._hparser=V;if(i===s)break;continue e}else{const e=this._writecb;this._writecb=noop;ssCb(false,u,0,1,false);this._writecb=e}}}if(!v){if(this._fileStream){let e;const n=Math.min(s-i,m-x);if(!r){e=Buffer.allocUnsafe(n);t.copy(e,0,i,i+n)}else{e=t.slice(i,i+n)}x+=e.length;if(x===m){if(e.length>0)this._fileStream.push(e);this._fileStream.emit(\"limit\");this._fileStream.truncated=true;v=true}else if(!this._fileStream.push(e)){if(this._writecb)this._fileStream._readcb=this._writecb;this._writecb=null}}else if(z!==undefined){let e;const n=Math.min(s-i,y-B);if(!r){e=Buffer.allocUnsafe(n);t.copy(e,0,i,i+n)}else{e=t.slice(i,i+n)}B+=n;z.push(e);if(B===y){v=true;K=true}}}break}if(e){W=1;if(this._fileStream){this._fileStream.push(null);this._fileStream=null}else if(z!==undefined){let e;switch(z.length){case 0:e=\"\";break;case 1:e=o(z[0],E,0);break;default:e=o(Buffer.concat(z,B),E,0)}z=undefined;B=0;this.emit(\"field\",A,e,{nameTruncated:false,valueTruncated:K,encoding:M,mimeType:L})}if(++S===C)this.emit(\"partsLimit\")}};this._bparser=new n(`\\r\\n--${i}`,ssCb);this._writecb=null;this._finalcb=null;this.write(h)}static detect(e){return e.type===\"multipart\"&&e.subtype===\"form-data\"}_write(e,t,i){this._writecb=i;this._bparser.push(e,0);if(this._writecb)callAndUnsetCb(this)}_destroy(e,t){this._hparser=null;this._bparser=k;if(!e)e=checkEndState(this);const i=this._fileStream;if(i){this._fileStream=null;i.destroy(e)}t(e)}_final(e){this._bparser.destroy();if(!this._complete)return e(new Error(\"Unexpected end of form\"));if(this._fileEndsLeft)this._finalcb=finalcb.bind(null,this,e);else finalcb(this,e)}}function finalcb(e,t,i){if(i)return t(i);i=checkEndState(e);t(i)}function checkEndState(e){if(e._hparser)return new Error(\"Malformed part header\");const t=e._fileStream;if(t){e._fileStream=null;t.destroy(new Error(\"Unexpected end of file\"))}if(!e._complete)return new Error(\"Unexpected end of form\")}const g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];const w=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];e.exports=Multipart},506:function(e,t,i){const{Writable:s}=i(781);const{getDecoder:r}=i(318);class URLEncoded extends s{constructor(e){const t={autoDestroy:true,emitClose:true,highWaterMark:typeof e.highWaterMark===\"number\"?e.highWaterMark:undefined};super(t);let i=e.defCharset||\"utf8\";if(e.conType.params&&typeof e.conType.params.charset===\"string\")i=e.conType.params.charset;this.charset=i;const s=e.limits;this.fieldSizeLimit=s&&typeof s.fieldSize===\"number\"?s.fieldSize:1*1024*1024;this.fieldsLimit=s&&typeof s.fields===\"number\"?s.fields:Infinity;this.fieldNameSizeLimit=s&&typeof s.fieldNameSize===\"number\"?s.fieldNameSize:100;this._inKey=true;this._keyTrunc=false;this._valTrunc=false;this._bytesKey=0;this._bytesVal=0;this._fields=0;this._key=\"\";this._val=\"\";this._byte=-2;this._lastPos=0;this._encode=0;this._decoder=r(i)}static detect(e){return e.type===\"application\"&&e.subtype===\"x-www-form-urlencoded\"}_write(e,t,i){if(this._fields>=this.fieldsLimit)return i();let s=0;const r=e.length;this._lastPos=0;if(this._byte!==-2){s=readPctEnc(this,e,s,r);if(s===-1)return i(new Error(\"Malformed urlencoded form\"));if(s>=r)return i();if(this._inKey)++this._bytesKey;else++this._bytesVal}e:while(s<r){if(this._inKey){s=skipKeyBytes(this,e,s,r);while(s<r){switch(e[s]){case 61:if(this._lastPos<s)this._key+=e.latin1Slice(this._lastPos,s);this._lastPos=++s;this._key=this._decoder(this._key,this._encode);this._encode=0;this._inKey=false;continue e;case 38:if(this._lastPos<s)this._key+=e.latin1Slice(this._lastPos,s);this._lastPos=++s;this._key=this._decoder(this._key,this._encode);this._encode=0;if(this._bytesKey>0){this.emit(\"field\",this._key,\"\",{nameTruncated:this._keyTrunc,valueTruncated:false,encoding:this.charset,mimeType:\"text/plain\"})}this._key=\"\";this._val=\"\";this._keyTrunc=false;this._valTrunc=false;this._bytesKey=0;this._bytesVal=0;if(++this._fields>=this.fieldsLimit){this.emit(\"fieldsLimit\");return i()}continue;case 43:if(this._lastPos<s)this._key+=e.latin1Slice(this._lastPos,s);this._key+=\" \";this._lastPos=s+1;break;case 37:if(this._encode===0)this._encode=1;if(this._lastPos<s)this._key+=e.latin1Slice(this._lastPos,s);this._lastPos=s+1;this._byte=-1;s=readPctEnc(this,e,s+1,r);if(s===-1)return i(new Error(\"Malformed urlencoded form\"));if(s>=r)return i();++this._bytesKey;s=skipKeyBytes(this,e,s,r);continue}++s;++this._bytesKey;s=skipKeyBytes(this,e,s,r)}if(this._lastPos<s)this._key+=e.latin1Slice(this._lastPos,s)}else{s=skipValBytes(this,e,s,r);while(s<r){switch(e[s]){case 38:if(this._lastPos<s)this._val+=e.latin1Slice(this._lastPos,s);this._lastPos=++s;this._inKey=true;this._val=this._decoder(this._val,this._encode);this._encode=0;if(this._bytesKey>0||this._bytesVal>0){this.emit(\"field\",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:\"text/plain\"})}this._key=\"\";this._val=\"\";this._keyTrunc=false;this._valTrunc=false;this._bytesKey=0;this._bytesVal=0;if(++this._fields>=this.fieldsLimit){this.emit(\"fieldsLimit\");return i()}continue e;case 43:if(this._lastPos<s)this._val+=e.latin1Slice(this._lastPos,s);this._val+=\" \";this._lastPos=s+1;break;case 37:if(this._encode===0)this._encode=1;if(this._lastPos<s)this._val+=e.latin1Slice(this._lastPos,s);this._lastPos=s+1;this._byte=-1;s=readPctEnc(this,e,s+1,r);if(s===-1)return i(new Error(\"Malformed urlencoded form\"));if(s>=r)return i();++this._bytesVal;s=skipValBytes(this,e,s,r);continue}++s;++this._bytesVal;s=skipValBytes(this,e,s,r)}if(this._lastPos<s)this._val+=e.latin1Slice(this._lastPos,s)}}i()}_final(e){if(this._byte!==-2)return e(new Error(\"Malformed urlencoded form\"));if(!this._inKey||this._bytesKey>0||this._bytesVal>0){if(this._inKey)this._key=this._decoder(this._key,this._encode);else this._val=this._decoder(this._val,this._encode);this.emit(\"field\",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:\"text/plain\"})}e()}}function readPctEnc(e,t,i,s){if(i>=s)return s;if(e._byte===-1){const r=n[t[i++]];if(r===-1)return-1;if(r>=8)e._encode=2;if(i<s){const s=n[t[i++]];if(s===-1)return-1;if(e._inKey)e._key+=String.fromCharCode((r<<4)+s);else e._val+=String.fromCharCode((r<<4)+s);e._byte=-2;e._lastPos=i}else{e._byte=r}}else{const s=n[t[i++]];if(s===-1)return-1;if(e._inKey)e._key+=String.fromCharCode((e._byte<<4)+s);else e._val+=String.fromCharCode((e._byte<<4)+s);e._byte=-2;e._lastPos=i}return i}function skipKeyBytes(e,t,i,s){if(e._bytesKey>e.fieldNameSizeLimit){if(!e._keyTrunc){if(e._lastPos<i)e._key+=t.latin1Slice(e._lastPos,i-1)}e._keyTrunc=true;for(;i<s;++i){const s=t[i];if(s===61||s===38)break;++e._bytesKey}e._lastPos=i}return i}function skipValBytes(e,t,i,s){if(e._bytesVal>e.fieldSizeLimit){if(!e._valTrunc){if(e._lastPos<i)e._val+=t.latin1Slice(e._lastPos,i-1)}e._valTrunc=true;for(;i<s;++i){if(t[i]===38)break;++e._bytesVal}e._lastPos=i}return i}const n=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];e.exports=URLEncoded},318:function(e){function parseContentType(e){if(e.length===0)return;const t=Object.create(null);let s=0;for(;s<e.length;++s){const t=e.charCodeAt(s);if(i[t]!==1){if(t!==47||s===0)return;break}}if(s===e.length)return;const r=e.slice(0,s).toLowerCase();const n=++s;for(;s<e.length;++s){const r=e.charCodeAt(s);if(i[r]!==1){if(s===n)return;if(parseContentTypeParams(e,s,t)===undefined)return;break}}if(s===n)return;const a=e.slice(n,s).toLowerCase();return{type:r,subtype:a,params:t}}function parseContentTypeParams(e,t,r){while(t<e.length){for(;t<e.length;++t){const i=e.charCodeAt(t);if(i!==32&&i!==9)break}if(t===e.length)break;if(e.charCodeAt(t++)!==59)return;for(;t<e.length;++t){const i=e.charCodeAt(t);if(i!==32&&i!==9)break}if(t===e.length)return;let n;const a=t;for(;t<e.length;++t){const s=e.charCodeAt(t);if(i[s]!==1){if(s!==61)return;break}}if(t===e.length)return;n=e.slice(a,t);++t;if(t===e.length)return;let o=\"\";let f;if(e.charCodeAt(t)===34){f=++t;let i=false;for(;t<e.length;++t){const r=e.charCodeAt(t);if(r===92){if(i){f=t;i=false}else{o+=e.slice(f,t);i=true}continue}if(r===34){if(i){f=t;i=false;continue}o+=e.slice(f,t);break}if(i){f=t-1;i=false}if(s[r]!==1)return}if(t===e.length)return;++t}else{f=t;for(;t<e.length;++t){const s=e.charCodeAt(t);if(i[s]!==1){if(t===f)return;break}}o=e.slice(f,t)}n=n.toLowerCase();if(r[n]===undefined)r[n]=o}return r}function parseDisposition(e,t){if(e.length===0)return;const s=Object.create(null);let r=0;for(;r<e.length;++r){const n=e.charCodeAt(r);if(i[n]!==1){if(parseDispositionParams(e,r,s,t)===undefined)return;break}}const n=e.slice(0,r).toLowerCase();return{type:n,params:s}}function parseDispositionParams(e,t,o,f){while(t<e.length){for(;t<e.length;++t){const i=e.charCodeAt(t);if(i!==32&&i!==9)break}if(t===e.length)break;if(e.charCodeAt(t++)!==59)return;for(;t<e.length;++t){const i=e.charCodeAt(t);if(i!==32&&i!==9)break}if(t===e.length)return;let l;const c=t;for(;t<e.length;++t){const s=e.charCodeAt(t);if(i[s]!==1){if(s===61)break;return}}if(t===e.length)return;let h=\"\";let u;let d;l=e.slice(c,t);if(l.charCodeAt(l.length-1)===42){const i=++t;for(;t<e.length;++t){const i=e.charCodeAt(t);if(r[i]!==1){if(i!==39)return;break}}if(t===e.length)return;d=e.slice(i,t);++t;for(;t<e.length;++t){const i=e.charCodeAt(t);if(i===39)break}if(t===e.length)return;++t;if(t===e.length)return;u=t;let s=0;for(;t<e.length;++t){const i=e.charCodeAt(t);if(n[i]!==1){if(i===37){let i;let r;if(t+2<e.length&&(i=a[e.charCodeAt(t+1)])!==-1&&(r=a[e.charCodeAt(t+2)])!==-1){const n=(i<<4)+r;h+=e.slice(u,t);h+=String.fromCharCode(n);t+=2;u=t+1;if(n>=128)s=2;else if(s===0)s=1;continue}return}break}}h+=e.slice(u,t);h=convertToUTF8(h,d,s);if(h===undefined)return}else{++t;if(t===e.length)return;if(e.charCodeAt(t)===34){u=++t;let i=false;for(;t<e.length;++t){const r=e.charCodeAt(t);if(r===92){if(i){u=t;i=false}else{h+=e.slice(u,t);i=true}continue}if(r===34){if(i){u=t;i=false;continue}h+=e.slice(u,t);break}if(i){u=t-1;i=false}if(s[r]!==1)return}if(t===e.length)return;++t}else{u=t;for(;t<e.length;++t){const s=e.charCodeAt(t);if(i[s]!==1){if(t===u)return;break}}h=e.slice(u,t)}h=f(h,2);if(h===undefined)return}l=l.toLowerCase();if(o[l]===undefined)o[l]=h}return o}function getDecoder(e){let i;while(true){switch(e){case\"utf-8\":case\"utf8\":return t.utf8;case\"latin1\":case\"ascii\":case\"us-ascii\":case\"iso-8859-1\":case\"iso8859-1\":case\"iso88591\":case\"iso_8859-1\":case\"windows-1252\":case\"iso_8859-1:1987\":case\"cp1252\":case\"x-cp1252\":return t.latin1;case\"utf16le\":case\"utf-16le\":case\"ucs2\":case\"ucs-2\":return t.utf16le;case\"base64\":return t.base64;default:if(i===undefined){i=true;e=e.toLowerCase();continue}return t.other.bind(e)}}}const t={utf8:(e,t)=>{if(e.length===0)return\"\";if(typeof e===\"string\"){if(t<2)return e;e=Buffer.from(e,\"latin1\")}return e.utf8Slice(0,e.length)},latin1:(e,t)=>{if(e.length===0)return\"\";if(typeof e===\"string\")return e;return e.latin1Slice(0,e.length)},utf16le:(e,t)=>{if(e.length===0)return\"\";if(typeof e===\"string\")e=Buffer.from(e,\"latin1\");return e.ucs2Slice(0,e.length)},base64:(e,t)=>{if(e.length===0)return\"\";if(typeof e===\"string\")e=Buffer.from(e,\"latin1\");return e.base64Slice(0,e.length)},other:(e,t)=>{if(e.length===0)return\"\";if(typeof e===\"string\")e=Buffer.from(e,\"latin1\");try{const t=new TextDecoder(this);return t.decode(e)}catch{}}};function convertToUTF8(e,t,i){const s=getDecoder(t);if(s)return s(e,i)}function basename(e){if(typeof e!==\"string\")return\"\";for(let t=e.length-1;t>=0;--t){switch(e.charCodeAt(t)){case 47:case 92:e=e.slice(t+1);return e===\"..\"||e===\".\"?\"\":e}}return e===\"..\"||e===\".\"?\"\":e}const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];const s=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];e.exports={basename:basename,convertToUTF8:convertToUTF8,getDecoder:getDecoder,parseContentType:parseContentType,parseDisposition:parseDisposition}},542:function(e){function memcmp(e,t,i,s,r){for(let n=0;n<r;++n){if(e[t+n]!==i[s+n])return false}return true}class SBMH{constructor(e,t){if(typeof t!==\"function\")throw new Error(\"Missing match callback\");if(typeof e===\"string\")e=Buffer.from(e);else if(!Buffer.isBuffer(e))throw new Error(`Expected Buffer for needle, got ${typeof e}`);const i=e.length;this.maxMatches=Infinity;this.matches=0;this._cb=t;this._lookbehindSize=0;this._needle=e;this._bufPos=0;this._lookbehind=Buffer.allocUnsafe(i);this._occ=[i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i];if(i>1){for(let t=0;t<i-1;++t)this._occ[e[t]]=i-1-t}}reset(){this.matches=0;this._lookbehindSize=0;this._bufPos=0}push(e,t){let i;if(!Buffer.isBuffer(e))e=Buffer.from(e,\"latin1\");const s=e.length;this._bufPos=t||0;while(i!==s&&this.matches<this.maxMatches)i=feed(this,e);return i}destroy(){const e=this._lookbehindSize;if(e)this._cb(false,this._lookbehind,0,e,false);this.reset()}}function feed(e,t){const i=t.length;const s=e._needle;const r=s.length;let n=-e._lookbehindSize;const a=r-1;const o=s[a];const f=i-r;const l=e._occ;const c=e._lookbehind;if(n<0){while(n<0&&n<=f){const i=n+a;const s=i<0?c[e._lookbehindSize+i]:t[i];if(s===o&&matchNeedle(e,t,n,a)){e._lookbehindSize=0;++e.matches;if(n>-e._lookbehindSize)e._cb(true,c,0,e._lookbehindSize+n,false);else e._cb(true,undefined,0,0,true);return e._bufPos=n+r}n+=l[s]}while(n<0&&!matchNeedle(e,t,n,i-n))++n;if(n<0){const s=e._lookbehindSize+n;if(s>0){e._cb(false,c,0,s,false)}e._lookbehindSize-=s;c.copy(c,0,s,e._lookbehindSize);c.set(t,e._lookbehindSize);e._lookbehindSize+=i;e._bufPos=i;return i}e._cb(false,c,0,e._lookbehindSize,false);e._lookbehindSize=0}n+=e._bufPos;const h=s[0];while(n<=f){const i=t[n+a];if(i===o&&t[n]===h&&memcmp(s,0,t,n,a)){++e.matches;if(n>0)e._cb(true,t,e._bufPos,n,true);else e._cb(true,undefined,0,0,true);return e._bufPos=n+r}n+=l[i]}while(n<i){if(t[n]!==h||!memcmp(t,n,s,0,i-n)){++n;continue}t.copy(c,0,n,i);e._lookbehindSize=i-n;break}if(n>0)e._cb(false,t,e._bufPos,n<i?n:i,true);e._bufPos=i;return i}function matchNeedle(e,t,i,s){const r=e._lookbehind;const n=e._lookbehindSize;const a=e._needle;for(let e=0;e<s;++e,++i){const s=i<0?r[n+i]:t[i];if(s!==a[e])return false}return true}e.exports=SBMH},781:function(e){e.exports=require(\"stream\")}};var t={};function __nccwpck_require__(i){var s=t[i];if(s!==undefined){return s.exports}var r=t[i]={exports:{}};var n=true;try{e[i].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete t[i]}return r.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var i=__nccwpck_require__(900);module.exports=i})();","(()=>{\"use strict\";var e={56:e=>{\n/*!\n * bytes\n * Copyright(c) 2012-2014 TJ Holowaychuk\n * Copyright(c) 2015 Jed Watson\n * MIT Licensed\n */\ne.exports=bytes;e.exports.format=format;e.exports.parse=parse;var r=/\\B(?=(\\d{3})+(?!\\d))/g;var a=/(?:\\.0*|(\\.[^0]+)0+)$/;var t={b:1,kb:1<<10,mb:1<<20,gb:1<<30,tb:Math.pow(1024,4),pb:Math.pow(1024,5)};var i=/^((-|\\+)?(\\d+(?:\\.\\d+)?)) *(kb|mb|gb|tb|pb)$/i;function bytes(e,r){if(typeof e===\"string\"){return parse(e)}if(typeof e===\"number\"){return format(e,r)}return null}function format(e,i){if(!Number.isFinite(e)){return null}var n=Math.abs(e);var o=i&&i.thousandsSeparator||\"\";var s=i&&i.unitSeparator||\"\";var f=i&&i.decimalPlaces!==undefined?i.decimalPlaces:2;var u=Boolean(i&&i.fixedDecimals);var p=i&&i.unit||\"\";if(!p||!t[p.toLowerCase()]){if(n>=t.pb){p=\"PB\"}else if(n>=t.tb){p=\"TB\"}else if(n>=t.gb){p=\"GB\"}else if(n>=t.mb){p=\"MB\"}else if(n>=t.kb){p=\"KB\"}else{p=\"B\"}}var b=e/t[p.toLowerCase()];var l=b.toFixed(f);if(!u){l=l.replace(a,\"$1\")}if(o){l=l.split(\".\").map((function(e,a){return a===0?e.replace(r,o):e})).join(\".\")}return l+s+p}function parse(e){if(typeof e===\"number\"&&!isNaN(e)){return e}if(typeof e!==\"string\"){return null}var r=i.exec(e);var a;var n=\"b\";if(!r){a=parseInt(e,10);n=\"b\"}else{a=parseFloat(r[1]);n=r[4].toLowerCase()}return Math.floor(t[n]*a)}}};var r={};function __nccwpck_require__(a){var t=r[a];if(t!==undefined){return t.exports}var i=r[a]={exports:{}};var n=true;try{e[a](i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete r[a]}return i.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var a=__nccwpck_require__(56);module.exports=a})();","(()=>{\"use strict\";if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var e={};(()=>{var r=e;\n/*!\n * cookie\n * Copyright(c) 2012-2014 Roman Shtylman\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */r.parse=parse;r.serialize=serialize;var i=decodeURIComponent;var t=encodeURIComponent;var a=/; */;var n=/^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;function parse(e,r){if(typeof e!==\"string\"){throw new TypeError(\"argument str must be a string\")}var t={};var n=r||{};var o=e.split(a);var s=n.decode||i;for(var p=0;p<o.length;p++){var f=o[p];var u=f.indexOf(\"=\");if(u<0){continue}var v=f.substr(0,u).trim();var c=f.substr(++u,f.length).trim();if('\"'==c[0]){c=c.slice(1,-1)}if(undefined==t[v]){t[v]=tryDecode(c,s)}}return t}function serialize(e,r,i){var a=i||{};var o=a.encode||t;if(typeof o!==\"function\"){throw new TypeError(\"option encode is invalid\")}if(!n.test(e)){throw new TypeError(\"argument name is invalid\")}var s=o(r);if(s&&!n.test(s)){throw new TypeError(\"argument val is invalid\")}var p=e+\"=\"+s;if(null!=a.maxAge){var f=a.maxAge-0;if(isNaN(f)||!isFinite(f)){throw new TypeError(\"option maxAge is invalid\")}p+=\"; Max-Age=\"+Math.floor(f)}if(a.domain){if(!n.test(a.domain)){throw new TypeError(\"option domain is invalid\")}p+=\"; Domain=\"+a.domain}if(a.path){if(!n.test(a.path)){throw new TypeError(\"option path is invalid\")}p+=\"; Path=\"+a.path}if(a.expires){if(typeof a.expires.toUTCString!==\"function\"){throw new TypeError(\"option expires is invalid\")}p+=\"; Expires=\"+a.expires.toUTCString()}if(a.httpOnly){p+=\"; HttpOnly\"}if(a.secure){p+=\"; Secure\"}if(a.sameSite){var u=typeof a.sameSite===\"string\"?a.sameSite.toLowerCase():a.sameSite;switch(u){case true:p+=\"; SameSite=Strict\";break;case\"lax\":p+=\"; SameSite=Lax\";break;case\"strict\":p+=\"; SameSite=Strict\";break;case\"none\":p+=\"; SameSite=None\";break;default:throw new TypeError(\"option sameSite is invalid\")}}return p}function tryDecode(e,r){try{return r(e)}catch(r){return e}}})();module.exports=e})();","(()=>{\"use strict\";var e={993:e=>{var t=Object.prototype.hasOwnProperty,n=\"~\";function Events(){}if(Object.create){Events.prototype=Object.create(null);if(!(new Events).__proto__)n=false}function EE(e,t,n){this.fn=e;this.context=t;this.once=n||false}function addListener(e,t,r,i,s){if(typeof r!==\"function\"){throw new TypeError(\"The listener must be a function\")}var o=new EE(r,i||e,s),u=n?n+t:t;if(!e._events[u])e._events[u]=o,e._eventsCount++;else if(!e._events[u].fn)e._events[u].push(o);else e._events[u]=[e._events[u],o];return e}function clearEvent(e,t){if(--e._eventsCount===0)e._events=new Events;else delete e._events[t]}function EventEmitter(){this._events=new Events;this._eventsCount=0}EventEmitter.prototype.eventNames=function eventNames(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events){if(t.call(r,i))e.push(n?i.slice(1):i)}if(Object.getOwnPropertySymbols){return e.concat(Object.getOwnPropertySymbols(r))}return e};EventEmitter.prototype.listeners=function listeners(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,o=new Array(s);i<s;i++){o[i]=r[i].fn}return o};EventEmitter.prototype.listenerCount=function listenerCount(e){var t=n?n+e:e,r=this._events[t];if(!r)return 0;if(r.fn)return 1;return r.length};EventEmitter.prototype.emit=function emit(e,t,r,i,s,o){var u=n?n+e:e;if(!this._events[u])return false;var a=this._events[u],l=arguments.length,c,h;if(a.fn){if(a.once)this.removeListener(e,a.fn,undefined,true);switch(l){case 1:return a.fn.call(a.context),true;case 2:return a.fn.call(a.context,t),true;case 3:return a.fn.call(a.context,t,r),true;case 4:return a.fn.call(a.context,t,r,i),true;case 5:return a.fn.call(a.context,t,r,i,s),true;case 6:return a.fn.call(a.context,t,r,i,s,o),true}for(h=1,c=new Array(l-1);h<l;h++){c[h-1]=arguments[h]}a.fn.apply(a.context,c)}else{var _=a.length,f;for(h=0;h<_;h++){if(a[h].once)this.removeListener(e,a[h].fn,undefined,true);switch(l){case 1:a[h].fn.call(a[h].context);break;case 2:a[h].fn.call(a[h].context,t);break;case 3:a[h].fn.call(a[h].context,t,r);break;case 4:a[h].fn.call(a[h].context,t,r,i);break;default:if(!c)for(f=1,c=new Array(l-1);f<l;f++){c[f-1]=arguments[f]}a[h].fn.apply(a[h].context,c)}}}return true};EventEmitter.prototype.on=function on(e,t,n){return addListener(this,e,t,n,false)};EventEmitter.prototype.once=function once(e,t,n){return addListener(this,e,t,n,true)};EventEmitter.prototype.removeListener=function removeListener(e,t,r,i){var s=n?n+e:e;if(!this._events[s])return this;if(!t){clearEvent(this,s);return this}var o=this._events[s];if(o.fn){if(o.fn===t&&(!i||o.once)&&(!r||o.context===r)){clearEvent(this,s)}}else{for(var u=0,a=[],l=o.length;u<l;u++){if(o[u].fn!==t||i&&!o[u].once||r&&o[u].context!==r){a.push(o[u])}}if(a.length)this._events[s]=a.length===1?a[0]:a;else clearEvent(this,s)}return this};EventEmitter.prototype.removeAllListeners=function removeAllListeners(e){var t;if(e){t=n?n+e:e;if(this._events[t])clearEvent(this,t)}else{this._events=new Events;this._eventsCount=0}return this};EventEmitter.prototype.off=EventEmitter.prototype.removeListener;EventEmitter.prototype.addListener=EventEmitter.prototype.on;EventEmitter.prefixed=n;EventEmitter.EventEmitter=EventEmitter;if(true){e.exports=EventEmitter}},213:e=>{e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},574:(e,t)=>{Object.defineProperty(t,\"__esModule\",{value:true});function lowerBound(e,t,n){let r=0;let i=e.length;while(i>0){const s=i/2|0;let o=r+s;if(n(e[o],t)<=0){r=++o;i-=s+1}else{i=s}}return r}t[\"default\"]=lowerBound},821:(e,t,n)=>{Object.defineProperty(t,\"__esModule\",{value:true});const r=n(574);class PriorityQueue{constructor(){this._queue=[]}enqueue(e,t){t=Object.assign({priority:0},t);const n={priority:t.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(n);return}const i=r.default(this._queue,n,((e,t)=>t.priority-e.priority));this._queue.splice(i,0,n)}dequeue(){const e=this._queue.shift();return e===null||e===void 0?void 0:e.run}filter(e){return this._queue.filter((t=>t.priority===e.priority)).map((e=>e.run))}get size(){return this._queue.length}}t[\"default\"]=PriorityQueue},816:(e,t,n)=>{const r=n(213);class TimeoutError extends Error{constructor(e){super(e);this.name=\"TimeoutError\"}}const pTimeout=(e,t,n)=>new Promise(((i,s)=>{if(typeof t!==\"number\"||t<0){throw new TypeError(\"Expected `milliseconds` to be a positive number\")}if(t===Infinity){i(e);return}const o=setTimeout((()=>{if(typeof n===\"function\"){try{i(n())}catch(e){s(e)}return}const r=typeof n===\"string\"?n:`Promise timed out after ${t} milliseconds`;const o=n instanceof Error?n:new TimeoutError(r);if(typeof e.cancel===\"function\"){e.cancel()}s(o)}),t);r(e.then(i,s),(()=>{clearTimeout(o)}))}));e.exports=pTimeout;e.exports[\"default\"]=pTimeout;e.exports.TimeoutError=TimeoutError}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return i.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var n={};(()=>{var e=n;Object.defineProperty(e,\"__esModule\",{value:true});const t=__nccwpck_require__(993);const r=__nccwpck_require__(816);const i=__nccwpck_require__(821);const empty=()=>{};const s=new r.TimeoutError;class PQueue extends t{constructor(e){var t,n,r,s;super();this._intervalCount=0;this._intervalEnd=0;this._pendingCount=0;this._resolveEmpty=empty;this._resolveIdle=empty;e=Object.assign({carryoverConcurrencyCount:false,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:true,queueClass:i.default},e);if(!(typeof e.intervalCap===\"number\"&&e.intervalCap>=1)){throw new TypeError(`Expected \\`intervalCap\\` to be a number from 1 and up, got \\`${(n=(t=e.intervalCap)===null||t===void 0?void 0:t.toString())!==null&&n!==void 0?n:\"\"}\\` (${typeof e.intervalCap})`)}if(e.interval===undefined||!(Number.isFinite(e.interval)&&e.interval>=0)){throw new TypeError(`Expected \\`interval\\` to be a finite number >= 0, got \\`${(s=(r=e.interval)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:\"\"}\\` (${typeof e.interval})`)}this._carryoverConcurrencyCount=e.carryoverConcurrencyCount;this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0;this._intervalCap=e.intervalCap;this._interval=e.interval;this._queue=new e.queueClass;this._queueClass=e.queueClass;this.concurrency=e.concurrency;this._timeout=e.timeout;this._throwOnTimeout=e.throwOnTimeout===true;this._isPaused=e.autoStart===false}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--;this._tryToStartAnother();this.emit(\"next\")}_resolvePromises(){this._resolveEmpty();this._resolveEmpty=empty;if(this._pendingCount===0){this._resolveIdle();this._resolveIdle=empty;this.emit(\"idle\")}}_onResumeInterval(){this._onInterval();this._initializeIntervalIfNeeded();this._timeoutId=undefined}_isIntervalPaused(){const e=Date.now();if(this._intervalId===undefined){const t=this._intervalEnd-e;if(t<0){this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}else{if(this._timeoutId===undefined){this._timeoutId=setTimeout((()=>{this._onResumeInterval()}),t)}return true}}return false}_tryToStartAnother(){if(this._queue.size===0){if(this._intervalId){clearInterval(this._intervalId)}this._intervalId=undefined;this._resolvePromises();return false}if(!this._isPaused){const e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){const t=this._queue.dequeue();if(!t){return false}this.emit(\"active\");t();if(e){this._initializeIntervalIfNeeded()}return true}}return false}_initializeIntervalIfNeeded(){if(this._isIntervalIgnored||this._intervalId!==undefined){return}this._intervalId=setInterval((()=>{this._onInterval()}),this._interval);this._intervalEnd=Date.now()+this._interval}_onInterval(){if(this._intervalCount===0&&this._pendingCount===0&&this._intervalId){clearInterval(this._intervalId);this._intervalId=undefined}this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;this._processQueue()}_processQueue(){while(this._tryToStartAnother()){}}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e===\"number\"&&e>=1)){throw new TypeError(`Expected \\`concurrency\\` to be a number from 1 and up, got \\`${e}\\` (${typeof e})`)}this._concurrency=e;this._processQueue()}async add(e,t={}){return new Promise(((n,i)=>{const run=async()=>{this._pendingCount++;this._intervalCount++;try{const o=this._timeout===undefined&&t.timeout===undefined?e():r.default(Promise.resolve(e()),t.timeout===undefined?this._timeout:t.timeout,(()=>{if(t.throwOnTimeout===undefined?this._throwOnTimeout:t.throwOnTimeout){i(s)}return undefined}));n(await o)}catch(e){i(e)}this._next()};this._queue.enqueue(run,t);this._tryToStartAnother();this.emit(\"add\")}))}async addAll(e,t){return Promise.all(e.map((async e=>this.add(e,t))))}start(){if(!this._isPaused){return this}this._isPaused=false;this._processQueue();return this}pause(){this._isPaused=true}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size===0){return}return new Promise((e=>{const t=this._resolveEmpty;this._resolveEmpty=()=>{t();e()}}))}async onIdle(){if(this._pendingCount===0&&this._queue.size===0){return}return new Promise((e=>{const t=this._resolveIdle;this._resolveIdle=()=>{t();e()}}))}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}e[\"default\"]=PQueue})();module.exports=n})();","(()=>{\"use strict\";if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var e={};(()=>{var n=e;Object.defineProperty(n,\"__esModule\",{value:true});n.pathToRegexp=n.tokensToRegexp=n.regexpToFunction=n.match=n.tokensToFunction=n.compile=n.parse=void 0;function lexer(e){var n=[];var r=0;while(r<e.length){var t=e[r];if(t===\"*\"||t===\"+\"||t===\"?\"){n.push({type:\"MODIFIER\",index:r,value:e[r++]});continue}if(t===\"\\\\\"){n.push({type:\"ESCAPED_CHAR\",index:r++,value:e[r++]});continue}if(t===\"{\"){n.push({type:\"OPEN\",index:r,value:e[r++]});continue}if(t===\"}\"){n.push({type:\"CLOSE\",index:r,value:e[r++]});continue}if(t===\":\"){var a=\"\";var i=r+1;while(i<e.length){var o=e.charCodeAt(i);if(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||o===95){a+=e[i++];continue}break}if(!a)throw new TypeError(\"Missing parameter name at \".concat(r));n.push({type:\"NAME\",index:r,value:a});r=i;continue}if(t===\"(\"){var c=1;var f=\"\";var i=r+1;if(e[i]===\"?\"){throw new TypeError('Pattern cannot start with \"?\" at '.concat(i))}while(i<e.length){if(e[i]===\"\\\\\"){f+=e[i++]+e[i++];continue}if(e[i]===\")\"){c--;if(c===0){i++;break}}else if(e[i]===\"(\"){c++;if(e[i+1]!==\"?\"){throw new TypeError(\"Capturing groups are not allowed at \".concat(i))}}f+=e[i++]}if(c)throw new TypeError(\"Unbalanced pattern at \".concat(r));if(!f)throw new TypeError(\"Missing pattern at \".concat(r));n.push({type:\"PATTERN\",index:r,value:f});r=i;continue}n.push({type:\"CHAR\",index:r,value:e[r++]})}n.push({type:\"END\",index:r,value:\"\"});return n}function parse(e,n){if(n===void 0){n={}}var r=lexer(e);var t=n.prefixes,a=t===void 0?\"./\":t,i=n.delimiter,o=i===void 0?\"/#?\":i;var c=[];var f=0;var u=0;var p=\"\";var tryConsume=function(e){if(u<r.length&&r[u].type===e)return r[u++].value};var mustConsume=function(e){var n=tryConsume(e);if(n!==undefined)return n;var t=r[u],a=t.type,i=t.index;throw new TypeError(\"Unexpected \".concat(a,\" at \").concat(i,\", expected \").concat(e))};var consumeText=function(){var e=\"\";var n;while(n=tryConsume(\"CHAR\")||tryConsume(\"ESCAPED_CHAR\")){e+=n}return e};var isSafe=function(e){for(var n=0,r=o;n<r.length;n++){var t=r[n];if(e.indexOf(t)>-1)return true}return false};var safePattern=function(e){var n=c[c.length-1];var r=e||(n&&typeof n===\"string\"?n:\"\");if(n&&!r){throw new TypeError('Must have text between two parameters, missing text after \"'.concat(n.name,'\"'))}if(!r||isSafe(r))return\"[^\".concat(escapeString(o),\"]+?\");return\"(?:(?!\".concat(escapeString(r),\")[^\").concat(escapeString(o),\"])+?\")};while(u<r.length){var v=tryConsume(\"CHAR\");var s=tryConsume(\"NAME\");var d=tryConsume(\"PATTERN\");if(s||d){var g=v||\"\";if(a.indexOf(g)===-1){p+=g;g=\"\"}if(p){c.push(p);p=\"\"}c.push({name:s||f++,prefix:g,suffix:\"\",pattern:d||safePattern(g),modifier:tryConsume(\"MODIFIER\")||\"\"});continue}var x=v||tryConsume(\"ESCAPED_CHAR\");if(x){p+=x;continue}if(p){c.push(p);p=\"\"}var h=tryConsume(\"OPEN\");if(h){var g=consumeText();var l=tryConsume(\"NAME\")||\"\";var m=tryConsume(\"PATTERN\")||\"\";var T=consumeText();mustConsume(\"CLOSE\");c.push({name:l||(m?f++:\"\"),pattern:l&&!m?safePattern(g):m,prefix:g,suffix:T,modifier:tryConsume(\"MODIFIER\")||\"\"});continue}mustConsume(\"END\")}return c}n.parse=parse;function compile(e,n){return tokensToFunction(parse(e,n),n)}n.compile=compile;function tokensToFunction(e,n){if(n===void 0){n={}}var r=flags(n);var t=n.encode,a=t===void 0?function(e){return e}:t,i=n.validate,o=i===void 0?true:i;var c=e.map((function(e){if(typeof e===\"object\"){return new RegExp(\"^(?:\".concat(e.pattern,\")$\"),r)}}));return function(n){var r=\"\";for(var t=0;t<e.length;t++){var i=e[t];if(typeof i===\"string\"){r+=i;continue}var f=n?n[i.name]:undefined;var u=i.modifier===\"?\"||i.modifier===\"*\";var p=i.modifier===\"*\"||i.modifier===\"+\";if(Array.isArray(f)){if(!p){throw new TypeError('Expected \"'.concat(i.name,'\" to not repeat, but got an array'))}if(f.length===0){if(u)continue;throw new TypeError('Expected \"'.concat(i.name,'\" to not be empty'))}for(var v=0;v<f.length;v++){var s=a(f[v],i);if(o&&!c[t].test(s)){throw new TypeError('Expected all \"'.concat(i.name,'\" to match \"').concat(i.pattern,'\", but got \"').concat(s,'\"'))}r+=i.prefix+s+i.suffix}continue}if(typeof f===\"string\"||typeof f===\"number\"){var s=a(String(f),i);if(o&&!c[t].test(s)){throw new TypeError('Expected \"'.concat(i.name,'\" to match \"').concat(i.pattern,'\", but got \"').concat(s,'\"'))}r+=i.prefix+s+i.suffix;continue}if(u)continue;var d=p?\"an array\":\"a string\";throw new TypeError('Expected \"'.concat(i.name,'\" to be ').concat(d))}return r}}n.tokensToFunction=tokensToFunction;function match(e,n){var r=[];var t=pathToRegexp(e,r,n);return regexpToFunction(t,r,n)}n.match=match;function regexpToFunction(e,n,r){if(r===void 0){r={}}var t=r.decode,a=t===void 0?function(e){return e}:t;return function(r){var t=e.exec(r);if(!t)return false;var i=t[0],o=t.index;var c=Object.create(null);var _loop_1=function(e){if(t[e]===undefined)return\"continue\";var r=n[e-1];if(r.modifier===\"*\"||r.modifier===\"+\"){c[r.name]=t[e].split(r.prefix+r.suffix).map((function(e){return a(e,r)}))}else{c[r.name]=a(t[e],r)}};for(var f=1;f<t.length;f++){_loop_1(f)}return{path:i,index:o,params:c}}}n.regexpToFunction=regexpToFunction;function escapeString(e){return e.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g,\"\\\\$1\")}function flags(e){return e&&e.sensitive?\"\":\"i\"}function regexpToRegexp(e,n){if(!n)return e;var r=/\\((?:\\?<(.*?)>)?(?!\\?)/g;var t=0;var a=r.exec(e.source);while(a){n.push({name:a[1]||t++,prefix:\"\",suffix:\"\",modifier:\"\",pattern:\"\"});a=r.exec(e.source)}return e}function arrayToRegexp(e,n,r){var t=e.map((function(e){return pathToRegexp(e,n,r).source}));return new RegExp(\"(?:\".concat(t.join(\"|\"),\")\"),flags(r))}function stringToRegexp(e,n,r){return tokensToRegexp(parse(e,r),n,r)}function tokensToRegexp(e,n,r){if(r===void 0){r={}}var t=r.strict,a=t===void 0?false:t,i=r.start,o=i===void 0?true:i,c=r.end,f=c===void 0?true:c,u=r.encode,p=u===void 0?function(e){return e}:u,v=r.delimiter,s=v===void 0?\"/#?\":v,d=r.endsWith,g=d===void 0?\"\":d;var x=\"[\".concat(escapeString(g),\"]|$\");var h=\"[\".concat(escapeString(s),\"]\");var l=o?\"^\":\"\";for(var m=0,T=e;m<T.length;m++){var E=T[m];if(typeof E===\"string\"){l+=escapeString(p(E))}else{var w=escapeString(p(E.prefix));var y=escapeString(p(E.suffix));if(E.pattern){if(n)n.push(E);if(w||y){if(E.modifier===\"+\"||E.modifier===\"*\"){var R=E.modifier===\"*\"?\"?\":\"\";l+=\"(?:\".concat(w,\"((?:\").concat(E.pattern,\")(?:\").concat(y).concat(w,\"(?:\").concat(E.pattern,\"))*)\").concat(y,\")\").concat(R)}else{l+=\"(?:\".concat(w,\"(\").concat(E.pattern,\")\").concat(y,\")\").concat(E.modifier)}}else{if(E.modifier===\"+\"||E.modifier===\"*\"){throw new TypeError('Can not repeat \"'.concat(E.name,'\" without a prefix and suffix'))}l+=\"(\".concat(E.pattern,\")\").concat(E.modifier)}}else{l+=\"(?:\".concat(w).concat(y,\")\").concat(E.modifier)}}}if(f){if(!a)l+=\"\".concat(h,\"?\");l+=!r.endsWith?\"$\":\"(?=\".concat(x,\")\")}else{var A=e[e.length-1];var _=typeof A===\"string\"?h.indexOf(A[A.length-1])>-1:A===undefined;if(!a){l+=\"(?:\".concat(h,\"(?=\").concat(x,\"))?\")}if(!_){l+=\"(?=\".concat(h,\"|\").concat(x,\")\")}}return new RegExp(l,flags(r))}n.tokensToRegexp=tokensToRegexp;function pathToRegexp(e,n,r){if(e instanceof RegExp)return regexpToRegexp(e,n);if(Array.isArray(e))return arrayToRegexp(e,n,r);return stringToRegexp(e,n,r)}n.pathToRegexp=pathToRegexp})();module.exports=e})();","/**\n * @license React\n * react-dom-server.node.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function styleReplacer(match, prefix, s, suffix) {\n      return \"\" + prefix + (\"s\" === s ? \"\\\\73 \" : \"\\\\53 \") + suffix;\n    }\n    function scriptReplacer(match, prefix, s, suffix) {\n      return \"\" + prefix + (\"s\" === s ? \"\\\\u0073\" : \"\\\\u0053\") + suffix;\n    }\n    function getIteratorFn(maybeIterable) {\n      if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n        return null;\n      maybeIterable =\n        (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n        maybeIterable[\"@@iterator\"];\n      return \"function\" === typeof maybeIterable ? maybeIterable : null;\n    }\n    function objectName(object) {\n      object = Object.prototype.toString.call(object);\n      return object.slice(8, object.length - 1);\n    }\n    function describeKeyForErrorMessage(key) {\n      var encodedKey = JSON.stringify(key);\n      return '\"' + key + '\"' === encodedKey ? key : encodedKey;\n    }\n    function describeValueForErrorMessage(value) {\n      switch (typeof value) {\n        case \"string\":\n          return JSON.stringify(\n            10 >= value.length ? value : value.slice(0, 10) + \"...\"\n          );\n        case \"object\":\n          if (isArrayImpl(value)) return \"[...]\";\n          if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG)\n            return \"client\";\n          value = objectName(value);\n          return \"Object\" === value ? \"{...}\" : value;\n        case \"function\":\n          return value.$$typeof === CLIENT_REFERENCE_TAG\n            ? \"client\"\n            : (value = value.displayName || value.name)\n              ? \"function \" + value\n              : \"function\";\n        default:\n          return String(value);\n      }\n    }\n    function describeElementType(type) {\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (type.$$typeof) {\n          case REACT_FORWARD_REF_TYPE:\n            return describeElementType(type.render);\n          case REACT_MEMO_TYPE:\n            return describeElementType(type.type);\n          case REACT_LAZY_TYPE:\n            var payload = type._payload;\n            type = type._init;\n            try {\n              return describeElementType(type(payload));\n            } catch (x) {}\n        }\n      return \"\";\n    }\n    function describeObjectForErrorMessage(objectOrArray, expandedName) {\n      var objKind = objectName(objectOrArray);\n      if (\"Object\" !== objKind && \"Array\" !== objKind) return objKind;\n      var start = -1,\n        length = 0;\n      if (isArrayImpl(objectOrArray))\n        if (jsxChildrenParents.has(objectOrArray)) {\n          var type = jsxChildrenParents.get(objectOrArray);\n          objKind = \"<\" + describeElementType(type) + \">\";\n          for (var i = 0; i < objectOrArray.length; i++) {\n            var value = objectOrArray[i];\n            value =\n              \"string\" === typeof value\n                ? value\n                : \"object\" === typeof value && null !== value\n                  ? \"{\" + describeObjectForErrorMessage(value) + \"}\"\n                  : \"{\" + describeValueForErrorMessage(value) + \"}\";\n            \"\" + i === expandedName\n              ? ((start = objKind.length),\n                (length = value.length),\n                (objKind += value))\n              : (objKind =\n                  15 > value.length && 40 > objKind.length + value.length\n                    ? objKind + value\n                    : objKind + \"{...}\");\n          }\n          objKind += \"</\" + describeElementType(type) + \">\";\n        } else {\n          objKind = \"[\";\n          for (type = 0; type < objectOrArray.length; type++)\n            0 < type && (objKind += \", \"),\n              (i = objectOrArray[type]),\n              (i =\n                \"object\" === typeof i && null !== i\n                  ? describeObjectForErrorMessage(i)\n                  : describeValueForErrorMessage(i)),\n              \"\" + type === expandedName\n                ? ((start = objKind.length),\n                  (length = i.length),\n                  (objKind += i))\n                : (objKind =\n                    10 > i.length && 40 > objKind.length + i.length\n                      ? objKind + i\n                      : objKind + \"...\");\n          objKind += \"]\";\n        }\n      else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE)\n        objKind = \"<\" + describeElementType(objectOrArray.type) + \"/>\";\n      else {\n        if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return \"client\";\n        if (jsxPropsParents.has(objectOrArray)) {\n          objKind = jsxPropsParents.get(objectOrArray);\n          objKind = \"<\" + (describeElementType(objKind) || \"...\");\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++) {\n            objKind += \" \";\n            value = type[i];\n            objKind += describeKeyForErrorMessage(value) + \"=\";\n            var _value2 = objectOrArray[value];\n            var _substr2 =\n              value === expandedName &&\n              \"object\" === typeof _value2 &&\n              null !== _value2\n                ? describeObjectForErrorMessage(_value2)\n                : describeValueForErrorMessage(_value2);\n            \"string\" !== typeof _value2 && (_substr2 = \"{\" + _substr2 + \"}\");\n            value === expandedName\n              ? ((start = objKind.length),\n                (length = _substr2.length),\n                (objKind += _substr2))\n              : (objKind =\n                  10 > _substr2.length && 40 > objKind.length + _substr2.length\n                    ? objKind + _substr2\n                    : objKind + \"...\");\n          }\n          objKind += \">\";\n        } else {\n          objKind = \"{\";\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++)\n            0 < i && (objKind += \", \"),\n              (value = type[i]),\n              (objKind += describeKeyForErrorMessage(value) + \": \"),\n              (_value2 = objectOrArray[value]),\n              (_value2 =\n                \"object\" === typeof _value2 && null !== _value2\n                  ? describeObjectForErrorMessage(_value2)\n                  : describeValueForErrorMessage(_value2)),\n              value === expandedName\n                ? ((start = objKind.length),\n                  (length = _value2.length),\n                  (objKind += _value2))\n                : (objKind =\n                    10 > _value2.length && 40 > objKind.length + _value2.length\n                      ? objKind + _value2\n                      : objKind + \"...\");\n          objKind += \"}\";\n        }\n      }\n      return void 0 === expandedName\n        ? objKind\n        : -1 < start && 0 < length\n          ? ((objectOrArray = \" \".repeat(start) + \"^\".repeat(length)),\n            \"\\n  \" + objKind + \"\\n  \" + objectOrArray)\n          : \"\\n  \" + objKind;\n    }\n    function flushBuffered(destination) {\n      \"function\" === typeof destination.flush && destination.flush();\n    }\n    function writeChunk(destination, chunk) {\n      if (\"string\" === typeof chunk) {\n        if (0 !== chunk.length)\n          if (4096 < 3 * chunk.length)\n            0 < writtenBytes &&\n              (writeToDestination(\n                destination,\n                currentView.subarray(0, writtenBytes)\n              ),\n              (currentView = new Uint8Array(4096)),\n              (writtenBytes = 0)),\n              writeToDestination(destination, chunk);\n          else {\n            var target = currentView;\n            0 < writtenBytes && (target = currentView.subarray(writtenBytes));\n            target = textEncoder.encodeInto(chunk, target);\n            var read = target.read;\n            writtenBytes += target.written;\n            read < chunk.length &&\n              (writeToDestination(\n                destination,\n                currentView.subarray(0, writtenBytes)\n              ),\n              (currentView = new Uint8Array(4096)),\n              (writtenBytes = textEncoder.encodeInto(\n                chunk.slice(read),\n                currentView\n              ).written));\n            4096 === writtenBytes &&\n              (writeToDestination(destination, currentView),\n              (currentView = new Uint8Array(4096)),\n              (writtenBytes = 0));\n          }\n      } else\n        0 !== chunk.byteLength &&\n          (4096 < chunk.byteLength\n            ? (0 < writtenBytes &&\n                (writeToDestination(\n                  destination,\n                  currentView.subarray(0, writtenBytes)\n                ),\n                (currentView = new Uint8Array(4096)),\n                (writtenBytes = 0)),\n              writeToDestination(destination, chunk))\n            : ((target = currentView.length - writtenBytes),\n              target < chunk.byteLength &&\n                (0 === target\n                  ? writeToDestination(destination, currentView)\n                  : (currentView.set(chunk.subarray(0, target), writtenBytes),\n                    (writtenBytes += target),\n                    writeToDestination(destination, currentView),\n                    (chunk = chunk.subarray(target))),\n                (currentView = new Uint8Array(4096)),\n                (writtenBytes = 0)),\n              currentView.set(chunk, writtenBytes),\n              (writtenBytes += chunk.byteLength),\n              4096 === writtenBytes &&\n                (writeToDestination(destination, currentView),\n                (currentView = new Uint8Array(4096)),\n                (writtenBytes = 0))));\n    }\n    function writeToDestination(destination, view) {\n      destination = destination.write(view);\n      destinationHasCapacity$1 = destinationHasCapacity$1 && destination;\n    }\n    function writeChunkAndReturn(destination, chunk) {\n      writeChunk(destination, chunk);\n      return destinationHasCapacity$1;\n    }\n    function completeWriting(destination) {\n      currentView &&\n        0 < writtenBytes &&\n        destination.write(currentView.subarray(0, writtenBytes));\n      currentView = null;\n      writtenBytes = 0;\n      destinationHasCapacity$1 = !0;\n    }\n    function stringToPrecomputedChunk(content) {\n      content = textEncoder.encode(content);\n      4096 < content.byteLength &&\n        console.error(\n          \"precomputed chunks must be smaller than the view size configured for this host. This is a bug in React.\"\n        );\n      return content;\n    }\n    function byteLengthOfChunk(chunk) {\n      return \"string\" === typeof chunk\n        ? Buffer.byteLength(chunk, \"utf8\")\n        : chunk.byteLength;\n    }\n    function typeName(value) {\n      return (\n        (\"function\" === typeof Symbol &&\n          Symbol.toStringTag &&\n          value[Symbol.toStringTag]) ||\n        value.constructor.name ||\n        \"Object\"\n      );\n    }\n    function willCoercionThrow(value) {\n      try {\n        return testStringCoercion(value), !1;\n      } catch (e) {\n        return !0;\n      }\n    }\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkAttributeStringCoercion(value, attributeName) {\n      if (willCoercionThrow(value))\n        return (\n          console.error(\n            \"The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.\",\n            attributeName,\n            typeName(value)\n          ),\n          testStringCoercion(value)\n        );\n    }\n    function checkCSSPropertyStringCoercion(value, propName) {\n      if (willCoercionThrow(value))\n        return (\n          console.error(\n            \"The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.\",\n            propName,\n            typeName(value)\n          ),\n          testStringCoercion(value)\n        );\n    }\n    function checkHtmlStringCoercion(value) {\n      if (willCoercionThrow(value))\n        return (\n          console.error(\n            \"The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.\",\n            typeName(value)\n          ),\n          testStringCoercion(value)\n        );\n    }\n    function isAttributeNameSafe(attributeName) {\n      if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))\n        return !0;\n      if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))\n        return !1;\n      if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))\n        return (validatedAttributeNameCache[attributeName] = !0);\n      illegalAttributeNameCache[attributeName] = !0;\n      console.error(\"Invalid attribute name: `%s`\", attributeName);\n      return !1;\n    }\n    function checkControlledValueProps(tagName, props) {\n      hasReadOnlyValue[props.type] ||\n        props.onChange ||\n        props.onInput ||\n        props.readOnly ||\n        props.disabled ||\n        null == props.value ||\n        (\"select\" === tagName\n          ? console.error(\n              \"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.\"\n            )\n          : console.error(\n              \"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.\"\n            ));\n      props.onChange ||\n        props.readOnly ||\n        props.disabled ||\n        null == props.checked ||\n        console.error(\n          \"You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.\"\n        );\n    }\n    function validateProperty$1(tagName, name) {\n      if (\n        hasOwnProperty.call(warnedProperties$1, name) &&\n        warnedProperties$1[name]\n      )\n        return !0;\n      if (rARIACamel$1.test(name)) {\n        tagName = \"aria-\" + name.slice(4).toLowerCase();\n        tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;\n        if (null == tagName)\n          return (\n            console.error(\n              \"Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.\",\n              name\n            ),\n            (warnedProperties$1[name] = !0)\n          );\n        if (name !== tagName)\n          return (\n            console.error(\n              \"Invalid ARIA attribute `%s`. Did you mean `%s`?\",\n              name,\n              tagName\n            ),\n            (warnedProperties$1[name] = !0)\n          );\n      }\n      if (rARIA$1.test(name)) {\n        tagName = name.toLowerCase();\n        tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;\n        if (null == tagName) return (warnedProperties$1[name] = !0), !1;\n        name !== tagName &&\n          (console.error(\n            \"Unknown ARIA attribute `%s`. Did you mean `%s`?\",\n            name,\n            tagName\n          ),\n          (warnedProperties$1[name] = !0));\n      }\n      return !0;\n    }\n    function validateProperties$2(type, props) {\n      var invalidProps = [],\n        key;\n      for (key in props)\n        validateProperty$1(type, key) || invalidProps.push(key);\n      props = invalidProps\n        .map(function (prop) {\n          return \"`\" + prop + \"`\";\n        })\n        .join(\", \");\n      1 === invalidProps.length\n        ? console.error(\n            \"Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props\",\n            props,\n            type\n          )\n        : 1 < invalidProps.length &&\n          console.error(\n            \"Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props\",\n            props,\n            type\n          );\n    }\n    function validateProperty(tagName, name, value, eventRegistry) {\n      if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name])\n        return !0;\n      var lowerCasedName = name.toLowerCase();\n      if (\"onfocusin\" === lowerCasedName || \"onfocusout\" === lowerCasedName)\n        return (\n          console.error(\n            \"React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React.\"\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\n        \"function\" === typeof value &&\n        ((\"form\" === tagName && \"action\" === name) ||\n          (\"input\" === tagName && \"formAction\" === name) ||\n          (\"button\" === tagName && \"formAction\" === name))\n      )\n        return !0;\n      if (null != eventRegistry) {\n        tagName = eventRegistry.possibleRegistrationNames;\n        if (eventRegistry.registrationNameDependencies.hasOwnProperty(name))\n          return !0;\n        eventRegistry = tagName.hasOwnProperty(lowerCasedName)\n          ? tagName[lowerCasedName]\n          : null;\n        if (null != eventRegistry)\n          return (\n            console.error(\n              \"Invalid event handler property `%s`. Did you mean `%s`?\",\n              name,\n              eventRegistry\n            ),\n            (warnedProperties[name] = !0)\n          );\n        if (EVENT_NAME_REGEX.test(name))\n          return (\n            console.error(\n              \"Unknown event handler property `%s`. It will be ignored.\",\n              name\n            ),\n            (warnedProperties[name] = !0)\n          );\n      } else if (EVENT_NAME_REGEX.test(name))\n        return (\n          INVALID_EVENT_NAME_REGEX.test(name) &&\n            console.error(\n              \"Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.\",\n              name\n            ),\n          (warnedProperties[name] = !0)\n        );\n      if (rARIA.test(name) || rARIACamel.test(name)) return !0;\n      if (\"innerhtml\" === lowerCasedName)\n        return (\n          console.error(\n            \"Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`.\"\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\"aria\" === lowerCasedName)\n        return (\n          console.error(\n            \"The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead.\"\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\n        \"is\" === lowerCasedName &&\n        null !== value &&\n        void 0 !== value &&\n        \"string\" !== typeof value\n      )\n        return (\n          console.error(\n            \"Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.\",\n            typeof value\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (\"number\" === typeof value && isNaN(value))\n        return (\n          console.error(\n            \"Received NaN for the `%s` attribute. If this is expected, cast the value to a string.\",\n            name\n          ),\n          (warnedProperties[name] = !0)\n        );\n      if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n        if (\n          ((lowerCasedName = possibleStandardNames[lowerCasedName]),\n          lowerCasedName !== name)\n        )\n          return (\n            console.error(\n              \"Invalid DOM property `%s`. Did you mean `%s`?\",\n              name,\n              lowerCasedName\n            ),\n            (warnedProperties[name] = !0)\n          );\n      } else if (name !== lowerCasedName)\n        return (\n          console.error(\n            \"React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.\",\n            name,\n            lowerCasedName\n          ),\n          (warnedProperties[name] = !0)\n        );\n      switch (name) {\n        case \"dangerouslySetInnerHTML\":\n        case \"children\":\n        case \"style\":\n        case \"suppressContentEditableWarning\":\n        case \"suppressHydrationWarning\":\n        case \"defaultValue\":\n        case \"defaultChecked\":\n        case \"innerHTML\":\n        case \"ref\":\n          return !0;\n        case \"innerText\":\n        case \"textContent\":\n          return !0;\n      }\n      switch (typeof value) {\n        case \"boolean\":\n          switch (name) {\n            case \"autoFocus\":\n            case \"checked\":\n            case \"multiple\":\n            case \"muted\":\n            case \"selected\":\n            case \"contentEditable\":\n            case \"spellCheck\":\n            case \"draggable\":\n            case \"value\":\n            case \"autoReverse\":\n            case \"externalResourcesRequired\":\n            case \"focusable\":\n            case \"preserveAlpha\":\n            case \"allowFullScreen\":\n            case \"async\":\n            case \"autoPlay\":\n            case \"controls\":\n            case \"default\":\n            case \"defer\":\n            case \"disabled\":\n            case \"disablePictureInPicture\":\n            case \"disableRemotePlayback\":\n            case \"formNoValidate\":\n            case \"hidden\":\n            case \"loop\":\n            case \"noModule\":\n            case \"noValidate\":\n            case \"open\":\n            case \"playsInline\":\n            case \"readOnly\":\n            case \"required\":\n            case \"reversed\":\n            case \"scoped\":\n            case \"seamless\":\n            case \"itemScope\":\n            case \"capture\":\n            case \"download\":\n            case \"inert\":\n              return !0;\n            default:\n              lowerCasedName = name.toLowerCase().slice(0, 5);\n              if (\"data-\" === lowerCasedName || \"aria-\" === lowerCasedName)\n                return !0;\n              value\n                ? console.error(\n                    'Received `%s` for a non-boolean attribute `%s`.\\n\\nIf you want to write it to the DOM, pass a string instead: %s=\"%s\" or %s={value.toString()}.',\n                    value,\n                    name,\n                    name,\n                    value,\n                    name\n                  )\n                : console.error(\n                    'Received `%s` for a non-boolean attribute `%s`.\\n\\nIf you want to write it to the DOM, pass a string instead: %s=\"%s\" or %s={value.toString()}.\\n\\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',\n                    value,\n                    name,\n                    name,\n                    value,\n                    name,\n                    name,\n                    name\n                  );\n              return (warnedProperties[name] = !0);\n          }\n        case \"function\":\n        case \"symbol\":\n          return (warnedProperties[name] = !0), !1;\n        case \"string\":\n          if (\"false\" === value || \"true\" === value) {\n            switch (name) {\n              case \"checked\":\n              case \"selected\":\n              case \"multiple\":\n              case \"muted\":\n              case \"allowFullScreen\":\n              case \"async\":\n              case \"autoPlay\":\n              case \"controls\":\n              case \"default\":\n              case \"defer\":\n              case \"disabled\":\n              case \"disablePictureInPicture\":\n              case \"disableRemotePlayback\":\n              case \"formNoValidate\":\n              case \"hidden\":\n              case \"loop\":\n              case \"noModule\":\n              case \"noValidate\":\n              case \"open\":\n              case \"playsInline\":\n              case \"readOnly\":\n              case \"required\":\n              case \"reversed\":\n              case \"scoped\":\n              case \"seamless\":\n              case \"itemScope\":\n              case \"inert\":\n                break;\n              default:\n                return !0;\n            }\n            console.error(\n              \"Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?\",\n              value,\n              name,\n              \"false\" === value\n                ? \"The browser will interpret it as a truthy value.\"\n                : 'Although this works, it will not work as expected if you pass the string \"false\".',\n              name,\n              value\n            );\n            warnedProperties[name] = !0;\n          }\n      }\n      return !0;\n    }\n    function warnUnknownProperties(type, props, eventRegistry) {\n      var unknownProps = [],\n        key;\n      for (key in props)\n        validateProperty(type, key, props[key], eventRegistry) ||\n          unknownProps.push(key);\n      props = unknownProps\n        .map(function (prop) {\n          return \"`\" + prop + \"`\";\n        })\n        .join(\", \");\n      1 === unknownProps.length\n        ? console.error(\n            \"Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior \",\n            props,\n            type\n          )\n        : 1 < unknownProps.length &&\n          console.error(\n            \"Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior \",\n            props,\n            type\n          );\n    }\n    function camelize(string) {\n      return string.replace(hyphenPattern, function (_, character) {\n        return character.toUpperCase();\n      });\n    }\n    function escapeTextForBrowser(text) {\n      if (\n        \"boolean\" === typeof text ||\n        \"number\" === typeof text ||\n        \"bigint\" === typeof text\n      )\n        return \"\" + text;\n      checkHtmlStringCoercion(text);\n      text = \"\" + text;\n      var match = matchHtmlRegExp.exec(text);\n      if (match) {\n        var html = \"\",\n          index,\n          lastIndex = 0;\n        for (index = match.index; index < text.length; index++) {\n          switch (text.charCodeAt(index)) {\n            case 34:\n              match = \"&quot;\";\n              break;\n            case 38:\n              match = \"&amp;\";\n              break;\n            case 39:\n              match = \"&#x27;\";\n              break;\n            case 60:\n              match = \"&lt;\";\n              break;\n            case 62:\n              match = \"&gt;\";\n              break;\n            default:\n              continue;\n          }\n          lastIndex !== index && (html += text.slice(lastIndex, index));\n          lastIndex = index + 1;\n          html += match;\n        }\n        text = lastIndex !== index ? html + text.slice(lastIndex, index) : html;\n      }\n      return text;\n    }\n    function sanitizeURL(url) {\n      return isJavaScriptProtocol.test(\"\" + url)\n        ? \"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')\"\n        : url;\n    }\n    function escapeEntireInlineScriptContent(scriptText) {\n      checkHtmlStringCoercion(scriptText);\n      return (\"\" + scriptText).replace(scriptRegex, scriptReplacer);\n    }\n    function createRenderState(\n      resumableState,\n      nonce,\n      externalRuntimeConfig,\n      importMap,\n      onHeaders,\n      maxHeadersLength\n    ) {\n      externalRuntimeConfig =\n        \"string\" === typeof nonce ? nonce : nonce && nonce.script;\n      var inlineScriptWithNonce =\n          void 0 === externalRuntimeConfig\n            ? startInlineScript\n            : stringToPrecomputedChunk(\n                '<script nonce=\"' +\n                  escapeTextForBrowser(externalRuntimeConfig) +\n                  '\"'\n              ),\n        nonceStyle = \"string\" === typeof nonce ? void 0 : nonce && nonce.style,\n        inlineStyleWithNonce =\n          void 0 === nonceStyle\n            ? startInlineStyle\n            : stringToPrecomputedChunk(\n                '<style nonce=\"' + escapeTextForBrowser(nonceStyle) + '\"'\n              ),\n        idPrefix = resumableState.idPrefix,\n        bootstrapChunks = [],\n        bootstrapScriptContent = resumableState.bootstrapScriptContent,\n        bootstrapScripts = resumableState.bootstrapScripts,\n        bootstrapModules = resumableState.bootstrapModules;\n      void 0 !== bootstrapScriptContent &&\n        (bootstrapChunks.push(inlineScriptWithNonce),\n        pushCompletedShellIdAttribute(bootstrapChunks, resumableState),\n        bootstrapChunks.push(\n          endOfStartTag,\n          escapeEntireInlineScriptContent(bootstrapScriptContent),\n          endInlineScript\n        ));\n      bootstrapScriptContent = [];\n      void 0 !== importMap &&\n        (bootstrapScriptContent.push(importMapScriptStart),\n        bootstrapScriptContent.push(\n          escapeEntireInlineScriptContent(JSON.stringify(importMap))\n        ),\n        bootstrapScriptContent.push(importMapScriptEnd));\n      onHeaders &&\n        \"number\" === typeof maxHeadersLength &&\n        0 >= maxHeadersLength &&\n        console.error(\n          \"React expected a positive non-zero `maxHeadersLength` option but found %s instead. When using the `onHeaders` option you may supply an optional `maxHeadersLength` option as well however, when setting this value to zero or less no headers will be captured.\",\n          0 === maxHeadersLength ? \"zero\" : maxHeadersLength\n        );\n      importMap = onHeaders\n        ? {\n            preconnects: \"\",\n            fontPreloads: \"\",\n            highImagePreloads: \"\",\n            remainingCapacity:\n              2 +\n              (\"number\" === typeof maxHeadersLength ? maxHeadersLength : 2e3)\n          }\n        : null;\n      onHeaders = {\n        placeholderPrefix: stringToPrecomputedChunk(idPrefix + \"P:\"),\n        segmentPrefix: stringToPrecomputedChunk(idPrefix + \"S:\"),\n        boundaryPrefix: stringToPrecomputedChunk(idPrefix + \"B:\"),\n        startInlineScript: inlineScriptWithNonce,\n        startInlineStyle: inlineStyleWithNonce,\n        preamble: createPreambleState(),\n        externalRuntimeScript: null,\n        bootstrapChunks: bootstrapChunks,\n        importMapChunks: bootstrapScriptContent,\n        onHeaders: onHeaders,\n        headers: importMap,\n        resets: {\n          font: {},\n          dns: {},\n          connect: { default: {}, anonymous: {}, credentials: {} },\n          image: {},\n          style: {}\n        },\n        charsetChunks: [],\n        viewportChunks: [],\n        hoistableChunks: [],\n        preconnects: new Set(),\n        fontPreloads: new Set(),\n        highImagePreloads: new Set(),\n        styles: new Map(),\n        bootstrapScripts: new Set(),\n        scripts: new Set(),\n        bulkPreloads: new Set(),\n        preloads: {\n          images: new Map(),\n          stylesheets: new Map(),\n          scripts: new Map(),\n          moduleScripts: new Map()\n        },\n        nonce: { script: externalRuntimeConfig, style: nonceStyle },\n        hoistableState: null,\n        stylesToHoist: !1\n      };\n      if (void 0 !== bootstrapScripts)\n        for (importMap = 0; importMap < bootstrapScripts.length; importMap++)\n          (maxHeadersLength = bootstrapScripts[importMap]),\n            (inlineStyleWithNonce = nonceStyle = void 0),\n            (idPrefix = {\n              rel: \"preload\",\n              as: \"script\",\n              fetchPriority: \"low\",\n              nonce: nonce\n            }),\n            \"string\" === typeof maxHeadersLength\n              ? (idPrefix.href = inlineScriptWithNonce = maxHeadersLength)\n              : ((idPrefix.href = inlineScriptWithNonce = maxHeadersLength.src),\n                (idPrefix.integrity = inlineStyleWithNonce =\n                  \"string\" === typeof maxHeadersLength.integrity\n                    ? maxHeadersLength.integrity\n                    : void 0),\n                (idPrefix.crossOrigin = nonceStyle =\n                  \"string\" === typeof maxHeadersLength ||\n                  null == maxHeadersLength.crossOrigin\n                    ? void 0\n                    : \"use-credentials\" === maxHeadersLength.crossOrigin\n                      ? \"use-credentials\"\n                      : \"\")),\n            preloadBootstrapScriptOrModule(\n              resumableState,\n              onHeaders,\n              inlineScriptWithNonce,\n              idPrefix\n            ),\n            bootstrapChunks.push(\n              startScriptSrc,\n              escapeTextForBrowser(inlineScriptWithNonce),\n              attributeEnd\n            ),\n            externalRuntimeConfig &&\n              bootstrapChunks.push(\n                scriptNonce,\n                escapeTextForBrowser(externalRuntimeConfig),\n                attributeEnd\n              ),\n            \"string\" === typeof inlineStyleWithNonce &&\n              bootstrapChunks.push(\n                scriptIntegirty,\n                escapeTextForBrowser(inlineStyleWithNonce),\n                attributeEnd\n              ),\n            \"string\" === typeof nonceStyle &&\n              bootstrapChunks.push(\n                scriptCrossOrigin,\n                escapeTextForBrowser(nonceStyle),\n                attributeEnd\n              ),\n            pushCompletedShellIdAttribute(bootstrapChunks, resumableState),\n            bootstrapChunks.push(endAsyncScript);\n      if (void 0 !== bootstrapModules)\n        for (nonce = 0; nonce < bootstrapModules.length; nonce++)\n          (bootstrapScripts = bootstrapModules[nonce]),\n            (inlineScriptWithNonce = maxHeadersLength = void 0),\n            (nonceStyle = {\n              rel: \"modulepreload\",\n              fetchPriority: \"low\",\n              nonce: externalRuntimeConfig\n            }),\n            \"string\" === typeof bootstrapScripts\n              ? (nonceStyle.href = importMap = bootstrapScripts)\n              : ((nonceStyle.href = importMap = bootstrapScripts.src),\n                (nonceStyle.integrity = inlineScriptWithNonce =\n                  \"string\" === typeof bootstrapScripts.integrity\n                    ? bootstrapScripts.integrity\n                    : void 0),\n                (nonceStyle.crossOrigin = maxHeadersLength =\n                  \"string\" === typeof bootstrapScripts ||\n                  null == bootstrapScripts.crossOrigin\n                    ? void 0\n                    : \"use-credentials\" === bootstrapScripts.crossOrigin\n                      ? \"use-credentials\"\n                      : \"\")),\n            preloadBootstrapScriptOrModule(\n              resumableState,\n              onHeaders,\n              importMap,\n              nonceStyle\n            ),\n            bootstrapChunks.push(\n              startModuleSrc,\n              escapeTextForBrowser(importMap),\n              attributeEnd\n            ),\n            externalRuntimeConfig &&\n              bootstrapChunks.push(\n                scriptNonce,\n                escapeTextForBrowser(externalRuntimeConfig),\n                attributeEnd\n              ),\n            \"string\" === typeof inlineScriptWithNonce &&\n              bootstrapChunks.push(\n                scriptIntegirty,\n                escapeTextForBrowser(inlineScriptWithNonce),\n                attributeEnd\n              ),\n            \"string\" === typeof maxHeadersLength &&\n              bootstrapChunks.push(\n                scriptCrossOrigin,\n                escapeTextForBrowser(maxHeadersLength),\n                attributeEnd\n              ),\n            pushCompletedShellIdAttribute(bootstrapChunks, resumableState),\n            bootstrapChunks.push(endAsyncScript);\n      return onHeaders;\n    }\n    function createResumableState(\n      identifierPrefix,\n      externalRuntimeConfig,\n      bootstrapScriptContent,\n      bootstrapScripts,\n      bootstrapModules\n    ) {\n      return {\n        idPrefix: void 0 === identifierPrefix ? \"\" : identifierPrefix,\n        nextFormID: 0,\n        streamingFormat: 0,\n        bootstrapScriptContent: bootstrapScriptContent,\n        bootstrapScripts: bootstrapScripts,\n        bootstrapModules: bootstrapModules,\n        instructions: NothingSent,\n        hasBody: !1,\n        hasHtml: !1,\n        unknownResources: {},\n        dnsResources: {},\n        connectResources: { default: {}, anonymous: {}, credentials: {} },\n        imageResources: {},\n        styleResources: {},\n        scriptResources: {},\n        moduleUnknownResources: {},\n        moduleScriptResources: {}\n      };\n    }\n    function createPreambleState() {\n      return { htmlChunks: null, headChunks: null, bodyChunks: null };\n    }\n    function createFormatContext(\n      insertionMode,\n      selectedValue,\n      tagScope,\n      viewTransition\n    ) {\n      return {\n        insertionMode: insertionMode,\n        selectedValue: selectedValue,\n        tagScope: tagScope,\n        viewTransition: viewTransition\n      };\n    }\n    function createRootFormatContext(namespaceURI) {\n      return createFormatContext(\n        \"http://www.w3.org/2000/svg\" === namespaceURI\n          ? SVG_MODE\n          : \"http://www.w3.org/1998/Math/MathML\" === namespaceURI\n            ? MATHML_MODE\n            : ROOT_HTML_MODE,\n        null,\n        0,\n        null\n      );\n    }\n    function getChildFormatContext(parentContext, type, props) {\n      var subtreeScope = parentContext.tagScope & -25;\n      switch (type) {\n        case \"noscript\":\n          return createFormatContext(HTML_MODE, null, subtreeScope | 1, null);\n        case \"select\":\n          return createFormatContext(\n            HTML_MODE,\n            null != props.value ? props.value : props.defaultValue,\n            subtreeScope,\n            null\n          );\n        case \"svg\":\n          return createFormatContext(SVG_MODE, null, subtreeScope, null);\n        case \"picture\":\n          return createFormatContext(HTML_MODE, null, subtreeScope | 2, null);\n        case \"math\":\n          return createFormatContext(MATHML_MODE, null, subtreeScope, null);\n        case \"foreignObject\":\n          return createFormatContext(HTML_MODE, null, subtreeScope, null);\n        case \"table\":\n          return createFormatContext(HTML_TABLE_MODE, null, subtreeScope, null);\n        case \"thead\":\n        case \"tbody\":\n        case \"tfoot\":\n          return createFormatContext(\n            HTML_TABLE_BODY_MODE,\n            null,\n            subtreeScope,\n            null\n          );\n        case \"colgroup\":\n          return createFormatContext(\n            HTML_COLGROUP_MODE,\n            null,\n            subtreeScope,\n            null\n          );\n        case \"tr\":\n          return createFormatContext(\n            HTML_TABLE_ROW_MODE,\n            null,\n            subtreeScope,\n            null\n          );\n        case \"head\":\n          if (parentContext.insertionMode < HTML_MODE)\n            return createFormatContext(\n              HTML_HEAD_MODE,\n              null,\n              subtreeScope,\n              null\n            );\n          break;\n        case \"html\":\n          if (parentContext.insertionMode === ROOT_HTML_MODE)\n            return createFormatContext(\n              HTML_HTML_MODE,\n              null,\n              subtreeScope,\n              null\n            );\n      }\n      return parentContext.insertionMode >= HTML_TABLE_MODE ||\n        parentContext.insertionMode < HTML_MODE\n        ? createFormatContext(HTML_MODE, null, subtreeScope, null)\n        : null !== parentContext.viewTransition ||\n            parentContext.tagScope !== subtreeScope\n          ? createFormatContext(\n              parentContext.insertionMode,\n              parentContext.selectedValue,\n              subtreeScope,\n              null\n            )\n          : parentContext;\n    }\n    function getSuspenseViewTransition(parentViewTransition) {\n      return null === parentViewTransition\n        ? null\n        : {\n            update: parentViewTransition.update,\n            enter: \"none\",\n            exit: \"none\",\n            share: parentViewTransition.update,\n            name: parentViewTransition.autoName,\n            autoName: parentViewTransition.autoName,\n            nameIdx: 0\n          };\n    }\n    function getSuspenseFallbackFormatContext(resumableState, parentContext) {\n      parentContext.tagScope & 32 &&\n        (resumableState.instructions |= NeedUpgradeToViewTransitions);\n      return createFormatContext(\n        parentContext.insertionMode,\n        parentContext.selectedValue,\n        parentContext.tagScope | 12,\n        getSuspenseViewTransition(parentContext.viewTransition)\n      );\n    }\n    function getSuspenseContentFormatContext(resumableState, parentContext) {\n      resumableState = getSuspenseViewTransition(parentContext.viewTransition);\n      var subtreeScope = parentContext.tagScope | 16;\n      null !== resumableState &&\n        \"none\" !== resumableState.share &&\n        (subtreeScope |= 64);\n      return createFormatContext(\n        parentContext.insertionMode,\n        parentContext.selectedValue,\n        subtreeScope,\n        resumableState\n      );\n    }\n    function makeId(resumableState, treeId, localId) {\n      resumableState = \"_\" + resumableState.idPrefix + \"R_\" + treeId;\n      0 < localId && (resumableState += \"H\" + localId.toString(32));\n      return resumableState + \"_\";\n    }\n    function pushTextInstance(target, text, renderState, textEmbedded) {\n      if (\"\" === text) return textEmbedded;\n      textEmbedded && target.push(textSeparator);\n      target.push(escapeTextForBrowser(text));\n      return !0;\n    }\n    function pushViewTransitionAttributes(target, formatContext) {\n      formatContext = formatContext.viewTransition;\n      null !== formatContext &&\n        (\"auto\" !== formatContext.name &&\n          (pushStringAttribute(\n            target,\n            \"vt-name\",\n            0 === formatContext.nameIdx\n              ? formatContext.name\n              : formatContext.name + \"_\" + formatContext.nameIdx\n          ),\n          formatContext.nameIdx++),\n        pushStringAttribute(target, \"vt-update\", formatContext.update),\n        \"none\" !== formatContext.enter &&\n          pushStringAttribute(target, \"vt-enter\", formatContext.enter),\n        \"none\" !== formatContext.exit &&\n          pushStringAttribute(target, \"vt-exit\", formatContext.exit),\n        \"none\" !== formatContext.share &&\n          pushStringAttribute(target, \"vt-share\", formatContext.share));\n    }\n    function pushStyleAttribute(target, style) {\n      if (\"object\" !== typeof style)\n        throw Error(\n          \"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.\"\n        );\n      var isFirst = !0,\n        styleName;\n      for (styleName in style)\n        if (hasOwnProperty.call(style, styleName)) {\n          var styleValue = style[styleName];\n          if (\n            null != styleValue &&\n            \"boolean\" !== typeof styleValue &&\n            \"\" !== styleValue\n          ) {\n            if (0 === styleName.indexOf(\"--\")) {\n              var nameChunk = escapeTextForBrowser(styleName);\n              checkCSSPropertyStringCoercion(styleValue, styleName);\n              styleValue = escapeTextForBrowser((\"\" + styleValue).trim());\n            } else {\n              nameChunk = styleName;\n              var value = styleValue;\n              if (-1 < nameChunk.indexOf(\"-\")) {\n                var name = nameChunk;\n                (warnedStyleNames.hasOwnProperty(name) &&\n                  warnedStyleNames[name]) ||\n                  ((warnedStyleNames[name] = !0),\n                  console.error(\n                    \"Unsupported style property %s. Did you mean %s?\",\n                    name,\n                    camelize(name.replace(msPattern$1, \"ms-\"))\n                  ));\n              } else if (badVendoredStyleNamePattern.test(nameChunk))\n                (name = nameChunk),\n                  (warnedStyleNames.hasOwnProperty(name) &&\n                    warnedStyleNames[name]) ||\n                    ((warnedStyleNames[name] = !0),\n                    console.error(\n                      \"Unsupported vendor-prefixed style property %s. Did you mean %s?\",\n                      name,\n                      name.charAt(0).toUpperCase() + name.slice(1)\n                    ));\n              else if (badStyleValueWithSemicolonPattern.test(value)) {\n                name = nameChunk;\n                var value$jscomp$0 = value;\n                (warnedStyleValues.hasOwnProperty(value$jscomp$0) &&\n                  warnedStyleValues[value$jscomp$0]) ||\n                  ((warnedStyleValues[value$jscomp$0] = !0),\n                  console.error(\n                    'Style property values shouldn\\'t contain a semicolon. Try \"%s: %s\" instead.',\n                    name,\n                    value$jscomp$0.replace(\n                      badStyleValueWithSemicolonPattern,\n                      \"\"\n                    )\n                  ));\n              }\n              \"number\" === typeof value &&\n                (isNaN(value)\n                  ? warnedForNaNValue ||\n                    ((warnedForNaNValue = !0),\n                    console.error(\n                      \"`NaN` is an invalid value for the `%s` css style property.\",\n                      nameChunk\n                    ))\n                  : isFinite(value) ||\n                    warnedForInfinityValue ||\n                    ((warnedForInfinityValue = !0),\n                    console.error(\n                      \"`Infinity` is an invalid value for the `%s` css style property.\",\n                      nameChunk\n                    )));\n              nameChunk = styleName;\n              value = styleNameCache.get(nameChunk);\n              void 0 !== value\n                ? (nameChunk = value)\n                : ((value = stringToPrecomputedChunk(\n                    escapeTextForBrowser(\n                      nameChunk\n                        .replace(uppercasePattern, \"-$1\")\n                        .toLowerCase()\n                        .replace(msPattern, \"-ms-\")\n                    )\n                  )),\n                  styleNameCache.set(nameChunk, value),\n                  (nameChunk = value));\n              \"number\" === typeof styleValue\n                ? (styleValue =\n                    0 === styleValue || unitlessNumbers.has(styleName)\n                      ? \"\" + styleValue\n                      : styleValue + \"px\")\n                : (checkCSSPropertyStringCoercion(styleValue, styleName),\n                  (styleValue = escapeTextForBrowser(\n                    (\"\" + styleValue).trim()\n                  )));\n            }\n            isFirst\n              ? ((isFirst = !1),\n                target.push(\n                  styleAttributeStart,\n                  nameChunk,\n                  styleAssign,\n                  styleValue\n                ))\n              : target.push(styleSeparator, nameChunk, styleAssign, styleValue);\n          }\n        }\n      isFirst || target.push(attributeEnd);\n    }\n    function pushBooleanAttribute(target, name, value) {\n      value &&\n        \"function\" !== typeof value &&\n        \"symbol\" !== typeof value &&\n        target.push(attributeSeparator, name, attributeEmptyString);\n    }\n    function pushStringAttribute(target, name, value) {\n      \"function\" !== typeof value &&\n        \"symbol\" !== typeof value &&\n        \"boolean\" !== typeof value &&\n        target.push(\n          attributeSeparator,\n          name,\n          attributeAssign,\n          escapeTextForBrowser(value),\n          attributeEnd\n        );\n    }\n    function pushAdditionalFormField(value, key) {\n      this.push(startHiddenInputChunk);\n      validateAdditionalFormField(value);\n      pushStringAttribute(this, \"name\", key);\n      pushStringAttribute(this, \"value\", value);\n      this.push(endOfStartTagSelfClosing);\n    }\n    function validateAdditionalFormField(value) {\n      if (\"string\" !== typeof value)\n        throw Error(\n          \"File/Blob fields are not yet supported in progressive forms. Will fallback to client hydration.\"\n        );\n    }\n    function getCustomFormFields(resumableState, formAction) {\n      if (\"function\" === typeof formAction.$$FORM_ACTION) {\n        var id = resumableState.nextFormID++;\n        resumableState = resumableState.idPrefix + id;\n        try {\n          var customFields = formAction.$$FORM_ACTION(resumableState);\n          if (customFields) {\n            var formData = customFields.data;\n            null != formData && formData.forEach(validateAdditionalFormField);\n          }\n          return customFields;\n        } catch (x) {\n          if (\n            \"object\" === typeof x &&\n            null !== x &&\n            \"function\" === typeof x.then\n          )\n            throw x;\n          console.error(\n            \"Failed to serialize an action for progressive enhancement:\\n%s\",\n            x\n          );\n        }\n      }\n      return null;\n    }\n    function pushFormActionAttribute(\n      target,\n      resumableState,\n      renderState,\n      formAction,\n      formEncType,\n      formMethod,\n      formTarget,\n      name\n    ) {\n      var formData = null;\n      if (\"function\" === typeof formAction) {\n        null === name ||\n          didWarnFormActionName ||\n          ((didWarnFormActionName = !0),\n          console.error(\n            'Cannot specify a \"name\" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.'\n          ));\n        (null === formEncType && null === formMethod) ||\n          didWarnFormActionMethod ||\n          ((didWarnFormActionMethod = !0),\n          console.error(\n            \"Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.\"\n          ));\n        null === formTarget ||\n          didWarnFormActionTarget ||\n          ((didWarnFormActionTarget = !0),\n          console.error(\n            \"Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window.\"\n          ));\n        var customFields = getCustomFormFields(resumableState, formAction);\n        null !== customFields\n          ? ((name = customFields.name),\n            (formAction = customFields.action || \"\"),\n            (formEncType = customFields.encType),\n            (formMethod = customFields.method),\n            (formTarget = customFields.target),\n            (formData = customFields.data))\n          : (target.push(\n              attributeSeparator,\n              \"formAction\",\n              attributeAssign,\n              actionJavaScriptURL,\n              attributeEnd\n            ),\n            (formTarget = formMethod = formEncType = formAction = name = null),\n            injectFormReplayingRuntime(resumableState, renderState));\n      }\n      null != name && pushAttribute(target, \"name\", name);\n      null != formAction && pushAttribute(target, \"formAction\", formAction);\n      null != formEncType && pushAttribute(target, \"formEncType\", formEncType);\n      null != formMethod && pushAttribute(target, \"formMethod\", formMethod);\n      null != formTarget && pushAttribute(target, \"formTarget\", formTarget);\n      return formData;\n    }\n    function pushAttribute(target, name, value) {\n      switch (name) {\n        case \"className\":\n          pushStringAttribute(target, \"class\", value);\n          break;\n        case \"tabIndex\":\n          pushStringAttribute(target, \"tabindex\", value);\n          break;\n        case \"dir\":\n        case \"role\":\n        case \"viewBox\":\n        case \"width\":\n        case \"height\":\n          pushStringAttribute(target, name, value);\n          break;\n        case \"style\":\n          pushStyleAttribute(target, value);\n          break;\n        case \"src\":\n        case \"href\":\n          if (\"\" === value) {\n            \"src\" === name\n              ? console.error(\n                  'An empty string (\"\") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                  name,\n                  name\n                )\n              : console.error(\n                  'An empty string (\"\") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                  name,\n                  name\n                );\n            break;\n          }\n        case \"action\":\n        case \"formAction\":\n          if (\n            null == value ||\n            \"function\" === typeof value ||\n            \"symbol\" === typeof value ||\n            \"boolean\" === typeof value\n          )\n            break;\n          checkAttributeStringCoercion(value, name);\n          value = sanitizeURL(\"\" + value);\n          target.push(\n            attributeSeparator,\n            name,\n            attributeAssign,\n            escapeTextForBrowser(value),\n            attributeEnd\n          );\n          break;\n        case \"defaultValue\":\n        case \"defaultChecked\":\n        case \"innerHTML\":\n        case \"suppressContentEditableWarning\":\n        case \"suppressHydrationWarning\":\n        case \"ref\":\n          break;\n        case \"autoFocus\":\n        case \"multiple\":\n        case \"muted\":\n          pushBooleanAttribute(target, name.toLowerCase(), value);\n          break;\n        case \"xlinkHref\":\n          if (\n            \"function\" === typeof value ||\n            \"symbol\" === typeof value ||\n            \"boolean\" === typeof value\n          )\n            break;\n          checkAttributeStringCoercion(value, name);\n          value = sanitizeURL(\"\" + value);\n          target.push(\n            attributeSeparator,\n            \"xlink:href\",\n            attributeAssign,\n            escapeTextForBrowser(value),\n            attributeEnd\n          );\n          break;\n        case \"contentEditable\":\n        case \"spellCheck\":\n        case \"draggable\":\n        case \"value\":\n        case \"autoReverse\":\n        case \"externalResourcesRequired\":\n        case \"focusable\":\n        case \"preserveAlpha\":\n          \"function\" !== typeof value &&\n            \"symbol\" !== typeof value &&\n            target.push(\n              attributeSeparator,\n              name,\n              attributeAssign,\n              escapeTextForBrowser(value),\n              attributeEnd\n            );\n          break;\n        case \"inert\":\n          \"\" !== value ||\n            didWarnForNewBooleanPropsWithEmptyValue[name] ||\n            ((didWarnForNewBooleanPropsWithEmptyValue[name] = !0),\n            console.error(\n              \"Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.\",\n              name\n            ));\n        case \"allowFullScreen\":\n        case \"async\":\n        case \"autoPlay\":\n        case \"controls\":\n        case \"default\":\n        case \"defer\":\n        case \"disabled\":\n        case \"disablePictureInPicture\":\n        case \"disableRemotePlayback\":\n        case \"formNoValidate\":\n        case \"hidden\":\n        case \"loop\":\n        case \"noModule\":\n        case \"noValidate\":\n        case \"open\":\n        case \"playsInline\":\n        case \"readOnly\":\n        case \"required\":\n        case \"reversed\":\n        case \"scoped\":\n        case \"seamless\":\n        case \"itemScope\":\n          value &&\n            \"function\" !== typeof value &&\n            \"symbol\" !== typeof value &&\n            target.push(attributeSeparator, name, attributeEmptyString);\n          break;\n        case \"capture\":\n        case \"download\":\n          !0 === value\n            ? target.push(attributeSeparator, name, attributeEmptyString)\n            : !1 !== value &&\n              \"function\" !== typeof value &&\n              \"symbol\" !== typeof value &&\n              target.push(\n                attributeSeparator,\n                name,\n                attributeAssign,\n                escapeTextForBrowser(value),\n                attributeEnd\n              );\n          break;\n        case \"cols\":\n        case \"rows\":\n        case \"size\":\n        case \"span\":\n          \"function\" !== typeof value &&\n            \"symbol\" !== typeof value &&\n            !isNaN(value) &&\n            1 <= value &&\n            target.push(\n              attributeSeparator,\n              name,\n              attributeAssign,\n              escapeTextForBrowser(value),\n              attributeEnd\n            );\n          break;\n        case \"rowSpan\":\n        case \"start\":\n          \"function\" === typeof value ||\n            \"symbol\" === typeof value ||\n            isNaN(value) ||\n            target.push(\n              attributeSeparator,\n              name,\n              attributeAssign,\n              escapeTextForBrowser(value),\n              attributeEnd\n            );\n          break;\n        case \"xlinkActuate\":\n          pushStringAttribute(target, \"xlink:actuate\", value);\n          break;\n        case \"xlinkArcrole\":\n          pushStringAttribute(target, \"xlink:arcrole\", value);\n          break;\n        case \"xlinkRole\":\n          pushStringAttribute(target, \"xlink:role\", value);\n          break;\n        case \"xlinkShow\":\n          pushStringAttribute(target, \"xlink:show\", value);\n          break;\n        case \"xlinkTitle\":\n          pushStringAttribute(target, \"xlink:title\", value);\n          break;\n        case \"xlinkType\":\n          pushStringAttribute(target, \"xlink:type\", value);\n          break;\n        case \"xmlBase\":\n          pushStringAttribute(target, \"xml:base\", value);\n          break;\n        case \"xmlLang\":\n          pushStringAttribute(target, \"xml:lang\", value);\n          break;\n        case \"xmlSpace\":\n          pushStringAttribute(target, \"xml:space\", value);\n          break;\n        default:\n          if (\n            !(2 < name.length) ||\n            (\"o\" !== name[0] && \"O\" !== name[0]) ||\n            (\"n\" !== name[1] && \"N\" !== name[1])\n          )\n            if (\n              ((name = aliases.get(name) || name), isAttributeNameSafe(name))\n            ) {\n              switch (typeof value) {\n                case \"function\":\n                case \"symbol\":\n                  return;\n                case \"boolean\":\n                  var prefix = name.toLowerCase().slice(0, 5);\n                  if (\"data-\" !== prefix && \"aria-\" !== prefix) return;\n              }\n              target.push(\n                attributeSeparator,\n                name,\n                attributeAssign,\n                escapeTextForBrowser(value),\n                attributeEnd\n              );\n            }\n      }\n    }\n    function pushInnerHTML(target, innerHTML, children) {\n      if (null != innerHTML) {\n        if (null != children)\n          throw Error(\n            \"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\"\n          );\n        if (\"object\" !== typeof innerHTML || !(\"__html\" in innerHTML))\n          throw Error(\n            \"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.\"\n          );\n        innerHTML = innerHTML.__html;\n        null !== innerHTML &&\n          void 0 !== innerHTML &&\n          (checkHtmlStringCoercion(innerHTML), target.push(\"\" + innerHTML));\n      }\n    }\n    function checkSelectProp(props, propName) {\n      var value = props[propName];\n      null != value &&\n        ((value = isArrayImpl(value)),\n        props.multiple && !value\n          ? console.error(\n              \"The `%s` prop supplied to <select> must be an array if `multiple` is true.\",\n              propName\n            )\n          : !props.multiple &&\n            value &&\n            console.error(\n              \"The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.\",\n              propName\n            ));\n    }\n    function flattenOptionChildren(children) {\n      var content = \"\";\n      React.Children.forEach(children, function (child) {\n        null != child &&\n          ((content += child),\n          didWarnInvalidOptionChildren ||\n            \"string\" === typeof child ||\n            \"number\" === typeof child ||\n            \"bigint\" === typeof child ||\n            ((didWarnInvalidOptionChildren = !0),\n            console.error(\n              \"Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.\"\n            )));\n      });\n      return content;\n    }\n    function injectFormReplayingRuntime(resumableState, renderState) {\n      if ((resumableState.instructions & 16) === NothingSent) {\n        resumableState.instructions |= 16;\n        var preamble = renderState.preamble,\n          bootstrapChunks = renderState.bootstrapChunks;\n        (preamble.htmlChunks || preamble.headChunks) &&\n        0 === bootstrapChunks.length\n          ? (bootstrapChunks.push(renderState.startInlineScript),\n            pushCompletedShellIdAttribute(bootstrapChunks, resumableState),\n            bootstrapChunks.push(\n              endOfStartTag,\n              formReplayingRuntimeScript,\n              endInlineScript\n            ))\n          : bootstrapChunks.unshift(\n              renderState.startInlineScript,\n              endOfStartTag,\n              formReplayingRuntimeScript,\n              endInlineScript\n            );\n      }\n    }\n    function pushLinkImpl(target, props) {\n      target.push(startChunkForTag(\"link\"));\n      for (var propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n              case \"dangerouslySetInnerHTML\":\n                throw Error(\n                  \"link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                );\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTagSelfClosing);\n      return null;\n    }\n    function escapeStyleTextContent(styleText) {\n      checkHtmlStringCoercion(styleText);\n      return (\"\" + styleText).replace(styleRegex, styleReplacer);\n    }\n    function pushSelfClosing(target, props, tag, formatContext) {\n      target.push(startChunkForTag(tag));\n      for (var propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n              case \"dangerouslySetInnerHTML\":\n                throw Error(\n                  tag +\n                    \" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                );\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      pushViewTransitionAttributes(target, formatContext);\n      target.push(endOfStartTagSelfClosing);\n      return null;\n    }\n    function pushTitleImpl(target, props) {\n      target.push(startChunkForTag(\"title\"));\n      var children = null,\n        innerHTML = null,\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                children = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTag);\n      props = Array.isArray(children)\n        ? 2 > children.length\n          ? children[0]\n          : null\n        : children;\n      \"function\" !== typeof props &&\n        \"symbol\" !== typeof props &&\n        null !== props &&\n        void 0 !== props &&\n        target.push(escapeTextForBrowser(\"\" + props));\n      pushInnerHTML(target, innerHTML, children);\n      target.push(endChunkForTag(\"title\"));\n      return null;\n    }\n    function pushScriptImpl(target, props) {\n      target.push(startChunkForTag(\"script\"));\n      var children = null,\n        innerHTML = null,\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                children = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      target.push(endOfStartTag);\n      null != children &&\n        \"string\" !== typeof children &&\n        ((props =\n          \"number\" === typeof children\n            ? \"a number for children\"\n            : Array.isArray(children)\n              ? \"an array for children\"\n              : \"something unexpected for children\"),\n        console.error(\n          \"A script element was rendered with %s. If script element has children it must be a single string. Consider using dangerouslySetInnerHTML or passing a plain string as children.\",\n          props\n        ));\n      pushInnerHTML(target, innerHTML, children);\n      \"string\" === typeof children &&\n        target.push(escapeEntireInlineScriptContent(children));\n      target.push(endChunkForTag(\"script\"));\n      return null;\n    }\n    function pushStartSingletonElement(target, props, tag, formatContext) {\n      target.push(startChunkForTag(tag));\n      var innerHTML = (tag = null),\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                tag = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      pushViewTransitionAttributes(target, formatContext);\n      target.push(endOfStartTag);\n      pushInnerHTML(target, innerHTML, tag);\n      return tag;\n    }\n    function pushStartGenericElement(target, props, tag, formatContext) {\n      target.push(startChunkForTag(tag));\n      var innerHTML = (tag = null),\n        propKey;\n      for (propKey in props)\n        if (hasOwnProperty.call(props, propKey)) {\n          var propValue = props[propKey];\n          if (null != propValue)\n            switch (propKey) {\n              case \"children\":\n                tag = propValue;\n                break;\n              case \"dangerouslySetInnerHTML\":\n                innerHTML = propValue;\n                break;\n              default:\n                pushAttribute(target, propKey, propValue);\n            }\n        }\n      pushViewTransitionAttributes(target, formatContext);\n      target.push(endOfStartTag);\n      pushInnerHTML(target, innerHTML, tag);\n      return \"string\" === typeof tag\n        ? (target.push(escapeTextForBrowser(tag)), null)\n        : tag;\n    }\n    function startChunkForTag(tag) {\n      var tagStartChunk = validatedTagCache.get(tag);\n      if (void 0 === tagStartChunk) {\n        if (!VALID_TAG_REGEX.test(tag)) throw Error(\"Invalid tag: \" + tag);\n        tagStartChunk = stringToPrecomputedChunk(\"<\" + tag);\n        validatedTagCache.set(tag, tagStartChunk);\n      }\n      return tagStartChunk;\n    }\n    function pushStartInstance(\n      target$jscomp$0,\n      type,\n      props,\n      resumableState,\n      renderState,\n      preambleState,\n      hoistableState,\n      formatContext,\n      textEmbedded\n    ) {\n      validateProperties$2(type, props);\n      (\"input\" !== type && \"textarea\" !== type && \"select\" !== type) ||\n        null == props ||\n        null !== props.value ||\n        didWarnValueNull ||\n        ((didWarnValueNull = !0),\n        \"select\" === type && props.multiple\n          ? console.error(\n              \"`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.\",\n              type\n            )\n          : console.error(\n              \"`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.\",\n              type\n            ));\n      b: if (-1 === type.indexOf(\"-\")) var JSCompiler_inline_result = !1;\n      else\n        switch (type) {\n          case \"annotation-xml\":\n          case \"color-profile\":\n          case \"font-face\":\n          case \"font-face-src\":\n          case \"font-face-uri\":\n          case \"font-face-format\":\n          case \"font-face-name\":\n          case \"missing-glyph\":\n            JSCompiler_inline_result = !1;\n            break b;\n          default:\n            JSCompiler_inline_result = !0;\n        }\n      JSCompiler_inline_result ||\n        \"string\" === typeof props.is ||\n        warnUnknownProperties(type, props, null);\n      !props.suppressContentEditableWarning &&\n        props.contentEditable &&\n        null != props.children &&\n        console.error(\n          \"A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.\"\n        );\n      formatContext.insertionMode !== SVG_MODE &&\n        formatContext.insertionMode !== MATHML_MODE &&\n        -1 === type.indexOf(\"-\") &&\n        type.toLowerCase() !== type &&\n        console.error(\n          \"<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.\",\n          type\n        );\n      switch (type) {\n        case \"div\":\n        case \"span\":\n        case \"svg\":\n        case \"path\":\n          break;\n        case \"a\":\n          target$jscomp$0.push(startChunkForTag(\"a\"));\n          var children = null,\n            innerHTML = null,\n            propKey;\n          for (propKey in props)\n            if (hasOwnProperty.call(props, propKey)) {\n              var propValue = props[propKey];\n              if (null != propValue)\n                switch (propKey) {\n                  case \"children\":\n                    children = propValue;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML = propValue;\n                    break;\n                  case \"href\":\n                    \"\" === propValue\n                      ? pushStringAttribute(target$jscomp$0, \"href\", \"\")\n                      : pushAttribute(target$jscomp$0, propKey, propValue);\n                    break;\n                  default:\n                    pushAttribute(target$jscomp$0, propKey, propValue);\n                }\n            }\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML, children);\n          if (\"string\" === typeof children) {\n            target$jscomp$0.push(escapeTextForBrowser(children));\n            var JSCompiler_inline_result$jscomp$0 = null;\n          } else JSCompiler_inline_result$jscomp$0 = children;\n          return JSCompiler_inline_result$jscomp$0;\n        case \"g\":\n        case \"p\":\n        case \"li\":\n          break;\n        case \"select\":\n          checkControlledValueProps(\"select\", props);\n          checkSelectProp(props, \"value\");\n          checkSelectProp(props, \"defaultValue\");\n          void 0 === props.value ||\n            void 0 === props.defaultValue ||\n            didWarnDefaultSelectValue ||\n            (console.error(\n              \"Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components\"\n            ),\n            (didWarnDefaultSelectValue = !0));\n          target$jscomp$0.push(startChunkForTag(\"select\"));\n          var children$jscomp$0 = null,\n            innerHTML$jscomp$0 = null,\n            propKey$jscomp$0;\n          for (propKey$jscomp$0 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$0)) {\n              var propValue$jscomp$0 = props[propKey$jscomp$0];\n              if (null != propValue$jscomp$0)\n                switch (propKey$jscomp$0) {\n                  case \"children\":\n                    children$jscomp$0 = propValue$jscomp$0;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$0 = propValue$jscomp$0;\n                    break;\n                  case \"defaultValue\":\n                  case \"value\":\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$0,\n                      propValue$jscomp$0\n                    );\n                }\n            }\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$0, children$jscomp$0);\n          return children$jscomp$0;\n        case \"option\":\n          var selectedValue = formatContext.selectedValue;\n          target$jscomp$0.push(startChunkForTag(\"option\"));\n          var children$jscomp$1 = null,\n            value = null,\n            selected = null,\n            innerHTML$jscomp$1 = null,\n            propKey$jscomp$1;\n          for (propKey$jscomp$1 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$1)) {\n              var propValue$jscomp$1 = props[propKey$jscomp$1];\n              if (null != propValue$jscomp$1)\n                switch (propKey$jscomp$1) {\n                  case \"children\":\n                    children$jscomp$1 = propValue$jscomp$1;\n                    break;\n                  case \"selected\":\n                    selected = propValue$jscomp$1;\n                    didWarnSelectedSetOnOption ||\n                      (console.error(\n                        \"Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>.\"\n                      ),\n                      (didWarnSelectedSetOnOption = !0));\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$1 = propValue$jscomp$1;\n                    break;\n                  case \"value\":\n                    value = propValue$jscomp$1;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$1,\n                      propValue$jscomp$1\n                    );\n                }\n            }\n          if (null != selectedValue) {\n            if (null !== value) {\n              checkAttributeStringCoercion(value, \"value\");\n              var stringValue = \"\" + value;\n            } else\n              null === innerHTML$jscomp$1 ||\n                didWarnInvalidOptionInnerHTML ||\n                ((didWarnInvalidOptionInnerHTML = !0),\n                console.error(\n                  \"Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.\"\n                )),\n                (stringValue = flattenOptionChildren(children$jscomp$1));\n            if (isArrayImpl(selectedValue))\n              for (var i = 0; i < selectedValue.length; i++) {\n                if (\n                  (checkAttributeStringCoercion(selectedValue[i], \"value\"),\n                  \"\" + selectedValue[i] === stringValue)\n                ) {\n                  target$jscomp$0.push(selectedMarkerAttribute);\n                  break;\n                }\n              }\n            else\n              checkAttributeStringCoercion(selectedValue, \"select.value\"),\n                \"\" + selectedValue === stringValue &&\n                  target$jscomp$0.push(selectedMarkerAttribute);\n          } else selected && target$jscomp$0.push(selectedMarkerAttribute);\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$1, children$jscomp$1);\n          return children$jscomp$1;\n        case \"textarea\":\n          checkControlledValueProps(\"textarea\", props);\n          void 0 === props.value ||\n            void 0 === props.defaultValue ||\n            didWarnDefaultTextareaValue ||\n            (console.error(\n              \"Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components\"\n            ),\n            (didWarnDefaultTextareaValue = !0));\n          target$jscomp$0.push(startChunkForTag(\"textarea\"));\n          var value$jscomp$0 = null,\n            defaultValue = null,\n            children$jscomp$2 = null,\n            propKey$jscomp$2;\n          for (propKey$jscomp$2 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$2)) {\n              var propValue$jscomp$2 = props[propKey$jscomp$2];\n              if (null != propValue$jscomp$2)\n                switch (propKey$jscomp$2) {\n                  case \"children\":\n                    children$jscomp$2 = propValue$jscomp$2;\n                    break;\n                  case \"value\":\n                    value$jscomp$0 = propValue$jscomp$2;\n                    break;\n                  case \"defaultValue\":\n                    defaultValue = propValue$jscomp$2;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"`dangerouslySetInnerHTML` does not make sense on <textarea>.\"\n                    );\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$2,\n                      propValue$jscomp$2\n                    );\n                }\n            }\n          null === value$jscomp$0 &&\n            null !== defaultValue &&\n            (value$jscomp$0 = defaultValue);\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          if (null != children$jscomp$2) {\n            console.error(\n              \"Use the `defaultValue` or `value` props instead of setting children on <textarea>.\"\n            );\n            if (null != value$jscomp$0)\n              throw Error(\n                \"If you supply `defaultValue` on a <textarea>, do not pass children.\"\n              );\n            if (isArrayImpl(children$jscomp$2)) {\n              if (1 < children$jscomp$2.length)\n                throw Error(\"<textarea> can only have at most one child.\");\n              checkHtmlStringCoercion(children$jscomp$2[0]);\n              value$jscomp$0 = \"\" + children$jscomp$2[0];\n            }\n            checkHtmlStringCoercion(children$jscomp$2);\n            value$jscomp$0 = \"\" + children$jscomp$2;\n          }\n          \"string\" === typeof value$jscomp$0 &&\n            \"\\n\" === value$jscomp$0[0] &&\n            target$jscomp$0.push(leadingNewline);\n          null !== value$jscomp$0 &&\n            (checkAttributeStringCoercion(value$jscomp$0, \"value\"),\n            target$jscomp$0.push(escapeTextForBrowser(\"\" + value$jscomp$0)));\n          return null;\n        case \"input\":\n          checkControlledValueProps(\"input\", props);\n          target$jscomp$0.push(startChunkForTag(\"input\"));\n          var name = null,\n            formAction = null,\n            formEncType = null,\n            formMethod = null,\n            formTarget = null,\n            value$jscomp$1 = null,\n            defaultValue$jscomp$0 = null,\n            checked = null,\n            defaultChecked = null,\n            propKey$jscomp$3;\n          for (propKey$jscomp$3 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$3)) {\n              var propValue$jscomp$3 = props[propKey$jscomp$3];\n              if (null != propValue$jscomp$3)\n                switch (propKey$jscomp$3) {\n                  case \"children\":\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                    );\n                  case \"name\":\n                    name = propValue$jscomp$3;\n                    break;\n                  case \"formAction\":\n                    formAction = propValue$jscomp$3;\n                    break;\n                  case \"formEncType\":\n                    formEncType = propValue$jscomp$3;\n                    break;\n                  case \"formMethod\":\n                    formMethod = propValue$jscomp$3;\n                    break;\n                  case \"formTarget\":\n                    formTarget = propValue$jscomp$3;\n                    break;\n                  case \"defaultChecked\":\n                    defaultChecked = propValue$jscomp$3;\n                    break;\n                  case \"defaultValue\":\n                    defaultValue$jscomp$0 = propValue$jscomp$3;\n                    break;\n                  case \"checked\":\n                    checked = propValue$jscomp$3;\n                    break;\n                  case \"value\":\n                    value$jscomp$1 = propValue$jscomp$3;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$3,\n                      propValue$jscomp$3\n                    );\n                }\n            }\n          null === formAction ||\n            \"image\" === props.type ||\n            \"submit\" === props.type ||\n            didWarnFormActionType ||\n            ((didWarnFormActionType = !0),\n            console.error(\n              'An input can only specify a formAction along with type=\"submit\" or type=\"image\".'\n            ));\n          var formData = pushFormActionAttribute(\n            target$jscomp$0,\n            resumableState,\n            renderState,\n            formAction,\n            formEncType,\n            formMethod,\n            formTarget,\n            name\n          );\n          null === checked ||\n            null === defaultChecked ||\n            didWarnDefaultChecked ||\n            (console.error(\n              \"%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components\",\n              \"A component\",\n              props.type\n            ),\n            (didWarnDefaultChecked = !0));\n          null === value$jscomp$1 ||\n            null === defaultValue$jscomp$0 ||\n            didWarnDefaultInputValue ||\n            (console.error(\n              \"%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components\",\n              \"A component\",\n              props.type\n            ),\n            (didWarnDefaultInputValue = !0));\n          null !== checked\n            ? pushBooleanAttribute(target$jscomp$0, \"checked\", checked)\n            : null !== defaultChecked &&\n              pushBooleanAttribute(target$jscomp$0, \"checked\", defaultChecked);\n          null !== value$jscomp$1\n            ? pushAttribute(target$jscomp$0, \"value\", value$jscomp$1)\n            : null !== defaultValue$jscomp$0 &&\n              pushAttribute(target$jscomp$0, \"value\", defaultValue$jscomp$0);\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTagSelfClosing);\n          null != formData &&\n            formData.forEach(pushAdditionalFormField, target$jscomp$0);\n          return null;\n        case \"button\":\n          target$jscomp$0.push(startChunkForTag(\"button\"));\n          var children$jscomp$3 = null,\n            innerHTML$jscomp$2 = null,\n            name$jscomp$0 = null,\n            formAction$jscomp$0 = null,\n            formEncType$jscomp$0 = null,\n            formMethod$jscomp$0 = null,\n            formTarget$jscomp$0 = null,\n            propKey$jscomp$4;\n          for (propKey$jscomp$4 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$4)) {\n              var propValue$jscomp$4 = props[propKey$jscomp$4];\n              if (null != propValue$jscomp$4)\n                switch (propKey$jscomp$4) {\n                  case \"children\":\n                    children$jscomp$3 = propValue$jscomp$4;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$2 = propValue$jscomp$4;\n                    break;\n                  case \"name\":\n                    name$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formAction\":\n                    formAction$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formEncType\":\n                    formEncType$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formMethod\":\n                    formMethod$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  case \"formTarget\":\n                    formTarget$jscomp$0 = propValue$jscomp$4;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$4,\n                      propValue$jscomp$4\n                    );\n                }\n            }\n          null === formAction$jscomp$0 ||\n            null == props.type ||\n            \"submit\" === props.type ||\n            didWarnFormActionType ||\n            ((didWarnFormActionType = !0),\n            console.error(\n              'A button can only specify a formAction along with type=\"submit\" or no type.'\n            ));\n          var formData$jscomp$0 = pushFormActionAttribute(\n            target$jscomp$0,\n            resumableState,\n            renderState,\n            formAction$jscomp$0,\n            formEncType$jscomp$0,\n            formMethod$jscomp$0,\n            formTarget$jscomp$0,\n            name$jscomp$0\n          );\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          null != formData$jscomp$0 &&\n            formData$jscomp$0.forEach(pushAdditionalFormField, target$jscomp$0);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$2, children$jscomp$3);\n          if (\"string\" === typeof children$jscomp$3) {\n            target$jscomp$0.push(escapeTextForBrowser(children$jscomp$3));\n            var JSCompiler_inline_result$jscomp$1 = null;\n          } else JSCompiler_inline_result$jscomp$1 = children$jscomp$3;\n          return JSCompiler_inline_result$jscomp$1;\n        case \"form\":\n          target$jscomp$0.push(startChunkForTag(\"form\"));\n          var children$jscomp$4 = null,\n            innerHTML$jscomp$3 = null,\n            formAction$jscomp$1 = null,\n            formEncType$jscomp$1 = null,\n            formMethod$jscomp$1 = null,\n            formTarget$jscomp$1 = null,\n            propKey$jscomp$5;\n          for (propKey$jscomp$5 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$5)) {\n              var propValue$jscomp$5 = props[propKey$jscomp$5];\n              if (null != propValue$jscomp$5)\n                switch (propKey$jscomp$5) {\n                  case \"children\":\n                    children$jscomp$4 = propValue$jscomp$5;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$3 = propValue$jscomp$5;\n                    break;\n                  case \"action\":\n                    formAction$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  case \"encType\":\n                    formEncType$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  case \"method\":\n                    formMethod$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  case \"target\":\n                    formTarget$jscomp$1 = propValue$jscomp$5;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$5,\n                      propValue$jscomp$5\n                    );\n                }\n            }\n          var formData$jscomp$1 = null,\n            formActionName = null;\n          if (\"function\" === typeof formAction$jscomp$1) {\n            (null === formEncType$jscomp$1 && null === formMethod$jscomp$1) ||\n              didWarnFormActionMethod ||\n              ((didWarnFormActionMethod = !0),\n              console.error(\n                \"Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.\"\n              ));\n            null === formTarget$jscomp$1 ||\n              didWarnFormActionTarget ||\n              ((didWarnFormActionTarget = !0),\n              console.error(\n                \"Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window.\"\n              ));\n            var customFields = getCustomFormFields(\n              resumableState,\n              formAction$jscomp$1\n            );\n            null !== customFields\n              ? ((formAction$jscomp$1 = customFields.action || \"\"),\n                (formEncType$jscomp$1 = customFields.encType),\n                (formMethod$jscomp$1 = customFields.method),\n                (formTarget$jscomp$1 = customFields.target),\n                (formData$jscomp$1 = customFields.data),\n                (formActionName = customFields.name))\n              : (target$jscomp$0.push(\n                  attributeSeparator,\n                  \"action\",\n                  attributeAssign,\n                  actionJavaScriptURL,\n                  attributeEnd\n                ),\n                (formTarget$jscomp$1 =\n                  formMethod$jscomp$1 =\n                  formEncType$jscomp$1 =\n                  formAction$jscomp$1 =\n                    null),\n                injectFormReplayingRuntime(resumableState, renderState));\n          }\n          null != formAction$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"action\", formAction$jscomp$1);\n          null != formEncType$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"encType\", formEncType$jscomp$1);\n          null != formMethod$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"method\", formMethod$jscomp$1);\n          null != formTarget$jscomp$1 &&\n            pushAttribute(target$jscomp$0, \"target\", formTarget$jscomp$1);\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          null !== formActionName &&\n            (target$jscomp$0.push(startHiddenInputChunk),\n            pushStringAttribute(target$jscomp$0, \"name\", formActionName),\n            target$jscomp$0.push(endOfStartTagSelfClosing),\n            null != formData$jscomp$1 &&\n              formData$jscomp$1.forEach(\n                pushAdditionalFormField,\n                target$jscomp$0\n              ));\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$3, children$jscomp$4);\n          if (\"string\" === typeof children$jscomp$4) {\n            target$jscomp$0.push(escapeTextForBrowser(children$jscomp$4));\n            var JSCompiler_inline_result$jscomp$2 = null;\n          } else JSCompiler_inline_result$jscomp$2 = children$jscomp$4;\n          return JSCompiler_inline_result$jscomp$2;\n        case \"menuitem\":\n          target$jscomp$0.push(startChunkForTag(\"menuitem\"));\n          for (var propKey$jscomp$6 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$6)) {\n              var propValue$jscomp$6 = props[propKey$jscomp$6];\n              if (null != propValue$jscomp$6)\n                switch (propKey$jscomp$6) {\n                  case \"children\":\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"menuitems cannot have `children` nor `dangerouslySetInnerHTML`.\"\n                    );\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$6,\n                      propValue$jscomp$6\n                    );\n                }\n            }\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          return null;\n        case \"object\":\n          target$jscomp$0.push(startChunkForTag(\"object\"));\n          var children$jscomp$5 = null,\n            innerHTML$jscomp$4 = null,\n            propKey$jscomp$7;\n          for (propKey$jscomp$7 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$7)) {\n              var propValue$jscomp$7 = props[propKey$jscomp$7];\n              if (null != propValue$jscomp$7)\n                switch (propKey$jscomp$7) {\n                  case \"children\":\n                    children$jscomp$5 = propValue$jscomp$7;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$4 = propValue$jscomp$7;\n                    break;\n                  case \"data\":\n                    checkAttributeStringCoercion(propValue$jscomp$7, \"data\");\n                    var sanitizedValue = sanitizeURL(\"\" + propValue$jscomp$7);\n                    if (\"\" === sanitizedValue) {\n                      console.error(\n                        'An empty string (\"\") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',\n                        propKey$jscomp$7,\n                        propKey$jscomp$7\n                      );\n                      break;\n                    }\n                    target$jscomp$0.push(\n                      attributeSeparator,\n                      \"data\",\n                      attributeAssign,\n                      escapeTextForBrowser(sanitizedValue),\n                      attributeEnd\n                    );\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$7,\n                      propValue$jscomp$7\n                    );\n                }\n            }\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          pushInnerHTML(target$jscomp$0, innerHTML$jscomp$4, children$jscomp$5);\n          if (\"string\" === typeof children$jscomp$5) {\n            target$jscomp$0.push(escapeTextForBrowser(children$jscomp$5));\n            var JSCompiler_inline_result$jscomp$3 = null;\n          } else JSCompiler_inline_result$jscomp$3 = children$jscomp$5;\n          return JSCompiler_inline_result$jscomp$3;\n        case \"title\":\n          var noscriptTagInScope = formatContext.tagScope & 1,\n            isFallback = formatContext.tagScope & 4;\n          if (hasOwnProperty.call(props, \"children\")) {\n            var children$jscomp$6 = props.children,\n              child = Array.isArray(children$jscomp$6)\n                ? 2 > children$jscomp$6.length\n                  ? children$jscomp$6[0]\n                  : null\n                : children$jscomp$6;\n            Array.isArray(children$jscomp$6) && 1 < children$jscomp$6.length\n              ? console.error(\n                  \"React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an Array with length %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert `children` of <title> tags to a single string value which is why Arrays of length greater than 1 are not supported. When using JSX it can be common to combine text nodes and value nodes. For example: <title>hello {nameOfUser}</title>. While not immediately apparent, `children` in this case is an Array with length 2. If your `children` prop is using this form try rewriting it using a template string: <title>{`hello ${nameOfUser}`}</title>.\",\n                  children$jscomp$6.length\n                )\n              : \"function\" === typeof child || \"symbol\" === typeof child\n                ? console.error(\n                    \"React expect children of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found %s instead. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value.\",\n                    \"function\" === typeof child ? \"a Function\" : \"a Sybmol\"\n                  )\n                : child &&\n                  child.toString === {}.toString &&\n                  (null != child.$$typeof\n                    ? console.error(\n                        \"React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that appears to be a React element which never implements a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value which is why rendering React elements is not supported. If the `children` of <title> is a React Component try moving the <title> tag into that component. If the `children` of <title> is some HTML markup change it to be Text only to be valid HTML.\"\n                      )\n                    : console.error(\n                        \"React expects the `children` prop of <title> tags to be a string, number, bigint, or object with a novel `toString` method but found an object that does not implement a suitable `toString` method. Browsers treat all child Nodes of <title> tags as Text content and React expects to be able to convert children of <title> tags to a single string value. Using the default `toString` method available on every object is almost certainly an error. Consider whether the `children` of this <title> is an object in error and change it to a string or number value if so. Otherwise implement a `toString` method that React can use to produce a valid <title>.\"\n                      ));\n          }\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope ||\n            null != props.itemProp\n          )\n            var JSCompiler_inline_result$jscomp$4 = pushTitleImpl(\n              target$jscomp$0,\n              props\n            );\n          else\n            isFallback\n              ? (JSCompiler_inline_result$jscomp$4 = null)\n              : (pushTitleImpl(renderState.hoistableChunks, props),\n                (JSCompiler_inline_result$jscomp$4 = void 0));\n          return JSCompiler_inline_result$jscomp$4;\n        case \"link\":\n          var noscriptTagInScope$jscomp$0 = formatContext.tagScope & 1,\n            isFallback$jscomp$0 = formatContext.tagScope & 4,\n            rel = props.rel,\n            href = props.href,\n            precedence = props.precedence;\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$0 ||\n            null != props.itemProp ||\n            \"string\" !== typeof rel ||\n            \"string\" !== typeof href ||\n            \"\" === href\n          ) {\n            \"stylesheet\" === rel &&\n              \"string\" === typeof props.precedence &&\n              ((\"string\" === typeof href && href) ||\n                console.error(\n                  'React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and expected the `href` prop to be a non-empty string but ecountered %s instead. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop ensure there is a non-empty string `href` prop as well, otherwise remove the `precedence` prop.',\n                  null === href\n                    ? \"`null`\"\n                    : void 0 === href\n                      ? \"`undefined`\"\n                      : \"\" === href\n                        ? \"an empty string\"\n                        : 'something with type \"' + typeof href + '\"'\n                ));\n            pushLinkImpl(target$jscomp$0, props);\n            var JSCompiler_inline_result$jscomp$5 = null;\n          } else if (\"stylesheet\" === props.rel)\n            if (\n              \"string\" !== typeof precedence ||\n              null != props.disabled ||\n              props.onLoad ||\n              props.onError\n            ) {\n              if (\"string\" === typeof precedence)\n                if (null != props.disabled)\n                  console.error(\n                    'React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and a `disabled` prop. The presence of the `disabled` prop indicates an intent to manage the stylesheet active state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the `disabled` prop, otherwise remove the `precedence` prop.'\n                  );\n                else if (props.onLoad || props.onError) {\n                  var propDescription =\n                    props.onLoad && props.onError\n                      ? \"`onLoad` and `onError` props\"\n                      : props.onLoad\n                        ? \"`onLoad` prop\"\n                        : \"`onError` prop\";\n                  console.error(\n                    'React encountered a `<link rel=\"stylesheet\" .../>` with a `precedence` prop and %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',\n                    propDescription,\n                    propDescription\n                  );\n                }\n              JSCompiler_inline_result$jscomp$5 = pushLinkImpl(\n                target$jscomp$0,\n                props\n              );\n            } else {\n              var styleQueue = renderState.styles.get(precedence),\n                resourceState = resumableState.styleResources.hasOwnProperty(\n                  href\n                )\n                  ? resumableState.styleResources[href]\n                  : void 0;\n              if (resourceState !== EXISTS) {\n                resumableState.styleResources[href] = EXISTS;\n                styleQueue ||\n                  ((styleQueue = {\n                    precedence: escapeTextForBrowser(precedence),\n                    rules: [],\n                    hrefs: [],\n                    sheets: new Map()\n                  }),\n                  renderState.styles.set(precedence, styleQueue));\n                var resource = {\n                  state: PENDING$1,\n                  props: assign({}, props, {\n                    \"data-precedence\": props.precedence,\n                    precedence: null\n                  })\n                };\n                if (resourceState) {\n                  2 === resourceState.length &&\n                    adoptPreloadCredentials(resource.props, resourceState);\n                  var preloadResource =\n                    renderState.preloads.stylesheets.get(href);\n                  preloadResource && 0 < preloadResource.length\n                    ? (preloadResource.length = 0)\n                    : (resource.state = PRELOADED);\n                }\n                styleQueue.sheets.set(href, resource);\n                hoistableState && hoistableState.stylesheets.add(resource);\n              } else if (styleQueue) {\n                var _resource = styleQueue.sheets.get(href);\n                _resource &&\n                  hoistableState &&\n                  hoistableState.stylesheets.add(_resource);\n              }\n              textEmbedded && target$jscomp$0.push(textSeparator);\n              JSCompiler_inline_result$jscomp$5 = null;\n            }\n          else\n            props.onLoad || props.onError\n              ? (JSCompiler_inline_result$jscomp$5 = pushLinkImpl(\n                  target$jscomp$0,\n                  props\n                ))\n              : (textEmbedded && target$jscomp$0.push(textSeparator),\n                (JSCompiler_inline_result$jscomp$5 = isFallback$jscomp$0\n                  ? null\n                  : pushLinkImpl(renderState.hoistableChunks, props)));\n          return JSCompiler_inline_result$jscomp$5;\n        case \"script\":\n          var noscriptTagInScope$jscomp$1 = formatContext.tagScope & 1,\n            asyncProp = props.async;\n          if (\n            \"string\" !== typeof props.src ||\n            !props.src ||\n            !asyncProp ||\n            \"function\" === typeof asyncProp ||\n            \"symbol\" === typeof asyncProp ||\n            props.onLoad ||\n            props.onError ||\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$1 ||\n            null != props.itemProp\n          )\n            var JSCompiler_inline_result$jscomp$6 = pushScriptImpl(\n              target$jscomp$0,\n              props\n            );\n          else {\n            var key = props.src;\n            if (\"module\" === props.type) {\n              var resources = resumableState.moduleScriptResources;\n              var preloads = renderState.preloads.moduleScripts;\n            } else\n              (resources = resumableState.scriptResources),\n                (preloads = renderState.preloads.scripts);\n            var resourceState$jscomp$0 = resources.hasOwnProperty(key)\n              ? resources[key]\n              : void 0;\n            if (resourceState$jscomp$0 !== EXISTS) {\n              resources[key] = EXISTS;\n              var scriptProps = props;\n              if (resourceState$jscomp$0) {\n                2 === resourceState$jscomp$0.length &&\n                  ((scriptProps = assign({}, props)),\n                  adoptPreloadCredentials(scriptProps, resourceState$jscomp$0));\n                var preloadResource$jscomp$0 = preloads.get(key);\n                preloadResource$jscomp$0 &&\n                  (preloadResource$jscomp$0.length = 0);\n              }\n              var resource$jscomp$0 = [];\n              renderState.scripts.add(resource$jscomp$0);\n              pushScriptImpl(resource$jscomp$0, scriptProps);\n            }\n            textEmbedded && target$jscomp$0.push(textSeparator);\n            JSCompiler_inline_result$jscomp$6 = null;\n          }\n          return JSCompiler_inline_result$jscomp$6;\n        case \"style\":\n          var noscriptTagInScope$jscomp$2 = formatContext.tagScope & 1;\n          if (hasOwnProperty.call(props, \"children\")) {\n            var children$jscomp$7 = props.children,\n              child$jscomp$0 = Array.isArray(children$jscomp$7)\n                ? 2 > children$jscomp$7.length\n                  ? children$jscomp$7[0]\n                  : null\n                : children$jscomp$7;\n            (\"function\" === typeof child$jscomp$0 ||\n              \"symbol\" === typeof child$jscomp$0 ||\n              Array.isArray(child$jscomp$0)) &&\n              console.error(\n                \"React expect children of <style> tags to be a string, number, or object with a `toString` method but found %s instead. In browsers style Elements can only have `Text` Nodes as children.\",\n                \"function\" === typeof child$jscomp$0\n                  ? \"a Function\"\n                  : \"symbol\" === typeof child$jscomp$0\n                    ? \"a Sybmol\"\n                    : \"an Array\"\n              );\n          }\n          var precedence$jscomp$0 = props.precedence,\n            href$jscomp$0 = props.href,\n            nonce = props.nonce;\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$2 ||\n            null != props.itemProp ||\n            \"string\" !== typeof precedence$jscomp$0 ||\n            \"string\" !== typeof href$jscomp$0 ||\n            \"\" === href$jscomp$0\n          ) {\n            target$jscomp$0.push(startChunkForTag(\"style\"));\n            var children$jscomp$8 = null,\n              innerHTML$jscomp$5 = null,\n              propKey$jscomp$8;\n            for (propKey$jscomp$8 in props)\n              if (hasOwnProperty.call(props, propKey$jscomp$8)) {\n                var propValue$jscomp$8 = props[propKey$jscomp$8];\n                if (null != propValue$jscomp$8)\n                  switch (propKey$jscomp$8) {\n                    case \"children\":\n                      children$jscomp$8 = propValue$jscomp$8;\n                      break;\n                    case \"dangerouslySetInnerHTML\":\n                      innerHTML$jscomp$5 = propValue$jscomp$8;\n                      break;\n                    default:\n                      pushAttribute(\n                        target$jscomp$0,\n                        propKey$jscomp$8,\n                        propValue$jscomp$8\n                      );\n                  }\n              }\n            target$jscomp$0.push(endOfStartTag);\n            var child$jscomp$1 = Array.isArray(children$jscomp$8)\n              ? 2 > children$jscomp$8.length\n                ? children$jscomp$8[0]\n                : null\n              : children$jscomp$8;\n            \"function\" !== typeof child$jscomp$1 &&\n              \"symbol\" !== typeof child$jscomp$1 &&\n              null !== child$jscomp$1 &&\n              void 0 !== child$jscomp$1 &&\n              target$jscomp$0.push(escapeStyleTextContent(child$jscomp$1));\n            pushInnerHTML(\n              target$jscomp$0,\n              innerHTML$jscomp$5,\n              children$jscomp$8\n            );\n            target$jscomp$0.push(endChunkForTag(\"style\"));\n            var JSCompiler_inline_result$jscomp$7 = null;\n          } else {\n            href$jscomp$0.includes(\" \") &&\n              console.error(\n                'React expected the `href` prop for a <style> tag opting into hoisting semantics using the `precedence` prop to not have any spaces but ecountered spaces instead. using spaces in this prop will cause hydration of this style to fail on the client. The href for the <style> where this ocurred is \"%s\".',\n                href$jscomp$0\n              );\n            var styleQueue$jscomp$0 =\n                renderState.styles.get(precedence$jscomp$0),\n              resourceState$jscomp$1 =\n                resumableState.styleResources.hasOwnProperty(href$jscomp$0)\n                  ? resumableState.styleResources[href$jscomp$0]\n                  : void 0;\n            if (resourceState$jscomp$1 !== EXISTS) {\n              resumableState.styleResources[href$jscomp$0] = EXISTS;\n              resourceState$jscomp$1 &&\n                console.error(\n                  'React encountered a hoistable style tag for the same href as a preload: \"%s\". When using a style tag to inline styles you should not also preload it as a stylsheet.',\n                  href$jscomp$0\n                );\n              styleQueue$jscomp$0 ||\n                ((styleQueue$jscomp$0 = {\n                  precedence: escapeTextForBrowser(precedence$jscomp$0),\n                  rules: [],\n                  hrefs: [],\n                  sheets: new Map()\n                }),\n                renderState.styles.set(\n                  precedence$jscomp$0,\n                  styleQueue$jscomp$0\n                ));\n              var nonceStyle = renderState.nonce.style;\n              if (nonceStyle && nonceStyle !== nonce)\n                console.error(\n                  'React encountered a style tag with `precedence` \"%s\" and `nonce` \"%s\". When React manages style rules using `precedence` it will only include rules if the nonce matches the style nonce \"%s\" that was included with this render.',\n                  precedence$jscomp$0,\n                  nonce,\n                  nonceStyle\n                );\n              else {\n                !nonceStyle &&\n                  nonce &&\n                  console.error(\n                    'React encountered a style tag with `precedence` \"%s\" and `nonce` \"%s\". When React manages style rules using `precedence` it will only include a nonce attributes if you also provide the same style nonce value as a render option.',\n                    precedence$jscomp$0,\n                    nonce\n                  );\n                styleQueue$jscomp$0.hrefs.push(\n                  escapeTextForBrowser(href$jscomp$0)\n                );\n                var target = styleQueue$jscomp$0.rules,\n                  children$jscomp$9 = null,\n                  innerHTML$jscomp$6 = null,\n                  propKey$jscomp$9;\n                for (propKey$jscomp$9 in props)\n                  if (hasOwnProperty.call(props, propKey$jscomp$9)) {\n                    var propValue$jscomp$9 = props[propKey$jscomp$9];\n                    if (null != propValue$jscomp$9)\n                      switch (propKey$jscomp$9) {\n                        case \"children\":\n                          children$jscomp$9 = propValue$jscomp$9;\n                          break;\n                        case \"dangerouslySetInnerHTML\":\n                          innerHTML$jscomp$6 = propValue$jscomp$9;\n                      }\n                  }\n                var child$jscomp$2 = Array.isArray(children$jscomp$9)\n                  ? 2 > children$jscomp$9.length\n                    ? children$jscomp$9[0]\n                    : null\n                  : children$jscomp$9;\n                \"function\" !== typeof child$jscomp$2 &&\n                  \"symbol\" !== typeof child$jscomp$2 &&\n                  null !== child$jscomp$2 &&\n                  void 0 !== child$jscomp$2 &&\n                  target.push(escapeStyleTextContent(child$jscomp$2));\n                pushInnerHTML(target, innerHTML$jscomp$6, children$jscomp$9);\n              }\n            }\n            styleQueue$jscomp$0 &&\n              hoistableState &&\n              hoistableState.styles.add(styleQueue$jscomp$0);\n            textEmbedded && target$jscomp$0.push(textSeparator);\n            JSCompiler_inline_result$jscomp$7 = void 0;\n          }\n          return JSCompiler_inline_result$jscomp$7;\n        case \"meta\":\n          var noscriptTagInScope$jscomp$3 = formatContext.tagScope & 1,\n            isFallback$jscomp$1 = formatContext.tagScope & 4;\n          if (\n            formatContext.insertionMode === SVG_MODE ||\n            noscriptTagInScope$jscomp$3 ||\n            null != props.itemProp\n          )\n            var JSCompiler_inline_result$jscomp$8 = pushSelfClosing(\n              target$jscomp$0,\n              props,\n              \"meta\",\n              formatContext\n            );\n          else\n            textEmbedded && target$jscomp$0.push(textSeparator),\n              (JSCompiler_inline_result$jscomp$8 = isFallback$jscomp$1\n                ? null\n                : \"string\" === typeof props.charSet\n                  ? pushSelfClosing(\n                      renderState.charsetChunks,\n                      props,\n                      \"meta\",\n                      formatContext\n                    )\n                  : \"viewport\" === props.name\n                    ? pushSelfClosing(\n                        renderState.viewportChunks,\n                        props,\n                        \"meta\",\n                        formatContext\n                      )\n                    : pushSelfClosing(\n                        renderState.hoistableChunks,\n                        props,\n                        \"meta\",\n                        formatContext\n                      ));\n          return JSCompiler_inline_result$jscomp$8;\n        case \"listing\":\n        case \"pre\":\n          target$jscomp$0.push(startChunkForTag(type));\n          var children$jscomp$10 = null,\n            innerHTML$jscomp$7 = null,\n            propKey$jscomp$10;\n          for (propKey$jscomp$10 in props)\n            if (hasOwnProperty.call(props, propKey$jscomp$10)) {\n              var propValue$jscomp$10 = props[propKey$jscomp$10];\n              if (null != propValue$jscomp$10)\n                switch (propKey$jscomp$10) {\n                  case \"children\":\n                    children$jscomp$10 = propValue$jscomp$10;\n                    break;\n                  case \"dangerouslySetInnerHTML\":\n                    innerHTML$jscomp$7 = propValue$jscomp$10;\n                    break;\n                  default:\n                    pushAttribute(\n                      target$jscomp$0,\n                      propKey$jscomp$10,\n                      propValue$jscomp$10\n                    );\n                }\n            }\n          pushViewTransitionAttributes(target$jscomp$0, formatContext);\n          target$jscomp$0.push(endOfStartTag);\n          if (null != innerHTML$jscomp$7) {\n            if (null != children$jscomp$10)\n              throw Error(\n                \"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\"\n              );\n            if (\n              \"object\" !== typeof innerHTML$jscomp$7 ||\n              !(\"__html\" in innerHTML$jscomp$7)\n            )\n              throw Error(\n                \"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.\"\n              );\n            var html = innerHTML$jscomp$7.__html;\n            null !== html &&\n              void 0 !== html &&\n              (\"string\" === typeof html && 0 < html.length && \"\\n\" === html[0]\n                ? target$jscomp$0.push(leadingNewline, html)\n                : (checkHtmlStringCoercion(html),\n                  target$jscomp$0.push(\"\" + html)));\n          }\n          \"string\" === typeof children$jscomp$10 &&\n            \"\\n\" === children$jscomp$10[0] &&\n            target$jscomp$0.push(leadingNewline);\n          return children$jscomp$10;\n        case \"img\":\n          var pictureOrNoScriptTagInScope = formatContext.tagScope & 3,\n            src = props.src,\n            srcSet = props.srcSet;\n          if (\n            !(\n              \"lazy\" === props.loading ||\n              (!src && !srcSet) ||\n              (\"string\" !== typeof src && null != src) ||\n              (\"string\" !== typeof srcSet && null != srcSet) ||\n              \"low\" === props.fetchPriority ||\n              pictureOrNoScriptTagInScope\n            ) &&\n            (\"string\" !== typeof src ||\n              \":\" !== src[4] ||\n              (\"d\" !== src[0] && \"D\" !== src[0]) ||\n              (\"a\" !== src[1] && \"A\" !== src[1]) ||\n              (\"t\" !== src[2] && \"T\" !== src[2]) ||\n              (\"a\" !== src[3] && \"A\" !== src[3])) &&\n            (\"string\" !== typeof srcSet ||\n              \":\" !== srcSet[4] ||\n              (\"d\" !== srcSet[0] && \"D\" !== srcSet[0]) ||\n              (\"a\" !== srcSet[1] && \"A\" !== srcSet[1]) ||\n              (\"t\" !== srcSet[2] && \"T\" !== srcSet[2]) ||\n              (\"a\" !== srcSet[3] && \"A\" !== srcSet[3]))\n          ) {\n            null !== hoistableState &&\n              formatContext.tagScope & 64 &&\n              (hoistableState.suspenseyImages = !0);\n            var sizes = \"string\" === typeof props.sizes ? props.sizes : void 0,\n              key$jscomp$0 = srcSet ? srcSet + \"\\n\" + (sizes || \"\") : src,\n              promotablePreloads = renderState.preloads.images,\n              resource$jscomp$1 = promotablePreloads.get(key$jscomp$0);\n            if (resource$jscomp$1) {\n              if (\n                \"high\" === props.fetchPriority ||\n                10 > renderState.highImagePreloads.size\n              )\n                promotablePreloads.delete(key$jscomp$0),\n                  renderState.highImagePreloads.add(resource$jscomp$1);\n            } else if (\n              !resumableState.imageResources.hasOwnProperty(key$jscomp$0)\n            ) {\n              resumableState.imageResources[key$jscomp$0] = PRELOAD_NO_CREDS;\n              var input = props.crossOrigin;\n              var crossOrigin =\n                \"string\" === typeof input\n                  ? \"use-credentials\" === input\n                    ? input\n                    : \"\"\n                  : void 0;\n              var headers = renderState.headers,\n                header;\n              headers &&\n              0 < headers.remainingCapacity &&\n              \"string\" !== typeof props.srcSet &&\n              (\"high\" === props.fetchPriority ||\n                500 > headers.highImagePreloads.length) &&\n              ((header = getPreloadAsHeader(src, \"image\", {\n                imageSrcSet: props.srcSet,\n                imageSizes: props.sizes,\n                crossOrigin: crossOrigin,\n                integrity: props.integrity,\n                nonce: props.nonce,\n                type: props.type,\n                fetchPriority: props.fetchPriority,\n                referrerPolicy: props.refererPolicy\n              })),\n              0 <= (headers.remainingCapacity -= header.length + 2))\n                ? ((renderState.resets.image[key$jscomp$0] = PRELOAD_NO_CREDS),\n                  headers.highImagePreloads &&\n                    (headers.highImagePreloads += \", \"),\n                  (headers.highImagePreloads += header))\n                : ((resource$jscomp$1 = []),\n                  pushLinkImpl(resource$jscomp$1, {\n                    rel: \"preload\",\n                    as: \"image\",\n                    href: srcSet ? void 0 : src,\n                    imageSrcSet: srcSet,\n                    imageSizes: sizes,\n                    crossOrigin: crossOrigin,\n                    integrity: props.integrity,\n                    type: props.type,\n                    fetchPriority: props.fetchPriority,\n                    referrerPolicy: props.referrerPolicy\n                  }),\n                  \"high\" === props.fetchPriority ||\n                  10 > renderState.highImagePreloads.size\n                    ? renderState.highImagePreloads.add(resource$jscomp$1)\n                    : (renderState.bulkPreloads.add(resource$jscomp$1),\n                      promotablePreloads.set(key$jscomp$0, resource$jscomp$1)));\n            }\n          }\n          return pushSelfClosing(target$jscomp$0, props, \"img\", formatContext);\n        case \"base\":\n        case \"area\":\n        case \"br\":\n        case \"col\":\n        case \"embed\":\n        case \"hr\":\n        case \"keygen\":\n        case \"param\":\n        case \"source\":\n        case \"track\":\n        case \"wbr\":\n          return pushSelfClosing(target$jscomp$0, props, type, formatContext);\n        case \"annotation-xml\":\n        case \"color-profile\":\n        case \"font-face\":\n        case \"font-face-src\":\n        case \"font-face-uri\":\n        case \"font-face-format\":\n        case \"font-face-name\":\n        case \"missing-glyph\":\n          break;\n        case \"head\":\n          if (formatContext.insertionMode < HTML_MODE) {\n            var preamble = preambleState || renderState.preamble;\n            if (preamble.headChunks)\n              throw Error(\"The `<head>` tag may only be rendered once.\");\n            null !== preambleState &&\n              target$jscomp$0.push(headPreambleContributionChunk);\n            preamble.headChunks = [];\n            var JSCompiler_inline_result$jscomp$9 = pushStartSingletonElement(\n              preamble.headChunks,\n              props,\n              \"head\",\n              formatContext\n            );\n          } else\n            JSCompiler_inline_result$jscomp$9 = pushStartGenericElement(\n              target$jscomp$0,\n              props,\n              \"head\",\n              formatContext\n            );\n          return JSCompiler_inline_result$jscomp$9;\n        case \"body\":\n          if (formatContext.insertionMode < HTML_MODE) {\n            var preamble$jscomp$0 = preambleState || renderState.preamble;\n            if (preamble$jscomp$0.bodyChunks)\n              throw Error(\"The `<body>` tag may only be rendered once.\");\n            null !== preambleState &&\n              target$jscomp$0.push(bodyPreambleContributionChunk);\n            preamble$jscomp$0.bodyChunks = [];\n            var JSCompiler_inline_result$jscomp$10 = pushStartSingletonElement(\n              preamble$jscomp$0.bodyChunks,\n              props,\n              \"body\",\n              formatContext\n            );\n          } else\n            JSCompiler_inline_result$jscomp$10 = pushStartGenericElement(\n              target$jscomp$0,\n              props,\n              \"body\",\n              formatContext\n            );\n          return JSCompiler_inline_result$jscomp$10;\n        case \"html\":\n          if (formatContext.insertionMode === ROOT_HTML_MODE) {\n            var preamble$jscomp$1 = preambleState || renderState.preamble;\n            if (preamble$jscomp$1.htmlChunks)\n              throw Error(\"The `<html>` tag may only be rendered once.\");\n            null !== preambleState &&\n              target$jscomp$0.push(htmlPreambleContributionChunk);\n            preamble$jscomp$1.htmlChunks = [doctypeChunk];\n            var JSCompiler_inline_result$jscomp$11 = pushStartSingletonElement(\n              preamble$jscomp$1.htmlChunks,\n              props,\n              \"html\",\n              formatContext\n            );\n          } else\n            JSCompiler_inline_result$jscomp$11 = pushStartGenericElement(\n              target$jscomp$0,\n              props,\n              \"html\",\n              formatContext\n            );\n          return JSCompiler_inline_result$jscomp$11;\n        default:\n          if (-1 !== type.indexOf(\"-\")) {\n            target$jscomp$0.push(startChunkForTag(type));\n            var children$jscomp$11 = null,\n              innerHTML$jscomp$8 = null,\n              propKey$jscomp$11;\n            for (propKey$jscomp$11 in props)\n              if (hasOwnProperty.call(props, propKey$jscomp$11)) {\n                var propValue$jscomp$11 = props[propKey$jscomp$11];\n                if (null != propValue$jscomp$11) {\n                  var attributeName = propKey$jscomp$11;\n                  switch (propKey$jscomp$11) {\n                    case \"children\":\n                      children$jscomp$11 = propValue$jscomp$11;\n                      break;\n                    case \"dangerouslySetInnerHTML\":\n                      innerHTML$jscomp$8 = propValue$jscomp$11;\n                      break;\n                    case \"style\":\n                      pushStyleAttribute(target$jscomp$0, propValue$jscomp$11);\n                      break;\n                    case \"suppressContentEditableWarning\":\n                    case \"suppressHydrationWarning\":\n                    case \"ref\":\n                      break;\n                    case \"className\":\n                      attributeName = \"class\";\n                    default:\n                      if (\n                        isAttributeNameSafe(propKey$jscomp$11) &&\n                        \"function\" !== typeof propValue$jscomp$11 &&\n                        \"symbol\" !== typeof propValue$jscomp$11 &&\n                        !1 !== propValue$jscomp$11\n                      ) {\n                        if (!0 === propValue$jscomp$11)\n                          propValue$jscomp$11 = \"\";\n                        else if (\"object\" === typeof propValue$jscomp$11)\n                          continue;\n                        target$jscomp$0.push(\n                          attributeSeparator,\n                          attributeName,\n                          attributeAssign,\n                          escapeTextForBrowser(propValue$jscomp$11),\n                          attributeEnd\n                        );\n                      }\n                  }\n                }\n              }\n            pushViewTransitionAttributes(target$jscomp$0, formatContext);\n            target$jscomp$0.push(endOfStartTag);\n            pushInnerHTML(\n              target$jscomp$0,\n              innerHTML$jscomp$8,\n              children$jscomp$11\n            );\n            return children$jscomp$11;\n          }\n      }\n      return pushStartGenericElement(\n        target$jscomp$0,\n        props,\n        type,\n        formatContext\n      );\n    }\n    function endChunkForTag(tag) {\n      var chunk = endTagCache.get(tag);\n      void 0 === chunk &&\n        ((chunk = stringToPrecomputedChunk(\"</\" + tag + \">\")),\n        endTagCache.set(tag, chunk));\n      return chunk;\n    }\n    function hoistPreambleState(renderState, preambleState) {\n      renderState = renderState.preamble;\n      null === renderState.htmlChunks &&\n        preambleState.htmlChunks &&\n        (renderState.htmlChunks = preambleState.htmlChunks);\n      null === renderState.headChunks &&\n        preambleState.headChunks &&\n        (renderState.headChunks = preambleState.headChunks);\n      null === renderState.bodyChunks &&\n        preambleState.bodyChunks &&\n        (renderState.bodyChunks = preambleState.bodyChunks);\n    }\n    function writeBootstrap(destination, renderState) {\n      renderState = renderState.bootstrapChunks;\n      for (var i = 0; i < renderState.length - 1; i++)\n        writeChunk(destination, renderState[i]);\n      return i < renderState.length\n        ? ((i = renderState[i]),\n          (renderState.length = 0),\n          writeChunkAndReturn(destination, i))\n        : !0;\n    }\n    function writeStartPendingSuspenseBoundary(destination, renderState, id) {\n      writeChunk(destination, startPendingSuspenseBoundary1);\n      if (null === id)\n        throw Error(\n          \"An ID must have been assigned before we can complete the boundary.\"\n        );\n      writeChunk(destination, renderState.boundaryPrefix);\n      writeChunk(destination, id.toString(16));\n      return writeChunkAndReturn(destination, startPendingSuspenseBoundary2);\n    }\n    function writeStartSegment(destination, renderState, formatContext, id) {\n      switch (formatContext.insertionMode) {\n        case ROOT_HTML_MODE:\n        case HTML_HTML_MODE:\n        case HTML_HEAD_MODE:\n        case HTML_MODE:\n          return (\n            writeChunk(destination, startSegmentHTML),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, id.toString(16)),\n            writeChunkAndReturn(destination, startSegmentHTML2)\n          );\n        case SVG_MODE:\n          return (\n            writeChunk(destination, startSegmentSVG),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, id.toString(16)),\n            writeChunkAndReturn(destination, startSegmentSVG2)\n          );\n        case MATHML_MODE:\n          return (\n            writeChunk(destination, startSegmentMathML),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, id.toString(16)),\n            writeChunkAndReturn(destination, startSegmentMathML2)\n          );\n        case HTML_TABLE_MODE:\n          return (\n            writeChunk(destination, startSegmentTable),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, id.toString(16)),\n            writeChunkAndReturn(destination, startSegmentTable2)\n          );\n        case HTML_TABLE_BODY_MODE:\n          return (\n            writeChunk(destination, startSegmentTableBody),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, id.toString(16)),\n            writeChunkAndReturn(destination, startSegmentTableBody2)\n          );\n        case HTML_TABLE_ROW_MODE:\n          return (\n            writeChunk(destination, startSegmentTableRow),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, id.toString(16)),\n            writeChunkAndReturn(destination, startSegmentTableRow2)\n          );\n        case HTML_COLGROUP_MODE:\n          return (\n            writeChunk(destination, startSegmentColGroup),\n            writeChunk(destination, renderState.segmentPrefix),\n            writeChunk(destination, id.toString(16)),\n            writeChunkAndReturn(destination, startSegmentColGroup2)\n          );\n        default:\n          throw Error(\"Unknown insertion mode. This is a bug in React.\");\n      }\n    }\n    function writeEndSegment(destination, formatContext) {\n      switch (formatContext.insertionMode) {\n        case ROOT_HTML_MODE:\n        case HTML_HTML_MODE:\n        case HTML_HEAD_MODE:\n        case HTML_MODE:\n          return writeChunkAndReturn(destination, endSegmentHTML);\n        case SVG_MODE:\n          return writeChunkAndReturn(destination, endSegmentSVG);\n        case MATHML_MODE:\n          return writeChunkAndReturn(destination, endSegmentMathML);\n        case HTML_TABLE_MODE:\n          return writeChunkAndReturn(destination, endSegmentTable);\n        case HTML_TABLE_BODY_MODE:\n          return writeChunkAndReturn(destination, endSegmentTableBody);\n        case HTML_TABLE_ROW_MODE:\n          return writeChunkAndReturn(destination, endSegmentTableRow);\n        case HTML_COLGROUP_MODE:\n          return writeChunkAndReturn(destination, endSegmentColGroup);\n        default:\n          throw Error(\"Unknown insertion mode. This is a bug in React.\");\n      }\n    }\n    function escapeJSStringsForInstructionScripts(input) {\n      return JSON.stringify(input).replace(\n        regexForJSStringsInInstructionScripts,\n        function (match) {\n          switch (match) {\n            case \"<\":\n              return \"\\\\u003c\";\n            case \"\\u2028\":\n              return \"\\\\u2028\";\n            case \"\\u2029\":\n              return \"\\\\u2029\";\n            default:\n              throw Error(\n                \"escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n              );\n          }\n        }\n      );\n    }\n    function escapeJSObjectForInstructionScripts(input) {\n      return JSON.stringify(input).replace(\n        regexForJSStringsInScripts,\n        function (match) {\n          switch (match) {\n            case \"&\":\n              return \"\\\\u0026\";\n            case \">\":\n              return \"\\\\u003e\";\n            case \"<\":\n              return \"\\\\u003c\";\n            case \"\\u2028\":\n              return \"\\\\u2028\";\n            case \"\\u2029\":\n              return \"\\\\u2029\";\n            default:\n              throw Error(\n                \"escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n              );\n          }\n        }\n      );\n    }\n    function flushStyleTagsLateForBoundary(styleQueue) {\n      var rules = styleQueue.rules,\n        hrefs = styleQueue.hrefs;\n      0 < rules.length &&\n        0 === hrefs.length &&\n        console.error(\n          \"React expected to have at least one href for an a hoistable style but found none. This is a bug in React.\"\n        );\n      var i = 0;\n      if (hrefs.length) {\n        writeChunk(this, currentlyFlushingRenderState.startInlineStyle);\n        writeChunk(this, lateStyleTagResourceOpen1);\n        writeChunk(this, styleQueue.precedence);\n        for (\n          writeChunk(this, lateStyleTagResourceOpen2);\n          i < hrefs.length - 1;\n          i++\n        )\n          writeChunk(this, hrefs[i]), writeChunk(this, spaceSeparator);\n        writeChunk(this, hrefs[i]);\n        writeChunk(this, lateStyleTagResourceOpen3);\n        for (i = 0; i < rules.length; i++) writeChunk(this, rules[i]);\n        destinationHasCapacity = writeChunkAndReturn(\n          this,\n          lateStyleTagTemplateClose\n        );\n        currentlyRenderingBoundaryHasStylesToHoist = !0;\n        rules.length = 0;\n        hrefs.length = 0;\n      }\n    }\n    function hasStylesToHoist(stylesheet) {\n      return stylesheet.state !== PREAMBLE\n        ? (currentlyRenderingBoundaryHasStylesToHoist = !0)\n        : !1;\n    }\n    function writeHoistablesForBoundary(\n      destination,\n      hoistableState,\n      renderState\n    ) {\n      currentlyRenderingBoundaryHasStylesToHoist = !1;\n      destinationHasCapacity = !0;\n      currentlyFlushingRenderState = renderState;\n      hoistableState.styles.forEach(flushStyleTagsLateForBoundary, destination);\n      currentlyFlushingRenderState = null;\n      hoistableState.stylesheets.forEach(hasStylesToHoist);\n      currentlyRenderingBoundaryHasStylesToHoist &&\n        (renderState.stylesToHoist = !0);\n      return destinationHasCapacity;\n    }\n    function flushResource(resource) {\n      for (var i = 0; i < resource.length; i++) writeChunk(this, resource[i]);\n      resource.length = 0;\n    }\n    function flushStyleInPreamble(stylesheet) {\n      pushLinkImpl(stylesheetFlushingQueue, stylesheet.props);\n      for (var i = 0; i < stylesheetFlushingQueue.length; i++)\n        writeChunk(this, stylesheetFlushingQueue[i]);\n      stylesheetFlushingQueue.length = 0;\n      stylesheet.state = PREAMBLE;\n    }\n    function flushStylesInPreamble(styleQueue) {\n      var hasStylesheets = 0 < styleQueue.sheets.size;\n      styleQueue.sheets.forEach(flushStyleInPreamble, this);\n      styleQueue.sheets.clear();\n      var rules = styleQueue.rules,\n        hrefs = styleQueue.hrefs;\n      if (!hasStylesheets || hrefs.length) {\n        writeChunk(this, currentlyFlushingRenderState.startInlineStyle);\n        writeChunk(this, styleTagResourceOpen1);\n        writeChunk(this, styleQueue.precedence);\n        styleQueue = 0;\n        if (hrefs.length) {\n          for (\n            writeChunk(this, styleTagResourceOpen2);\n            styleQueue < hrefs.length - 1;\n            styleQueue++\n          )\n            writeChunk(this, hrefs[styleQueue]),\n              writeChunk(this, spaceSeparator);\n          writeChunk(this, hrefs[styleQueue]);\n        }\n        writeChunk(this, styleTagResourceOpen3);\n        for (styleQueue = 0; styleQueue < rules.length; styleQueue++)\n          writeChunk(this, rules[styleQueue]);\n        writeChunk(this, styleTagResourceClose);\n        rules.length = 0;\n        hrefs.length = 0;\n      }\n    }\n    function preloadLateStyle(stylesheet) {\n      if (stylesheet.state === PENDING$1) {\n        stylesheet.state = PRELOADED;\n        var props = stylesheet.props;\n        pushLinkImpl(stylesheetFlushingQueue, {\n          rel: \"preload\",\n          as: \"style\",\n          href: stylesheet.props.href,\n          crossOrigin: props.crossOrigin,\n          fetchPriority: props.fetchPriority,\n          integrity: props.integrity,\n          media: props.media,\n          hrefLang: props.hrefLang,\n          referrerPolicy: props.referrerPolicy\n        });\n        for (\n          stylesheet = 0;\n          stylesheet < stylesheetFlushingQueue.length;\n          stylesheet++\n        )\n          writeChunk(this, stylesheetFlushingQueue[stylesheet]);\n        stylesheetFlushingQueue.length = 0;\n      }\n    }\n    function preloadLateStyles(styleQueue) {\n      styleQueue.sheets.forEach(preloadLateStyle, this);\n      styleQueue.sheets.clear();\n    }\n    function pushCompletedShellIdAttribute(target, resumableState) {\n      (resumableState.instructions & SentCompletedShellId) === NothingSent &&\n        ((resumableState.instructions |= SentCompletedShellId),\n        target.push(\n          completedShellIdAttributeStart,\n          escapeTextForBrowser(\"_\" + resumableState.idPrefix + \"R_\"),\n          attributeEnd\n        ));\n    }\n    function writeStyleResourceDependenciesInJS(destination, hoistableState) {\n      writeChunk(destination, arrayFirstOpenBracket);\n      var nextArrayOpenBrackChunk = arrayFirstOpenBracket;\n      hoistableState.stylesheets.forEach(function (resource) {\n        if (resource.state !== PREAMBLE)\n          if (resource.state === LATE)\n            writeChunk(destination, nextArrayOpenBrackChunk),\n              (resource = resource.props.href),\n              checkAttributeStringCoercion(resource, \"href\"),\n              writeChunk(\n                destination,\n                escapeJSObjectForInstructionScripts(\"\" + resource)\n              ),\n              writeChunk(destination, arrayCloseBracket),\n              (nextArrayOpenBrackChunk = arraySubsequentOpenBracket);\n          else {\n            writeChunk(destination, nextArrayOpenBrackChunk);\n            var precedence = resource.props[\"data-precedence\"],\n              props = resource.props,\n              coercedHref = sanitizeURL(\"\" + resource.props.href);\n            writeChunk(\n              destination,\n              escapeJSObjectForInstructionScripts(coercedHref)\n            );\n            checkAttributeStringCoercion(precedence, \"precedence\");\n            precedence = \"\" + precedence;\n            writeChunk(destination, arrayInterstitial);\n            writeChunk(\n              destination,\n              escapeJSObjectForInstructionScripts(precedence)\n            );\n            for (var propKey in props)\n              if (\n                hasOwnProperty.call(props, propKey) &&\n                ((precedence = props[propKey]), null != precedence)\n              )\n                switch (propKey) {\n                  case \"href\":\n                  case \"rel\":\n                  case \"precedence\":\n                  case \"data-precedence\":\n                    break;\n                  case \"children\":\n                  case \"dangerouslySetInnerHTML\":\n                    throw Error(\n                      \"link is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\"\n                    );\n                  default:\n                    writeStyleResourceAttributeInJS(\n                      destination,\n                      propKey,\n                      precedence\n                    );\n                }\n            writeChunk(destination, arrayCloseBracket);\n            nextArrayOpenBrackChunk = arraySubsequentOpenBracket;\n            resource.state = LATE;\n          }\n      });\n      writeChunk(destination, arrayCloseBracket);\n    }\n    function writeStyleResourceAttributeInJS(destination, name, value) {\n      var attributeName = name.toLowerCase();\n      switch (typeof value) {\n        case \"function\":\n        case \"symbol\":\n          return;\n      }\n      switch (name) {\n        case \"innerHTML\":\n        case \"dangerouslySetInnerHTML\":\n        case \"suppressContentEditableWarning\":\n        case \"suppressHydrationWarning\":\n        case \"style\":\n        case \"ref\":\n          return;\n        case \"className\":\n          attributeName = \"class\";\n          checkAttributeStringCoercion(value, attributeName);\n          name = \"\" + value;\n          break;\n        case \"hidden\":\n          if (!1 === value) return;\n          name = \"\";\n          break;\n        case \"src\":\n        case \"href\":\n          value = sanitizeURL(value);\n          checkAttributeStringCoercion(value, attributeName);\n          name = \"\" + value;\n          break;\n        default:\n          if (\n            (2 < name.length &&\n              (\"o\" === name[0] || \"O\" === name[0]) &&\n              (\"n\" === name[1] || \"N\" === name[1])) ||\n            !isAttributeNameSafe(name)\n          )\n            return;\n          checkAttributeStringCoercion(value, attributeName);\n          name = \"\" + value;\n      }\n      writeChunk(destination, arrayInterstitial);\n      writeChunk(\n        destination,\n        escapeJSObjectForInstructionScripts(attributeName)\n      );\n      writeChunk(destination, arrayInterstitial);\n      writeChunk(destination, escapeJSObjectForInstructionScripts(name));\n    }\n    function createHoistableState() {\n      return { styles: new Set(), stylesheets: new Set(), suspenseyImages: !1 };\n    }\n    function preloadBootstrapScriptOrModule(\n      resumableState,\n      renderState,\n      href,\n      props\n    ) {\n      (resumableState.scriptResources.hasOwnProperty(href) ||\n        resumableState.moduleScriptResources.hasOwnProperty(href)) &&\n        console.error(\n          'Internal React Error: React expected bootstrap script or module with src \"%s\" to not have been preloaded already. please file an issue',\n          href\n        );\n      resumableState.scriptResources[href] = EXISTS;\n      resumableState.moduleScriptResources[href] = EXISTS;\n      resumableState = [];\n      pushLinkImpl(resumableState, props);\n      renderState.bootstrapScripts.add(resumableState);\n    }\n    function adoptPreloadCredentials(target, preloadState) {\n      null == target.crossOrigin && (target.crossOrigin = preloadState[0]);\n      null == target.integrity && (target.integrity = preloadState[1]);\n    }\n    function getPreloadAsHeader(href, as, params) {\n      href = escapeHrefForLinkHeaderURLContext(href);\n      as = escapeStringForLinkHeaderQuotedParamValueContext(as, \"as\");\n      as = \"<\" + href + '>; rel=preload; as=\"' + as + '\"';\n      for (var paramName in params)\n        hasOwnProperty.call(params, paramName) &&\n          ((href = params[paramName]),\n          \"string\" === typeof href &&\n            (as +=\n              \"; \" +\n              paramName.toLowerCase() +\n              '=\"' +\n              escapeStringForLinkHeaderQuotedParamValueContext(\n                href,\n                paramName\n              ) +\n              '\"'));\n      return as;\n    }\n    function escapeHrefForLinkHeaderURLContext(hrefInput) {\n      checkAttributeStringCoercion(hrefInput, \"href\");\n      return (\"\" + hrefInput).replace(\n        regexForHrefInLinkHeaderURLContext,\n        escapeHrefForLinkHeaderURLContextReplacer\n      );\n    }\n    function escapeHrefForLinkHeaderURLContextReplacer(match) {\n      switch (match) {\n        case \"<\":\n          return \"%3C\";\n        case \">\":\n          return \"%3E\";\n        case \"\\n\":\n          return \"%0A\";\n        case \"\\r\":\n          return \"%0D\";\n        default:\n          throw Error(\n            \"escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n          );\n      }\n    }\n    function escapeStringForLinkHeaderQuotedParamValueContext(value, name) {\n      willCoercionThrow(value) &&\n        (console.error(\n          \"The provided `%s` option is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          name,\n          typeName(value)\n        ),\n        testStringCoercion(value));\n      return (\"\" + value).replace(\n        regexForLinkHeaderQuotedParamValueContext,\n        escapeStringForLinkHeaderQuotedParamValueContextReplacer\n      );\n    }\n    function escapeStringForLinkHeaderQuotedParamValueContextReplacer(match) {\n      switch (match) {\n        case '\"':\n          return \"%22\";\n        case \"'\":\n          return \"%27\";\n        case \";\":\n          return \"%3B\";\n        case \",\":\n          return \"%2C\";\n        case \"\\n\":\n          return \"%0A\";\n        case \"\\r\":\n          return \"%0D\";\n        default:\n          throw Error(\n            \"escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React\"\n          );\n      }\n    }\n    function hoistStyleQueueDependency(styleQueue) {\n      this.styles.add(styleQueue);\n    }\n    function hoistStylesheetDependency(stylesheet) {\n      this.stylesheets.add(stylesheet);\n    }\n    function hoistHoistables(parentState, childState) {\n      childState.styles.forEach(hoistStyleQueueDependency, parentState);\n      childState.stylesheets.forEach(hoistStylesheetDependency, parentState);\n      childState.suspenseyImages && (parentState.suspenseyImages = !0);\n    }\n    function hasSuspenseyContent(hoistableState, flushingInShell) {\n      return flushingInShell\n        ? hoistableState.suspenseyImages\n        : 0 < hoistableState.stylesheets.size || hoistableState.suspenseyImages;\n    }\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function popToNearestCommonAncestor(prev, next) {\n      if (prev !== next) {\n        prev.context._currentValue = prev.parentValue;\n        prev = prev.parent;\n        var parentNext = next.parent;\n        if (null === prev) {\n          if (null !== parentNext)\n            throw Error(\n              \"The stacks must reach the root at the same time. This is a bug in React.\"\n            );\n        } else {\n          if (null === parentNext)\n            throw Error(\n              \"The stacks must reach the root at the same time. This is a bug in React.\"\n            );\n          popToNearestCommonAncestor(prev, parentNext);\n        }\n        next.context._currentValue = next.value;\n      }\n    }\n    function popAllPrevious(prev) {\n      prev.context._currentValue = prev.parentValue;\n      prev = prev.parent;\n      null !== prev && popAllPrevious(prev);\n    }\n    function pushAllNext(next) {\n      var parentNext = next.parent;\n      null !== parentNext && pushAllNext(parentNext);\n      next.context._currentValue = next.value;\n    }\n    function popPreviousToCommonLevel(prev, next) {\n      prev.context._currentValue = prev.parentValue;\n      prev = prev.parent;\n      if (null === prev)\n        throw Error(\n          \"The depth must equal at least at zero before reaching the root. This is a bug in React.\"\n        );\n      prev.depth === next.depth\n        ? popToNearestCommonAncestor(prev, next)\n        : popPreviousToCommonLevel(prev, next);\n    }\n    function popNextToCommonLevel(prev, next) {\n      var parentNext = next.parent;\n      if (null === parentNext)\n        throw Error(\n          \"The depth must equal at least at zero before reaching the root. This is a bug in React.\"\n        );\n      prev.depth === parentNext.depth\n        ? popToNearestCommonAncestor(prev, parentNext)\n        : popNextToCommonLevel(prev, parentNext);\n      next.context._currentValue = next.value;\n    }\n    function switchContext(newSnapshot) {\n      var prev = currentActiveSnapshot;\n      prev !== newSnapshot &&\n        (null === prev\n          ? pushAllNext(newSnapshot)\n          : null === newSnapshot\n            ? popAllPrevious(prev)\n            : prev.depth === newSnapshot.depth\n              ? popToNearestCommonAncestor(prev, newSnapshot)\n              : prev.depth > newSnapshot.depth\n                ? popPreviousToCommonLevel(prev, newSnapshot)\n                : popNextToCommonLevel(prev, newSnapshot),\n        (currentActiveSnapshot = newSnapshot));\n    }\n    function warnOnInvalidCallback(callback) {\n      if (null !== callback && \"function\" !== typeof callback) {\n        var key = String(callback);\n        didWarnOnInvalidCallback.has(key) ||\n          (didWarnOnInvalidCallback.add(key),\n          console.error(\n            \"Expected the last optional `callback` argument to be a function. Instead received: %s.\",\n            callback\n          ));\n      }\n    }\n    function warnNoop(publicInstance, callerName) {\n      publicInstance =\n        ((publicInstance = publicInstance.constructor) &&\n          getComponentNameFromType(publicInstance)) ||\n        \"ReactClass\";\n      var warningKey = publicInstance + \".\" + callerName;\n      didWarnAboutNoopUpdateForComponent[warningKey] ||\n        (console.error(\n          \"Can only update a mounting component. This usually means you called %s() outside componentWillMount() on the server. This is a no-op.\\n\\nPlease check the code for the %s component.\",\n          callerName,\n          publicInstance\n        ),\n        (didWarnAboutNoopUpdateForComponent[warningKey] = !0));\n    }\n    function getTreeId(context) {\n      var overflow = context.overflow;\n      context = context.id;\n      return (\n        (context & ~(1 << (32 - clz32(context) - 1))).toString(32) + overflow\n      );\n    }\n    function pushTreeContext(baseContext, totalChildren, index) {\n      var baseIdWithLeadingBit = baseContext.id;\n      baseContext = baseContext.overflow;\n      var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;\n      baseIdWithLeadingBit &= ~(1 << baseLength);\n      index += 1;\n      var length = 32 - clz32(totalChildren) + baseLength;\n      if (30 < length) {\n        var numberOfOverflowBits = baseLength - (baseLength % 5);\n        length = (\n          baseIdWithLeadingBit &\n          ((1 << numberOfOverflowBits) - 1)\n        ).toString(32);\n        baseIdWithLeadingBit >>= numberOfOverflowBits;\n        baseLength -= numberOfOverflowBits;\n        return {\n          id:\n            (1 << (32 - clz32(totalChildren) + baseLength)) |\n            (index << baseLength) |\n            baseIdWithLeadingBit,\n          overflow: length + baseContext\n        };\n      }\n      return {\n        id: (1 << length) | (index << baseLength) | baseIdWithLeadingBit,\n        overflow: baseContext\n      };\n    }\n    function clz32Fallback(x) {\n      x >>>= 0;\n      return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;\n    }\n    function noop() {}\n    function trackUsedThenable(thenableState, thenable, index) {\n      index = thenableState[index];\n      void 0 === index\n        ? thenableState.push(thenable)\n        : index !== thenable && (thenable.then(noop, noop), (thenable = index));\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return thenable.value;\n        case \"rejected\":\n          throw thenable.reason;\n        default:\n          \"string\" === typeof thenable.status\n            ? thenable.then(noop, noop)\n            : ((thenableState = thenable),\n              (thenableState.status = \"pending\"),\n              thenableState.then(\n                function (fulfilledValue) {\n                  if (\"pending\" === thenable.status) {\n                    var fulfilledThenable = thenable;\n                    fulfilledThenable.status = \"fulfilled\";\n                    fulfilledThenable.value = fulfilledValue;\n                  }\n                },\n                function (error) {\n                  if (\"pending\" === thenable.status) {\n                    var rejectedThenable = thenable;\n                    rejectedThenable.status = \"rejected\";\n                    rejectedThenable.reason = error;\n                  }\n                }\n              ));\n          switch (thenable.status) {\n            case \"fulfilled\":\n              return thenable.value;\n            case \"rejected\":\n              throw thenable.reason;\n          }\n          suspendedThenable = thenable;\n          shouldCaptureSuspendedCallSite && captureSuspendedCallSite();\n          throw SuspenseException;\n      }\n    }\n    function getSuspendedThenable() {\n      if (null === suspendedThenable)\n        throw Error(\n          \"Expected a suspended thenable. This is a bug in React. Please file an issue.\"\n        );\n      var thenable = suspendedThenable;\n      suspendedThenable = null;\n      return thenable;\n    }\n    function captureSuspendedCallSite() {\n      var currentTask = currentTaskInDEV;\n      if (null === currentTask)\n        throw Error(\n          \"Expected to have a current task when tracking a suspend call site. This is a bug in React.\"\n        );\n      var currentComponentStack = currentTask.componentStack;\n      if (null === currentComponentStack)\n        throw Error(\n          \"Expected to have a component stack on the current task when tracking a suspended call site. This is a bug in React.\"\n        );\n      suspendedCallSiteStack = {\n        parent: currentComponentStack.parent,\n        type: currentComponentStack.type,\n        owner: currentComponentStack.owner,\n        stack: Error(\"react-stack-top-frame\")\n      };\n      suspendedCallSiteDebugTask = currentTask.debugTask;\n    }\n    function ensureSuspendableThenableStateDEV(thenableState) {\n      var lastThenable = thenableState[thenableState.length - 1];\n      switch (lastThenable.status) {\n        case \"fulfilled\":\n          var previousThenableValue = lastThenable.value,\n            previousThenableThen = lastThenable.then.bind(lastThenable);\n          delete lastThenable.value;\n          delete lastThenable.status;\n          lastThenable.then = noop;\n          return function () {\n            lastThenable.then = previousThenableThen;\n            lastThenable.value = previousThenableValue;\n            lastThenable.status = \"fulfilled\";\n          };\n        case \"rejected\":\n          var previousThenableReason = lastThenable.reason;\n          delete lastThenable.reason;\n          delete lastThenable.status;\n          return function () {\n            lastThenable.reason = previousThenableReason;\n            lastThenable.status = \"rejected\";\n          };\n      }\n      return noop;\n    }\n    function is(x, y) {\n      return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n    }\n    function resolveCurrentlyRenderingComponent() {\n      if (null === currentlyRenderingComponent)\n        throw Error(\n          \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n        );\n      isInHookUserCodeInDev &&\n        console.error(\n          \"Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks\"\n        );\n      return currentlyRenderingComponent;\n    }\n    function createHook() {\n      if (0 < numberOfReRenders)\n        throw Error(\"Rendered more hooks than during the previous render\");\n      return { memoizedState: null, queue: null, next: null };\n    }\n    function createWorkInProgressHook() {\n      null === workInProgressHook\n        ? null === firstWorkInProgressHook\n          ? ((isReRender = !1),\n            (firstWorkInProgressHook = workInProgressHook = createHook()))\n          : ((isReRender = !0), (workInProgressHook = firstWorkInProgressHook))\n        : null === workInProgressHook.next\n          ? ((isReRender = !1),\n            (workInProgressHook = workInProgressHook.next = createHook()))\n          : ((isReRender = !0), (workInProgressHook = workInProgressHook.next));\n      return workInProgressHook;\n    }\n    function getThenableStateAfterSuspending() {\n      var state = thenableState;\n      thenableState = null;\n      return state;\n    }\n    function resetHooksState() {\n      isInHookUserCodeInDev = !1;\n      currentlyRenderingKeyPath =\n        currentlyRenderingRequest =\n        currentlyRenderingTask =\n        currentlyRenderingComponent =\n          null;\n      didScheduleRenderPhaseUpdate = !1;\n      firstWorkInProgressHook = null;\n      numberOfReRenders = 0;\n      workInProgressHook = renderPhaseUpdates = null;\n    }\n    function readContext(context) {\n      isInHookUserCodeInDev &&\n        console.error(\n          \"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\"\n        );\n      return context._currentValue;\n    }\n    function basicStateReducer(state, action) {\n      return \"function\" === typeof action ? action(state) : action;\n    }\n    function useReducer(reducer, initialArg, init) {\n      reducer !== basicStateReducer && (currentHookNameInDev = \"useReducer\");\n      currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n      workInProgressHook = createWorkInProgressHook();\n      if (isReRender) {\n        init = workInProgressHook.queue;\n        initialArg = init.dispatch;\n        if (null !== renderPhaseUpdates) {\n          var firstRenderPhaseUpdate = renderPhaseUpdates.get(init);\n          if (void 0 !== firstRenderPhaseUpdate) {\n            renderPhaseUpdates.delete(init);\n            init = workInProgressHook.memoizedState;\n            do {\n              var action = firstRenderPhaseUpdate.action;\n              isInHookUserCodeInDev = !0;\n              init = reducer(init, action);\n              isInHookUserCodeInDev = !1;\n              firstRenderPhaseUpdate = firstRenderPhaseUpdate.next;\n            } while (null !== firstRenderPhaseUpdate);\n            workInProgressHook.memoizedState = init;\n            return [init, initialArg];\n          }\n        }\n        return [workInProgressHook.memoizedState, initialArg];\n      }\n      isInHookUserCodeInDev = !0;\n      reducer =\n        reducer === basicStateReducer\n          ? \"function\" === typeof initialArg\n            ? initialArg()\n            : initialArg\n          : void 0 !== init\n            ? init(initialArg)\n            : initialArg;\n      isInHookUserCodeInDev = !1;\n      workInProgressHook.memoizedState = reducer;\n      reducer = workInProgressHook.queue = { last: null, dispatch: null };\n      reducer = reducer.dispatch = dispatchAction.bind(\n        null,\n        currentlyRenderingComponent,\n        reducer\n      );\n      return [workInProgressHook.memoizedState, reducer];\n    }\n    function useMemo(nextCreate, deps) {\n      currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n      workInProgressHook = createWorkInProgressHook();\n      deps = void 0 === deps ? null : deps;\n      if (null !== workInProgressHook) {\n        var prevState = workInProgressHook.memoizedState;\n        if (null !== prevState && null !== deps) {\n          a: {\n            var JSCompiler_inline_result = prevState[1];\n            if (null === JSCompiler_inline_result)\n              console.error(\n                \"%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.\",\n                currentHookNameInDev\n              ),\n                (JSCompiler_inline_result = !1);\n            else {\n              deps.length !== JSCompiler_inline_result.length &&\n                console.error(\n                  \"The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\\n\\nPrevious: %s\\nIncoming: %s\",\n                  currentHookNameInDev,\n                  \"[\" + deps.join(\", \") + \"]\",\n                  \"[\" + JSCompiler_inline_result.join(\", \") + \"]\"\n                );\n              for (\n                var i = 0;\n                i < JSCompiler_inline_result.length && i < deps.length;\n                i++\n              )\n                if (!objectIs(deps[i], JSCompiler_inline_result[i])) {\n                  JSCompiler_inline_result = !1;\n                  break a;\n                }\n              JSCompiler_inline_result = !0;\n            }\n          }\n          if (JSCompiler_inline_result) return prevState[0];\n        }\n      }\n      isInHookUserCodeInDev = !0;\n      nextCreate = nextCreate();\n      isInHookUserCodeInDev = !1;\n      workInProgressHook.memoizedState = [nextCreate, deps];\n      return nextCreate;\n    }\n    function dispatchAction(componentIdentity, queue, action) {\n      if (25 <= numberOfReRenders)\n        throw Error(\n          \"Too many re-renders. React limits the number of renders to prevent an infinite loop.\"\n        );\n      if (componentIdentity === currentlyRenderingComponent)\n        if (\n          ((didScheduleRenderPhaseUpdate = !0),\n          (componentIdentity = { action: action, next: null }),\n          null === renderPhaseUpdates && (renderPhaseUpdates = new Map()),\n          (action = renderPhaseUpdates.get(queue)),\n          void 0 === action)\n        )\n          renderPhaseUpdates.set(queue, componentIdentity);\n        else {\n          for (queue = action; null !== queue.next; ) queue = queue.next;\n          queue.next = componentIdentity;\n        }\n    }\n    function throwOnUseEffectEventCall() {\n      throw Error(\n        \"A function wrapped in useEffectEvent can't be called during rendering.\"\n      );\n    }\n    function unsupportedStartTransition() {\n      throw Error(\"startTransition cannot be called during server rendering.\");\n    }\n    function unsupportedSetOptimisticState() {\n      throw Error(\"Cannot update optimistic state while rendering.\");\n    }\n    function createPostbackActionStateKey(\n      permalink,\n      componentKeyPath,\n      hookIndex\n    ) {\n      if (void 0 !== permalink) return \"p\" + permalink;\n      permalink = JSON.stringify([componentKeyPath, null, hookIndex]);\n      componentKeyPath = crypto.createHash(\"md5\");\n      componentKeyPath.update(permalink);\n      return \"k\" + componentKeyPath.digest(\"hex\");\n    }\n    function useActionState(action, initialState, permalink) {\n      resolveCurrentlyRenderingComponent();\n      var actionStateHookIndex = actionStateCounter++,\n        request = currentlyRenderingRequest;\n      if (\"function\" === typeof action.$$FORM_ACTION) {\n        var nextPostbackStateKey = null,\n          componentKeyPath = currentlyRenderingKeyPath;\n        request = request.formState;\n        var isSignatureEqual = action.$$IS_SIGNATURE_EQUAL;\n        if (null !== request && \"function\" === typeof isSignatureEqual) {\n          var postbackKey = request[1];\n          isSignatureEqual.call(action, request[2], request[3]) &&\n            ((nextPostbackStateKey = createPostbackActionStateKey(\n              permalink,\n              componentKeyPath,\n              actionStateHookIndex\n            )),\n            postbackKey === nextPostbackStateKey &&\n              ((actionStateMatchingIndex = actionStateHookIndex),\n              (initialState = request[0])));\n        }\n        var boundAction = action.bind(null, initialState);\n        action = function (payload) {\n          boundAction(payload);\n        };\n        \"function\" === typeof boundAction.$$FORM_ACTION &&\n          (action.$$FORM_ACTION = function (prefix) {\n            prefix = boundAction.$$FORM_ACTION(prefix);\n            void 0 !== permalink &&\n              (checkAttributeStringCoercion(permalink, \"target\"),\n              (permalink += \"\"),\n              (prefix.action = permalink));\n            var formData = prefix.data;\n            formData &&\n              (null === nextPostbackStateKey &&\n                (nextPostbackStateKey = createPostbackActionStateKey(\n                  permalink,\n                  componentKeyPath,\n                  actionStateHookIndex\n                )),\n              formData.append(\"$ACTION_KEY\", nextPostbackStateKey));\n            return prefix;\n          });\n        return [initialState, action, !1];\n      }\n      var _boundAction = action.bind(null, initialState);\n      return [\n        initialState,\n        function (payload) {\n          _boundAction(payload);\n        },\n        !1\n      ];\n    }\n    function unwrapThenable(thenable) {\n      var index = thenableIndexCounter;\n      thenableIndexCounter += 1;\n      null === thenableState && (thenableState = []);\n      return trackUsedThenable(thenableState, thenable, index);\n    }\n    function unsupportedRefresh() {\n      throw Error(\"Cache cannot be refreshed during server rendering.\");\n    }\n    function disabledLog() {}\n    function disableLogs() {\n      if (0 === disabledDepth) {\n        prevLog = console.log;\n        prevInfo = console.info;\n        prevWarn = console.warn;\n        prevError = console.error;\n        prevGroup = console.group;\n        prevGroupCollapsed = console.groupCollapsed;\n        prevGroupEnd = console.groupEnd;\n        var props = {\n          configurable: !0,\n          enumerable: !0,\n          value: disabledLog,\n          writable: !0\n        };\n        Object.defineProperties(console, {\n          info: props,\n          log: props,\n          warn: props,\n          error: props,\n          group: props,\n          groupCollapsed: props,\n          groupEnd: props\n        });\n      }\n      disabledDepth++;\n    }\n    function reenableLogs() {\n      disabledDepth--;\n      if (0 === disabledDepth) {\n        var props = { configurable: !0, enumerable: !0, writable: !0 };\n        Object.defineProperties(console, {\n          log: assign({}, props, { value: prevLog }),\n          info: assign({}, props, { value: prevInfo }),\n          warn: assign({}, props, { value: prevWarn }),\n          error: assign({}, props, { value: prevError }),\n          group: assign({}, props, { value: prevGroup }),\n          groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),\n          groupEnd: assign({}, props, { value: prevGroupEnd })\n        });\n      }\n      0 > disabledDepth &&\n        console.error(\n          \"disabledDepth fell below zero. This is a bug in React. Please file an issue.\"\n        );\n    }\n    function prepareStackTrace(error, structuredStackTrace) {\n      error = (error.name || \"Error\") + \": \" + (error.message || \"\");\n      for (var i = 0; i < structuredStackTrace.length; i++)\n        error += \"\\n    at \" + structuredStackTrace[i].toString();\n      return error;\n    }\n    function formatOwnerStack(error) {\n      var prevPrepareStackTrace = Error.prepareStackTrace;\n      Error.prepareStackTrace = prepareStackTrace;\n      error = error.stack;\n      Error.prepareStackTrace = prevPrepareStackTrace;\n      error.startsWith(\"Error: react-stack-top-frame\\n\") &&\n        (error = error.slice(29));\n      prevPrepareStackTrace = error.indexOf(\"\\n\");\n      -1 !== prevPrepareStackTrace &&\n        (error = error.slice(prevPrepareStackTrace + 1));\n      prevPrepareStackTrace = error.indexOf(\"react_stack_bottom_frame\");\n      -1 !== prevPrepareStackTrace &&\n        (prevPrepareStackTrace = error.lastIndexOf(\n          \"\\n\",\n          prevPrepareStackTrace\n        ));\n      if (-1 !== prevPrepareStackTrace)\n        error = error.slice(0, prevPrepareStackTrace);\n      else return \"\";\n      return error;\n    }\n    function describeBuiltInComponentFrame(name) {\n      if (void 0 === prefix)\n        try {\n          throw Error();\n        } catch (x) {\n          var match = x.stack.trim().match(/\\n( *(at )?)/);\n          prefix = (match && match[1]) || \"\";\n          suffix =\n            -1 < x.stack.indexOf(\"\\n    at\")\n              ? \" (<anonymous>)\"\n              : -1 < x.stack.indexOf(\"@\")\n                ? \"@unknown:0:0\"\n                : \"\";\n        }\n      return \"\\n\" + prefix + name + suffix;\n    }\n    function describeNativeComponentFrame(fn, construct) {\n      if (!fn || reentry) return \"\";\n      var frame = componentFrameCache.get(fn);\n      if (void 0 !== frame) return frame;\n      reentry = !0;\n      frame = Error.prepareStackTrace;\n      Error.prepareStackTrace = prepareStackTrace;\n      var previousDispatcher = null;\n      previousDispatcher = ReactSharedInternals.H;\n      ReactSharedInternals.H = null;\n      disableLogs();\n      try {\n        var RunInRootFrame = {\n          DetermineComponentFrameRoot: function () {\n            try {\n              if (construct) {\n                var Fake = function () {\n                  throw Error();\n                };\n                Object.defineProperty(Fake.prototype, \"props\", {\n                  set: function () {\n                    throw Error();\n                  }\n                });\n                if (\"object\" === typeof Reflect && Reflect.construct) {\n                  try {\n                    Reflect.construct(Fake, []);\n                  } catch (x) {\n                    var control = x;\n                  }\n                  Reflect.construct(fn, [], Fake);\n                } else {\n                  try {\n                    Fake.call();\n                  } catch (x$0) {\n                    control = x$0;\n                  }\n                  fn.call(Fake.prototype);\n                }\n              } else {\n                try {\n                  throw Error();\n                } catch (x$1) {\n                  control = x$1;\n                }\n                (Fake = fn()) &&\n                  \"function\" === typeof Fake.catch &&\n                  Fake.catch(function () {});\n              }\n            } catch (sample) {\n              if (sample && control && \"string\" === typeof sample.stack)\n                return [sample.stack, control.stack];\n            }\n            return [null, null];\n          }\n        };\n        RunInRootFrame.DetermineComponentFrameRoot.displayName =\n          \"DetermineComponentFrameRoot\";\n        var namePropDescriptor = Object.getOwnPropertyDescriptor(\n          RunInRootFrame.DetermineComponentFrameRoot,\n          \"name\"\n        );\n        namePropDescriptor &&\n          namePropDescriptor.configurable &&\n          Object.defineProperty(\n            RunInRootFrame.DetermineComponentFrameRoot,\n            \"name\",\n            { value: \"DetermineComponentFrameRoot\" }\n          );\n        var _RunInRootFrame$Deter =\n            RunInRootFrame.DetermineComponentFrameRoot(),\n          sampleStack = _RunInRootFrame$Deter[0],\n          controlStack = _RunInRootFrame$Deter[1];\n        if (sampleStack && controlStack) {\n          var sampleLines = sampleStack.split(\"\\n\"),\n            controlLines = controlStack.split(\"\\n\");\n          for (\n            _RunInRootFrame$Deter = namePropDescriptor = 0;\n            namePropDescriptor < sampleLines.length &&\n            !sampleLines[namePropDescriptor].includes(\n              \"DetermineComponentFrameRoot\"\n            );\n\n          )\n            namePropDescriptor++;\n          for (\n            ;\n            _RunInRootFrame$Deter < controlLines.length &&\n            !controlLines[_RunInRootFrame$Deter].includes(\n              \"DetermineComponentFrameRoot\"\n            );\n\n          )\n            _RunInRootFrame$Deter++;\n          if (\n            namePropDescriptor === sampleLines.length ||\n            _RunInRootFrame$Deter === controlLines.length\n          )\n            for (\n              namePropDescriptor = sampleLines.length - 1,\n                _RunInRootFrame$Deter = controlLines.length - 1;\n              1 <= namePropDescriptor &&\n              0 <= _RunInRootFrame$Deter &&\n              sampleLines[namePropDescriptor] !==\n                controlLines[_RunInRootFrame$Deter];\n\n            )\n              _RunInRootFrame$Deter--;\n          for (\n            ;\n            1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter;\n            namePropDescriptor--, _RunInRootFrame$Deter--\n          )\n            if (\n              sampleLines[namePropDescriptor] !==\n              controlLines[_RunInRootFrame$Deter]\n            ) {\n              if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {\n                do\n                  if (\n                    (namePropDescriptor--,\n                    _RunInRootFrame$Deter--,\n                    0 > _RunInRootFrame$Deter ||\n                      sampleLines[namePropDescriptor] !==\n                        controlLines[_RunInRootFrame$Deter])\n                  ) {\n                    var _frame =\n                      \"\\n\" +\n                      sampleLines[namePropDescriptor].replace(\n                        \" at new \",\n                        \" at \"\n                      );\n                    fn.displayName &&\n                      _frame.includes(\"<anonymous>\") &&\n                      (_frame = _frame.replace(\"<anonymous>\", fn.displayName));\n                    \"function\" === typeof fn &&\n                      componentFrameCache.set(fn, _frame);\n                    return _frame;\n                  }\n                while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);\n              }\n              break;\n            }\n        }\n      } finally {\n        (reentry = !1),\n          (ReactSharedInternals.H = previousDispatcher),\n          reenableLogs(),\n          (Error.prepareStackTrace = frame);\n      }\n      sampleLines = (sampleLines = fn ? fn.displayName || fn.name : \"\")\n        ? describeBuiltInComponentFrame(sampleLines)\n        : \"\";\n      \"function\" === typeof fn && componentFrameCache.set(fn, sampleLines);\n      return sampleLines;\n    }\n    function describeComponentStackByType(type) {\n      if (\"string\" === typeof type) return describeBuiltInComponentFrame(type);\n      if (\"function\" === typeof type)\n        return type.prototype && type.prototype.isReactComponent\n          ? describeNativeComponentFrame(type, !0)\n          : describeNativeComponentFrame(type, !1);\n      if (\"object\" === typeof type && null !== type) {\n        switch (type.$$typeof) {\n          case REACT_FORWARD_REF_TYPE:\n            return describeNativeComponentFrame(type.render, !1);\n          case REACT_MEMO_TYPE:\n            return describeNativeComponentFrame(type.type, !1);\n          case REACT_LAZY_TYPE:\n            var lazyComponent = type,\n              payload = lazyComponent._payload;\n            lazyComponent = lazyComponent._init;\n            try {\n              type = lazyComponent(payload);\n            } catch (x) {\n              return describeBuiltInComponentFrame(\"Lazy\");\n            }\n            return describeComponentStackByType(type);\n        }\n        if (\"string\" === typeof type.name) {\n          a: {\n            payload = type.name;\n            lazyComponent = type.env;\n            type = type.debugLocation;\n            if (null != type) {\n              type = formatOwnerStack(type);\n              var idx = type.lastIndexOf(\"\\n\");\n              type = -1 === idx ? type : type.slice(idx + 1);\n              if (-1 !== type.indexOf(payload)) {\n                payload = \"\\n\" + type;\n                break a;\n              }\n            }\n            payload = describeBuiltInComponentFrame(\n              payload + (lazyComponent ? \" [\" + lazyComponent + \"]\" : \"\")\n            );\n          }\n          return payload;\n        }\n      }\n      switch (type) {\n        case REACT_SUSPENSE_LIST_TYPE:\n          return describeBuiltInComponentFrame(\"SuspenseList\");\n        case REACT_SUSPENSE_TYPE:\n          return describeBuiltInComponentFrame(\"Suspense\");\n        case REACT_VIEW_TRANSITION_TYPE:\n          return describeBuiltInComponentFrame(\"ViewTransition\");\n      }\n      return \"\";\n    }\n    function getViewTransitionClassName(defaultClass, eventClass) {\n      defaultClass =\n        null == defaultClass || \"string\" === typeof defaultClass\n          ? defaultClass\n          : defaultClass.default;\n      eventClass =\n        null == eventClass || \"string\" === typeof eventClass\n          ? eventClass\n          : eventClass.default;\n      return null == eventClass\n        ? \"auto\" === defaultClass\n          ? null\n          : defaultClass\n        : \"auto\" === eventClass\n          ? null\n          : eventClass;\n    }\n    function resetOwnerStackLimit() {\n      var now = getCurrentTime();\n      1e3 < now - lastResetTime &&\n        ((ReactSharedInternals.recentlyCreatedOwnerStacks = 0),\n        (lastResetTime = now));\n    }\n    function isEligibleForOutlining(request, boundary) {\n      return (\n        (500 < boundary.byteSize ||\n          hasSuspenseyContent(boundary.contentState, !1) ||\n          boundary.defer) &&\n        null === boundary.preamble\n      );\n    }\n    function defaultErrorHandler(error) {\n      if (\n        \"object\" === typeof error &&\n        null !== error &&\n        \"string\" === typeof error.environmentName\n      ) {\n        var JSCompiler_inline_result = error.environmentName;\n        error = [error].slice(0);\n        \"string\" === typeof error[0]\n          ? error.splice(\n              0,\n              1,\n              \"\\u001b[0m\\u001b[7m%c%s\\u001b[0m%c \" + error[0],\n              \"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px\",\n              \" \" + JSCompiler_inline_result + \" \",\n              \"\"\n            )\n          : error.splice(\n              0,\n              0,\n              \"\\u001b[0m\\u001b[7m%c%s\\u001b[0m%c\",\n              \"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px\",\n              \" \" + JSCompiler_inline_result + \" \",\n              \"\"\n            );\n        error.unshift(console);\n        JSCompiler_inline_result = bind.apply(console.error, error);\n        JSCompiler_inline_result();\n      } else console.error(error);\n      return null;\n    }\n    function RequestInstance(\n      resumableState,\n      renderState,\n      rootFormatContext,\n      progressiveChunkSize,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError,\n      formState\n    ) {\n      var abortSet = new Set();\n      this.destination = null;\n      this.flushScheduled = !1;\n      this.resumableState = resumableState;\n      this.renderState = renderState;\n      this.rootFormatContext = rootFormatContext;\n      this.progressiveChunkSize =\n        void 0 === progressiveChunkSize ? 12800 : progressiveChunkSize;\n      this.status = 10;\n      this.fatalError = null;\n      this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;\n      this.completedPreambleSegments = this.completedRootSegment = null;\n      this.byteSize = 0;\n      this.abortableTasks = abortSet;\n      this.pingedTasks = [];\n      this.clientRenderedBoundaries = [];\n      this.completedBoundaries = [];\n      this.partialBoundaries = [];\n      this.trackedPostpones = null;\n      this.onError = void 0 === onError ? defaultErrorHandler : onError;\n      this.onAllReady = void 0 === onAllReady ? noop : onAllReady;\n      this.onShellReady = void 0 === onShellReady ? noop : onShellReady;\n      this.onShellError = void 0 === onShellError ? noop : onShellError;\n      this.onFatalError = void 0 === onFatalError ? noop : onFatalError;\n      this.formState = void 0 === formState ? null : formState;\n      this.didWarnForKey = null;\n    }\n    function createRequest(\n      children,\n      resumableState,\n      renderState,\n      rootFormatContext,\n      progressiveChunkSize,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError,\n      formState\n    ) {\n      resetOwnerStackLimit();\n      resumableState = new RequestInstance(\n        resumableState,\n        renderState,\n        rootFormatContext,\n        progressiveChunkSize,\n        onError,\n        onAllReady,\n        onShellReady,\n        onShellError,\n        onFatalError,\n        formState\n      );\n      renderState = createPendingSegment(\n        resumableState,\n        0,\n        null,\n        rootFormatContext,\n        !1,\n        !1\n      );\n      renderState.parentFlushed = !0;\n      children = createRenderTask(\n        resumableState,\n        null,\n        children,\n        -1,\n        null,\n        renderState,\n        null,\n        null,\n        resumableState.abortableTasks,\n        null,\n        rootFormatContext,\n        null,\n        emptyTreeContext,\n        null,\n        null,\n        emptyContextObject,\n        null\n      );\n      pushComponentStack(children);\n      resumableState.pingedTasks.push(children);\n      return resumableState;\n    }\n    function createPrerenderRequest(\n      children,\n      resumableState,\n      renderState,\n      rootFormatContext,\n      progressiveChunkSize,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError\n    ) {\n      children = createRequest(\n        children,\n        resumableState,\n        renderState,\n        rootFormatContext,\n        progressiveChunkSize,\n        onError,\n        onAllReady,\n        onShellReady,\n        onShellError,\n        onFatalError,\n        void 0\n      );\n      children.trackedPostpones = {\n        workingMap: new Map(),\n        rootNodes: [],\n        rootSlots: null\n      };\n      return children;\n    }\n    function resumeRequest(\n      children,\n      postponedState,\n      renderState,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError\n    ) {\n      resetOwnerStackLimit();\n      renderState = new RequestInstance(\n        postponedState.resumableState,\n        renderState,\n        postponedState.rootFormatContext,\n        postponedState.progressiveChunkSize,\n        onError,\n        onAllReady,\n        onShellReady,\n        onShellError,\n        onFatalError,\n        null\n      );\n      renderState.nextSegmentId = postponedState.nextSegmentId;\n      if (\"number\" === typeof postponedState.replaySlots)\n        return (\n          (onError = createPendingSegment(\n            renderState,\n            0,\n            null,\n            postponedState.rootFormatContext,\n            !1,\n            !1\n          )),\n          (onError.parentFlushed = !0),\n          (children = createRenderTask(\n            renderState,\n            null,\n            children,\n            -1,\n            null,\n            onError,\n            null,\n            null,\n            renderState.abortableTasks,\n            null,\n            postponedState.rootFormatContext,\n            null,\n            emptyTreeContext,\n            null,\n            null,\n            emptyContextObject,\n            null\n          )),\n          pushComponentStack(children),\n          renderState.pingedTasks.push(children),\n          renderState\n        );\n      children = createReplayTask(\n        renderState,\n        null,\n        {\n          nodes: postponedState.replayNodes,\n          slots: postponedState.replaySlots,\n          pendingTasks: 0\n        },\n        children,\n        -1,\n        null,\n        null,\n        renderState.abortableTasks,\n        null,\n        postponedState.rootFormatContext,\n        null,\n        emptyTreeContext,\n        null,\n        null,\n        emptyContextObject,\n        null\n      );\n      pushComponentStack(children);\n      renderState.pingedTasks.push(children);\n      return renderState;\n    }\n    function resumeAndPrerenderRequest(\n      children,\n      postponedState,\n      renderState,\n      onError,\n      onAllReady,\n      onShellReady,\n      onShellError,\n      onFatalError\n    ) {\n      children = resumeRequest(\n        children,\n        postponedState,\n        renderState,\n        onError,\n        onAllReady,\n        onShellReady,\n        onShellError,\n        onFatalError\n      );\n      children.trackedPostpones = {\n        workingMap: new Map(),\n        rootNodes: [],\n        rootSlots: null\n      };\n      return children;\n    }\n    function resolveRequest() {\n      if (currentRequest) return currentRequest;\n      var store = requestStorage.getStore();\n      return store ? store : null;\n    }\n    function pingTask(request, task) {\n      request.pingedTasks.push(task);\n      1 === request.pingedTasks.length &&\n        ((request.flushScheduled = null !== request.destination),\n        null !== request.trackedPostpones || 10 === request.status\n          ? scheduleMicrotask(function () {\n              return performWork(request);\n            })\n          : setImmediate(function () {\n              return performWork(request);\n            }));\n    }\n    function createSuspenseBoundary(\n      request,\n      row,\n      fallbackAbortableTasks,\n      preamble,\n      defer\n    ) {\n      fallbackAbortableTasks = {\n        status: PENDING,\n        rootSegmentID: -1,\n        parentFlushed: !1,\n        pendingTasks: 0,\n        row: row,\n        completedSegments: [],\n        byteSize: 0,\n        defer: defer,\n        fallbackAbortableTasks: fallbackAbortableTasks,\n        errorDigest: null,\n        contentState: createHoistableState(),\n        fallbackState: createHoistableState(),\n        preamble: preamble,\n        tracked: null,\n        errorMessage: null,\n        errorStack: null,\n        errorComponentStack: null\n      };\n      null !== row &&\n        (row.pendingTasks++,\n        (preamble = row.boundaries),\n        null !== preamble &&\n          (request.allPendingTasks++,\n          fallbackAbortableTasks.pendingTasks++,\n          preamble.push(fallbackAbortableTasks)),\n        (request = row.inheritedHoistables),\n        null !== request &&\n          hoistHoistables(fallbackAbortableTasks.contentState, request));\n      return fallbackAbortableTasks;\n    }\n    function createRenderTask(\n      request,\n      thenableState,\n      node,\n      childIndex,\n      blockedBoundary,\n      blockedSegment,\n      blockedPreamble,\n      hoistableState,\n      abortSet,\n      keyPath,\n      formatContext,\n      context,\n      treeContext,\n      row,\n      componentStack,\n      legacyContext,\n      debugTask\n    ) {\n      request.allPendingTasks++;\n      null === blockedBoundary\n        ? request.pendingRootTasks++\n        : blockedBoundary.pendingTasks++;\n      null !== row && row.pendingTasks++;\n      var task = {\n        replay: null,\n        node: node,\n        childIndex: childIndex,\n        ping: function () {\n          return pingTask(request, task);\n        },\n        blockedBoundary: blockedBoundary,\n        blockedSegment: blockedSegment,\n        blockedPreamble: blockedPreamble,\n        hoistableState: hoistableState,\n        abortSet: abortSet,\n        keyPath: keyPath,\n        formatContext: formatContext,\n        context: context,\n        treeContext: treeContext,\n        row: row,\n        componentStack: componentStack,\n        thenableState: thenableState\n      };\n      task.debugTask = debugTask;\n      abortSet.add(task);\n      return task;\n    }\n    function createReplayTask(\n      request,\n      thenableState,\n      replay,\n      node,\n      childIndex,\n      blockedBoundary,\n      hoistableState,\n      abortSet,\n      keyPath,\n      formatContext,\n      context,\n      treeContext,\n      row,\n      componentStack,\n      legacyContext,\n      debugTask\n    ) {\n      request.allPendingTasks++;\n      null === blockedBoundary\n        ? request.pendingRootTasks++\n        : blockedBoundary.pendingTasks++;\n      null !== row && row.pendingTasks++;\n      replay.pendingTasks++;\n      var task = {\n        replay: replay,\n        node: node,\n        childIndex: childIndex,\n        ping: function () {\n          return pingTask(request, task);\n        },\n        blockedBoundary: blockedBoundary,\n        blockedSegment: null,\n        blockedPreamble: null,\n        hoistableState: hoistableState,\n        abortSet: abortSet,\n        keyPath: keyPath,\n        formatContext: formatContext,\n        context: context,\n        treeContext: treeContext,\n        row: row,\n        componentStack: componentStack,\n        thenableState: thenableState\n      };\n      task.debugTask = debugTask;\n      abortSet.add(task);\n      return task;\n    }\n    function createPendingSegment(\n      request,\n      index,\n      boundary,\n      parentFormatContext,\n      lastPushedText,\n      textEmbedded\n    ) {\n      return {\n        status: PENDING,\n        parentFlushed: !1,\n        id: -1,\n        index: index,\n        chunks: [],\n        children: [],\n        preambleChildren: [],\n        parentFormatContext: parentFormatContext,\n        boundary: boundary,\n        lastPushedText: lastPushedText,\n        textEmbedded: textEmbedded\n      };\n    }\n    function getCurrentStackInDEV() {\n      if (null === currentTaskInDEV || null === currentTaskInDEV.componentStack)\n        return \"\";\n      var componentStack = currentTaskInDEV.componentStack;\n      try {\n        var info = \"\";\n        if (\"string\" === typeof componentStack.type)\n          info += describeBuiltInComponentFrame(componentStack.type);\n        else if (\"function\" === typeof componentStack.type) {\n          if (!componentStack.owner) {\n            var JSCompiler_temp_const = info,\n              fn = componentStack.type,\n              name = fn ? fn.displayName || fn.name : \"\";\n            var JSCompiler_inline_result = name\n              ? describeBuiltInComponentFrame(name)\n              : \"\";\n            info = JSCompiler_temp_const + JSCompiler_inline_result;\n          }\n        } else\n          componentStack.owner ||\n            (info += describeComponentStackByType(componentStack.type));\n        for (; componentStack; )\n          (JSCompiler_temp_const = null),\n            null != componentStack.debugStack\n              ? (JSCompiler_temp_const = formatOwnerStack(\n                  componentStack.debugStack\n                ))\n              : ((JSCompiler_inline_result = componentStack),\n                null != JSCompiler_inline_result.stack &&\n                  (JSCompiler_temp_const =\n                    \"string\" !== typeof JSCompiler_inline_result.stack\n                      ? (JSCompiler_inline_result.stack = formatOwnerStack(\n                          JSCompiler_inline_result.stack\n                        ))\n                      : JSCompiler_inline_result.stack)),\n            (componentStack = componentStack.owner) &&\n              JSCompiler_temp_const &&\n              (info += \"\\n\" + JSCompiler_temp_const);\n        var JSCompiler_inline_result$jscomp$0 = info;\n      } catch (x) {\n        JSCompiler_inline_result$jscomp$0 =\n          \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n      }\n      return JSCompiler_inline_result$jscomp$0;\n    }\n    function pushHaltedAwaitOnComponentStack(task, debugInfo) {\n      if (null != debugInfo)\n        for (var i = debugInfo.length - 1; 0 <= i; i--) {\n          var info = debugInfo[i];\n          if (null != info.awaited) {\n            var bestStack = null == info.debugStack ? info.awaited : info;\n            if (void 0 !== bestStack.debugStack) {\n              task.componentStack = {\n                parent: task.componentStack,\n                type: info,\n                owner: bestStack.owner,\n                stack: bestStack.debugStack\n              };\n              task.debugTask = bestStack.debugTask;\n              break;\n            }\n          }\n        }\n    }\n    function pushSuspendedCallSiteOnComponentStack(request, task) {\n      shouldCaptureSuspendedCallSite = !0;\n      var restoreThenableState = ensureSuspendableThenableStateDEV(\n        task.thenableState\n      );\n      try {\n        var prevStatus = request.status;\n        request.status = 15;\n        var prevContext = currentActiveSnapshot,\n          prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = HooksDispatcher;\n        var prevAsyncDispatcher = ReactSharedInternals.A;\n        ReactSharedInternals.A = DefaultAsyncDispatcher;\n        var prevRequest = currentRequest;\n        currentRequest = request;\n        var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;\n        ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;\n        var prevResumableState = currentResumableState;\n        currentResumableState = request.resumableState;\n        switchContext(task.context);\n        var prevTaskInDEV = currentTaskInDEV;\n        currentTaskInDEV = task;\n        try {\n          retryNode(request, task);\n        } catch (x) {\n          resetHooksState();\n        } finally {\n          (currentTaskInDEV = prevTaskInDEV),\n            (currentResumableState = prevResumableState),\n            (ReactSharedInternals.H = prevDispatcher),\n            (ReactSharedInternals.A = prevAsyncDispatcher),\n            (ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl),\n            prevDispatcher === HooksDispatcher && switchContext(prevContext),\n            (currentRequest = prevRequest),\n            (request.status = prevStatus);\n        }\n      } finally {\n        restoreThenableState(), (shouldCaptureSuspendedCallSite = !1);\n      }\n      null === suspendedCallSiteStack\n        ? (request = null)\n        : ((request = suspendedCallSiteStack), (suspendedCallSiteStack = null));\n      null === suspendedCallSiteDebugTask\n        ? (restoreThenableState = null)\n        : ((restoreThenableState = suspendedCallSiteDebugTask),\n          (suspendedCallSiteDebugTask = null));\n      null !== request &&\n        (task.componentStack = {\n          owner: task.componentStack,\n          parent: request.parent,\n          stack: request.stack,\n          type: request.type\n        });\n      task.debugTask = restoreThenableState;\n    }\n    function pushServerComponentStack(task, debugInfo) {\n      if (null != debugInfo)\n        for (var i = 0; i < debugInfo.length; i++) {\n          var componentInfo = debugInfo[i];\n          \"string\" === typeof componentInfo.name &&\n            void 0 !== componentInfo.debugStack &&\n            ((task.componentStack = {\n              parent: task.componentStack,\n              type: componentInfo,\n              owner: componentInfo.owner,\n              stack: componentInfo.debugStack\n            }),\n            (task.debugTask = componentInfo.debugTask));\n        }\n    }\n    function pushComponentStack(task) {\n      var node = task.node;\n      if (\"object\" === typeof node && null !== node)\n        switch (node.$$typeof) {\n          case REACT_ELEMENT_TYPE:\n            var type = node.type,\n              owner = node._owner,\n              stack = node._debugStack;\n            pushServerComponentStack(task, node._debugInfo);\n            task.debugTask = node._debugTask;\n            task.componentStack = {\n              parent: task.componentStack,\n              type: type,\n              owner: owner,\n              stack: stack\n            };\n            break;\n          case REACT_LAZY_TYPE:\n            pushServerComponentStack(task, node._debugInfo);\n            break;\n          default:\n            \"function\" === typeof node.then &&\n              pushServerComponentStack(task, node._debugInfo);\n        }\n    }\n    function replaceSuspenseComponentStackWithSuspenseFallbackStack(\n      componentStack\n    ) {\n      return null === componentStack\n        ? null\n        : {\n            parent: componentStack.parent,\n            type: \"Suspense Fallback\",\n            owner: componentStack.owner,\n            stack: componentStack.stack\n          };\n    }\n    function getThrownInfo(node$jscomp$0) {\n      var errorInfo = {};\n      node$jscomp$0 &&\n        Object.defineProperty(errorInfo, \"componentStack\", {\n          configurable: !0,\n          enumerable: !0,\n          get: function () {\n            try {\n              var info = \"\",\n                node = node$jscomp$0;\n              do\n                (info += describeComponentStackByType(node.type)),\n                  (node = node.parent);\n              while (node);\n              var stack = info;\n            } catch (x) {\n              stack = \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n            }\n            Object.defineProperty(errorInfo, \"componentStack\", {\n              value: stack\n            });\n            return stack;\n          }\n        });\n      return errorInfo;\n    }\n    function encodeErrorForBoundary(\n      boundary,\n      digest,\n      error,\n      thrownInfo,\n      wasAborted\n    ) {\n      boundary.errorDigest = digest;\n      error instanceof Error\n        ? ((digest = String(error.message)), (error = String(error.stack)))\n        : ((digest =\n            \"object\" === typeof error && null !== error\n              ? describeObjectForErrorMessage(error)\n              : String(error)),\n          (error = null));\n      wasAborted = wasAborted\n        ? \"Switched to client rendering because the server rendering aborted due to:\\n\\n\"\n        : \"Switched to client rendering because the server rendering errored:\\n\\n\";\n      boundary.errorMessage = wasAborted + digest;\n      boundary.errorStack = null !== error ? wasAborted + error : null;\n      boundary.errorComponentStack = thrownInfo.componentStack;\n    }\n    function logRecoverableError(request, error, errorInfo, debugTask) {\n      request = request.onError;\n      error = debugTask\n        ? debugTask.run(request.bind(null, error, errorInfo))\n        : request(error, errorInfo);\n      if (null != error && \"string\" !== typeof error)\n        console.error(\n          'onError returned something with a type other than \"string\". onError should return a string and may return null or undefined but must not return anything else. It received something of type \"%s\" instead',\n          typeof error\n        );\n      else return error;\n    }\n    function fatalError(request, error, errorInfo, debugTask) {\n      errorInfo = request.onShellError;\n      var onFatalError = request.onFatalError;\n      debugTask\n        ? (debugTask.run(errorInfo.bind(null, error)),\n          debugTask.run(onFatalError.bind(null, error)))\n        : (errorInfo(error), onFatalError(error));\n      null !== request.destination\n        ? ((request.status = CLOSED), request.destination.destroy(error))\n        : ((request.status = 13), (request.fatalError = error));\n    }\n    function finishSuspenseListRow(request, row) {\n      unblockSuspenseListRow(request, row.next, row.hoistables);\n    }\n    function unblockSuspenseListRow(\n      request,\n      unblockedRow,\n      inheritedHoistables\n    ) {\n      for (; null !== unblockedRow; ) {\n        null !== inheritedHoistables &&\n          (hoistHoistables(unblockedRow.hoistables, inheritedHoistables),\n          (unblockedRow.inheritedHoistables = inheritedHoistables));\n        var unblockedBoundaries = unblockedRow.boundaries;\n        if (null !== unblockedBoundaries) {\n          unblockedRow.boundaries = null;\n          for (var i = 0; i < unblockedBoundaries.length; i++) {\n            var unblockedBoundary = unblockedBoundaries[i];\n            null !== inheritedHoistables &&\n              hoistHoistables(\n                unblockedBoundary.contentState,\n                inheritedHoistables\n              );\n            finishedTask(request, unblockedBoundary, null, null);\n          }\n        }\n        unblockedRow.pendingTasks--;\n        if (0 < unblockedRow.pendingTasks) break;\n        inheritedHoistables = unblockedRow.hoistables;\n        unblockedRow = unblockedRow.next;\n      }\n    }\n    function tryToResolveTogetherRow(request, togetherRow) {\n      var boundaries = togetherRow.boundaries;\n      if (\n        null !== boundaries &&\n        togetherRow.pendingTasks === boundaries.length\n      ) {\n        for (\n          var allCompleteAndInlinable = !0, i = 0;\n          i < boundaries.length;\n          i++\n        ) {\n          var rowBoundary = boundaries[i];\n          if (\n            1 !== rowBoundary.pendingTasks ||\n            rowBoundary.parentFlushed ||\n            isEligibleForOutlining(request, rowBoundary)\n          ) {\n            allCompleteAndInlinable = !1;\n            break;\n          }\n        }\n        allCompleteAndInlinable &&\n          unblockSuspenseListRow(request, togetherRow, togetherRow.hoistables);\n      }\n    }\n    function createSuspenseListRow(previousRow) {\n      var newRow = {\n        pendingTasks: 1,\n        boundaries: null,\n        hoistables: createHoistableState(),\n        inheritedHoistables: null,\n        together: !1,\n        next: null\n      };\n      null !== previousRow &&\n        0 < previousRow.pendingTasks &&\n        (newRow.pendingTasks++,\n        (newRow.boundaries = []),\n        (previousRow.next = newRow));\n      return newRow;\n    }\n    function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {\n      var prevKeyPath = task.keyPath,\n        prevTreeContext = task.treeContext,\n        prevRow = task.row,\n        previousComponentStack = task.componentStack;\n      var previousDebugTask = task.debugTask;\n      pushServerComponentStack(task, task.node.props.children._debugInfo);\n      task.keyPath = keyPath;\n      keyPath = rows.length;\n      var previousSuspenseListRow = null;\n      if (null !== task.replay) {\n        var resumeSlots = task.replay.slots;\n        if (null !== resumeSlots && \"object\" === typeof resumeSlots)\n          for (var n = 0; n < keyPath; n++) {\n            var i =\n                \"backwards\" !== revealOrder &&\n                \"unstable_legacy-backwards\" !== revealOrder\n                  ? n\n                  : keyPath - 1 - n,\n              node = rows[i];\n            task.row = previousSuspenseListRow = createSuspenseListRow(\n              previousSuspenseListRow\n            );\n            task.treeContext = pushTreeContext(prevTreeContext, keyPath, i);\n            var resumeSegmentID = resumeSlots[i];\n            \"number\" === typeof resumeSegmentID\n              ? (resumeNode(request, task, resumeSegmentID, node, i),\n                delete resumeSlots[i])\n              : renderNode(request, task, node, i);\n            0 === --previousSuspenseListRow.pendingTasks &&\n              finishSuspenseListRow(request, previousSuspenseListRow);\n          }\n        else\n          for (resumeSlots = 0; resumeSlots < keyPath; resumeSlots++)\n            (n =\n              \"backwards\" !== revealOrder &&\n              \"unstable_legacy-backwards\" !== revealOrder\n                ? resumeSlots\n                : keyPath - 1 - resumeSlots),\n              (i = rows[n]),\n              warnForMissingKey(request, task, i),\n              (task.row = previousSuspenseListRow =\n                createSuspenseListRow(previousSuspenseListRow)),\n              (task.treeContext = pushTreeContext(prevTreeContext, keyPath, n)),\n              renderNode(request, task, i, n),\n              0 === --previousSuspenseListRow.pendingTasks &&\n                finishSuspenseListRow(request, previousSuspenseListRow);\n      } else if (\n        \"backwards\" !== revealOrder &&\n        \"unstable_legacy-backwards\" !== revealOrder\n      )\n        for (revealOrder = 0; revealOrder < keyPath; revealOrder++)\n          (resumeSlots = rows[revealOrder]),\n            warnForMissingKey(request, task, resumeSlots),\n            (task.row = previousSuspenseListRow =\n              createSuspenseListRow(previousSuspenseListRow)),\n            (task.treeContext = pushTreeContext(\n              prevTreeContext,\n              keyPath,\n              revealOrder\n            )),\n            renderNode(request, task, resumeSlots, revealOrder),\n            0 === --previousSuspenseListRow.pendingTasks &&\n              finishSuspenseListRow(request, previousSuspenseListRow);\n      else {\n        resumeSlots = task.blockedSegment;\n        n = resumeSlots.children.length;\n        i = resumeSlots.chunks.length;\n        for (node = 0; node < keyPath; node++) {\n          resumeSegmentID =\n            \"unstable_legacy-backwards\" === revealOrder\n              ? keyPath - 1 - node\n              : node;\n          var _node3 = rows[resumeSegmentID];\n          task.row = previousSuspenseListRow = createSuspenseListRow(\n            previousSuspenseListRow\n          );\n          task.treeContext = pushTreeContext(\n            prevTreeContext,\n            keyPath,\n            resumeSegmentID\n          );\n          var newSegment = createPendingSegment(\n            request,\n            i,\n            null,\n            task.formatContext,\n            0 === resumeSegmentID ? resumeSlots.lastPushedText : !0,\n            !0\n          );\n          resumeSlots.children.splice(n, 0, newSegment);\n          task.blockedSegment = newSegment;\n          warnForMissingKey(request, task, _node3);\n          try {\n            renderNode(request, task, _node3, resumeSegmentID),\n              newSegment.lastPushedText &&\n                newSegment.textEmbedded &&\n                newSegment.chunks.push(textSeparator),\n              (newSegment.status = COMPLETED),\n              finishedSegment(request, task.blockedBoundary, newSegment),\n              0 === --previousSuspenseListRow.pendingTasks &&\n                finishSuspenseListRow(request, previousSuspenseListRow);\n          } catch (thrownValue) {\n            throw (\n              ((newSegment.status = 12 === request.status ? ABORTED : ERRORED),\n              thrownValue)\n            );\n          }\n        }\n        task.blockedSegment = resumeSlots;\n        resumeSlots.lastPushedText = !1;\n      }\n      null !== prevRow &&\n        null !== previousSuspenseListRow &&\n        0 < previousSuspenseListRow.pendingTasks &&\n        (prevRow.pendingTasks++, (previousSuspenseListRow.next = prevRow));\n      task.treeContext = prevTreeContext;\n      task.row = prevRow;\n      task.keyPath = prevKeyPath;\n      task.componentStack = previousComponentStack;\n      task.debugTask = previousDebugTask;\n    }\n    function renderWithHooks(\n      request,\n      task,\n      keyPath,\n      Component,\n      props,\n      secondArg\n    ) {\n      var prevThenableState = task.thenableState;\n      task.thenableState = null;\n      currentlyRenderingComponent = {};\n      currentlyRenderingTask = task;\n      currentlyRenderingRequest = request;\n      currentlyRenderingKeyPath = keyPath;\n      isInHookUserCodeInDev = !1;\n      actionStateCounter = localIdCounter = 0;\n      actionStateMatchingIndex = -1;\n      thenableIndexCounter = 0;\n      thenableState = prevThenableState;\n      for (\n        request = callComponentInDEV(Component, props, secondArg);\n        didScheduleRenderPhaseUpdate;\n\n      )\n        (didScheduleRenderPhaseUpdate = !1),\n          (actionStateCounter = localIdCounter = 0),\n          (actionStateMatchingIndex = -1),\n          (thenableIndexCounter = 0),\n          (numberOfReRenders += 1),\n          (workInProgressHook = null),\n          (request = Component(props, secondArg));\n      resetHooksState();\n      return request;\n    }\n    function finishFunctionComponent(\n      request,\n      task,\n      keyPath,\n      children,\n      hasId,\n      actionStateCount,\n      actionStateMatchingIndex\n    ) {\n      var didEmitActionStateMarkers = !1;\n      if (0 !== actionStateCount && null !== request.formState) {\n        var segment = task.blockedSegment;\n        if (null !== segment) {\n          didEmitActionStateMarkers = !0;\n          segment = segment.chunks;\n          for (var i = 0; i < actionStateCount; i++)\n            i === actionStateMatchingIndex\n              ? segment.push(formStateMarkerIsMatching)\n              : segment.push(formStateMarkerIsNotMatching);\n        }\n      }\n      actionStateCount = task.keyPath;\n      task.keyPath = keyPath;\n      hasId\n        ? ((keyPath = task.treeContext),\n          (task.treeContext = pushTreeContext(keyPath, 1, 0)),\n          renderNode(request, task, children, -1),\n          (task.treeContext = keyPath))\n        : didEmitActionStateMarkers\n          ? renderNode(request, task, children, -1)\n          : renderNodeDestructive(request, task, children, -1);\n      task.keyPath = actionStateCount;\n    }\n    function renderElement(request, task, keyPath, type, props, ref) {\n      if (\"function\" === typeof type)\n        if (type.prototype && type.prototype.isReactComponent) {\n          var newProps = props;\n          if (\"ref\" in props) {\n            newProps = {};\n            for (var propName in props)\n              \"ref\" !== propName && (newProps[propName] = props[propName]);\n          }\n          var defaultProps = type.defaultProps;\n          if (defaultProps) {\n            newProps === props && (newProps = assign({}, newProps, props));\n            for (var _propName in defaultProps)\n              void 0 === newProps[_propName] &&\n                (newProps[_propName] = defaultProps[_propName]);\n          }\n          var resolvedProps = newProps;\n          var context = emptyContextObject,\n            contextType = type.contextType;\n          if (\n            \"contextType\" in type &&\n            null !== contextType &&\n            (void 0 === contextType ||\n              contextType.$$typeof !== REACT_CONTEXT_TYPE) &&\n            !didWarnAboutInvalidateContextType.has(type)\n          ) {\n            didWarnAboutInvalidateContextType.add(type);\n            var addendum =\n              void 0 === contextType\n                ? \" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.\"\n                : \"object\" !== typeof contextType\n                  ? \" However, it is set to a \" + typeof contextType + \".\"\n                  : contextType.$$typeof === REACT_CONSUMER_TYPE\n                    ? \" Did you accidentally pass the Context.Consumer instead?\"\n                    : \" However, it is set to an object with keys {\" +\n                      Object.keys(contextType).join(\", \") +\n                      \"}.\";\n            console.error(\n              \"%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s\",\n              getComponentNameFromType(type) || \"Component\",\n              addendum\n            );\n          }\n          \"object\" === typeof contextType &&\n            null !== contextType &&\n            (context = contextType._currentValue);\n          var instance = new type(resolvedProps, context);\n          if (\n            \"function\" === typeof type.getDerivedStateFromProps &&\n            (null === instance.state || void 0 === instance.state)\n          ) {\n            var componentName = getComponentNameFromType(type) || \"Component\";\n            didWarnAboutUninitializedState.has(componentName) ||\n              (didWarnAboutUninitializedState.add(componentName),\n              console.error(\n                \"`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.\",\n                componentName,\n                null === instance.state ? \"null\" : \"undefined\",\n                componentName\n              ));\n          }\n          if (\n            \"function\" === typeof type.getDerivedStateFromProps ||\n            \"function\" === typeof instance.getSnapshotBeforeUpdate\n          ) {\n            var foundWillMountName = null,\n              foundWillReceivePropsName = null,\n              foundWillUpdateName = null;\n            \"function\" === typeof instance.componentWillMount &&\n            !0 !== instance.componentWillMount.__suppressDeprecationWarning\n              ? (foundWillMountName = \"componentWillMount\")\n              : \"function\" === typeof instance.UNSAFE_componentWillMount &&\n                (foundWillMountName = \"UNSAFE_componentWillMount\");\n            \"function\" === typeof instance.componentWillReceiveProps &&\n            !0 !==\n              instance.componentWillReceiveProps.__suppressDeprecationWarning\n              ? (foundWillReceivePropsName = \"componentWillReceiveProps\")\n              : \"function\" ===\n                  typeof instance.UNSAFE_componentWillReceiveProps &&\n                (foundWillReceivePropsName =\n                  \"UNSAFE_componentWillReceiveProps\");\n            \"function\" === typeof instance.componentWillUpdate &&\n            !0 !== instance.componentWillUpdate.__suppressDeprecationWarning\n              ? (foundWillUpdateName = \"componentWillUpdate\")\n              : \"function\" === typeof instance.UNSAFE_componentWillUpdate &&\n                (foundWillUpdateName = \"UNSAFE_componentWillUpdate\");\n            if (\n              null !== foundWillMountName ||\n              null !== foundWillReceivePropsName ||\n              null !== foundWillUpdateName\n            ) {\n              var _componentName =\n                  getComponentNameFromType(type) || \"Component\",\n                newApiName =\n                  \"function\" === typeof type.getDerivedStateFromProps\n                    ? \"getDerivedStateFromProps()\"\n                    : \"getSnapshotBeforeUpdate()\";\n              didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName) ||\n                (didWarnAboutLegacyLifecyclesAndDerivedState.add(\n                  _componentName\n                ),\n                console.error(\n                  \"Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\nhttps://react.dev/link/unsafe-component-lifecycles\",\n                  _componentName,\n                  newApiName,\n                  null !== foundWillMountName\n                    ? \"\\n  \" + foundWillMountName\n                    : \"\",\n                  null !== foundWillReceivePropsName\n                    ? \"\\n  \" + foundWillReceivePropsName\n                    : \"\",\n                  null !== foundWillUpdateName\n                    ? \"\\n  \" + foundWillUpdateName\n                    : \"\"\n                ));\n            }\n          }\n          var name = getComponentNameFromType(type) || \"Component\";\n          instance.render ||\n            (type.prototype && \"function\" === typeof type.prototype.render\n              ? console.error(\n                  \"No `render` method found on the %s instance: did you accidentally return an object from the constructor?\",\n                  name\n                )\n              : console.error(\n                  \"No `render` method found on the %s instance: you may have forgotten to define `render`.\",\n                  name\n                ));\n          !instance.getInitialState ||\n            instance.getInitialState.isReactClassApproved ||\n            instance.state ||\n            console.error(\n              \"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?\",\n              name\n            );\n          instance.getDefaultProps &&\n            !instance.getDefaultProps.isReactClassApproved &&\n            console.error(\n              \"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.\",\n              name\n            );\n          instance.contextType &&\n            console.error(\n              \"contextType was defined as an instance property on %s. Use a static property to define contextType instead.\",\n              name\n            );\n          type.childContextTypes &&\n            !didWarnAboutChildContextTypes.has(type) &&\n            (didWarnAboutChildContextTypes.add(type),\n            console.error(\n              \"%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)\",\n              name\n            ));\n          type.contextTypes &&\n            !didWarnAboutContextTypes$1.has(type) &&\n            (didWarnAboutContextTypes$1.add(type),\n            console.error(\n              \"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)\",\n              name\n            ));\n          \"function\" === typeof instance.componentShouldUpdate &&\n            console.error(\n              \"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.\",\n              name\n            );\n          type.prototype &&\n            type.prototype.isPureReactComponent &&\n            \"undefined\" !== typeof instance.shouldComponentUpdate &&\n            console.error(\n              \"%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.\",\n              getComponentNameFromType(type) || \"A pure component\"\n            );\n          \"function\" === typeof instance.componentDidUnmount &&\n            console.error(\n              \"%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?\",\n              name\n            );\n          \"function\" === typeof instance.componentDidReceiveProps &&\n            console.error(\n              \"%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().\",\n              name\n            );\n          \"function\" === typeof instance.componentWillRecieveProps &&\n            console.error(\n              \"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?\",\n              name\n            );\n          \"function\" === typeof instance.UNSAFE_componentWillRecieveProps &&\n            console.error(\n              \"%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?\",\n              name\n            );\n          var hasMutatedProps = instance.props !== resolvedProps;\n          void 0 !== instance.props &&\n            hasMutatedProps &&\n            console.error(\n              \"When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.\",\n              name\n            );\n          instance.defaultProps &&\n            console.error(\n              \"Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.\",\n              name,\n              name\n            );\n          \"function\" !== typeof instance.getSnapshotBeforeUpdate ||\n            \"function\" === typeof instance.componentDidUpdate ||\n            didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(type) ||\n            (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(type),\n            console.error(\n              \"%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.\",\n              getComponentNameFromType(type)\n            ));\n          \"function\" === typeof instance.getDerivedStateFromProps &&\n            console.error(\n              \"%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.\",\n              name\n            );\n          \"function\" === typeof instance.getDerivedStateFromError &&\n            console.error(\n              \"%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.\",\n              name\n            );\n          \"function\" === typeof type.getSnapshotBeforeUpdate &&\n            console.error(\n              \"%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.\",\n              name\n            );\n          var state = instance.state;\n          state &&\n            (\"object\" !== typeof state || isArrayImpl(state)) &&\n            console.error(\"%s.state: must be set to an object or null\", name);\n          \"function\" === typeof instance.getChildContext &&\n            \"object\" !== typeof type.childContextTypes &&\n            console.error(\n              \"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().\",\n              name\n            );\n          var initialState = void 0 !== instance.state ? instance.state : null;\n          instance.updater = classComponentUpdater;\n          instance.props = resolvedProps;\n          instance.state = initialState;\n          var internalInstance = { queue: [], replace: !1 };\n          instance._reactInternals = internalInstance;\n          var contextType$jscomp$0 = type.contextType;\n          instance.context =\n            \"object\" === typeof contextType$jscomp$0 &&\n            null !== contextType$jscomp$0\n              ? contextType$jscomp$0._currentValue\n              : emptyContextObject;\n          if (instance.state === resolvedProps) {\n            var componentName$jscomp$0 =\n              getComponentNameFromType(type) || \"Component\";\n            didWarnAboutDirectlyAssigningPropsToState.has(\n              componentName$jscomp$0\n            ) ||\n              (didWarnAboutDirectlyAssigningPropsToState.add(\n                componentName$jscomp$0\n              ),\n              console.error(\n                \"%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.\",\n                componentName$jscomp$0\n              ));\n          }\n          var getDerivedStateFromProps = type.getDerivedStateFromProps;\n          if (\"function\" === typeof getDerivedStateFromProps) {\n            var partialState = getDerivedStateFromProps(\n              resolvedProps,\n              initialState\n            );\n            if (void 0 === partialState) {\n              var componentName$jscomp$1 =\n                getComponentNameFromType(type) || \"Component\";\n              didWarnAboutUndefinedDerivedState.has(componentName$jscomp$1) ||\n                (didWarnAboutUndefinedDerivedState.add(componentName$jscomp$1),\n                console.error(\n                  \"%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.\",\n                  componentName$jscomp$1\n                ));\n            }\n            var JSCompiler_inline_result =\n              null === partialState || void 0 === partialState\n                ? initialState\n                : assign({}, initialState, partialState);\n            instance.state = JSCompiler_inline_result;\n          }\n          if (\n            \"function\" !== typeof type.getDerivedStateFromProps &&\n            \"function\" !== typeof instance.getSnapshotBeforeUpdate &&\n            (\"function\" === typeof instance.UNSAFE_componentWillMount ||\n              \"function\" === typeof instance.componentWillMount)\n          ) {\n            var oldState = instance.state;\n            if (\"function\" === typeof instance.componentWillMount) {\n              if (\n                !0 !== instance.componentWillMount.__suppressDeprecationWarning\n              ) {\n                var componentName$jscomp$2 =\n                  getComponentNameFromType(type) || \"Unknown\";\n                didWarnAboutDeprecatedWillMount[componentName$jscomp$2] ||\n                  (console.warn(\n                    \"componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.\\n\\n* Move code from componentWillMount to componentDidMount (preferred in most cases) or the constructor.\\n\\nPlease update the following components: %s\",\n                    componentName$jscomp$2\n                  ),\n                  (didWarnAboutDeprecatedWillMount[componentName$jscomp$2] =\n                    !0));\n              }\n              instance.componentWillMount();\n            }\n            \"function\" === typeof instance.UNSAFE_componentWillMount &&\n              instance.UNSAFE_componentWillMount();\n            oldState !== instance.state &&\n              (console.error(\n                \"%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.\",\n                getComponentNameFromType(type) || \"Component\"\n              ),\n              classComponentUpdater.enqueueReplaceState(\n                instance,\n                instance.state,\n                null\n              ));\n            if (\n              null !== internalInstance.queue &&\n              0 < internalInstance.queue.length\n            ) {\n              var oldQueue = internalInstance.queue,\n                oldReplace = internalInstance.replace;\n              internalInstance.queue = null;\n              internalInstance.replace = !1;\n              if (oldReplace && 1 === oldQueue.length)\n                instance.state = oldQueue[0];\n              else {\n                for (\n                  var nextState = oldReplace ? oldQueue[0] : instance.state,\n                    dontMutate = !0,\n                    i = oldReplace ? 1 : 0;\n                  i < oldQueue.length;\n                  i++\n                ) {\n                  var partial = oldQueue[i],\n                    partialState$jscomp$0 =\n                      \"function\" === typeof partial\n                        ? partial.call(\n                            instance,\n                            nextState,\n                            resolvedProps,\n                            void 0\n                          )\n                        : partial;\n                  null != partialState$jscomp$0 &&\n                    (dontMutate\n                      ? ((dontMutate = !1),\n                        (nextState = assign(\n                          {},\n                          nextState,\n                          partialState$jscomp$0\n                        )))\n                      : assign(nextState, partialState$jscomp$0));\n                }\n                instance.state = nextState;\n              }\n            } else internalInstance.queue = null;\n          }\n          var nextChildren = callRenderInDEV(instance);\n          if (12 === request.status) throw null;\n          instance.props !== resolvedProps &&\n            (didWarnAboutReassigningProps ||\n              console.error(\n                \"It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.\",\n                getComponentNameFromType(type) || \"a component\"\n              ),\n            (didWarnAboutReassigningProps = !0));\n          var prevKeyPath = task.keyPath;\n          task.keyPath = keyPath;\n          renderNodeDestructive(request, task, nextChildren, -1);\n          task.keyPath = prevKeyPath;\n        } else {\n          if (type.prototype && \"function\" === typeof type.prototype.render) {\n            var componentName$jscomp$3 =\n              getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutBadClass[componentName$jscomp$3] ||\n              (console.error(\n                \"The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.\",\n                componentName$jscomp$3,\n                componentName$jscomp$3\n              ),\n              (didWarnAboutBadClass[componentName$jscomp$3] = !0));\n          }\n          var value = renderWithHooks(\n            request,\n            task,\n            keyPath,\n            type,\n            props,\n            void 0\n          );\n          if (12 === request.status) throw null;\n          var hasId = 0 !== localIdCounter,\n            actionStateCount = actionStateCounter,\n            actionStateMatchingIndex$jscomp$0 = actionStateMatchingIndex;\n          if (type.contextTypes) {\n            var _componentName$jscomp$0 =\n              getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutContextTypes[_componentName$jscomp$0] ||\n              ((didWarnAboutContextTypes[_componentName$jscomp$0] = !0),\n              console.error(\n                \"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)\",\n                _componentName$jscomp$0\n              ));\n          }\n          type &&\n            type.childContextTypes &&\n            console.error(\n              \"childContextTypes cannot be defined on a function component.\\n  %s.childContextTypes = ...\",\n              type.displayName || type.name || \"Component\"\n            );\n          if (\"function\" === typeof type.getDerivedStateFromProps) {\n            var componentName$jscomp$4 =\n              getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutGetDerivedStateOnFunctionComponent[\n              componentName$jscomp$4\n            ] ||\n              (console.error(\n                \"%s: Function components do not support getDerivedStateFromProps.\",\n                componentName$jscomp$4\n              ),\n              (didWarnAboutGetDerivedStateOnFunctionComponent[\n                componentName$jscomp$4\n              ] = !0));\n          }\n          if (\n            \"object\" === typeof type.contextType &&\n            null !== type.contextType\n          ) {\n            var _componentName2 = getComponentNameFromType(type) || \"Unknown\";\n            didWarnAboutContextTypeOnFunctionComponent[_componentName2] ||\n              (console.error(\n                \"%s: Function components do not support contextType.\",\n                _componentName2\n              ),\n              (didWarnAboutContextTypeOnFunctionComponent[_componentName2] =\n                !0));\n          }\n          finishFunctionComponent(\n            request,\n            task,\n            keyPath,\n            value,\n            hasId,\n            actionStateCount,\n            actionStateMatchingIndex$jscomp$0\n          );\n        }\n      else if (\"string\" === typeof type) {\n        var segment = task.blockedSegment;\n        if (null === segment) {\n          var children = props.children,\n            prevContext = task.formatContext,\n            prevKeyPath$jscomp$0 = task.keyPath;\n          task.formatContext = getChildFormatContext(prevContext, type, props);\n          task.keyPath = keyPath;\n          renderNode(request, task, children, -1);\n          task.formatContext = prevContext;\n          task.keyPath = prevKeyPath$jscomp$0;\n        } else {\n          var _children = pushStartInstance(\n            segment.chunks,\n            type,\n            props,\n            request.resumableState,\n            request.renderState,\n            task.blockedPreamble,\n            task.hoistableState,\n            task.formatContext,\n            segment.lastPushedText\n          );\n          segment.lastPushedText = !1;\n          var _prevContext2 = task.formatContext,\n            _prevKeyPath3 = task.keyPath;\n          task.keyPath = keyPath;\n          if (\n            (task.formatContext = getChildFormatContext(\n              _prevContext2,\n              type,\n              props\n            )).insertionMode === HTML_HEAD_MODE\n          ) {\n            var preambleSegment = createPendingSegment(\n              request,\n              0,\n              null,\n              task.formatContext,\n              !1,\n              !1\n            );\n            segment.preambleChildren.push(preambleSegment);\n            task.blockedSegment = preambleSegment;\n            try {\n              (preambleSegment.status = 6),\n                renderNode(request, task, _children, -1),\n                preambleSegment.lastPushedText &&\n                  preambleSegment.textEmbedded &&\n                  preambleSegment.chunks.push(textSeparator),\n                (preambleSegment.status = COMPLETED),\n                finishedSegment(request, task.blockedBoundary, preambleSegment);\n            } finally {\n              task.blockedSegment = segment;\n            }\n          } else renderNode(request, task, _children, -1);\n          task.formatContext = _prevContext2;\n          task.keyPath = _prevKeyPath3;\n          a: {\n            var target = segment.chunks,\n              resumableState = request.resumableState;\n            switch (type) {\n              case \"title\":\n              case \"style\":\n              case \"script\":\n              case \"area\":\n              case \"base\":\n              case \"br\":\n              case \"col\":\n              case \"embed\":\n              case \"hr\":\n              case \"img\":\n              case \"input\":\n              case \"keygen\":\n              case \"link\":\n              case \"meta\":\n              case \"param\":\n              case \"source\":\n              case \"track\":\n              case \"wbr\":\n                break a;\n              case \"body\":\n                if (_prevContext2.insertionMode <= HTML_HTML_MODE) {\n                  resumableState.hasBody = !0;\n                  break a;\n                }\n                break;\n              case \"html\":\n                if (_prevContext2.insertionMode === ROOT_HTML_MODE) {\n                  resumableState.hasHtml = !0;\n                  break a;\n                }\n                break;\n              case \"head\":\n                if (_prevContext2.insertionMode <= HTML_HTML_MODE) break a;\n            }\n            target.push(endChunkForTag(type));\n          }\n          segment.lastPushedText = !1;\n        }\n      } else {\n        switch (type) {\n          case REACT_LEGACY_HIDDEN_TYPE:\n          case REACT_STRICT_MODE_TYPE:\n          case REACT_PROFILER_TYPE:\n          case REACT_FRAGMENT_TYPE:\n            var prevKeyPath$jscomp$1 = task.keyPath;\n            task.keyPath = keyPath;\n            renderNodeDestructive(request, task, props.children, -1);\n            task.keyPath = prevKeyPath$jscomp$1;\n            return;\n          case REACT_ACTIVITY_TYPE:\n            var segment$jscomp$0 = task.blockedSegment;\n            if (null === segment$jscomp$0) {\n              if (\"hidden\" !== props.mode) {\n                var prevKeyPath$jscomp$2 = task.keyPath;\n                task.keyPath = keyPath;\n                renderNode(request, task, props.children, -1);\n                task.keyPath = prevKeyPath$jscomp$2;\n              }\n            } else if (\"hidden\" !== props.mode) {\n              segment$jscomp$0.chunks.push(startActivityBoundary);\n              segment$jscomp$0.lastPushedText = !1;\n              var _prevKeyPath4 = task.keyPath;\n              task.keyPath = keyPath;\n              renderNode(request, task, props.children, -1);\n              task.keyPath = _prevKeyPath4;\n              segment$jscomp$0.chunks.push(endActivityBoundary);\n              segment$jscomp$0.lastPushedText = !1;\n            }\n            return;\n          case REACT_SUSPENSE_LIST_TYPE:\n            a: {\n              var children$jscomp$0 = props.children,\n                revealOrder = props.revealOrder;\n              if (\"independent\" !== revealOrder && \"together\" !== revealOrder) {\n                if (isArrayImpl(children$jscomp$0)) {\n                  renderSuspenseListRows(\n                    request,\n                    task,\n                    keyPath,\n                    children$jscomp$0,\n                    revealOrder\n                  );\n                  break a;\n                }\n                var iteratorFn = getIteratorFn(children$jscomp$0);\n                if (iteratorFn) {\n                  var iterator = iteratorFn.call(children$jscomp$0);\n                  if (iterator) {\n                    validateIterable(\n                      task,\n                      children$jscomp$0,\n                      -1,\n                      iterator,\n                      iteratorFn\n                    );\n                    var step = iterator.next();\n                    if (!step.done) {\n                      var rows = [];\n                      do rows.push(step.value), (step = iterator.next());\n                      while (!step.done);\n                      renderSuspenseListRows(\n                        request,\n                        task,\n                        keyPath,\n                        children$jscomp$0,\n                        revealOrder\n                      );\n                    }\n                    break a;\n                  }\n                }\n              }\n              if (\"together\" === revealOrder) {\n                var _prevKeyPath2 = task.keyPath,\n                  prevRow = task.row,\n                  newRow = (task.row = createSuspenseListRow(null));\n                newRow.boundaries = [];\n                newRow.together = !0;\n                task.keyPath = keyPath;\n                renderNodeDestructive(request, task, children$jscomp$0, -1);\n                0 === --newRow.pendingTasks &&\n                  finishSuspenseListRow(request, newRow);\n                task.keyPath = _prevKeyPath2;\n                task.row = prevRow;\n                null !== prevRow &&\n                  0 < newRow.pendingTasks &&\n                  (prevRow.pendingTasks++, (newRow.next = prevRow));\n              } else {\n                var prevKeyPath$jscomp$3 = task.keyPath;\n                task.keyPath = keyPath;\n                renderNodeDestructive(request, task, children$jscomp$0, -1);\n                task.keyPath = prevKeyPath$jscomp$3;\n              }\n            }\n            return;\n          case REACT_VIEW_TRANSITION_TYPE:\n            var prevContext$jscomp$0 = task.formatContext,\n              prevKeyPath$jscomp$4 = task.keyPath;\n            var resumableState$jscomp$0 = request.resumableState;\n            if (null != props.name && \"auto\" !== props.name)\n              var autoName = props.name;\n            else {\n              var treeId = getTreeId(task.treeContext);\n              autoName = makeId(resumableState$jscomp$0, treeId, 0);\n            }\n            var resumableState$jscomp$1 = request.resumableState,\n              update = getViewTransitionClassName(props.default, props.update),\n              enter = getViewTransitionClassName(props.default, props.enter),\n              exit = getViewTransitionClassName(props.default, props.exit),\n              share = getViewTransitionClassName(props.default, props.share),\n              name$jscomp$0 = props.name,\n              autoName$jscomp$0 = autoName;\n            null == update && (update = \"auto\");\n            null == enter && (enter = \"auto\");\n            null == exit && (exit = \"auto\");\n            if (null == name$jscomp$0) {\n              var parentViewTransition = prevContext$jscomp$0.viewTransition;\n              null !== parentViewTransition\n                ? ((name$jscomp$0 = parentViewTransition.name),\n                  (share = parentViewTransition.share))\n                : ((name$jscomp$0 = \"auto\"), (share = \"none\"));\n            } else\n              null == share && (share = \"auto\"),\n                prevContext$jscomp$0.tagScope & 4 &&\n                  (resumableState$jscomp$1.instructions |=\n                    NeedUpgradeToViewTransitions);\n            prevContext$jscomp$0.tagScope & 8\n              ? (resumableState$jscomp$1.instructions |=\n                  NeedUpgradeToViewTransitions)\n              : (exit = \"none\");\n            prevContext$jscomp$0.tagScope & 16\n              ? (resumableState$jscomp$1.instructions |=\n                  NeedUpgradeToViewTransitions)\n              : (enter = \"none\");\n            var viewTransition = {\n                update: update,\n                enter: enter,\n                exit: exit,\n                share: share,\n                name: name$jscomp$0,\n                autoName: autoName$jscomp$0,\n                nameIdx: 0\n              },\n              subtreeScope = prevContext$jscomp$0.tagScope & -25;\n            subtreeScope =\n              \"none\" !== update ? subtreeScope | 32 : subtreeScope & -33;\n            \"none\" !== enter && (subtreeScope |= 64);\n            var JSCompiler_inline_result$jscomp$0 = createFormatContext(\n              prevContext$jscomp$0.insertionMode,\n              prevContext$jscomp$0.selectedValue,\n              subtreeScope,\n              viewTransition\n            );\n            task.formatContext = JSCompiler_inline_result$jscomp$0;\n            task.keyPath = keyPath;\n            if (null != props.name && \"auto\" !== props.name)\n              renderNodeDestructive(request, task, props.children, -1);\n            else {\n              var prevTreeContext = task.treeContext;\n              task.treeContext = pushTreeContext(prevTreeContext, 1, 0);\n              renderNode(request, task, props.children, -1);\n              task.treeContext = prevTreeContext;\n            }\n            task.formatContext = prevContext$jscomp$0;\n            task.keyPath = prevKeyPath$jscomp$4;\n            return;\n          case REACT_SCOPE_TYPE:\n            throw Error(\n              \"ReactDOMServer does not yet support scope components.\"\n            );\n          case REACT_SUSPENSE_TYPE:\n            a: if (null !== task.replay) {\n              var _prevKeyPath = task.keyPath,\n                _prevContext = task.formatContext,\n                _prevRow = task.row;\n              task.keyPath = keyPath;\n              task.formatContext = getSuspenseContentFormatContext(\n                request.resumableState,\n                _prevContext\n              );\n              task.row = null;\n              var _content = props.children;\n              try {\n                renderNode(request, task, _content, -1);\n              } finally {\n                (task.keyPath = _prevKeyPath),\n                  (task.formatContext = _prevContext),\n                  (task.row = _prevRow);\n              }\n            } else {\n              var prevKeyPath$jscomp$5 = task.keyPath,\n                prevContext$jscomp$1 = task.formatContext,\n                prevRow$jscomp$0 = task.row,\n                parentBoundary = task.blockedBoundary,\n                parentPreamble = task.blockedPreamble,\n                parentHoistableState = task.hoistableState,\n                parentSegment = task.blockedSegment,\n                fallback = props.fallback,\n                content = props.children,\n                fallbackAbortSet = new Set(),\n                newBoundary = createSuspenseBoundary(\n                  request,\n                  task.row,\n                  fallbackAbortSet,\n                  task.formatContext.insertionMode < HTML_MODE\n                    ? {\n                        content: createPreambleState(),\n                        fallback: createPreambleState()\n                      }\n                    : null,\n                  !1\n                ),\n                boundarySegment = createPendingSegment(\n                  request,\n                  parentSegment.chunks.length,\n                  newBoundary,\n                  task.formatContext,\n                  !1,\n                  !1\n                );\n              parentSegment.children.push(boundarySegment);\n              parentSegment.lastPushedText = !1;\n              var contentRootSegment = createPendingSegment(\n                request,\n                0,\n                null,\n                task.formatContext,\n                !1,\n                !1\n              );\n              contentRootSegment.parentFlushed = !0;\n              var trackedPostpones = request.trackedPostpones;\n              if (null !== trackedPostpones) {\n                var suspenseComponentStack = task.componentStack,\n                  fallbackKeyPath = [\n                    keyPath[0],\n                    \"Suspense Fallback\",\n                    keyPath[2]\n                  ];\n                if (null !== trackedPostpones) {\n                  var fallbackReplayNode = [\n                    fallbackKeyPath[1],\n                    fallbackKeyPath[2],\n                    [],\n                    null\n                  ];\n                  trackedPostpones.workingMap.set(\n                    fallbackKeyPath,\n                    fallbackReplayNode\n                  );\n                  newBoundary.tracked = {\n                    contentKeyPath: keyPath,\n                    fallbackNode: fallbackReplayNode\n                  };\n                }\n                task.blockedSegment = boundarySegment;\n                task.blockedPreamble =\n                  null === newBoundary.preamble\n                    ? null\n                    : newBoundary.preamble.fallback;\n                task.keyPath = fallbackKeyPath;\n                task.formatContext = getSuspenseFallbackFormatContext(\n                  request.resumableState,\n                  prevContext$jscomp$1\n                );\n                task.componentStack =\n                  replaceSuspenseComponentStackWithSuspenseFallbackStack(\n                    suspenseComponentStack\n                  );\n                boundarySegment.status = 6;\n                try {\n                  renderNode(request, task, fallback, -1),\n                    boundarySegment.lastPushedText &&\n                      boundarySegment.textEmbedded &&\n                      boundarySegment.chunks.push(textSeparator),\n                    (boundarySegment.status = COMPLETED),\n                    finishedSegment(request, parentBoundary, boundarySegment);\n                } catch (thrownValue) {\n                  throw (\n                    ((boundarySegment.status =\n                      12 === request.status ? ABORTED : ERRORED),\n                    thrownValue)\n                  );\n                } finally {\n                  (task.blockedSegment = parentSegment),\n                    (task.blockedPreamble = parentPreamble),\n                    (task.keyPath = prevKeyPath$jscomp$5),\n                    (task.formatContext = prevContext$jscomp$1);\n                }\n                var suspendedPrimaryTask = createRenderTask(\n                  request,\n                  null,\n                  content,\n                  -1,\n                  newBoundary,\n                  contentRootSegment,\n                  null === newBoundary.preamble\n                    ? null\n                    : newBoundary.preamble.content,\n                  newBoundary.contentState,\n                  task.abortSet,\n                  keyPath,\n                  getSuspenseContentFormatContext(\n                    request.resumableState,\n                    task.formatContext\n                  ),\n                  task.context,\n                  task.treeContext,\n                  null,\n                  suspenseComponentStack,\n                  emptyContextObject,\n                  task.debugTask\n                );\n                pushComponentStack(suspendedPrimaryTask);\n                request.pingedTasks.push(suspendedPrimaryTask);\n              } else {\n                task.blockedBoundary = newBoundary;\n                task.blockedPreamble =\n                  null === newBoundary.preamble\n                    ? null\n                    : newBoundary.preamble.content;\n                task.hoistableState = newBoundary.contentState;\n                task.blockedSegment = contentRootSegment;\n                task.keyPath = keyPath;\n                task.formatContext = getSuspenseContentFormatContext(\n                  request.resumableState,\n                  prevContext$jscomp$1\n                );\n                task.row = null;\n                contentRootSegment.status = 6;\n                try {\n                  if (\n                    (renderNode(request, task, content, -1),\n                    contentRootSegment.lastPushedText &&\n                      contentRootSegment.textEmbedded &&\n                      contentRootSegment.chunks.push(textSeparator),\n                    (contentRootSegment.status = COMPLETED),\n                    finishedSegment(request, newBoundary, contentRootSegment),\n                    queueCompletedSegment(newBoundary, contentRootSegment),\n                    0 === newBoundary.pendingTasks &&\n                      newBoundary.status === PENDING)\n                  ) {\n                    if (\n                      ((newBoundary.status = COMPLETED),\n                      !isEligibleForOutlining(request, newBoundary))\n                    ) {\n                      null !== prevRow$jscomp$0 &&\n                        0 === --prevRow$jscomp$0.pendingTasks &&\n                        finishSuspenseListRow(request, prevRow$jscomp$0);\n                      0 === request.pendingRootTasks &&\n                        task.blockedPreamble &&\n                        preparePreamble(request);\n                      break a;\n                    }\n                  } else\n                    null !== prevRow$jscomp$0 &&\n                      prevRow$jscomp$0.together &&\n                      tryToResolveTogetherRow(request, prevRow$jscomp$0);\n                } catch (thrownValue$2) {\n                  newBoundary.status = CLIENT_RENDERED;\n                  if (12 === request.status) {\n                    contentRootSegment.status = ABORTED;\n                    var error = request.fatalError;\n                  } else\n                    (contentRootSegment.status = ERRORED),\n                      (error = thrownValue$2);\n                  var thrownInfo = getThrownInfo(task.componentStack),\n                    errorDigest = logRecoverableError(\n                      request,\n                      error,\n                      thrownInfo,\n                      task.debugTask\n                    );\n                  encodeErrorForBoundary(\n                    newBoundary,\n                    errorDigest,\n                    error,\n                    thrownInfo,\n                    !1\n                  );\n                  untrackBoundary(request, newBoundary);\n                } finally {\n                  (task.blockedBoundary = parentBoundary),\n                    (task.blockedPreamble = parentPreamble),\n                    (task.hoistableState = parentHoistableState),\n                    (task.blockedSegment = parentSegment),\n                    (task.keyPath = prevKeyPath$jscomp$5),\n                    (task.formatContext = prevContext$jscomp$1),\n                    (task.row = prevRow$jscomp$0);\n                }\n                var suspendedFallbackTask = createRenderTask(\n                  request,\n                  null,\n                  fallback,\n                  -1,\n                  parentBoundary,\n                  boundarySegment,\n                  null === newBoundary.preamble\n                    ? null\n                    : newBoundary.preamble.fallback,\n                  newBoundary.fallbackState,\n                  fallbackAbortSet,\n                  [keyPath[0], \"Suspense Fallback\", keyPath[2]],\n                  getSuspenseFallbackFormatContext(\n                    request.resumableState,\n                    task.formatContext\n                  ),\n                  task.context,\n                  task.treeContext,\n                  task.row,\n                  replaceSuspenseComponentStackWithSuspenseFallbackStack(\n                    task.componentStack\n                  ),\n                  emptyContextObject,\n                  task.debugTask\n                );\n                pushComponentStack(suspendedFallbackTask);\n                request.pingedTasks.push(suspendedFallbackTask);\n              }\n            }\n            return;\n        }\n        if (\"object\" === typeof type && null !== type)\n          switch (type.$$typeof) {\n            case REACT_FORWARD_REF_TYPE:\n              if (\"ref\" in props) {\n                var propsWithoutRef = {};\n                for (var key in props)\n                  \"ref\" !== key && (propsWithoutRef[key] = props[key]);\n              } else propsWithoutRef = props;\n              var children$jscomp$1 = renderWithHooks(\n                request,\n                task,\n                keyPath,\n                type.render,\n                propsWithoutRef,\n                ref\n              );\n              finishFunctionComponent(\n                request,\n                task,\n                keyPath,\n                children$jscomp$1,\n                0 !== localIdCounter,\n                actionStateCounter,\n                actionStateMatchingIndex\n              );\n              return;\n            case REACT_MEMO_TYPE:\n              renderElement(request, task, keyPath, type.type, props, ref);\n              return;\n            case REACT_CONTEXT_TYPE:\n              var value$jscomp$0 = props.value,\n                children$jscomp$2 = props.children;\n              var prevSnapshot = task.context;\n              var prevKeyPath$jscomp$6 = task.keyPath;\n              var prevValue = type._currentValue;\n              type._currentValue = value$jscomp$0;\n              void 0 !== type._currentRenderer &&\n                null !== type._currentRenderer &&\n                type._currentRenderer !== rendererSigil &&\n                console.error(\n                  \"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.\"\n                );\n              type._currentRenderer = rendererSigil;\n              var prevNode = currentActiveSnapshot,\n                newNode = {\n                  parent: prevNode,\n                  depth: null === prevNode ? 0 : prevNode.depth + 1,\n                  context: type,\n                  parentValue: prevValue,\n                  value: value$jscomp$0\n                };\n              currentActiveSnapshot = newNode;\n              task.context = newNode;\n              task.keyPath = keyPath;\n              renderNodeDestructive(request, task, children$jscomp$2, -1);\n              var prevSnapshot$jscomp$0 = currentActiveSnapshot;\n              if (null === prevSnapshot$jscomp$0)\n                throw Error(\n                  \"Tried to pop a Context at the root of the app. This is a bug in React.\"\n                );\n              prevSnapshot$jscomp$0.context !== type &&\n                console.error(\n                  \"The parent context is not the expected context. This is probably a bug in React.\"\n                );\n              prevSnapshot$jscomp$0.context._currentValue =\n                prevSnapshot$jscomp$0.parentValue;\n              void 0 !== type._currentRenderer &&\n                null !== type._currentRenderer &&\n                type._currentRenderer !== rendererSigil &&\n                console.error(\n                  \"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.\"\n                );\n              type._currentRenderer = rendererSigil;\n              var JSCompiler_inline_result$jscomp$1 = (currentActiveSnapshot =\n                prevSnapshot$jscomp$0.parent);\n              task.context = JSCompiler_inline_result$jscomp$1;\n              task.keyPath = prevKeyPath$jscomp$6;\n              prevSnapshot !== task.context &&\n                console.error(\n                  \"Popping the context provider did not return back to the original snapshot. This is a bug in React.\"\n                );\n              return;\n            case REACT_CONSUMER_TYPE:\n              var context$jscomp$0 = type._context,\n                render = props.children;\n              \"function\" !== typeof render &&\n                console.error(\n                  \"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.\"\n                );\n              var newChildren = render(context$jscomp$0._currentValue),\n                prevKeyPath$jscomp$7 = task.keyPath;\n              task.keyPath = keyPath;\n              renderNodeDestructive(request, task, newChildren, -1);\n              task.keyPath = prevKeyPath$jscomp$7;\n              return;\n            case REACT_LAZY_TYPE:\n              var Component = callLazyInitInDEV(type);\n              if (12 === request.status && 15 !== request.status) throw null;\n              renderElement(request, task, keyPath, Component, props, ref);\n              return;\n          }\n        var info = \"\";\n        if (\n          void 0 === type ||\n          (\"object\" === typeof type &&\n            null !== type &&\n            0 === Object.keys(type).length)\n        )\n          info +=\n            \" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.\";\n        throw Error(\n          \"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: \" +\n            ((null == type ? type : typeof type) + \".\" + info)\n        );\n      }\n    }\n    function resumeNode(request, task, segmentId, node, childIndex) {\n      var prevReplay = task.replay,\n        blockedBoundary = task.blockedBoundary,\n        resumedSegment = createPendingSegment(\n          request,\n          0,\n          null,\n          task.formatContext,\n          !1,\n          !1\n        );\n      resumedSegment.id = segmentId;\n      resumedSegment.parentFlushed = !0;\n      try {\n        (task.replay = null),\n          (task.blockedSegment = resumedSegment),\n          renderNode(request, task, node, childIndex),\n          (resumedSegment.status = COMPLETED),\n          finishedSegment(request, blockedBoundary, resumedSegment),\n          null === blockedBoundary\n            ? (request.completedRootSegment = resumedSegment)\n            : (queueCompletedSegment(blockedBoundary, resumedSegment),\n              blockedBoundary.parentFlushed &&\n                request.partialBoundaries.push(blockedBoundary));\n      } finally {\n        (task.replay = prevReplay), (task.blockedSegment = null);\n      }\n    }\n    function replayElement(\n      request,\n      task,\n      keyPath,\n      name,\n      keyOrIndex,\n      childIndex,\n      type,\n      props,\n      ref,\n      replay\n    ) {\n      childIndex = replay.nodes;\n      for (var i = 0; i < childIndex.length; i++) {\n        var node = childIndex[i];\n        if (keyOrIndex === node[1]) {\n          if (4 === node.length) {\n            if (null !== name && name !== node[0])\n              throw Error(\n                \"Expected the resume to render <\" +\n                  node[0] +\n                  \"> in this slot but instead it rendered <\" +\n                  name +\n                  \">. The tree doesn't match so React will fallback to client rendering.\"\n              );\n            var childNodes = node[2],\n              childSlots = node[3];\n            name = task.node;\n            task.replay = {\n              nodes: childNodes,\n              slots: childSlots,\n              pendingTasks: 1\n            };\n            try {\n              renderElement(request, task, keyPath, type, props, ref);\n              if (\n                1 === task.replay.pendingTasks &&\n                0 < task.replay.nodes.length\n              )\n                throw Error(\n                  \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                );\n              task.replay.pendingTasks--;\n            } catch (x) {\n              if (\n                \"object\" === typeof x &&\n                null !== x &&\n                (x === SuspenseException || \"function\" === typeof x.then)\n              )\n                throw (\n                  (task.node === name\n                    ? (task.replay = replay)\n                    : childIndex.splice(i, 1),\n                  x)\n                );\n              task.replay.pendingTasks--;\n              type = getThrownInfo(task.componentStack);\n              props = request;\n              keyPath = task.blockedBoundary;\n              request = x;\n              ref = logRecoverableError(props, request, type, task.debugTask);\n              abortRemainingReplayNodes(\n                props,\n                keyPath,\n                childNodes,\n                childSlots,\n                request,\n                ref,\n                type,\n                !1\n              );\n            }\n            task.replay = replay;\n          } else {\n            if (type !== REACT_SUSPENSE_TYPE)\n              throw Error(\n                \"Expected the resume to render <Suspense> in this slot but instead it rendered <\" +\n                  (getComponentNameFromType(type) || \"Unknown\") +\n                  \">. The tree doesn't match so React will fallback to client rendering.\"\n              );\n            a: {\n              replay = request;\n              request = node[5];\n              type = node[2];\n              ref = node[3];\n              name = null === node[4] ? [] : node[4][2];\n              node = null === node[4] ? null : node[4][3];\n              keyOrIndex = task.keyPath;\n              var prevContext = task.formatContext,\n                prevRow = task.row,\n                previousReplaySet = task.replay,\n                parentBoundary = task.blockedBoundary,\n                parentHoistableState = task.hoistableState,\n                content = props.children;\n              props = props.fallback;\n              var fallbackAbortSet = new Set(),\n                resumedBoundary = createSuspenseBoundary(\n                  replay,\n                  task.row,\n                  fallbackAbortSet,\n                  task.formatContext.insertionMode < HTML_MODE\n                    ? {\n                        content: createPreambleState(),\n                        fallback: createPreambleState()\n                      }\n                    : null,\n                  !1\n                );\n              resumedBoundary.parentFlushed = !0;\n              resumedBoundary.rootSegmentID = request;\n              task.blockedBoundary = resumedBoundary;\n              task.hoistableState = resumedBoundary.contentState;\n              task.keyPath = keyPath;\n              task.formatContext = getSuspenseContentFormatContext(\n                replay.resumableState,\n                prevContext\n              );\n              task.row = null;\n              task.replay = { nodes: type, slots: ref, pendingTasks: 1 };\n              try {\n                renderNode(replay, task, content, -1);\n                if (\n                  1 === task.replay.pendingTasks &&\n                  0 < task.replay.nodes.length\n                )\n                  throw Error(\n                    \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                  );\n                task.replay.pendingTasks--;\n                if (\n                  0 === resumedBoundary.pendingTasks &&\n                  resumedBoundary.status === PENDING\n                ) {\n                  resumedBoundary.status = COMPLETED;\n                  replay.completedBoundaries.push(resumedBoundary);\n                  break a;\n                }\n              } catch (error) {\n                (resumedBoundary.status = CLIENT_RENDERED),\n                  (childNodes = getThrownInfo(task.componentStack)),\n                  (childSlots = logRecoverableError(\n                    replay,\n                    error,\n                    childNodes,\n                    task.debugTask\n                  )),\n                  encodeErrorForBoundary(\n                    resumedBoundary,\n                    childSlots,\n                    error,\n                    childNodes,\n                    !1\n                  ),\n                  task.replay.pendingTasks--,\n                  replay.clientRenderedBoundaries.push(resumedBoundary);\n              } finally {\n                (task.blockedBoundary = parentBoundary),\n                  (task.hoistableState = parentHoistableState),\n                  (task.replay = previousReplaySet),\n                  (task.keyPath = keyOrIndex),\n                  (task.formatContext = prevContext),\n                  (task.row = prevRow);\n              }\n              props = createReplayTask(\n                replay,\n                null,\n                { nodes: name, slots: node, pendingTasks: 0 },\n                props,\n                -1,\n                parentBoundary,\n                resumedBoundary.fallbackState,\n                fallbackAbortSet,\n                [keyPath[0], \"Suspense Fallback\", keyPath[2]],\n                getSuspenseFallbackFormatContext(\n                  replay.resumableState,\n                  task.formatContext\n                ),\n                task.context,\n                task.treeContext,\n                task.row,\n                replaceSuspenseComponentStackWithSuspenseFallbackStack(\n                  task.componentStack\n                ),\n                emptyContextObject,\n                task.debugTask\n              );\n              pushComponentStack(props);\n              replay.pingedTasks.push(props);\n            }\n          }\n          childIndex.splice(i, 1);\n          break;\n        }\n      }\n    }\n    function validateIterable(\n      task,\n      iterable,\n      childIndex,\n      iterator,\n      iteratorFn\n    ) {\n      if (iterator === iterable) {\n        if (\n          -1 !== childIndex ||\n          null === task.componentStack ||\n          \"function\" !== typeof task.componentStack.type ||\n          \"[object GeneratorFunction]\" !==\n            Object.prototype.toString.call(task.componentStack.type) ||\n          \"[object Generator]\" !== Object.prototype.toString.call(iterator)\n        )\n          didWarnAboutGenerators ||\n            console.error(\n              \"Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items.\"\n            ),\n            (didWarnAboutGenerators = !0);\n      } else\n        iterable.entries !== iteratorFn ||\n          didWarnAboutMaps ||\n          (console.error(\n            \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n          ),\n          (didWarnAboutMaps = !0));\n    }\n    function renderNodeDestructive(request, task, node, childIndex) {\n      null !== task.replay && \"number\" === typeof task.replay.slots\n        ? resumeNode(request, task, task.replay.slots, node, childIndex)\n        : ((task.node = node),\n          (task.childIndex = childIndex),\n          (node = task.componentStack),\n          (childIndex = task.debugTask),\n          pushComponentStack(task),\n          retryNode(request, task),\n          (task.componentStack = node),\n          (task.debugTask = childIndex));\n    }\n    function retryNode(request, task) {\n      var node = task.node,\n        childIndex = task.childIndex;\n      if (null !== node) {\n        if (\"object\" === typeof node) {\n          switch (node.$$typeof) {\n            case REACT_ELEMENT_TYPE:\n              var type = node.type,\n                key = node.key;\n              node = node.props;\n              var refProp = node.ref;\n              refProp = void 0 !== refProp ? refProp : null;\n              var debugTask = task.debugTask,\n                name = getComponentNameFromType(type);\n              key =\n                null == key || key === REACT_OPTIMISTIC_KEY\n                  ? -1 === childIndex\n                    ? 0\n                    : childIndex\n                  : key;\n              var keyPath = [task.keyPath, name, key];\n              null !== task.replay\n                ? debugTask\n                  ? debugTask.run(\n                      replayElement.bind(\n                        null,\n                        request,\n                        task,\n                        keyPath,\n                        name,\n                        key,\n                        childIndex,\n                        type,\n                        node,\n                        refProp,\n                        task.replay\n                      )\n                    )\n                  : replayElement(\n                      request,\n                      task,\n                      keyPath,\n                      name,\n                      key,\n                      childIndex,\n                      type,\n                      node,\n                      refProp,\n                      task.replay\n                    )\n                : debugTask\n                  ? debugTask.run(\n                      renderElement.bind(\n                        null,\n                        request,\n                        task,\n                        keyPath,\n                        type,\n                        node,\n                        refProp\n                      )\n                    )\n                  : renderElement(request, task, keyPath, type, node, refProp);\n              return;\n            case REACT_PORTAL_TYPE:\n              throw Error(\n                \"Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.\"\n              );\n            case REACT_LAZY_TYPE:\n              type = callLazyInitInDEV(node);\n              if (12 === request.status) throw null;\n              renderNodeDestructive(request, task, type, childIndex);\n              return;\n          }\n          if (isArrayImpl(node)) {\n            renderChildrenArray(request, task, node, childIndex);\n            return;\n          }\n          if ((key = getIteratorFn(node)))\n            if ((type = key.call(node))) {\n              validateIterable(task, node, childIndex, type, key);\n              node = type.next();\n              if (!node.done) {\n                key = [];\n                do key.push(node.value), (node = type.next());\n                while (!node.done);\n                renderChildrenArray(request, task, key, childIndex);\n              }\n              return;\n            }\n          if (\"function\" === typeof node.then)\n            return (\n              (task.thenableState = null),\n              renderNodeDestructive(\n                request,\n                task,\n                unwrapThenable(node),\n                childIndex\n              )\n            );\n          if (node.$$typeof === REACT_CONTEXT_TYPE)\n            return renderNodeDestructive(\n              request,\n              task,\n              node._currentValue,\n              childIndex\n            );\n          request = Object.prototype.toString.call(node);\n          throw Error(\n            \"Objects are not valid as a React child (found: \" +\n              (\"[object Object]\" === request\n                ? \"object with keys {\" + Object.keys(node).join(\", \") + \"}\"\n                : request) +\n              \"). If you meant to render a collection of children, use an array instead.\"\n          );\n        }\n        \"string\" === typeof node\n          ? ((task = task.blockedSegment),\n            null !== task &&\n              (task.lastPushedText = pushTextInstance(\n                task.chunks,\n                node,\n                request.renderState,\n                task.lastPushedText\n              )))\n          : \"number\" === typeof node || \"bigint\" === typeof node\n            ? ((task = task.blockedSegment),\n              null !== task &&\n                (task.lastPushedText = pushTextInstance(\n                  task.chunks,\n                  \"\" + node,\n                  request.renderState,\n                  task.lastPushedText\n                )))\n            : (\"function\" === typeof node &&\n                ((request = node.displayName || node.name || \"Component\"),\n                console.error(\n                  \"Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.\",\n                  request,\n                  request\n                )),\n              \"symbol\" === typeof node &&\n                console.error(\n                  \"Symbols are not valid as a React child.\\n  %s\",\n                  String(node)\n                ));\n      }\n    }\n    function warnForMissingKey(request, task, child) {\n      if (\n        null !== child &&\n        \"object\" === typeof child &&\n        (child.$$typeof === REACT_ELEMENT_TYPE ||\n          child.$$typeof === REACT_PORTAL_TYPE) &&\n        child._store &&\n        ((!child._store.validated && null == child.key) ||\n          2 === child._store.validated)\n      ) {\n        if (\"object\" !== typeof child._store)\n          throw Error(\n            \"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.\"\n          );\n        child._store.validated = 1;\n        var didWarnForKey = request.didWarnForKey;\n        null == didWarnForKey &&\n          (didWarnForKey = request.didWarnForKey = new WeakSet());\n        request = task.componentStack;\n        if (null !== request && !didWarnForKey.has(request)) {\n          didWarnForKey.add(request);\n          var componentName = getComponentNameFromType(child.type);\n          didWarnForKey = child._owner;\n          var parentOwner = request.owner;\n          request = \"\";\n          if (parentOwner && \"undefined\" !== typeof parentOwner.type) {\n            var name = getComponentNameFromType(parentOwner.type);\n            name &&\n              (request = \"\\n\\nCheck the render method of `\" + name + \"`.\");\n          }\n          request ||\n            (componentName &&\n              (request =\n                \"\\n\\nCheck the top-level render call using <\" +\n                componentName +\n                \">.\"));\n          componentName = \"\";\n          null != didWarnForKey &&\n            parentOwner !== didWarnForKey &&\n            ((parentOwner = null),\n            \"undefined\" !== typeof didWarnForKey.type\n              ? (parentOwner = getComponentNameFromType(didWarnForKey.type))\n              : \"string\" === typeof didWarnForKey.name &&\n                (parentOwner = didWarnForKey.name),\n            parentOwner &&\n              (componentName =\n                \" It was passed a child from \" + parentOwner + \".\"));\n          didWarnForKey = task.componentStack;\n          task.componentStack = {\n            parent: task.componentStack,\n            type: child.type,\n            owner: child._owner,\n            stack: child._debugStack\n          };\n          console.error(\n            'Each child in a list should have a unique \"key\" prop.%s%s See https://react.dev/link/warning-keys for more information.',\n            request,\n            componentName\n          );\n          task.componentStack = didWarnForKey;\n        }\n      }\n    }\n    function renderChildrenArray(request, task, children, childIndex) {\n      var prevKeyPath = task.keyPath,\n        previousComponentStack = task.componentStack;\n      var previousDebugTask = task.debugTask;\n      pushServerComponentStack(task, task.node._debugInfo);\n      if (\n        -1 !== childIndex &&\n        ((task.keyPath = [task.keyPath, \"Fragment\", childIndex]),\n        null !== task.replay)\n      ) {\n        for (\n          var replay = task.replay, replayNodes = replay.nodes, j = 0;\n          j < replayNodes.length;\n          j++\n        ) {\n          var node = replayNodes[j];\n          if (node[1] === childIndex) {\n            childIndex = node[2];\n            node = node[3];\n            task.replay = { nodes: childIndex, slots: node, pendingTasks: 1 };\n            try {\n              renderChildrenArray(request, task, children, -1);\n              if (\n                1 === task.replay.pendingTasks &&\n                0 < task.replay.nodes.length\n              )\n                throw Error(\n                  \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                );\n              task.replay.pendingTasks--;\n            } catch (x) {\n              if (\n                \"object\" === typeof x &&\n                null !== x &&\n                (x === SuspenseException || \"function\" === typeof x.then)\n              )\n                throw x;\n              task.replay.pendingTasks--;\n              var thrownInfo = getThrownInfo(task.componentStack);\n              children = task.blockedBoundary;\n              var error = x,\n                errorDigest = logRecoverableError(\n                  request,\n                  error,\n                  thrownInfo,\n                  task.debugTask\n                );\n              abortRemainingReplayNodes(\n                request,\n                children,\n                childIndex,\n                node,\n                error,\n                errorDigest,\n                thrownInfo,\n                !1\n              );\n            }\n            task.replay = replay;\n            replayNodes.splice(j, 1);\n            break;\n          }\n        }\n        task.keyPath = prevKeyPath;\n        task.componentStack = previousComponentStack;\n        task.debugTask = previousDebugTask;\n        return;\n      }\n      replay = task.treeContext;\n      replayNodes = children.length;\n      if (\n        null !== task.replay &&\n        ((j = task.replay.slots), null !== j && \"object\" === typeof j)\n      ) {\n        for (childIndex = 0; childIndex < replayNodes; childIndex++)\n          (node = children[childIndex]),\n            (task.treeContext = pushTreeContext(\n              replay,\n              replayNodes,\n              childIndex\n            )),\n            (error = j[childIndex]),\n            \"number\" === typeof error\n              ? (resumeNode(request, task, error, node, childIndex),\n                delete j[childIndex])\n              : renderNode(request, task, node, childIndex);\n        task.treeContext = replay;\n        task.keyPath = prevKeyPath;\n        task.componentStack = previousComponentStack;\n        task.debugTask = previousDebugTask;\n        return;\n      }\n      for (j = 0; j < replayNodes; j++)\n        (childIndex = children[j]),\n          warnForMissingKey(request, task, childIndex),\n          (task.treeContext = pushTreeContext(replay, replayNodes, j)),\n          renderNode(request, task, childIndex, j);\n      task.treeContext = replay;\n      task.keyPath = prevKeyPath;\n      task.componentStack = previousComponentStack;\n      task.debugTask = previousDebugTask;\n    }\n    function trackPostponedBoundary(request, trackedPostpones, boundary) {\n      boundary.status = POSTPONED;\n      boundary.rootSegmentID = request.nextSegmentId++;\n      var tracked = boundary.tracked;\n      if (null === tracked)\n        throw Error(\n          \"It should not be possible to postpone at the root. This is a bug in React.\"\n        );\n      request = tracked.contentKeyPath;\n      if (null === request)\n        throw Error(\n          \"It should not be possible to postpone at the root. This is a bug in React.\"\n        );\n      tracked = tracked.fallbackNode;\n      var children = [],\n        boundaryNode = trackedPostpones.workingMap.get(request);\n      if (void 0 === boundaryNode)\n        return (\n          (boundary = [\n            request[1],\n            request[2],\n            children,\n            null,\n            tracked,\n            boundary.rootSegmentID\n          ]),\n          trackedPostpones.workingMap.set(request, boundary),\n          addToReplayParent(boundary, request[0], trackedPostpones),\n          boundary\n        );\n      boundaryNode[4] = tracked;\n      boundaryNode[5] = boundary.rootSegmentID;\n      return boundaryNode;\n    }\n    function trackPostpone(request, trackedPostpones, task, segment) {\n      segment.status = POSTPONED;\n      var keyPath = task.keyPath,\n        boundary = task.blockedBoundary;\n      if (null === boundary)\n        (segment.id = request.nextSegmentId++),\n          (trackedPostpones.rootSlots = segment.id),\n          null !== request.completedRootSegment &&\n            (request.completedRootSegment.status = POSTPONED);\n      else {\n        if (null !== boundary && boundary.status === PENDING) {\n          var boundaryNode = trackPostponedBoundary(\n            request,\n            trackedPostpones,\n            boundary\n          );\n          if (\n            null !== boundary.tracked &&\n            boundary.tracked.contentKeyPath === keyPath &&\n            -1 === task.childIndex\n          ) {\n            -1 === segment.id &&\n              (segment.id = segment.parentFlushed\n                ? boundary.rootSegmentID\n                : request.nextSegmentId++);\n            boundaryNode[3] = segment.id;\n            return;\n          }\n        }\n        -1 === segment.id &&\n          (segment.id =\n            segment.parentFlushed && null !== boundary\n              ? boundary.rootSegmentID\n              : request.nextSegmentId++);\n        if (-1 === task.childIndex)\n          null === keyPath\n            ? (trackedPostpones.rootSlots = segment.id)\n            : ((task = trackedPostpones.workingMap.get(keyPath)),\n              void 0 === task\n                ? ((task = [keyPath[1], keyPath[2], [], segment.id]),\n                  addToReplayParent(task, keyPath[0], trackedPostpones))\n                : (task[3] = segment.id));\n        else {\n          if (null === keyPath)\n            if (((request = trackedPostpones.rootSlots), null === request))\n              request = trackedPostpones.rootSlots = {};\n            else {\n              if (\"number\" === typeof request)\n                throw Error(\n                  \"It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.\"\n                );\n            }\n          else if (\n            ((boundary = trackedPostpones.workingMap),\n            (boundaryNode = boundary.get(keyPath)),\n            void 0 === boundaryNode)\n          )\n            (request = {}),\n              (boundaryNode = [keyPath[1], keyPath[2], [], request]),\n              boundary.set(keyPath, boundaryNode),\n              addToReplayParent(boundaryNode, keyPath[0], trackedPostpones);\n          else if (((request = boundaryNode[3]), null === request))\n            request = boundaryNode[3] = {};\n          else if (\"number\" === typeof request)\n            throw Error(\n              \"It should not be possible to postpone both at the root of an element as well as a slot below. This is a bug in React.\"\n            );\n          request[task.childIndex] = segment.id;\n        }\n      }\n    }\n    function untrackBoundary(request, boundary) {\n      request = request.trackedPostpones;\n      null !== request &&\n        ((boundary = boundary.tracked),\n        null !== boundary &&\n          ((boundary = boundary.contentKeyPath),\n          null !== boundary &&\n            ((request = request.workingMap.get(boundary)),\n            void 0 !== request &&\n              ((request.length = 4), (request[2] = []), (request[3] = null)))));\n    }\n    function spawnNewSuspendedReplayTask(request, task, thenableState) {\n      return createReplayTask(\n        request,\n        thenableState,\n        task.replay,\n        task.node,\n        task.childIndex,\n        task.blockedBoundary,\n        task.hoistableState,\n        task.abortSet,\n        task.keyPath,\n        task.formatContext,\n        task.context,\n        task.treeContext,\n        task.row,\n        task.componentStack,\n        emptyContextObject,\n        task.debugTask\n      );\n    }\n    function spawnNewSuspendedRenderTask(request, task, thenableState) {\n      var segment = task.blockedSegment,\n        newSegment = createPendingSegment(\n          request,\n          segment.chunks.length,\n          null,\n          task.formatContext,\n          segment.lastPushedText,\n          !0\n        );\n      segment.children.push(newSegment);\n      segment.lastPushedText = !1;\n      return createRenderTask(\n        request,\n        thenableState,\n        task.node,\n        task.childIndex,\n        task.blockedBoundary,\n        newSegment,\n        task.blockedPreamble,\n        task.hoistableState,\n        task.abortSet,\n        task.keyPath,\n        task.formatContext,\n        task.context,\n        task.treeContext,\n        task.row,\n        task.componentStack,\n        emptyContextObject,\n        task.debugTask\n      );\n    }\n    function renderNode(request, task, node, childIndex) {\n      var previousFormatContext = task.formatContext,\n        previousContext = task.context,\n        previousKeyPath = task.keyPath,\n        previousTreeContext = task.treeContext,\n        previousComponentStack = task.componentStack,\n        previousDebugTask = task.debugTask,\n        segment = task.blockedSegment;\n      if (null === segment) {\n        segment = task.replay;\n        try {\n          return renderNodeDestructive(request, task, node, childIndex);\n        } catch (thrownValue) {\n          if (\n            (resetHooksState(),\n            (node =\n              thrownValue === SuspenseException\n                ? getSuspendedThenable()\n                : thrownValue),\n            12 !== request.status && \"object\" === typeof node && null !== node)\n          ) {\n            if (\"function\" === typeof node.then) {\n              childIndex =\n                thrownValue === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              request = spawnNewSuspendedReplayTask(\n                request,\n                task,\n                childIndex\n              ).ping;\n              node.then(request, request);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.replay = segment;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n            if (\"Maximum call stack size exceeded\" === node.message) {\n              node =\n                thrownValue === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              node = spawnNewSuspendedReplayTask(request, task, node);\n              request.pingedTasks.push(node);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.replay = segment;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n          }\n        }\n      } else {\n        var childrenLength = segment.children.length,\n          chunkLength = segment.chunks.length;\n        try {\n          return renderNodeDestructive(request, task, node, childIndex);\n        } catch (thrownValue$3) {\n          if (\n            (resetHooksState(),\n            (segment.children.length = childrenLength),\n            (segment.chunks.length = chunkLength),\n            (node =\n              thrownValue$3 === SuspenseException\n                ? getSuspendedThenable()\n                : thrownValue$3),\n            12 !== request.status && \"object\" === typeof node && null !== node)\n          ) {\n            if (\"function\" === typeof node.then) {\n              segment = node;\n              node =\n                thrownValue$3 === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              request = spawnNewSuspendedRenderTask(request, task, node).ping;\n              segment.then(request, request);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n            if (\"Maximum call stack size exceeded\" === node.message) {\n              segment =\n                thrownValue$3 === SuspenseException\n                  ? getThenableStateAfterSuspending()\n                  : null;\n              segment = spawnNewSuspendedRenderTask(request, task, segment);\n              request.pingedTasks.push(segment);\n              task.formatContext = previousFormatContext;\n              task.context = previousContext;\n              task.keyPath = previousKeyPath;\n              task.treeContext = previousTreeContext;\n              task.componentStack = previousComponentStack;\n              task.debugTask = previousDebugTask;\n              switchContext(previousContext);\n              return;\n            }\n          }\n        }\n      }\n      task.formatContext = previousFormatContext;\n      task.context = previousContext;\n      task.keyPath = previousKeyPath;\n      task.treeContext = previousTreeContext;\n      switchContext(previousContext);\n      throw node;\n    }\n    function abortTaskSoft(task) {\n      var boundary = task.blockedBoundary,\n        segment = task.blockedSegment;\n      null !== segment &&\n        ((segment.status = ABORTED),\n        finishedTask(this, boundary, task.row, segment));\n    }\n    function abortRemainingReplayNodes(\n      request$jscomp$0,\n      boundary,\n      nodes,\n      slots,\n      error$jscomp$0,\n      errorDigest$jscomp$0,\n      errorInfo$jscomp$0,\n      aborted\n    ) {\n      for (var i = 0; i < nodes.length; i++) {\n        var node = nodes[i];\n        if (4 === node.length)\n          abortRemainingReplayNodes(\n            request$jscomp$0,\n            boundary,\n            node[2],\n            node[3],\n            error$jscomp$0,\n            errorDigest$jscomp$0,\n            errorInfo$jscomp$0,\n            aborted\n          );\n        else {\n          var request = request$jscomp$0;\n          node = node[5];\n          var error = error$jscomp$0,\n            errorDigest = errorDigest$jscomp$0,\n            errorInfo = errorInfo$jscomp$0,\n            wasAborted = aborted,\n            resumedBoundary = createSuspenseBoundary(\n              request,\n              null,\n              new Set(),\n              null,\n              !1\n            );\n          resumedBoundary.parentFlushed = !0;\n          resumedBoundary.rootSegmentID = node;\n          resumedBoundary.status = CLIENT_RENDERED;\n          encodeErrorForBoundary(\n            resumedBoundary,\n            errorDigest,\n            error,\n            errorInfo,\n            wasAborted\n          );\n          resumedBoundary.parentFlushed &&\n            request.clientRenderedBoundaries.push(resumedBoundary);\n        }\n      }\n      nodes.length = 0;\n      if (null !== slots) {\n        if (null === boundary)\n          throw Error(\n            \"We should not have any resumable nodes in the shell. This is a bug in React.\"\n          );\n        boundary.status !== CLIENT_RENDERED &&\n          ((boundary.status = CLIENT_RENDERED),\n          encodeErrorForBoundary(\n            boundary,\n            errorDigest$jscomp$0,\n            error$jscomp$0,\n            errorInfo$jscomp$0,\n            aborted\n          ),\n          boundary.parentFlushed &&\n            request$jscomp$0.clientRenderedBoundaries.push(boundary));\n        if (\"object\" === typeof slots)\n          for (var index in slots) delete slots[index];\n      }\n    }\n    function abortTask(task, request, error) {\n      var boundary = task.blockedBoundary,\n        segment = task.blockedSegment;\n      if (null !== segment) {\n        if (6 === segment.status) return;\n        segment.status = ABORTED;\n      }\n      var errorInfo = getThrownInfo(task.componentStack),\n        node = task.node;\n      if (null !== node && \"object\" === typeof node) {\n        for (\n          var debugInfo = node._debugInfo;\n          \"object\" === typeof node &&\n          null !== node &&\n          node.$$typeof === REACT_LAZY_TYPE;\n\n        ) {\n          var payload = node._payload;\n          if (\"fulfilled\" === payload.status) node = payload.value;\n          else break;\n        }\n        \"object\" === typeof node &&\n          null !== node &&\n          (isArrayImpl(node) ||\n            \"function\" === typeof node[ASYNC_ITERATOR] ||\n            node.$$typeof === REACT_ELEMENT_TYPE ||\n            node.$$typeof === REACT_LAZY_TYPE) &&\n          isArrayImpl(node._debugInfo) &&\n          (debugInfo = node._debugInfo);\n        pushHaltedAwaitOnComponentStack(task, debugInfo);\n        null !== task.thenableState &&\n          pushSuspendedCallSiteOnComponentStack(request, task);\n      }\n      if (null === boundary) {\n        if (13 !== request.status && request.status !== CLOSED) {\n          boundary = task.replay;\n          if (null === boundary) {\n            null !== request.trackedPostpones && null !== segment\n              ? ((boundary = request.trackedPostpones),\n                logRecoverableError(request, error, errorInfo, task.debugTask),\n                trackPostpone(request, boundary, task, segment),\n                finishedTask(request, null, task.row, segment))\n              : (logRecoverableError(request, error, errorInfo, task.debugTask),\n                fatalError(request, error, errorInfo, task.debugTask));\n            return;\n          }\n          boundary.pendingTasks--;\n          0 === boundary.pendingTasks &&\n            0 < boundary.nodes.length &&\n            ((segment = logRecoverableError(request, error, errorInfo, null)),\n            abortRemainingReplayNodes(\n              request,\n              null,\n              boundary.nodes,\n              boundary.slots,\n              error,\n              segment,\n              errorInfo,\n              !0\n            ));\n          request.pendingRootTasks--;\n          0 === request.pendingRootTasks && completeShell(request);\n        }\n      } else {\n        node = request.trackedPostpones;\n        if (boundary.status !== CLIENT_RENDERED) {\n          if (null !== node && null !== segment)\n            return (\n              logRecoverableError(request, error, errorInfo, task.debugTask),\n              trackPostpone(request, node, task, segment),\n              boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {\n                return abortTask(fallbackTask, request, error);\n              }),\n              boundary.fallbackAbortableTasks.clear(),\n              finishedTask(request, boundary, task.row, segment)\n            );\n          boundary.status = CLIENT_RENDERED;\n          segment = logRecoverableError(\n            request,\n            error,\n            errorInfo,\n            task.debugTask\n          );\n          boundary.status = CLIENT_RENDERED;\n          encodeErrorForBoundary(boundary, segment, error, errorInfo, !0);\n          untrackBoundary(request, boundary);\n          boundary.parentFlushed &&\n            request.clientRenderedBoundaries.push(boundary);\n        }\n        boundary.pendingTasks--;\n        errorInfo = boundary.row;\n        null !== errorInfo &&\n          0 === --errorInfo.pendingTasks &&\n          finishSuspenseListRow(request, errorInfo);\n        boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {\n          return abortTask(fallbackTask, request, error);\n        });\n        boundary.fallbackAbortableTasks.clear();\n      }\n      task = task.row;\n      null !== task &&\n        0 === --task.pendingTasks &&\n        finishSuspenseListRow(request, task);\n      request.allPendingTasks--;\n      0 === request.allPendingTasks && completeAll(request);\n    }\n    function safelyEmitEarlyPreloads(request, shellComplete) {\n      try {\n        var renderState = request.renderState,\n          onHeaders = renderState.onHeaders;\n        if (onHeaders) {\n          var headers = renderState.headers;\n          if (headers) {\n            renderState.headers = null;\n            var linkHeader = headers.preconnects;\n            headers.fontPreloads &&\n              (linkHeader && (linkHeader += \", \"),\n              (linkHeader += headers.fontPreloads));\n            headers.highImagePreloads &&\n              (linkHeader && (linkHeader += \", \"),\n              (linkHeader += headers.highImagePreloads));\n            if (!shellComplete) {\n              var queueIter = renderState.styles.values(),\n                queueStep = queueIter.next();\n              b: for (\n                ;\n                0 < headers.remainingCapacity && !queueStep.done;\n                queueStep = queueIter.next()\n              )\n                for (\n                  var sheetIter = queueStep.value.sheets.values(),\n                    sheetStep = sheetIter.next();\n                  0 < headers.remainingCapacity && !sheetStep.done;\n                  sheetStep = sheetIter.next()\n                ) {\n                  var sheet = sheetStep.value,\n                    props = sheet.props,\n                    key = props.href,\n                    props$jscomp$0 = sheet.props;\n                  var header = getPreloadAsHeader(\n                    props$jscomp$0.href,\n                    \"style\",\n                    {\n                      crossOrigin: props$jscomp$0.crossOrigin,\n                      integrity: props$jscomp$0.integrity,\n                      nonce: props$jscomp$0.nonce,\n                      type: props$jscomp$0.type,\n                      fetchPriority: props$jscomp$0.fetchPriority,\n                      referrerPolicy: props$jscomp$0.referrerPolicy,\n                      media: props$jscomp$0.media\n                    }\n                  );\n                  if (0 <= (headers.remainingCapacity -= header.length + 2))\n                    (renderState.resets.style[key] = PRELOAD_NO_CREDS),\n                      linkHeader && (linkHeader += \", \"),\n                      (linkHeader += header),\n                      (renderState.resets.style[key] =\n                        \"string\" === typeof props.crossOrigin ||\n                        \"string\" === typeof props.integrity\n                          ? [props.crossOrigin, props.integrity]\n                          : PRELOAD_NO_CREDS);\n                  else break b;\n                }\n            }\n            linkHeader ? onHeaders({ Link: linkHeader }) : onHeaders({});\n          }\n        }\n      } catch (error) {\n        logRecoverableError(request, error, {}, null);\n      }\n    }\n    function completeShell(request) {\n      null === request.trackedPostpones && safelyEmitEarlyPreloads(request, !0);\n      null === request.trackedPostpones && preparePreamble(request);\n      request.onShellError = noop;\n      request = request.onShellReady;\n      request();\n    }\n    function completeAll(request) {\n      safelyEmitEarlyPreloads(\n        request,\n        null === request.trackedPostpones\n          ? !0\n          : null === request.completedRootSegment ||\n              request.completedRootSegment.status !== POSTPONED\n      );\n      preparePreamble(request);\n      request = request.onAllReady;\n      request();\n    }\n    function queueCompletedSegment(boundary, segment) {\n      if (\n        0 === segment.chunks.length &&\n        1 === segment.children.length &&\n        null === segment.children[0].boundary &&\n        -1 === segment.children[0].id\n      ) {\n        var childSegment = segment.children[0];\n        childSegment.id = segment.id;\n        childSegment.parentFlushed = !0;\n        (childSegment.status !== COMPLETED &&\n          childSegment.status !== ABORTED &&\n          childSegment.status !== ERRORED) ||\n          queueCompletedSegment(boundary, childSegment);\n      } else boundary.completedSegments.push(segment);\n    }\n    function finishedSegment(request, boundary, segment) {\n      if (null !== byteLengthOfChunk) {\n        segment = segment.chunks;\n        for (var segmentByteSize = 0, i = 0; i < segment.length; i++)\n          segmentByteSize += byteLengthOfChunk(segment[i]);\n        null === boundary\n          ? (request.byteSize += segmentByteSize)\n          : (boundary.byteSize += segmentByteSize);\n      }\n    }\n    function finishedTask(request, boundary, row, segment) {\n      null !== row &&\n        (0 === --row.pendingTasks\n          ? finishSuspenseListRow(request, row)\n          : row.together && tryToResolveTogetherRow(request, row));\n      request.allPendingTasks--;\n      if (null === boundary) {\n        if (null !== segment && segment.parentFlushed) {\n          if (null !== request.completedRootSegment)\n            throw Error(\n              \"There can only be one root segment. This is a bug in React.\"\n            );\n          request.completedRootSegment = segment;\n        }\n        request.pendingRootTasks--;\n        0 === request.pendingRootTasks && completeShell(request);\n      } else if ((boundary.pendingTasks--, boundary.status !== CLIENT_RENDERED))\n        if (0 === boundary.pendingTasks)\n          if (\n            (boundary.status === PENDING && (boundary.status = COMPLETED),\n            null !== segment &&\n              segment.parentFlushed &&\n              (segment.status === COMPLETED || segment.status === ABORTED) &&\n              queueCompletedSegment(boundary, segment),\n            boundary.parentFlushed &&\n              request.completedBoundaries.push(boundary),\n            boundary.status === COMPLETED)\n          )\n            (row = boundary.row),\n              null !== row &&\n                hoistHoistables(row.hoistables, boundary.contentState),\n              isEligibleForOutlining(request, boundary) ||\n                (boundary.fallbackAbortableTasks.forEach(\n                  abortTaskSoft,\n                  request\n                ),\n                boundary.fallbackAbortableTasks.clear(),\n                null !== row &&\n                  0 === --row.pendingTasks &&\n                  finishSuspenseListRow(request, row)),\n              0 === request.pendingRootTasks &&\n                null === request.trackedPostpones &&\n                null !== boundary.preamble &&\n                preparePreamble(request);\n          else {\n            if (\n              boundary.status === POSTPONED &&\n              ((boundary = boundary.row), null !== boundary)\n            ) {\n              if (null !== request.trackedPostpones) {\n                row = request.trackedPostpones;\n                var postponedRow = boundary.next;\n                if (\n                  null !== postponedRow &&\n                  ((segment = postponedRow.boundaries), null !== segment)\n                )\n                  for (\n                    postponedRow.boundaries = null, postponedRow = 0;\n                    postponedRow < segment.length;\n                    postponedRow++\n                  ) {\n                    var postponedBoundary = segment[postponedRow];\n                    trackPostponedBoundary(request, row, postponedBoundary);\n                    finishedTask(request, postponedBoundary, null, null);\n                  }\n              }\n              0 === --boundary.pendingTasks &&\n                finishSuspenseListRow(request, boundary);\n            }\n          }\n        else\n          null === segment ||\n            !segment.parentFlushed ||\n            (segment.status !== COMPLETED && segment.status !== ABORTED) ||\n            (queueCompletedSegment(boundary, segment),\n            1 === boundary.completedSegments.length &&\n              boundary.parentFlushed &&\n              request.partialBoundaries.push(boundary)),\n            (boundary = boundary.row),\n            null !== boundary &&\n              boundary.together &&\n              tryToResolveTogetherRow(request, boundary);\n      0 === request.allPendingTasks && completeAll(request);\n    }\n    function performWork(request$jscomp$1) {\n      if (\n        request$jscomp$1.status !== CLOSED &&\n        13 !== request$jscomp$1.status\n      ) {\n        var prevContext = currentActiveSnapshot,\n          prevDispatcher = ReactSharedInternals.H;\n        ReactSharedInternals.H = HooksDispatcher;\n        var prevAsyncDispatcher = ReactSharedInternals.A;\n        ReactSharedInternals.A = DefaultAsyncDispatcher;\n        var prevRequest = currentRequest;\n        currentRequest = request$jscomp$1;\n        var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;\n        ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;\n        var prevResumableState = currentResumableState;\n        currentResumableState = request$jscomp$1.resumableState;\n        try {\n          var pingedTasks = request$jscomp$1.pingedTasks,\n            i;\n          for (i = 0; i < pingedTasks.length; i++) {\n            var request = request$jscomp$1,\n              task = pingedTasks[i],\n              segment = task.blockedSegment;\n            if (null === segment) {\n              var prevTaskInDEV = void 0,\n                task$jscomp$0 = task;\n              if (0 !== task$jscomp$0.replay.pendingTasks) {\n                switchContext(task$jscomp$0.context);\n                prevTaskInDEV = currentTaskInDEV;\n                currentTaskInDEV = task$jscomp$0;\n                try {\n                  \"number\" === typeof task$jscomp$0.replay.slots\n                    ? resumeNode(\n                        request,\n                        task$jscomp$0,\n                        task$jscomp$0.replay.slots,\n                        task$jscomp$0.node,\n                        task$jscomp$0.childIndex\n                      )\n                    : retryNode(request, task$jscomp$0);\n                  if (\n                    1 === task$jscomp$0.replay.pendingTasks &&\n                    0 < task$jscomp$0.replay.nodes.length\n                  )\n                    throw Error(\n                      \"Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.\"\n                    );\n                  task$jscomp$0.replay.pendingTasks--;\n                  task$jscomp$0.abortSet.delete(task$jscomp$0);\n                  finishedTask(\n                    request,\n                    task$jscomp$0.blockedBoundary,\n                    task$jscomp$0.row,\n                    null\n                  );\n                } catch (thrownValue) {\n                  resetHooksState();\n                  var x =\n                    thrownValue === SuspenseException\n                      ? getSuspendedThenable()\n                      : thrownValue;\n                  if (\n                    \"object\" === typeof x &&\n                    null !== x &&\n                    \"function\" === typeof x.then\n                  ) {\n                    var ping = task$jscomp$0.ping;\n                    x.then(ping, ping);\n                    task$jscomp$0.thenableState =\n                      thrownValue === SuspenseException\n                        ? getThenableStateAfterSuspending()\n                        : null;\n                  } else {\n                    task$jscomp$0.replay.pendingTasks--;\n                    task$jscomp$0.abortSet.delete(task$jscomp$0);\n                    var errorInfo = getThrownInfo(task$jscomp$0.componentStack),\n                      request$jscomp$0 = request,\n                      boundary = task$jscomp$0.blockedBoundary,\n                      error$jscomp$0 =\n                        12 === request.status ? request.fatalError : x,\n                      errorInfo$jscomp$0 = errorInfo,\n                      replayNodes = task$jscomp$0.replay.nodes,\n                      resumeSlots = task$jscomp$0.replay.slots,\n                      errorDigest = logRecoverableError(\n                        request$jscomp$0,\n                        error$jscomp$0,\n                        errorInfo$jscomp$0,\n                        task$jscomp$0.debugTask\n                      );\n                    abortRemainingReplayNodes(\n                      request$jscomp$0,\n                      boundary,\n                      replayNodes,\n                      resumeSlots,\n                      error$jscomp$0,\n                      errorDigest,\n                      errorInfo$jscomp$0,\n                      !1\n                    );\n                    request.pendingRootTasks--;\n                    0 === request.pendingRootTasks && completeShell(request);\n                    request.allPendingTasks--;\n                    0 === request.allPendingTasks && completeAll(request);\n                  }\n                } finally {\n                  currentTaskInDEV = prevTaskInDEV;\n                }\n              }\n            } else if (\n              ((prevTaskInDEV = void 0),\n              (task$jscomp$0 = task),\n              (request$jscomp$0 = segment),\n              request$jscomp$0.status === PENDING)\n            ) {\n              request$jscomp$0.status = 6;\n              switchContext(task$jscomp$0.context);\n              prevTaskInDEV = currentTaskInDEV;\n              currentTaskInDEV = task$jscomp$0;\n              var childrenLength = request$jscomp$0.children.length,\n                chunkLength = request$jscomp$0.chunks.length;\n              try {\n                retryNode(request, task$jscomp$0),\n                  request$jscomp$0.lastPushedText &&\n                    request$jscomp$0.textEmbedded &&\n                    request$jscomp$0.chunks.push(textSeparator),\n                  task$jscomp$0.abortSet.delete(task$jscomp$0),\n                  (request$jscomp$0.status = COMPLETED),\n                  finishedSegment(\n                    request,\n                    task$jscomp$0.blockedBoundary,\n                    request$jscomp$0\n                  ),\n                  finishedTask(\n                    request,\n                    task$jscomp$0.blockedBoundary,\n                    task$jscomp$0.row,\n                    request$jscomp$0\n                  );\n              } catch (thrownValue) {\n                resetHooksState();\n                request$jscomp$0.children.length = childrenLength;\n                request$jscomp$0.chunks.length = chunkLength;\n                var x$jscomp$0 =\n                  thrownValue === SuspenseException\n                    ? getSuspendedThenable()\n                    : 12 === request.status\n                      ? request.fatalError\n                      : thrownValue;\n                if (\n                  12 === request.status &&\n                  null !== request.trackedPostpones\n                ) {\n                  var trackedPostpones = request.trackedPostpones,\n                    thrownInfo = getThrownInfo(task$jscomp$0.componentStack);\n                  task$jscomp$0.abortSet.delete(task$jscomp$0);\n                  logRecoverableError(\n                    request,\n                    x$jscomp$0,\n                    thrownInfo,\n                    task$jscomp$0.debugTask\n                  );\n                  trackPostpone(\n                    request,\n                    trackedPostpones,\n                    task$jscomp$0,\n                    request$jscomp$0\n                  );\n                  finishedTask(\n                    request,\n                    task$jscomp$0.blockedBoundary,\n                    task$jscomp$0.row,\n                    request$jscomp$0\n                  );\n                } else if (\n                  \"object\" === typeof x$jscomp$0 &&\n                  null !== x$jscomp$0 &&\n                  \"function\" === typeof x$jscomp$0.then\n                ) {\n                  request$jscomp$0.status = PENDING;\n                  task$jscomp$0.thenableState =\n                    thrownValue === SuspenseException\n                      ? getThenableStateAfterSuspending()\n                      : null;\n                  var ping$jscomp$0 = task$jscomp$0.ping;\n                  x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);\n                } else {\n                  var errorInfo$jscomp$1 = getThrownInfo(\n                    task$jscomp$0.componentStack\n                  );\n                  task$jscomp$0.abortSet.delete(task$jscomp$0);\n                  request$jscomp$0.status = ERRORED;\n                  var boundary$jscomp$0 = task$jscomp$0.blockedBoundary,\n                    row = task$jscomp$0.row,\n                    debugTask = task$jscomp$0.debugTask;\n                  null !== row &&\n                    0 === --row.pendingTasks &&\n                    finishSuspenseListRow(request, row);\n                  request.allPendingTasks--;\n                  var errorDigest$jscomp$0 = logRecoverableError(\n                    request,\n                    x$jscomp$0,\n                    errorInfo$jscomp$1,\n                    debugTask\n                  );\n                  if (null === boundary$jscomp$0)\n                    fatalError(\n                      request,\n                      x$jscomp$0,\n                      errorInfo$jscomp$1,\n                      debugTask\n                    );\n                  else if (\n                    (boundary$jscomp$0.pendingTasks--,\n                    boundary$jscomp$0.status !== CLIENT_RENDERED)\n                  ) {\n                    boundary$jscomp$0.status = CLIENT_RENDERED;\n                    encodeErrorForBoundary(\n                      boundary$jscomp$0,\n                      errorDigest$jscomp$0,\n                      x$jscomp$0,\n                      errorInfo$jscomp$1,\n                      !1\n                    );\n                    untrackBoundary(request, boundary$jscomp$0);\n                    var boundaryRow = boundary$jscomp$0.row;\n                    null !== boundaryRow &&\n                      0 === --boundaryRow.pendingTasks &&\n                      finishSuspenseListRow(request, boundaryRow);\n                    boundary$jscomp$0.parentFlushed &&\n                      request.clientRenderedBoundaries.push(boundary$jscomp$0);\n                    0 === request.pendingRootTasks &&\n                      null === request.trackedPostpones &&\n                      null !== boundary$jscomp$0.preamble &&\n                      preparePreamble(request);\n                  }\n                  0 === request.allPendingTasks && completeAll(request);\n                }\n              } finally {\n                currentTaskInDEV = prevTaskInDEV;\n              }\n            }\n          }\n          pingedTasks.splice(0, i);\n          null !== request$jscomp$1.destination &&\n            flushCompletedQueues(\n              request$jscomp$1,\n              request$jscomp$1.destination\n            );\n        } catch (error) {\n          (pingedTasks = {}),\n            logRecoverableError(request$jscomp$1, error, pingedTasks, null),\n            fatalError(request$jscomp$1, error, pingedTasks, null);\n        } finally {\n          (currentResumableState = prevResumableState),\n            (ReactSharedInternals.H = prevDispatcher),\n            (ReactSharedInternals.A = prevAsyncDispatcher),\n            (ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl),\n            prevDispatcher === HooksDispatcher && switchContext(prevContext),\n            (currentRequest = prevRequest);\n        }\n      }\n    }\n    function preparePreambleFromSubtree(\n      request,\n      segment,\n      collectedPreambleSegments\n    ) {\n      segment.preambleChildren.length &&\n        collectedPreambleSegments.push(segment.preambleChildren);\n      for (var pendingPreambles = !1, i = 0; i < segment.children.length; i++)\n        pendingPreambles =\n          preparePreambleFromSegment(\n            request,\n            segment.children[i],\n            collectedPreambleSegments\n          ) || pendingPreambles;\n      return pendingPreambles;\n    }\n    function preparePreambleFromSegment(\n      request,\n      segment,\n      collectedPreambleSegments\n    ) {\n      var boundary = segment.boundary;\n      if (null === boundary)\n        return preparePreambleFromSubtree(\n          request,\n          segment,\n          collectedPreambleSegments\n        );\n      var preamble = boundary.preamble;\n      if (null === preamble) return !1;\n      switch (boundary.status) {\n        case COMPLETED:\n          hoistPreambleState(request.renderState, preamble.content);\n          request.byteSize += boundary.byteSize;\n          segment = boundary.completedSegments[0];\n          if (!segment)\n            throw Error(\n              \"A previously unvisited boundary must have exactly one root segment. This is a bug in React.\"\n            );\n          return preparePreambleFromSubtree(\n            request,\n            segment,\n            collectedPreambleSegments\n          );\n        case POSTPONED:\n          if (null !== request.trackedPostpones) return !0;\n        case CLIENT_RENDERED:\n          if (segment.status === COMPLETED)\n            return (\n              hoistPreambleState(request.renderState, preamble.fallback),\n              preparePreambleFromSubtree(\n                request,\n                segment,\n                collectedPreambleSegments\n              )\n            );\n        default:\n          return !0;\n      }\n    }\n    function preparePreamble(request) {\n      if (\n        request.completedRootSegment &&\n        null === request.completedPreambleSegments\n      ) {\n        var collectedPreambleSegments = [],\n          originalRequestByteSize = request.byteSize,\n          hasPendingPreambles = preparePreambleFromSegment(\n            request,\n            request.completedRootSegment,\n            collectedPreambleSegments\n          ),\n          preamble = request.renderState.preamble;\n        !1 === hasPendingPreambles ||\n        (preamble.headChunks && preamble.bodyChunks)\n          ? (request.completedPreambleSegments = collectedPreambleSegments)\n          : (request.byteSize = originalRequestByteSize);\n      }\n    }\n    function flushSubtree(request, destination, segment, hoistableState) {\n      segment.parentFlushed = !0;\n      switch (segment.status) {\n        case PENDING:\n          segment.id = request.nextSegmentId++;\n        case POSTPONED:\n          return (\n            (hoistableState = segment.id),\n            (segment.lastPushedText = !1),\n            (segment.textEmbedded = !1),\n            (request = request.renderState),\n            writeChunk(destination, placeholder1),\n            writeChunk(destination, request.placeholderPrefix),\n            (request = hoistableState.toString(16)),\n            writeChunk(destination, request),\n            writeChunkAndReturn(destination, placeholder2)\n          );\n        case COMPLETED:\n          segment.status = FLUSHED;\n          var r = !0,\n            chunks = segment.chunks,\n            chunkIdx = 0;\n          segment = segment.children;\n          for (var childIdx = 0; childIdx < segment.length; childIdx++) {\n            for (r = segment[childIdx]; chunkIdx < r.index; chunkIdx++)\n              writeChunk(destination, chunks[chunkIdx]);\n            r = flushSegment(request, destination, r, hoistableState);\n          }\n          for (; chunkIdx < chunks.length - 1; chunkIdx++)\n            writeChunk(destination, chunks[chunkIdx]);\n          chunkIdx < chunks.length &&\n            (r = writeChunkAndReturn(destination, chunks[chunkIdx]));\n          return r;\n        case ABORTED:\n          return !0;\n        default:\n          throw Error(\n            \"Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.\"\n          );\n      }\n    }\n    function flushSegment(request, destination, segment, hoistableState) {\n      var boundary = segment.boundary;\n      if (null === boundary)\n        return flushSubtree(request, destination, segment, hoistableState);\n      segment.boundary = null;\n      boundary.parentFlushed = !0;\n      if (boundary.status === CLIENT_RENDERED) {\n        var row = boundary.row;\n        null !== row &&\n          0 === --row.pendingTasks &&\n          finishSuspenseListRow(request, row);\n        row = boundary.errorDigest;\n        var errorMessage = boundary.errorMessage,\n          errorStack = boundary.errorStack;\n        boundary = boundary.errorComponentStack;\n        writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary);\n        writeChunk(destination, clientRenderedSuspenseBoundaryError1);\n        row &&\n          (writeChunk(destination, clientRenderedSuspenseBoundaryError1A),\n          writeChunk(destination, escapeTextForBrowser(row)),\n          writeChunk(\n            destination,\n            clientRenderedSuspenseBoundaryErrorAttrInterstitial\n          ));\n        errorMessage &&\n          (writeChunk(destination, clientRenderedSuspenseBoundaryError1B),\n          writeChunk(destination, escapeTextForBrowser(errorMessage)),\n          writeChunk(\n            destination,\n            clientRenderedSuspenseBoundaryErrorAttrInterstitial\n          ));\n        errorStack &&\n          (writeChunk(destination, clientRenderedSuspenseBoundaryError1C),\n          writeChunk(destination, escapeTextForBrowser(errorStack)),\n          writeChunk(\n            destination,\n            clientRenderedSuspenseBoundaryErrorAttrInterstitial\n          ));\n        boundary &&\n          (writeChunk(destination, clientRenderedSuspenseBoundaryError1D),\n          writeChunk(destination, escapeTextForBrowser(boundary)),\n          writeChunk(\n            destination,\n            clientRenderedSuspenseBoundaryErrorAttrInterstitial\n          ));\n        writeChunkAndReturn(destination, clientRenderedSuspenseBoundaryError2);\n        flushSubtree(request, destination, segment, hoistableState);\n      } else if (boundary.status !== COMPLETED)\n        boundary.status === PENDING &&\n          (boundary.rootSegmentID = request.nextSegmentId++),\n          0 < boundary.completedSegments.length &&\n            request.partialBoundaries.push(boundary),\n          writeStartPendingSuspenseBoundary(\n            destination,\n            request.renderState,\n            boundary.rootSegmentID\n          ),\n          hoistableState &&\n            hoistHoistables(hoistableState, boundary.fallbackState),\n          flushSubtree(request, destination, segment, hoistableState);\n      else if (\n        !flushingPartialBoundaries &&\n        isEligibleForOutlining(request, boundary) &&\n        (flushedByteSize + boundary.byteSize > request.progressiveChunkSize ||\n          hasSuspenseyContent(boundary.contentState, flushingShell) ||\n          boundary.defer)\n      )\n        (boundary.rootSegmentID = request.nextSegmentId++),\n          request.completedBoundaries.push(boundary),\n          writeStartPendingSuspenseBoundary(\n            destination,\n            request.renderState,\n            boundary.rootSegmentID\n          ),\n          flushSubtree(request, destination, segment, hoistableState);\n      else {\n        flushedByteSize += boundary.byteSize;\n        hoistableState &&\n          hoistHoistables(hoistableState, boundary.contentState);\n        segment = boundary.row;\n        null !== segment &&\n          isEligibleForOutlining(request, boundary) &&\n          0 === --segment.pendingTasks &&\n          finishSuspenseListRow(request, segment);\n        writeChunkAndReturn(destination, startCompletedSuspenseBoundary);\n        segment = boundary.completedSegments;\n        if (1 !== segment.length)\n          throw Error(\n            \"A previously unvisited boundary must have exactly one root segment. This is a bug in React.\"\n          );\n        flushSegment(request, destination, segment[0], hoistableState);\n      }\n      return writeChunkAndReturn(destination, endSuspenseBoundary);\n    }\n    function flushSegmentContainer(\n      request,\n      destination,\n      segment,\n      hoistableState\n    ) {\n      writeStartSegment(\n        destination,\n        request.renderState,\n        segment.parentFormatContext,\n        segment.id\n      );\n      flushSegment(request, destination, segment, hoistableState);\n      return writeEndSegment(destination, segment.parentFormatContext);\n    }\n    function flushCompletedBoundary(request, destination, boundary) {\n      flushedByteSize = boundary.byteSize;\n      for (\n        var completedSegments = boundary.completedSegments, i = 0;\n        i < completedSegments.length;\n        i++\n      )\n        flushPartiallyCompletedSegment(\n          request,\n          destination,\n          boundary,\n          completedSegments[i]\n        );\n      completedSegments.length = 0;\n      completedSegments = boundary.row;\n      null !== completedSegments &&\n        isEligibleForOutlining(request, boundary) &&\n        0 === --completedSegments.pendingTasks &&\n        finishSuspenseListRow(request, completedSegments);\n      writeHoistablesForBoundary(\n        destination,\n        boundary.contentState,\n        request.renderState\n      );\n      completedSegments = request.resumableState;\n      request = request.renderState;\n      i = boundary.rootSegmentID;\n      boundary = boundary.contentState;\n      var requiresStyleInsertion = request.stylesToHoist,\n        requiresViewTransitions =\n          (completedSegments.instructions & NeedUpgradeToViewTransitions) !==\n          NothingSent;\n      request.stylesToHoist = !1;\n      writeChunk(destination, request.startInlineScript);\n      writeChunk(destination, endOfStartTag);\n      requiresStyleInsertion\n        ? ((completedSegments.instructions & SentClientRenderFunction) ===\n            NothingSent &&\n            ((completedSegments.instructions |= SentClientRenderFunction),\n            writeChunk(destination, clientRenderScriptFunctionOnly)),\n          (completedSegments.instructions & SentCompleteBoundaryFunction) ===\n            NothingSent &&\n            ((completedSegments.instructions |= SentCompleteBoundaryFunction),\n            writeChunk(destination, completeBoundaryScriptFunctionOnly)),\n          requiresViewTransitions &&\n            (completedSegments.instructions & SentUpgradeToViewTransitions) ===\n              NothingSent &&\n            ((completedSegments.instructions |= SentUpgradeToViewTransitions),\n            writeChunk(\n              destination,\n              completeBoundaryUpgradeToViewTransitionsInstruction\n            )),\n          (completedSegments.instructions & SentStyleInsertionFunction) ===\n          NothingSent\n            ? ((completedSegments.instructions |= SentStyleInsertionFunction),\n              writeChunk(\n                destination,\n                completeBoundaryWithStylesScript1FullPartial\n              ))\n            : writeChunk(destination, completeBoundaryWithStylesScript1Partial))\n        : ((completedSegments.instructions & SentCompleteBoundaryFunction) ===\n            NothingSent &&\n            ((completedSegments.instructions |= SentCompleteBoundaryFunction),\n            writeChunk(destination, completeBoundaryScriptFunctionOnly)),\n          requiresViewTransitions &&\n            (completedSegments.instructions & SentUpgradeToViewTransitions) ===\n              NothingSent &&\n            ((completedSegments.instructions |= SentUpgradeToViewTransitions),\n            writeChunk(\n              destination,\n              completeBoundaryUpgradeToViewTransitionsInstruction\n            )),\n          writeChunk(destination, completeBoundaryScript1Partial));\n      completedSegments = i.toString(16);\n      writeChunk(destination, request.boundaryPrefix);\n      writeChunk(destination, completedSegments);\n      writeChunk(destination, completeBoundaryScript2);\n      writeChunk(destination, request.segmentPrefix);\n      writeChunk(destination, completedSegments);\n      requiresStyleInsertion\n        ? (writeChunk(destination, completeBoundaryScript3a),\n          writeStyleResourceDependenciesInJS(destination, boundary))\n        : writeChunk(destination, completeBoundaryScript3b);\n      boundary = writeChunkAndReturn(destination, completeBoundaryScriptEnd);\n      return writeBootstrap(destination, request) && boundary;\n    }\n    function flushPartiallyCompletedSegment(\n      request,\n      destination,\n      boundary,\n      segment\n    ) {\n      if (segment.status === FLUSHED) return !0;\n      var hoistableState = boundary.contentState,\n        segmentID = segment.id;\n      if (-1 === segmentID) {\n        if (-1 === (segment.id = boundary.rootSegmentID))\n          throw Error(\n            \"A root segment ID must have been assigned by now. This is a bug in React.\"\n          );\n        return flushSegmentContainer(\n          request,\n          destination,\n          segment,\n          hoistableState\n        );\n      }\n      if (segmentID === boundary.rootSegmentID)\n        return flushSegmentContainer(\n          request,\n          destination,\n          segment,\n          hoistableState\n        );\n      flushSegmentContainer(request, destination, segment, hoistableState);\n      boundary = request.resumableState;\n      request = request.renderState;\n      writeChunk(destination, request.startInlineScript);\n      writeChunk(destination, endOfStartTag);\n      (boundary.instructions & SentCompleteSegmentFunction) === NothingSent\n        ? ((boundary.instructions |= SentCompleteSegmentFunction),\n          writeChunk(destination, completeSegmentScript1Full))\n        : writeChunk(destination, completeSegmentScript1Partial);\n      writeChunk(destination, request.segmentPrefix);\n      segmentID = segmentID.toString(16);\n      writeChunk(destination, segmentID);\n      writeChunk(destination, completeSegmentScript2);\n      writeChunk(destination, request.placeholderPrefix);\n      writeChunk(destination, segmentID);\n      destination = writeChunkAndReturn(destination, completeSegmentScriptEnd);\n      return destination;\n    }\n    function flushCompletedQueues(request, destination) {\n      currentView = new Uint8Array(4096);\n      writtenBytes = 0;\n      destinationHasCapacity$1 = !0;\n      try {\n        if (!(0 < request.pendingRootTasks)) {\n          var i,\n            completedRootSegment = request.completedRootSegment;\n          if (null !== completedRootSegment) {\n            if (completedRootSegment.status === POSTPONED) return;\n            var completedPreambleSegments = request.completedPreambleSegments;\n            if (null === completedPreambleSegments) return;\n            flushedByteSize = request.byteSize;\n            var resumableState = request.resumableState,\n              renderState = request.renderState,\n              preamble = renderState.preamble,\n              htmlChunks = preamble.htmlChunks,\n              headChunks = preamble.headChunks,\n              i$jscomp$0;\n            if (htmlChunks) {\n              for (i$jscomp$0 = 0; i$jscomp$0 < htmlChunks.length; i$jscomp$0++)\n                writeChunk(destination, htmlChunks[i$jscomp$0]);\n              if (headChunks)\n                for (\n                  i$jscomp$0 = 0;\n                  i$jscomp$0 < headChunks.length;\n                  i$jscomp$0++\n                )\n                  writeChunk(destination, headChunks[i$jscomp$0]);\n              else\n                writeChunk(destination, startChunkForTag(\"head\")),\n                  writeChunk(destination, endOfStartTag);\n            } else if (headChunks)\n              for (i$jscomp$0 = 0; i$jscomp$0 < headChunks.length; i$jscomp$0++)\n                writeChunk(destination, headChunks[i$jscomp$0]);\n            var charsetChunks = renderState.charsetChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < charsetChunks.length;\n              i$jscomp$0++\n            )\n              writeChunk(destination, charsetChunks[i$jscomp$0]);\n            charsetChunks.length = 0;\n            renderState.preconnects.forEach(flushResource, destination);\n            renderState.preconnects.clear();\n            var viewportChunks = renderState.viewportChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < viewportChunks.length;\n              i$jscomp$0++\n            )\n              writeChunk(destination, viewportChunks[i$jscomp$0]);\n            viewportChunks.length = 0;\n            renderState.fontPreloads.forEach(flushResource, destination);\n            renderState.fontPreloads.clear();\n            renderState.highImagePreloads.forEach(flushResource, destination);\n            renderState.highImagePreloads.clear();\n            currentlyFlushingRenderState = renderState;\n            renderState.styles.forEach(flushStylesInPreamble, destination);\n            currentlyFlushingRenderState = null;\n            var importMapChunks = renderState.importMapChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < importMapChunks.length;\n              i$jscomp$0++\n            )\n              writeChunk(destination, importMapChunks[i$jscomp$0]);\n            importMapChunks.length = 0;\n            renderState.bootstrapScripts.forEach(flushResource, destination);\n            renderState.scripts.forEach(flushResource, destination);\n            renderState.scripts.clear();\n            renderState.bulkPreloads.forEach(flushResource, destination);\n            renderState.bulkPreloads.clear();\n            htmlChunks ||\n              headChunks ||\n              (resumableState.instructions |= SentCompletedShellId);\n            var hoistableChunks = renderState.hoistableChunks;\n            for (\n              i$jscomp$0 = 0;\n              i$jscomp$0 < hoistableChunks.length;\n              i$jscomp$0++\n            )\n              writeChunk(destination, hoistableChunks[i$jscomp$0]);\n            for (\n              resumableState = hoistableChunks.length = 0;\n              resumableState < completedPreambleSegments.length;\n              resumableState++\n            ) {\n              var segments = completedPreambleSegments[resumableState];\n              for (\n                renderState = 0;\n                renderState < segments.length;\n                renderState++\n              )\n                flushSegment(request, destination, segments[renderState], null);\n            }\n            var preamble$jscomp$0 = request.renderState.preamble,\n              headChunks$jscomp$0 = preamble$jscomp$0.headChunks;\n            (preamble$jscomp$0.htmlChunks || headChunks$jscomp$0) &&\n              writeChunk(destination, endChunkForTag(\"head\"));\n            var bodyChunks = preamble$jscomp$0.bodyChunks;\n            if (bodyChunks)\n              for (\n                completedPreambleSegments = 0;\n                completedPreambleSegments < bodyChunks.length;\n                completedPreambleSegments++\n              )\n                writeChunk(destination, bodyChunks[completedPreambleSegments]);\n            flushingShell = !0;\n            flushSegment(request, destination, completedRootSegment, null);\n            flushingShell = !1;\n            request.completedRootSegment = null;\n            var renderState$jscomp$0 = request.renderState;\n            if (\n              0 !== request.allPendingTasks ||\n              0 !== request.clientRenderedBoundaries.length ||\n              0 !== request.completedBoundaries.length ||\n              (null !== request.trackedPostpones &&\n                (0 !== request.trackedPostpones.rootNodes.length ||\n                  null !== request.trackedPostpones.rootSlots))\n            ) {\n              var resumableState$jscomp$0 = request.resumableState;\n              if (\n                (resumableState$jscomp$0.instructions & SentMarkShellTime) ===\n                NothingSent\n              ) {\n                resumableState$jscomp$0.instructions |= SentMarkShellTime;\n                writeChunk(destination, renderState$jscomp$0.startInlineScript);\n                if (\n                  (resumableState$jscomp$0.instructions &\n                    SentCompletedShellId) ===\n                  NothingSent\n                ) {\n                  resumableState$jscomp$0.instructions |= SentCompletedShellId;\n                  var shellId = \"_\" + resumableState$jscomp$0.idPrefix + \"R_\";\n                  writeChunk(destination, completedShellIdAttributeStart);\n                  writeChunk(destination, escapeTextForBrowser(shellId));\n                  writeChunk(destination, attributeEnd);\n                }\n                writeChunk(destination, endOfStartTag);\n                writeChunk(destination, shellTimeRuntimeScript);\n                writeChunkAndReturn(destination, endInlineScript);\n              }\n            }\n            writeBootstrap(destination, renderState$jscomp$0);\n          }\n          var renderState$jscomp$1 = request.renderState;\n          completedRootSegment = 0;\n          var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;\n          for (\n            completedRootSegment = 0;\n            completedRootSegment < viewportChunks$jscomp$0.length;\n            completedRootSegment++\n          )\n            writeChunk(\n              destination,\n              viewportChunks$jscomp$0[completedRootSegment]\n            );\n          viewportChunks$jscomp$0.length = 0;\n          renderState$jscomp$1.preconnects.forEach(flushResource, destination);\n          renderState$jscomp$1.preconnects.clear();\n          renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);\n          renderState$jscomp$1.fontPreloads.clear();\n          renderState$jscomp$1.highImagePreloads.forEach(\n            flushResource,\n            destination\n          );\n          renderState$jscomp$1.highImagePreloads.clear();\n          renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);\n          renderState$jscomp$1.scripts.forEach(flushResource, destination);\n          renderState$jscomp$1.scripts.clear();\n          renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);\n          renderState$jscomp$1.bulkPreloads.clear();\n          var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;\n          for (\n            completedRootSegment = 0;\n            completedRootSegment < hoistableChunks$jscomp$0.length;\n            completedRootSegment++\n          )\n            writeChunk(\n              destination,\n              hoistableChunks$jscomp$0[completedRootSegment]\n            );\n          hoistableChunks$jscomp$0.length = 0;\n          var clientRenderedBoundaries = request.clientRenderedBoundaries;\n          for (i = 0; i < clientRenderedBoundaries.length; i++) {\n            var boundary = clientRenderedBoundaries[i];\n            renderState$jscomp$1 = destination;\n            var resumableState$jscomp$1 = request.resumableState,\n              renderState$jscomp$2 = request.renderState,\n              id = boundary.rootSegmentID,\n              errorDigest = boundary.errorDigest,\n              errorMessage = boundary.errorMessage,\n              errorStack = boundary.errorStack,\n              errorComponentStack = boundary.errorComponentStack;\n            writeChunk(\n              renderState$jscomp$1,\n              renderState$jscomp$2.startInlineScript\n            );\n            writeChunk(renderState$jscomp$1, endOfStartTag);\n            (resumableState$jscomp$1.instructions &\n              SentClientRenderFunction) ===\n            NothingSent\n              ? ((resumableState$jscomp$1.instructions |=\n                  SentClientRenderFunction),\n                writeChunk(renderState$jscomp$1, clientRenderScript1Full))\n              : writeChunk(renderState$jscomp$1, clientRenderScript1Partial);\n            writeChunk(\n              renderState$jscomp$1,\n              renderState$jscomp$2.boundaryPrefix\n            );\n            writeChunk(renderState$jscomp$1, id.toString(16));\n            writeChunk(renderState$jscomp$1, clientRenderScript1A);\n            if (\n              errorDigest ||\n              errorMessage ||\n              errorStack ||\n              errorComponentStack\n            )\n              writeChunk(\n                renderState$jscomp$1,\n                clientRenderErrorScriptArgInterstitial\n              ),\n                writeChunk(\n                  renderState$jscomp$1,\n                  escapeJSStringsForInstructionScripts(errorDigest || \"\")\n                );\n            if (errorMessage || errorStack || errorComponentStack)\n              writeChunk(\n                renderState$jscomp$1,\n                clientRenderErrorScriptArgInterstitial\n              ),\n                writeChunk(\n                  renderState$jscomp$1,\n                  escapeJSStringsForInstructionScripts(errorMessage || \"\")\n                );\n            if (errorStack || errorComponentStack)\n              writeChunk(\n                renderState$jscomp$1,\n                clientRenderErrorScriptArgInterstitial\n              ),\n                writeChunk(\n                  renderState$jscomp$1,\n                  escapeJSStringsForInstructionScripts(errorStack || \"\")\n                );\n            errorComponentStack &&\n              (writeChunk(\n                renderState$jscomp$1,\n                clientRenderErrorScriptArgInterstitial\n              ),\n              writeChunk(\n                renderState$jscomp$1,\n                escapeJSStringsForInstructionScripts(errorComponentStack)\n              ));\n            var JSCompiler_inline_result = writeChunkAndReturn(\n              renderState$jscomp$1,\n              clientRenderScriptEnd\n            );\n            if (!JSCompiler_inline_result) {\n              request.destination = null;\n              i++;\n              clientRenderedBoundaries.splice(0, i);\n              return;\n            }\n          }\n          clientRenderedBoundaries.splice(0, i);\n          var completedBoundaries = request.completedBoundaries;\n          for (i = 0; i < completedBoundaries.length; i++)\n            if (\n              !flushCompletedBoundary(\n                request,\n                destination,\n                completedBoundaries[i]\n              )\n            ) {\n              request.destination = null;\n              i++;\n              completedBoundaries.splice(0, i);\n              return;\n            }\n          completedBoundaries.splice(0, i);\n          completeWriting(destination);\n          currentView = new Uint8Array(4096);\n          writtenBytes = 0;\n          flushingPartialBoundaries = destinationHasCapacity$1 = !0;\n          var partialBoundaries = request.partialBoundaries;\n          for (i = 0; i < partialBoundaries.length; i++) {\n            a: {\n              clientRenderedBoundaries = request;\n              boundary = destination;\n              var boundary$jscomp$0 = partialBoundaries[i];\n              flushedByteSize = boundary$jscomp$0.byteSize;\n              var completedSegments = boundary$jscomp$0.completedSegments;\n              for (\n                JSCompiler_inline_result = 0;\n                JSCompiler_inline_result < completedSegments.length;\n                JSCompiler_inline_result++\n              )\n                if (\n                  !flushPartiallyCompletedSegment(\n                    clientRenderedBoundaries,\n                    boundary,\n                    boundary$jscomp$0,\n                    completedSegments[JSCompiler_inline_result]\n                  )\n                ) {\n                  JSCompiler_inline_result++;\n                  completedSegments.splice(0, JSCompiler_inline_result);\n                  var JSCompiler_inline_result$jscomp$0 = !1;\n                  break a;\n                }\n              completedSegments.splice(0, JSCompiler_inline_result);\n              var row = boundary$jscomp$0.row;\n              null !== row &&\n                row.together &&\n                1 === boundary$jscomp$0.pendingTasks &&\n                (1 === row.pendingTasks\n                  ? unblockSuspenseListRow(\n                      clientRenderedBoundaries,\n                      row,\n                      row.hoistables\n                    )\n                  : row.pendingTasks--);\n              JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(\n                boundary,\n                boundary$jscomp$0.contentState,\n                clientRenderedBoundaries.renderState\n              );\n            }\n            if (!JSCompiler_inline_result$jscomp$0) {\n              request.destination = null;\n              i++;\n              partialBoundaries.splice(0, i);\n              return;\n            }\n          }\n          partialBoundaries.splice(0, i);\n          flushingPartialBoundaries = !1;\n          var largeBoundaries = request.completedBoundaries;\n          for (i = 0; i < largeBoundaries.length; i++)\n            if (\n              !flushCompletedBoundary(request, destination, largeBoundaries[i])\n            ) {\n              request.destination = null;\n              i++;\n              largeBoundaries.splice(0, i);\n              return;\n            }\n          largeBoundaries.splice(0, i);\n        }\n      } finally {\n        (flushingPartialBoundaries = !1),\n          0 === request.allPendingTasks &&\n          0 === request.clientRenderedBoundaries.length &&\n          0 === request.completedBoundaries.length\n            ? ((request.flushScheduled = !1),\n              (i = request.resumableState),\n              i.hasBody && writeChunk(destination, endChunkForTag(\"body\")),\n              i.hasHtml && writeChunk(destination, endChunkForTag(\"html\")),\n              completeWriting(destination),\n              flushBuffered(destination),\n              0 !== request.abortableTasks.size &&\n                console.error(\n                  \"There was still abortable task at the root when we closed. This is a bug in React.\"\n                ),\n              (request.status = CLOSED),\n              destination.end(),\n              (request.destination = null))\n            : (completeWriting(destination), flushBuffered(destination));\n      }\n    }\n    function startWork(request) {\n      request.flushScheduled = null !== request.destination;\n      scheduleMicrotask(function () {\n        return requestStorage.run(request, performWork, request);\n      });\n      setImmediate(function () {\n        10 === request.status && (request.status = 11);\n        null === request.trackedPostpones &&\n          requestStorage.run(\n            request,\n            enqueueEarlyPreloadsAfterInitialWork,\n            request\n          );\n      });\n    }\n    function enqueueEarlyPreloadsAfterInitialWork(request) {\n      safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);\n    }\n    function enqueueFlush(request) {\n      !1 === request.flushScheduled &&\n        0 === request.pingedTasks.length &&\n        null !== request.destination &&\n        ((request.flushScheduled = !0),\n        setImmediate(function () {\n          var destination = request.destination;\n          destination\n            ? flushCompletedQueues(request, destination)\n            : (request.flushScheduled = !1);\n        }));\n    }\n    function startFlowing(request, destination) {\n      if (13 === request.status)\n        (request.status = CLOSED), destination.destroy(request.fatalError);\n      else if (request.status !== CLOSED && null === request.destination) {\n        request.destination = destination;\n        try {\n          flushCompletedQueues(request, destination);\n        } catch (error) {\n          (destination = {}),\n            logRecoverableError(request, error, destination, null),\n            fatalError(request, error, destination, null);\n        }\n      }\n    }\n    function abort(request, reason) {\n      if (11 === request.status || 10 === request.status) request.status = 12;\n      try {\n        var abortableTasks = request.abortableTasks;\n        if (0 < abortableTasks.size) {\n          var error =\n            void 0 === reason\n              ? Error(\"The render was aborted by the server without a reason.\")\n              : \"object\" === typeof reason &&\n                  null !== reason &&\n                  \"function\" === typeof reason.then\n                ? Error(\"The render was aborted by the server with a promise.\")\n                : reason;\n          request.fatalError = error;\n          abortableTasks.forEach(function (task) {\n            var prevTaskInDEV = currentTaskInDEV,\n              prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack;\n            currentTaskInDEV = task;\n            ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;\n            try {\n              abortTask(task, request, error);\n            } finally {\n              (currentTaskInDEV = prevTaskInDEV),\n                (ReactSharedInternals.getCurrentStack =\n                  prevGetCurrentStackImpl);\n            }\n          });\n          abortableTasks.clear();\n        }\n        null !== request.destination &&\n          flushCompletedQueues(request, request.destination);\n      } catch (error$4) {\n        (reason = {}),\n          logRecoverableError(request, error$4, reason, null),\n          fatalError(request, error$4, reason, null);\n      }\n    }\n    function addToReplayParent(node, parentKeyPath, trackedPostpones) {\n      if (null === parentKeyPath) trackedPostpones.rootNodes.push(node);\n      else {\n        var workingMap = trackedPostpones.workingMap,\n          parentNode = workingMap.get(parentKeyPath);\n        void 0 === parentNode &&\n          ((parentNode = [parentKeyPath[1], parentKeyPath[2], [], null]),\n          workingMap.set(parentKeyPath, parentNode),\n          addToReplayParent(parentNode, parentKeyPath[0], trackedPostpones));\n        parentNode[2].push(node);\n      }\n    }\n    function getPostponedState(request) {\n      var trackedPostpones = request.trackedPostpones;\n      if (\n        null === trackedPostpones ||\n        (0 === trackedPostpones.rootNodes.length &&\n          null === trackedPostpones.rootSlots)\n      )\n        return (request.trackedPostpones = null);\n      if (\n        null === request.completedRootSegment ||\n        (request.completedRootSegment.status !== POSTPONED &&\n          null !== request.completedPreambleSegments)\n      ) {\n        var nextSegmentId = request.nextSegmentId;\n        var replaySlots = trackedPostpones.rootSlots;\n        var resumableState = request.resumableState;\n        resumableState.bootstrapScriptContent = void 0;\n        resumableState.bootstrapScripts = void 0;\n        resumableState.bootstrapModules = void 0;\n      } else {\n        nextSegmentId = 0;\n        replaySlots = -1;\n        resumableState = request.resumableState;\n        var renderState = request.renderState;\n        resumableState.nextFormID = 0;\n        resumableState.hasBody = !1;\n        resumableState.hasHtml = !1;\n        resumableState.unknownResources = { font: renderState.resets.font };\n        resumableState.dnsResources = renderState.resets.dns;\n        resumableState.connectResources = renderState.resets.connect;\n        resumableState.imageResources = renderState.resets.image;\n        resumableState.styleResources = renderState.resets.style;\n        resumableState.scriptResources = {};\n        resumableState.moduleUnknownResources = {};\n        resumableState.moduleScriptResources = {};\n        resumableState.instructions = NothingSent;\n      }\n      return {\n        nextSegmentId: nextSegmentId,\n        rootFormatContext: request.rootFormatContext,\n        progressiveChunkSize: request.progressiveChunkSize,\n        resumableState: request.resumableState,\n        replayNodes: trackedPostpones.rootNodes,\n        replaySlots: replaySlots\n      };\n    }\n    function ensureCorrectIsomorphicReactVersion() {\n      var isomorphicReactPackageVersion = React.version;\n      if (\"19.3.0-canary-3f0b9e61-20260317\" !== isomorphicReactPackageVersion)\n        throw Error(\n          'Incompatible React versions: The \"react\" and \"react-dom\" packages must have the exact same version. Instead got:\\n  - react:      ' +\n            (isomorphicReactPackageVersion +\n              \"\\n  - react-dom:  19.3.0-canary-3f0b9e61-20260317\\nLearn more: https://react.dev/warnings/version-mismatch\")\n        );\n    }\n    function createDrainHandler(destination, request) {\n      return function () {\n        return startFlowing(request, destination);\n      };\n    }\n    function createCancelHandler(request, reason) {\n      return function () {\n        request.destination = null;\n        abort(request, Error(reason));\n      };\n    }\n    function createRequestImpl(children, options) {\n      var resumableState = createResumableState(\n        options ? options.identifierPrefix : void 0,\n        options ? options.unstable_externalRuntimeSrc : void 0,\n        options ? options.bootstrapScriptContent : void 0,\n        options ? options.bootstrapScripts : void 0,\n        options ? options.bootstrapModules : void 0\n      );\n      return createRequest(\n        children,\n        resumableState,\n        createRenderState(\n          resumableState,\n          options ? options.nonce : void 0,\n          options ? options.unstable_externalRuntimeSrc : void 0,\n          options ? options.importMap : void 0,\n          options ? options.onHeaders : void 0,\n          options ? options.maxHeadersLength : void 0\n        ),\n        createRootFormatContext(options ? options.namespaceURI : void 0),\n        options ? options.progressiveChunkSize : void 0,\n        options ? options.onError : void 0,\n        options ? options.onAllReady : void 0,\n        options ? options.onShellReady : void 0,\n        options ? options.onShellError : void 0,\n        void 0,\n        options ? options.formState : void 0\n      );\n    }\n    function createFakeWritableFromReadableStreamController$1(controller) {\n      return {\n        write: function (chunk) {\n          \"string\" === typeof chunk && (chunk = textEncoder.encode(chunk));\n          controller.enqueue(chunk);\n          return !0;\n        },\n        end: function () {\n          controller.close();\n        },\n        destroy: function (error) {\n          \"function\" === typeof controller.error\n            ? controller.error(error)\n            : controller.close();\n        }\n      };\n    }\n    function resumeRequestImpl(children, postponedState, options) {\n      return resumeRequest(\n        children,\n        postponedState,\n        createRenderState(\n          postponedState.resumableState,\n          options ? options.nonce : void 0,\n          void 0,\n          void 0,\n          void 0,\n          void 0\n        ),\n        options ? options.onError : void 0,\n        options ? options.onAllReady : void 0,\n        options ? options.onShellReady : void 0,\n        options ? options.onShellError : void 0,\n        void 0\n      );\n    }\n    function createFakeWritableFromReadableStreamController(controller) {\n      return {\n        write: function (chunk) {\n          \"string\" === typeof chunk && (chunk = textEncoder.encode(chunk));\n          controller.enqueue(chunk);\n          return !0;\n        },\n        end: function () {\n          controller.close();\n        },\n        destroy: function (error) {\n          \"function\" === typeof controller.error\n            ? controller.error(error)\n            : controller.close();\n        }\n      };\n    }\n    function createFakeWritableFromReadable(readable) {\n      return {\n        write: function (chunk) {\n          return readable.push(chunk);\n        },\n        end: function () {\n          readable.push(null);\n        },\n        destroy: function (error) {\n          readable.destroy(error);\n        }\n      };\n    }\n    var util = require(\"util\"),\n      crypto = require(\"crypto\"),\n      async_hooks = require(\"async_hooks\"),\n      React = require(\"next/dist/compiled/react\"),\n      ReactDOM = require(\"next/dist/compiled/react-dom\"),\n      stream = require(\"stream\"),\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_SCOPE_TYPE = Symbol.for(\"react.scope\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_LEGACY_HIDDEN_TYPE = Symbol.for(\"react.legacy_hidden\"),\n      REACT_MEMO_CACHE_SENTINEL = Symbol.for(\"react.memo_cache_sentinel\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n      ASYNC_ITERATOR = Symbol.asyncIterator,\n      REACT_OPTIMISTIC_KEY = Symbol.for(\"react.optimistic_key\"),\n      isArrayImpl = Array.isArray,\n      jsxPropsParents = new WeakMap(),\n      jsxChildrenParents = new WeakMap(),\n      CLIENT_REFERENCE_TAG = Symbol.for(\"react.client.reference\"),\n      scheduleMicrotask = queueMicrotask,\n      currentView = null,\n      writtenBytes = 0,\n      destinationHasCapacity$1 = !0,\n      textEncoder = new util.TextEncoder(),\n      assign = Object.assign,\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      VALID_ATTRIBUTE_NAME_REGEX = RegExp(\n        \"^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      illegalAttributeNameCache = {},\n      validatedAttributeNameCache = {},\n      unitlessNumbers = new Set(\n        \"animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp\".split(\n          \" \"\n        )\n      ),\n      aliases = new Map([\n        [\"acceptCharset\", \"accept-charset\"],\n        [\"htmlFor\", \"for\"],\n        [\"httpEquiv\", \"http-equiv\"],\n        [\"crossOrigin\", \"crossorigin\"],\n        [\"accentHeight\", \"accent-height\"],\n        [\"alignmentBaseline\", \"alignment-baseline\"],\n        [\"arabicForm\", \"arabic-form\"],\n        [\"baselineShift\", \"baseline-shift\"],\n        [\"capHeight\", \"cap-height\"],\n        [\"clipPath\", \"clip-path\"],\n        [\"clipRule\", \"clip-rule\"],\n        [\"colorInterpolation\", \"color-interpolation\"],\n        [\"colorInterpolationFilters\", \"color-interpolation-filters\"],\n        [\"colorProfile\", \"color-profile\"],\n        [\"colorRendering\", \"color-rendering\"],\n        [\"dominantBaseline\", \"dominant-baseline\"],\n        [\"enableBackground\", \"enable-background\"],\n        [\"fillOpacity\", \"fill-opacity\"],\n        [\"fillRule\", \"fill-rule\"],\n        [\"floodColor\", \"flood-color\"],\n        [\"floodOpacity\", \"flood-opacity\"],\n        [\"fontFamily\", \"font-family\"],\n        [\"fontSize\", \"font-size\"],\n        [\"fontSizeAdjust\", \"font-size-adjust\"],\n        [\"fontStretch\", \"font-stretch\"],\n        [\"fontStyle\", \"font-style\"],\n        [\"fontVariant\", \"font-variant\"],\n        [\"fontWeight\", \"font-weight\"],\n        [\"glyphName\", \"glyph-name\"],\n        [\"glyphOrientationHorizontal\", \"glyph-orientation-horizontal\"],\n        [\"glyphOrientationVertical\", \"glyph-orientation-vertical\"],\n        [\"horizAdvX\", \"horiz-adv-x\"],\n        [\"horizOriginX\", \"horiz-origin-x\"],\n        [\"imageRendering\", \"image-rendering\"],\n        [\"letterSpacing\", \"letter-spacing\"],\n        [\"lightingColor\", \"lighting-color\"],\n        [\"markerEnd\", \"marker-end\"],\n        [\"markerMid\", \"marker-mid\"],\n        [\"markerStart\", \"marker-start\"],\n        [\"maskType\", \"mask-type\"],\n        [\"overlinePosition\", \"overline-position\"],\n        [\"overlineThickness\", \"overline-thickness\"],\n        [\"paintOrder\", \"paint-order\"],\n        [\"panose-1\", \"panose-1\"],\n        [\"pointerEvents\", \"pointer-events\"],\n        [\"renderingIntent\", \"rendering-intent\"],\n        [\"shapeRendering\", \"shape-rendering\"],\n        [\"stopColor\", \"stop-color\"],\n        [\"stopOpacity\", \"stop-opacity\"],\n        [\"strikethroughPosition\", \"strikethrough-position\"],\n        [\"strikethroughThickness\", \"strikethrough-thickness\"],\n        [\"strokeDasharray\", \"stroke-dasharray\"],\n        [\"strokeDashoffset\", \"stroke-dashoffset\"],\n        [\"strokeLinecap\", \"stroke-linecap\"],\n        [\"strokeLinejoin\", \"stroke-linejoin\"],\n        [\"strokeMiterlimit\", \"stroke-miterlimit\"],\n        [\"strokeOpacity\", \"stroke-opacity\"],\n        [\"strokeWidth\", \"stroke-width\"],\n        [\"textAnchor\", \"text-anchor\"],\n        [\"textDecoration\", \"text-decoration\"],\n        [\"textRendering\", \"text-rendering\"],\n        [\"transformOrigin\", \"transform-origin\"],\n        [\"underlinePosition\", \"underline-position\"],\n        [\"underlineThickness\", \"underline-thickness\"],\n        [\"unicodeBidi\", \"unicode-bidi\"],\n        [\"unicodeRange\", \"unicode-range\"],\n        [\"unitsPerEm\", \"units-per-em\"],\n        [\"vAlphabetic\", \"v-alphabetic\"],\n        [\"vHanging\", \"v-hanging\"],\n        [\"vIdeographic\", \"v-ideographic\"],\n        [\"vMathematical\", \"v-mathematical\"],\n        [\"vectorEffect\", \"vector-effect\"],\n        [\"vertAdvY\", \"vert-adv-y\"],\n        [\"vertOriginX\", \"vert-origin-x\"],\n        [\"vertOriginY\", \"vert-origin-y\"],\n        [\"wordSpacing\", \"word-spacing\"],\n        [\"writingMode\", \"writing-mode\"],\n        [\"xmlnsXlink\", \"xmlns:xlink\"],\n        [\"xHeight\", \"x-height\"]\n      ]),\n      hasReadOnlyValue = {\n        button: !0,\n        checkbox: !0,\n        image: !0,\n        hidden: !0,\n        radio: !0,\n        reset: !0,\n        submit: !0\n      },\n      ariaProperties = {\n        \"aria-current\": 0,\n        \"aria-description\": 0,\n        \"aria-details\": 0,\n        \"aria-disabled\": 0,\n        \"aria-hidden\": 0,\n        \"aria-invalid\": 0,\n        \"aria-keyshortcuts\": 0,\n        \"aria-label\": 0,\n        \"aria-roledescription\": 0,\n        \"aria-autocomplete\": 0,\n        \"aria-checked\": 0,\n        \"aria-expanded\": 0,\n        \"aria-haspopup\": 0,\n        \"aria-level\": 0,\n        \"aria-modal\": 0,\n        \"aria-multiline\": 0,\n        \"aria-multiselectable\": 0,\n        \"aria-orientation\": 0,\n        \"aria-placeholder\": 0,\n        \"aria-pressed\": 0,\n        \"aria-readonly\": 0,\n        \"aria-required\": 0,\n        \"aria-selected\": 0,\n        \"aria-sort\": 0,\n        \"aria-valuemax\": 0,\n        \"aria-valuemin\": 0,\n        \"aria-valuenow\": 0,\n        \"aria-valuetext\": 0,\n        \"aria-atomic\": 0,\n        \"aria-busy\": 0,\n        \"aria-live\": 0,\n        \"aria-relevant\": 0,\n        \"aria-dropeffect\": 0,\n        \"aria-grabbed\": 0,\n        \"aria-activedescendant\": 0,\n        \"aria-colcount\": 0,\n        \"aria-colindex\": 0,\n        \"aria-colspan\": 0,\n        \"aria-controls\": 0,\n        \"aria-describedby\": 0,\n        \"aria-errormessage\": 0,\n        \"aria-flowto\": 0,\n        \"aria-labelledby\": 0,\n        \"aria-owns\": 0,\n        \"aria-posinset\": 0,\n        \"aria-rowcount\": 0,\n        \"aria-rowindex\": 0,\n        \"aria-rowspan\": 0,\n        \"aria-setsize\": 0,\n        \"aria-braillelabel\": 0,\n        \"aria-brailleroledescription\": 0,\n        \"aria-colindextext\": 0,\n        \"aria-rowindextext\": 0\n      },\n      warnedProperties$1 = {},\n      rARIA$1 = RegExp(\n        \"^(aria)-[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      rARIACamel$1 = RegExp(\n        \"^(aria)[A-Z][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      didWarnValueNull = !1,\n      possibleStandardNames = {\n        accept: \"accept\",\n        acceptcharset: \"acceptCharset\",\n        \"accept-charset\": \"acceptCharset\",\n        accesskey: \"accessKey\",\n        action: \"action\",\n        allowfullscreen: \"allowFullScreen\",\n        alt: \"alt\",\n        as: \"as\",\n        async: \"async\",\n        autocapitalize: \"autoCapitalize\",\n        autocomplete: \"autoComplete\",\n        autocorrect: \"autoCorrect\",\n        autofocus: \"autoFocus\",\n        autoplay: \"autoPlay\",\n        autosave: \"autoSave\",\n        capture: \"capture\",\n        cellpadding: \"cellPadding\",\n        cellspacing: \"cellSpacing\",\n        challenge: \"challenge\",\n        charset: \"charSet\",\n        checked: \"checked\",\n        children: \"children\",\n        cite: \"cite\",\n        class: \"className\",\n        classid: \"classID\",\n        classname: \"className\",\n        cols: \"cols\",\n        colspan: \"colSpan\",\n        content: \"content\",\n        contenteditable: \"contentEditable\",\n        contextmenu: \"contextMenu\",\n        controls: \"controls\",\n        controlslist: \"controlsList\",\n        coords: \"coords\",\n        crossorigin: \"crossOrigin\",\n        dangerouslysetinnerhtml: \"dangerouslySetInnerHTML\",\n        data: \"data\",\n        datetime: \"dateTime\",\n        default: \"default\",\n        defaultchecked: \"defaultChecked\",\n        defaultvalue: \"defaultValue\",\n        defer: \"defer\",\n        dir: \"dir\",\n        disabled: \"disabled\",\n        disablepictureinpicture: \"disablePictureInPicture\",\n        disableremoteplayback: \"disableRemotePlayback\",\n        download: \"download\",\n        draggable: \"draggable\",\n        enctype: \"encType\",\n        enterkeyhint: \"enterKeyHint\",\n        fetchpriority: \"fetchPriority\",\n        for: \"htmlFor\",\n        form: \"form\",\n        formmethod: \"formMethod\",\n        formaction: \"formAction\",\n        formenctype: \"formEncType\",\n        formnovalidate: \"formNoValidate\",\n        formtarget: \"formTarget\",\n        frameborder: \"frameBorder\",\n        headers: \"headers\",\n        height: \"height\",\n        hidden: \"hidden\",\n        high: \"high\",\n        href: \"href\",\n        hreflang: \"hrefLang\",\n        htmlfor: \"htmlFor\",\n        httpequiv: \"httpEquiv\",\n        \"http-equiv\": \"httpEquiv\",\n        icon: \"icon\",\n        id: \"id\",\n        imagesizes: \"imageSizes\",\n        imagesrcset: \"imageSrcSet\",\n        inert: \"inert\",\n        innerhtml: \"innerHTML\",\n        inputmode: \"inputMode\",\n        integrity: \"integrity\",\n        is: \"is\",\n        itemid: \"itemID\",\n        itemprop: \"itemProp\",\n        itemref: \"itemRef\",\n        itemscope: \"itemScope\",\n        itemtype: \"itemType\",\n        keyparams: \"keyParams\",\n        keytype: \"keyType\",\n        kind: \"kind\",\n        label: \"label\",\n        lang: \"lang\",\n        list: \"list\",\n        loop: \"loop\",\n        low: \"low\",\n        manifest: \"manifest\",\n        marginwidth: \"marginWidth\",\n        marginheight: \"marginHeight\",\n        max: \"max\",\n        maxlength: \"maxLength\",\n        media: \"media\",\n        mediagroup: \"mediaGroup\",\n        method: \"method\",\n        min: \"min\",\n        minlength: \"minLength\",\n        multiple: \"multiple\",\n        muted: \"muted\",\n        name: \"name\",\n        nomodule: \"noModule\",\n        nonce: \"nonce\",\n        novalidate: \"noValidate\",\n        open: \"open\",\n        optimum: \"optimum\",\n        pattern: \"pattern\",\n        placeholder: \"placeholder\",\n        playsinline: \"playsInline\",\n        poster: \"poster\",\n        preload: \"preload\",\n        profile: \"profile\",\n        radiogroup: \"radioGroup\",\n        readonly: \"readOnly\",\n        referrerpolicy: \"referrerPolicy\",\n        rel: \"rel\",\n        required: \"required\",\n        reversed: \"reversed\",\n        role: \"role\",\n        rows: \"rows\",\n        rowspan: \"rowSpan\",\n        sandbox: \"sandbox\",\n        scope: \"scope\",\n        scoped: \"scoped\",\n        scrolling: \"scrolling\",\n        seamless: \"seamless\",\n        selected: \"selected\",\n        shape: \"shape\",\n        size: \"size\",\n        sizes: \"sizes\",\n        span: \"span\",\n        spellcheck: \"spellCheck\",\n        src: \"src\",\n        srcdoc: \"srcDoc\",\n        srclang: \"srcLang\",\n        srcset: \"srcSet\",\n        start: \"start\",\n        step: \"step\",\n        style: \"style\",\n        summary: \"summary\",\n        tabindex: \"tabIndex\",\n        target: \"target\",\n        title: \"title\",\n        type: \"type\",\n        usemap: \"useMap\",\n        value: \"value\",\n        width: \"width\",\n        wmode: \"wmode\",\n        wrap: \"wrap\",\n        about: \"about\",\n        accentheight: \"accentHeight\",\n        \"accent-height\": \"accentHeight\",\n        accumulate: \"accumulate\",\n        additive: \"additive\",\n        alignmentbaseline: \"alignmentBaseline\",\n        \"alignment-baseline\": \"alignmentBaseline\",\n        allowreorder: \"allowReorder\",\n        alphabetic: \"alphabetic\",\n        amplitude: \"amplitude\",\n        arabicform: \"arabicForm\",\n        \"arabic-form\": \"arabicForm\",\n        ascent: \"ascent\",\n        attributename: \"attributeName\",\n        attributetype: \"attributeType\",\n        autoreverse: \"autoReverse\",\n        azimuth: \"azimuth\",\n        basefrequency: \"baseFrequency\",\n        baselineshift: \"baselineShift\",\n        \"baseline-shift\": \"baselineShift\",\n        baseprofile: \"baseProfile\",\n        bbox: \"bbox\",\n        begin: \"begin\",\n        bias: \"bias\",\n        by: \"by\",\n        calcmode: \"calcMode\",\n        capheight: \"capHeight\",\n        \"cap-height\": \"capHeight\",\n        clip: \"clip\",\n        clippath: \"clipPath\",\n        \"clip-path\": \"clipPath\",\n        clippathunits: \"clipPathUnits\",\n        cliprule: \"clipRule\",\n        \"clip-rule\": \"clipRule\",\n        color: \"color\",\n        colorinterpolation: \"colorInterpolation\",\n        \"color-interpolation\": \"colorInterpolation\",\n        colorinterpolationfilters: \"colorInterpolationFilters\",\n        \"color-interpolation-filters\": \"colorInterpolationFilters\",\n        colorprofile: \"colorProfile\",\n        \"color-profile\": \"colorProfile\",\n        colorrendering: \"colorRendering\",\n        \"color-rendering\": \"colorRendering\",\n        contentscripttype: \"contentScriptType\",\n        contentstyletype: \"contentStyleType\",\n        cursor: \"cursor\",\n        cx: \"cx\",\n        cy: \"cy\",\n        d: \"d\",\n        datatype: \"datatype\",\n        decelerate: \"decelerate\",\n        descent: \"descent\",\n        diffuseconstant: \"diffuseConstant\",\n        direction: \"direction\",\n        display: \"display\",\n        divisor: \"divisor\",\n        dominantbaseline: \"dominantBaseline\",\n        \"dominant-baseline\": \"dominantBaseline\",\n        dur: \"dur\",\n        dx: \"dx\",\n        dy: \"dy\",\n        edgemode: \"edgeMode\",\n        elevation: \"elevation\",\n        enablebackground: \"enableBackground\",\n        \"enable-background\": \"enableBackground\",\n        end: \"end\",\n        exponent: \"exponent\",\n        externalresourcesrequired: \"externalResourcesRequired\",\n        fill: \"fill\",\n        fillopacity: \"fillOpacity\",\n        \"fill-opacity\": \"fillOpacity\",\n        fillrule: \"fillRule\",\n        \"fill-rule\": \"fillRule\",\n        filter: \"filter\",\n        filterres: \"filterRes\",\n        filterunits: \"filterUnits\",\n        floodopacity: \"floodOpacity\",\n        \"flood-opacity\": \"floodOpacity\",\n        floodcolor: \"floodColor\",\n        \"flood-color\": \"floodColor\",\n        focusable: \"focusable\",\n        fontfamily: \"fontFamily\",\n        \"font-family\": \"fontFamily\",\n        fontsize: \"fontSize\",\n        \"font-size\": \"fontSize\",\n        fontsizeadjust: \"fontSizeAdjust\",\n        \"font-size-adjust\": \"fontSizeAdjust\",\n        fontstretch: \"fontStretch\",\n        \"font-stretch\": \"fontStretch\",\n        fontstyle: \"fontStyle\",\n        \"font-style\": \"fontStyle\",\n        fontvariant: \"fontVariant\",\n        \"font-variant\": \"fontVariant\",\n        fontweight: \"fontWeight\",\n        \"font-weight\": \"fontWeight\",\n        format: \"format\",\n        from: \"from\",\n        fx: \"fx\",\n        fy: \"fy\",\n        g1: \"g1\",\n        g2: \"g2\",\n        glyphname: \"glyphName\",\n        \"glyph-name\": \"glyphName\",\n        glyphorientationhorizontal: \"glyphOrientationHorizontal\",\n        \"glyph-orientation-horizontal\": \"glyphOrientationHorizontal\",\n        glyphorientationvertical: \"glyphOrientationVertical\",\n        \"glyph-orientation-vertical\": \"glyphOrientationVertical\",\n        glyphref: \"glyphRef\",\n        gradienttransform: \"gradientTransform\",\n        gradientunits: \"gradientUnits\",\n        hanging: \"hanging\",\n        horizadvx: \"horizAdvX\",\n        \"horiz-adv-x\": \"horizAdvX\",\n        horizoriginx: \"horizOriginX\",\n        \"horiz-origin-x\": \"horizOriginX\",\n        ideographic: \"ideographic\",\n        imagerendering: \"imageRendering\",\n        \"image-rendering\": \"imageRendering\",\n        in2: \"in2\",\n        in: \"in\",\n        inlist: \"inlist\",\n        intercept: \"intercept\",\n        k1: \"k1\",\n        k2: \"k2\",\n        k3: \"k3\",\n        k4: \"k4\",\n        k: \"k\",\n        kernelmatrix: \"kernelMatrix\",\n        kernelunitlength: \"kernelUnitLength\",\n        kerning: \"kerning\",\n        keypoints: \"keyPoints\",\n        keysplines: \"keySplines\",\n        keytimes: \"keyTimes\",\n        lengthadjust: \"lengthAdjust\",\n        letterspacing: \"letterSpacing\",\n        \"letter-spacing\": \"letterSpacing\",\n        lightingcolor: \"lightingColor\",\n        \"lighting-color\": \"lightingColor\",\n        limitingconeangle: \"limitingConeAngle\",\n        local: \"local\",\n        markerend: \"markerEnd\",\n        \"marker-end\": \"markerEnd\",\n        markerheight: \"markerHeight\",\n        markermid: \"markerMid\",\n        \"marker-mid\": \"markerMid\",\n        markerstart: \"markerStart\",\n        \"marker-start\": \"markerStart\",\n        markerunits: \"markerUnits\",\n        markerwidth: \"markerWidth\",\n        mask: \"mask\",\n        maskcontentunits: \"maskContentUnits\",\n        masktype: \"maskType\",\n        maskunits: \"maskUnits\",\n        mathematical: \"mathematical\",\n        mode: \"mode\",\n        numoctaves: \"numOctaves\",\n        offset: \"offset\",\n        opacity: \"opacity\",\n        operator: \"operator\",\n        order: \"order\",\n        orient: \"orient\",\n        orientation: \"orientation\",\n        origin: \"origin\",\n        overflow: \"overflow\",\n        overlineposition: \"overlinePosition\",\n        \"overline-position\": \"overlinePosition\",\n        overlinethickness: \"overlineThickness\",\n        \"overline-thickness\": \"overlineThickness\",\n        paintorder: \"paintOrder\",\n        \"paint-order\": \"paintOrder\",\n        panose1: \"panose1\",\n        \"panose-1\": \"panose1\",\n        pathlength: \"pathLength\",\n        patterncontentunits: \"patternContentUnits\",\n        patterntransform: \"patternTransform\",\n        patternunits: \"patternUnits\",\n        pointerevents: \"pointerEvents\",\n        \"pointer-events\": \"pointerEvents\",\n        points: \"points\",\n        pointsatx: \"pointsAtX\",\n        pointsaty: \"pointsAtY\",\n        pointsatz: \"pointsAtZ\",\n        popover: \"popover\",\n        popovertarget: \"popoverTarget\",\n        popovertargetaction: \"popoverTargetAction\",\n        prefix: \"prefix\",\n        preservealpha: \"preserveAlpha\",\n        preserveaspectratio: \"preserveAspectRatio\",\n        primitiveunits: \"primitiveUnits\",\n        property: \"property\",\n        r: \"r\",\n        radius: \"radius\",\n        refx: \"refX\",\n        refy: \"refY\",\n        renderingintent: \"renderingIntent\",\n        \"rendering-intent\": \"renderingIntent\",\n        repeatcount: \"repeatCount\",\n        repeatdur: \"repeatDur\",\n        requiredextensions: \"requiredExtensions\",\n        requiredfeatures: \"requiredFeatures\",\n        resource: \"resource\",\n        restart: \"restart\",\n        result: \"result\",\n        results: \"results\",\n        rotate: \"rotate\",\n        rx: \"rx\",\n        ry: \"ry\",\n        scale: \"scale\",\n        security: \"security\",\n        seed: \"seed\",\n        shaperendering: \"shapeRendering\",\n        \"shape-rendering\": \"shapeRendering\",\n        slope: \"slope\",\n        spacing: \"spacing\",\n        specularconstant: \"specularConstant\",\n        specularexponent: \"specularExponent\",\n        speed: \"speed\",\n        spreadmethod: \"spreadMethod\",\n        startoffset: \"startOffset\",\n        stddeviation: \"stdDeviation\",\n        stemh: \"stemh\",\n        stemv: \"stemv\",\n        stitchtiles: \"stitchTiles\",\n        stopcolor: \"stopColor\",\n        \"stop-color\": \"stopColor\",\n        stopopacity: \"stopOpacity\",\n        \"stop-opacity\": \"stopOpacity\",\n        strikethroughposition: \"strikethroughPosition\",\n        \"strikethrough-position\": \"strikethroughPosition\",\n        strikethroughthickness: \"strikethroughThickness\",\n        \"strikethrough-thickness\": \"strikethroughThickness\",\n        string: \"string\",\n        stroke: \"stroke\",\n        strokedasharray: \"strokeDasharray\",\n        \"stroke-dasharray\": \"strokeDasharray\",\n        strokedashoffset: \"strokeDashoffset\",\n        \"stroke-dashoffset\": \"strokeDashoffset\",\n        strokelinecap: \"strokeLinecap\",\n        \"stroke-linecap\": \"strokeLinecap\",\n        strokelinejoin: \"strokeLinejoin\",\n        \"stroke-linejoin\": \"strokeLinejoin\",\n        strokemiterlimit: \"strokeMiterlimit\",\n        \"stroke-miterlimit\": \"strokeMiterlimit\",\n        strokewidth: \"strokeWidth\",\n        \"stroke-width\": \"strokeWidth\",\n        strokeopacity: \"strokeOpacity\",\n        \"stroke-opacity\": \"strokeOpacity\",\n        suppresscontenteditablewarning: \"suppressContentEditableWarning\",\n        suppresshydrationwarning: \"suppressHydrationWarning\",\n        surfacescale: \"surfaceScale\",\n        systemlanguage: \"systemLanguage\",\n        tablevalues: \"tableValues\",\n        targetx: \"targetX\",\n        targety: \"targetY\",\n        textanchor: \"textAnchor\",\n        \"text-anchor\": \"textAnchor\",\n        textdecoration: \"textDecoration\",\n        \"text-decoration\": \"textDecoration\",\n        textlength: \"textLength\",\n        textrendering: \"textRendering\",\n        \"text-rendering\": \"textRendering\",\n        to: \"to\",\n        transform: \"transform\",\n        transformorigin: \"transformOrigin\",\n        \"transform-origin\": \"transformOrigin\",\n        typeof: \"typeof\",\n        u1: \"u1\",\n        u2: \"u2\",\n        underlineposition: \"underlinePosition\",\n        \"underline-position\": \"underlinePosition\",\n        underlinethickness: \"underlineThickness\",\n        \"underline-thickness\": \"underlineThickness\",\n        unicode: \"unicode\",\n        unicodebidi: \"unicodeBidi\",\n        \"unicode-bidi\": \"unicodeBidi\",\n        unicoderange: \"unicodeRange\",\n        \"unicode-range\": \"unicodeRange\",\n        unitsperem: \"unitsPerEm\",\n        \"units-per-em\": \"unitsPerEm\",\n        unselectable: \"unselectable\",\n        valphabetic: \"vAlphabetic\",\n        \"v-alphabetic\": \"vAlphabetic\",\n        values: \"values\",\n        vectoreffect: \"vectorEffect\",\n        \"vector-effect\": \"vectorEffect\",\n        version: \"version\",\n        vertadvy: \"vertAdvY\",\n        \"vert-adv-y\": \"vertAdvY\",\n        vertoriginx: \"vertOriginX\",\n        \"vert-origin-x\": \"vertOriginX\",\n        vertoriginy: \"vertOriginY\",\n        \"vert-origin-y\": \"vertOriginY\",\n        vhanging: \"vHanging\",\n        \"v-hanging\": \"vHanging\",\n        videographic: \"vIdeographic\",\n        \"v-ideographic\": \"vIdeographic\",\n        viewbox: \"viewBox\",\n        viewtarget: \"viewTarget\",\n        visibility: \"visibility\",\n        vmathematical: \"vMathematical\",\n        \"v-mathematical\": \"vMathematical\",\n        vocab: \"vocab\",\n        widths: \"widths\",\n        wordspacing: \"wordSpacing\",\n        \"word-spacing\": \"wordSpacing\",\n        writingmode: \"writingMode\",\n        \"writing-mode\": \"writingMode\",\n        x1: \"x1\",\n        x2: \"x2\",\n        x: \"x\",\n        xchannelselector: \"xChannelSelector\",\n        xheight: \"xHeight\",\n        \"x-height\": \"xHeight\",\n        xlinkactuate: \"xlinkActuate\",\n        \"xlink:actuate\": \"xlinkActuate\",\n        xlinkarcrole: \"xlinkArcrole\",\n        \"xlink:arcrole\": \"xlinkArcrole\",\n        xlinkhref: \"xlinkHref\",\n        \"xlink:href\": \"xlinkHref\",\n        xlinkrole: \"xlinkRole\",\n        \"xlink:role\": \"xlinkRole\",\n        xlinkshow: \"xlinkShow\",\n        \"xlink:show\": \"xlinkShow\",\n        xlinktitle: \"xlinkTitle\",\n        \"xlink:title\": \"xlinkTitle\",\n        xlinktype: \"xlinkType\",\n        \"xlink:type\": \"xlinkType\",\n        xmlbase: \"xmlBase\",\n        \"xml:base\": \"xmlBase\",\n        xmllang: \"xmlLang\",\n        \"xml:lang\": \"xmlLang\",\n        xmlns: \"xmlns\",\n        \"xml:space\": \"xmlSpace\",\n        xmlnsxlink: \"xmlnsXlink\",\n        \"xmlns:xlink\": \"xmlnsXlink\",\n        xmlspace: \"xmlSpace\",\n        y1: \"y1\",\n        y2: \"y2\",\n        y: \"y\",\n        ychannelselector: \"yChannelSelector\",\n        z: \"z\",\n        zoomandpan: \"zoomAndPan\"\n      },\n      warnedProperties = {},\n      EVENT_NAME_REGEX = /^on./,\n      INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/,\n      rARIA = RegExp(\n        \"^(aria)-[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      rARIACamel = RegExp(\n        \"^(aria)[A-Z][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n      ),\n      badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/,\n      msPattern$1 = /^-ms-/,\n      hyphenPattern = /-(.)/g,\n      badStyleValueWithSemicolonPattern = /;\\s*$/,\n      warnedStyleNames = {},\n      warnedStyleValues = {},\n      warnedForNaNValue = !1,\n      warnedForInfinityValue = !1,\n      matchHtmlRegExp = /[\"'&<>]/,\n      uppercasePattern = /([A-Z])/g,\n      msPattern = /^ms-/,\n      isJavaScriptProtocol =\n        /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i,\n      ReactSharedInternals =\n        React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      ReactDOMSharedInternals =\n        ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      NotPending = Object.freeze({\n        pending: !1,\n        data: null,\n        method: null,\n        action: null\n      }),\n      previousDispatcher = ReactDOMSharedInternals.d;\n    ReactDOMSharedInternals.d = {\n      f: previousDispatcher.f,\n      r: previousDispatcher.r,\n      D: function (href) {\n        var request = resolveRequest();\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (\"string\" === typeof href && href) {\n            if (!resumableState.dnsResources.hasOwnProperty(href)) {\n              resumableState.dnsResources[href] = EXISTS;\n              resumableState = renderState.headers;\n              var header, JSCompiler_temp;\n              if (\n                (JSCompiler_temp =\n                  resumableState && 0 < resumableState.remainingCapacity)\n              )\n                JSCompiler_temp =\n                  ((header =\n                    \"<\" +\n                    escapeHrefForLinkHeaderURLContext(href) +\n                    \">; rel=dns-prefetch\"),\n                  0 <= (resumableState.remainingCapacity -= header.length + 2));\n              JSCompiler_temp\n                ? ((renderState.resets.dns[href] = EXISTS),\n                  resumableState.preconnects &&\n                    (resumableState.preconnects += \", \"),\n                  (resumableState.preconnects += header))\n                : ((header = []),\n                  pushLinkImpl(header, { href: href, rel: \"dns-prefetch\" }),\n                  renderState.preconnects.add(header));\n            }\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.D(href);\n      },\n      C: function (href, crossOrigin) {\n        var request = resolveRequest();\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (\"string\" === typeof href && href) {\n            var bucket =\n              \"use-credentials\" === crossOrigin\n                ? \"credentials\"\n                : \"string\" === typeof crossOrigin\n                  ? \"anonymous\"\n                  : \"default\";\n            if (!resumableState.connectResources[bucket].hasOwnProperty(href)) {\n              resumableState.connectResources[bucket][href] = EXISTS;\n              resumableState = renderState.headers;\n              var header, JSCompiler_temp;\n              if (\n                (JSCompiler_temp =\n                  resumableState && 0 < resumableState.remainingCapacity)\n              ) {\n                JSCompiler_temp =\n                  \"<\" +\n                  escapeHrefForLinkHeaderURLContext(href) +\n                  \">; rel=preconnect\";\n                if (\"string\" === typeof crossOrigin) {\n                  var escapedCrossOrigin =\n                    escapeStringForLinkHeaderQuotedParamValueContext(\n                      crossOrigin,\n                      \"crossOrigin\"\n                    );\n                  JSCompiler_temp +=\n                    '; crossorigin=\"' + escapedCrossOrigin + '\"';\n                }\n                JSCompiler_temp =\n                  ((header = JSCompiler_temp),\n                  0 <= (resumableState.remainingCapacity -= header.length + 2));\n              }\n              JSCompiler_temp\n                ? ((renderState.resets.connect[bucket][href] = EXISTS),\n                  resumableState.preconnects &&\n                    (resumableState.preconnects += \", \"),\n                  (resumableState.preconnects += header))\n                : ((bucket = []),\n                  pushLinkImpl(bucket, {\n                    rel: \"preconnect\",\n                    href: href,\n                    crossOrigin: crossOrigin\n                  }),\n                  renderState.preconnects.add(bucket));\n            }\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.C(href, crossOrigin);\n      },\n      L: function (href, as, options) {\n        var request = resolveRequest();\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (as && href) {\n            switch (as) {\n              case \"image\":\n                if (options) {\n                  var imageSrcSet = options.imageSrcSet;\n                  var imageSizes = options.imageSizes;\n                  var fetchPriority = options.fetchPriority;\n                }\n                var key = imageSrcSet\n                  ? imageSrcSet + \"\\n\" + (imageSizes || \"\")\n                  : href;\n                if (resumableState.imageResources.hasOwnProperty(key)) return;\n                resumableState.imageResources[key] = PRELOAD_NO_CREDS;\n                resumableState = renderState.headers;\n                var header;\n                resumableState &&\n                0 < resumableState.remainingCapacity &&\n                \"string\" !== typeof imageSrcSet &&\n                \"high\" === fetchPriority &&\n                ((header = getPreloadAsHeader(href, as, options)),\n                0 <= (resumableState.remainingCapacity -= header.length + 2))\n                  ? ((renderState.resets.image[key] = PRELOAD_NO_CREDS),\n                    resumableState.highImagePreloads &&\n                      (resumableState.highImagePreloads += \", \"),\n                    (resumableState.highImagePreloads += header))\n                  : ((resumableState = []),\n                    pushLinkImpl(\n                      resumableState,\n                      assign(\n                        {\n                          rel: \"preload\",\n                          href: imageSrcSet ? void 0 : href,\n                          as: as\n                        },\n                        options\n                      )\n                    ),\n                    \"high\" === fetchPriority\n                      ? renderState.highImagePreloads.add(resumableState)\n                      : (renderState.bulkPreloads.add(resumableState),\n                        renderState.preloads.images.set(key, resumableState)));\n                break;\n              case \"style\":\n                if (resumableState.styleResources.hasOwnProperty(href)) return;\n                imageSrcSet = [];\n                pushLinkImpl(\n                  imageSrcSet,\n                  assign({ rel: \"preload\", href: href, as: as }, options)\n                );\n                resumableState.styleResources[href] =\n                  !options ||\n                  (\"string\" !== typeof options.crossOrigin &&\n                    \"string\" !== typeof options.integrity)\n                    ? PRELOAD_NO_CREDS\n                    : [options.crossOrigin, options.integrity];\n                renderState.preloads.stylesheets.set(href, imageSrcSet);\n                renderState.bulkPreloads.add(imageSrcSet);\n                break;\n              case \"script\":\n                if (resumableState.scriptResources.hasOwnProperty(href)) return;\n                imageSrcSet = [];\n                renderState.preloads.scripts.set(href, imageSrcSet);\n                renderState.bulkPreloads.add(imageSrcSet);\n                pushLinkImpl(\n                  imageSrcSet,\n                  assign({ rel: \"preload\", href: href, as: as }, options)\n                );\n                resumableState.scriptResources[href] =\n                  !options ||\n                  (\"string\" !== typeof options.crossOrigin &&\n                    \"string\" !== typeof options.integrity)\n                    ? PRELOAD_NO_CREDS\n                    : [options.crossOrigin, options.integrity];\n                break;\n              default:\n                if (resumableState.unknownResources.hasOwnProperty(as)) {\n                  if (\n                    ((imageSrcSet = resumableState.unknownResources[as]),\n                    imageSrcSet.hasOwnProperty(href))\n                  )\n                    return;\n                } else\n                  (imageSrcSet = {}),\n                    (resumableState.unknownResources[as] = imageSrcSet);\n                imageSrcSet[href] = PRELOAD_NO_CREDS;\n                if (\n                  (resumableState = renderState.headers) &&\n                  0 < resumableState.remainingCapacity &&\n                  \"font\" === as &&\n                  ((key = getPreloadAsHeader(href, as, options)),\n                  0 <= (resumableState.remainingCapacity -= key.length + 2))\n                )\n                  (renderState.resets.font[href] = PRELOAD_NO_CREDS),\n                    resumableState.fontPreloads &&\n                      (resumableState.fontPreloads += \", \"),\n                    (resumableState.fontPreloads += key);\n                else\n                  switch (\n                    ((resumableState = []),\n                    (href = assign(\n                      { rel: \"preload\", href: href, as: as },\n                      options\n                    )),\n                    pushLinkImpl(resumableState, href),\n                    as)\n                  ) {\n                    case \"font\":\n                      renderState.fontPreloads.add(resumableState);\n                      break;\n                    default:\n                      renderState.bulkPreloads.add(resumableState);\n                  }\n            }\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.L(href, as, options);\n      },\n      m: function (href, options) {\n        var request = resolveRequest();\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (href) {\n            var as =\n              options && \"string\" === typeof options.as ? options.as : \"script\";\n            switch (as) {\n              case \"script\":\n                if (resumableState.moduleScriptResources.hasOwnProperty(href))\n                  return;\n                as = [];\n                resumableState.moduleScriptResources[href] =\n                  !options ||\n                  (\"string\" !== typeof options.crossOrigin &&\n                    \"string\" !== typeof options.integrity)\n                    ? PRELOAD_NO_CREDS\n                    : [options.crossOrigin, options.integrity];\n                renderState.preloads.moduleScripts.set(href, as);\n                break;\n              default:\n                if (resumableState.moduleUnknownResources.hasOwnProperty(as)) {\n                  var resources = resumableState.unknownResources[as];\n                  if (resources.hasOwnProperty(href)) return;\n                } else\n                  (resources = {}),\n                    (resumableState.moduleUnknownResources[as] = resources);\n                as = [];\n                resources[href] = PRELOAD_NO_CREDS;\n            }\n            pushLinkImpl(\n              as,\n              assign({ rel: \"modulepreload\", href: href }, options)\n            );\n            renderState.bulkPreloads.add(as);\n            enqueueFlush(request);\n          }\n        } else previousDispatcher.m(href, options);\n      },\n      X: function (src, options) {\n        var request = resolveRequest();\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (src) {\n            var resourceState = resumableState.scriptResources.hasOwnProperty(\n              src\n            )\n              ? resumableState.scriptResources[src]\n              : void 0;\n            resourceState !== EXISTS &&\n              ((resumableState.scriptResources[src] = EXISTS),\n              (options = assign({ src: src, async: !0 }, options)),\n              resourceState &&\n                (2 === resourceState.length &&\n                  adoptPreloadCredentials(options, resourceState),\n                (src = renderState.preloads.scripts.get(src))) &&\n                (src.length = 0),\n              (src = []),\n              renderState.scripts.add(src),\n              pushScriptImpl(src, options),\n              enqueueFlush(request));\n          }\n        } else previousDispatcher.X(src, options);\n      },\n      S: function (href, precedence, options) {\n        var request = resolveRequest();\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (href) {\n            precedence = precedence || \"default\";\n            var styleQueue = renderState.styles.get(precedence),\n              resourceState = resumableState.styleResources.hasOwnProperty(href)\n                ? resumableState.styleResources[href]\n                : void 0;\n            resourceState !== EXISTS &&\n              ((resumableState.styleResources[href] = EXISTS),\n              styleQueue ||\n                ((styleQueue = {\n                  precedence: escapeTextForBrowser(precedence),\n                  rules: [],\n                  hrefs: [],\n                  sheets: new Map()\n                }),\n                renderState.styles.set(precedence, styleQueue)),\n              (precedence = {\n                state: PENDING$1,\n                props: assign(\n                  {\n                    rel: \"stylesheet\",\n                    href: href,\n                    \"data-precedence\": precedence\n                  },\n                  options\n                )\n              }),\n              resourceState &&\n                (2 === resourceState.length &&\n                  adoptPreloadCredentials(precedence.props, resourceState),\n                (renderState = renderState.preloads.stylesheets.get(href)) &&\n                0 < renderState.length\n                  ? (renderState.length = 0)\n                  : (precedence.state = PRELOADED)),\n              styleQueue.sheets.set(href, precedence),\n              enqueueFlush(request));\n          }\n        } else previousDispatcher.S(href, precedence, options);\n      },\n      M: function (src, options) {\n        var request = resolveRequest();\n        if (request) {\n          var resumableState = request.resumableState,\n            renderState = request.renderState;\n          if (src) {\n            var resourceState =\n              resumableState.moduleScriptResources.hasOwnProperty(src)\n                ? resumableState.moduleScriptResources[src]\n                : void 0;\n            resourceState !== EXISTS &&\n              ((resumableState.moduleScriptResources[src] = EXISTS),\n              (options = assign(\n                { src: src, type: \"module\", async: !0 },\n                options\n              )),\n              resourceState &&\n                (2 === resourceState.length &&\n                  adoptPreloadCredentials(options, resourceState),\n                (src = renderState.preloads.moduleScripts.get(src))) &&\n                (src.length = 0),\n              (src = []),\n              renderState.scripts.add(src),\n              pushScriptImpl(src, options),\n              enqueueFlush(request));\n          }\n        } else previousDispatcher.M(src, options);\n      }\n    };\n    var NothingSent = 0,\n      SentCompleteSegmentFunction = 1,\n      SentCompleteBoundaryFunction = 2,\n      SentClientRenderFunction = 4,\n      SentStyleInsertionFunction = 8,\n      SentCompletedShellId = 32,\n      SentMarkShellTime = 64,\n      NeedUpgradeToViewTransitions = 128,\n      SentUpgradeToViewTransitions = 256,\n      EXISTS = null,\n      PRELOAD_NO_CREDS = [];\n    Object.freeze(PRELOAD_NO_CREDS);\n    var currentlyFlushingRenderState = null;\n    stringToPrecomputedChunk('\"></template>');\n    var startInlineScript = stringToPrecomputedChunk(\"<script\"),\n      endInlineScript = stringToPrecomputedChunk(\"\\x3c/script>\"),\n      startScriptSrc = stringToPrecomputedChunk('<script src=\"'),\n      startModuleSrc = stringToPrecomputedChunk('<script type=\"module\" src=\"'),\n      scriptNonce = stringToPrecomputedChunk(' nonce=\"'),\n      scriptIntegirty = stringToPrecomputedChunk(' integrity=\"'),\n      scriptCrossOrigin = stringToPrecomputedChunk(' crossorigin=\"'),\n      endAsyncScript = stringToPrecomputedChunk(' async=\"\">\\x3c/script>'),\n      startInlineStyle = stringToPrecomputedChunk(\"<style\"),\n      scriptRegex = /(<\\/|<)(s)(cript)/gi,\n      importMapScriptStart = stringToPrecomputedChunk(\n        '<script type=\"importmap\">'\n      ),\n      importMapScriptEnd = stringToPrecomputedChunk(\"\\x3c/script>\");\n    var didWarnForNewBooleanPropsWithEmptyValue = {};\n    var ROOT_HTML_MODE = 0,\n      HTML_HTML_MODE = 1,\n      HTML_MODE = 2,\n      HTML_HEAD_MODE = 3,\n      SVG_MODE = 4,\n      MATHML_MODE = 5,\n      HTML_TABLE_MODE = 6,\n      HTML_TABLE_BODY_MODE = 7,\n      HTML_TABLE_ROW_MODE = 8,\n      HTML_COLGROUP_MODE = 9,\n      textSeparator = stringToPrecomputedChunk(\"\\x3c!-- --\\x3e\"),\n      styleNameCache = new Map(),\n      styleAttributeStart = stringToPrecomputedChunk(' style=\"'),\n      styleAssign = stringToPrecomputedChunk(\":\"),\n      styleSeparator = stringToPrecomputedChunk(\";\"),\n      attributeSeparator = stringToPrecomputedChunk(\" \"),\n      attributeAssign = stringToPrecomputedChunk('=\"'),\n      attributeEnd = stringToPrecomputedChunk('\"'),\n      attributeEmptyString = stringToPrecomputedChunk('=\"\"'),\n      actionJavaScriptURL = stringToPrecomputedChunk(\n        escapeTextForBrowser(\n          \"javascript:throw new Error('React form unexpectedly submitted.')\"\n        )\n      ),\n      startHiddenInputChunk = stringToPrecomputedChunk('<input type=\"hidden\"'),\n      endOfStartTag = stringToPrecomputedChunk(\">\"),\n      endOfStartTagSelfClosing = stringToPrecomputedChunk(\"/>\"),\n      didWarnDefaultInputValue = !1,\n      didWarnDefaultChecked = !1,\n      didWarnDefaultSelectValue = !1,\n      didWarnDefaultTextareaValue = !1,\n      didWarnInvalidOptionChildren = !1,\n      didWarnInvalidOptionInnerHTML = !1,\n      didWarnSelectedSetOnOption = !1,\n      didWarnFormActionType = !1,\n      didWarnFormActionName = !1,\n      didWarnFormActionTarget = !1,\n      didWarnFormActionMethod = !1,\n      selectedMarkerAttribute = stringToPrecomputedChunk(' selected=\"\"'),\n      formReplayingRuntimeScript = stringToPrecomputedChunk(\n        'addEventListener(\"submit\",function(a){if(!a.defaultPrevented){var b=a.target,d=a.submitter,c=b.action,e=d;if(d){var f=d.getAttribute(\"formAction\");null!=f&&(c=f,e=null)}\"javascript:throw new Error(\\'React form unexpectedly submitted.\\')\"===c&&(a.preventDefault(),a=new FormData(b,e),c=b.ownerDocument||b,(c.$$reactFormReplay=c.$$reactFormReplay||[]).push(b,d,a))}});'\n      ),\n      formStateMarkerIsMatching = stringToPrecomputedChunk(\"\\x3c!--F!--\\x3e\"),\n      formStateMarkerIsNotMatching = stringToPrecomputedChunk(\"\\x3c!--F--\\x3e\"),\n      styleRegex = /(<\\/|<)(s)(tyle)/gi,\n      headPreambleContributionChunk =\n        stringToPrecomputedChunk(\"\\x3c!--head--\\x3e\"),\n      bodyPreambleContributionChunk =\n        stringToPrecomputedChunk(\"\\x3c!--body--\\x3e\"),\n      htmlPreambleContributionChunk =\n        stringToPrecomputedChunk(\"\\x3c!--html--\\x3e\"),\n      leadingNewline = stringToPrecomputedChunk(\"\\n\"),\n      VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\\.\\-\\d]*$/,\n      validatedTagCache = new Map(),\n      doctypeChunk = stringToPrecomputedChunk(\"<!DOCTYPE html>\"),\n      endTagCache = new Map(),\n      shellTimeRuntimeScript = stringToPrecomputedChunk(\n        \"requestAnimationFrame(function(){$RT=performance.now()});\"\n      ),\n      placeholder1 = stringToPrecomputedChunk('<template id=\"'),\n      placeholder2 = stringToPrecomputedChunk('\"></template>'),\n      startActivityBoundary = stringToPrecomputedChunk(\"\\x3c!--&--\\x3e\"),\n      endActivityBoundary = stringToPrecomputedChunk(\"\\x3c!--/&--\\x3e\"),\n      startCompletedSuspenseBoundary =\n        stringToPrecomputedChunk(\"\\x3c!--$--\\x3e\"),\n      startPendingSuspenseBoundary1 = stringToPrecomputedChunk(\n        '\\x3c!--$?--\\x3e<template id=\"'\n      ),\n      startPendingSuspenseBoundary2 = stringToPrecomputedChunk('\"></template>'),\n      startClientRenderedSuspenseBoundary =\n        stringToPrecomputedChunk(\"\\x3c!--$!--\\x3e\"),\n      endSuspenseBoundary = stringToPrecomputedChunk(\"\\x3c!--/$--\\x3e\"),\n      clientRenderedSuspenseBoundaryError1 =\n        stringToPrecomputedChunk(\"<template\"),\n      clientRenderedSuspenseBoundaryErrorAttrInterstitial =\n        stringToPrecomputedChunk('\"'),\n      clientRenderedSuspenseBoundaryError1A =\n        stringToPrecomputedChunk(' data-dgst=\"'),\n      clientRenderedSuspenseBoundaryError1B =\n        stringToPrecomputedChunk(' data-msg=\"'),\n      clientRenderedSuspenseBoundaryError1C =\n        stringToPrecomputedChunk(' data-stck=\"'),\n      clientRenderedSuspenseBoundaryError1D =\n        stringToPrecomputedChunk(' data-cstck=\"'),\n      clientRenderedSuspenseBoundaryError2 =\n        stringToPrecomputedChunk(\"></template>\"),\n      startSegmentHTML = stringToPrecomputedChunk('<div hidden id=\"'),\n      startSegmentHTML2 = stringToPrecomputedChunk('\">'),\n      endSegmentHTML = stringToPrecomputedChunk(\"</div>\"),\n      startSegmentSVG = stringToPrecomputedChunk(\n        '<svg aria-hidden=\"true\" style=\"display:none\" id=\"'\n      ),\n      startSegmentSVG2 = stringToPrecomputedChunk('\">'),\n      endSegmentSVG = stringToPrecomputedChunk(\"</svg>\"),\n      startSegmentMathML = stringToPrecomputedChunk(\n        '<math aria-hidden=\"true\" style=\"display:none\" id=\"'\n      ),\n      startSegmentMathML2 = stringToPrecomputedChunk('\">'),\n      endSegmentMathML = stringToPrecomputedChunk(\"</math>\"),\n      startSegmentTable = stringToPrecomputedChunk('<table hidden id=\"'),\n      startSegmentTable2 = stringToPrecomputedChunk('\">'),\n      endSegmentTable = stringToPrecomputedChunk(\"</table>\"),\n      startSegmentTableBody = stringToPrecomputedChunk(\n        '<table hidden><tbody id=\"'\n      ),\n      startSegmentTableBody2 = stringToPrecomputedChunk('\">'),\n      endSegmentTableBody = stringToPrecomputedChunk(\"</tbody></table>\"),\n      startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id=\"'),\n      startSegmentTableRow2 = stringToPrecomputedChunk('\">'),\n      endSegmentTableRow = stringToPrecomputedChunk(\"</tr></table>\"),\n      startSegmentColGroup = stringToPrecomputedChunk(\n        '<table hidden><colgroup id=\"'\n      ),\n      startSegmentColGroup2 = stringToPrecomputedChunk('\">'),\n      endSegmentColGroup = stringToPrecomputedChunk(\"</colgroup></table>\"),\n      completeSegmentScript1Full = stringToPrecomputedChunk(\n        '$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS(\"'\n      ),\n      completeSegmentScript1Partial = stringToPrecomputedChunk('$RS(\"'),\n      completeSegmentScript2 = stringToPrecomputedChunk('\",\"'),\n      completeSegmentScriptEnd = stringToPrecomputedChunk('\")\\x3c/script>');\n    stringToPrecomputedChunk('<template data-rsi=\"\" data-sid=\"');\n    stringToPrecomputedChunk('\" data-pid=\"');\n    var completeBoundaryScriptFunctionOnly = stringToPrecomputedChunk(\n        '$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if(\"/$\"===d||\"/&\"===d)if(0===h)break;else h--;else\"$\"!==d&&\"$?\"!==d&&\"$~\"!==d&&\"$!\"!==d&&\"&\"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data=\"$\";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};\\n$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data=\"$~\",$RB.push(a,b),2===$RB.length&&(\"number\"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};'\n      ),\n      completeBoundaryUpgradeToViewTransitionsInstruction =\n        '$RV=function(A,g){function k(a,b){var e=a.getAttribute(b);e&&(b=a.style,l.push(a,b.viewTransitionName,b.viewTransitionClass),\"auto\"!==e&&(b.viewTransitionClass=e),(a=a.getAttribute(\"vt-name\"))||(a=\"_T_\"+K++ +\"_\"),a=CSS.escape(a)!==a?\"r-\"+btoa(a).replace(/=/g,\"\"):a,b.viewTransitionName=a,B=!0)}var B=!1,K=0,l=[];try{var f=document.__reactViewTransition;if(f){f.finished.finally($RV.bind(null,g));return}var m=new Map;for(f=1;f<g.length;f+=2)for(var h=g[f].querySelectorAll(\"[vt-share]\"),d=0;d<h.length;d++){var c=h[d];m.set(c.getAttribute(\"vt-name\"),c)}var u=[];for(h=0;h<g.length;h+=2){var C=g[h],x=C.parentNode;if(x){var v=x.getBoundingClientRect();if(v.left||v.top||v.width||v.height){c=C;for(f=0;c;){if(8===c.nodeType){var r=c.data;if(\"/$\"===r)if(0===f)break;else f--;else\"$\"!==r&&\"$?\"!==r&&\"$~\"!==r&&\"$!\"!==r||f++}else if(1===c.nodeType){d=c;var D=d.getAttribute(\"vt-name\"),y=m.get(D);k(d,y?\"vt-share\":\"vt-exit\");y&&(k(y,\"vt-share\"),m.set(D,null));var E=d.querySelectorAll(\"[vt-share]\");\\nfor(d=0;d<E.length;d++){var F=E[d],G=F.getAttribute(\"vt-name\"),H=m.get(G);H&&(k(F,\"vt-share\"),k(H,\"vt-share\"),m.set(G,null))}}c=c.nextSibling}for(var I=g[h+1],t=I.firstElementChild;t;)null!==m.get(t.getAttribute(\"vt-name\"))&&k(t,\"vt-enter\"),t=t.nextElementSibling;c=x;do for(var n=c.firstElementChild;n;){var J=n.getAttribute(\"vt-update\");J&&\"none\"!==J&&!l.includes(n)&&k(n,\"vt-update\");n=n.nextElementSibling}while((c=c.parentNode)&&1===c.nodeType&&\"none\"!==c.getAttribute(\"vt-update\"));u.push.apply(u,\\nI.querySelectorAll(\\'img[src]:not([loading=\"lazy\"])\\'))}}}if(B){var z=document.__reactViewTransition=document.startViewTransition({update:function(){A(g);for(var a=[document.documentElement.clientHeight,document.fonts.ready],b={},e=0;e<u.length;b={g:b.g},e++)if(b.g=u[e],!b.g.complete){var p=b.g.getBoundingClientRect();0<p.bottom&&0<p.right&&p.top<window.innerHeight&&p.left<window.innerWidth&&(p=new Promise(function(w){return function(q){w.g.addEventListener(\"load\",q);w.g.addEventListener(\"error\",q)}}(b)),\\na.push(p))}return Promise.race([Promise.all(a),new Promise(function(w){var q=performance.now();setTimeout(w,2300>q&&2E3<q?2300-q:500)})])},types:[]});z.ready.finally(function(){for(var a=l.length-3;0<=a;a-=3){var b=l[a],e=b.style;e.viewTransitionName=l[a+1];e.viewTransitionClass=l[a+1];\"\"===b.getAttribute(\"style\")&&b.removeAttribute(\"style\")}});z.finished.finally(function(){document.__reactViewTransition===z&&(document.__reactViewTransition=null)});$RB=[];return}}catch(a){}A(g)}.bind(null,\\n$RV);',\n      completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC(\"'),\n      completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(\n        '$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll(\"link[data-precedence],style[data-precedence]\"),v=[],k=0;b=e[k++];)\"not all\"===b.getAttribute(\"media\")?v.push(b):(\"LINK\"===b.tagName&&$RM.set(b.getAttribute(\"href\"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement(\"link\");a.href=d;a.rel=\\n\"stylesheet\";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute(\"media\");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute(\"data-precedence\");a.removeAttribute(\"media\")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=\\n\"$~\";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,\"CSS failed to load\"))};$RR(\"'\n      ),\n      completeBoundaryWithStylesScript1Partial =\n        stringToPrecomputedChunk('$RR(\"'),\n      completeBoundaryScript2 = stringToPrecomputedChunk('\",\"'),\n      completeBoundaryScript3a = stringToPrecomputedChunk('\",'),\n      completeBoundaryScript3b = stringToPrecomputedChunk('\"'),\n      completeBoundaryScriptEnd = stringToPrecomputedChunk(\")\\x3c/script>\");\n    stringToPrecomputedChunk('<template data-rci=\"\" data-bid=\"');\n    stringToPrecomputedChunk('<template data-rri=\"\" data-bid=\"');\n    stringToPrecomputedChunk('\" data-sid=\"');\n    stringToPrecomputedChunk('\" data-sty=\"');\n    var clientRenderScriptFunctionOnly = stringToPrecomputedChunk(\n        '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data=\"$!\",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};'\n      ),\n      clientRenderScript1Full = stringToPrecomputedChunk(\n        '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data=\"$!\",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX(\"'\n      ),\n      clientRenderScript1Partial = stringToPrecomputedChunk('$RX(\"'),\n      clientRenderScript1A = stringToPrecomputedChunk('\"'),\n      clientRenderErrorScriptArgInterstitial = stringToPrecomputedChunk(\",\"),\n      clientRenderScriptEnd = stringToPrecomputedChunk(\")\\x3c/script>\");\n    stringToPrecomputedChunk('<template data-rxi=\"\" data-bid=\"');\n    stringToPrecomputedChunk('\" data-dgst=\"');\n    stringToPrecomputedChunk('\" data-msg=\"');\n    stringToPrecomputedChunk('\" data-stck=\"');\n    stringToPrecomputedChunk('\" data-cstck=\"');\n    var regexForJSStringsInInstructionScripts = /[<\\u2028\\u2029]/g,\n      regexForJSStringsInScripts = /[&><\\u2028\\u2029]/g,\n      lateStyleTagResourceOpen1 = stringToPrecomputedChunk(\n        ' media=\"not all\" data-precedence=\"'\n      ),\n      lateStyleTagResourceOpen2 = stringToPrecomputedChunk('\" data-href=\"'),\n      lateStyleTagResourceOpen3 = stringToPrecomputedChunk('\">'),\n      lateStyleTagTemplateClose = stringToPrecomputedChunk(\"</style>\"),\n      currentlyRenderingBoundaryHasStylesToHoist = !1,\n      destinationHasCapacity = !0,\n      stylesheetFlushingQueue = [],\n      styleTagResourceOpen1 = stringToPrecomputedChunk(' data-precedence=\"'),\n      styleTagResourceOpen2 = stringToPrecomputedChunk('\" data-href=\"'),\n      spaceSeparator = stringToPrecomputedChunk(\" \"),\n      styleTagResourceOpen3 = stringToPrecomputedChunk('\">'),\n      styleTagResourceClose = stringToPrecomputedChunk(\"</style>\");\n    stringToPrecomputedChunk('<link rel=\"expect\" href=\"#');\n    stringToPrecomputedChunk('\" blocking=\"render\"/>');\n    var completedShellIdAttributeStart = stringToPrecomputedChunk(' id=\"'),\n      arrayFirstOpenBracket = stringToPrecomputedChunk(\"[\"),\n      arraySubsequentOpenBracket = stringToPrecomputedChunk(\",[\"),\n      arrayInterstitial = stringToPrecomputedChunk(\",\"),\n      arrayCloseBracket = stringToPrecomputedChunk(\"]\"),\n      PENDING$1 = 0,\n      PRELOADED = 1,\n      PREAMBLE = 2,\n      LATE = 3,\n      regexForHrefInLinkHeaderURLContext = /[<>\\r\\n]/g,\n      regexForLinkHeaderQuotedParamValueContext = /[\"';,\\r\\n]/g,\n      bind = Function.prototype.bind,\n      requestStorage = new async_hooks.AsyncLocalStorage(),\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      emptyContextObject = {};\n    Object.freeze(emptyContextObject);\n    var rendererSigil = {};\n    var currentActiveSnapshot = null,\n      didWarnAboutNoopUpdateForComponent = {},\n      didWarnAboutDeprecatedWillMount = {};\n    var didWarnAboutUninitializedState = new Set();\n    var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n    var didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n    var didWarnAboutDirectlyAssigningPropsToState = new Set();\n    var didWarnAboutUndefinedDerivedState = new Set();\n    var didWarnAboutContextTypes$1 = new Set();\n    var didWarnAboutChildContextTypes = new Set();\n    var didWarnAboutInvalidateContextType = new Set();\n    var didWarnOnInvalidCallback = new Set();\n    var classComponentUpdater = {\n        enqueueSetState: function (inst, payload, callback) {\n          var internals = inst._reactInternals;\n          null === internals.queue\n            ? warnNoop(inst, \"setState\")\n            : (internals.queue.push(payload),\n              void 0 !== callback &&\n                null !== callback &&\n                warnOnInvalidCallback(callback));\n        },\n        enqueueReplaceState: function (inst, payload, callback) {\n          inst = inst._reactInternals;\n          inst.replace = !0;\n          inst.queue = [payload];\n          void 0 !== callback &&\n            null !== callback &&\n            warnOnInvalidCallback(callback);\n        },\n        enqueueForceUpdate: function (inst, callback) {\n          null === inst._reactInternals.queue\n            ? warnNoop(inst, \"forceUpdate\")\n            : void 0 !== callback &&\n              null !== callback &&\n              warnOnInvalidCallback(callback);\n        }\n      },\n      emptyTreeContext = { id: 1, overflow: \"\" },\n      clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,\n      log = Math.log,\n      LN2 = Math.LN2,\n      currentTaskInDEV = null,\n      SuspenseException = Error(\n        \"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\\n\\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`.\"\n      ),\n      suspendedThenable = null,\n      shouldCaptureSuspendedCallSite = !1,\n      suspendedCallSiteStack = null,\n      suspendedCallSiteDebugTask = null,\n      objectIs = \"function\" === typeof Object.is ? Object.is : is,\n      currentlyRenderingComponent = null,\n      currentlyRenderingTask = null,\n      currentlyRenderingRequest = null,\n      currentlyRenderingKeyPath = null,\n      firstWorkInProgressHook = null,\n      workInProgressHook = null,\n      isReRender = !1,\n      didScheduleRenderPhaseUpdate = !1,\n      localIdCounter = 0,\n      actionStateCounter = 0,\n      actionStateMatchingIndex = -1,\n      thenableIndexCounter = 0,\n      thenableState = null,\n      renderPhaseUpdates = null,\n      numberOfReRenders = 0,\n      isInHookUserCodeInDev = !1,\n      currentHookNameInDev,\n      HooksDispatcher = {\n        readContext: readContext,\n        use: function (usable) {\n          if (null !== usable && \"object\" === typeof usable) {\n            if (\"function\" === typeof usable.then)\n              return unwrapThenable(usable);\n            if (usable.$$typeof === REACT_CONTEXT_TYPE)\n              return readContext(usable);\n          }\n          throw Error(\n            \"An unsupported type was passed to use(): \" + String(usable)\n          );\n        },\n        useContext: function (context) {\n          currentHookNameInDev = \"useContext\";\n          resolveCurrentlyRenderingComponent();\n          return context._currentValue;\n        },\n        useMemo: useMemo,\n        useReducer: useReducer,\n        useRef: function (initialValue) {\n          currentlyRenderingComponent = resolveCurrentlyRenderingComponent();\n          workInProgressHook = createWorkInProgressHook();\n          var previousRef = workInProgressHook.memoizedState;\n          return null === previousRef\n            ? ((initialValue = { current: initialValue }),\n              Object.seal(initialValue),\n              (workInProgressHook.memoizedState = initialValue))\n            : previousRef;\n        },\n        useState: function (initialState) {\n          currentHookNameInDev = \"useState\";\n          return useReducer(basicStateReducer, initialState);\n        },\n        useInsertionEffect: noop,\n        useLayoutEffect: noop,\n        useCallback: function (callback, deps) {\n          return useMemo(function () {\n            return callback;\n          }, deps);\n        },\n        useImperativeHandle: noop,\n        useEffect: noop,\n        useDebugValue: noop,\n        useDeferredValue: function (value, initialValue) {\n          resolveCurrentlyRenderingComponent();\n          return void 0 !== initialValue ? initialValue : value;\n        },\n        useTransition: function () {\n          resolveCurrentlyRenderingComponent();\n          return [!1, unsupportedStartTransition];\n        },\n        useId: function () {\n          var treeId = getTreeId(currentlyRenderingTask.treeContext),\n            resumableState = currentResumableState;\n          if (null === resumableState)\n            throw Error(\n              \"Invalid hook call. Hooks can only be called inside of the body of a function component.\"\n            );\n          var localId = localIdCounter++;\n          return makeId(resumableState, treeId, localId);\n        },\n        useSyncExternalStore: function (\n          subscribe,\n          getSnapshot,\n          getServerSnapshot\n        ) {\n          if (void 0 === getServerSnapshot)\n            throw Error(\n              \"Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.\"\n            );\n          return getServerSnapshot();\n        },\n        useOptimistic: function (passthrough) {\n          resolveCurrentlyRenderingComponent();\n          return [passthrough, unsupportedSetOptimisticState];\n        },\n        useActionState: useActionState,\n        useFormState: useActionState,\n        useHostTransitionStatus: function () {\n          resolveCurrentlyRenderingComponent();\n          return NotPending;\n        },\n        useMemoCache: function (size) {\n          for (var data = Array(size), i = 0; i < size; i++)\n            data[i] = REACT_MEMO_CACHE_SENTINEL;\n          return data;\n        },\n        useCacheRefresh: function () {\n          return unsupportedRefresh;\n        },\n        useEffectEvent: function () {\n          return throwOnUseEffectEventCall;\n        }\n      },\n      currentResumableState = null,\n      DefaultAsyncDispatcher = {\n        getCacheForType: function () {\n          throw Error(\"Not implemented.\");\n        },\n        cacheSignal: function () {\n          throw Error(\"Not implemented.\");\n        },\n        getOwner: function () {\n          return null === currentTaskInDEV\n            ? null\n            : currentTaskInDEV.componentStack;\n        }\n      },\n      disabledDepth = 0,\n      prevLog,\n      prevInfo,\n      prevWarn,\n      prevError,\n      prevGroup,\n      prevGroupCollapsed,\n      prevGroupEnd;\n    disabledLog.__reactDisabledLog = !0;\n    var prefix,\n      suffix,\n      reentry = !1;\n    var componentFrameCache = new (\n      \"function\" === typeof WeakMap ? WeakMap : Map\n    )();\n    var callComponent = {\n        react_stack_bottom_frame: function (Component, props, secondArg) {\n          return Component(props, secondArg);\n        }\n      },\n      callComponentInDEV =\n        callComponent.react_stack_bottom_frame.bind(callComponent),\n      callRender = {\n        react_stack_bottom_frame: function (instance) {\n          return instance.render();\n        }\n      },\n      callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender),\n      callLazyInit = {\n        react_stack_bottom_frame: function (lazy) {\n          var init = lazy._init;\n          return init(lazy._payload);\n        }\n      },\n      callLazyInitInDEV =\n        callLazyInit.react_stack_bottom_frame.bind(callLazyInit),\n      lastResetTime = 0;\n    if (\n      \"object\" === typeof performance &&\n      \"function\" === typeof performance.now\n    ) {\n      var localPerformance = performance;\n      var getCurrentTime = function () {\n        return localPerformance.now();\n      };\n    } else {\n      var localDate = Date;\n      getCurrentTime = function () {\n        return localDate.now();\n      };\n    }\n    var CLIENT_RENDERED = 4,\n      PENDING = 0,\n      COMPLETED = 1,\n      FLUSHED = 2,\n      ABORTED = 3,\n      ERRORED = 4,\n      POSTPONED = 5,\n      CLOSED = 14,\n      currentRequest = null,\n      didWarnAboutBadClass = {},\n      didWarnAboutContextTypes = {},\n      didWarnAboutContextTypeOnFunctionComponent = {},\n      didWarnAboutGetDerivedStateOnFunctionComponent = {},\n      didWarnAboutReassigningProps = !1,\n      didWarnAboutGenerators = !1,\n      didWarnAboutMaps = !1,\n      flushedByteSize = 0,\n      flushingPartialBoundaries = !1,\n      flushingShell = !1;\n    ensureCorrectIsomorphicReactVersion();\n    ensureCorrectIsomorphicReactVersion();\n    exports.prerender = function (children, options) {\n      return new Promise(function (resolve, reject) {\n        var onHeaders = options ? options.onHeaders : void 0,\n          onHeadersImpl;\n        onHeaders &&\n          (onHeadersImpl = function (headersDescriptor) {\n            onHeaders(new Headers(headersDescriptor));\n          });\n        var resources = createResumableState(\n            options ? options.identifierPrefix : void 0,\n            options ? options.unstable_externalRuntimeSrc : void 0,\n            options ? options.bootstrapScriptContent : void 0,\n            options ? options.bootstrapScripts : void 0,\n            options ? options.bootstrapModules : void 0\n          ),\n          request = createPrerenderRequest(\n            children,\n            resources,\n            createRenderState(\n              resources,\n              void 0,\n              options ? options.unstable_externalRuntimeSrc : void 0,\n              options ? options.importMap : void 0,\n              onHeadersImpl,\n              options ? options.maxHeadersLength : void 0\n            ),\n            createRootFormatContext(options ? options.namespaceURI : void 0),\n            options ? options.progressiveChunkSize : void 0,\n            options ? options.onError : void 0,\n            function () {\n              var writable,\n                stream = new ReadableStream(\n                  {\n                    type: \"bytes\",\n                    start: function (controller) {\n                      writable =\n                        createFakeWritableFromReadableStreamController(\n                          controller\n                        );\n                    },\n                    pull: function () {\n                      startFlowing(request, writable);\n                    },\n                    cancel: function (reason) {\n                      request.destination = null;\n                      abort(request, reason);\n                    }\n                  },\n                  { highWaterMark: 0 }\n                );\n              stream = {\n                postponed: getPostponedState(request),\n                prelude: stream\n              };\n              resolve(stream);\n            },\n            void 0,\n            void 0,\n            reject\n          );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.prerenderToNodeStream = function (children, options) {\n      return new Promise(function (resolve, reject) {\n        var resumableState = createResumableState(\n            options ? options.identifierPrefix : void 0,\n            options ? options.unstable_externalRuntimeSrc : void 0,\n            options ? options.bootstrapScriptContent : void 0,\n            options ? options.bootstrapScripts : void 0,\n            options ? options.bootstrapModules : void 0\n          ),\n          request = createPrerenderRequest(\n            children,\n            resumableState,\n            createRenderState(\n              resumableState,\n              void 0,\n              options ? options.unstable_externalRuntimeSrc : void 0,\n              options ? options.importMap : void 0,\n              options ? options.onHeaders : void 0,\n              options ? options.maxHeadersLength : void 0\n            ),\n            createRootFormatContext(options ? options.namespaceURI : void 0),\n            options ? options.progressiveChunkSize : void 0,\n            options ? options.onError : void 0,\n            function () {\n              var readable = new stream.Readable({\n                  read: function () {\n                    startFlowing(request, writable);\n                  }\n                }),\n                writable = createFakeWritableFromReadable(readable);\n              readable = {\n                postponed: getPostponedState(request),\n                prelude: readable\n              };\n              resolve(readable);\n            },\n            void 0,\n            void 0,\n            reject\n          );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.renderToPipeableStream = function (children, options) {\n      var request = createRequestImpl(children, options),\n        hasStartedFlowing = !1;\n      startWork(request);\n      return {\n        pipe: function (destination) {\n          if (hasStartedFlowing)\n            throw Error(\n              \"React currently only supports piping to one writable stream.\"\n            );\n          hasStartedFlowing = !0;\n          safelyEmitEarlyPreloads(\n            request,\n            null === request.trackedPostpones\n              ? 0 === request.pendingRootTasks\n              : null === request.completedRootSegment\n                ? 0 === request.pendingRootTasks\n                : request.completedRootSegment.status !== POSTPONED\n          );\n          startFlowing(request, destination);\n          destination.on(\"drain\", createDrainHandler(destination, request));\n          destination.on(\n            \"error\",\n            createCancelHandler(\n              request,\n              \"The destination stream errored while writing data.\"\n            )\n          );\n          destination.on(\n            \"close\",\n            createCancelHandler(request, \"The destination stream closed early.\")\n          );\n          return destination;\n        },\n        abort: function (reason) {\n          abort(request, reason);\n        }\n      };\n    };\n    exports.renderToReadableStream = function (children, options) {\n      return new Promise(function (resolve, reject) {\n        var onFatalError,\n          onAllReady,\n          allReady = new Promise(function (res, rej) {\n            onAllReady = res;\n            onFatalError = rej;\n          }),\n          onHeaders = options ? options.onHeaders : void 0,\n          onHeadersImpl;\n        onHeaders &&\n          (onHeadersImpl = function (headersDescriptor) {\n            onHeaders(new Headers(headersDescriptor));\n          });\n        var resumableState = createResumableState(\n            options ? options.identifierPrefix : void 0,\n            options ? options.unstable_externalRuntimeSrc : void 0,\n            options ? options.bootstrapScriptContent : void 0,\n            options ? options.bootstrapScripts : void 0,\n            options ? options.bootstrapModules : void 0\n          ),\n          request = createRequest(\n            children,\n            resumableState,\n            createRenderState(\n              resumableState,\n              options ? options.nonce : void 0,\n              options ? options.unstable_externalRuntimeSrc : void 0,\n              options ? options.importMap : void 0,\n              onHeadersImpl,\n              options ? options.maxHeadersLength : void 0\n            ),\n            createRootFormatContext(options ? options.namespaceURI : void 0),\n            options ? options.progressiveChunkSize : void 0,\n            options ? options.onError : void 0,\n            onAllReady,\n            function () {\n              var writable,\n                stream = new ReadableStream(\n                  {\n                    type: \"bytes\",\n                    start: function (controller) {\n                      writable =\n                        createFakeWritableFromReadableStreamController$1(\n                          controller\n                        );\n                    },\n                    pull: function () {\n                      startFlowing(request, writable);\n                    },\n                    cancel: function (reason) {\n                      request.destination = null;\n                      abort(request, reason);\n                    }\n                  },\n                  { highWaterMark: 0 }\n                );\n              stream.allReady = allReady;\n              resolve(stream);\n            },\n            function (error) {\n              allReady.catch(function () {});\n              reject(error);\n            },\n            onFatalError,\n            options ? options.formState : void 0\n          );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.resume = function (children, postponedState, options) {\n      return new Promise(function (resolve, reject) {\n        var onFatalError,\n          onAllReady,\n          allReady = new Promise(function (res, rej) {\n            onAllReady = res;\n            onFatalError = rej;\n          }),\n          request = resumeRequest(\n            children,\n            postponedState,\n            createRenderState(\n              postponedState.resumableState,\n              options ? options.nonce : void 0,\n              void 0,\n              void 0,\n              void 0,\n              void 0\n            ),\n            options ? options.onError : void 0,\n            onAllReady,\n            function () {\n              var writable,\n                stream = new ReadableStream(\n                  {\n                    type: \"bytes\",\n                    start: function (controller) {\n                      writable =\n                        createFakeWritableFromReadableStreamController$1(\n                          controller\n                        );\n                    },\n                    pull: function () {\n                      startFlowing(request, writable);\n                    },\n                    cancel: function (reason) {\n                      request.destination = null;\n                      abort(request, reason);\n                    }\n                  },\n                  { highWaterMark: 0 }\n                );\n              stream.allReady = allReady;\n              resolve(stream);\n            },\n            function (error) {\n              allReady.catch(function () {});\n              reject(error);\n            },\n            onFatalError\n          );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.resumeAndPrerender = function (children, postponedState, options) {\n      return new Promise(function (resolve, reject) {\n        var request = resumeAndPrerenderRequest(\n          children,\n          postponedState,\n          createRenderState(\n            postponedState.resumableState,\n            void 0,\n            void 0,\n            void 0,\n            void 0,\n            void 0\n          ),\n          options ? options.onError : void 0,\n          function () {\n            var writable,\n              stream = new ReadableStream(\n                {\n                  type: \"bytes\",\n                  start: function (controller) {\n                    writable =\n                      createFakeWritableFromReadableStreamController(\n                        controller\n                      );\n                  },\n                  pull: function () {\n                    startFlowing(request, writable);\n                  },\n                  cancel: function (reason) {\n                    request.destination = null;\n                    abort(request, reason);\n                  }\n                },\n                { highWaterMark: 0 }\n              );\n            stream = { postponed: getPostponedState(request), prelude: stream };\n            resolve(stream);\n          },\n          void 0,\n          void 0,\n          reject\n        );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.resumeAndPrerenderToNodeStream = function (\n      children,\n      postponedState,\n      options\n    ) {\n      return new Promise(function (resolve, reject) {\n        var request = resumeAndPrerenderRequest(\n          children,\n          postponedState,\n          createRenderState(\n            postponedState.resumableState,\n            void 0,\n            void 0,\n            void 0,\n            void 0,\n            void 0\n          ),\n          options ? options.onError : void 0,\n          function () {\n            var readable = new stream.Readable({\n                read: function () {\n                  startFlowing(request, writable);\n                }\n              }),\n              writable = createFakeWritableFromReadable(readable);\n            readable = {\n              postponed: getPostponedState(request),\n              prelude: readable\n            };\n            resolve(readable);\n          },\n          void 0,\n          void 0,\n          reject\n        );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.resumeToPipeableStream = function (\n      children,\n      postponedState,\n      options\n    ) {\n      var request = resumeRequestImpl(children, postponedState, options),\n        hasStartedFlowing = !1;\n      startWork(request);\n      return {\n        pipe: function (destination) {\n          if (hasStartedFlowing)\n            throw Error(\n              \"React currently only supports piping to one writable stream.\"\n            );\n          hasStartedFlowing = !0;\n          startFlowing(request, destination);\n          destination.on(\"drain\", createDrainHandler(destination, request));\n          destination.on(\n            \"error\",\n            createCancelHandler(\n              request,\n              \"The destination stream errored while writing data.\"\n            )\n          );\n          destination.on(\n            \"close\",\n            createCancelHandler(request, \"The destination stream closed early.\")\n          );\n          return destination;\n        },\n        abort: function (reason) {\n          abort(request, reason);\n        }\n      };\n    };\n    exports.version = \"19.3.0-canary-3f0b9e61-20260317\";\n  })();\n","/**\n * @license React\n * react-dom.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function noop() {}\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function createPortal$1(children, containerInfo, implementation) {\n      var key =\n        3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\n      if (null == key) key = null;\n      else if (key === REACT_OPTIMISTIC_KEY) key = REACT_OPTIMISTIC_KEY;\n      else {\n        try {\n          testStringCoercion(key);\n          var JSCompiler_inline_result = !1;\n        } catch (e) {\n          JSCompiler_inline_result = !0;\n        }\n        JSCompiler_inline_result &&\n          (console.error(\n            \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n            (\"function\" === typeof Symbol &&\n              Symbol.toStringTag &&\n              key[Symbol.toStringTag]) ||\n              key.constructor.name ||\n              \"Object\"\n          ),\n          testStringCoercion(key));\n        key = \"\" + key;\n      }\n      return {\n        $$typeof: REACT_PORTAL_TYPE,\n        key: key,\n        children: children,\n        containerInfo: containerInfo,\n        implementation: implementation\n      };\n    }\n    function getCrossOriginStringAs(as, input) {\n      if (\"font\" === as) return \"\";\n      if (\"string\" === typeof input)\n        return \"use-credentials\" === input ? input : \"\";\n    }\n    function getValueDescriptorExpectingObjectForWarning(thing) {\n      return null === thing\n        ? \"`null`\"\n        : void 0 === thing\n          ? \"`undefined`\"\n          : \"\" === thing\n            ? \"an empty string\"\n            : 'something with type \"' + typeof thing + '\"';\n    }\n    function getValueDescriptorExpectingEnumForWarning(thing) {\n      return null === thing\n        ? \"`null`\"\n        : void 0 === thing\n          ? \"`undefined`\"\n          : \"\" === thing\n            ? \"an empty string\"\n            : \"string\" === typeof thing\n              ? JSON.stringify(thing)\n              : \"number\" === typeof thing\n                ? \"`\" + thing + \"`\"\n                : 'something with type \"' + typeof thing + '\"';\n    }\n    function resolveDispatcher() {\n      var dispatcher = ReactSharedInternals.H;\n      null === dispatcher &&\n        console.error(\n          \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n        );\n      return dispatcher;\n    }\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n    var React = require(\"next/dist/compiled/react\"),\n      Internals = {\n        d: {\n          f: noop,\n          r: function () {\n            throw Error(\n              \"Invalid form element. requestFormReset must be passed a form that was rendered by React.\"\n            );\n          },\n          D: noop,\n          C: noop,\n          L: noop,\n          m: noop,\n          X: noop,\n          S: noop,\n          M: noop\n        },\n        p: 0,\n        findDOMNode: null\n      },\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_OPTIMISTIC_KEY = Symbol.for(\"react.optimistic_key\"),\n      ReactSharedInternals =\n        React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n    (\"function\" === typeof Map &&\n      null != Map.prototype &&\n      \"function\" === typeof Map.prototype.forEach &&\n      \"function\" === typeof Set &&\n      null != Set.prototype &&\n      \"function\" === typeof Set.prototype.clear &&\n      \"function\" === typeof Set.prototype.forEach) ||\n      console.error(\n        \"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\"\n      );\n    exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n      Internals;\n    exports.createPortal = function (children, container) {\n      var key =\n        2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;\n      if (\n        !container ||\n        (1 !== container.nodeType &&\n          9 !== container.nodeType &&\n          11 !== container.nodeType)\n      )\n        throw Error(\"Target container is not a DOM element.\");\n      return createPortal$1(children, container, null, key);\n    };\n    exports.flushSync = function (fn) {\n      var previousTransition = ReactSharedInternals.T,\n        previousUpdatePriority = Internals.p;\n      try {\n        if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))\n          return fn();\n      } finally {\n        (ReactSharedInternals.T = previousTransition),\n          (Internals.p = previousUpdatePriority),\n          Internals.d.f() &&\n            console.error(\n              \"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.\"\n            );\n      }\n    };\n    exports.preconnect = function (href, options) {\n      \"string\" === typeof href && href\n        ? null != options && \"object\" !== typeof options\n          ? console.error(\n              \"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            )\n          : null != options &&\n            \"string\" !== typeof options.crossOrigin &&\n            console.error(\n              \"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.\",\n              getValueDescriptorExpectingObjectForWarning(options.crossOrigin)\n            )\n        : console.error(\n            \"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n            getValueDescriptorExpectingObjectForWarning(href)\n          );\n      \"string\" === typeof href &&\n        (options\n          ? ((options = options.crossOrigin),\n            (options =\n              \"string\" === typeof options\n                ? \"use-credentials\" === options\n                  ? options\n                  : \"\"\n                : void 0))\n          : (options = null),\n        Internals.d.C(href, options));\n    };\n    exports.prefetchDNS = function (href) {\n      if (\"string\" !== typeof href || !href)\n        console.error(\n          \"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n          getValueDescriptorExpectingObjectForWarning(href)\n        );\n      else if (1 < arguments.length) {\n        var options = arguments[1];\n        \"object\" === typeof options && options.hasOwnProperty(\"crossOrigin\")\n          ? console.error(\n              \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            )\n          : console.error(\n              \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            );\n      }\n      \"string\" === typeof href && Internals.d.D(href);\n    };\n    exports.preinit = function (href, options) {\n      \"string\" === typeof href && href\n        ? null == options || \"object\" !== typeof options\n          ? console.error(\n              \"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            )\n          : \"style\" !== options.as &&\n            \"script\" !== options.as &&\n            console.error(\n              'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are \"style\" and \"script\".',\n              getValueDescriptorExpectingEnumForWarning(options.as)\n            )\n        : console.error(\n            \"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n            getValueDescriptorExpectingObjectForWarning(href)\n          );\n      if (\n        \"string\" === typeof href &&\n        options &&\n        \"string\" === typeof options.as\n      ) {\n        var as = options.as,\n          crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\n          integrity =\n            \"string\" === typeof options.integrity ? options.integrity : void 0,\n          fetchPriority =\n            \"string\" === typeof options.fetchPriority\n              ? options.fetchPriority\n              : void 0;\n        \"style\" === as\n          ? Internals.d.S(\n              href,\n              \"string\" === typeof options.precedence\n                ? options.precedence\n                : void 0,\n              {\n                crossOrigin: crossOrigin,\n                integrity: integrity,\n                fetchPriority: fetchPriority\n              }\n            )\n          : \"script\" === as &&\n            Internals.d.X(href, {\n              crossOrigin: crossOrigin,\n              integrity: integrity,\n              fetchPriority: fetchPriority,\n              nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n            });\n      }\n    };\n    exports.preinitModule = function (href, options) {\n      var encountered = \"\";\n      (\"string\" === typeof href && href) ||\n        (encountered +=\n          \" The `href` argument encountered was \" +\n          getValueDescriptorExpectingObjectForWarning(href) +\n          \".\");\n      void 0 !== options && \"object\" !== typeof options\n        ? (encountered +=\n            \" The `options` argument encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options) +\n            \".\")\n        : options &&\n          \"as\" in options &&\n          \"script\" !== options.as &&\n          (encountered +=\n            \" The `as` option encountered was \" +\n            getValueDescriptorExpectingEnumForWarning(options.as) +\n            \".\");\n      if (encountered)\n        console.error(\n          \"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s\",\n          encountered\n        );\n      else\n        switch (\n          ((encountered =\n            options && \"string\" === typeof options.as ? options.as : \"script\"),\n          encountered)\n        ) {\n          case \"script\":\n            break;\n          default:\n            (encountered =\n              getValueDescriptorExpectingEnumForWarning(encountered)),\n              console.error(\n                'ReactDOM.preinitModule(): Currently the only supported \"as\" type for this function is \"script\" but received \"%s\" instead. This warning was generated for `href` \"%s\". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',\n                encountered,\n                href\n              );\n        }\n      if (\"string\" === typeof href)\n        if (\"object\" === typeof options && null !== options) {\n          if (null == options.as || \"script\" === options.as)\n            (encountered = getCrossOriginStringAs(\n              options.as,\n              options.crossOrigin\n            )),\n              Internals.d.M(href, {\n                crossOrigin: encountered,\n                integrity:\n                  \"string\" === typeof options.integrity\n                    ? options.integrity\n                    : void 0,\n                nonce:\n                  \"string\" === typeof options.nonce ? options.nonce : void 0\n              });\n        } else null == options && Internals.d.M(href);\n    };\n    exports.preload = function (href, options) {\n      var encountered = \"\";\n      (\"string\" === typeof href && href) ||\n        (encountered +=\n          \" The `href` argument encountered was \" +\n          getValueDescriptorExpectingObjectForWarning(href) +\n          \".\");\n      null == options || \"object\" !== typeof options\n        ? (encountered +=\n            \" The `options` argument encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options) +\n            \".\")\n        : (\"string\" === typeof options.as && options.as) ||\n          (encountered +=\n            \" The `as` option encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options.as) +\n            \".\");\n      encountered &&\n        console.error(\n          'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel=\"preload\" as=\"...\" />` tag.%s',\n          encountered\n        );\n      if (\n        \"string\" === typeof href &&\n        \"object\" === typeof options &&\n        null !== options &&\n        \"string\" === typeof options.as\n      ) {\n        encountered = options.as;\n        var crossOrigin = getCrossOriginStringAs(\n          encountered,\n          options.crossOrigin\n        );\n        Internals.d.L(href, encountered, {\n          crossOrigin: crossOrigin,\n          integrity:\n            \"string\" === typeof options.integrity ? options.integrity : void 0,\n          nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n          type: \"string\" === typeof options.type ? options.type : void 0,\n          fetchPriority:\n            \"string\" === typeof options.fetchPriority\n              ? options.fetchPriority\n              : void 0,\n          referrerPolicy:\n            \"string\" === typeof options.referrerPolicy\n              ? options.referrerPolicy\n              : void 0,\n          imageSrcSet:\n            \"string\" === typeof options.imageSrcSet\n              ? options.imageSrcSet\n              : void 0,\n          imageSizes:\n            \"string\" === typeof options.imageSizes\n              ? options.imageSizes\n              : void 0,\n          media: \"string\" === typeof options.media ? options.media : void 0\n        });\n      }\n    };\n    exports.preloadModule = function (href, options) {\n      var encountered = \"\";\n      (\"string\" === typeof href && href) ||\n        (encountered +=\n          \" The `href` argument encountered was \" +\n          getValueDescriptorExpectingObjectForWarning(href) +\n          \".\");\n      void 0 !== options && \"object\" !== typeof options\n        ? (encountered +=\n            \" The `options` argument encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options) +\n            \".\")\n        : options &&\n          \"as\" in options &&\n          \"string\" !== typeof options.as &&\n          (encountered +=\n            \" The `as` option encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options.as) +\n            \".\");\n      encountered &&\n        console.error(\n          'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel=\"modulepreload\" as=\"...\" />` tag.%s',\n          encountered\n        );\n      \"string\" === typeof href &&\n        (options\n          ? ((encountered = getCrossOriginStringAs(\n              options.as,\n              options.crossOrigin\n            )),\n            Internals.d.m(href, {\n              as:\n                \"string\" === typeof options.as && \"script\" !== options.as\n                  ? options.as\n                  : void 0,\n              crossOrigin: encountered,\n              integrity:\n                \"string\" === typeof options.integrity\n                  ? options.integrity\n                  : void 0\n            }))\n          : Internals.d.m(href));\n    };\n    exports.requestFormReset = function (form) {\n      Internals.d.r(form);\n    };\n    exports.unstable_batchedUpdates = function (fn, a) {\n      return fn(a);\n    };\n    exports.useFormState = function (action, initialState, permalink) {\n      return resolveDispatcher().useFormState(action, initialState, permalink);\n    };\n    exports.useFormStatus = function () {\n      return resolveDispatcher().useHostTransitionStatus();\n    };\n    exports.version = \"19.3.0-canary-3f0b9e61-20260317\";\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n  })();\n","'use strict';\n\nfunction checkDCE() {\n  /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n  if (\n    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n  ) {\n    return;\n  }\n  if (process.env.NODE_ENV !== 'production') {\n    // This branch is unreachable because this function is only called\n    // in production, but the condition is true only in development.\n    // Therefore if the branch is still here, dead code elimination wasn't\n    // properly applied.\n    // Don't change the message. React DevTools relies on it. Also make sure\n    // this message doesn't occur elsewhere in this function, or it will cause\n    // a false positive.\n    throw new Error('^_^');\n  }\n  try {\n    // Verify that the code above has been dead code eliminated (DCE'd).\n    __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n  } catch (err) {\n    // DevTools shouldn't crash React, no matter what.\n    // We should still report in case we break this code.\n    console.error(err);\n  }\n}\n\nif (process.env.NODE_ENV === 'production') {\n  // DCE check should happen before ReactDOM bundle executes so that\n  // DevTools can report bad minification during injection.\n  checkDCE();\n  module.exports = require('./cjs/react-dom.production.js');\n} else {\n  module.exports = require('./cjs/react-dom.development.js');\n}\n","'use strict';\n\nvar s;\nif (process.env.NODE_ENV === 'production') {\n  s = require('./cjs/react-dom-server.node.production.js');\n} else {\n  s = require('./cjs/react-dom-server.node.development.js');\n}\n\nexports.version = s.version;\nexports.prerenderToNodeStream = s.prerenderToNodeStream;\nexports.prerender = s.prerender;\nexports.resumeAndPrerenderToNodeStream = s.resumeAndPrerenderToNodeStream;\nexports.resumeAndPrerender = s.resumeAndPrerender;\n","/**\n * @license React\n * react-is.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function typeOf(object) {\n      if (\"object\" === typeof object && null !== object) {\n        var $$typeof = object.$$typeof;\n        switch ($$typeof) {\n          case REACT_ELEMENT_TYPE:\n            switch (((object = object.type), object)) {\n              case REACT_FRAGMENT_TYPE:\n              case REACT_PROFILER_TYPE:\n              case REACT_STRICT_MODE_TYPE:\n              case REACT_SUSPENSE_TYPE:\n              case REACT_SUSPENSE_LIST_TYPE:\n              case REACT_VIEW_TRANSITION_TYPE:\n                return object;\n              default:\n                switch (((object = object && object.$$typeof), object)) {\n                  case REACT_CONTEXT_TYPE:\n                  case REACT_FORWARD_REF_TYPE:\n                  case REACT_LAZY_TYPE:\n                  case REACT_MEMO_TYPE:\n                    return object;\n                  case REACT_CONSUMER_TYPE:\n                    return object;\n                  default:\n                    return $$typeof;\n                }\n            }\n          case REACT_PORTAL_TYPE:\n            return $$typeof;\n        }\n      }\n    }\n    var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\");\n    exports.ContextConsumer = REACT_CONSUMER_TYPE;\n    exports.ContextProvider = REACT_CONTEXT_TYPE;\n    exports.Element = REACT_ELEMENT_TYPE;\n    exports.ForwardRef = REACT_FORWARD_REF_TYPE;\n    exports.Fragment = REACT_FRAGMENT_TYPE;\n    exports.Lazy = REACT_LAZY_TYPE;\n    exports.Memo = REACT_MEMO_TYPE;\n    exports.Portal = REACT_PORTAL_TYPE;\n    exports.Profiler = REACT_PROFILER_TYPE;\n    exports.StrictMode = REACT_STRICT_MODE_TYPE;\n    exports.Suspense = REACT_SUSPENSE_TYPE;\n    exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;\n    exports.isContextConsumer = function (object) {\n      return typeOf(object) === REACT_CONSUMER_TYPE;\n    };\n    exports.isContextProvider = function (object) {\n      return typeOf(object) === REACT_CONTEXT_TYPE;\n    };\n    exports.isElement = function (object) {\n      return (\n        \"object\" === typeof object &&\n        null !== object &&\n        object.$$typeof === REACT_ELEMENT_TYPE\n      );\n    };\n    exports.isForwardRef = function (object) {\n      return typeOf(object) === REACT_FORWARD_REF_TYPE;\n    };\n    exports.isFragment = function (object) {\n      return typeOf(object) === REACT_FRAGMENT_TYPE;\n    };\n    exports.isLazy = function (object) {\n      return typeOf(object) === REACT_LAZY_TYPE;\n    };\n    exports.isMemo = function (object) {\n      return typeOf(object) === REACT_MEMO_TYPE;\n    };\n    exports.isPortal = function (object) {\n      return typeOf(object) === REACT_PORTAL_TYPE;\n    };\n    exports.isProfiler = function (object) {\n      return typeOf(object) === REACT_PROFILER_TYPE;\n    };\n    exports.isStrictMode = function (object) {\n      return typeOf(object) === REACT_STRICT_MODE_TYPE;\n    };\n    exports.isSuspense = function (object) {\n      return typeOf(object) === REACT_SUSPENSE_TYPE;\n    };\n    exports.isSuspenseList = function (object) {\n      return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n    };\n    exports.isValidElementType = function (type) {\n      return \"string\" === typeof type ||\n        \"function\" === typeof type ||\n        type === REACT_FRAGMENT_TYPE ||\n        type === REACT_PROFILER_TYPE ||\n        type === REACT_STRICT_MODE_TYPE ||\n        type === REACT_SUSPENSE_TYPE ||\n        type === REACT_SUSPENSE_LIST_TYPE ||\n        type === REACT_VIEW_TRANSITION_TYPE ||\n        (\"object\" === typeof type &&\n          null !== type &&\n          (type.$$typeof === REACT_LAZY_TYPE ||\n            type.$$typeof === REACT_MEMO_TYPE ||\n            type.$$typeof === REACT_CONTEXT_TYPE ||\n            type.$$typeof === REACT_CONSUMER_TYPE ||\n            type.$$typeof === REACT_FORWARD_REF_TYPE ||\n            type.$$typeof === REACT_CLIENT_REFERENCE ||\n            void 0 !== type.getModuleId))\n        ? !0\n        : !1;\n    };\n    exports.typeOf = typeOf;\n  })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-is.production.js');\n} else {\n  module.exports = require('./cjs/react-is.development.js');\n}\n","/**\n * @license React\n * react-server-dom-webpack-client.node.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function checkEvalAvailabilityOnceDev() {\n      if (!hasConfirmedEval) {\n        hasConfirmedEval = !0;\n        try {\n          (0, eval)(\"null\");\n        } catch ($jscomp$unused$catch) {\n          console.error(\n            \"eval() is not supported in this environment. This can happen if you started the Node.js process with --disallow-code-generation-from-strings, or if `eval` was patched by other means. React requires eval() in development mode for various debugging features like reconstructing callstacks from a different environment.\\nReact will never use eval() in production mode\"\n          );\n        }\n      }\n    }\n    function resolveClientReference(bundlerConfig, metadata) {\n      if (bundlerConfig) {\n        var moduleExports = bundlerConfig[metadata[0]];\n        if ((bundlerConfig = moduleExports && moduleExports[metadata[2]]))\n          moduleExports = bundlerConfig.name;\n        else {\n          bundlerConfig = moduleExports && moduleExports[\"*\"];\n          if (!bundlerConfig)\n            throw Error(\n              'Could not find the module \"' +\n                metadata[0] +\n                '\" in the React Server Consumer Manifest. This is probably a bug in the React Server Components bundler.'\n            );\n          moduleExports = metadata[2];\n        }\n        return 4 === metadata.length\n          ? [bundlerConfig.id, bundlerConfig.chunks, moduleExports, 1]\n          : [bundlerConfig.id, bundlerConfig.chunks, moduleExports];\n      }\n      return metadata;\n    }\n    function resolveServerReference(bundlerConfig, id) {\n      var name = \"\",\n        resolvedModuleData = bundlerConfig[id];\n      if (resolvedModuleData) name = resolvedModuleData.name;\n      else {\n        var idx = id.lastIndexOf(\"#\");\n        -1 !== idx &&\n          ((name = id.slice(idx + 1)),\n          (resolvedModuleData = bundlerConfig[id.slice(0, idx)]));\n        if (!resolvedModuleData)\n          throw Error(\n            'Could not find the module \"' +\n              id +\n              '\" in the React Server Manifest. This is probably a bug in the React Server Components bundler.'\n          );\n      }\n      return resolvedModuleData.async\n        ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1]\n        : [resolvedModuleData.id, resolvedModuleData.chunks, name];\n    }\n    function requireAsyncModule(id) {\n      var promise = globalThis.__next_require__(id);\n      if (\"function\" !== typeof promise.then || \"fulfilled\" === promise.status)\n        return null;\n      promise.then(\n        function (value) {\n          promise.status = \"fulfilled\";\n          promise.value = value;\n        },\n        function (reason) {\n          promise.status = \"rejected\";\n          promise.reason = reason;\n        }\n      );\n      return promise;\n    }\n    function ignoreReject() {}\n    function preloadModule(metadata) {\n      for (\n        var chunks = metadata[1], promises = [], i = 0;\n        i < chunks.length;\n\n      ) {\n        var chunkId = chunks[i++];\n        chunks[i++];\n        var entry = chunkCache.get(chunkId);\n        if (void 0 === entry) {\n          entry = __webpack_chunk_load__(chunkId);\n          promises.push(entry);\n          var resolve = chunkCache.set.bind(chunkCache, chunkId, null);\n          entry.then(resolve, ignoreReject);\n          chunkCache.set(chunkId, entry);\n        } else null !== entry && promises.push(entry);\n      }\n      return 4 === metadata.length\n        ? 0 === promises.length\n          ? requireAsyncModule(metadata[0])\n          : Promise.all(promises).then(function () {\n              return requireAsyncModule(metadata[0]);\n            })\n        : 0 < promises.length\n          ? Promise.all(promises)\n          : null;\n    }\n    function requireModule(metadata) {\n      var moduleExports = globalThis.__next_require__(metadata[0]);\n      if (4 === metadata.length && \"function\" === typeof moduleExports.then)\n        if (\"fulfilled\" === moduleExports.status)\n          moduleExports = moduleExports.value;\n        else throw moduleExports.reason;\n      if (\"*\" === metadata[2]) return moduleExports;\n      if (\"\" === metadata[2])\n        return moduleExports.__esModule ? moduleExports.default : moduleExports;\n      if (hasOwnProperty.call(moduleExports, metadata[2]))\n        return moduleExports[metadata[2]];\n    }\n    function prepareDestinationWithChunks(\n      moduleLoading,\n      chunks,\n      nonce$jscomp$0\n    ) {\n      if (null !== moduleLoading)\n        for (var i = 1; i < chunks.length; i += 2) {\n          var nonce = nonce$jscomp$0,\n            JSCompiler_temp_const = ReactDOMSharedInternals.d,\n            JSCompiler_temp_const$jscomp$0 = JSCompiler_temp_const.X,\n            JSCompiler_temp_const$jscomp$1 = moduleLoading.prefix + chunks[i];\n          var JSCompiler_inline_result = moduleLoading.crossOrigin;\n          JSCompiler_inline_result =\n            \"string\" === typeof JSCompiler_inline_result\n              ? \"use-credentials\" === JSCompiler_inline_result\n                ? JSCompiler_inline_result\n                : \"\"\n              : void 0;\n          JSCompiler_temp_const$jscomp$0.call(\n            JSCompiler_temp_const,\n            JSCompiler_temp_const$jscomp$1,\n            { crossOrigin: JSCompiler_inline_result, nonce: nonce }\n          );\n        }\n    }\n    function getIteratorFn(maybeIterable) {\n      if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n        return null;\n      maybeIterable =\n        (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n        maybeIterable[\"@@iterator\"];\n      return \"function\" === typeof maybeIterable ? maybeIterable : null;\n    }\n    function isObjectPrototype(object) {\n      if (!object) return !1;\n      var ObjectPrototype = Object.prototype;\n      if (object === ObjectPrototype) return !0;\n      if (getPrototypeOf(object)) return !1;\n      object = Object.getOwnPropertyNames(object);\n      for (var i = 0; i < object.length; i++)\n        if (!(object[i] in ObjectPrototype)) return !1;\n      return !0;\n    }\n    function isSimpleObject(object) {\n      if (!isObjectPrototype(getPrototypeOf(object))) return !1;\n      for (\n        var names = Object.getOwnPropertyNames(object), i = 0;\n        i < names.length;\n        i++\n      ) {\n        var descriptor = Object.getOwnPropertyDescriptor(object, names[i]);\n        if (\n          !descriptor ||\n          (!descriptor.enumerable &&\n            ((\"key\" !== names[i] && \"ref\" !== names[i]) ||\n              \"function\" !== typeof descriptor.get))\n        )\n          return !1;\n      }\n      return !0;\n    }\n    function objectName(object) {\n      object = Object.prototype.toString.call(object);\n      return object.slice(8, object.length - 1);\n    }\n    function describeKeyForErrorMessage(key) {\n      var encodedKey = JSON.stringify(key);\n      return '\"' + key + '\"' === encodedKey ? key : encodedKey;\n    }\n    function describeValueForErrorMessage(value) {\n      switch (typeof value) {\n        case \"string\":\n          return JSON.stringify(\n            10 >= value.length ? value : value.slice(0, 10) + \"...\"\n          );\n        case \"object\":\n          if (isArrayImpl(value)) return \"[...]\";\n          if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG)\n            return \"client\";\n          value = objectName(value);\n          return \"Object\" === value ? \"{...}\" : value;\n        case \"function\":\n          return value.$$typeof === CLIENT_REFERENCE_TAG\n            ? \"client\"\n            : (value = value.displayName || value.name)\n              ? \"function \" + value\n              : \"function\";\n        default:\n          return String(value);\n      }\n    }\n    function describeElementType(type) {\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (type.$$typeof) {\n          case REACT_FORWARD_REF_TYPE:\n            return describeElementType(type.render);\n          case REACT_MEMO_TYPE:\n            return describeElementType(type.type);\n          case REACT_LAZY_TYPE:\n            var payload = type._payload;\n            type = type._init;\n            try {\n              return describeElementType(type(payload));\n            } catch (x) {}\n        }\n      return \"\";\n    }\n    function describeObjectForErrorMessage(objectOrArray, expandedName) {\n      var objKind = objectName(objectOrArray);\n      if (\"Object\" !== objKind && \"Array\" !== objKind) return objKind;\n      var start = -1,\n        length = 0;\n      if (isArrayImpl(objectOrArray))\n        if (jsxChildrenParents.has(objectOrArray)) {\n          var type = jsxChildrenParents.get(objectOrArray);\n          objKind = \"<\" + describeElementType(type) + \">\";\n          for (var i = 0; i < objectOrArray.length; i++) {\n            var value = objectOrArray[i];\n            value =\n              \"string\" === typeof value\n                ? value\n                : \"object\" === typeof value && null !== value\n                  ? \"{\" + describeObjectForErrorMessage(value) + \"}\"\n                  : \"{\" + describeValueForErrorMessage(value) + \"}\";\n            \"\" + i === expandedName\n              ? ((start = objKind.length),\n                (length = value.length),\n                (objKind += value))\n              : (objKind =\n                  15 > value.length && 40 > objKind.length + value.length\n                    ? objKind + value\n                    : objKind + \"{...}\");\n          }\n          objKind += \"</\" + describeElementType(type) + \">\";\n        } else {\n          objKind = \"[\";\n          for (type = 0; type < objectOrArray.length; type++)\n            0 < type && (objKind += \", \"),\n              (i = objectOrArray[type]),\n              (i =\n                \"object\" === typeof i && null !== i\n                  ? describeObjectForErrorMessage(i)\n                  : describeValueForErrorMessage(i)),\n              \"\" + type === expandedName\n                ? ((start = objKind.length),\n                  (length = i.length),\n                  (objKind += i))\n                : (objKind =\n                    10 > i.length && 40 > objKind.length + i.length\n                      ? objKind + i\n                      : objKind + \"...\");\n          objKind += \"]\";\n        }\n      else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE)\n        objKind = \"<\" + describeElementType(objectOrArray.type) + \"/>\";\n      else {\n        if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return \"client\";\n        if (jsxPropsParents.has(objectOrArray)) {\n          objKind = jsxPropsParents.get(objectOrArray);\n          objKind = \"<\" + (describeElementType(objKind) || \"...\");\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++) {\n            objKind += \" \";\n            value = type[i];\n            objKind += describeKeyForErrorMessage(value) + \"=\";\n            var _value2 = objectOrArray[value];\n            var _substr2 =\n              value === expandedName &&\n              \"object\" === typeof _value2 &&\n              null !== _value2\n                ? describeObjectForErrorMessage(_value2)\n                : describeValueForErrorMessage(_value2);\n            \"string\" !== typeof _value2 && (_substr2 = \"{\" + _substr2 + \"}\");\n            value === expandedName\n              ? ((start = objKind.length),\n                (length = _substr2.length),\n                (objKind += _substr2))\n              : (objKind =\n                  10 > _substr2.length && 40 > objKind.length + _substr2.length\n                    ? objKind + _substr2\n                    : objKind + \"...\");\n          }\n          objKind += \">\";\n        } else {\n          objKind = \"{\";\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++)\n            0 < i && (objKind += \", \"),\n              (value = type[i]),\n              (objKind += describeKeyForErrorMessage(value) + \": \"),\n              (_value2 = objectOrArray[value]),\n              (_value2 =\n                \"object\" === typeof _value2 && null !== _value2\n                  ? describeObjectForErrorMessage(_value2)\n                  : describeValueForErrorMessage(_value2)),\n              value === expandedName\n                ? ((start = objKind.length),\n                  (length = _value2.length),\n                  (objKind += _value2))\n                : (objKind =\n                    10 > _value2.length && 40 > objKind.length + _value2.length\n                      ? objKind + _value2\n                      : objKind + \"...\");\n          objKind += \"}\";\n        }\n      }\n      return void 0 === expandedName\n        ? objKind\n        : -1 < start && 0 < length\n          ? ((objectOrArray = \" \".repeat(start) + \"^\".repeat(length)),\n            \"\\n  \" + objKind + \"\\n  \" + objectOrArray)\n          : \"\\n  \" + objKind;\n    }\n    function serializeNumber(number) {\n      return Number.isFinite(number)\n        ? 0 === number && -Infinity === 1 / number\n          ? \"$-0\"\n          : number\n        : Infinity === number\n          ? \"$Infinity\"\n          : -Infinity === number\n            ? \"$-Infinity\"\n            : \"$NaN\";\n    }\n    function processReply(\n      root,\n      formFieldPrefix,\n      temporaryReferences,\n      resolve,\n      reject\n    ) {\n      function serializeTypedArray(tag, typedArray) {\n        typedArray = new Blob([\n          new Uint8Array(\n            typedArray.buffer,\n            typedArray.byteOffset,\n            typedArray.byteLength\n          )\n        ]);\n        var blobId = nextPartId++;\n        null === formData && (formData = new FormData());\n        formData.append(formFieldPrefix + blobId, typedArray);\n        return \"$\" + tag + blobId.toString(16);\n      }\n      function serializeBinaryReader(reader) {\n        function progress(entry) {\n          entry.done\n            ? ((entry = nextPartId++),\n              data.append(formFieldPrefix + entry, new Blob(buffer)),\n              data.append(\n                formFieldPrefix + streamId,\n                '\"$o' + entry.toString(16) + '\"'\n              ),\n              data.append(formFieldPrefix + streamId, \"C\"),\n              pendingParts--,\n              0 === pendingParts && resolve(data))\n            : (buffer.push(entry.value),\n              reader.read(new Uint8Array(1024)).then(progress, reject));\n        }\n        null === formData && (formData = new FormData());\n        var data = formData;\n        pendingParts++;\n        var streamId = nextPartId++,\n          buffer = [];\n        reader.read(new Uint8Array(1024)).then(progress, reject);\n        return \"$r\" + streamId.toString(16);\n      }\n      function serializeReader(reader) {\n        function progress(entry) {\n          if (entry.done)\n            data.append(formFieldPrefix + streamId, \"C\"),\n              pendingParts--,\n              0 === pendingParts && resolve(data);\n          else\n            try {\n              var partJSON = JSON.stringify(entry.value, resolveToJSON);\n              data.append(formFieldPrefix + streamId, partJSON);\n              reader.read().then(progress, reject);\n            } catch (x) {\n              reject(x);\n            }\n        }\n        null === formData && (formData = new FormData());\n        var data = formData;\n        pendingParts++;\n        var streamId = nextPartId++;\n        reader.read().then(progress, reject);\n        return \"$R\" + streamId.toString(16);\n      }\n      function serializeReadableStream(stream) {\n        try {\n          var binaryReader = stream.getReader({ mode: \"byob\" });\n        } catch (x) {\n          return serializeReader(stream.getReader());\n        }\n        return serializeBinaryReader(binaryReader);\n      }\n      function serializeAsyncIterable(iterable, iterator) {\n        function progress(entry) {\n          if (entry.done) {\n            if (void 0 === entry.value)\n              data.append(formFieldPrefix + streamId, \"C\");\n            else\n              try {\n                var partJSON = JSON.stringify(entry.value, resolveToJSON);\n                data.append(formFieldPrefix + streamId, \"C\" + partJSON);\n              } catch (x) {\n                reject(x);\n                return;\n              }\n            pendingParts--;\n            0 === pendingParts && resolve(data);\n          } else\n            try {\n              var _partJSON = JSON.stringify(entry.value, resolveToJSON);\n              data.append(formFieldPrefix + streamId, _partJSON);\n              iterator.next().then(progress, reject);\n            } catch (x$0) {\n              reject(x$0);\n            }\n        }\n        null === formData && (formData = new FormData());\n        var data = formData;\n        pendingParts++;\n        var streamId = nextPartId++;\n        iterable = iterable === iterator;\n        iterator.next().then(progress, reject);\n        return \"$\" + (iterable ? \"x\" : \"X\") + streamId.toString(16);\n      }\n      function resolveToJSON(key, value) {\n        \"__proto__\" === key &&\n          console.error(\n            \"Expected not to serialize an object with own property `__proto__`. When parsed this property will be omitted.%s\",\n            describeObjectForErrorMessage(this, key)\n          );\n        var originalValue = this[key];\n        \"object\" !== typeof originalValue ||\n          originalValue === value ||\n          originalValue instanceof Date ||\n          (\"Object\" !== objectName(originalValue)\n            ? console.error(\n                \"Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s\",\n                objectName(originalValue),\n                describeObjectForErrorMessage(this, key)\n              )\n            : console.error(\n                \"Only plain objects can be passed to Server Functions from the Client. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s\",\n                describeObjectForErrorMessage(this, key)\n              ));\n        if (null === value) return null;\n        if (\"object\" === typeof value) {\n          switch (value.$$typeof) {\n            case REACT_ELEMENT_TYPE:\n              if (void 0 !== temporaryReferences && -1 === key.indexOf(\":\")) {\n                var parentReference = writtenObjects.get(this);\n                if (void 0 !== parentReference)\n                  return (\n                    temporaryReferences.set(parentReference + \":\" + key, value),\n                    \"$T\"\n                  );\n              }\n              if (void 0 !== temporaryReferences && modelRoot === value)\n                return (modelRoot = null), \"$T\";\n              throw Error(\n                \"React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options.\" +\n                  describeObjectForErrorMessage(this, key)\n              );\n            case REACT_LAZY_TYPE:\n              originalValue = value._payload;\n              var init = value._init;\n              null === formData && (formData = new FormData());\n              pendingParts++;\n              try {\n                parentReference = init(originalValue);\n                var lazyId = nextPartId++,\n                  partJSON = serializeModel(parentReference, lazyId);\n                formData.append(formFieldPrefix + lazyId, partJSON);\n                return \"$\" + lazyId.toString(16);\n              } catch (x) {\n                if (\n                  \"object\" === typeof x &&\n                  null !== x &&\n                  \"function\" === typeof x.then\n                ) {\n                  pendingParts++;\n                  var _lazyId = nextPartId++;\n                  parentReference = function () {\n                    try {\n                      var _partJSON2 = serializeModel(value, _lazyId),\n                        _data = formData;\n                      _data.append(formFieldPrefix + _lazyId, _partJSON2);\n                      pendingParts--;\n                      0 === pendingParts && resolve(_data);\n                    } catch (reason) {\n                      reject(reason);\n                    }\n                  };\n                  x.then(parentReference, parentReference);\n                  return \"$\" + _lazyId.toString(16);\n                }\n                reject(x);\n                return null;\n              } finally {\n                pendingParts--;\n              }\n          }\n          parentReference = writtenObjects.get(value);\n          if (\"function\" === typeof value.then) {\n            if (void 0 !== parentReference)\n              if (modelRoot === value) modelRoot = null;\n              else return parentReference;\n            null === formData && (formData = new FormData());\n            pendingParts++;\n            var promiseId = nextPartId++;\n            key = \"$@\" + promiseId.toString(16);\n            writtenObjects.set(value, key);\n            value.then(function (partValue) {\n              try {\n                var previousReference = writtenObjects.get(partValue);\n                var _partJSON3 =\n                  void 0 !== previousReference\n                    ? JSON.stringify(previousReference)\n                    : serializeModel(partValue, promiseId);\n                partValue = formData;\n                partValue.append(formFieldPrefix + promiseId, _partJSON3);\n                pendingParts--;\n                0 === pendingParts && resolve(partValue);\n              } catch (reason) {\n                reject(reason);\n              }\n            }, reject);\n            return key;\n          }\n          if (void 0 !== parentReference)\n            if (modelRoot === value) modelRoot = null;\n            else return parentReference;\n          else\n            -1 === key.indexOf(\":\") &&\n              ((parentReference = writtenObjects.get(this)),\n              void 0 !== parentReference &&\n                ((parentReference = parentReference + \":\" + key),\n                writtenObjects.set(value, parentReference),\n                void 0 !== temporaryReferences &&\n                  temporaryReferences.set(parentReference, value)));\n          if (isArrayImpl(value)) return value;\n          if (value instanceof FormData) {\n            null === formData && (formData = new FormData());\n            var _data3 = formData;\n            key = nextPartId++;\n            var prefix = formFieldPrefix + key + \"_\";\n            value.forEach(function (originalValue, originalKey) {\n              _data3.append(prefix + originalKey, originalValue);\n            });\n            return \"$K\" + key.toString(16);\n          }\n          if (value instanceof Map)\n            return (\n              (key = nextPartId++),\n              (parentReference = serializeModel(Array.from(value), key)),\n              null === formData && (formData = new FormData()),\n              formData.append(formFieldPrefix + key, parentReference),\n              \"$Q\" + key.toString(16)\n            );\n          if (value instanceof Set)\n            return (\n              (key = nextPartId++),\n              (parentReference = serializeModel(Array.from(value), key)),\n              null === formData && (formData = new FormData()),\n              formData.append(formFieldPrefix + key, parentReference),\n              \"$W\" + key.toString(16)\n            );\n          if (value instanceof ArrayBuffer)\n            return (\n              (key = new Blob([value])),\n              (parentReference = nextPartId++),\n              null === formData && (formData = new FormData()),\n              formData.append(formFieldPrefix + parentReference, key),\n              \"$A\" + parentReference.toString(16)\n            );\n          if (value instanceof Int8Array)\n            return serializeTypedArray(\"O\", value);\n          if (value instanceof Uint8Array)\n            return serializeTypedArray(\"o\", value);\n          if (value instanceof Uint8ClampedArray)\n            return serializeTypedArray(\"U\", value);\n          if (value instanceof Int16Array)\n            return serializeTypedArray(\"S\", value);\n          if (value instanceof Uint16Array)\n            return serializeTypedArray(\"s\", value);\n          if (value instanceof Int32Array)\n            return serializeTypedArray(\"L\", value);\n          if (value instanceof Uint32Array)\n            return serializeTypedArray(\"l\", value);\n          if (value instanceof Float32Array)\n            return serializeTypedArray(\"G\", value);\n          if (value instanceof Float64Array)\n            return serializeTypedArray(\"g\", value);\n          if (value instanceof BigInt64Array)\n            return serializeTypedArray(\"M\", value);\n          if (value instanceof BigUint64Array)\n            return serializeTypedArray(\"m\", value);\n          if (value instanceof DataView) return serializeTypedArray(\"V\", value);\n          if (\"function\" === typeof Blob && value instanceof Blob)\n            return (\n              null === formData && (formData = new FormData()),\n              (key = nextPartId++),\n              formData.append(formFieldPrefix + key, value),\n              \"$B\" + key.toString(16)\n            );\n          if ((parentReference = getIteratorFn(value)))\n            return (\n              (parentReference = parentReference.call(value)),\n              parentReference === value\n                ? ((key = nextPartId++),\n                  (parentReference = serializeModel(\n                    Array.from(parentReference),\n                    key\n                  )),\n                  null === formData && (formData = new FormData()),\n                  formData.append(formFieldPrefix + key, parentReference),\n                  \"$i\" + key.toString(16))\n                : Array.from(parentReference)\n            );\n          if (\n            \"function\" === typeof ReadableStream &&\n            value instanceof ReadableStream\n          )\n            return serializeReadableStream(value);\n          parentReference = value[ASYNC_ITERATOR];\n          if (\"function\" === typeof parentReference)\n            return serializeAsyncIterable(value, parentReference.call(value));\n          parentReference = getPrototypeOf(value);\n          if (\n            parentReference !== ObjectPrototype &&\n            (null === parentReference ||\n              null !== getPrototypeOf(parentReference))\n          ) {\n            if (void 0 === temporaryReferences)\n              throw Error(\n                \"Only plain objects, and a few built-ins, can be passed to Server Functions. Classes or null prototypes are not supported.\" +\n                  describeObjectForErrorMessage(this, key)\n              );\n            return \"$T\";\n          }\n          value.$$typeof === REACT_CONTEXT_TYPE\n            ? console.error(\n                \"React Context Providers cannot be passed to Server Functions from the Client.%s\",\n                describeObjectForErrorMessage(this, key)\n              )\n            : \"Object\" !== objectName(value)\n              ? console.error(\n                  \"Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s\",\n                  objectName(value),\n                  describeObjectForErrorMessage(this, key)\n                )\n              : isSimpleObject(value)\n                ? Object.getOwnPropertySymbols &&\n                  ((parentReference = Object.getOwnPropertySymbols(value)),\n                  0 < parentReference.length &&\n                    console.error(\n                      \"Only plain objects can be passed to Server Functions from the Client. Objects with symbol properties like %s are not supported.%s\",\n                      parentReference[0].description,\n                      describeObjectForErrorMessage(this, key)\n                    ))\n                : console.error(\n                    \"Only plain objects can be passed to Server Functions from the Client. Classes or other objects with methods are not supported.%s\",\n                    describeObjectForErrorMessage(this, key)\n                  );\n          return value;\n        }\n        if (\"string\" === typeof value) {\n          if (\"Z\" === value[value.length - 1] && this[key] instanceof Date)\n            return \"$D\" + value;\n          key = \"$\" === value[0] ? \"$\" + value : value;\n          return key;\n        }\n        if (\"boolean\" === typeof value) return value;\n        if (\"number\" === typeof value) return serializeNumber(value);\n        if (\"undefined\" === typeof value) return \"$undefined\";\n        if (\"function\" === typeof value) {\n          parentReference = knownServerReferences.get(value);\n          if (void 0 !== parentReference) {\n            key = writtenObjects.get(value);\n            if (void 0 !== key) return key;\n            key = JSON.stringify(\n              { id: parentReference.id, bound: parentReference.bound },\n              resolveToJSON\n            );\n            null === formData && (formData = new FormData());\n            parentReference = nextPartId++;\n            formData.set(formFieldPrefix + parentReference, key);\n            key = \"$h\" + parentReference.toString(16);\n            writtenObjects.set(value, key);\n            return key;\n          }\n          if (\n            void 0 !== temporaryReferences &&\n            -1 === key.indexOf(\":\") &&\n            ((parentReference = writtenObjects.get(this)),\n            void 0 !== parentReference)\n          )\n            return (\n              temporaryReferences.set(parentReference + \":\" + key, value), \"$T\"\n            );\n          throw Error(\n            \"Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again.\"\n          );\n        }\n        if (\"symbol\" === typeof value) {\n          if (\n            void 0 !== temporaryReferences &&\n            -1 === key.indexOf(\":\") &&\n            ((parentReference = writtenObjects.get(this)),\n            void 0 !== parentReference)\n          )\n            return (\n              temporaryReferences.set(parentReference + \":\" + key, value), \"$T\"\n            );\n          throw Error(\n            \"Symbols cannot be passed to a Server Function without a temporary reference set. Pass a TemporaryReferenceSet to the options.\" +\n              describeObjectForErrorMessage(this, key)\n          );\n        }\n        if (\"bigint\" === typeof value) return \"$n\" + value.toString(10);\n        throw Error(\n          \"Type \" +\n            typeof value +\n            \" is not supported as an argument to a Server Function.\"\n        );\n      }\n      function serializeModel(model, id) {\n        \"object\" === typeof model &&\n          null !== model &&\n          ((id = \"$\" + id.toString(16)),\n          writtenObjects.set(model, id),\n          void 0 !== temporaryReferences && temporaryReferences.set(id, model));\n        modelRoot = model;\n        return JSON.stringify(model, resolveToJSON);\n      }\n      var nextPartId = 1,\n        pendingParts = 0,\n        formData = null,\n        writtenObjects = new WeakMap(),\n        modelRoot = root;\n      checkEvalAvailabilityOnceDev();\n      var json = serializeModel(root, 0);\n      null === formData\n        ? resolve(json)\n        : (formData.set(formFieldPrefix + \"0\", json),\n          0 === pendingParts && resolve(formData));\n      return function () {\n        0 < pendingParts &&\n          ((pendingParts = 0),\n          null === formData ? resolve(json) : resolve(formData));\n      };\n    }\n    function encodeFormData(reference) {\n      var resolve,\n        reject,\n        thenable = new Promise(function (res, rej) {\n          resolve = res;\n          reject = rej;\n        });\n      processReply(\n        reference,\n        \"\",\n        void 0,\n        function (body) {\n          if (\"string\" === typeof body) {\n            var data = new FormData();\n            data.append(\"0\", body);\n            body = data;\n          }\n          thenable.status = \"fulfilled\";\n          thenable.value = body;\n          resolve(body);\n        },\n        function (e) {\n          thenable.status = \"rejected\";\n          thenable.reason = e;\n          reject(e);\n        }\n      );\n      return thenable;\n    }\n    function defaultEncodeFormAction(identifierPrefix) {\n      var referenceClosure = knownServerReferences.get(this);\n      if (!referenceClosure)\n        throw Error(\n          \"Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.\"\n        );\n      var data = null;\n      if (null !== referenceClosure.bound) {\n        data = boundCache.get(referenceClosure);\n        data ||\n          ((data = encodeFormData({\n            id: referenceClosure.id,\n            bound: referenceClosure.bound\n          })),\n          boundCache.set(referenceClosure, data));\n        if (\"rejected\" === data.status) throw data.reason;\n        if (\"fulfilled\" !== data.status) throw data;\n        referenceClosure = data.value;\n        var prefixedData = new FormData();\n        referenceClosure.forEach(function (value, key) {\n          prefixedData.append(\"$ACTION_\" + identifierPrefix + \":\" + key, value);\n        });\n        data = prefixedData;\n        referenceClosure = \"$ACTION_REF_\" + identifierPrefix;\n      } else referenceClosure = \"$ACTION_ID_\" + referenceClosure.id;\n      return {\n        name: referenceClosure,\n        method: \"POST\",\n        encType: \"multipart/form-data\",\n        data: data\n      };\n    }\n    function isSignatureEqual(referenceId, numberOfBoundArgs) {\n      var referenceClosure = knownServerReferences.get(this);\n      if (!referenceClosure)\n        throw Error(\n          \"Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.\"\n        );\n      if (referenceClosure.id !== referenceId) return !1;\n      var boundPromise = referenceClosure.bound;\n      if (null === boundPromise) return 0 === numberOfBoundArgs;\n      switch (boundPromise.status) {\n        case \"fulfilled\":\n          return boundPromise.value.length === numberOfBoundArgs;\n        case \"pending\":\n          throw boundPromise;\n        case \"rejected\":\n          throw boundPromise.reason;\n        default:\n          throw (\n            (\"string\" !== typeof boundPromise.status &&\n              ((boundPromise.status = \"pending\"),\n              boundPromise.then(\n                function (boundArgs) {\n                  boundPromise.status = \"fulfilled\";\n                  boundPromise.value = boundArgs;\n                },\n                function (error) {\n                  boundPromise.status = \"rejected\";\n                  boundPromise.reason = error;\n                }\n              )),\n            boundPromise)\n          );\n      }\n    }\n    function createFakeServerFunction(\n      name,\n      filename,\n      sourceMap,\n      line,\n      col,\n      environmentName,\n      innerFunction\n    ) {\n      name || (name = \"<anonymous>\");\n      var encodedName = JSON.stringify(name);\n      1 >= line\n        ? ((line = encodedName.length + 7),\n          (col =\n            \"s=>({\" +\n            encodedName +\n            \" \".repeat(col < line ? 0 : col - line) +\n            \":(...args) => s(...args)})\\n/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */\"))\n        : (col =\n            \"/* This module is a proxy to a Server Action. Turn on Source Maps to see the server source. */\" +\n            \"\\n\".repeat(line - 2) +\n            \"server=>({\" +\n            encodedName +\n            \":\\n\" +\n            \" \".repeat(1 > col ? 0 : col - 1) +\n            \"(...args) => server(...args)})\");\n      filename.startsWith(\"/\") && (filename = \"file://\" + filename);\n      sourceMap\n        ? ((col +=\n            \"\\n//# sourceURL=about://React/\" +\n            encodeURIComponent(environmentName) +\n            \"/\" +\n            encodeURI(filename) +\n            \"?s\" +\n            fakeServerFunctionIdx++),\n          (col += \"\\n//# sourceMappingURL=\" + sourceMap))\n        : filename && (col += \"\\n//# sourceURL=\" + filename);\n      try {\n        return (0, eval)(col)(innerFunction)[name];\n      } catch (x) {\n        return innerFunction;\n      }\n    }\n    function registerBoundServerReference(\n      reference,\n      id,\n      bound,\n      encodeFormAction\n    ) {\n      knownServerReferences.has(reference) ||\n        (knownServerReferences.set(reference, {\n          id: id,\n          originalBind: reference.bind,\n          bound: bound\n        }),\n        Object.defineProperties(reference, {\n          $$FORM_ACTION: {\n            value:\n              void 0 === encodeFormAction\n                ? defaultEncodeFormAction\n                : function () {\n                    var referenceClosure = knownServerReferences.get(this);\n                    if (!referenceClosure)\n                      throw Error(\n                        \"Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.\"\n                      );\n                    var boundPromise = referenceClosure.bound;\n                    null === boundPromise &&\n                      (boundPromise = Promise.resolve([]));\n                    return encodeFormAction(referenceClosure.id, boundPromise);\n                  }\n          },\n          $$IS_SIGNATURE_EQUAL: { value: isSignatureEqual },\n          bind: { value: bind }\n        }));\n    }\n    function bind() {\n      var referenceClosure = knownServerReferences.get(this);\n      if (!referenceClosure) return FunctionBind.apply(this, arguments);\n      var newFn = referenceClosure.originalBind.apply(this, arguments);\n      null != arguments[0] &&\n        console.error(\n          'Cannot bind \"this\" of a Server Action. Pass null or undefined as the first argument to .bind().'\n        );\n      var args = ArraySlice.call(arguments, 1),\n        boundPromise = null;\n      boundPromise =\n        null !== referenceClosure.bound\n          ? Promise.resolve(referenceClosure.bound).then(function (boundArgs) {\n              return boundArgs.concat(args);\n            })\n          : Promise.resolve(args);\n      knownServerReferences.set(newFn, {\n        id: referenceClosure.id,\n        originalBind: newFn.bind,\n        bound: boundPromise\n      });\n      Object.defineProperties(newFn, {\n        $$FORM_ACTION: { value: this.$$FORM_ACTION },\n        $$IS_SIGNATURE_EQUAL: { value: isSignatureEqual },\n        bind: { value: bind }\n      });\n      return newFn;\n    }\n    function createBoundServerReference(\n      metaData,\n      callServer,\n      encodeFormAction,\n      findSourceMapURL\n    ) {\n      function action() {\n        var args = Array.prototype.slice.call(arguments);\n        return bound\n          ? \"fulfilled\" === bound.status\n            ? callServer(id, bound.value.concat(args))\n            : Promise.resolve(bound).then(function (boundArgs) {\n                return callServer(id, boundArgs.concat(args));\n              })\n          : callServer(id, args);\n      }\n      var id = metaData.id,\n        bound = metaData.bound,\n        location = metaData.location;\n      if (location) {\n        var functionName = metaData.name || \"\",\n          filename = location[1],\n          line = location[2];\n        location = location[3];\n        metaData = metaData.env || \"Server\";\n        findSourceMapURL =\n          null == findSourceMapURL\n            ? null\n            : findSourceMapURL(filename, metaData);\n        action = createFakeServerFunction(\n          functionName,\n          filename,\n          findSourceMapURL,\n          line,\n          location,\n          metaData,\n          action\n        );\n      }\n      registerBoundServerReference(action, id, bound, encodeFormAction);\n      return action;\n    }\n    function parseStackLocation(error) {\n      error = error.stack;\n      error.startsWith(\"Error: react-stack-top-frame\\n\") &&\n        (error = error.slice(29));\n      var endOfFirst = error.indexOf(\"\\n\");\n      if (-1 !== endOfFirst) {\n        var endOfSecond = error.indexOf(\"\\n\", endOfFirst + 1);\n        endOfFirst =\n          -1 === endOfSecond\n            ? error.slice(endOfFirst + 1)\n            : error.slice(endOfFirst + 1, endOfSecond);\n      } else endOfFirst = error;\n      error = v8FrameRegExp.exec(endOfFirst);\n      if (\n        !error &&\n        ((error = jscSpiderMonkeyFrameRegExp.exec(endOfFirst)), !error)\n      )\n        return null;\n      endOfFirst = error[1] || \"\";\n      \"<anonymous>\" === endOfFirst && (endOfFirst = \"\");\n      endOfSecond = error[2] || error[5] || \"\";\n      \"<anonymous>\" === endOfSecond && (endOfSecond = \"\");\n      return [\n        endOfFirst,\n        endOfSecond,\n        +(error[3] || error[6]),\n        +(error[4] || error[7])\n      ];\n    }\n    function createServerReference$1(\n      id,\n      callServer,\n      encodeFormAction,\n      findSourceMapURL,\n      functionName\n    ) {\n      function action() {\n        var args = Array.prototype.slice.call(arguments);\n        return callServer(id, args);\n      }\n      var location = parseStackLocation(Error(\"react-stack-top-frame\"));\n      if (null !== location) {\n        var filename = location[1],\n          line = location[2];\n        location = location[3];\n        findSourceMapURL =\n          null == findSourceMapURL\n            ? null\n            : findSourceMapURL(filename, \"Client\");\n        action = createFakeServerFunction(\n          functionName || \"\",\n          filename,\n          findSourceMapURL,\n          line,\n          location,\n          \"Client\",\n          action\n        );\n      }\n      registerBoundServerReference(action, id, null, encodeFormAction);\n      return action;\n    }\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function getArrayKind(array) {\n      for (var kind = 0, i = 0; i < array.length && 100 > i; i++) {\n        var value = array[i];\n        if (\"object\" === typeof value && null !== value)\n          if (\n            isArrayImpl(value) &&\n            2 === value.length &&\n            \"string\" === typeof value[0]\n          ) {\n            if (0 !== kind && 3 !== kind) return 1;\n            kind = 3;\n          } else return 1;\n        else {\n          if (\n            \"function\" === typeof value ||\n            (\"string\" === typeof value && 50 < value.length) ||\n            (0 !== kind && 2 !== kind) ||\n            \"bigint\" === typeof value\n          )\n            return 1;\n          kind = 2;\n        }\n      }\n      return kind;\n    }\n    function addObjectToProperties(object, properties, indent, prefix) {\n      var addedProperties = 0,\n        key;\n      for (key in object)\n        if (\n          hasOwnProperty.call(object, key) &&\n          \"_\" !== key[0] &&\n          (addedProperties++,\n          addValueToProperties(key, object[key], properties, indent, prefix),\n          100 <= addedProperties)\n        ) {\n          properties.push([\n            prefix +\n              \"\\u00a0\\u00a0\".repeat(indent) +\n              \"Only 100 properties are shown. React will not log more properties of this object.\",\n            \"\"\n          ]);\n          break;\n        }\n    }\n    function addValueToProperties(\n      propertyName,\n      value,\n      properties,\n      indent,\n      prefix\n    ) {\n      switch (typeof value) {\n        case \"object\":\n          if (null === value) {\n            value = \"null\";\n            break;\n          } else {\n            if (\n              (\"$$typeof\" in value && hasOwnProperty.call(value, \"$$typeof\")\n                ? value.$$typeof\n                : void 0) === REACT_ELEMENT_TYPE\n            ) {\n              var typeName = getComponentNameFromType(value.type) || \"\\u2026\",\n                key = value.key;\n              value = value.props;\n              var propsKeys = Object.keys(value),\n                propsLength = propsKeys.length;\n              if (null == key && 0 === propsLength) {\n                value = \"<\" + typeName + \" />\";\n                break;\n              }\n              if (\n                3 > indent ||\n                (1 === propsLength &&\n                  \"children\" === propsKeys[0] &&\n                  null == key)\n              ) {\n                value = \"<\" + typeName + \" \\u2026 />\";\n                break;\n              }\n              properties.push([\n                prefix + \"\\u00a0\\u00a0\".repeat(indent) + propertyName,\n                \"<\" + typeName\n              ]);\n              null !== key &&\n                addValueToProperties(\n                  \"key\",\n                  key,\n                  properties,\n                  indent + 1,\n                  prefix\n                );\n              propertyName = !1;\n              key = 0;\n              for (var propKey in value)\n                if (\n                  (key++,\n                  \"children\" === propKey\n                    ? null != value.children &&\n                      (!isArrayImpl(value.children) ||\n                        0 < value.children.length) &&\n                      (propertyName = !0)\n                    : hasOwnProperty.call(value, propKey) &&\n                      \"_\" !== propKey[0] &&\n                      addValueToProperties(\n                        propKey,\n                        value[propKey],\n                        properties,\n                        indent + 1,\n                        prefix\n                      ),\n                  100 <= key)\n                )\n                  break;\n              properties.push([\n                \"\",\n                propertyName ? \">\\u2026</\" + typeName + \">\" : \"/>\"\n              ]);\n              return;\n            }\n            typeName = Object.prototype.toString.call(value);\n            propKey = typeName.slice(8, typeName.length - 1);\n            if (\"Array\" === propKey)\n              if (\n                ((typeName = 100 < value.length),\n                (key = getArrayKind(value)),\n                2 === key || 0 === key)\n              ) {\n                value = JSON.stringify(\n                  typeName ? value.slice(0, 100).concat(\"\\u2026\") : value\n                );\n                break;\n              } else if (3 === key) {\n                properties.push([\n                  prefix + \"\\u00a0\\u00a0\".repeat(indent) + propertyName,\n                  \"\"\n                ]);\n                for (\n                  propertyName = 0;\n                  propertyName < value.length && 100 > propertyName;\n                  propertyName++\n                )\n                  (propKey = value[propertyName]),\n                    addValueToProperties(\n                      propKey[0],\n                      propKey[1],\n                      properties,\n                      indent + 1,\n                      prefix\n                    );\n                typeName &&\n                  addValueToProperties(\n                    (100).toString(),\n                    \"\\u2026\",\n                    properties,\n                    indent + 1,\n                    prefix\n                  );\n                return;\n              }\n            if (\"Promise\" === propKey) {\n              if (\"fulfilled\" === value.status) {\n                if (\n                  ((typeName = properties.length),\n                  addValueToProperties(\n                    propertyName,\n                    value.value,\n                    properties,\n                    indent,\n                    prefix\n                  ),\n                  properties.length > typeName)\n                ) {\n                  properties = properties[typeName];\n                  properties[1] =\n                    \"Promise<\" + (properties[1] || \"Object\") + \">\";\n                  return;\n                }\n              } else if (\n                \"rejected\" === value.status &&\n                ((typeName = properties.length),\n                addValueToProperties(\n                  propertyName,\n                  value.reason,\n                  properties,\n                  indent,\n                  prefix\n                ),\n                properties.length > typeName)\n              ) {\n                properties = properties[typeName];\n                properties[1] = \"Rejected Promise<\" + properties[1] + \">\";\n                return;\n              }\n              properties.push([\n                \"\\u00a0\\u00a0\".repeat(indent) + propertyName,\n                \"Promise\"\n              ]);\n              return;\n            }\n            \"Object\" === propKey &&\n              (typeName = Object.getPrototypeOf(value)) &&\n              \"function\" === typeof typeName.constructor &&\n              (propKey = typeName.constructor.name);\n            properties.push([\n              prefix + \"\\u00a0\\u00a0\".repeat(indent) + propertyName,\n              \"Object\" === propKey ? (3 > indent ? \"\" : \"\\u2026\") : propKey\n            ]);\n            3 > indent &&\n              addObjectToProperties(value, properties, indent + 1, prefix);\n            return;\n          }\n        case \"function\":\n          value = value.name;\n          value =\n            \"\" === value || \"string\" !== typeof value\n              ? \"() => {}\"\n              : value + \"() {}\";\n          break;\n        case \"string\":\n          value =\n            \"This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.\" ===\n            value\n              ? \"\\u2026\"\n              : JSON.stringify(value);\n          break;\n        case \"undefined\":\n          value = \"undefined\";\n          break;\n        case \"boolean\":\n          value = value ? \"true\" : \"false\";\n          break;\n        default:\n          value = String(value);\n      }\n      properties.push([\n        prefix + \"\\u00a0\\u00a0\".repeat(indent) + propertyName,\n        value\n      ]);\n    }\n    function getIODescription(value) {\n      try {\n        switch (typeof value) {\n          case \"function\":\n            return value.name || \"\";\n          case \"object\":\n            if (null === value) return \"\";\n            if (value instanceof Error) return String(value.message);\n            if (\"string\" === typeof value.url) return value.url;\n            if (\"string\" === typeof value.href) return value.href;\n            if (\"string\" === typeof value.src) return value.src;\n            if (\"string\" === typeof value.currentSrc) return value.currentSrc;\n            if (\"string\" === typeof value.command) return value.command;\n            if (\n              \"object\" === typeof value.request &&\n              null !== value.request &&\n              \"string\" === typeof value.request.url\n            )\n              return value.request.url;\n            if (\n              \"object\" === typeof value.response &&\n              null !== value.response &&\n              \"string\" === typeof value.response.url\n            )\n              return value.response.url;\n            if (\n              \"string\" === typeof value.id ||\n              \"number\" === typeof value.id ||\n              \"bigint\" === typeof value.id\n            )\n              return String(value.id);\n            if (\"string\" === typeof value.name) return value.name;\n            var str = value.toString();\n            return str.startsWith(\"[object \") ||\n              5 > str.length ||\n              500 < str.length\n              ? \"\"\n              : str;\n          case \"string\":\n            return 5 > value.length || 500 < value.length ? \"\" : value;\n          case \"number\":\n          case \"bigint\":\n            return String(value);\n          default:\n            return \"\";\n        }\n      } catch (x) {\n        return \"\";\n      }\n    }\n    function markAllTracksInOrder() {\n      supportsUserTiming &&\n        (console.timeStamp(\n          \"Server Requests Track\",\n          0.001,\n          0.001,\n          \"Server Requests \\u269b\",\n          void 0,\n          \"primary-light\"\n        ),\n        console.timeStamp(\n          \"Server Components Track\",\n          0.001,\n          0.001,\n          \"Primary\",\n          \"Server Components \\u269b\",\n          \"primary-light\"\n        ));\n    }\n    function getIOColor(functionName) {\n      switch (functionName.charCodeAt(0) % 3) {\n        case 0:\n          return \"tertiary-light\";\n        case 1:\n          return \"tertiary\";\n        default:\n          return \"tertiary-dark\";\n      }\n    }\n    function getIOLongName(ioInfo, description, env, rootEnv) {\n      ioInfo = ioInfo.name;\n      description =\n        \"\" === description ? ioInfo : ioInfo + \" (\" + description + \")\";\n      return env === rootEnv || void 0 === env\n        ? description\n        : description + \" [\" + env + \"]\";\n    }\n    function getIOShortName(ioInfo, description, env, rootEnv) {\n      ioInfo = ioInfo.name;\n      env = env === rootEnv || void 0 === env ? \"\" : \" [\" + env + \"]\";\n      var desc = \"\";\n      rootEnv = 30 - ioInfo.length - env.length;\n      if (1 < rootEnv) {\n        var l = description.length;\n        if (0 < l && l <= rootEnv) desc = \" (\" + description + \")\";\n        else if (\n          description.startsWith(\"http://\") ||\n          description.startsWith(\"https://\") ||\n          description.startsWith(\"/\")\n        ) {\n          var queryIdx = description.indexOf(\"?\");\n          -1 === queryIdx && (queryIdx = description.length);\n          47 === description.charCodeAt(queryIdx - 1) && queryIdx--;\n          desc = description.lastIndexOf(\"/\", queryIdx - 1);\n          queryIdx - desc < rootEnv\n            ? (desc = \" (\\u2026\" + description.slice(desc, queryIdx) + \")\")\n            : ((l = description.slice(desc, desc + rootEnv / 2)),\n              (description = description.slice(\n                queryIdx - rootEnv / 2,\n                queryIdx\n              )),\n              (desc =\n                \" (\" +\n                (0 < desc ? \"\\u2026\" : \"\") +\n                l +\n                \"\\u2026\" +\n                description +\n                \")\"));\n        }\n      }\n      return ioInfo + desc + env;\n    }\n    function logComponentAwait(\n      asyncInfo,\n      trackIdx,\n      startTime,\n      endTime,\n      rootEnv,\n      value\n    ) {\n      if (supportsUserTiming && 0 < endTime) {\n        var description = getIODescription(value),\n          name = getIOShortName(\n            asyncInfo.awaited,\n            description,\n            asyncInfo.env,\n            rootEnv\n          ),\n          entryName = \"await \" + name;\n        name = getIOColor(name);\n        var debugTask = asyncInfo.debugTask || asyncInfo.awaited.debugTask;\n        if (debugTask) {\n          var properties = [];\n          \"object\" === typeof value && null !== value\n            ? addObjectToProperties(value, properties, 0, \"\")\n            : void 0 !== value &&\n              addValueToProperties(\"awaited value\", value, properties, 0, \"\");\n          asyncInfo = getIOLongName(\n            asyncInfo.awaited,\n            description,\n            asyncInfo.env,\n            rootEnv\n          );\n          debugTask.run(\n            performance.measure.bind(performance, entryName, {\n              start: 0 > startTime ? 0 : startTime,\n              end: endTime,\n              detail: {\n                devtools: {\n                  color: name,\n                  track: trackNames[trackIdx],\n                  trackGroup: \"Server Components \\u269b\",\n                  properties: properties,\n                  tooltipText: asyncInfo\n                }\n              }\n            })\n          );\n          performance.clearMeasures(entryName);\n        } else\n          console.timeStamp(\n            entryName,\n            0 > startTime ? 0 : startTime,\n            endTime,\n            trackNames[trackIdx],\n            \"Server Components \\u269b\",\n            name\n          );\n      }\n    }\n    function logIOInfoErrored(ioInfo, rootEnv, error) {\n      var startTime = ioInfo.start,\n        endTime = ioInfo.end;\n      if (supportsUserTiming && 0 <= endTime) {\n        var description = getIODescription(error),\n          entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv),\n          debugTask = ioInfo.debugTask;\n        entryName = \"\\u200b\" + entryName;\n        debugTask\n          ? ((error = [\n              [\n                \"rejected with\",\n                \"object\" === typeof error &&\n                null !== error &&\n                \"string\" === typeof error.message\n                  ? String(error.message)\n                  : String(error)\n              ]\n            ]),\n            (ioInfo =\n              getIOLongName(ioInfo, description, ioInfo.env, rootEnv) +\n              \" Rejected\"),\n            debugTask.run(\n              performance.measure.bind(performance, entryName, {\n                start: 0 > startTime ? 0 : startTime,\n                end: endTime,\n                detail: {\n                  devtools: {\n                    color: \"error\",\n                    track: \"Server Requests \\u269b\",\n                    properties: error,\n                    tooltipText: ioInfo\n                  }\n                }\n              })\n            ),\n            performance.clearMeasures(entryName))\n          : console.timeStamp(\n              entryName,\n              0 > startTime ? 0 : startTime,\n              endTime,\n              \"Server Requests \\u269b\",\n              void 0,\n              \"error\"\n            );\n      }\n    }\n    function logIOInfo(ioInfo, rootEnv, value) {\n      var startTime = ioInfo.start,\n        endTime = ioInfo.end;\n      if (supportsUserTiming && 0 <= endTime) {\n        var description = getIODescription(value),\n          entryName = getIOShortName(ioInfo, description, ioInfo.env, rootEnv),\n          color = getIOColor(entryName),\n          debugTask = ioInfo.debugTask;\n        entryName = \"\\u200b\" + entryName;\n        if (debugTask) {\n          var properties = [];\n          \"object\" === typeof value && null !== value\n            ? addObjectToProperties(value, properties, 0, \"\")\n            : void 0 !== value &&\n              addValueToProperties(\"Resolved\", value, properties, 0, \"\");\n          ioInfo = getIOLongName(ioInfo, description, ioInfo.env, rootEnv);\n          debugTask.run(\n            performance.measure.bind(performance, entryName, {\n              start: 0 > startTime ? 0 : startTime,\n              end: endTime,\n              detail: {\n                devtools: {\n                  color: color,\n                  track: \"Server Requests \\u269b\",\n                  properties: properties,\n                  tooltipText: ioInfo\n                }\n              }\n            })\n          );\n          performance.clearMeasures(entryName);\n        } else\n          console.timeStamp(\n            entryName,\n            0 > startTime ? 0 : startTime,\n            endTime,\n            \"Server Requests \\u269b\",\n            void 0,\n            color\n          );\n      }\n    }\n    function prepareStackTrace(error, structuredStackTrace) {\n      error = (error.name || \"Error\") + \": \" + (error.message || \"\");\n      for (var i = 0; i < structuredStackTrace.length; i++)\n        error += \"\\n    at \" + structuredStackTrace[i].toString();\n      return error;\n    }\n    function ReactPromise(status, value, reason) {\n      this.status = status;\n      this.value = value;\n      this.reason = reason;\n      this._children = [];\n      this._debugChunk = null;\n      this._debugInfo = [];\n    }\n    function hasGCedResponse(weakResponse) {\n      return void 0 === weakResponse.weak.deref();\n    }\n    function unwrapWeakResponse(weakResponse) {\n      weakResponse = weakResponse.weak.deref();\n      if (void 0 === weakResponse)\n        throw Error(\n          \"We did not expect to receive new data after GC:ing the response.\"\n        );\n      return weakResponse;\n    }\n    function closeDebugChannel(debugChannel) {\n      debugChannel.callback && debugChannel.callback(\"\");\n    }\n    function readChunk(chunk) {\n      switch (chunk.status) {\n        case \"resolved_model\":\n          initializeModelChunk(chunk);\n          break;\n        case \"resolved_module\":\n          initializeModuleChunk(chunk);\n      }\n      switch (chunk.status) {\n        case \"fulfilled\":\n          return chunk.value;\n        case \"pending\":\n        case \"blocked\":\n        case \"halted\":\n          throw chunk;\n        default:\n          throw chunk.reason;\n      }\n    }\n    function getRoot(weakResponse) {\n      weakResponse = unwrapWeakResponse(weakResponse);\n      return getChunk(weakResponse, 0);\n    }\n    function createPendingChunk(response) {\n      0 === response._pendingChunks++ &&\n        ((response._weakResponse.response = response),\n        null !== response._pendingInitialRender &&\n          (clearTimeout(response._pendingInitialRender),\n          (response._pendingInitialRender = null)));\n      return new ReactPromise(\"pending\", null, null);\n    }\n    function releasePendingChunk(response, chunk) {\n      \"pending\" === chunk.status &&\n        0 === --response._pendingChunks &&\n        ((response._weakResponse.response = null),\n        (response._pendingInitialRender = setTimeout(\n          flushInitialRenderPerformance.bind(null, response),\n          100\n        )));\n    }\n    function filterDebugInfo(response, value) {\n      if (null !== response._debugEndTime) {\n        response = response._debugEndTime - performance.timeOrigin;\n        for (var debugInfo = [], i = 0; i < value._debugInfo.length; i++) {\n          var info = value._debugInfo[i];\n          if (\"number\" === typeof info.time && info.time > response) break;\n          debugInfo.push(info);\n        }\n        value._debugInfo = debugInfo;\n      }\n    }\n    function moveDebugInfoFromChunkToInnerValue(chunk, value) {\n      value = resolveLazy(value);\n      \"object\" !== typeof value ||\n        null === value ||\n        (!isArrayImpl(value) &&\n          \"function\" !== typeof value[ASYNC_ITERATOR] &&\n          value.$$typeof !== REACT_ELEMENT_TYPE &&\n          value.$$typeof !== REACT_LAZY_TYPE) ||\n        ((chunk = chunk._debugInfo.splice(0)),\n        isArrayImpl(value._debugInfo)\n          ? value._debugInfo.unshift.apply(value._debugInfo, chunk)\n          : Object.isFrozen(value) ||\n            Object.defineProperty(value, \"_debugInfo\", {\n              configurable: !1,\n              enumerable: !1,\n              writable: !0,\n              value: chunk\n            }));\n    }\n    function wakeChunk(response, listeners, value, chunk) {\n      for (var i = 0; i < listeners.length; i++) {\n        var listener = listeners[i];\n        \"function\" === typeof listener\n          ? listener(value)\n          : fulfillReference(response, listener, value, chunk);\n      }\n      filterDebugInfo(response, chunk);\n      moveDebugInfoFromChunkToInnerValue(chunk, value);\n    }\n    function rejectChunk(response, listeners, error) {\n      for (var i = 0; i < listeners.length; i++) {\n        var listener = listeners[i];\n        \"function\" === typeof listener\n          ? listener(error)\n          : rejectReference(response, listener.handler, error);\n      }\n    }\n    function resolveBlockedCycle(resolvedChunk, reference) {\n      var referencedChunk = reference.handler.chunk;\n      if (null === referencedChunk) return null;\n      if (referencedChunk === resolvedChunk) return reference.handler;\n      reference = referencedChunk.value;\n      if (null !== reference)\n        for (\n          referencedChunk = 0;\n          referencedChunk < reference.length;\n          referencedChunk++\n        ) {\n          var listener = reference[referencedChunk];\n          if (\n            \"function\" !== typeof listener &&\n            ((listener = resolveBlockedCycle(resolvedChunk, listener)),\n            null !== listener)\n          )\n            return listener;\n        }\n      return null;\n    }\n    function wakeChunkIfInitialized(\n      response,\n      chunk,\n      resolveListeners,\n      rejectListeners\n    ) {\n      switch (chunk.status) {\n        case \"fulfilled\":\n          wakeChunk(response, resolveListeners, chunk.value, chunk);\n          break;\n        case \"blocked\":\n          for (var i = 0; i < resolveListeners.length; i++) {\n            var listener = resolveListeners[i];\n            if (\"function\" !== typeof listener) {\n              var cyclicHandler = resolveBlockedCycle(chunk, listener);\n              if (null !== cyclicHandler)\n                switch (\n                  (fulfillReference(\n                    response,\n                    listener,\n                    cyclicHandler.value,\n                    chunk\n                  ),\n                  resolveListeners.splice(i, 1),\n                  i--,\n                  null !== rejectListeners &&\n                    ((listener = rejectListeners.indexOf(listener)),\n                    -1 !== listener && rejectListeners.splice(listener, 1)),\n                  chunk.status)\n                ) {\n                  case \"fulfilled\":\n                    wakeChunk(response, resolveListeners, chunk.value, chunk);\n                    return;\n                  case \"rejected\":\n                    null !== rejectListeners &&\n                      rejectChunk(response, rejectListeners, chunk.reason);\n                    return;\n                }\n            }\n          }\n        case \"pending\":\n          if (chunk.value)\n            for (response = 0; response < resolveListeners.length; response++)\n              chunk.value.push(resolveListeners[response]);\n          else chunk.value = resolveListeners;\n          if (chunk.reason) {\n            if (rejectListeners)\n              for (\n                resolveListeners = 0;\n                resolveListeners < rejectListeners.length;\n                resolveListeners++\n              )\n                chunk.reason.push(rejectListeners[resolveListeners]);\n          } else chunk.reason = rejectListeners;\n          break;\n        case \"rejected\":\n          rejectListeners &&\n            rejectChunk(response, rejectListeners, chunk.reason);\n      }\n    }\n    function triggerErrorOnChunk(response, chunk, error) {\n      if (\"pending\" !== chunk.status && \"blocked\" !== chunk.status)\n        chunk.reason.error(error);\n      else {\n        releasePendingChunk(response, chunk);\n        var listeners = chunk.reason;\n        if (\"pending\" === chunk.status && null != chunk._debugChunk) {\n          var prevHandler = initializingHandler,\n            prevChunk = initializingChunk;\n          initializingHandler = null;\n          chunk.status = \"blocked\";\n          chunk.value = null;\n          chunk.reason = null;\n          initializingChunk = chunk;\n          try {\n            initializeDebugChunk(response, chunk);\n          } finally {\n            (initializingHandler = prevHandler),\n              (initializingChunk = prevChunk);\n          }\n        }\n        chunk.status = \"rejected\";\n        chunk.reason = error;\n        null !== listeners && rejectChunk(response, listeners, error);\n      }\n    }\n    function createResolvedModelChunk(response, value) {\n      return new ReactPromise(\"resolved_model\", value, response);\n    }\n    function createResolvedIteratorResultChunk(response, value, done) {\n      return new ReactPromise(\n        \"resolved_model\",\n        (done ? '{\"done\":true,\"value\":' : '{\"done\":false,\"value\":') +\n          value +\n          \"}\",\n        response\n      );\n    }\n    function resolveIteratorResultChunk(response, chunk, value, done) {\n      resolveModelChunk(\n        response,\n        chunk,\n        (done ? '{\"done\":true,\"value\":' : '{\"done\":false,\"value\":') +\n          value +\n          \"}\"\n      );\n    }\n    function resolveModelChunk(response, chunk, value) {\n      if (\"pending\" !== chunk.status) chunk.reason.enqueueModel(value);\n      else {\n        releasePendingChunk(response, chunk);\n        var resolveListeners = chunk.value,\n          rejectListeners = chunk.reason;\n        chunk.status = \"resolved_model\";\n        chunk.value = value;\n        chunk.reason = response;\n        null !== resolveListeners &&\n          (initializeModelChunk(chunk),\n          wakeChunkIfInitialized(\n            response,\n            chunk,\n            resolveListeners,\n            rejectListeners\n          ));\n      }\n    }\n    function resolveModuleChunk(response, chunk, value) {\n      if (\"pending\" === chunk.status || \"blocked\" === chunk.status) {\n        releasePendingChunk(response, chunk);\n        var resolveListeners = chunk.value,\n          rejectListeners = chunk.reason;\n        chunk.status = \"resolved_module\";\n        chunk.value = value;\n        chunk.reason = null;\n        value = [];\n        null !== value && chunk._debugInfo.push.apply(chunk._debugInfo, value);\n        null !== resolveListeners &&\n          (initializeModuleChunk(chunk),\n          wakeChunkIfInitialized(\n            response,\n            chunk,\n            resolveListeners,\n            rejectListeners\n          ));\n      }\n    }\n    function initializeDebugChunk(response, chunk) {\n      var debugChunk = chunk._debugChunk;\n      if (null !== debugChunk) {\n        var debugInfo = chunk._debugInfo,\n          prevIsInitializingDebugInfo = isInitializingDebugInfo;\n        isInitializingDebugInfo = !0;\n        try {\n          if (\"resolved_model\" === debugChunk.status) {\n            for (\n              var idx = debugInfo.length, c = debugChunk._debugChunk;\n              null !== c;\n\n            )\n              \"fulfilled\" !== c.status && idx++, (c = c._debugChunk);\n            initializeModelChunk(debugChunk);\n            switch (debugChunk.status) {\n              case \"fulfilled\":\n                debugInfo[idx] = initializeDebugInfo(\n                  response,\n                  debugChunk.value\n                );\n                break;\n              case \"blocked\":\n              case \"pending\":\n                waitForReference(\n                  debugChunk,\n                  debugInfo,\n                  \"\" + idx,\n                  response,\n                  initializeDebugInfo,\n                  [\"\"],\n                  !0\n                );\n                break;\n              default:\n                throw debugChunk.reason;\n            }\n          } else\n            switch (debugChunk.status) {\n              case \"fulfilled\":\n                break;\n              case \"blocked\":\n              case \"pending\":\n                waitForReference(\n                  debugChunk,\n                  {},\n                  \"debug\",\n                  response,\n                  initializeDebugInfo,\n                  [\"\"],\n                  !0\n                );\n                break;\n              default:\n                throw debugChunk.reason;\n            }\n        } catch (error) {\n          triggerErrorOnChunk(response, chunk, error);\n        } finally {\n          isInitializingDebugInfo = prevIsInitializingDebugInfo;\n        }\n      }\n    }\n    function initializeModelChunk(chunk) {\n      var prevHandler = initializingHandler,\n        prevChunk = initializingChunk;\n      initializingHandler = null;\n      var resolvedModel = chunk.value,\n        response = chunk.reason;\n      chunk.status = \"blocked\";\n      chunk.value = null;\n      chunk.reason = null;\n      initializingChunk = chunk;\n      initializeDebugChunk(response, chunk);\n      try {\n        var value = parseModel(response, resolvedModel),\n          resolveListeners = chunk.value;\n        if (null !== resolveListeners)\n          for (\n            chunk.value = null, chunk.reason = null, resolvedModel = 0;\n            resolvedModel < resolveListeners.length;\n            resolvedModel++\n          ) {\n            var listener = resolveListeners[resolvedModel];\n            \"function\" === typeof listener\n              ? listener(value)\n              : fulfillReference(response, listener, value, chunk);\n          }\n        if (null !== initializingHandler) {\n          if (initializingHandler.errored) throw initializingHandler.reason;\n          if (0 < initializingHandler.deps) {\n            initializingHandler.value = value;\n            initializingHandler.chunk = chunk;\n            return;\n          }\n        }\n        chunk.status = \"fulfilled\";\n        chunk.value = value;\n        chunk.reason = null;\n        filterDebugInfo(response, chunk);\n        moveDebugInfoFromChunkToInnerValue(chunk, value);\n      } catch (error) {\n        (chunk.status = \"rejected\"), (chunk.reason = error);\n      } finally {\n        (initializingHandler = prevHandler), (initializingChunk = prevChunk);\n      }\n    }\n    function initializeModuleChunk(chunk) {\n      try {\n        var value = requireModule(chunk.value);\n        chunk.status = \"fulfilled\";\n        chunk.value = value;\n        chunk.reason = null;\n      } catch (error) {\n        (chunk.status = \"rejected\"), (chunk.reason = error);\n      }\n    }\n    function reportGlobalError(weakResponse, error) {\n      if (!hasGCedResponse(weakResponse)) {\n        var response = unwrapWeakResponse(weakResponse);\n        response._closed = !0;\n        response._closedReason = error;\n        response._chunks.forEach(function (chunk) {\n          \"pending\" === chunk.status\n            ? triggerErrorOnChunk(response, chunk, error)\n            : \"fulfilled\" === chunk.status &&\n              null !== chunk.reason &&\n              chunk.reason.error(error);\n        });\n        weakResponse = response._debugChannel;\n        void 0 !== weakResponse &&\n          (closeDebugChannel(weakResponse),\n          (response._debugChannel = void 0),\n          null !== debugChannelRegistry &&\n            debugChannelRegistry.unregister(response));\n      }\n    }\n    function nullRefGetter() {\n      return null;\n    }\n    function getTaskName(type) {\n      if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n      if (\"function\" === typeof type) return '\"use client\"';\n      if (\n        \"object\" === typeof type &&\n        null !== type &&\n        type.$$typeof === REACT_LAZY_TYPE\n      )\n        return type._init === readChunk ? '\"use client\"' : \"<...>\";\n      try {\n        var name = getComponentNameFromType(type);\n        return name ? \"<\" + name + \">\" : \"<...>\";\n      } catch (x) {\n        return \"<...>\";\n      }\n    }\n    function initializeElement(response, element, lazyNode) {\n      var stack = element._debugStack,\n        owner = element._owner;\n      null === owner && (element._owner = response._debugRootOwner);\n      var env = response._rootEnvironmentName;\n      null !== owner && null != owner.env && (env = owner.env);\n      var normalizedStackTrace = null;\n      null === owner && null != response._debugRootStack\n        ? (normalizedStackTrace = response._debugRootStack)\n        : null !== stack &&\n          (normalizedStackTrace = createFakeJSXCallStackInDEV(\n            response,\n            stack,\n            env\n          ));\n      element._debugStack = normalizedStackTrace;\n      normalizedStackTrace = null;\n      supportsCreateTask &&\n        null !== stack &&\n        ((normalizedStackTrace = console.createTask.bind(\n          console,\n          getTaskName(element.type)\n        )),\n        (stack = buildFakeCallStack(\n          response,\n          stack,\n          env,\n          !1,\n          normalizedStackTrace\n        )),\n        (env = null === owner ? null : initializeFakeTask(response, owner)),\n        null === env\n          ? ((env = response._debugRootTask),\n            (normalizedStackTrace = null != env ? env.run(stack) : stack()))\n          : (normalizedStackTrace = env.run(stack)));\n      element._debugTask = normalizedStackTrace;\n      null !== owner && initializeFakeStack(response, owner);\n      null !== lazyNode &&\n        (lazyNode._store &&\n          lazyNode._store.validated &&\n          !element._store.validated &&\n          (element._store.validated = lazyNode._store.validated),\n        \"fulfilled\" === lazyNode._payload.status &&\n          lazyNode._debugInfo &&\n          ((response = lazyNode._debugInfo.splice(0)),\n          element._debugInfo\n            ? element._debugInfo.unshift.apply(element._debugInfo, response)\n            : Object.defineProperty(element, \"_debugInfo\", {\n                configurable: !1,\n                enumerable: !1,\n                writable: !0,\n                value: response\n              })));\n      Object.freeze(element.props);\n    }\n    function createLazyChunkWrapper(chunk, validated) {\n      var lazyType = {\n        $$typeof: REACT_LAZY_TYPE,\n        _payload: chunk,\n        _init: readChunk\n      };\n      lazyType._debugInfo = chunk._debugInfo;\n      lazyType._store = { validated: validated };\n      return lazyType;\n    }\n    function getChunk(response, id) {\n      var chunks = response._chunks,\n        chunk = chunks.get(id);\n      chunk ||\n        (response._closed\n          ? response._allowPartialStream\n            ? ((response = chunk = createPendingChunk(response)),\n              (response.status = \"halted\"),\n              (response.value = null),\n              (response.reason = null))\n            : (chunk = new ReactPromise(\n                \"rejected\",\n                null,\n                response._closedReason\n              ))\n          : (chunk = createPendingChunk(response)),\n        chunks.set(id, chunk));\n      return chunk;\n    }\n    function fulfillReference(response, reference, value, fulfilledChunk) {\n      var handler = reference.handler,\n        parentObject = reference.parentObject,\n        key = reference.key,\n        map = reference.map,\n        path = reference.path;\n      try {\n        for (var i = 1; i < path.length; i++) {\n          for (\n            ;\n            \"object\" === typeof value &&\n            null !== value &&\n            value.$$typeof === REACT_LAZY_TYPE;\n\n          ) {\n            var referencedChunk = value._payload;\n            if (referencedChunk === handler.chunk) value = handler.value;\n            else {\n              switch (referencedChunk.status) {\n                case \"resolved_model\":\n                  initializeModelChunk(referencedChunk);\n                  break;\n                case \"resolved_module\":\n                  initializeModuleChunk(referencedChunk);\n              }\n              switch (referencedChunk.status) {\n                case \"fulfilled\":\n                  value = referencedChunk.value;\n                  continue;\n                case \"blocked\":\n                  var cyclicHandler = resolveBlockedCycle(\n                    referencedChunk,\n                    reference\n                  );\n                  if (null !== cyclicHandler) {\n                    value = cyclicHandler.value;\n                    continue;\n                  }\n                case \"pending\":\n                  path.splice(0, i - 1);\n                  null === referencedChunk.value\n                    ? (referencedChunk.value = [reference])\n                    : referencedChunk.value.push(reference);\n                  null === referencedChunk.reason\n                    ? (referencedChunk.reason = [reference])\n                    : referencedChunk.reason.push(reference);\n                  return;\n                case \"halted\":\n                  return;\n                default:\n                  rejectReference(\n                    response,\n                    reference.handler,\n                    referencedChunk.reason\n                  );\n                  return;\n              }\n            }\n          }\n          var name = path[i];\n          if (\n            \"object\" === typeof value &&\n            null !== value &&\n            hasOwnProperty.call(value, name)\n          )\n            value = value[name];\n          else throw Error(\"Invalid reference.\");\n        }\n        for (\n          ;\n          \"object\" === typeof value &&\n          null !== value &&\n          value.$$typeof === REACT_LAZY_TYPE;\n\n        ) {\n          var _referencedChunk = value._payload;\n          if (_referencedChunk === handler.chunk) value = handler.value;\n          else {\n            switch (_referencedChunk.status) {\n              case \"resolved_model\":\n                initializeModelChunk(_referencedChunk);\n                break;\n              case \"resolved_module\":\n                initializeModuleChunk(_referencedChunk);\n            }\n            switch (_referencedChunk.status) {\n              case \"fulfilled\":\n                value = _referencedChunk.value;\n                continue;\n            }\n            break;\n          }\n        }\n        var mappedValue = map(response, value, parentObject, key);\n        \"__proto__\" !== key && (parentObject[key] = mappedValue);\n        \"\" === key && null === handler.value && (handler.value = mappedValue);\n        if (\n          parentObject[0] === REACT_ELEMENT_TYPE &&\n          \"object\" === typeof handler.value &&\n          null !== handler.value &&\n          handler.value.$$typeof === REACT_ELEMENT_TYPE\n        ) {\n          var element = handler.value;\n          switch (key) {\n            case \"3\":\n              transferReferencedDebugInfo(handler.chunk, fulfilledChunk);\n              element.props = mappedValue;\n              break;\n            case \"4\":\n              element._owner = mappedValue;\n              break;\n            case \"5\":\n              element._debugStack = mappedValue;\n              break;\n            default:\n              transferReferencedDebugInfo(handler.chunk, fulfilledChunk);\n          }\n        } else\n          reference.isDebug ||\n            transferReferencedDebugInfo(handler.chunk, fulfilledChunk);\n      } catch (error) {\n        rejectReference(response, reference.handler, error);\n        return;\n      }\n      handler.deps--;\n      0 === handler.deps &&\n        ((reference = handler.chunk),\n        null !== reference &&\n          \"blocked\" === reference.status &&\n          ((value = reference.value),\n          (reference.status = \"fulfilled\"),\n          (reference.value = handler.value),\n          (reference.reason = handler.reason),\n          null !== value\n            ? wakeChunk(response, value, handler.value, reference)\n            : ((handler = handler.value),\n              filterDebugInfo(response, reference),\n              moveDebugInfoFromChunkToInnerValue(reference, handler))));\n    }\n    function rejectReference(response, handler, error) {\n      if (!handler.errored) {\n        var blockedValue = handler.value;\n        handler.errored = !0;\n        handler.value = null;\n        handler.reason = error;\n        handler = handler.chunk;\n        if (null !== handler && \"blocked\" === handler.status) {\n          if (\n            \"object\" === typeof blockedValue &&\n            null !== blockedValue &&\n            blockedValue.$$typeof === REACT_ELEMENT_TYPE\n          ) {\n            var erroredComponent = {\n              name: getComponentNameFromType(blockedValue.type) || \"\",\n              owner: blockedValue._owner\n            };\n            erroredComponent.debugStack = blockedValue._debugStack;\n            supportsCreateTask &&\n              (erroredComponent.debugTask = blockedValue._debugTask);\n            handler._debugInfo.push(erroredComponent);\n          }\n          triggerErrorOnChunk(response, handler, error);\n        }\n      }\n    }\n    function waitForReference(\n      referencedChunk,\n      parentObject,\n      key,\n      response,\n      map,\n      path,\n      isAwaitingDebugInfo\n    ) {\n      if (\n        !(\n          (void 0 !== response._debugChannel &&\n            response._debugChannel.hasReadable) ||\n          \"pending\" !== referencedChunk.status ||\n          parentObject[0] !== REACT_ELEMENT_TYPE ||\n          (\"4\" !== key && \"5\" !== key)\n        )\n      )\n        return null;\n      initializingHandler\n        ? ((response = initializingHandler), response.deps++)\n        : (response = initializingHandler =\n            {\n              parent: null,\n              chunk: null,\n              value: null,\n              reason: null,\n              deps: 1,\n              errored: !1\n            });\n      parentObject = {\n        handler: response,\n        parentObject: parentObject,\n        key: key,\n        map: map,\n        path: path\n      };\n      parentObject.isDebug = isAwaitingDebugInfo;\n      null === referencedChunk.value\n        ? (referencedChunk.value = [parentObject])\n        : referencedChunk.value.push(parentObject);\n      null === referencedChunk.reason\n        ? (referencedChunk.reason = [parentObject])\n        : referencedChunk.reason.push(parentObject);\n      return null;\n    }\n    function loadServerReference(response, metaData, parentObject, key) {\n      if (!response._serverReferenceConfig)\n        return createBoundServerReference(\n          metaData,\n          response._callServer,\n          response._encodeFormAction,\n          response._debugFindSourceMapURL\n        );\n      var serverReference = resolveServerReference(\n          response._serverReferenceConfig,\n          metaData.id\n        ),\n        promise = preloadModule(serverReference);\n      if (promise)\n        metaData.bound && (promise = Promise.all([promise, metaData.bound]));\n      else if (metaData.bound) promise = Promise.resolve(metaData.bound);\n      else\n        return (\n          (promise = requireModule(serverReference)),\n          registerBoundServerReference(\n            promise,\n            metaData.id,\n            metaData.bound,\n            response._encodeFormAction\n          ),\n          promise\n        );\n      if (initializingHandler) {\n        var handler = initializingHandler;\n        handler.deps++;\n      } else\n        handler = initializingHandler = {\n          parent: null,\n          chunk: null,\n          value: null,\n          reason: null,\n          deps: 1,\n          errored: !1\n        };\n      promise.then(\n        function () {\n          var resolvedValue = requireModule(serverReference);\n          if (metaData.bound) {\n            var boundArgs = metaData.bound.value.slice(0);\n            boundArgs.unshift(null);\n            resolvedValue = resolvedValue.bind.apply(resolvedValue, boundArgs);\n          }\n          registerBoundServerReference(\n            resolvedValue,\n            metaData.id,\n            metaData.bound,\n            response._encodeFormAction\n          );\n          \"__proto__\" !== key && (parentObject[key] = resolvedValue);\n          \"\" === key &&\n            null === handler.value &&\n            (handler.value = resolvedValue);\n          if (\n            parentObject[0] === REACT_ELEMENT_TYPE &&\n            \"object\" === typeof handler.value &&\n            null !== handler.value &&\n            handler.value.$$typeof === REACT_ELEMENT_TYPE\n          )\n            switch (((boundArgs = handler.value), key)) {\n              case \"3\":\n                boundArgs.props = resolvedValue;\n                break;\n              case \"4\":\n                boundArgs._owner = resolvedValue;\n            }\n          handler.deps--;\n          0 === handler.deps &&\n            ((resolvedValue = handler.chunk),\n            null !== resolvedValue &&\n              \"blocked\" === resolvedValue.status &&\n              ((boundArgs = resolvedValue.value),\n              (resolvedValue.status = \"fulfilled\"),\n              (resolvedValue.value = handler.value),\n              (resolvedValue.reason = null),\n              null !== boundArgs\n                ? wakeChunk(response, boundArgs, handler.value, resolvedValue)\n                : ((boundArgs = handler.value),\n                  filterDebugInfo(response, resolvedValue),\n                  moveDebugInfoFromChunkToInnerValue(\n                    resolvedValue,\n                    boundArgs\n                  ))));\n        },\n        function (error) {\n          if (!handler.errored) {\n            var blockedValue = handler.value;\n            handler.errored = !0;\n            handler.value = null;\n            handler.reason = error;\n            var chunk = handler.chunk;\n            if (null !== chunk && \"blocked\" === chunk.status) {\n              if (\n                \"object\" === typeof blockedValue &&\n                null !== blockedValue &&\n                blockedValue.$$typeof === REACT_ELEMENT_TYPE\n              ) {\n                var erroredComponent = {\n                  name: getComponentNameFromType(blockedValue.type) || \"\",\n                  owner: blockedValue._owner\n                };\n                erroredComponent.debugStack = blockedValue._debugStack;\n                supportsCreateTask &&\n                  (erroredComponent.debugTask = blockedValue._debugTask);\n                chunk._debugInfo.push(erroredComponent);\n              }\n              triggerErrorOnChunk(response, chunk, error);\n            }\n          }\n        }\n      );\n      return null;\n    }\n    function resolveLazy(value) {\n      for (\n        ;\n        \"object\" === typeof value &&\n        null !== value &&\n        value.$$typeof === REACT_LAZY_TYPE;\n\n      ) {\n        var payload = value._payload;\n        if (\"fulfilled\" === payload.status) value = payload.value;\n        else break;\n      }\n      return value;\n    }\n    function transferReferencedDebugInfo(parentChunk, referencedChunk) {\n      if (null !== parentChunk) {\n        referencedChunk = referencedChunk._debugInfo;\n        parentChunk = parentChunk._debugInfo;\n        for (var i = 0; i < referencedChunk.length; ++i) {\n          var debugInfoEntry = referencedChunk[i];\n          null == debugInfoEntry.name && parentChunk.push(debugInfoEntry);\n        }\n      }\n    }\n    function getOutlinedModel(response, reference, parentObject, key, map) {\n      var path = reference.split(\":\");\n      reference = parseInt(path[0], 16);\n      reference = getChunk(response, reference);\n      null !== initializingChunk &&\n        isArrayImpl(initializingChunk._children) &&\n        initializingChunk._children.push(reference);\n      switch (reference.status) {\n        case \"resolved_model\":\n          initializeModelChunk(reference);\n          break;\n        case \"resolved_module\":\n          initializeModuleChunk(reference);\n      }\n      switch (reference.status) {\n        case \"fulfilled\":\n          for (var value = reference.value, i = 1; i < path.length; i++) {\n            for (\n              ;\n              \"object\" === typeof value &&\n              null !== value &&\n              value.$$typeof === REACT_LAZY_TYPE;\n\n            ) {\n              value = value._payload;\n              switch (value.status) {\n                case \"resolved_model\":\n                  initializeModelChunk(value);\n                  break;\n                case \"resolved_module\":\n                  initializeModuleChunk(value);\n              }\n              switch (value.status) {\n                case \"fulfilled\":\n                  value = value.value;\n                  break;\n                case \"blocked\":\n                case \"pending\":\n                  return waitForReference(\n                    value,\n                    parentObject,\n                    key,\n                    response,\n                    map,\n                    path.slice(i - 1),\n                    isInitializingDebugInfo\n                  );\n                case \"halted\":\n                  return (\n                    initializingHandler\n                      ? ((parentObject = initializingHandler),\n                        parentObject.deps++)\n                      : (initializingHandler = {\n                          parent: null,\n                          chunk: null,\n                          value: null,\n                          reason: null,\n                          deps: 1,\n                          errored: !1\n                        }),\n                    null\n                  );\n                default:\n                  return (\n                    initializingHandler\n                      ? ((initializingHandler.errored = !0),\n                        (initializingHandler.value = null),\n                        (initializingHandler.reason = value.reason))\n                      : (initializingHandler = {\n                          parent: null,\n                          chunk: null,\n                          value: null,\n                          reason: value.reason,\n                          deps: 0,\n                          errored: !0\n                        }),\n                    null\n                  );\n              }\n            }\n            value = value[path[i]];\n          }\n          for (\n            ;\n            \"object\" === typeof value &&\n            null !== value &&\n            value.$$typeof === REACT_LAZY_TYPE;\n\n          ) {\n            path = value._payload;\n            switch (path.status) {\n              case \"resolved_model\":\n                initializeModelChunk(path);\n                break;\n              case \"resolved_module\":\n                initializeModuleChunk(path);\n            }\n            switch (path.status) {\n              case \"fulfilled\":\n                value = path.value;\n                continue;\n            }\n            break;\n          }\n          response = map(response, value, parentObject, key);\n          if (\n            parentObject[0] !== REACT_ELEMENT_TYPE ||\n            (\"4\" !== key && \"5\" !== key)\n          )\n            isInitializingDebugInfo ||\n              transferReferencedDebugInfo(initializingChunk, reference);\n          return response;\n        case \"pending\":\n        case \"blocked\":\n          return waitForReference(\n            reference,\n            parentObject,\n            key,\n            response,\n            map,\n            path,\n            isInitializingDebugInfo\n          );\n        case \"halted\":\n          return (\n            initializingHandler\n              ? ((parentObject = initializingHandler), parentObject.deps++)\n              : (initializingHandler = {\n                  parent: null,\n                  chunk: null,\n                  value: null,\n                  reason: null,\n                  deps: 1,\n                  errored: !1\n                }),\n            null\n          );\n        default:\n          return (\n            initializingHandler\n              ? ((initializingHandler.errored = !0),\n                (initializingHandler.value = null),\n                (initializingHandler.reason = reference.reason))\n              : (initializingHandler = {\n                  parent: null,\n                  chunk: null,\n                  value: null,\n                  reason: reference.reason,\n                  deps: 0,\n                  errored: !0\n                }),\n            null\n          );\n      }\n    }\n    function createMap(response, model) {\n      return new Map(model);\n    }\n    function createSet(response, model) {\n      return new Set(model);\n    }\n    function createBlob(response, model) {\n      return new Blob(model.slice(1), { type: model[0] });\n    }\n    function createFormData(response, model) {\n      response = new FormData();\n      for (var i = 0; i < model.length; i++)\n        response.append(model[i][0], model[i][1]);\n      return response;\n    }\n    function applyConstructor(response, model, parentObject) {\n      Object.setPrototypeOf(parentObject, model.prototype);\n    }\n    function defineLazyGetter(response, chunk, parentObject, key) {\n      \"__proto__\" !== key &&\n        Object.defineProperty(parentObject, key, {\n          get: function () {\n            \"resolved_model\" === chunk.status && initializeModelChunk(chunk);\n            switch (chunk.status) {\n              case \"fulfilled\":\n                return chunk.value;\n              case \"rejected\":\n                throw chunk.reason;\n            }\n            return \"This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.\";\n          },\n          set: function () {},\n          enumerable: !0,\n          configurable: !1\n        });\n      return null;\n    }\n    function extractIterator(response, model) {\n      return model[Symbol.iterator]();\n    }\n    function createModel(response, model) {\n      return model;\n    }\n    function getInferredFunctionApproximate(code) {\n      code = code.startsWith(\"Object.defineProperty(\")\n        ? code.slice(22)\n        : code.startsWith(\"(\")\n          ? code.slice(1)\n          : code;\n      if (code.startsWith(\"async function\")) {\n        var idx = code.indexOf(\"(\", 14);\n        if (-1 !== idx)\n          return (\n            (code = code.slice(14, idx).trim()),\n            (0, eval)(\"({\" + JSON.stringify(code) + \":async function(){}})\")[\n              code\n            ]\n          );\n      } else if (code.startsWith(\"function\")) {\n        if (((idx = code.indexOf(\"(\", 8)), -1 !== idx))\n          return (\n            (code = code.slice(8, idx).trim()),\n            (0, eval)(\"({\" + JSON.stringify(code) + \":function(){}})\")[code]\n          );\n      } else if (\n        code.startsWith(\"class\") &&\n        ((idx = code.indexOf(\"{\", 5)), -1 !== idx)\n      )\n        return (\n          (code = code.slice(5, idx).trim()),\n          (0, eval)(\"({\" + JSON.stringify(code) + \":class{}})\")[code]\n        );\n      return function () {};\n    }\n    function parseModelString(response, parentObject, key, value) {\n      if (\"$\" === value[0]) {\n        if (\"$\" === value)\n          return (\n            null !== initializingHandler &&\n              \"0\" === key &&\n              (initializingHandler = {\n                parent: initializingHandler,\n                chunk: null,\n                value: null,\n                reason: null,\n                deps: 0,\n                errored: !1\n              }),\n            REACT_ELEMENT_TYPE\n          );\n        switch (value[1]) {\n          case \"$\":\n            return value.slice(1);\n          case \"L\":\n            return (\n              (parentObject = parseInt(value.slice(2), 16)),\n              (response = getChunk(response, parentObject)),\n              null !== initializingChunk &&\n                isArrayImpl(initializingChunk._children) &&\n                initializingChunk._children.push(response),\n              createLazyChunkWrapper(response, 0)\n            );\n          case \"@\":\n            return (\n              (parentObject = parseInt(value.slice(2), 16)),\n              (response = getChunk(response, parentObject)),\n              null !== initializingChunk &&\n                isArrayImpl(initializingChunk._children) &&\n                initializingChunk._children.push(response),\n              response\n            );\n          case \"S\":\n            return Symbol.for(value.slice(2));\n          case \"h\":\n            var ref = value.slice(2);\n            return getOutlinedModel(\n              response,\n              ref,\n              parentObject,\n              key,\n              loadServerReference\n            );\n          case \"T\":\n            parentObject = \"$\" + value.slice(2);\n            response = response._tempRefs;\n            if (null == response)\n              throw Error(\n                \"Missing a temporary reference set but the RSC response returned a temporary reference. Pass a temporaryReference option with the set that was used with the reply.\"\n              );\n            return response.get(parentObject);\n          case \"Q\":\n            return (\n              (ref = value.slice(2)),\n              getOutlinedModel(response, ref, parentObject, key, createMap)\n            );\n          case \"W\":\n            return (\n              (ref = value.slice(2)),\n              getOutlinedModel(response, ref, parentObject, key, createSet)\n            );\n          case \"B\":\n            return (\n              (ref = value.slice(2)),\n              getOutlinedModel(response, ref, parentObject, key, createBlob)\n            );\n          case \"K\":\n            return (\n              (ref = value.slice(2)),\n              getOutlinedModel(response, ref, parentObject, key, createFormData)\n            );\n          case \"Z\":\n            return (\n              (ref = value.slice(2)),\n              getOutlinedModel(\n                response,\n                ref,\n                parentObject,\n                key,\n                resolveErrorDev\n              )\n            );\n          case \"i\":\n            return (\n              (ref = value.slice(2)),\n              getOutlinedModel(\n                response,\n                ref,\n                parentObject,\n                key,\n                extractIterator\n              )\n            );\n          case \"I\":\n            return Infinity;\n          case \"-\":\n            return \"$-0\" === value ? -0 : -Infinity;\n          case \"N\":\n            return NaN;\n          case \"u\":\n            return;\n          case \"D\":\n            return new Date(Date.parse(value.slice(2)));\n          case \"n\":\n            return BigInt(value.slice(2));\n          case \"P\":\n            return (\n              (ref = value.slice(2)),\n              getOutlinedModel(\n                response,\n                ref,\n                parentObject,\n                key,\n                applyConstructor\n              )\n            );\n          case \"E\":\n            response = value.slice(2);\n            try {\n              if (!mightHaveStaticConstructor.test(response))\n                return (0, eval)(response);\n            } catch (x) {}\n            try {\n              if (\n                ((ref = getInferredFunctionApproximate(response)),\n                response.startsWith(\"Object.defineProperty(\"))\n              ) {\n                var idx = response.lastIndexOf(',\"name\",{value:\"');\n                if (-1 !== idx) {\n                  var name = JSON.parse(\n                    response.slice(idx + 16 - 1, response.length - 2)\n                  );\n                  Object.defineProperty(ref, \"name\", { value: name });\n                }\n              }\n            } catch (_) {\n              ref = function () {};\n            }\n            return ref;\n          case \"Y\":\n            if (\n              2 < value.length &&\n              (ref = response._debugChannel && response._debugChannel.callback)\n            ) {\n              if (\"@\" === value[2])\n                return (\n                  (parentObject = value.slice(3)),\n                  (key = parseInt(parentObject, 16)),\n                  response._chunks.has(key) || ref(\"P:\" + parentObject),\n                  getChunk(response, key)\n                );\n              value = value.slice(2);\n              idx = parseInt(value, 16);\n              response._chunks.has(idx) || ref(\"Q:\" + value);\n              ref = getChunk(response, idx);\n              return \"fulfilled\" === ref.status\n                ? ref.value\n                : defineLazyGetter(response, ref, parentObject, key);\n            }\n            \"__proto__\" !== key &&\n              Object.defineProperty(parentObject, key, {\n                get: function () {\n                  return \"This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.\";\n                },\n                set: function () {},\n                enumerable: !0,\n                configurable: !1\n              });\n            return null;\n          default:\n            return (\n              (ref = value.slice(1)),\n              getOutlinedModel(response, ref, parentObject, key, createModel)\n            );\n        }\n      }\n      return value;\n    }\n    function missingCall() {\n      throw Error(\n        'Trying to call a function from \"use server\" but the callServer option was not implemented in your router runtime.'\n      );\n    }\n    function markIOStarted() {\n      this._debugIOStarted = !0;\n    }\n    function ResponseInstance(\n      bundlerConfig,\n      serverReferenceConfig,\n      moduleLoading,\n      callServer,\n      encodeFormAction,\n      nonce,\n      temporaryReferences,\n      allowPartialStream,\n      findSourceMapURL,\n      replayConsole,\n      environmentName,\n      debugStartTime,\n      debugEndTime,\n      debugChannel\n    ) {\n      var chunks = new Map();\n      this._bundlerConfig = bundlerConfig;\n      this._serverReferenceConfig = serverReferenceConfig;\n      this._moduleLoading = moduleLoading;\n      this._callServer = void 0 !== callServer ? callServer : missingCall;\n      this._encodeFormAction = encodeFormAction;\n      this._nonce = nonce;\n      this._chunks = chunks;\n      this._stringDecoder = new util.TextDecoder();\n      this._closed = !1;\n      this._closedReason = null;\n      this._allowPartialStream = allowPartialStream;\n      this._tempRefs = temporaryReferences;\n      this._timeOrigin = 0;\n      this._pendingInitialRender = null;\n      this._pendingChunks = 0;\n      this._weakResponse = { weak: new WeakRef(this), response: this };\n      this._debugRootOwner = bundlerConfig =\n        void 0 === ReactSharedInteralsServer ||\n        null === ReactSharedInteralsServer.A\n          ? null\n          : ReactSharedInteralsServer.A.getOwner();\n      this._debugRootStack =\n        null !== bundlerConfig ? Error(\"react-stack-top-frame\") : null;\n      environmentName = void 0 === environmentName ? \"Server\" : environmentName;\n      supportsCreateTask &&\n        (this._debugRootTask = console.createTask(\n          '\"use ' + environmentName.toLowerCase() + '\"'\n        ));\n      this._debugStartTime =\n        null == debugStartTime ? performance.now() : debugStartTime;\n      this._debugIOStarted = !1;\n      setTimeout(markIOStarted.bind(this), 0);\n      this._debugEndTime = null == debugEndTime ? null : debugEndTime;\n      this._debugFindSourceMapURL = findSourceMapURL;\n      this._debugChannel = debugChannel;\n      this._blockedConsole = null;\n      this._replayConsole = replayConsole;\n      this._rootEnvironmentName = environmentName;\n      debugChannel &&\n        (null === debugChannelRegistry\n          ? (closeDebugChannel(debugChannel), (this._debugChannel = void 0))\n          : debugChannelRegistry.register(this, debugChannel, this));\n      replayConsole && markAllTracksInOrder();\n    }\n    function createResponse(\n      bundlerConfig,\n      serverReferenceConfig,\n      moduleLoading,\n      callServer,\n      encodeFormAction,\n      nonce,\n      temporaryReferences,\n      allowPartialStream,\n      findSourceMapURL,\n      replayConsole,\n      environmentName,\n      debugStartTime,\n      debugEndTime,\n      debugChannel\n    ) {\n      checkEvalAvailabilityOnceDev();\n      bundlerConfig = new ResponseInstance(\n        bundlerConfig,\n        serverReferenceConfig,\n        moduleLoading,\n        callServer,\n        encodeFormAction,\n        nonce,\n        temporaryReferences,\n        allowPartialStream,\n        findSourceMapURL,\n        replayConsole,\n        environmentName,\n        debugStartTime,\n        debugEndTime,\n        debugChannel\n      )._weakResponse;\n      return bundlerConfig;\n    }\n    function createStreamState(weakResponse, streamDebugValue) {\n      var streamState = {\n        _rowState: 0,\n        _rowID: 0,\n        _rowTag: 0,\n        _rowLength: 0,\n        _buffer: []\n      };\n      weakResponse = unwrapWeakResponse(weakResponse);\n      var debugValuePromise = Promise.resolve(streamDebugValue);\n      debugValuePromise.status = \"fulfilled\";\n      debugValuePromise.value = streamDebugValue;\n      streamState._debugInfo = {\n        name: \"rsc stream\",\n        start: weakResponse._debugStartTime,\n        end: weakResponse._debugStartTime,\n        byteSize: 0,\n        value: debugValuePromise,\n        owner: weakResponse._debugRootOwner,\n        debugStack: weakResponse._debugRootStack,\n        debugTask: weakResponse._debugRootTask\n      };\n      streamState._debugTargetChunkSize = MIN_CHUNK_SIZE;\n      return streamState;\n    }\n    function incrementChunkDebugInfo(streamState, chunkLength) {\n      var debugInfo = streamState._debugInfo,\n        endTime = performance.now(),\n        previousEndTime = debugInfo.end;\n      chunkLength = debugInfo.byteSize + chunkLength;\n      chunkLength > streamState._debugTargetChunkSize ||\n      endTime > previousEndTime + 10\n        ? ((streamState._debugInfo = {\n            name: debugInfo.name,\n            start: debugInfo.start,\n            end: endTime,\n            byteSize: chunkLength,\n            value: debugInfo.value,\n            owner: debugInfo.owner,\n            debugStack: debugInfo.debugStack,\n            debugTask: debugInfo.debugTask\n          }),\n          (streamState._debugTargetChunkSize = chunkLength + MIN_CHUNK_SIZE))\n        : ((debugInfo.end = endTime), (debugInfo.byteSize = chunkLength));\n    }\n    function addAsyncInfo(chunk, asyncInfo) {\n      var value = resolveLazy(chunk.value);\n      \"object\" !== typeof value ||\n      null === value ||\n      (!isArrayImpl(value) &&\n        \"function\" !== typeof value[ASYNC_ITERATOR] &&\n        value.$$typeof !== REACT_ELEMENT_TYPE &&\n        value.$$typeof !== REACT_LAZY_TYPE)\n        ? chunk._debugInfo.push(asyncInfo)\n        : isArrayImpl(value._debugInfo)\n          ? value._debugInfo.push(asyncInfo)\n          : Object.isFrozen(value) ||\n            Object.defineProperty(value, \"_debugInfo\", {\n              configurable: !1,\n              enumerable: !1,\n              writable: !0,\n              value: [asyncInfo]\n            });\n    }\n    function resolveChunkDebugInfo(response, streamState, chunk) {\n      response._debugIOStarted &&\n        ((response = { awaited: streamState._debugInfo }),\n        \"pending\" === chunk.status || \"blocked\" === chunk.status\n          ? ((response = addAsyncInfo.bind(null, chunk, response)),\n            chunk.then(response, response))\n          : addAsyncInfo(chunk, response));\n    }\n    function resolveBuffer(response, id, buffer, streamState) {\n      var chunks = response._chunks,\n        chunk = chunks.get(id);\n      chunk && \"pending\" !== chunk.status\n        ? chunk.reason.enqueueValue(buffer)\n        : (chunk && releasePendingChunk(response, chunk),\n          (buffer = new ReactPromise(\"fulfilled\", buffer, null)),\n          resolveChunkDebugInfo(response, streamState, buffer),\n          chunks.set(id, buffer));\n    }\n    function resolveModule(response, id, model, streamState) {\n      var chunks = response._chunks,\n        chunk = chunks.get(id);\n      model = parseModel(response, model);\n      var clientReference = resolveClientReference(\n        response._bundlerConfig,\n        model\n      );\n      prepareDestinationWithChunks(\n        response._moduleLoading,\n        model[1],\n        response._nonce\n      );\n      if ((model = preloadModule(clientReference))) {\n        if (chunk) {\n          releasePendingChunk(response, chunk);\n          var blockedChunk = chunk;\n          blockedChunk.status = \"blocked\";\n        } else\n          (blockedChunk = new ReactPromise(\"blocked\", null, null)),\n            chunks.set(id, blockedChunk);\n        resolveChunkDebugInfo(response, streamState, blockedChunk);\n        model.then(\n          function () {\n            return resolveModuleChunk(response, blockedChunk, clientReference);\n          },\n          function (error) {\n            return triggerErrorOnChunk(response, blockedChunk, error);\n          }\n        );\n      } else\n        chunk\n          ? (resolveChunkDebugInfo(response, streamState, chunk),\n            resolveModuleChunk(response, chunk, clientReference))\n          : ((chunk = new ReactPromise(\n              \"resolved_module\",\n              clientReference,\n              null\n            )),\n            resolveChunkDebugInfo(response, streamState, chunk),\n            chunks.set(id, chunk));\n    }\n    function resolveStream(response, id, stream, controller, streamState) {\n      var chunks = response._chunks,\n        chunk = chunks.get(id);\n      if (chunk) {\n        if (\n          (resolveChunkDebugInfo(response, streamState, chunk),\n          \"pending\" === chunk.status)\n        ) {\n          id = chunk.value;\n          if (null != chunk._debugChunk) {\n            streamState = initializingHandler;\n            chunks = initializingChunk;\n            initializingHandler = null;\n            chunk.status = \"blocked\";\n            chunk.value = null;\n            chunk.reason = null;\n            initializingChunk = chunk;\n            try {\n              if (\n                (initializeDebugChunk(response, chunk),\n                null !== initializingHandler &&\n                  !initializingHandler.errored &&\n                  0 < initializingHandler.deps)\n              ) {\n                initializingHandler.value = stream;\n                initializingHandler.reason = controller;\n                initializingHandler.chunk = chunk;\n                return;\n              }\n            } finally {\n              (initializingHandler = streamState), (initializingChunk = chunks);\n            }\n          }\n          chunk.status = \"fulfilled\";\n          chunk.value = stream;\n          chunk.reason = controller;\n          null !== id\n            ? wakeChunk(response, id, chunk.value, chunk)\n            : (filterDebugInfo(response, chunk),\n              moveDebugInfoFromChunkToInnerValue(chunk, stream));\n        }\n      } else\n        0 === response._pendingChunks++ &&\n          (response._weakResponse.response = response),\n          (stream = new ReactPromise(\"fulfilled\", stream, controller)),\n          resolveChunkDebugInfo(response, streamState, stream),\n          chunks.set(id, stream);\n    }\n    function startReadableStream(response, id, type, streamState) {\n      var controller = null,\n        closed = !1;\n      type = new ReadableStream({\n        type: type,\n        start: function (c) {\n          controller = c;\n        }\n      });\n      var previousBlockedChunk = null;\n      resolveStream(\n        response,\n        id,\n        type,\n        {\n          enqueueValue: function (value) {\n            null === previousBlockedChunk\n              ? controller.enqueue(value)\n              : previousBlockedChunk.then(function () {\n                  controller.enqueue(value);\n                });\n          },\n          enqueueModel: function (json) {\n            if (null === previousBlockedChunk) {\n              var chunk = createResolvedModelChunk(response, json);\n              initializeModelChunk(chunk);\n              \"fulfilled\" === chunk.status\n                ? controller.enqueue(chunk.value)\n                : (chunk.then(\n                    function (v) {\n                      return controller.enqueue(v);\n                    },\n                    function (e) {\n                      return controller.error(e);\n                    }\n                  ),\n                  (previousBlockedChunk = chunk));\n            } else {\n              chunk = previousBlockedChunk;\n              var _chunk3 = createPendingChunk(response);\n              _chunk3.then(\n                function (v) {\n                  return controller.enqueue(v);\n                },\n                function (e) {\n                  return controller.error(e);\n                }\n              );\n              previousBlockedChunk = _chunk3;\n              chunk.then(function () {\n                previousBlockedChunk === _chunk3 &&\n                  (previousBlockedChunk = null);\n                resolveModelChunk(response, _chunk3, json);\n              });\n            }\n          },\n          close: function () {\n            if (!closed)\n              if (((closed = !0), null === previousBlockedChunk))\n                controller.close();\n              else {\n                var blockedChunk = previousBlockedChunk;\n                previousBlockedChunk = null;\n                blockedChunk.then(function () {\n                  return controller.close();\n                });\n              }\n          },\n          error: function (error) {\n            if (!closed)\n              if (((closed = !0), null === previousBlockedChunk))\n                controller.error(error);\n              else {\n                var blockedChunk = previousBlockedChunk;\n                previousBlockedChunk = null;\n                blockedChunk.then(function () {\n                  return controller.error(error);\n                });\n              }\n          }\n        },\n        streamState\n      );\n    }\n    function asyncIterator() {\n      return this;\n    }\n    function createIterator(next) {\n      next = { next: next };\n      next[ASYNC_ITERATOR] = asyncIterator;\n      return next;\n    }\n    function startAsyncIterable(response, id, iterator, streamState) {\n      var buffer = [],\n        closed = !1,\n        nextWriteIndex = 0,\n        iterable = {};\n      iterable[ASYNC_ITERATOR] = function () {\n        var nextReadIndex = 0;\n        return createIterator(function (arg) {\n          if (void 0 !== arg)\n            throw Error(\n              \"Values cannot be passed to next() of AsyncIterables passed to Client Components.\"\n            );\n          if (nextReadIndex === buffer.length) {\n            if (closed)\n              return new ReactPromise(\n                \"fulfilled\",\n                { done: !0, value: void 0 },\n                null\n              );\n            buffer[nextReadIndex] = createPendingChunk(response);\n          }\n          return buffer[nextReadIndex++];\n        });\n      };\n      resolveStream(\n        response,\n        id,\n        iterator ? iterable[ASYNC_ITERATOR]() : iterable,\n        {\n          enqueueValue: function (value) {\n            if (nextWriteIndex === buffer.length)\n              buffer[nextWriteIndex] = new ReactPromise(\n                \"fulfilled\",\n                { done: !1, value: value },\n                null\n              );\n            else {\n              var chunk = buffer[nextWriteIndex],\n                resolveListeners = chunk.value,\n                rejectListeners = chunk.reason;\n              chunk.status = \"fulfilled\";\n              chunk.value = { done: !1, value: value };\n              chunk.reason = null;\n              null !== resolveListeners &&\n                wakeChunkIfInitialized(\n                  response,\n                  chunk,\n                  resolveListeners,\n                  rejectListeners\n                );\n            }\n            nextWriteIndex++;\n          },\n          enqueueModel: function (value) {\n            nextWriteIndex === buffer.length\n              ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk(\n                  response,\n                  value,\n                  !1\n                ))\n              : resolveIteratorResultChunk(\n                  response,\n                  buffer[nextWriteIndex],\n                  value,\n                  !1\n                );\n            nextWriteIndex++;\n          },\n          close: function (value) {\n            if (!closed)\n              for (\n                closed = !0,\n                  nextWriteIndex === buffer.length\n                    ? (buffer[nextWriteIndex] =\n                        createResolvedIteratorResultChunk(response, value, !0))\n                    : resolveIteratorResultChunk(\n                        response,\n                        buffer[nextWriteIndex],\n                        value,\n                        !0\n                      ),\n                  nextWriteIndex++;\n                nextWriteIndex < buffer.length;\n\n              )\n                resolveIteratorResultChunk(\n                  response,\n                  buffer[nextWriteIndex++],\n                  '\"$undefined\"',\n                  !0\n                );\n          },\n          error: function (error) {\n            if (!closed)\n              for (\n                closed = !0,\n                  nextWriteIndex === buffer.length &&\n                    (buffer[nextWriteIndex] = createPendingChunk(response));\n                nextWriteIndex < buffer.length;\n\n              )\n                triggerErrorOnChunk(response, buffer[nextWriteIndex++], error);\n          }\n        },\n        streamState\n      );\n    }\n    function resolveErrorDev(response, errorInfo) {\n      var name = errorInfo.name,\n        message = errorInfo.message,\n        stack = errorInfo.stack,\n        env = errorInfo.env,\n        errorOptions =\n          \"cause\" in errorInfo\n            ? {\n                cause: reviveModel(\n                  response,\n                  errorInfo.cause,\n                  errorInfo,\n                  \"cause\"\n                )\n              }\n            : void 0;\n      message = buildFakeCallStack(\n        response,\n        stack,\n        env,\n        !1,\n        Error.bind(\n          null,\n          message ||\n            \"An error occurred in the Server Components render but no message was provided\",\n          errorOptions\n        )\n      );\n      stack = null;\n      null != errorInfo.owner &&\n        ((errorInfo = errorInfo.owner.slice(1)),\n        (errorInfo = getOutlinedModel(\n          response,\n          errorInfo,\n          {},\n          \"\",\n          createModel\n        )),\n        null !== errorInfo &&\n          (stack = initializeFakeTask(response, errorInfo)));\n      null === stack\n        ? ((response = getRootTask(response, env)),\n          (response = null != response ? response.run(message) : message()))\n        : (response = stack.run(message));\n      response.name = name;\n      response.environmentName = env;\n      return response;\n    }\n    function createFakeFunction(\n      name,\n      filename,\n      sourceMap,\n      line,\n      col,\n      enclosingLine,\n      enclosingCol,\n      environmentName\n    ) {\n      name || (name = \"<anonymous>\");\n      var encodedName = JSON.stringify(name);\n      1 > enclosingLine ? (enclosingLine = 0) : enclosingLine--;\n      1 > enclosingCol ? (enclosingCol = 0) : enclosingCol--;\n      1 > line ? (line = 0) : line--;\n      1 > col ? (col = 0) : col--;\n      if (\n        line < enclosingLine ||\n        (line === enclosingLine && col < enclosingCol)\n      )\n        enclosingCol = enclosingLine = 0;\n      1 > line\n        ? ((line = encodedName.length + 3),\n          (enclosingCol -= line),\n          0 > enclosingCol && (enclosingCol = 0),\n          (col = col - enclosingCol - line - 3),\n          0 > col && (col = 0),\n          (encodedName =\n            \"({\" +\n            encodedName +\n            \":\" +\n            \" \".repeat(enclosingCol) +\n            \"_=>\" +\n            \" \".repeat(col) +\n            \"_()})\"))\n        : 1 > enclosingLine\n          ? ((enclosingCol -= encodedName.length + 3),\n            0 > enclosingCol && (enclosingCol = 0),\n            (encodedName =\n              \"({\" +\n              encodedName +\n              \":\" +\n              \" \".repeat(enclosingCol) +\n              \"_=>\" +\n              \"\\n\".repeat(line - enclosingLine) +\n              \" \".repeat(col) +\n              \"_()})\"))\n          : enclosingLine === line\n            ? ((col = col - enclosingCol - 3),\n              0 > col && (col = 0),\n              (encodedName =\n                \"\\n\".repeat(enclosingLine - 1) +\n                \"({\" +\n                encodedName +\n                \":\\n\" +\n                \" \".repeat(enclosingCol) +\n                \"_=>\" +\n                \" \".repeat(col) +\n                \"_()})\"))\n            : (encodedName =\n                \"\\n\".repeat(enclosingLine - 1) +\n                \"({\" +\n                encodedName +\n                \":\\n\" +\n                \" \".repeat(enclosingCol) +\n                \"_=>\" +\n                \"\\n\".repeat(line - enclosingLine) +\n                \" \".repeat(col) +\n                \"_()})\");\n      encodedName =\n        1 > enclosingLine\n          ? encodedName +\n            \"\\n/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */\"\n          : \"/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */\" +\n            encodedName;\n      filename.startsWith(\"/\") && (filename = \"file://\" + filename);\n      sourceMap\n        ? ((encodedName +=\n            \"\\n//# sourceURL=about://React/\" +\n            encodeURIComponent(environmentName) +\n            \"/\" +\n            encodeURI(filename) +\n            \"?\" +\n            fakeFunctionIdx++),\n          (encodedName += \"\\n//# sourceMappingURL=\" + sourceMap))\n        : (encodedName = filename\n            ? encodedName + (\"\\n//# sourceURL=\" + encodeURI(filename))\n            : encodedName + \"\\n//# sourceURL=<anonymous>\");\n      try {\n        var fn = (0, eval)(encodedName)[name];\n      } catch (x) {\n        (fn = function (_) {\n          return _();\n        }),\n          Object.defineProperty(fn, \"name\", { value: name });\n      }\n      return fn;\n    }\n    function buildFakeCallStack(\n      response,\n      stack,\n      environmentName,\n      useEnclosingLine,\n      innerCall\n    ) {\n      for (var i = 0; i < stack.length; i++) {\n        var frame = stack[i],\n          frameKey =\n            frame.join(\"-\") +\n            \"-\" +\n            environmentName +\n            (useEnclosingLine ? \"-e\" : \"-n\"),\n          fn = fakeFunctionCache.get(frameKey);\n        if (void 0 === fn) {\n          fn = frame[0];\n          var filename = frame[1],\n            line = frame[2],\n            col = frame[3],\n            enclosingLine = frame[4];\n          frame = frame[5];\n          var findSourceMapURL = response._debugFindSourceMapURL;\n          findSourceMapURL = findSourceMapURL\n            ? findSourceMapURL(filename, environmentName)\n            : null;\n          fn = createFakeFunction(\n            fn,\n            filename,\n            findSourceMapURL,\n            line,\n            col,\n            useEnclosingLine ? line : enclosingLine,\n            useEnclosingLine ? col : frame,\n            environmentName\n          );\n          fakeFunctionCache.set(frameKey, fn);\n        }\n        innerCall = fn.bind(null, innerCall);\n      }\n      return innerCall;\n    }\n    function getRootTask(response, childEnvironmentName) {\n      var rootTask = response._debugRootTask;\n      return rootTask\n        ? response._rootEnvironmentName !== childEnvironmentName\n          ? ((response = console.createTask.bind(\n              console,\n              '\"use ' + childEnvironmentName.toLowerCase() + '\"'\n            )),\n            rootTask.run(response))\n          : rootTask\n        : null;\n    }\n    function initializeFakeTask(response, debugInfo) {\n      if (!supportsCreateTask || null == debugInfo.stack) return null;\n      var cachedEntry = debugInfo.debugTask;\n      if (void 0 !== cachedEntry) return cachedEntry;\n      var useEnclosingLine = void 0 === debugInfo.key,\n        stack = debugInfo.stack,\n        env =\n          null == debugInfo.env ? response._rootEnvironmentName : debugInfo.env;\n      cachedEntry =\n        null == debugInfo.owner || null == debugInfo.owner.env\n          ? response._rootEnvironmentName\n          : debugInfo.owner.env;\n      var ownerTask =\n        null == debugInfo.owner\n          ? null\n          : initializeFakeTask(response, debugInfo.owner);\n      env =\n        env !== cachedEntry\n          ? '\"use ' + env.toLowerCase() + '\"'\n          : void 0 !== debugInfo.key\n            ? \"<\" + (debugInfo.name || \"...\") + \">\"\n            : void 0 !== debugInfo.name\n              ? debugInfo.name || \"unknown\"\n              : \"await \" + (debugInfo.awaited.name || \"unknown\");\n      env = console.createTask.bind(console, env);\n      useEnclosingLine = buildFakeCallStack(\n        response,\n        stack,\n        cachedEntry,\n        useEnclosingLine,\n        env\n      );\n      null === ownerTask\n        ? ((response = getRootTask(response, cachedEntry)),\n          (response =\n            null != response\n              ? response.run(useEnclosingLine)\n              : useEnclosingLine()))\n        : (response = ownerTask.run(useEnclosingLine));\n      return (debugInfo.debugTask = response);\n    }\n    function fakeJSXCallSite() {\n      return Error(\"react-stack-top-frame\");\n    }\n    function initializeFakeStack(response, debugInfo) {\n      if (void 0 === debugInfo.debugStack) {\n        null != debugInfo.stack &&\n          (debugInfo.debugStack = createFakeJSXCallStackInDEV(\n            response,\n            debugInfo.stack,\n            null == debugInfo.env ? \"\" : debugInfo.env\n          ));\n        var owner = debugInfo.owner;\n        null != owner &&\n          (initializeFakeStack(response, owner),\n          void 0 === owner.debugLocation &&\n            null != debugInfo.debugStack &&\n            (owner.debugLocation = debugInfo.debugStack));\n      }\n    }\n    function initializeDebugInfo(response, debugInfo) {\n      void 0 !== debugInfo.stack && initializeFakeTask(response, debugInfo);\n      if (null == debugInfo.owner && null != response._debugRootOwner) {\n        var _componentInfoOrAsyncInfo = debugInfo;\n        _componentInfoOrAsyncInfo.owner = response._debugRootOwner;\n        _componentInfoOrAsyncInfo.stack = null;\n        _componentInfoOrAsyncInfo.debugStack = response._debugRootStack;\n        _componentInfoOrAsyncInfo.debugTask = response._debugRootTask;\n      } else\n        void 0 !== debugInfo.stack && initializeFakeStack(response, debugInfo);\n      \"number\" === typeof debugInfo.time &&\n        (debugInfo = { time: debugInfo.time + response._timeOrigin });\n      return debugInfo;\n    }\n    function getCurrentStackInDEV() {\n      var owner = currentOwnerInDEV;\n      if (null === owner) return \"\";\n      try {\n        var info = \"\";\n        if (owner.owner || \"string\" !== typeof owner.name) {\n          for (; owner; ) {\n            var ownerStack = owner.debugStack;\n            if (null != ownerStack) {\n              if ((owner = owner.owner)) {\n                var JSCompiler_temp_const = info;\n                var error = ownerStack,\n                  prevPrepareStackTrace = Error.prepareStackTrace;\n                Error.prepareStackTrace = prepareStackTrace;\n                var stack = error.stack;\n                Error.prepareStackTrace = prevPrepareStackTrace;\n                stack.startsWith(\"Error: react-stack-top-frame\\n\") &&\n                  (stack = stack.slice(29));\n                var idx = stack.indexOf(\"\\n\");\n                -1 !== idx && (stack = stack.slice(idx + 1));\n                idx = stack.indexOf(\"react_stack_bottom_frame\");\n                -1 !== idx && (idx = stack.lastIndexOf(\"\\n\", idx));\n                var JSCompiler_inline_result =\n                  -1 !== idx ? (stack = stack.slice(0, idx)) : \"\";\n                info =\n                  JSCompiler_temp_const + (\"\\n\" + JSCompiler_inline_result);\n              }\n            } else break;\n          }\n          var JSCompiler_inline_result$jscomp$0 = info;\n        } else {\n          JSCompiler_temp_const = owner.name;\n          if (void 0 === prefix)\n            try {\n              throw Error();\n            } catch (x) {\n              (prefix =\n                ((error = x.stack.trim().match(/\\n( *(at )?)/)) && error[1]) ||\n                \"\"),\n                (suffix =\n                  -1 < x.stack.indexOf(\"\\n    at\")\n                    ? \" (<anonymous>)\"\n                    : -1 < x.stack.indexOf(\"@\")\n                      ? \"@unknown:0:0\"\n                      : \"\");\n            }\n          JSCompiler_inline_result$jscomp$0 =\n            \"\\n\" + prefix + JSCompiler_temp_const + suffix;\n        }\n      } catch (x) {\n        JSCompiler_inline_result$jscomp$0 =\n          \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n      }\n      return JSCompiler_inline_result$jscomp$0;\n    }\n    function resolveConsoleEntry(response, json) {\n      if (response._replayConsole) {\n        var blockedChunk = response._blockedConsole;\n        if (null == blockedChunk)\n          (blockedChunk = createResolvedModelChunk(response, json)),\n            initializeModelChunk(blockedChunk),\n            \"fulfilled\" === blockedChunk.status\n              ? replayConsoleWithCallStackInDEV(response, blockedChunk.value)\n              : (blockedChunk.then(\n                  function (v) {\n                    return replayConsoleWithCallStackInDEV(response, v);\n                  },\n                  function () {}\n                ),\n                (response._blockedConsole = blockedChunk));\n        else {\n          var _chunk4 = createPendingChunk(response);\n          _chunk4.then(\n            function (v) {\n              return replayConsoleWithCallStackInDEV(response, v);\n            },\n            function () {}\n          );\n          response._blockedConsole = _chunk4;\n          var unblock = function () {\n            response._blockedConsole === _chunk4 &&\n              (response._blockedConsole = null);\n            resolveModelChunk(response, _chunk4, json);\n          };\n          blockedChunk.then(unblock, unblock);\n        }\n      }\n    }\n    function initializeIOInfo(response, ioInfo) {\n      void 0 !== ioInfo.stack &&\n        (initializeFakeTask(response, ioInfo),\n        initializeFakeStack(response, ioInfo));\n      ioInfo.start += response._timeOrigin;\n      ioInfo.end += response._timeOrigin;\n      if (response._replayConsole) {\n        response = response._rootEnvironmentName;\n        var promise = ioInfo.value;\n        if (promise)\n          switch (promise.status) {\n            case \"fulfilled\":\n              logIOInfo(ioInfo, response, promise.value);\n              break;\n            case \"rejected\":\n              logIOInfoErrored(ioInfo, response, promise.reason);\n              break;\n            default:\n              promise.then(\n                logIOInfo.bind(null, ioInfo, response),\n                logIOInfoErrored.bind(null, ioInfo, response)\n              );\n          }\n        else logIOInfo(ioInfo, response, void 0);\n      }\n    }\n    function resolveIOInfo(response, id, model) {\n      var chunks = response._chunks,\n        chunk = chunks.get(id),\n        prevIsInitializingDebugInfo = isInitializingDebugInfo;\n      isInitializingDebugInfo = !0;\n      try {\n        chunk\n          ? (resolveModelChunk(response, chunk, model),\n            \"resolved_model\" === chunk.status && initializeModelChunk(chunk))\n          : ((chunk = createResolvedModelChunk(response, model)),\n            chunks.set(id, chunk),\n            initializeModelChunk(chunk));\n      } finally {\n        isInitializingDebugInfo = prevIsInitializingDebugInfo;\n      }\n      \"fulfilled\" === chunk.status\n        ? initializeIOInfo(response, chunk.value)\n        : chunk.then(\n            function (v) {\n              initializeIOInfo(response, v);\n            },\n            function () {}\n          );\n    }\n    function mergeBuffer(buffer, lastChunk) {\n      for (\n        var l = buffer.length, byteLength = lastChunk.length, i = 0;\n        i < l;\n        i++\n      )\n        byteLength += buffer[i].byteLength;\n      byteLength = new Uint8Array(byteLength);\n      for (var _i3 = (i = 0); _i3 < l; _i3++) {\n        var chunk = buffer[_i3];\n        byteLength.set(chunk, i);\n        i += chunk.byteLength;\n      }\n      byteLength.set(lastChunk, i);\n      return byteLength;\n    }\n    function resolveTypedArray(\n      response,\n      id,\n      buffer,\n      lastChunk,\n      constructor,\n      bytesPerElement,\n      streamState\n    ) {\n      buffer =\n        0 === buffer.length && 0 === lastChunk.byteOffset % bytesPerElement\n          ? lastChunk\n          : mergeBuffer(buffer, lastChunk);\n      constructor = new constructor(\n        buffer.buffer,\n        buffer.byteOffset,\n        buffer.byteLength / bytesPerElement\n      );\n      resolveBuffer(response, id, constructor, streamState);\n    }\n    function flushComponentPerformance(\n      response$jscomp$0,\n      root,\n      trackIdx$jscomp$6,\n      trackTime,\n      parentEndTime\n    ) {\n      if (!isArrayImpl(root._children)) {\n        var previousResult = root._children,\n          previousEndTime = previousResult.endTime;\n        if (\n          -Infinity < parentEndTime &&\n          parentEndTime < previousEndTime &&\n          null !== previousResult.component\n        ) {\n          var componentInfo = previousResult.component,\n            trackIdx = trackIdx$jscomp$6,\n            startTime = parentEndTime;\n          if (supportsUserTiming && 0 <= previousEndTime && 10 > trackIdx) {\n            var color =\n                componentInfo.env === response$jscomp$0._rootEnvironmentName\n                  ? \"primary-light\"\n                  : \"secondary-light\",\n              entryName = componentInfo.name + \" [deduped]\",\n              debugTask = componentInfo.debugTask;\n            debugTask\n              ? debugTask.run(\n                  console.timeStamp.bind(\n                    console,\n                    entryName,\n                    0 > startTime ? 0 : startTime,\n                    previousEndTime,\n                    trackNames[trackIdx],\n                    \"Server Components \\u269b\",\n                    color\n                  )\n                )\n              : console.timeStamp(\n                  entryName,\n                  0 > startTime ? 0 : startTime,\n                  previousEndTime,\n                  trackNames[trackIdx],\n                  \"Server Components \\u269b\",\n                  color\n                );\n          }\n        }\n        previousResult.track = trackIdx$jscomp$6;\n        return previousResult;\n      }\n      var children = root._children;\n      var debugInfo = root._debugInfo;\n      if (0 === debugInfo.length && \"fulfilled\" === root.status) {\n        var resolvedValue = resolveLazy(root.value);\n        \"object\" === typeof resolvedValue &&\n          null !== resolvedValue &&\n          (isArrayImpl(resolvedValue) ||\n            \"function\" === typeof resolvedValue[ASYNC_ITERATOR] ||\n            resolvedValue.$$typeof === REACT_ELEMENT_TYPE ||\n            resolvedValue.$$typeof === REACT_LAZY_TYPE) &&\n          isArrayImpl(resolvedValue._debugInfo) &&\n          (debugInfo = resolvedValue._debugInfo);\n      }\n      if (debugInfo) {\n        for (var startTime$jscomp$0 = 0, i = 0; i < debugInfo.length; i++) {\n          var info = debugInfo[i];\n          \"number\" === typeof info.time && (startTime$jscomp$0 = info.time);\n          if (\"string\" === typeof info.name) {\n            startTime$jscomp$0 < trackTime && trackIdx$jscomp$6++;\n            trackTime = startTime$jscomp$0;\n            break;\n          }\n        }\n        for (var _i4 = debugInfo.length - 1; 0 <= _i4; _i4--) {\n          var _info = debugInfo[_i4];\n          if (\"number\" === typeof _info.time && _info.time > parentEndTime) {\n            parentEndTime = _info.time;\n            break;\n          }\n        }\n      }\n      var result = {\n        track: trackIdx$jscomp$6,\n        endTime: -Infinity,\n        component: null\n      };\n      root._children = result;\n      for (\n        var childrenEndTime = -Infinity,\n          childTrackIdx = trackIdx$jscomp$6,\n          childTrackTime = trackTime,\n          _i5 = 0;\n        _i5 < children.length;\n        _i5++\n      ) {\n        var childResult = flushComponentPerformance(\n          response$jscomp$0,\n          children[_i5],\n          childTrackIdx,\n          childTrackTime,\n          parentEndTime\n        );\n        null !== childResult.component &&\n          (result.component = childResult.component);\n        childTrackIdx = childResult.track;\n        var childEndTime = childResult.endTime;\n        childEndTime > childTrackTime && (childTrackTime = childEndTime);\n        childEndTime > childrenEndTime && (childrenEndTime = childEndTime);\n      }\n      if (debugInfo)\n        for (\n          var componentEndTime = 0,\n            isLastComponent = !0,\n            endTime = -1,\n            endTimeIdx = -1,\n            _i6 = debugInfo.length - 1;\n          0 <= _i6;\n          _i6--\n        ) {\n          var _info2 = debugInfo[_i6];\n          if (\"number\" === typeof _info2.time) {\n            0 === componentEndTime && (componentEndTime = _info2.time);\n            var time = _info2.time;\n            if (-1 < endTimeIdx)\n              for (var j = endTimeIdx - 1; j > _i6; j--) {\n                var candidateInfo = debugInfo[j];\n                if (\"string\" === typeof candidateInfo.name) {\n                  componentEndTime > childrenEndTime &&\n                    (childrenEndTime = componentEndTime);\n                  var componentInfo$jscomp$0 = candidateInfo,\n                    response = response$jscomp$0,\n                    componentInfo$jscomp$1 = componentInfo$jscomp$0,\n                    trackIdx$jscomp$0 = trackIdx$jscomp$6,\n                    startTime$jscomp$1 = time,\n                    componentEndTime$jscomp$0 = componentEndTime,\n                    childrenEndTime$jscomp$0 = childrenEndTime;\n                  if (\n                    isLastComponent &&\n                    \"rejected\" === root.status &&\n                    root.reason !== response._closedReason\n                  ) {\n                    var componentInfo$jscomp$2 = componentInfo$jscomp$1,\n                      trackIdx$jscomp$1 = trackIdx$jscomp$0,\n                      startTime$jscomp$2 = startTime$jscomp$1,\n                      childrenEndTime$jscomp$1 = childrenEndTime$jscomp$0,\n                      error = root.reason;\n                    if (supportsUserTiming) {\n                      var env = componentInfo$jscomp$2.env,\n                        name = componentInfo$jscomp$2.name,\n                        entryName$jscomp$0 =\n                          env === response._rootEnvironmentName ||\n                          void 0 === env\n                            ? name\n                            : name + \" [\" + env + \"]\",\n                        measureName = \"\\u200b\" + entryName$jscomp$0,\n                        properties = [\n                          [\n                            \"Error\",\n                            \"object\" === typeof error &&\n                            null !== error &&\n                            \"string\" === typeof error.message\n                              ? String(error.message)\n                              : String(error)\n                          ]\n                        ];\n                      null != componentInfo$jscomp$2.key &&\n                        addValueToProperties(\n                          \"key\",\n                          componentInfo$jscomp$2.key,\n                          properties,\n                          0,\n                          \"\"\n                        );\n                      null != componentInfo$jscomp$2.props &&\n                        addObjectToProperties(\n                          componentInfo$jscomp$2.props,\n                          properties,\n                          0,\n                          \"\"\n                        );\n                      performance.measure(measureName, {\n                        start: 0 > startTime$jscomp$2 ? 0 : startTime$jscomp$2,\n                        end: childrenEndTime$jscomp$1,\n                        detail: {\n                          devtools: {\n                            color: \"error\",\n                            track: trackNames[trackIdx$jscomp$1],\n                            trackGroup: \"Server Components \\u269b\",\n                            tooltipText: entryName$jscomp$0 + \" Errored\",\n                            properties: properties\n                          }\n                        }\n                      });\n                      performance.clearMeasures(measureName);\n                    }\n                  } else {\n                    var componentInfo$jscomp$3 = componentInfo$jscomp$1,\n                      trackIdx$jscomp$2 = trackIdx$jscomp$0,\n                      startTime$jscomp$3 = startTime$jscomp$1,\n                      childrenEndTime$jscomp$2 = childrenEndTime$jscomp$0;\n                    if (\n                      supportsUserTiming &&\n                      0 <= childrenEndTime$jscomp$2 &&\n                      10 > trackIdx$jscomp$2\n                    ) {\n                      var env$jscomp$0 = componentInfo$jscomp$3.env,\n                        name$jscomp$0 = componentInfo$jscomp$3.name,\n                        isPrimaryEnv =\n                          env$jscomp$0 === response._rootEnvironmentName,\n                        selfTime =\n                          componentEndTime$jscomp$0 - startTime$jscomp$3,\n                        color$jscomp$0 =\n                          0.5 > selfTime\n                            ? isPrimaryEnv\n                              ? \"primary-light\"\n                              : \"secondary-light\"\n                            : 50 > selfTime\n                              ? isPrimaryEnv\n                                ? \"primary\"\n                                : \"secondary\"\n                              : 500 > selfTime\n                                ? isPrimaryEnv\n                                  ? \"primary-dark\"\n                                  : \"secondary-dark\"\n                                : \"error\",\n                        debugTask$jscomp$0 = componentInfo$jscomp$3.debugTask,\n                        measureName$jscomp$0 =\n                          \"\\u200b\" +\n                          (isPrimaryEnv || void 0 === env$jscomp$0\n                            ? name$jscomp$0\n                            : name$jscomp$0 + \" [\" + env$jscomp$0 + \"]\");\n                      if (debugTask$jscomp$0) {\n                        var properties$jscomp$0 = [];\n                        null != componentInfo$jscomp$3.key &&\n                          addValueToProperties(\n                            \"key\",\n                            componentInfo$jscomp$3.key,\n                            properties$jscomp$0,\n                            0,\n                            \"\"\n                          );\n                        null != componentInfo$jscomp$3.props &&\n                          addObjectToProperties(\n                            componentInfo$jscomp$3.props,\n                            properties$jscomp$0,\n                            0,\n                            \"\"\n                          );\n                        debugTask$jscomp$0.run(\n                          performance.measure.bind(\n                            performance,\n                            measureName$jscomp$0,\n                            {\n                              start:\n                                0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3,\n                              end: childrenEndTime$jscomp$2,\n                              detail: {\n                                devtools: {\n                                  color: color$jscomp$0,\n                                  track: trackNames[trackIdx$jscomp$2],\n                                  trackGroup: \"Server Components \\u269b\",\n                                  properties: properties$jscomp$0\n                                }\n                              }\n                            }\n                          )\n                        );\n                        performance.clearMeasures(measureName$jscomp$0);\n                      } else\n                        console.timeStamp(\n                          measureName$jscomp$0,\n                          0 > startTime$jscomp$3 ? 0 : startTime$jscomp$3,\n                          childrenEndTime$jscomp$2,\n                          trackNames[trackIdx$jscomp$2],\n                          \"Server Components \\u269b\",\n                          color$jscomp$0\n                        );\n                    }\n                  }\n                  componentEndTime = time;\n                  result.component = componentInfo$jscomp$0;\n                  isLastComponent = !1;\n                } else if (\n                  candidateInfo.awaited &&\n                  null != candidateInfo.awaited.env\n                ) {\n                  endTime > childrenEndTime && (childrenEndTime = endTime);\n                  var asyncInfo = candidateInfo,\n                    env$jscomp$1 = response$jscomp$0._rootEnvironmentName,\n                    promise = asyncInfo.awaited.value;\n                  if (promise) {\n                    var thenable = promise;\n                    switch (thenable.status) {\n                      case \"fulfilled\":\n                        logComponentAwait(\n                          asyncInfo,\n                          trackIdx$jscomp$6,\n                          time,\n                          endTime,\n                          env$jscomp$1,\n                          thenable.value\n                        );\n                        break;\n                      case \"rejected\":\n                        var asyncInfo$jscomp$0 = asyncInfo,\n                          trackIdx$jscomp$3 = trackIdx$jscomp$6,\n                          startTime$jscomp$4 = time,\n                          endTime$jscomp$0 = endTime,\n                          rootEnv = env$jscomp$1,\n                          error$jscomp$0 = thenable.reason;\n                        if (supportsUserTiming && 0 < endTime$jscomp$0) {\n                          var description = getIODescription(error$jscomp$0),\n                            entryName$jscomp$1 =\n                              \"await \" +\n                              getIOShortName(\n                                asyncInfo$jscomp$0.awaited,\n                                description,\n                                asyncInfo$jscomp$0.env,\n                                rootEnv\n                              ),\n                            debugTask$jscomp$1 =\n                              asyncInfo$jscomp$0.debugTask ||\n                              asyncInfo$jscomp$0.awaited.debugTask;\n                          if (debugTask$jscomp$1) {\n                            var properties$jscomp$1 = [\n                                [\n                                  \"Rejected\",\n                                  \"object\" === typeof error$jscomp$0 &&\n                                  null !== error$jscomp$0 &&\n                                  \"string\" === typeof error$jscomp$0.message\n                                    ? String(error$jscomp$0.message)\n                                    : String(error$jscomp$0)\n                                ]\n                              ],\n                              tooltipText =\n                                getIOLongName(\n                                  asyncInfo$jscomp$0.awaited,\n                                  description,\n                                  asyncInfo$jscomp$0.env,\n                                  rootEnv\n                                ) + \" Rejected\";\n                            debugTask$jscomp$1.run(\n                              performance.measure.bind(\n                                performance,\n                                entryName$jscomp$1,\n                                {\n                                  start:\n                                    0 > startTime$jscomp$4\n                                      ? 0\n                                      : startTime$jscomp$4,\n                                  end: endTime$jscomp$0,\n                                  detail: {\n                                    devtools: {\n                                      color: \"error\",\n                                      track: trackNames[trackIdx$jscomp$3],\n                                      trackGroup: \"Server Components \\u269b\",\n                                      properties: properties$jscomp$1,\n                                      tooltipText: tooltipText\n                                    }\n                                  }\n                                }\n                              )\n                            );\n                            performance.clearMeasures(entryName$jscomp$1);\n                          } else\n                            console.timeStamp(\n                              entryName$jscomp$1,\n                              0 > startTime$jscomp$4 ? 0 : startTime$jscomp$4,\n                              endTime$jscomp$0,\n                              trackNames[trackIdx$jscomp$3],\n                              \"Server Components \\u269b\",\n                              \"error\"\n                            );\n                        }\n                        break;\n                      default:\n                        logComponentAwait(\n                          asyncInfo,\n                          trackIdx$jscomp$6,\n                          time,\n                          endTime,\n                          env$jscomp$1,\n                          void 0\n                        );\n                    }\n                  } else\n                    logComponentAwait(\n                      asyncInfo,\n                      trackIdx$jscomp$6,\n                      time,\n                      endTime,\n                      env$jscomp$1,\n                      void 0\n                    );\n                }\n              }\n            else {\n              endTime = time;\n              for (var _j = debugInfo.length - 1; _j > _i6; _j--) {\n                var _candidateInfo = debugInfo[_j];\n                if (\"string\" === typeof _candidateInfo.name) {\n                  componentEndTime > childrenEndTime &&\n                    (childrenEndTime = componentEndTime);\n                  var _componentInfo = _candidateInfo,\n                    _env = response$jscomp$0._rootEnvironmentName,\n                    componentInfo$jscomp$4 = _componentInfo,\n                    trackIdx$jscomp$4 = trackIdx$jscomp$6,\n                    startTime$jscomp$5 = time,\n                    childrenEndTime$jscomp$3 = childrenEndTime;\n                  if (supportsUserTiming) {\n                    var env$jscomp$2 = componentInfo$jscomp$4.env,\n                      name$jscomp$1 = componentInfo$jscomp$4.name,\n                      entryName$jscomp$2 =\n                        env$jscomp$2 === _env || void 0 === env$jscomp$2\n                          ? name$jscomp$1\n                          : name$jscomp$1 + \" [\" + env$jscomp$2 + \"]\",\n                      measureName$jscomp$1 = \"\\u200b\" + entryName$jscomp$2,\n                      properties$jscomp$2 = [\n                        [\n                          \"Aborted\",\n                          \"The stream was aborted before this Component finished rendering.\"\n                        ]\n                      ];\n                    null != componentInfo$jscomp$4.key &&\n                      addValueToProperties(\n                        \"key\",\n                        componentInfo$jscomp$4.key,\n                        properties$jscomp$2,\n                        0,\n                        \"\"\n                      );\n                    null != componentInfo$jscomp$4.props &&\n                      addObjectToProperties(\n                        componentInfo$jscomp$4.props,\n                        properties$jscomp$2,\n                        0,\n                        \"\"\n                      );\n                    performance.measure(measureName$jscomp$1, {\n                      start: 0 > startTime$jscomp$5 ? 0 : startTime$jscomp$5,\n                      end: childrenEndTime$jscomp$3,\n                      detail: {\n                        devtools: {\n                          color: \"warning\",\n                          track: trackNames[trackIdx$jscomp$4],\n                          trackGroup: \"Server Components \\u269b\",\n                          tooltipText: entryName$jscomp$2 + \" Aborted\",\n                          properties: properties$jscomp$2\n                        }\n                      }\n                    });\n                    performance.clearMeasures(measureName$jscomp$1);\n                  }\n                  componentEndTime = time;\n                  result.component = _componentInfo;\n                  isLastComponent = !1;\n                } else if (\n                  _candidateInfo.awaited &&\n                  null != _candidateInfo.awaited.env\n                ) {\n                  var _asyncInfo = _candidateInfo,\n                    _env2 = response$jscomp$0._rootEnvironmentName;\n                  _asyncInfo.awaited.end > endTime &&\n                    (endTime = _asyncInfo.awaited.end);\n                  endTime > childrenEndTime && (childrenEndTime = endTime);\n                  var asyncInfo$jscomp$1 = _asyncInfo,\n                    trackIdx$jscomp$5 = trackIdx$jscomp$6,\n                    startTime$jscomp$6 = time,\n                    endTime$jscomp$1 = endTime,\n                    rootEnv$jscomp$0 = _env2;\n                  if (supportsUserTiming && 0 < endTime$jscomp$1) {\n                    var entryName$jscomp$3 =\n                        \"await \" +\n                        getIOShortName(\n                          asyncInfo$jscomp$1.awaited,\n                          \"\",\n                          asyncInfo$jscomp$1.env,\n                          rootEnv$jscomp$0\n                        ),\n                      debugTask$jscomp$2 =\n                        asyncInfo$jscomp$1.debugTask ||\n                        asyncInfo$jscomp$1.awaited.debugTask;\n                    if (debugTask$jscomp$2) {\n                      var tooltipText$jscomp$0 =\n                        getIOLongName(\n                          asyncInfo$jscomp$1.awaited,\n                          \"\",\n                          asyncInfo$jscomp$1.env,\n                          rootEnv$jscomp$0\n                        ) + \" Aborted\";\n                      debugTask$jscomp$2.run(\n                        performance.measure.bind(\n                          performance,\n                          entryName$jscomp$3,\n                          {\n                            start:\n                              0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6,\n                            end: endTime$jscomp$1,\n                            detail: {\n                              devtools: {\n                                color: \"warning\",\n                                track: trackNames[trackIdx$jscomp$5],\n                                trackGroup: \"Server Components \\u269b\",\n                                properties: [\n                                  [\n                                    \"Aborted\",\n                                    \"The stream was aborted before this Promise resolved.\"\n                                  ]\n                                ],\n                                tooltipText: tooltipText$jscomp$0\n                              }\n                            }\n                          }\n                        )\n                      );\n                      performance.clearMeasures(entryName$jscomp$3);\n                    } else\n                      console.timeStamp(\n                        entryName$jscomp$3,\n                        0 > startTime$jscomp$6 ? 0 : startTime$jscomp$6,\n                        endTime$jscomp$1,\n                        trackNames[trackIdx$jscomp$5],\n                        \"Server Components \\u269b\",\n                        \"warning\"\n                      );\n                  }\n                }\n              }\n            }\n            endTime = time;\n            endTimeIdx = _i6;\n          }\n        }\n      result.endTime = childrenEndTime;\n      return result;\n    }\n    function flushInitialRenderPerformance(response) {\n      if (response._replayConsole) {\n        var rootChunk = getChunk(response, 0);\n        isArrayImpl(rootChunk._children) &&\n          (markAllTracksInOrder(),\n          flushComponentPerformance(\n            response,\n            rootChunk,\n            0,\n            -Infinity,\n            -Infinity\n          ));\n      }\n    }\n    function processFullBinaryRow(\n      response,\n      streamState,\n      id,\n      tag,\n      buffer,\n      chunk\n    ) {\n      switch (tag) {\n        case 65:\n          resolveBuffer(\n            response,\n            id,\n            mergeBuffer(buffer, chunk).buffer,\n            streamState\n          );\n          return;\n        case 79:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Int8Array,\n            1,\n            streamState\n          );\n          return;\n        case 111:\n          resolveBuffer(\n            response,\n            id,\n            0 === buffer.length ? chunk : mergeBuffer(buffer, chunk),\n            streamState\n          );\n          return;\n        case 85:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Uint8ClampedArray,\n            1,\n            streamState\n          );\n          return;\n        case 83:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Int16Array,\n            2,\n            streamState\n          );\n          return;\n        case 115:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Uint16Array,\n            2,\n            streamState\n          );\n          return;\n        case 76:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Int32Array,\n            4,\n            streamState\n          );\n          return;\n        case 108:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Uint32Array,\n            4,\n            streamState\n          );\n          return;\n        case 71:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Float32Array,\n            4,\n            streamState\n          );\n          return;\n        case 103:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            Float64Array,\n            8,\n            streamState\n          );\n          return;\n        case 77:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            BigInt64Array,\n            8,\n            streamState\n          );\n          return;\n        case 109:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            BigUint64Array,\n            8,\n            streamState\n          );\n          return;\n        case 86:\n          resolveTypedArray(\n            response,\n            id,\n            buffer,\n            chunk,\n            DataView,\n            1,\n            streamState\n          );\n          return;\n      }\n      for (\n        var stringDecoder = response._stringDecoder, row = \"\", i = 0;\n        i < buffer.length;\n        i++\n      )\n        row += stringDecoder.decode(buffer[i], decoderOptions);\n      row += stringDecoder.decode(chunk);\n      processFullStringRow(response, streamState, id, tag, row);\n    }\n    function processFullStringRow(response, streamState, id, tag, row) {\n      switch (tag) {\n        case 73:\n          resolveModule(response, id, row, streamState);\n          break;\n        case 72:\n          id = row[0];\n          streamState = row.slice(1);\n          response = parseModel(response, streamState);\n          streamState = ReactDOMSharedInternals.d;\n          switch (id) {\n            case \"D\":\n              streamState.D(response);\n              break;\n            case \"C\":\n              \"string\" === typeof response\n                ? streamState.C(response)\n                : streamState.C(response[0], response[1]);\n              break;\n            case \"L\":\n              id = response[0];\n              row = response[1];\n              3 === response.length\n                ? streamState.L(id, row, response[2])\n                : streamState.L(id, row);\n              break;\n            case \"m\":\n              \"string\" === typeof response\n                ? streamState.m(response)\n                : streamState.m(response[0], response[1]);\n              break;\n            case \"X\":\n              \"string\" === typeof response\n                ? streamState.X(response)\n                : streamState.X(response[0], response[1]);\n              break;\n            case \"S\":\n              \"string\" === typeof response\n                ? streamState.S(response)\n                : streamState.S(\n                    response[0],\n                    0 === response[1] ? void 0 : response[1],\n                    3 === response.length ? response[2] : void 0\n                  );\n              break;\n            case \"M\":\n              \"string\" === typeof response\n                ? streamState.M(response)\n                : streamState.M(response[0], response[1]);\n          }\n          break;\n        case 69:\n          tag = response._chunks;\n          var chunk = tag.get(id);\n          row = JSON.parse(row);\n          var error = resolveErrorDev(response, row);\n          error.digest = row.digest;\n          chunk\n            ? (resolveChunkDebugInfo(response, streamState, chunk),\n              triggerErrorOnChunk(response, chunk, error))\n            : ((row = new ReactPromise(\"rejected\", null, error)),\n              resolveChunkDebugInfo(response, streamState, row),\n              tag.set(id, row));\n          break;\n        case 84:\n          tag = response._chunks;\n          (chunk = tag.get(id)) && \"pending\" !== chunk.status\n            ? chunk.reason.enqueueValue(row)\n            : (chunk && releasePendingChunk(response, chunk),\n              (row = new ReactPromise(\"fulfilled\", row, null)),\n              resolveChunkDebugInfo(response, streamState, row),\n              tag.set(id, row));\n          break;\n        case 78:\n          response._timeOrigin = +row - performance.timeOrigin;\n          break;\n        case 68:\n          id = getChunk(response, id);\n          \"fulfilled\" !== id.status &&\n            \"rejected\" !== id.status &&\n            \"halted\" !== id.status &&\n            \"blocked\" !== id.status &&\n            \"resolved_module\" !== id.status &&\n            ((streamState = id._debugChunk),\n            (tag = createResolvedModelChunk(response, row)),\n            (tag._debugChunk = streamState),\n            (id._debugChunk = tag),\n            initializeDebugChunk(response, id),\n            \"blocked\" !== tag.status ||\n              (void 0 !== response._debugChannel &&\n                response._debugChannel.hasReadable) ||\n              '\"' !== row[0] ||\n              \"$\" !== row[1] ||\n              ((streamState = row.slice(2, row.length - 1).split(\":\")),\n              (streamState = parseInt(streamState[0], 16)),\n              \"pending\" === getChunk(response, streamState).status &&\n                (id._debugChunk = null)));\n          break;\n        case 74:\n          resolveIOInfo(response, id, row);\n          break;\n        case 87:\n          resolveConsoleEntry(response, row);\n          break;\n        case 82:\n          startReadableStream(response, id, void 0, streamState);\n          break;\n        case 114:\n          startReadableStream(response, id, \"bytes\", streamState);\n          break;\n        case 88:\n          startAsyncIterable(response, id, !1, streamState);\n          break;\n        case 120:\n          startAsyncIterable(response, id, !0, streamState);\n          break;\n        case 67:\n          (id = response._chunks.get(id)) &&\n            \"fulfilled\" === id.status &&\n            (0 === --response._pendingChunks &&\n              (response._weakResponse.response = null),\n            id.reason.close(\"\" === row ? '\"$undefined\"' : row));\n          break;\n        default:\n          if (\"\" === row) {\n            if (\n              ((streamState = response._chunks),\n              (row = streamState.get(id)) ||\n                streamState.set(id, (row = createPendingChunk(response))),\n              \"pending\" === row.status || \"blocked\" === row.status)\n            )\n              releasePendingChunk(response, row),\n                (response = row),\n                (response.status = \"halted\"),\n                (response.value = null),\n                (response.reason = null);\n          } else\n            (tag = response._chunks),\n              (chunk = tag.get(id))\n                ? (resolveChunkDebugInfo(response, streamState, chunk),\n                  resolveModelChunk(response, chunk, row))\n                : ((row = createResolvedModelChunk(response, row)),\n                  resolveChunkDebugInfo(response, streamState, row),\n                  tag.set(id, row));\n      }\n    }\n    function processBinaryChunk(weakResponse, streamState, chunk) {\n      if (!hasGCedResponse(weakResponse)) {\n        weakResponse = unwrapWeakResponse(weakResponse);\n        var i = 0,\n          rowState = streamState._rowState,\n          rowID = streamState._rowID,\n          rowTag = streamState._rowTag,\n          rowLength = streamState._rowLength,\n          buffer = streamState._buffer,\n          chunkLength = chunk.length;\n        for (\n          incrementChunkDebugInfo(streamState, chunkLength);\n          i < chunkLength;\n\n        ) {\n          var lastIdx = -1;\n          switch (rowState) {\n            case 0:\n              lastIdx = chunk[i++];\n              58 === lastIdx\n                ? (rowState = 1)\n                : (rowID =\n                    (rowID << 4) |\n                    (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));\n              continue;\n            case 1:\n              rowState = chunk[i];\n              84 === rowState ||\n              65 === rowState ||\n              79 === rowState ||\n              111 === rowState ||\n              98 === rowState ||\n              85 === rowState ||\n              83 === rowState ||\n              115 === rowState ||\n              76 === rowState ||\n              108 === rowState ||\n              71 === rowState ||\n              103 === rowState ||\n              77 === rowState ||\n              109 === rowState ||\n              86 === rowState\n                ? ((rowTag = rowState), (rowState = 2), i++)\n                : (64 < rowState && 91 > rowState) ||\n                    35 === rowState ||\n                    114 === rowState ||\n                    120 === rowState\n                  ? ((rowTag = rowState), (rowState = 3), i++)\n                  : ((rowTag = 0), (rowState = 3));\n              continue;\n            case 2:\n              lastIdx = chunk[i++];\n              44 === lastIdx\n                ? (rowState = 4)\n                : (rowLength =\n                    (rowLength << 4) |\n                    (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));\n              continue;\n            case 3:\n              lastIdx = chunk.indexOf(10, i);\n              break;\n            case 4:\n              (lastIdx = i + rowLength),\n                lastIdx > chunk.length && (lastIdx = -1);\n          }\n          var offset = chunk.byteOffset + i;\n          if (-1 < lastIdx)\n            (rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)),\n              98 === rowTag\n                ? resolveBuffer(\n                    weakResponse,\n                    rowID,\n                    lastIdx === chunkLength ? rowLength : rowLength.slice(),\n                    streamState\n                  )\n                : processFullBinaryRow(\n                    weakResponse,\n                    streamState,\n                    rowID,\n                    rowTag,\n                    buffer,\n                    rowLength\n                  ),\n              (i = lastIdx),\n              3 === rowState && i++,\n              (rowLength = rowID = rowTag = rowState = 0),\n              (buffer.length = 0);\n          else {\n            chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i);\n            98 === rowTag\n              ? ((rowLength -= chunk.byteLength),\n                resolveBuffer(weakResponse, rowID, chunk, streamState))\n              : (buffer.push(chunk), (rowLength -= chunk.byteLength));\n            break;\n          }\n        }\n        streamState._rowState = rowState;\n        streamState._rowID = rowID;\n        streamState._rowTag = rowTag;\n        streamState._rowLength = rowLength;\n      }\n    }\n    function parseModel(response, json) {\n      json = JSON.parse(json);\n      return reviveModel(response, json, { \"\": json }, \"\");\n    }\n    function reviveModel(response, value, parentObject, key) {\n      if (\"string\" === typeof value)\n        return \"$\" === value[0]\n          ? parseModelString(response, parentObject, key, value)\n          : value;\n      if (\"object\" !== typeof value || null === value) return value;\n      if (isArrayImpl(value)) {\n        for (var i = 0; i < value.length; i++)\n          value[i] = reviveModel(response, value[i], value, \"\" + i);\n        if (value[0] === REACT_ELEMENT_TYPE) {\n          if (value[0] === REACT_ELEMENT_TYPE)\n            b: {\n              key = value[4];\n              parentObject = value[5];\n              i = value[6];\n              value = {\n                $$typeof: REACT_ELEMENT_TYPE,\n                type: value[1],\n                key: value[2],\n                props: value[3],\n                _owner: void 0 === key ? null : key\n              };\n              Object.defineProperty(value, \"ref\", {\n                enumerable: !1,\n                get: nullRefGetter\n              });\n              value._store = {};\n              Object.defineProperty(value._store, \"validated\", {\n                configurable: !1,\n                enumerable: !1,\n                writable: !0,\n                value: i\n              });\n              Object.defineProperty(value, \"_debugInfo\", {\n                configurable: !1,\n                enumerable: !1,\n                writable: !0,\n                value: null\n              });\n              Object.defineProperty(value, \"_debugStack\", {\n                configurable: !1,\n                enumerable: !1,\n                writable: !0,\n                value: void 0 === parentObject ? null : parentObject\n              });\n              Object.defineProperty(value, \"_debugTask\", {\n                configurable: !1,\n                enumerable: !1,\n                writable: !0,\n                value: null\n              });\n              if (null !== initializingHandler) {\n                key = initializingHandler;\n                initializingHandler = key.parent;\n                if (key.errored) {\n                  parentObject = new ReactPromise(\"rejected\", null, key.reason);\n                  initializeElement(response, value, null);\n                  response = {\n                    name: getComponentNameFromType(value.type) || \"\",\n                    owner: value._owner\n                  };\n                  response.debugStack = value._debugStack;\n                  supportsCreateTask && (response.debugTask = value._debugTask);\n                  parentObject._debugInfo = [response];\n                  response = createLazyChunkWrapper(parentObject, i);\n                  break b;\n                }\n                if (0 < key.deps) {\n                  parentObject = new ReactPromise(\"blocked\", null, null);\n                  key.value = value;\n                  key.chunk = parentObject;\n                  i = createLazyChunkWrapper(parentObject, i);\n                  response = initializeElement.bind(null, response, value, i);\n                  parentObject.then(response, response);\n                  response = i;\n                  break b;\n                }\n              }\n              initializeElement(response, value, null);\n              response = value;\n            }\n          else response = value;\n          return response;\n        }\n        return value;\n      }\n      for (i in value)\n        \"__proto__\" === i\n          ? delete value[i]\n          : ((parentObject = reviveModel(response, value[i], value, i)),\n            void 0 !== parentObject\n              ? (value[i] = parentObject)\n              : delete value[i]);\n      return value;\n    }\n    function close(weakResponse) {\n      if (!hasGCedResponse(weakResponse)) {\n        var response = unwrapWeakResponse(weakResponse);\n        response._allowPartialStream\n          ? ((response._closed = !0),\n            response._chunks.forEach(function (chunk) {\n              \"pending\" === chunk.status\n                ? (releasePendingChunk(response, chunk),\n                  (chunk.status = \"halted\"),\n                  (chunk.value = null),\n                  (chunk.reason = null))\n                : \"fulfilled\" === chunk.status &&\n                  null !== chunk.reason &&\n                  chunk.reason.close('\"$undefined\"');\n            }),\n            (weakResponse = response._debugChannel),\n            void 0 !== weakResponse &&\n              (closeDebugChannel(weakResponse),\n              (response._debugChannel = void 0),\n              null !== debugChannelRegistry &&\n                debugChannelRegistry.unregister(response)))\n          : reportGlobalError(weakResponse, Error(\"Connection closed.\"));\n      }\n    }\n    function noServerCall$1() {\n      throw Error(\n        \"Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead.\"\n      );\n    }\n    function createResponseFromOptions(options) {\n      return createResponse(\n        options.serverConsumerManifest.moduleMap,\n        options.serverConsumerManifest.serverModuleMap,\n        options.serverConsumerManifest.moduleLoading,\n        noServerCall$1,\n        options.encodeFormAction,\n        \"string\" === typeof options.nonce ? options.nonce : void 0,\n        options && options.temporaryReferences\n          ? options.temporaryReferences\n          : void 0,\n        options && options.unstable_allowPartialStream\n          ? options.unstable_allowPartialStream\n          : !1,\n        options && options.findSourceMapURL ? options.findSourceMapURL : void 0,\n        options ? !0 === options.replayConsoleLogs : !1,\n        options && options.environmentName ? options.environmentName : void 0,\n        options && null != options.startTime ? options.startTime : void 0,\n        options && null != options.endTime ? options.endTime : void 0,\n        options && void 0 !== options.debugChannel\n          ? {\n              hasReadable: void 0 !== options.debugChannel.readable,\n              callback: null\n            }\n          : void 0\n      );\n    }\n    function startReadingFromStream$1(response, stream, onDone, debugValue) {\n      function progress(_ref) {\n        var value = _ref.value;\n        if (_ref.done) return onDone();\n        processBinaryChunk(response, streamState, value);\n        return reader.read().then(progress).catch(error);\n      }\n      function error(e) {\n        reportGlobalError(response, e);\n      }\n      var streamState = createStreamState(response, debugValue),\n        reader = stream.getReader();\n      reader.read().then(progress).catch(error);\n    }\n    function noServerCall() {\n      throw Error(\n        \"Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead.\"\n      );\n    }\n    function startReadingFromStream(response$jscomp$0, stream, onEnd) {\n      var streamState = createStreamState(response$jscomp$0, stream);\n      stream.on(\"data\", function (chunk) {\n        if (\"string\" === typeof chunk) {\n          if (!hasGCedResponse(response$jscomp$0)) {\n            var response = unwrapWeakResponse(response$jscomp$0),\n              i = 0,\n              rowState = streamState._rowState,\n              rowID = streamState._rowID,\n              rowTag = streamState._rowTag,\n              rowLength = streamState._rowLength,\n              buffer = streamState._buffer,\n              chunkLength = chunk.length;\n            for (\n              incrementChunkDebugInfo(streamState, chunkLength);\n              i < chunkLength;\n\n            ) {\n              var lastIdx = -1;\n              switch (rowState) {\n                case 0:\n                  lastIdx = chunk.charCodeAt(i++);\n                  58 === lastIdx\n                    ? (rowState = 1)\n                    : (rowID =\n                        (rowID << 4) |\n                        (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));\n                  continue;\n                case 1:\n                  rowState = chunk.charCodeAt(i);\n                  84 === rowState ||\n                  65 === rowState ||\n                  79 === rowState ||\n                  111 === rowState ||\n                  85 === rowState ||\n                  83 === rowState ||\n                  115 === rowState ||\n                  76 === rowState ||\n                  108 === rowState ||\n                  71 === rowState ||\n                  103 === rowState ||\n                  77 === rowState ||\n                  109 === rowState ||\n                  86 === rowState\n                    ? ((rowTag = rowState), (rowState = 2), i++)\n                    : (64 < rowState && 91 > rowState) ||\n                        114 === rowState ||\n                        120 === rowState\n                      ? ((rowTag = rowState), (rowState = 3), i++)\n                      : ((rowTag = 0), (rowState = 3));\n                  continue;\n                case 2:\n                  lastIdx = chunk.charCodeAt(i++);\n                  44 === lastIdx\n                    ? (rowState = 4)\n                    : (rowLength =\n                        (rowLength << 4) |\n                        (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));\n                  continue;\n                case 3:\n                  lastIdx = chunk.indexOf(\"\\n\", i);\n                  break;\n                case 4:\n                  if (84 !== rowTag)\n                    throw Error(\n                      \"Binary RSC chunks cannot be encoded as strings. This is a bug in the wiring of the React streams.\"\n                    );\n                  if (rowLength < chunk.length || chunk.length > 3 * rowLength)\n                    throw Error(\n                      \"String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams.\"\n                    );\n                  lastIdx = chunk.length;\n              }\n              if (-1 < lastIdx) {\n                if (0 < buffer.length)\n                  throw Error(\n                    \"String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams.\"\n                  );\n                i = chunk.slice(i, lastIdx);\n                processFullStringRow(response, streamState, rowID, rowTag, i);\n                i = lastIdx;\n                3 === rowState && i++;\n                rowLength = rowID = rowTag = rowState = 0;\n                buffer.length = 0;\n              } else if (chunk.length !== i)\n                throw Error(\n                  \"String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams.\"\n                );\n            }\n            streamState._rowState = rowState;\n            streamState._rowID = rowID;\n            streamState._rowTag = rowTag;\n            streamState._rowLength = rowLength;\n          }\n        } else processBinaryChunk(response$jscomp$0, streamState, chunk);\n      });\n      stream.on(\"error\", function (error) {\n        reportGlobalError(response$jscomp$0, error);\n      });\n      stream.on(\"end\", onEnd);\n    }\n    var util = require(\"util\"),\n      ReactDOM = require(\"react-dom\"),\n      React = require(\"react\"),\n      decoderOptions = { stream: !0 },\n      bind$1 = Function.prototype.bind,\n      hasConfirmedEval = !1,\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      chunkCache = new Map(),\n      ReactDOMSharedInternals =\n        ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n      ASYNC_ITERATOR = Symbol.asyncIterator,\n      isArrayImpl = Array.isArray,\n      getPrototypeOf = Object.getPrototypeOf,\n      jsxPropsParents = new WeakMap(),\n      jsxChildrenParents = new WeakMap(),\n      CLIENT_REFERENCE_TAG = Symbol.for(\"react.client.reference\"),\n      ObjectPrototype = Object.prototype,\n      knownServerReferences = new WeakMap(),\n      boundCache = new WeakMap(),\n      fakeServerFunctionIdx = 0,\n      FunctionBind = Function.prototype.bind,\n      ArraySlice = Array.prototype.slice,\n      v8FrameRegExp =\n        /^ {3} at (?:(.+) \\((.+):(\\d+):(\\d+)\\)|(?:async )?(.+):(\\d+):(\\d+))$/,\n      jscSpiderMonkeyFrameRegExp = /(?:(.*)@)?(.*):(\\d+):(\\d+)/,\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      supportsUserTiming =\n        \"undefined\" !== typeof console &&\n        \"function\" === typeof console.timeStamp &&\n        \"undefined\" !== typeof performance &&\n        \"function\" === typeof performance.measure,\n      trackNames =\n        \"Primary Parallel Parallel\\u200b Parallel\\u200b\\u200b Parallel\\u200b\\u200b\\u200b Parallel\\u200b\\u200b\\u200b\\u200b Parallel\\u200b\\u200b\\u200b\\u200b\\u200b Parallel\\u200b\\u200b\\u200b\\u200b\\u200b\\u200b Parallel\\u200b\\u200b\\u200b\\u200b\\u200b\\u200b\\u200b Parallel\\u200b\\u200b\\u200b\\u200b\\u200b\\u200b\\u200b\\u200b\".split(\n          \" \"\n        ),\n      prefix,\n      suffix;\n    new (\"function\" === typeof WeakMap ? WeakMap : Map)();\n    var ReactSharedInteralsServer =\n        React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      ReactSharedInternals =\n        React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE ||\n        ReactSharedInteralsServer;\n    ReactPromise.prototype = Object.create(Promise.prototype);\n    ReactPromise.prototype.then = function (resolve, reject) {\n      var _this = this;\n      switch (this.status) {\n        case \"resolved_model\":\n          initializeModelChunk(this);\n          break;\n        case \"resolved_module\":\n          initializeModuleChunk(this);\n      }\n      var resolveCallback = resolve,\n        rejectCallback = reject,\n        wrapperPromise = new Promise(function (res, rej) {\n          resolve = function (value) {\n            wrapperPromise._debugInfo = _this._debugInfo;\n            res(value);\n          };\n          reject = function (reason) {\n            wrapperPromise._debugInfo = _this._debugInfo;\n            rej(reason);\n          };\n        });\n      wrapperPromise.then(resolveCallback, rejectCallback);\n      switch (this.status) {\n        case \"fulfilled\":\n          \"function\" === typeof resolve && resolve(this.value);\n          break;\n        case \"pending\":\n        case \"blocked\":\n          \"function\" === typeof resolve &&\n            (null === this.value && (this.value = []),\n            this.value.push(resolve));\n          \"function\" === typeof reject &&\n            (null === this.reason && (this.reason = []),\n            this.reason.push(reject));\n          break;\n        case \"halted\":\n          break;\n        default:\n          \"function\" === typeof reject && reject(this.reason);\n      }\n    };\n    var debugChannelRegistry =\n        \"function\" === typeof FinalizationRegistry\n          ? new FinalizationRegistry(closeDebugChannel)\n          : null,\n      initializingHandler = null,\n      initializingChunk = null,\n      isInitializingDebugInfo = !1,\n      mightHaveStaticConstructor = /\\bclass\\b.*\\bstatic\\b/,\n      MIN_CHUNK_SIZE = 65536,\n      supportsCreateTask = !!console.createTask,\n      fakeFunctionCache = new Map(),\n      fakeFunctionIdx = 0,\n      createFakeJSXCallStack = {\n        react_stack_bottom_frame: function (response, stack, environmentName) {\n          return buildFakeCallStack(\n            response,\n            stack,\n            environmentName,\n            !1,\n            fakeJSXCallSite\n          )();\n        }\n      },\n      createFakeJSXCallStackInDEV =\n        createFakeJSXCallStack.react_stack_bottom_frame.bind(\n          createFakeJSXCallStack\n        ),\n      currentOwnerInDEV = null,\n      replayConsoleWithCallStack = {\n        react_stack_bottom_frame: function (response, payload) {\n          var methodName = payload[0],\n            stackTrace = payload[1],\n            owner = payload[2],\n            env = payload[3];\n          payload = payload.slice(4);\n          var prevStack = ReactSharedInternals.getCurrentStack;\n          ReactSharedInternals.getCurrentStack = getCurrentStackInDEV;\n          currentOwnerInDEV = null === owner ? response._debugRootOwner : owner;\n          try {\n            a: {\n              var offset = 0;\n              switch (methodName) {\n                case \"dir\":\n                case \"dirxml\":\n                case \"groupEnd\":\n                case \"table\":\n                  var JSCompiler_inline_result = bind$1.apply(\n                    console[methodName],\n                    [console].concat(payload)\n                  );\n                  break a;\n                case \"assert\":\n                  offset = 1;\n              }\n              var newArgs = payload.slice(0);\n              \"string\" === typeof newArgs[offset]\n                ? newArgs.splice(\n                    offset,\n                    1,\n                    \"\\u001b[0m\\u001b[7m%c%s\\u001b[0m%c \" + newArgs[offset],\n                    \"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px\",\n                    \" \" + env + \" \",\n                    \"\"\n                  )\n                : newArgs.splice(\n                    offset,\n                    0,\n                    \"\\u001b[0m\\u001b[7m%c%s\\u001b[0m%c\",\n                    \"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px\",\n                    \" \" + env + \" \",\n                    \"\"\n                  );\n              newArgs.unshift(console);\n              JSCompiler_inline_result = bind$1.apply(\n                console[methodName],\n                newArgs\n              );\n            }\n            var callStack = buildFakeCallStack(\n              response,\n              stackTrace,\n              env,\n              !1,\n              JSCompiler_inline_result\n            );\n            if (null != owner) {\n              var task = initializeFakeTask(response, owner);\n              initializeFakeStack(response, owner);\n              if (null !== task) {\n                task.run(callStack);\n                return;\n              }\n            }\n            var rootTask = getRootTask(response, env);\n            null != rootTask ? rootTask.run(callStack) : callStack();\n          } finally {\n            (currentOwnerInDEV = null),\n              (ReactSharedInternals.getCurrentStack = prevStack);\n          }\n        }\n      },\n      replayConsoleWithCallStackInDEV =\n        replayConsoleWithCallStack.react_stack_bottom_frame.bind(\n          replayConsoleWithCallStack\n        );\n    exports.createFromFetch = function (promiseForResponse, options) {\n      var response = createResponseFromOptions(options);\n      promiseForResponse.then(\n        function (r) {\n          if (\n            options &&\n            options.debugChannel &&\n            options.debugChannel.readable\n          ) {\n            var streamDoneCount = 0,\n              handleDone = function () {\n                2 === ++streamDoneCount && close(response);\n              };\n            startReadingFromStream$1(\n              response,\n              options.debugChannel.readable,\n              handleDone\n            );\n            startReadingFromStream$1(response, r.body, handleDone, r);\n          } else\n            startReadingFromStream$1(\n              response,\n              r.body,\n              close.bind(null, response),\n              r\n            );\n        },\n        function (e) {\n          reportGlobalError(response, e);\n        }\n      );\n      return getRoot(response);\n    };\n    exports.createFromNodeStream = function (\n      stream,\n      serverConsumerManifest,\n      options\n    ) {\n      var response = createResponse(\n        serverConsumerManifest.moduleMap,\n        serverConsumerManifest.serverModuleMap,\n        serverConsumerManifest.moduleLoading,\n        noServerCall,\n        options ? options.encodeFormAction : void 0,\n        options && \"string\" === typeof options.nonce ? options.nonce : void 0,\n        void 0,\n        options && options.unstable_allowPartialStream\n          ? options.unstable_allowPartialStream\n          : !1,\n        options && options.findSourceMapURL ? options.findSourceMapURL : void 0,\n        options ? !0 === options.replayConsoleLogs : !1,\n        options && options.environmentName ? options.environmentName : void 0,\n        options && null != options.startTime ? options.startTime : void 0,\n        options && null != options.endTime ? options.endTime : void 0,\n        options && void 0 !== options.debugChannel\n          ? { hasReadable: !0, callback: null }\n          : void 0\n      );\n      if (options && options.debugChannel) {\n        var streamEndedCount = 0;\n        serverConsumerManifest = function () {\n          2 === ++streamEndedCount && close(response);\n        };\n        startReadingFromStream(\n          response,\n          options.debugChannel,\n          serverConsumerManifest\n        );\n        startReadingFromStream(response, stream, serverConsumerManifest);\n      } else\n        startReadingFromStream(response, stream, close.bind(null, response));\n      return getRoot(response);\n    };\n    exports.createFromReadableStream = function (stream, options) {\n      var response = createResponseFromOptions(options);\n      if (options && options.debugChannel && options.debugChannel.readable) {\n        var streamDoneCount = 0,\n          handleDone = function () {\n            2 === ++streamDoneCount && close(response);\n          };\n        startReadingFromStream$1(\n          response,\n          options.debugChannel.readable,\n          handleDone\n        );\n        startReadingFromStream$1(response, stream, handleDone, stream);\n      } else\n        startReadingFromStream$1(\n          response,\n          stream,\n          close.bind(null, response),\n          stream\n        );\n      return getRoot(response);\n    };\n    exports.createServerReference = function (id) {\n      return createServerReference$1(id, noServerCall$1);\n    };\n    exports.createTemporaryReferenceSet = function () {\n      return new Map();\n    };\n    exports.encodeReply = function (value, options) {\n      return new Promise(function (resolve, reject) {\n        var abort = processReply(\n          value,\n          \"\",\n          options && options.temporaryReferences\n            ? options.temporaryReferences\n            : void 0,\n          resolve,\n          reject\n        );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(signal.reason);\n          else {\n            var listener = function () {\n              abort(signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n      });\n    };\n    exports.registerServerReference = function (\n      reference,\n      id,\n      encodeFormAction\n    ) {\n      registerBoundServerReference(reference, id, null, encodeFormAction);\n      return reference;\n    };\n  })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-server-dom-webpack-client.node.production.js');\n} else {\n  module.exports = require('./cjs/react-server-dom-webpack-client.node.development.js');\n}\n","/**\n * @license React\n * react-compiler-runtime.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    var ReactSharedInternals =\n      require(\"next/dist/compiled/react\").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n    exports.c = function (size) {\n      var dispatcher = ReactSharedInternals.H;\n      null === dispatcher &&\n        console.error(\n          \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n        );\n      return dispatcher.useMemoCache(size);\n    };\n  })();\n","/**\n * @license React\n * react-jsx-dev-runtime.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkKeyStringCoercion(value) {\n      try {\n        testStringCoercion(value);\n        var JSCompiler_inline_result = !1;\n      } catch (e) {\n        JSCompiler_inline_result = !0;\n      }\n      if (JSCompiler_inline_result) {\n        JSCompiler_inline_result = console;\n        var JSCompiler_temp_const = JSCompiler_inline_result.error;\n        var JSCompiler_inline_result$jscomp$0 =\n          (\"function\" === typeof Symbol &&\n            Symbol.toStringTag &&\n            value[Symbol.toStringTag]) ||\n          value.constructor.name ||\n          \"Object\";\n        JSCompiler_temp_const.call(\n          JSCompiler_inline_result,\n          \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          JSCompiler_inline_result$jscomp$0\n        );\n        return testStringCoercion(value);\n      }\n    }\n    function getTaskName(type) {\n      if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n      if (\n        \"object\" === typeof type &&\n        null !== type &&\n        type.$$typeof === REACT_LAZY_TYPE\n      )\n        return \"<...>\";\n      try {\n        var name = getComponentNameFromType(type);\n        return name ? \"<\" + name + \">\" : \"<...>\";\n      } catch (x) {\n        return \"<...>\";\n      }\n    }\n    function getOwner() {\n      var dispatcher = ReactSharedInternals.A;\n      return null === dispatcher ? null : dispatcher.getOwner();\n    }\n    function UnknownOwner() {\n      return Error(\"react-stack-top-frame\");\n    }\n    function hasValidKey(config) {\n      if (hasOwnProperty.call(config, \"key\")) {\n        var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n        if (getter && getter.isReactWarning) return !1;\n      }\n      return void 0 !== config.key;\n    }\n    function defineKeyPropWarningGetter(props, displayName) {\n      function warnAboutAccessingKey() {\n        specialPropKeyWarningShown ||\n          ((specialPropKeyWarningShown = !0),\n          console.error(\n            \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n            displayName\n          ));\n      }\n      warnAboutAccessingKey.isReactWarning = !0;\n      Object.defineProperty(props, \"key\", {\n        get: warnAboutAccessingKey,\n        configurable: !0\n      });\n    }\n    function elementRefGetterWithDeprecationWarning() {\n      var componentName = getComponentNameFromType(this.type);\n      didWarnAboutElementRef[componentName] ||\n        ((didWarnAboutElementRef[componentName] = !0),\n        console.error(\n          \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n        ));\n      componentName = this.props.ref;\n      return void 0 !== componentName ? componentName : null;\n    }\n    function ReactElement(type, key, props, owner, debugStack, debugTask) {\n      var refProp = props.ref;\n      type = {\n        $$typeof: REACT_ELEMENT_TYPE,\n        type: type,\n        key: key,\n        props: props,\n        _owner: owner\n      };\n      null !== (void 0 !== refProp ? refProp : null)\n        ? Object.defineProperty(type, \"ref\", {\n            enumerable: !1,\n            get: elementRefGetterWithDeprecationWarning\n          })\n        : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n      type._store = {};\n      Object.defineProperty(type._store, \"validated\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: 0\n      });\n      Object.defineProperty(type, \"_debugInfo\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: null\n      });\n      Object.defineProperty(type, \"_debugStack\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugStack\n      });\n      Object.defineProperty(type, \"_debugTask\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugTask\n      });\n      Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n      return type;\n    }\n    function jsxDEVImpl(\n      type,\n      config,\n      maybeKey,\n      isStaticChildren,\n      debugStack,\n      debugTask\n    ) {\n      var children = config.children;\n      if (void 0 !== children)\n        if (isStaticChildren)\n          if (isArrayImpl(children)) {\n            for (\n              isStaticChildren = 0;\n              isStaticChildren < children.length;\n              isStaticChildren++\n            )\n              validateChildKeys(children[isStaticChildren]);\n            Object.freeze && Object.freeze(children);\n          } else\n            console.error(\n              \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n            );\n        else validateChildKeys(children);\n      if (hasOwnProperty.call(config, \"key\")) {\n        children = getComponentNameFromType(type);\n        var keys = Object.keys(config).filter(function (k) {\n          return \"key\" !== k;\n        });\n        isStaticChildren =\n          0 < keys.length\n            ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n            : \"{key: someKey}\";\n        didWarnAboutKeySpread[children + isStaticChildren] ||\n          ((keys =\n            0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n          console.error(\n            'A props object containing a \"key\" prop is being spread into JSX:\\n  let props = %s;\\n  <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n  let props = %s;\\n  <%s key={someKey} {...props} />',\n            isStaticChildren,\n            children,\n            keys,\n            children\n          ),\n          (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n      }\n      children = null;\n      void 0 !== maybeKey &&\n        (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n      hasValidKey(config) &&\n        (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n      if (\"key\" in config) {\n        maybeKey = {};\n        for (var propName in config)\n          \"key\" !== propName && (maybeKey[propName] = config[propName]);\n      } else maybeKey = config;\n      children &&\n        defineKeyPropWarningGetter(\n          maybeKey,\n          \"function\" === typeof type\n            ? type.displayName || type.name || \"Unknown\"\n            : type\n        );\n      return ReactElement(\n        type,\n        children,\n        maybeKey,\n        getOwner(),\n        debugStack,\n        debugTask\n      );\n    }\n    function validateChildKeys(node) {\n      isValidElement(node)\n        ? node._store && (node._store.validated = 1)\n        : \"object\" === typeof node &&\n          null !== node &&\n          node.$$typeof === REACT_LAZY_TYPE &&\n          (\"fulfilled\" === node._payload.status\n            ? isValidElement(node._payload.value) &&\n              node._payload.value._store &&\n              (node._payload.value._store.validated = 1)\n            : node._store && (node._store.validated = 1));\n    }\n    function isValidElement(object) {\n      return (\n        \"object\" === typeof object &&\n        null !== object &&\n        object.$$typeof === REACT_ELEMENT_TYPE\n      );\n    }\n    var React = require(\"next/dist/compiled/react\"),\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      ReactSharedInternals =\n        React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      isArrayImpl = Array.isArray,\n      createTask = console.createTask\n        ? console.createTask\n        : function () {\n            return null;\n          };\n    React = {\n      react_stack_bottom_frame: function (callStackForError) {\n        return callStackForError();\n      }\n    };\n    var specialPropKeyWarningShown;\n    var didWarnAboutElementRef = {};\n    var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n      React,\n      UnknownOwner\n    )();\n    var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n    var didWarnAboutKeySpread = {};\n    exports.Fragment = REACT_FRAGMENT_TYPE;\n    exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        isStaticChildren,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n  })();\n","/**\n * @license React\n * react-jsx-runtime.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkKeyStringCoercion(value) {\n      try {\n        testStringCoercion(value);\n        var JSCompiler_inline_result = !1;\n      } catch (e) {\n        JSCompiler_inline_result = !0;\n      }\n      if (JSCompiler_inline_result) {\n        JSCompiler_inline_result = console;\n        var JSCompiler_temp_const = JSCompiler_inline_result.error;\n        var JSCompiler_inline_result$jscomp$0 =\n          (\"function\" === typeof Symbol &&\n            Symbol.toStringTag &&\n            value[Symbol.toStringTag]) ||\n          value.constructor.name ||\n          \"Object\";\n        JSCompiler_temp_const.call(\n          JSCompiler_inline_result,\n          \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          JSCompiler_inline_result$jscomp$0\n        );\n        return testStringCoercion(value);\n      }\n    }\n    function getTaskName(type) {\n      if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n      if (\n        \"object\" === typeof type &&\n        null !== type &&\n        type.$$typeof === REACT_LAZY_TYPE\n      )\n        return \"<...>\";\n      try {\n        var name = getComponentNameFromType(type);\n        return name ? \"<\" + name + \">\" : \"<...>\";\n      } catch (x) {\n        return \"<...>\";\n      }\n    }\n    function getOwner() {\n      var dispatcher = ReactSharedInternals.A;\n      return null === dispatcher ? null : dispatcher.getOwner();\n    }\n    function UnknownOwner() {\n      return Error(\"react-stack-top-frame\");\n    }\n    function hasValidKey(config) {\n      if (hasOwnProperty.call(config, \"key\")) {\n        var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n        if (getter && getter.isReactWarning) return !1;\n      }\n      return void 0 !== config.key;\n    }\n    function defineKeyPropWarningGetter(props, displayName) {\n      function warnAboutAccessingKey() {\n        specialPropKeyWarningShown ||\n          ((specialPropKeyWarningShown = !0),\n          console.error(\n            \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n            displayName\n          ));\n      }\n      warnAboutAccessingKey.isReactWarning = !0;\n      Object.defineProperty(props, \"key\", {\n        get: warnAboutAccessingKey,\n        configurable: !0\n      });\n    }\n    function elementRefGetterWithDeprecationWarning() {\n      var componentName = getComponentNameFromType(this.type);\n      didWarnAboutElementRef[componentName] ||\n        ((didWarnAboutElementRef[componentName] = !0),\n        console.error(\n          \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n        ));\n      componentName = this.props.ref;\n      return void 0 !== componentName ? componentName : null;\n    }\n    function ReactElement(type, key, props, owner, debugStack, debugTask) {\n      var refProp = props.ref;\n      type = {\n        $$typeof: REACT_ELEMENT_TYPE,\n        type: type,\n        key: key,\n        props: props,\n        _owner: owner\n      };\n      null !== (void 0 !== refProp ? refProp : null)\n        ? Object.defineProperty(type, \"ref\", {\n            enumerable: !1,\n            get: elementRefGetterWithDeprecationWarning\n          })\n        : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n      type._store = {};\n      Object.defineProperty(type._store, \"validated\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: 0\n      });\n      Object.defineProperty(type, \"_debugInfo\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: null\n      });\n      Object.defineProperty(type, \"_debugStack\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugStack\n      });\n      Object.defineProperty(type, \"_debugTask\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugTask\n      });\n      Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n      return type;\n    }\n    function jsxDEVImpl(\n      type,\n      config,\n      maybeKey,\n      isStaticChildren,\n      debugStack,\n      debugTask\n    ) {\n      var children = config.children;\n      if (void 0 !== children)\n        if (isStaticChildren)\n          if (isArrayImpl(children)) {\n            for (\n              isStaticChildren = 0;\n              isStaticChildren < children.length;\n              isStaticChildren++\n            )\n              validateChildKeys(children[isStaticChildren]);\n            Object.freeze && Object.freeze(children);\n          } else\n            console.error(\n              \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n            );\n        else validateChildKeys(children);\n      if (hasOwnProperty.call(config, \"key\")) {\n        children = getComponentNameFromType(type);\n        var keys = Object.keys(config).filter(function (k) {\n          return \"key\" !== k;\n        });\n        isStaticChildren =\n          0 < keys.length\n            ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n            : \"{key: someKey}\";\n        didWarnAboutKeySpread[children + isStaticChildren] ||\n          ((keys =\n            0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n          console.error(\n            'A props object containing a \"key\" prop is being spread into JSX:\\n  let props = %s;\\n  <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n  let props = %s;\\n  <%s key={someKey} {...props} />',\n            isStaticChildren,\n            children,\n            keys,\n            children\n          ),\n          (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n      }\n      children = null;\n      void 0 !== maybeKey &&\n        (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n      hasValidKey(config) &&\n        (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n      if (\"key\" in config) {\n        maybeKey = {};\n        for (var propName in config)\n          \"key\" !== propName && (maybeKey[propName] = config[propName]);\n      } else maybeKey = config;\n      children &&\n        defineKeyPropWarningGetter(\n          maybeKey,\n          \"function\" === typeof type\n            ? type.displayName || type.name || \"Unknown\"\n            : type\n        );\n      return ReactElement(\n        type,\n        children,\n        maybeKey,\n        getOwner(),\n        debugStack,\n        debugTask\n      );\n    }\n    function validateChildKeys(node) {\n      isValidElement(node)\n        ? node._store && (node._store.validated = 1)\n        : \"object\" === typeof node &&\n          null !== node &&\n          node.$$typeof === REACT_LAZY_TYPE &&\n          (\"fulfilled\" === node._payload.status\n            ? isValidElement(node._payload.value) &&\n              node._payload.value._store &&\n              (node._payload.value._store.validated = 1)\n            : node._store && (node._store.validated = 1));\n    }\n    function isValidElement(object) {\n      return (\n        \"object\" === typeof object &&\n        null !== object &&\n        object.$$typeof === REACT_ELEMENT_TYPE\n      );\n    }\n    var React = require(\"next/dist/compiled/react\"),\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      ReactSharedInternals =\n        React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      isArrayImpl = Array.isArray,\n      createTask = console.createTask\n        ? console.createTask\n        : function () {\n            return null;\n          };\n    React = {\n      react_stack_bottom_frame: function (callStackForError) {\n        return callStackForError();\n      }\n    };\n    var specialPropKeyWarningShown;\n    var didWarnAboutElementRef = {};\n    var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n      React,\n      UnknownOwner\n    )();\n    var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n    var didWarnAboutKeySpread = {};\n    exports.Fragment = REACT_FRAGMENT_TYPE;\n    exports.jsx = function (type, config, maybeKey) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        !1,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n    exports.jsxs = function (type, config, maybeKey) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        !0,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n  })();\n","/**\n * @license React\n * react.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function defineDeprecationWarning(methodName, info) {\n      Object.defineProperty(Component.prototype, methodName, {\n        get: function () {\n          console.warn(\n            \"%s(...) is deprecated in plain JavaScript React classes. %s\",\n            info[0],\n            info[1]\n          );\n        }\n      });\n    }\n    function getIteratorFn(maybeIterable) {\n      if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n        return null;\n      maybeIterable =\n        (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n        maybeIterable[\"@@iterator\"];\n      return \"function\" === typeof maybeIterable ? maybeIterable : null;\n    }\n    function warnNoop(publicInstance, callerName) {\n      publicInstance =\n        ((publicInstance = publicInstance.constructor) &&\n          (publicInstance.displayName || publicInstance.name)) ||\n        \"ReactClass\";\n      var warningKey = publicInstance + \".\" + callerName;\n      didWarnStateUpdateForUnmountedComponent[warningKey] ||\n        (console.error(\n          \"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.\",\n          callerName,\n          publicInstance\n        ),\n        (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));\n    }\n    function Component(props, context, updater) {\n      this.props = props;\n      this.context = context;\n      this.refs = emptyObject;\n      this.updater = updater || ReactNoopUpdateQueue;\n    }\n    function ComponentDummy() {}\n    function PureComponent(props, context, updater) {\n      this.props = props;\n      this.context = context;\n      this.refs = emptyObject;\n      this.updater = updater || ReactNoopUpdateQueue;\n    }\n    function noop() {}\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkKeyStringCoercion(value) {\n      try {\n        testStringCoercion(value);\n        var JSCompiler_inline_result = !1;\n      } catch (e) {\n        JSCompiler_inline_result = !0;\n      }\n      if (JSCompiler_inline_result) {\n        JSCompiler_inline_result = console;\n        var JSCompiler_temp_const = JSCompiler_inline_result.error;\n        var JSCompiler_inline_result$jscomp$0 =\n          (\"function\" === typeof Symbol &&\n            Symbol.toStringTag &&\n            value[Symbol.toStringTag]) ||\n          value.constructor.name ||\n          \"Object\";\n        JSCompiler_temp_const.call(\n          JSCompiler_inline_result,\n          \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          JSCompiler_inline_result$jscomp$0\n        );\n        return testStringCoercion(value);\n      }\n    }\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function getTaskName(type) {\n      if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n      if (\n        \"object\" === typeof type &&\n        null !== type &&\n        type.$$typeof === REACT_LAZY_TYPE\n      )\n        return \"<...>\";\n      try {\n        var name = getComponentNameFromType(type);\n        return name ? \"<\" + name + \">\" : \"<...>\";\n      } catch (x) {\n        return \"<...>\";\n      }\n    }\n    function getOwner() {\n      var dispatcher = ReactSharedInternals.A;\n      return null === dispatcher ? null : dispatcher.getOwner();\n    }\n    function UnknownOwner() {\n      return Error(\"react-stack-top-frame\");\n    }\n    function hasValidKey(config) {\n      if (hasOwnProperty.call(config, \"key\")) {\n        var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n        if (getter && getter.isReactWarning) return !1;\n      }\n      return void 0 !== config.key;\n    }\n    function defineKeyPropWarningGetter(props, displayName) {\n      function warnAboutAccessingKey() {\n        specialPropKeyWarningShown ||\n          ((specialPropKeyWarningShown = !0),\n          console.error(\n            \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n            displayName\n          ));\n      }\n      warnAboutAccessingKey.isReactWarning = !0;\n      Object.defineProperty(props, \"key\", {\n        get: warnAboutAccessingKey,\n        configurable: !0\n      });\n    }\n    function elementRefGetterWithDeprecationWarning() {\n      var componentName = getComponentNameFromType(this.type);\n      didWarnAboutElementRef[componentName] ||\n        ((didWarnAboutElementRef[componentName] = !0),\n        console.error(\n          \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n        ));\n      componentName = this.props.ref;\n      return void 0 !== componentName ? componentName : null;\n    }\n    function ReactElement(type, key, props, owner, debugStack, debugTask) {\n      var refProp = props.ref;\n      type = {\n        $$typeof: REACT_ELEMENT_TYPE,\n        type: type,\n        key: key,\n        props: props,\n        _owner: owner\n      };\n      null !== (void 0 !== refProp ? refProp : null)\n        ? Object.defineProperty(type, \"ref\", {\n            enumerable: !1,\n            get: elementRefGetterWithDeprecationWarning\n          })\n        : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n      type._store = {};\n      Object.defineProperty(type._store, \"validated\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: 0\n      });\n      Object.defineProperty(type, \"_debugInfo\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: null\n      });\n      Object.defineProperty(type, \"_debugStack\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugStack\n      });\n      Object.defineProperty(type, \"_debugTask\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugTask\n      });\n      Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n      return type;\n    }\n    function cloneAndReplaceKey(oldElement, newKey) {\n      newKey = ReactElement(\n        oldElement.type,\n        newKey,\n        oldElement.props,\n        oldElement._owner,\n        oldElement._debugStack,\n        oldElement._debugTask\n      );\n      oldElement._store &&\n        (newKey._store.validated = oldElement._store.validated);\n      return newKey;\n    }\n    function validateChildKeys(node) {\n      isValidElement(node)\n        ? node._store && (node._store.validated = 1)\n        : \"object\" === typeof node &&\n          null !== node &&\n          node.$$typeof === REACT_LAZY_TYPE &&\n          (\"fulfilled\" === node._payload.status\n            ? isValidElement(node._payload.value) &&\n              node._payload.value._store &&\n              (node._payload.value._store.validated = 1)\n            : node._store && (node._store.validated = 1));\n    }\n    function isValidElement(object) {\n      return (\n        \"object\" === typeof object &&\n        null !== object &&\n        object.$$typeof === REACT_ELEMENT_TYPE\n      );\n    }\n    function escape(key) {\n      var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n      return (\n        \"$\" +\n        key.replace(/[=:]/g, function (match) {\n          return escaperLookup[match];\n        })\n      );\n    }\n    function getElementKey(element, index) {\n      return \"object\" === typeof element &&\n        null !== element &&\n        null != element.key\n        ? (checkKeyStringCoercion(element.key), escape(\"\" + element.key))\n        : index.toString(36);\n    }\n    function resolveThenable(thenable) {\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return thenable.value;\n        case \"rejected\":\n          throw thenable.reason;\n        default:\n          switch (\n            (\"string\" === typeof thenable.status\n              ? thenable.then(noop, noop)\n              : ((thenable.status = \"pending\"),\n                thenable.then(\n                  function (fulfilledValue) {\n                    \"pending\" === thenable.status &&\n                      ((thenable.status = \"fulfilled\"),\n                      (thenable.value = fulfilledValue));\n                  },\n                  function (error) {\n                    \"pending\" === thenable.status &&\n                      ((thenable.status = \"rejected\"),\n                      (thenable.reason = error));\n                  }\n                )),\n            thenable.status)\n          ) {\n            case \"fulfilled\":\n              return thenable.value;\n            case \"rejected\":\n              throw thenable.reason;\n          }\n      }\n      throw thenable;\n    }\n    function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n      var type = typeof children;\n      if (\"undefined\" === type || \"boolean\" === type) children = null;\n      var invokeCallback = !1;\n      if (null === children) invokeCallback = !0;\n      else\n        switch (type) {\n          case \"bigint\":\n          case \"string\":\n          case \"number\":\n            invokeCallback = !0;\n            break;\n          case \"object\":\n            switch (children.$$typeof) {\n              case REACT_ELEMENT_TYPE:\n              case REACT_PORTAL_TYPE:\n                invokeCallback = !0;\n                break;\n              case REACT_LAZY_TYPE:\n                return (\n                  (invokeCallback = children._init),\n                  mapIntoArray(\n                    invokeCallback(children._payload),\n                    array,\n                    escapedPrefix,\n                    nameSoFar,\n                    callback\n                  )\n                );\n            }\n        }\n      if (invokeCallback) {\n        invokeCallback = children;\n        callback = callback(invokeCallback);\n        var childKey =\n          \"\" === nameSoFar ? \".\" + getElementKey(invokeCallback, 0) : nameSoFar;\n        isArrayImpl(callback)\n          ? ((escapedPrefix = \"\"),\n            null != childKey &&\n              (escapedPrefix =\n                childKey.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n            mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n              return c;\n            }))\n          : null != callback &&\n            (isValidElement(callback) &&\n              (null != callback.key &&\n                ((invokeCallback && invokeCallback.key === callback.key) ||\n                  checkKeyStringCoercion(callback.key)),\n              (escapedPrefix = cloneAndReplaceKey(\n                callback,\n                escapedPrefix +\n                  (null == callback.key ||\n                  (invokeCallback && invokeCallback.key === callback.key)\n                    ? \"\"\n                    : (\"\" + callback.key).replace(\n                        userProvidedKeyEscapeRegex,\n                        \"$&/\"\n                      ) + \"/\") +\n                  childKey\n              )),\n              \"\" !== nameSoFar &&\n                null != invokeCallback &&\n                isValidElement(invokeCallback) &&\n                null == invokeCallback.key &&\n                invokeCallback._store &&\n                !invokeCallback._store.validated &&\n                (escapedPrefix._store.validated = 2),\n              (callback = escapedPrefix)),\n            array.push(callback));\n        return 1;\n      }\n      invokeCallback = 0;\n      childKey = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n      if (isArrayImpl(children))\n        for (var i = 0; i < children.length; i++)\n          (nameSoFar = children[i]),\n            (type = childKey + getElementKey(nameSoFar, i)),\n            (invokeCallback += mapIntoArray(\n              nameSoFar,\n              array,\n              escapedPrefix,\n              type,\n              callback\n            ));\n      else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n        for (\n          i === children.entries &&\n            (didWarnAboutMaps ||\n              console.warn(\n                \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n              ),\n            (didWarnAboutMaps = !0)),\n            children = i.call(children),\n            i = 0;\n          !(nameSoFar = children.next()).done;\n\n        )\n          (nameSoFar = nameSoFar.value),\n            (type = childKey + getElementKey(nameSoFar, i++)),\n            (invokeCallback += mapIntoArray(\n              nameSoFar,\n              array,\n              escapedPrefix,\n              type,\n              callback\n            ));\n      else if (\"object\" === type) {\n        if (\"function\" === typeof children.then)\n          return mapIntoArray(\n            resolveThenable(children),\n            array,\n            escapedPrefix,\n            nameSoFar,\n            callback\n          );\n        array = String(children);\n        throw Error(\n          \"Objects are not valid as a React child (found: \" +\n            (\"[object Object]\" === array\n              ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n              : array) +\n            \"). If you meant to render a collection of children, use an array instead.\"\n        );\n      }\n      return invokeCallback;\n    }\n    function mapChildren(children, func, context) {\n      if (null == children) return children;\n      var result = [],\n        count = 0;\n      mapIntoArray(children, result, \"\", \"\", function (child) {\n        return func.call(context, child, count++);\n      });\n      return result;\n    }\n    function lazyInitializer(payload) {\n      if (-1 === payload._status) {\n        var resolveDebugValue = null,\n          rejectDebugValue = null,\n          ioInfo = payload._ioInfo;\n        null != ioInfo &&\n          ((ioInfo.start = ioInfo.end = performance.now()),\n          (ioInfo.value = new Promise(function (resolve, reject) {\n            resolveDebugValue = resolve;\n            rejectDebugValue = reject;\n          })));\n        ioInfo = payload._result;\n        var thenable = ioInfo();\n        thenable.then(\n          function (moduleObject) {\n            if (0 === payload._status || -1 === payload._status) {\n              payload._status = 1;\n              payload._result = moduleObject;\n              var _ioInfo = payload._ioInfo;\n              if (null != _ioInfo) {\n                _ioInfo.end = performance.now();\n                var debugValue =\n                  null == moduleObject ? void 0 : moduleObject.default;\n                resolveDebugValue(debugValue);\n                _ioInfo.value.status = \"fulfilled\";\n                _ioInfo.value.value = debugValue;\n              }\n              void 0 === thenable.status &&\n                ((thenable.status = \"fulfilled\"),\n                (thenable.value = moduleObject));\n            }\n          },\n          function (error) {\n            if (0 === payload._status || -1 === payload._status) {\n              payload._status = 2;\n              payload._result = error;\n              var _ioInfo2 = payload._ioInfo;\n              null != _ioInfo2 &&\n                ((_ioInfo2.end = performance.now()),\n                _ioInfo2.value.then(noop, noop),\n                rejectDebugValue(error),\n                (_ioInfo2.value.status = \"rejected\"),\n                (_ioInfo2.value.reason = error));\n              void 0 === thenable.status &&\n                ((thenable.status = \"rejected\"), (thenable.reason = error));\n            }\n          }\n        );\n        ioInfo = payload._ioInfo;\n        if (null != ioInfo) {\n          var displayName = thenable.displayName;\n          \"string\" === typeof displayName && (ioInfo.name = displayName);\n        }\n        -1 === payload._status &&\n          ((payload._status = 0), (payload._result = thenable));\n      }\n      if (1 === payload._status)\n        return (\n          (ioInfo = payload._result),\n          void 0 === ioInfo &&\n            console.error(\n              \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n  const MyComponent = lazy(() => import('./MyComponent'))\\n\\nDid you accidentally put curly braces around the import?\",\n              ioInfo\n            ),\n          \"default\" in ioInfo ||\n            console.error(\n              \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n  const MyComponent = lazy(() => import('./MyComponent'))\",\n              ioInfo\n            ),\n          ioInfo.default\n        );\n      throw payload._result;\n    }\n    function resolveDispatcher() {\n      var dispatcher = ReactSharedInternals.H;\n      null === dispatcher &&\n        console.error(\n          \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n        );\n      return dispatcher;\n    }\n    function releaseAsyncTransition() {\n      ReactSharedInternals.asyncTransitions--;\n    }\n    function startTransition(scope) {\n      var prevTransition = ReactSharedInternals.T,\n        currentTransition = {};\n      currentTransition.types =\n        null !== prevTransition ? prevTransition.types : null;\n      currentTransition._updatedFibers = new Set();\n      ReactSharedInternals.T = currentTransition;\n      try {\n        var returnValue = scope(),\n          onStartTransitionFinish = ReactSharedInternals.S;\n        null !== onStartTransitionFinish &&\n          onStartTransitionFinish(currentTransition, returnValue);\n        \"object\" === typeof returnValue &&\n          null !== returnValue &&\n          \"function\" === typeof returnValue.then &&\n          (ReactSharedInternals.asyncTransitions++,\n          returnValue.then(releaseAsyncTransition, releaseAsyncTransition),\n          returnValue.then(noop, reportGlobalError));\n      } catch (error) {\n        reportGlobalError(error);\n      } finally {\n        null === prevTransition &&\n          currentTransition._updatedFibers &&\n          ((scope = currentTransition._updatedFibers.size),\n          currentTransition._updatedFibers.clear(),\n          10 < scope &&\n            console.warn(\n              \"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.\"\n            )),\n          null !== prevTransition &&\n            null !== currentTransition.types &&\n            (null !== prevTransition.types &&\n              prevTransition.types !== currentTransition.types &&\n              console.error(\n                \"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.\"\n              ),\n            (prevTransition.types = currentTransition.types)),\n          (ReactSharedInternals.T = prevTransition);\n      }\n    }\n    function addTransitionType(type) {\n      var transition = ReactSharedInternals.T;\n      if (null !== transition) {\n        var transitionTypes = transition.types;\n        null === transitionTypes\n          ? (transition.types = [type])\n          : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);\n      } else\n        0 === ReactSharedInternals.asyncTransitions &&\n          console.error(\n            \"addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition.\"\n          ),\n          startTransition(addTransitionType.bind(null, type));\n    }\n    function enqueueTask(task) {\n      if (null === enqueueTaskImpl)\n        try {\n          var requireString = (\"require\" + Math.random()).slice(0, 7);\n          enqueueTaskImpl = (module && module[requireString]).call(\n            module,\n            \"timers\"\n          ).setImmediate;\n        } catch (_err) {\n          enqueueTaskImpl = function (callback) {\n            !1 === didWarnAboutMessageChannel &&\n              ((didWarnAboutMessageChannel = !0),\n              \"undefined\" === typeof MessageChannel &&\n                console.error(\n                  \"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.\"\n                ));\n            var channel = new MessageChannel();\n            channel.port1.onmessage = callback;\n            channel.port2.postMessage(void 0);\n          };\n        }\n      return enqueueTaskImpl(task);\n    }\n    function aggregateErrors(errors) {\n      return 1 < errors.length && \"function\" === typeof AggregateError\n        ? new AggregateError(errors)\n        : errors[0];\n    }\n    function popActScope(prevActQueue, prevActScopeDepth) {\n      prevActScopeDepth !== actScopeDepth - 1 &&\n        console.error(\n          \"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. \"\n        );\n      actScopeDepth = prevActScopeDepth;\n    }\n    function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n      var queue = ReactSharedInternals.actQueue;\n      if (null !== queue)\n        if (0 !== queue.length)\n          try {\n            flushActQueue(queue);\n            enqueueTask(function () {\n              return recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n            });\n            return;\n          } catch (error) {\n            ReactSharedInternals.thrownErrors.push(error);\n          }\n        else ReactSharedInternals.actQueue = null;\n      0 < ReactSharedInternals.thrownErrors.length\n        ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),\n          (ReactSharedInternals.thrownErrors.length = 0),\n          reject(queue))\n        : resolve(returnValue);\n    }\n    function flushActQueue(queue) {\n      if (!isFlushing) {\n        isFlushing = !0;\n        var i = 0;\n        try {\n          for (; i < queue.length; i++) {\n            var callback = queue[i];\n            do {\n              ReactSharedInternals.didUsePromise = !1;\n              var continuation = callback(!1);\n              if (null !== continuation) {\n                if (ReactSharedInternals.didUsePromise) {\n                  queue[i] = callback;\n                  queue.splice(0, i);\n                  return;\n                }\n                callback = continuation;\n              } else break;\n            } while (1);\n          }\n          queue.length = 0;\n        } catch (error) {\n          queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);\n        } finally {\n          isFlushing = !1;\n        }\n      }\n    }\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n    var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n      didWarnStateUpdateForUnmountedComponent = {},\n      ReactNoopUpdateQueue = {\n        isMounted: function () {\n          return !1;\n        },\n        enqueueForceUpdate: function (publicInstance) {\n          warnNoop(publicInstance, \"forceUpdate\");\n        },\n        enqueueReplaceState: function (publicInstance) {\n          warnNoop(publicInstance, \"replaceState\");\n        },\n        enqueueSetState: function (publicInstance) {\n          warnNoop(publicInstance, \"setState\");\n        }\n      },\n      assign = Object.assign,\n      emptyObject = {};\n    Object.freeze(emptyObject);\n    Component.prototype.isReactComponent = {};\n    Component.prototype.setState = function (partialState, callback) {\n      if (\n        \"object\" !== typeof partialState &&\n        \"function\" !== typeof partialState &&\n        null != partialState\n      )\n        throw Error(\n          \"takes an object of state variables to update or a function which returns an object of state variables.\"\n        );\n      this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n    };\n    Component.prototype.forceUpdate = function (callback) {\n      this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n    };\n    var deprecatedAPIs = {\n      isMounted: [\n        \"isMounted\",\n        \"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.\"\n      ],\n      replaceState: [\n        \"replaceState\",\n        \"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).\"\n      ]\n    };\n    for (fnName in deprecatedAPIs)\n      deprecatedAPIs.hasOwnProperty(fnName) &&\n        defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n    ComponentDummy.prototype = Component.prototype;\n    deprecatedAPIs = PureComponent.prototype = new ComponentDummy();\n    deprecatedAPIs.constructor = PureComponent;\n    assign(deprecatedAPIs, Component.prototype);\n    deprecatedAPIs.isPureReactComponent = !0;\n    var isArrayImpl = Array.isArray,\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      ReactSharedInternals = {\n        H: null,\n        A: null,\n        T: null,\n        S: null,\n        actQueue: null,\n        asyncTransitions: 0,\n        isBatchingLegacy: !1,\n        didScheduleLegacyUpdate: !1,\n        didUsePromise: !1,\n        thrownErrors: [],\n        getCurrentStack: null,\n        recentlyCreatedOwnerStacks: 0\n      },\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      createTask = console.createTask\n        ? console.createTask\n        : function () {\n            return null;\n          };\n    deprecatedAPIs = {\n      react_stack_bottom_frame: function (callStackForError) {\n        return callStackForError();\n      }\n    };\n    var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;\n    var didWarnAboutElementRef = {};\n    var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(\n      deprecatedAPIs,\n      UnknownOwner\n    )();\n    var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n    var didWarnAboutMaps = !1,\n      userProvidedKeyEscapeRegex = /\\/+/g,\n      reportGlobalError =\n        \"function\" === typeof reportError\n          ? reportError\n          : function (error) {\n              if (\n                \"object\" === typeof window &&\n                \"function\" === typeof window.ErrorEvent\n              ) {\n                var event = new window.ErrorEvent(\"error\", {\n                  bubbles: !0,\n                  cancelable: !0,\n                  message:\n                    \"object\" === typeof error &&\n                    null !== error &&\n                    \"string\" === typeof error.message\n                      ? String(error.message)\n                      : String(error),\n                  error: error\n                });\n                if (!window.dispatchEvent(event)) return;\n              } else if (\n                \"object\" === typeof process &&\n                \"function\" === typeof process.emit\n              ) {\n                process.emit(\"uncaughtException\", error);\n                return;\n              }\n              console.error(error);\n            },\n      didWarnAboutMessageChannel = !1,\n      enqueueTaskImpl = null,\n      actScopeDepth = 0,\n      didWarnNoAwaitAct = !1,\n      isFlushing = !1,\n      queueSeveralMicrotasks =\n        \"function\" === typeof queueMicrotask\n          ? function (callback) {\n              queueMicrotask(function () {\n                return queueMicrotask(callback);\n              });\n            }\n          : enqueueTask;\n    deprecatedAPIs = Object.freeze({\n      __proto__: null,\n      c: function (size) {\n        return resolveDispatcher().useMemoCache(size);\n      }\n    });\n    var fnName = {\n      map: mapChildren,\n      forEach: function (children, forEachFunc, forEachContext) {\n        mapChildren(\n          children,\n          function () {\n            forEachFunc.apply(this, arguments);\n          },\n          forEachContext\n        );\n      },\n      count: function (children) {\n        var n = 0;\n        mapChildren(children, function () {\n          n++;\n        });\n        return n;\n      },\n      toArray: function (children) {\n        return (\n          mapChildren(children, function (child) {\n            return child;\n          }) || []\n        );\n      },\n      only: function (children) {\n        if (!isValidElement(children))\n          throw Error(\n            \"React.Children.only expected to receive a single React element child.\"\n          );\n        return children;\n      }\n    };\n    exports.Activity = REACT_ACTIVITY_TYPE;\n    exports.Children = fnName;\n    exports.Component = Component;\n    exports.Fragment = REACT_FRAGMENT_TYPE;\n    exports.Profiler = REACT_PROFILER_TYPE;\n    exports.PureComponent = PureComponent;\n    exports.StrictMode = REACT_STRICT_MODE_TYPE;\n    exports.Suspense = REACT_SUSPENSE_TYPE;\n    exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;\n    exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n      ReactSharedInternals;\n    exports.__COMPILER_RUNTIME = deprecatedAPIs;\n    exports.act = function (callback) {\n      var prevActQueue = ReactSharedInternals.actQueue,\n        prevActScopeDepth = actScopeDepth;\n      actScopeDepth++;\n      var queue = (ReactSharedInternals.actQueue =\n          null !== prevActQueue ? prevActQueue : []),\n        didAwaitActCall = !1;\n      try {\n        var result = callback();\n      } catch (error) {\n        ReactSharedInternals.thrownErrors.push(error);\n      }\n      if (0 < ReactSharedInternals.thrownErrors.length)\n        throw (\n          (popActScope(prevActQueue, prevActScopeDepth),\n          (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n          (ReactSharedInternals.thrownErrors.length = 0),\n          callback)\n        );\n      if (\n        null !== result &&\n        \"object\" === typeof result &&\n        \"function\" === typeof result.then\n      ) {\n        var thenable = result;\n        queueSeveralMicrotasks(function () {\n          didAwaitActCall ||\n            didWarnNoAwaitAct ||\n            ((didWarnNoAwaitAct = !0),\n            console.error(\n              \"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);\"\n            ));\n        });\n        return {\n          then: function (resolve, reject) {\n            didAwaitActCall = !0;\n            thenable.then(\n              function (returnValue) {\n                popActScope(prevActQueue, prevActScopeDepth);\n                if (0 === prevActScopeDepth) {\n                  try {\n                    flushActQueue(queue),\n                      enqueueTask(function () {\n                        return recursivelyFlushAsyncActWork(\n                          returnValue,\n                          resolve,\n                          reject\n                        );\n                      });\n                  } catch (error$0) {\n                    ReactSharedInternals.thrownErrors.push(error$0);\n                  }\n                  if (0 < ReactSharedInternals.thrownErrors.length) {\n                    var _thrownError = aggregateErrors(\n                      ReactSharedInternals.thrownErrors\n                    );\n                    ReactSharedInternals.thrownErrors.length = 0;\n                    reject(_thrownError);\n                  }\n                } else resolve(returnValue);\n              },\n              function (error) {\n                popActScope(prevActQueue, prevActScopeDepth);\n                0 < ReactSharedInternals.thrownErrors.length\n                  ? ((error = aggregateErrors(\n                      ReactSharedInternals.thrownErrors\n                    )),\n                    (ReactSharedInternals.thrownErrors.length = 0),\n                    reject(error))\n                  : reject(error);\n              }\n            );\n          }\n        };\n      }\n      var returnValue$jscomp$0 = result;\n      popActScope(prevActQueue, prevActScopeDepth);\n      0 === prevActScopeDepth &&\n        (flushActQueue(queue),\n        0 !== queue.length &&\n          queueSeveralMicrotasks(function () {\n            didAwaitActCall ||\n              didWarnNoAwaitAct ||\n              ((didWarnNoAwaitAct = !0),\n              console.error(\n                \"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\\n\\nawait act(() => ...)\"\n              ));\n          }),\n        (ReactSharedInternals.actQueue = null));\n      if (0 < ReactSharedInternals.thrownErrors.length)\n        throw (\n          ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n          (ReactSharedInternals.thrownErrors.length = 0),\n          callback)\n        );\n      return {\n        then: function (resolve, reject) {\n          didAwaitActCall = !0;\n          0 === prevActScopeDepth\n            ? ((ReactSharedInternals.actQueue = queue),\n              enqueueTask(function () {\n                return recursivelyFlushAsyncActWork(\n                  returnValue$jscomp$0,\n                  resolve,\n                  reject\n                );\n              }))\n            : resolve(returnValue$jscomp$0);\n        }\n      };\n    };\n    exports.addTransitionType = addTransitionType;\n    exports.cache = function (fn) {\n      return function () {\n        return fn.apply(null, arguments);\n      };\n    };\n    exports.cacheSignal = function () {\n      return null;\n    };\n    exports.captureOwnerStack = function () {\n      var getCurrentStack = ReactSharedInternals.getCurrentStack;\n      return null === getCurrentStack ? null : getCurrentStack();\n    };\n    exports.cloneElement = function (element, config, children) {\n      if (null === element || void 0 === element)\n        throw Error(\n          \"The argument must be a React element, but you passed \" +\n            element +\n            \".\"\n        );\n      var props = assign({}, element.props),\n        key = element.key,\n        owner = element._owner;\n      if (null != config) {\n        var JSCompiler_inline_result;\n        a: {\n          if (\n            hasOwnProperty.call(config, \"ref\") &&\n            (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(\n              config,\n              \"ref\"\n            ).get) &&\n            JSCompiler_inline_result.isReactWarning\n          ) {\n            JSCompiler_inline_result = !1;\n            break a;\n          }\n          JSCompiler_inline_result = void 0 !== config.ref;\n        }\n        JSCompiler_inline_result && (owner = getOwner());\n        hasValidKey(config) &&\n          (checkKeyStringCoercion(config.key), (key = \"\" + config.key));\n        for (propName in config)\n          !hasOwnProperty.call(config, propName) ||\n            \"key\" === propName ||\n            \"__self\" === propName ||\n            \"__source\" === propName ||\n            (\"ref\" === propName && void 0 === config.ref) ||\n            (props[propName] = config[propName]);\n      }\n      var propName = arguments.length - 2;\n      if (1 === propName) props.children = children;\n      else if (1 < propName) {\n        JSCompiler_inline_result = Array(propName);\n        for (var i = 0; i < propName; i++)\n          JSCompiler_inline_result[i] = arguments[i + 2];\n        props.children = JSCompiler_inline_result;\n      }\n      props = ReactElement(\n        element.type,\n        key,\n        props,\n        owner,\n        element._debugStack,\n        element._debugTask\n      );\n      for (key = 2; key < arguments.length; key++)\n        validateChildKeys(arguments[key]);\n      return props;\n    };\n    exports.createContext = function (defaultValue) {\n      defaultValue = {\n        $$typeof: REACT_CONTEXT_TYPE,\n        _currentValue: defaultValue,\n        _currentValue2: defaultValue,\n        _threadCount: 0,\n        Provider: null,\n        Consumer: null\n      };\n      defaultValue.Provider = defaultValue;\n      defaultValue.Consumer = {\n        $$typeof: REACT_CONSUMER_TYPE,\n        _context: defaultValue\n      };\n      defaultValue._currentRenderer = null;\n      defaultValue._currentRenderer2 = null;\n      return defaultValue;\n    };\n    exports.createElement = function (type, config, children) {\n      for (var i = 2; i < arguments.length; i++)\n        validateChildKeys(arguments[i]);\n      var propName;\n      i = {};\n      var key = null;\n      if (null != config)\n        for (propName in (didWarnAboutOldJSXRuntime ||\n          !(\"__self\" in config) ||\n          \"key\" in config ||\n          ((didWarnAboutOldJSXRuntime = !0),\n          console.warn(\n            \"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform\"\n          )),\n        hasValidKey(config) &&\n          (checkKeyStringCoercion(config.key), (key = \"\" + config.key)),\n        config))\n          hasOwnProperty.call(config, propName) &&\n            \"key\" !== propName &&\n            \"__self\" !== propName &&\n            \"__source\" !== propName &&\n            (i[propName] = config[propName]);\n      var childrenLength = arguments.length - 2;\n      if (1 === childrenLength) i.children = children;\n      else if (1 < childrenLength) {\n        for (\n          var childArray = Array(childrenLength), _i = 0;\n          _i < childrenLength;\n          _i++\n        )\n          childArray[_i] = arguments[_i + 2];\n        Object.freeze && Object.freeze(childArray);\n        i.children = childArray;\n      }\n      if (type && type.defaultProps)\n        for (propName in ((childrenLength = type.defaultProps), childrenLength))\n          void 0 === i[propName] && (i[propName] = childrenLength[propName]);\n      key &&\n        defineKeyPropWarningGetter(\n          i,\n          \"function\" === typeof type\n            ? type.displayName || type.name || \"Unknown\"\n            : type\n        );\n      (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++)\n        ? ((childArray = Error.stackTraceLimit),\n          (Error.stackTraceLimit = 10),\n          (childrenLength = Error(\"react-stack-top-frame\")),\n          (Error.stackTraceLimit = childArray))\n        : (childrenLength = unknownOwnerDebugStack);\n      return ReactElement(\n        type,\n        key,\n        i,\n        getOwner(),\n        childrenLength,\n        propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n    exports.createRef = function () {\n      var refObject = { current: null };\n      Object.seal(refObject);\n      return refObject;\n    };\n    exports.forwardRef = function (render) {\n      null != render && render.$$typeof === REACT_MEMO_TYPE\n        ? console.error(\n            \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).\"\n          )\n        : \"function\" !== typeof render\n          ? console.error(\n              \"forwardRef requires a render function but was given %s.\",\n              null === render ? \"null\" : typeof render\n            )\n          : 0 !== render.length &&\n            2 !== render.length &&\n            console.error(\n              \"forwardRef render functions accept exactly two parameters: props and ref. %s\",\n              1 === render.length\n                ? \"Did you forget to use the ref parameter?\"\n                : \"Any additional parameter will be undefined.\"\n            );\n      null != render &&\n        null != render.defaultProps &&\n        console.error(\n          \"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?\"\n        );\n      var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },\n        ownName;\n      Object.defineProperty(elementType, \"displayName\", {\n        enumerable: !1,\n        configurable: !0,\n        get: function () {\n          return ownName;\n        },\n        set: function (name) {\n          ownName = name;\n          render.name ||\n            render.displayName ||\n            (Object.defineProperty(render, \"name\", { value: name }),\n            (render.displayName = name));\n        }\n      });\n      return elementType;\n    };\n    exports.isValidElement = isValidElement;\n    exports.lazy = function (ctor) {\n      ctor = { _status: -1, _result: ctor };\n      var lazyType = {\n          $$typeof: REACT_LAZY_TYPE,\n          _payload: ctor,\n          _init: lazyInitializer\n        },\n        ioInfo = {\n          name: \"lazy\",\n          start: -1,\n          end: -1,\n          value: null,\n          owner: null,\n          debugStack: Error(\"react-stack-top-frame\"),\n          debugTask: console.createTask ? console.createTask(\"lazy()\") : null\n        };\n      ctor._ioInfo = ioInfo;\n      lazyType._debugInfo = [{ awaited: ioInfo }];\n      return lazyType;\n    };\n    exports.memo = function (type, compare) {\n      null == type &&\n        console.error(\n          \"memo: The first argument must be a component. Instead received: %s\",\n          null === type ? \"null\" : typeof type\n        );\n      compare = {\n        $$typeof: REACT_MEMO_TYPE,\n        type: type,\n        compare: void 0 === compare ? null : compare\n      };\n      var ownName;\n      Object.defineProperty(compare, \"displayName\", {\n        enumerable: !1,\n        configurable: !0,\n        get: function () {\n          return ownName;\n        },\n        set: function (name) {\n          ownName = name;\n          type.name ||\n            type.displayName ||\n            (Object.defineProperty(type, \"name\", { value: name }),\n            (type.displayName = name));\n        }\n      });\n      return compare;\n    };\n    exports.startTransition = startTransition;\n    exports.unstable_useCacheRefresh = function () {\n      return resolveDispatcher().useCacheRefresh();\n    };\n    exports.use = function (usable) {\n      return resolveDispatcher().use(usable);\n    };\n    exports.useActionState = function (action, initialState, permalink) {\n      return resolveDispatcher().useActionState(\n        action,\n        initialState,\n        permalink\n      );\n    };\n    exports.useCallback = function (callback, deps) {\n      return resolveDispatcher().useCallback(callback, deps);\n    };\n    exports.useContext = function (Context) {\n      var dispatcher = resolveDispatcher();\n      Context.$$typeof === REACT_CONSUMER_TYPE &&\n        console.error(\n          \"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?\"\n        );\n      return dispatcher.useContext(Context);\n    };\n    exports.useDebugValue = function (value, formatterFn) {\n      return resolveDispatcher().useDebugValue(value, formatterFn);\n    };\n    exports.useDeferredValue = function (value, initialValue) {\n      return resolveDispatcher().useDeferredValue(value, initialValue);\n    };\n    exports.useEffect = function (create, deps) {\n      null == create &&\n        console.warn(\n          \"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n        );\n      return resolveDispatcher().useEffect(create, deps);\n    };\n    exports.useEffectEvent = function (callback) {\n      return resolveDispatcher().useEffectEvent(callback);\n    };\n    exports.useId = function () {\n      return resolveDispatcher().useId();\n    };\n    exports.useImperativeHandle = function (ref, create, deps) {\n      return resolveDispatcher().useImperativeHandle(ref, create, deps);\n    };\n    exports.useInsertionEffect = function (create, deps) {\n      null == create &&\n        console.warn(\n          \"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n        );\n      return resolveDispatcher().useInsertionEffect(create, deps);\n    };\n    exports.useLayoutEffect = function (create, deps) {\n      null == create &&\n        console.warn(\n          \"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n        );\n      return resolveDispatcher().useLayoutEffect(create, deps);\n    };\n    exports.useMemo = function (create, deps) {\n      return resolveDispatcher().useMemo(create, deps);\n    };\n    exports.useOptimistic = function (passthrough, reducer) {\n      return resolveDispatcher().useOptimistic(passthrough, reducer);\n    };\n    exports.useReducer = function (reducer, initialArg, init) {\n      return resolveDispatcher().useReducer(reducer, initialArg, init);\n    };\n    exports.useRef = function (initialValue) {\n      return resolveDispatcher().useRef(initialValue);\n    };\n    exports.useState = function (initialState) {\n      return resolveDispatcher().useState(initialState);\n    };\n    exports.useSyncExternalStore = function (\n      subscribe,\n      getSnapshot,\n      getServerSnapshot\n    ) {\n      return resolveDispatcher().useSyncExternalStore(\n        subscribe,\n        getSnapshot,\n        getServerSnapshot\n      );\n    };\n    exports.useTransition = function () {\n      return resolveDispatcher().useTransition();\n    };\n    exports.version = \"19.3.0-canary-3f0b9e61-20260317\";\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n  })();\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';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-compiler-runtime.production.js');\n} else {\n  module.exports = require('./cjs/react-compiler-runtime.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react.production.js');\n} else {\n  module.exports = require('./cjs/react.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-jsx-dev-runtime.production.js');\n} else {\n  module.exports = require('./cjs/react-jsx-dev-runtime.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n  module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","(function(){\"use strict\";var e={879:function(e,t){const{hasOwnProperty:n}=Object.prototype;const r=configure();r.configure=configure;r.stringify=r;r.default=r;t.stringify=r;t.configure=configure;e.exports=r;const i=/[\\u0000-\\u001f\\u0022\\u005c\\ud800-\\udfff]/;function strEscape(e){if(e.length<5e3&&!i.test(e)){return`\"${e}\"`}return JSON.stringify(e)}function sort(e,t){if(e.length>200||t){return e.sort(t)}for(let t=1;t<e.length;t++){const n=e[t];let r=t;while(r!==0&&e[r-1]>n){e[r]=e[r-1];r--}e[r]=n}return e}const f=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function isTypedArrayWithEntries(e){return f.call(e)!==undefined&&e.length!==0}function stringifyTypedArray(e,t,n){if(e.length<n){n=e.length}const r=t===\",\"?\"\":\" \";let i=`\"0\":${r}${e[0]}`;for(let f=1;f<n;f++){i+=`${t}\"${f}\":${r}${e[f]}`}return i}function getCircularValueOption(e){if(n.call(e,\"circularValue\")){const t=e.circularValue;if(typeof t===\"string\"){return`\"${t}\"`}if(t==null){return t}if(t===Error||t===TypeError){return{toString(){throw new TypeError(\"Converting circular structure to JSON\")}}}throw new TypeError('The \"circularValue\" argument must be of type string or the value null or undefined')}return'\"[Circular]\"'}function getDeterministicOption(e){let t;if(n.call(e,\"deterministic\")){t=e.deterministic;if(typeof t!==\"boolean\"&&typeof t!==\"function\"){throw new TypeError('The \"deterministic\" argument must be of type boolean or comparator function')}}return t===undefined?true:t}function getBooleanOption(e,t){let r;if(n.call(e,t)){r=e[t];if(typeof r!==\"boolean\"){throw new TypeError(`The \"${t}\" argument must be of type boolean`)}}return r===undefined?true:r}function getPositiveIntegerOption(e,t){let r;if(n.call(e,t)){r=e[t];if(typeof r!==\"number\"){throw new TypeError(`The \"${t}\" argument must be of type number`)}if(!Number.isInteger(r)){throw new TypeError(`The \"${t}\" argument must be an integer`)}if(r<1){throw new RangeError(`The \"${t}\" argument must be >= 1`)}}return r===undefined?Infinity:r}function getItemCount(e){if(e===1){return\"1 item\"}return`${e} items`}function getUniqueReplacerSet(e){const t=new Set;for(const n of e){if(typeof n===\"string\"||typeof n===\"number\"){t.add(String(n))}}return t}function getStrictOption(e){if(n.call(e,\"strict\")){const t=e.strict;if(typeof t!==\"boolean\"){throw new TypeError('The \"strict\" argument must be of type boolean')}if(t){return e=>{let t=`Object can not safely be stringified. Received type ${typeof e}`;if(typeof e!==\"function\")t+=` (${e.toString()})`;throw new Error(t)}}}}function configure(e){e={...e};const t=getStrictOption(e);if(t){if(e.bigint===undefined){e.bigint=false}if(!(\"circularValue\"in e)){e.circularValue=Error}}const n=getCircularValueOption(e);const r=getBooleanOption(e,\"bigint\");const i=getDeterministicOption(e);const f=typeof i===\"function\"?i:undefined;const u=getPositiveIntegerOption(e,\"maximumDepth\");const o=getPositiveIntegerOption(e,\"maximumBreadth\");function stringifyFnReplacer(e,s,l,c,a,g){let p=s[e];if(typeof p===\"object\"&&p!==null&&typeof p.toJSON===\"function\"){p=p.toJSON(e)}p=c.call(s,e,p);switch(typeof p){case\"string\":return strEscape(p);case\"object\":{if(p===null){return\"null\"}if(l.indexOf(p)!==-1){return n}let e=\"\";let t=\",\";const r=g;if(Array.isArray(p)){if(p.length===0){return\"[]\"}if(u<l.length+1){return'\"[Array]\"'}l.push(p);if(a!==\"\"){g+=a;e+=`\\n${g}`;t=`,\\n${g}`}const n=Math.min(p.length,o);let i=0;for(;i<n-1;i++){const n=stringifyFnReplacer(String(i),p,l,c,a,g);e+=n!==undefined?n:\"null\";e+=t}const f=stringifyFnReplacer(String(i),p,l,c,a,g);e+=f!==undefined?f:\"null\";if(p.length-1>o){const n=p.length-o-1;e+=`${t}\"... ${getItemCount(n)} not stringified\"`}if(a!==\"\"){e+=`\\n${r}`}l.pop();return`[${e}]`}let s=Object.keys(p);const y=s.length;if(y===0){return\"{}\"}if(u<l.length+1){return'\"[Object]\"'}let d=\"\";let h=\"\";if(a!==\"\"){g+=a;t=`,\\n${g}`;d=\" \"}const $=Math.min(y,o);if(i&&!isTypedArrayWithEntries(p)){s=sort(s,f)}l.push(p);for(let n=0;n<$;n++){const r=s[n];const i=stringifyFnReplacer(r,p,l,c,a,g);if(i!==undefined){e+=`${h}${strEscape(r)}:${d}${i}`;h=t}}if(y>o){const n=y-o;e+=`${h}\"...\":${d}\"${getItemCount(n)} not stringified\"`;h=t}if(a!==\"\"&&h.length>1){e=`\\n${g}${e}\\n${r}`}l.pop();return`{${e}}`}case\"number\":return isFinite(p)?String(p):t?t(p):\"null\";case\"boolean\":return p===true?\"true\":\"false\";case\"undefined\":return undefined;case\"bigint\":if(r){return String(p)}default:return t?t(p):undefined}}function stringifyArrayReplacer(e,i,f,s,l,c){if(typeof i===\"object\"&&i!==null&&typeof i.toJSON===\"function\"){i=i.toJSON(e)}switch(typeof i){case\"string\":return strEscape(i);case\"object\":{if(i===null){return\"null\"}if(f.indexOf(i)!==-1){return n}const e=c;let t=\"\";let r=\",\";if(Array.isArray(i)){if(i.length===0){return\"[]\"}if(u<f.length+1){return'\"[Array]\"'}f.push(i);if(l!==\"\"){c+=l;t+=`\\n${c}`;r=`,\\n${c}`}const n=Math.min(i.length,o);let a=0;for(;a<n-1;a++){const e=stringifyArrayReplacer(String(a),i[a],f,s,l,c);t+=e!==undefined?e:\"null\";t+=r}const g=stringifyArrayReplacer(String(a),i[a],f,s,l,c);t+=g!==undefined?g:\"null\";if(i.length-1>o){const e=i.length-o-1;t+=`${r}\"... ${getItemCount(e)} not stringified\"`}if(l!==\"\"){t+=`\\n${e}`}f.pop();return`[${t}]`}f.push(i);let a=\"\";if(l!==\"\"){c+=l;r=`,\\n${c}`;a=\" \"}let g=\"\";for(const e of s){const n=stringifyArrayReplacer(e,i[e],f,s,l,c);if(n!==undefined){t+=`${g}${strEscape(e)}:${a}${n}`;g=r}}if(l!==\"\"&&g.length>1){t=`\\n${c}${t}\\n${e}`}f.pop();return`{${t}}`}case\"number\":return isFinite(i)?String(i):t?t(i):\"null\";case\"boolean\":return i===true?\"true\":\"false\";case\"undefined\":return undefined;case\"bigint\":if(r){return String(i)}default:return t?t(i):undefined}}function stringifyIndent(e,s,l,c,a){switch(typeof s){case\"string\":return strEscape(s);case\"object\":{if(s===null){return\"null\"}if(typeof s.toJSON===\"function\"){s=s.toJSON(e);if(typeof s!==\"object\"){return stringifyIndent(e,s,l,c,a)}if(s===null){return\"null\"}}if(l.indexOf(s)!==-1){return n}const t=a;if(Array.isArray(s)){if(s.length===0){return\"[]\"}if(u<l.length+1){return'\"[Array]\"'}l.push(s);a+=c;let e=`\\n${a}`;const n=`,\\n${a}`;const r=Math.min(s.length,o);let i=0;for(;i<r-1;i++){const t=stringifyIndent(String(i),s[i],l,c,a);e+=t!==undefined?t:\"null\";e+=n}const f=stringifyIndent(String(i),s[i],l,c,a);e+=f!==undefined?f:\"null\";if(s.length-1>o){const t=s.length-o-1;e+=`${n}\"... ${getItemCount(t)} not stringified\"`}e+=`\\n${t}`;l.pop();return`[${e}]`}let r=Object.keys(s);const g=r.length;if(g===0){return\"{}\"}if(u<l.length+1){return'\"[Object]\"'}a+=c;const p=`,\\n${a}`;let y=\"\";let d=\"\";let h=Math.min(g,o);if(isTypedArrayWithEntries(s)){y+=stringifyTypedArray(s,p,o);r=r.slice(s.length);h-=s.length;d=p}if(i){r=sort(r,f)}l.push(s);for(let e=0;e<h;e++){const t=r[e];const n=stringifyIndent(t,s[t],l,c,a);if(n!==undefined){y+=`${d}${strEscape(t)}: ${n}`;d=p}}if(g>o){const e=g-o;y+=`${d}\"...\": \"${getItemCount(e)} not stringified\"`;d=p}if(d!==\"\"){y=`\\n${a}${y}\\n${t}`}l.pop();return`{${y}}`}case\"number\":return isFinite(s)?String(s):t?t(s):\"null\";case\"boolean\":return s===true?\"true\":\"false\";case\"undefined\":return undefined;case\"bigint\":if(r){return String(s)}default:return t?t(s):undefined}}function stringifySimple(e,s,l){switch(typeof s){case\"string\":return strEscape(s);case\"object\":{if(s===null){return\"null\"}if(typeof s.toJSON===\"function\"){s=s.toJSON(e);if(typeof s!==\"object\"){return stringifySimple(e,s,l)}if(s===null){return\"null\"}}if(l.indexOf(s)!==-1){return n}let t=\"\";const r=s.length!==undefined;if(r&&Array.isArray(s)){if(s.length===0){return\"[]\"}if(u<l.length+1){return'\"[Array]\"'}l.push(s);const e=Math.min(s.length,o);let n=0;for(;n<e-1;n++){const e=stringifySimple(String(n),s[n],l);t+=e!==undefined?e:\"null\";t+=\",\"}const r=stringifySimple(String(n),s[n],l);t+=r!==undefined?r:\"null\";if(s.length-1>o){const e=s.length-o-1;t+=`,\"... ${getItemCount(e)} not stringified\"`}l.pop();return`[${t}]`}let c=Object.keys(s);const a=c.length;if(a===0){return\"{}\"}if(u<l.length+1){return'\"[Object]\"'}let g=\"\";let p=Math.min(a,o);if(r&&isTypedArrayWithEntries(s)){t+=stringifyTypedArray(s,\",\",o);c=c.slice(s.length);p-=s.length;g=\",\"}if(i){c=sort(c,f)}l.push(s);for(let e=0;e<p;e++){const n=c[e];const r=stringifySimple(n,s[n],l);if(r!==undefined){t+=`${g}${strEscape(n)}:${r}`;g=\",\"}}if(a>o){const e=a-o;t+=`${g}\"...\":\"${getItemCount(e)} not stringified\"`}l.pop();return`{${t}}`}case\"number\":return isFinite(s)?String(s):t?t(s):\"null\";case\"boolean\":return s===true?\"true\":\"false\";case\"undefined\":return undefined;case\"bigint\":if(r){return String(s)}default:return t?t(s):undefined}}function stringify(e,t,n){if(arguments.length>1){let r=\"\";if(typeof n===\"number\"){r=\" \".repeat(Math.min(n,10))}else if(typeof n===\"string\"){r=n.slice(0,10)}if(t!=null){if(typeof t===\"function\"){return stringifyFnReplacer(\"\",{\"\":e},[],t,r,\"\")}if(Array.isArray(t)){return stringifyArrayReplacer(\"\",e,[],getUniqueReplacerSet(t),r,\"\")}}if(r.length!==0){return stringifyIndent(\"\",e,[],r,\"\")}}return stringifySimple(\"\",e,[])}return stringify}}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var i=t[n]={exports:{}};var f=true;try{e[n](i,i.exports,__nccwpck_require__);f=false}finally{if(f)delete t[n]}return i.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var n=__nccwpck_require__(879);module.exports=n})();","(()=>{\"use strict\";var e={328:e=>{function hash(e){var r=5381,_=e.length;while(_){r=r*33^e.charCodeAt(--_)}return r>>>0}e.exports=hash}};var r={};function __nccwpck_require__(_){var a=r[_];if(a!==undefined){return a.exports}var t=r[_]={exports:{}};var i=true;try{e[_](t,t.exports,__nccwpck_require__);i=false}finally{if(i)delete r[_]}return t.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var _=__nccwpck_require__(328);module.exports=_})();","(()=>{\"use strict\";var e={511:e=>{e.exports=({onlyFirst:e=false}={})=>{const r=[\"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))\"].join(\"|\");return new RegExp(r,e?undefined:\"g\")}},532:(e,r,_)=>{const t=_(511);e.exports=e=>typeof e===\"string\"?e.replace(t(),\"\"):e}};var r={};function __nccwpck_require__(_){var t=r[_];if(t!==undefined){return t.exports}var a=r[_]={exports:{}};var n=true;try{e[_](a,a.exports,__nccwpck_require__);n=false}finally{if(n)delete r[_]}return a.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var _=__nccwpck_require__(532);module.exports=_})();","import { startTransition } from 'react'\nimport { ACTION_SERVER_ACTION } from './components/router-reducer/router-reducer-types'\nimport { dispatchAppRouterAction } from './components/use-action-queue'\n\nexport async function callServer(actionId: string, actionArgs: any[]) {\n  return new Promise((resolve, reject) => {\n    startTransition(() => {\n      dispatchAppRouterAction({\n        type: ACTION_SERVER_ACTION,\n        actionId,\n        actionArgs,\n        resolve,\n        reject,\n      })\n    })\n  })\n}\n","const basePath = process.env.__NEXT_ROUTER_BASEPATH || ''\nconst pathname = `${basePath}/__nextjs_source-map`\n\nexport const findSourceMapURL =\n  // Source maps are only served by the dev server.\n  process.env.__NEXT_DEV_SERVER\n    ? function findSourceMapURL(filename: string): string | null {\n        if (filename === '') {\n          return null\n        }\n\n        if (\n          filename.startsWith(document.location.origin) &&\n          filename.includes('/_next/static')\n        ) {\n          // This is a request for a client chunk. This can only happen when\n          // using Turbopack. In this case, since we control how those source\n          // maps are generated, we can safely assume that the sourceMappingURL\n          // is relative to the filename, with an added `.map` extension. The\n          // browser can just request this file, and it gets served through the\n          // normal dev server, without the need to route this through\n          // the `/__nextjs_source-map` dev middleware.\n          return `${filename}.map`\n        }\n\n        const url = new URL(pathname, document.location.origin)\n        url.searchParams.set('filename', filename)\n\n        return url.href\n      }\n    : undefined\n","export const RSC_HEADER = 'rsc' as const\nexport const ACTION_HEADER = 'next-action' as const\n// TODO: Instead of sending the full router state, we only need to send the\n// segment path. Saves bytes. Then we could also use this field for segment\n// prefetches, which also need to specify a particular segment.\nexport const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree' as const\nexport const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch' as const\n// This contains the path to the segment being prefetched.\n// TODO: If we change next-router-state-tree to be a segment path, we can use\n// that instead. Then next-router-prefetch and next-router-segment-prefetch can\n// be merged into a single enum.\nexport const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER =\n  'next-router-segment-prefetch' as const\nexport const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh' as const\nexport const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__' as const\nexport const NEXT_URL = 'next-url' as const\nexport const RSC_CONTENT_TYPE_HEADER = 'text/x-component' as const\n\n// Header for the Instant Navigation Testing API. In development and testing\n// builds, static pre-renders normally don't happen. This header tells the\n// server to perform a static pre-render anyway, allowing tests to assert on\n// the prefetched UI. Not exposed in production builds by default.\nexport const NEXT_INSTANT_PREFETCH_HEADER =\n  'next-instant-navigation-testing-prefetch' as const\n\n// Cookie for the Instant Navigation Testing API. Used for MPA navigations\n// (page reload, full page load) where we can't set request headers. When set,\n// the server renders only the static shell. Not exposed in production builds\n// by default.\nexport const NEXT_INSTANT_TEST_COOKIE =\n  'next-instant-navigation-testing' as const\n\nexport const FLIGHT_HEADERS = [\n  RSC_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_HMR_REFRESH_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n] as const\n\nexport const NEXT_RSC_UNION_QUERY = '_rsc' as const\n\nexport const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time' as const\nexport const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed' as const\nexport const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path' as const\nexport const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query' as const\nexport const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender' as const\nexport const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found' as const\nexport const NEXT_REQUEST_ID_HEADER = 'x-nextjs-request-id' as const\nexport const NEXT_HTML_REQUEST_ID_HEADER = 'x-nextjs-html-request-id' as const\n\n// TODO: Should this include nextjs in the name, like the others?\nexport const NEXT_ACTION_REVALIDATED_HEADER = 'x-action-revalidated' as const\n","import { addPathPrefix } from '../shared/lib/router/utils/add-path-prefix'\nimport { normalizePathTrailingSlash } from './normalize-trailing-slash'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function addBasePath(path: string, required?: boolean): string {\n  return normalizePathTrailingSlash(\n    process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !required\n      ? path\n      : addPathPrefix(path, basePath)\n  )\n}\n","import { removeTrailingSlash } from '../shared/lib/router/utils/remove-trailing-slash'\nimport { parsePath } from '../shared/lib/router/utils/parse-path'\n\n/**\n * Normalizes the trailing slash of a path according to the `trailingSlash` option\n * in `next.config.js`.\n */\nexport const normalizePathTrailingSlash = (path: string) => {\n  if (!path.startsWith('/') || process.env.__NEXT_MANUAL_TRAILING_SLASH) {\n    return path\n  }\n\n  const { pathname, query, hash } = parsePath(path)\n  if (process.env.__NEXT_TRAILING_SLASH) {\n    if (/\\.[^/]+\\/?$/.test(pathname)) {\n      return `${removeTrailingSlash(pathname)}${query}${hash}`\n    } else if (pathname.endsWith('/')) {\n      return `${pathname}${query}${hash}`\n    } else {\n      return `${pathname}/${query}${hash}`\n    }\n  }\n\n  return `${removeTrailingSlash(pathname)}${query}${hash}`\n}\n","import { isBot } from '../../shared/lib/router/utils/is-bot'\nimport { addBasePath } from '../add-base-path'\n\nexport function isExternalURL(url: URL) {\n  return url.origin !== window.location.origin\n}\n\n/**\n * Given a link href, constructs the URL that should be prefetched. Returns null\n * in cases where prefetching should be disabled, like external URLs, or\n * during development.\n * @param href The href passed to <Link>, router.prefetch(), or similar\n * @returns A URL object to prefetch, or null if prefetching should be disabled\n */\nexport function createPrefetchURL(href: string): URL | null {\n  // Don't prefetch for bots as they don't navigate.\n  if (isBot(window.navigator.userAgent)) {\n    return null\n  }\n\n  let url: URL\n  try {\n    url = new URL(addBasePath(href), window.location.href)\n  } catch (_) {\n    // TODO: Does this need to throw or can we just console.error instead? Does\n    // anyone rely on this throwing? (Seems unlikely.)\n    throw new Error(\n      `Cannot prefetch '${href}' because it cannot be converted to a URL.`\n    )\n  }\n\n  // Don't prefetch during development (improves compilation performance)\n  if (process.env.NODE_ENV === 'development') {\n    return null\n  }\n\n  // External urls can't be prefetched in the same way.\n  if (isExternalURL(url)) {\n    return null\n  }\n\n  return url\n}\n","import type {\n  ActionFlightResponse,\n  ActionResult,\n} from '../../../../shared/lib/app-router-types'\nimport { callServer } from '../../../app-call-server'\nimport { findSourceMapURL } from '../../../app-find-source-map-url'\nimport {\n  ACTION_HEADER,\n  NEXT_ACTION_NOT_FOUND_HEADER,\n  NEXT_IS_PRERENDER_HEADER,\n  NEXT_HTML_REQUEST_ID_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  NEXT_URL,\n  RSC_CONTENT_TYPE_HEADER,\n  NEXT_REQUEST_ID_HEADER,\n} from '../../app-router-headers'\nimport { UnrecognizedActionError } from '../../unrecognized-action-error'\n\n// TODO: Explicitly import from client.browser\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {\n  createFromFetch as createFromFetchBrowser,\n  createTemporaryReferenceSet,\n  encodeReply,\n} from 'react-server-dom-webpack/client'\n\nimport type {\n  ReadonlyReducerState,\n  ReducerState,\n  ServerActionAction,\n} from '../router-reducer-types'\nimport { ScrollBehavior } from '../router-reducer-types'\nimport { assignLocation } from '../../../assign-location'\nimport { createHrefFromUrl } from '../create-href-from-url'\nimport { hasInterceptionRouteInCurrentTree } from './has-interception-route-in-current-tree'\nimport {\n  normalizeFlightData,\n  prepareFlightRouterStateForRequest,\n  type NormalizedFlightData,\n} from '../../../flight-data-helpers'\nimport { getRedirectError } from '../../redirect'\nimport type { RedirectType } from '../../redirect-error'\nimport { removeBasePath } from '../../../remove-base-path'\nimport { hasBasePath } from '../../../has-base-path'\nimport {\n  extractInfoFromServerReferenceId,\n  omitUnusedArgs,\n} from '../../../../shared/lib/server-reference-info'\nimport { invalidateEntirePrefetchCache } from '../../segment-cache/cache'\nimport { startRevalidationCooldown } from '../../segment-cache/scheduler'\nimport { getDeploymentId } from '../../../../shared/lib/deployment-id'\nimport { getNavigationBuildId } from '../../../navigation-build-id'\nimport { NEXT_NAV_DEPLOYMENT_ID_HEADER } from '../../../../lib/constants'\nimport {\n  completeHardNavigation,\n  convertServerPatchToFullTree,\n  navigateToKnownRoute,\n  navigate,\n} from '../../segment-cache/navigation'\nimport { discoverKnownRoute } from '../../segment-cache/optimistic-routes'\nimport type { NormalizedSearch } from '../../segment-cache/cache-key'\nimport {\n  ActionDidNotRevalidate,\n  ActionDidRevalidateDynamicOnly,\n  ActionDidRevalidateStaticAndDynamic,\n  type ActionRevalidationKind,\n} from '../../../../shared/lib/action-revalidation-kind'\nimport { isExternalURL } from '../../app-router-utils'\nimport { FreshnessPolicy } from '../ppr-navigations'\nimport { processFetch } from '../fetch-server-response'\nimport {\n  invalidateBfCache,\n  UnknownDynamicStaleTime,\n} from '../../segment-cache/bfcache'\n\nconst createFromFetch =\n  createFromFetchBrowser as (typeof import('react-server-dom-webpack/client.browser'))['createFromFetch']\n\nlet createDebugChannel:\n  | typeof import('../../../dev/debug-channel').createDebugChannel\n  | undefined\n\nif (process.env.__NEXT_DEV_SERVER && process.env.__NEXT_REACT_DEBUG_CHANNEL) {\n  createDebugChannel = (\n    require('../../../dev/debug-channel') as typeof import('../../../dev/debug-channel')\n  ).createDebugChannel\n}\n\n// TODO: Refactor to be a discriminated union. Or just get rid of it;\n// fetchServerAction only has one caller, no reason this intermediate type has\n// to exist.\ntype FetchServerActionResult = {\n  redirectLocation: URL | undefined\n  redirectType: RedirectType | undefined\n  revalidationKind: ActionRevalidationKind\n  actionResult: ActionResult | undefined\n  actionFlightData: NormalizedFlightData[] | string | undefined\n  actionFlightDataRenderedSearch: NormalizedSearch | undefined\n  isPrerender: boolean\n  couldBeIntercepted: boolean\n}\n\nasync function fetchServerAction(\n  state: ReadonlyReducerState,\n  nextUrl: ReadonlyReducerState['nextUrl'],\n  { actionId, actionArgs }: ServerActionAction\n): Promise<FetchServerActionResult> {\n  const temporaryReferences = createTemporaryReferenceSet()\n  const info = extractInfoFromServerReferenceId(actionId)\n  const usedArgs = omitUnusedArgs(actionArgs, info)\n  const body = await encodeReply(usedArgs, { temporaryReferences })\n\n  const headers: Record<string, string> = {\n    Accept: RSC_CONTENT_TYPE_HEADER,\n    [ACTION_HEADER]: actionId,\n    [NEXT_ROUTER_STATE_TREE_HEADER]: prepareFlightRouterStateForRequest(\n      state.tree\n    ),\n  }\n\n  const deploymentId = getDeploymentId()\n  if (deploymentId) {\n    headers['x-deployment-id'] = deploymentId\n  }\n\n  if (nextUrl) {\n    headers[NEXT_URL] = nextUrl\n  }\n\n  if (process.env.__NEXT_DEV_SERVER) {\n    if (self.__next_r) {\n      headers[NEXT_HTML_REQUEST_ID_HEADER] = self.__next_r\n    }\n\n    // Create a new request ID for the server action request. The server uses\n    // this to tag debug information sent via WebSocket to the client, which\n    // then routes those chunks to the debug channel associated with this ID.\n    headers[NEXT_REQUEST_ID_HEADER] = crypto\n      .getRandomValues(new Uint32Array(1))[0]\n      .toString(16)\n  }\n\n  const res = await fetch(state.canonicalUrl, { method: 'POST', headers, body })\n\n  // Handle server actions that the server didn't recognize.\n  const unrecognizedActionHeader = res.headers.get(NEXT_ACTION_NOT_FOUND_HEADER)\n  if (unrecognizedActionHeader === '1') {\n    throw new UnrecognizedActionError(\n      `Server Action \"${actionId}\" was not found on the server. \\nRead more: https://nextjs.org/docs/messages/failed-to-find-server-action`\n    )\n  }\n\n  const redirectHeader = res.headers.get('x-action-redirect')\n  const [location, _redirectType] = redirectHeader?.split(';') || []\n  let redirectType: RedirectType | undefined\n  switch (_redirectType) {\n    case 'push':\n      redirectType = 'push'\n      break\n    case 'replace':\n      redirectType = 'replace'\n      break\n    default:\n      redirectType = undefined\n  }\n\n  const isPrerender = !!res.headers.get(NEXT_IS_PRERENDER_HEADER)\n\n  let revalidationKind: ActionRevalidationKind = ActionDidNotRevalidate\n  try {\n    const revalidationHeader = res.headers.get('x-action-revalidated')\n    if (revalidationHeader) {\n      const parsedKind = JSON.parse(revalidationHeader)\n      if (\n        parsedKind === ActionDidRevalidateStaticAndDynamic ||\n        parsedKind === ActionDidRevalidateDynamicOnly\n      ) {\n        revalidationKind = parsedKind\n      }\n    }\n  } catch {}\n\n  const redirectLocation = location\n    ? assignLocation(\n        location,\n        new URL(state.canonicalUrl, window.location.href)\n      )\n    : undefined\n\n  const contentType = res.headers.get('content-type')\n  const isRscResponse = !!(\n    contentType && contentType.startsWith(RSC_CONTENT_TYPE_HEADER)\n  )\n\n  // Handle invalid server action responses.\n  // A valid response must have `content-type: text/x-component`, unless it's an external redirect.\n  // (external redirects have an 'x-action-redirect' header, but the body is an empty 'text/plain')\n  if (!isRscResponse && !redirectLocation) {\n    // The server can respond with a text/plain error message, but we'll fallback to something generic\n    // if there isn't one.\n    const message =\n      res.status >= 400 && contentType === 'text/plain'\n        ? await res.text()\n        : 'An unexpected response was received from the server.'\n\n    throw new Error(message)\n  }\n\n  let actionResult: FetchServerActionResult['actionResult']\n  let actionFlightData: FetchServerActionResult['actionFlightData']\n  let actionFlightDataRenderedSearch: FetchServerActionResult['actionFlightDataRenderedSearch']\n  let couldBeIntercepted: boolean = false\n\n  if (isRscResponse) {\n    // Server action redirect responses carry the Flight data of the redirect\n    // target, which may be prerendered with a completeness marker byte\n    // prepended. Strip it before passing to Flight.\n    const responsePromise = redirectLocation\n      ? processFetch(res).then(({ response: r }) => r)\n      : Promise.resolve(res)\n\n    const response: ActionFlightResponse = await createFromFetch(\n      responsePromise,\n      {\n        callServer,\n        findSourceMapURL,\n        temporaryReferences,\n        debugChannel: createDebugChannel && createDebugChannel(headers),\n      }\n    )\n\n    // An internal redirect can send an RSC response, but does not have a useful `actionResult`.\n    actionResult = redirectLocation ? undefined : response.a\n    couldBeIntercepted = response.i\n\n    // Check if the response build ID matches the client build ID.\n    // In a multi-zone setup, when a server action triggers a redirect,\n    // the server pre-fetches the redirect target as RSC. If the redirect\n    // target is served by a different Next.js zone (different build), the\n    // pre-fetched RSC data will have a foreign build ID. We must discard\n    // the flight data in that case so the redirect triggers an MPA\n    // navigation (full page load) instead of trying to apply the foreign\n    // RSC payload — which would result in a blank page.\n    const responseBuildId =\n      res.headers.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ?? response.b\n    if (\n      responseBuildId !== undefined &&\n      responseBuildId !== getNavigationBuildId()\n    ) {\n      // Build ID mismatch — discard the flight data. The redirect will\n      // still be processed, and the absence of flight data will cause an\n      // MPA navigation via completeHardNavigation().\n    } else {\n      const maybeFlightData = normalizeFlightData(response.f)\n      if (maybeFlightData !== '') {\n        actionFlightData = maybeFlightData\n        actionFlightDataRenderedSearch = response.q as NormalizedSearch\n      }\n    }\n  } else {\n    // An external redirect doesn't contain RSC data.\n    actionResult = undefined\n    actionFlightData = undefined\n    actionFlightDataRenderedSearch = undefined\n  }\n\n  return {\n    actionResult,\n    actionFlightData,\n    actionFlightDataRenderedSearch,\n    redirectLocation,\n    redirectType,\n    revalidationKind,\n    isPrerender,\n    couldBeIntercepted,\n  }\n}\n\n/*\n * This reducer is responsible for calling the server action and processing any side-effects from the server action.\n * It does not mutate the state by itself but rather delegates to other reducers to do the actual mutation.\n */\nexport function serverActionReducer(\n  state: ReadonlyReducerState,\n  action: ServerActionAction\n): ReducerState {\n  const { resolve, reject } = action\n\n  // only pass along the `nextUrl` param (used for interception routes) if the current route was intercepted.\n  // If the route has been intercepted, the action should be as well.\n  // Otherwise the server action might be intercepted with the wrong action id\n  // (ie, one that corresponds with the intercepted route)\n  const nextUrl =\n    // We always send the last next-url, not the current when\n    // performing a dynamic request. This is because we update\n    // the next-url after a navigation, but we want the same\n    // interception route to be matched that used the last\n    // next-url.\n    (state.previousNextUrl || state.nextUrl) &&\n    hasInterceptionRouteInCurrentTree(state.tree)\n      ? state.previousNextUrl || state.nextUrl\n      : null\n\n  return fetchServerAction(state, nextUrl, action).then(\n    async ({\n      revalidationKind,\n      actionResult,\n      actionFlightData: flightData,\n      actionFlightDataRenderedSearch: flightDataRenderedSearch,\n      redirectLocation,\n      redirectType,\n      isPrerender,\n      couldBeIntercepted,\n    }) => {\n      if (revalidationKind !== ActionDidNotRevalidate) {\n        // There was either a revalidation or a refresh, or maybe both.\n\n        // Evict the BFCache, which may contain dynamic data.\n        invalidateBfCache()\n\n        // Store whether this action triggered any revalidation\n        // The action queue will use this information to potentially\n        // trigger a refresh action if the action was discarded\n        // (ie, due to a navigation, before the action completed)\n        action.didRevalidate = true\n\n        // If there was a revalidation, evict the prefetch cache.\n        // TODO: Evict only segments with matching tags and/or paths.\n        // TODO: We should only invalidate the route cache if cookies were\n        // mutated, since route trees may vary based on cookies. For now we\n        // invalidate both caches until we have a way to detect cookie\n        // mutations on the client.\n        if (revalidationKind === ActionDidRevalidateStaticAndDynamic) {\n          invalidateEntirePrefetchCache(nextUrl, state.tree)\n        }\n\n        // Start a cooldown before re-prefetching to allow CDN cache\n        // propagation.\n        startRevalidationCooldown()\n      }\n\n      const navigateType = redirectType || 'push'\n\n      if (redirectLocation !== undefined) {\n        // If the action triggered a redirect, the action promise will be rejected with\n        // a redirect so that it's handled by RedirectBoundary as we won't have a valid\n        // action result to resolve the promise with. This will effectively reset the state of\n        // the component that called the action as the error boundary will remount the tree.\n        // The status code doesn't matter here as the action handler will have already sent\n        // a response with the correct status code.\n\n        if (isExternalURL(redirectLocation)) {\n          // External redirect. Triggers an MPA navigation.\n          const redirectHref = redirectLocation.href\n          const redirectError = createRedirectErrorForAction(\n            redirectHref,\n            navigateType\n          )\n          reject(redirectError)\n          return completeHardNavigation(state, redirectLocation, navigateType)\n        } else {\n          // Internal redirect. Triggers an SPA navigation.\n          const redirectWithBasepath = createHrefFromUrl(\n            redirectLocation,\n            false\n          )\n          const redirectHref = hasBasePath(redirectWithBasepath)\n            ? removeBasePath(redirectWithBasepath)\n            : redirectWithBasepath\n          const redirectError = createRedirectErrorForAction(\n            redirectHref,\n            navigateType\n          )\n          reject(redirectError)\n        }\n      } else {\n        // If there's no redirect, resolve the action with the result.\n        resolve(actionResult)\n      }\n\n      // Check if we can bail out without updating any state.\n      if (\n        // Did the action trigger a redirect?\n        redirectLocation === undefined &&\n        // Did the action revalidate any data?\n        revalidationKind === ActionDidNotRevalidate &&\n        // Did the server render new data?\n        flightData === undefined\n      ) {\n        // The action did not trigger any revalidations or redirects. No\n        // navigation is required.\n        return state\n      }\n\n      if (flightData === undefined && redirectLocation !== undefined) {\n        // The server redirected, but did not send any Flight data. This implies\n        // an external redirect.\n        // TODO: We should refactor the action response type to be more explicit\n        // about the various response types.\n        return completeHardNavigation(state, redirectLocation, navigateType)\n      }\n\n      if (typeof flightData === 'string') {\n        // If the flight data is just a string, something earlier in the\n        // response handling triggered an external redirect.\n        return completeHardNavigation(\n          state,\n          new URL(flightData, location.origin),\n          navigateType\n        )\n      }\n\n      // The action triggered a navigation — either a redirect, a revalidation,\n      // or both.\n\n      // If there was no redirect, then the target URL is the same as the\n      // current URL.\n      const currentUrl = new URL(state.canonicalUrl, location.origin)\n      const currentRenderedSearch = state.renderedSearch\n      const redirectUrl =\n        redirectLocation !== undefined ? redirectLocation : currentUrl\n      const currentFlightRouterState = state.tree\n      const scrollBehavior = ScrollBehavior.Default\n\n      // If the action triggered a revalidation of the cache, we should also\n      // refresh all the dynamic data.\n      const freshnessPolicy =\n        revalidationKind === ActionDidNotRevalidate\n          ? FreshnessPolicy.Default\n          : FreshnessPolicy.RefreshAll\n\n      // The server may have sent back new data. If so, we will perform a\n      // \"seeded\" navigation that uses the data from the response.\n      // TODO: Currently the server always renders from the root in\n      // response to a Server Action. In the case of a normal redirect\n      // with no revalidation, it should skip over the shared layouts.\n      if (flightData !== undefined && flightDataRenderedSearch !== undefined) {\n        // The server sent back new route data as part of the response. We\n        // will use this to render the new page. If this happens to be only a\n        // subset of the data needed to render the new page, we'll initiate a\n        // new fetch, like we would for a normal navigation.\n        const redirectCanonicalUrl = createHrefFromUrl(redirectUrl)\n        const now = Date.now()\n        // TODO: Store the dynamic stale time on the top-level state so it's\n        // known during restores and refreshes.\n        const redirectSeed = convertServerPatchToFullTree(\n          now,\n          currentFlightRouterState,\n          flightData,\n          flightDataRenderedSearch,\n          UnknownDynamicStaleTime\n        )\n\n        // Learn the route pattern so we can predict it for future navigations.\n        const metadataVaryPath = redirectSeed.metadataVaryPath\n        if (metadataVaryPath !== null) {\n          discoverKnownRoute(\n            now,\n            redirectUrl.pathname,\n            nextUrl,\n            null, // No pending entry\n            redirectSeed.routeTree,\n            metadataVaryPath,\n            couldBeIntercepted,\n            redirectCanonicalUrl,\n            isPrerender,\n            false // hasDynamicRewrite\n          )\n        }\n\n        return navigateToKnownRoute(\n          now,\n          state,\n          redirectUrl,\n          redirectCanonicalUrl,\n          redirectSeed,\n          currentUrl,\n          currentRenderedSearch,\n          state.cache,\n          currentFlightRouterState,\n          freshnessPolicy,\n          nextUrl,\n          scrollBehavior,\n          navigateType,\n          null,\n          // Server action redirects don't use route prediction - we already\n          // have the route tree from the server response. If a mismatch occurs\n          // during dynamic data fetch, the retry handler will traverse the\n          // known route tree to mark the entry as having a dynamic rewrite.\n          null\n        )\n      }\n\n      // The server did not send back new data. We'll perform a regular, non-\n      // seeded navigation — effectively the same as <Link> or router.push().\n      return navigate(\n        state,\n        redirectUrl,\n        currentUrl,\n        currentRenderedSearch,\n        state.cache,\n        currentFlightRouterState,\n        nextUrl,\n        freshnessPolicy,\n        scrollBehavior,\n        navigateType\n      )\n    },\n    (e: any) => {\n      // When the server action is rejected we don't update the state and instead call the reject handler of the promise.\n      reject(e)\n\n      return state\n    }\n  )\n}\n\nfunction createRedirectErrorForAction(\n  redirectHref: string,\n  resolvedRedirectType: RedirectType\n) {\n  const redirectError = getRedirectError(redirectHref, resolvedRedirectType)\n  // We mark the error as handled because we don't want the redirect to be tried later by\n  // the RedirectBoundary, in case the user goes back and `Activity` triggers the redirect\n  // again, as it's run within an effect.\n  // We don't actually need the RedirectBoundary to do a router.push because we already\n  // have all the necessary RSC data to render the new page within a single roundtrip.\n  ;(redirectError as any).handled = true\n  return redirectError\n}\n","import {\n  type AppRouterState,\n  type ReducerActions,\n  type ReducerState,\n  ACTION_REFRESH,\n  ACTION_SERVER_ACTION,\n  ACTION_NAVIGATE,\n  ACTION_RESTORE,\n  type NavigateAction,\n  ACTION_HMR_REFRESH,\n  PrefetchKind,\n  ScrollBehavior,\n  type AppHistoryState,\n} from './router-reducer/router-reducer-types'\nimport { reducer } from './router-reducer/router-reducer'\nimport { addTransitionType, startTransition } from 'react'\nimport { isThenable } from '../../shared/lib/is-thenable'\nimport {\n  FetchStrategy,\n  type PrefetchTaskFetchStrategy,\n} from './segment-cache/types'\nimport { prefetch as prefetchWithSegmentCache } from './segment-cache/prefetch'\nimport { navigate } from './segment-cache/navigation'\nimport {\n  dispatchAppRouterAction,\n  dispatchGestureState,\n} from './use-action-queue'\nimport { resetKnownRoutes } from './segment-cache/optimistic-routes'\nimport { FreshnessPolicy } from './router-reducer/ppr-navigations'\nimport { addBasePath } from '../add-base-path'\nimport { isExternalURL } from './app-router-utils'\nimport type {\n  AppRouterInstance,\n  NavigateOptions,\n  PrefetchOptions,\n} from '../../shared/lib/app-router-context.shared-runtime'\nimport { setLinkForCurrentNavigation, type LinkInstance } from './links'\nimport type { ClientInstrumentationHooks } from '../app-index'\nimport type { GlobalErrorComponent } from './builtin/global-error'\nimport { isJavaScriptURLString } from '../lib/javascript-url'\n\nexport type DispatchStatePromise = React.Dispatch<ReducerState>\n\nexport type AppRouterActionQueue = {\n  state: AppRouterState\n  dispatch: (payload: ReducerActions, setState: DispatchStatePromise) => void\n  action: (state: AppRouterState, action: ReducerActions) => ReducerState\n\n  onRouterTransitionStart:\n    | ((url: string, type: 'push' | 'replace' | 'traverse') => void)\n    | null\n\n  pending: ActionQueueNode | null\n  needsRefresh?: boolean\n  last: ActionQueueNode | null\n}\n\nexport type GlobalErrorState = [\n  GlobalError: GlobalErrorComponent,\n  styles: React.ReactNode,\n]\n\nexport type ActionQueueNode = {\n  payload: ReducerActions\n  next: ActionQueueNode | null\n  resolve: (value: ReducerState) => void\n  reject: (err: Error) => void\n  discarded?: boolean\n}\n\nfunction runRemainingActions(\n  actionQueue: AppRouterActionQueue,\n  setState: DispatchStatePromise\n) {\n  if (actionQueue.pending !== null) {\n    actionQueue.pending = actionQueue.pending.next\n    if (actionQueue.pending !== null) {\n      runAction({\n        actionQueue,\n        action: actionQueue.pending,\n        setState,\n      })\n    }\n  } else {\n    // Check for refresh when pending is already null\n    // This handles the case where a discarded server action completes\n    // after the navigation has already finished and the queue is empty\n    if (actionQueue.needsRefresh) {\n      actionQueue.needsRefresh = false\n      actionQueue.dispatch({ type: ACTION_REFRESH }, setState)\n    }\n  }\n}\n\nasync function runAction({\n  actionQueue,\n  action,\n  setState,\n}: {\n  actionQueue: AppRouterActionQueue\n  action: ActionQueueNode\n  setState: DispatchStatePromise\n}) {\n  const prevState = actionQueue.state\n\n  actionQueue.pending = action\n\n  const payload = action.payload\n  const actionResult = actionQueue.action(prevState, payload)\n\n  function handleResult(nextState: AppRouterState) {\n    // if we discarded this action, the state should also be discarded\n    if (action.discarded) {\n      // Check if the discarded server action revalidated data\n      if (\n        action.payload.type === ACTION_SERVER_ACTION &&\n        action.payload.didRevalidate\n      ) {\n        // The server action was discarded but it revalidated data,\n        // mark that we need to refresh after all actions complete\n        actionQueue.needsRefresh = true\n      }\n      // Still need to run remaining actions even for discarded actions\n      // to potentially trigger the refresh\n      runRemainingActions(actionQueue, setState)\n      return\n    }\n\n    actionQueue.state = nextState\n\n    runRemainingActions(actionQueue, setState)\n    action.resolve(nextState)\n  }\n\n  // if the action is a promise, set up a callback to resolve it\n  if (isThenable(actionResult)) {\n    actionResult.then(handleResult, (err) => {\n      runRemainingActions(actionQueue, setState)\n      action.reject(err)\n    })\n  } else {\n    handleResult(actionResult)\n  }\n}\n\nfunction dispatchAction(\n  actionQueue: AppRouterActionQueue,\n  payload: ReducerActions,\n  setState: DispatchStatePromise\n) {\n  let resolvers: {\n    resolve: (value: ReducerState) => void\n    reject: (reason: any) => void\n  } = { resolve: setState, reject: () => {} }\n\n  // most of the action types are async with the exception of restore\n  // it's important that restore is handled quickly since it's fired on the popstate event\n  // and we don't want to add any delay on a back/forward nav\n  // this only creates a promise for the async actions\n  if (payload.type !== ACTION_RESTORE) {\n    // Create the promise and assign the resolvers to the object.\n    const deferredPromise = new Promise<AppRouterState>((resolve, reject) => {\n      resolvers = { resolve, reject }\n    })\n\n    startTransition(() => {\n      // we immediately notify React of the pending promise -- the resolver is attached to the action node\n      // and will be called when the associated action promise resolves\n      setState(deferredPromise)\n    })\n  }\n\n  const newAction: ActionQueueNode = {\n    payload,\n    next: null,\n    resolve: resolvers.resolve,\n    reject: resolvers.reject,\n  }\n\n  // Check if the queue is empty\n  if (actionQueue.pending === null) {\n    // The queue is empty, so add the action and start it immediately\n    // Mark this action as the last in the queue\n    actionQueue.last = newAction\n\n    runAction({\n      actionQueue,\n      action: newAction,\n      setState,\n    })\n  } else if (\n    payload.type === ACTION_NAVIGATE ||\n    payload.type === ACTION_RESTORE\n  ) {\n    // Navigations (including back/forward) take priority over any pending actions.\n    // Mark the pending action as discarded (so the state is never applied) and start the navigation action immediately.\n    actionQueue.pending.discarded = true\n\n    // The rest of the current queue should still execute after this navigation.\n    // (Note that it can't contain any earlier navigations, because we always put those into `actionQueue.pending` by calling `runAction`)\n    newAction.next = actionQueue.pending.next\n\n    runAction({\n      actionQueue,\n      action: newAction,\n      setState,\n    })\n  } else {\n    // The queue is not empty, so add the action to the end of the queue\n    // It will be started by runRemainingActions after the previous action finishes\n    if (actionQueue.last !== null) {\n      actionQueue.last.next = newAction\n    }\n    actionQueue.last = newAction\n  }\n}\n\nlet globalActionQueue: AppRouterActionQueue | null = null\n\nexport function createMutableActionQueue(\n  initialState: AppRouterState,\n  instrumentationHooks: ClientInstrumentationHooks | null\n): AppRouterActionQueue {\n  const actionQueue: AppRouterActionQueue = {\n    state: initialState,\n    dispatch: (payload: ReducerActions, setState: DispatchStatePromise) =>\n      dispatchAction(actionQueue, payload, setState),\n    action: async (state: AppRouterState, action: ReducerActions) => {\n      const result = reducer(state, action)\n      return result\n    },\n    pending: null,\n    last: null,\n    onRouterTransitionStart:\n      instrumentationHooks !== null &&\n      typeof instrumentationHooks.onRouterTransitionStart === 'function'\n        ? // This profiling hook will be called at the start of every navigation.\n          instrumentationHooks.onRouterTransitionStart\n        : null,\n  }\n\n  if (typeof window !== 'undefined') {\n    // The action queue is lazily created on hydration, but after that point\n    // it doesn't change. So we can store it in a global rather than pass\n    // it around everywhere via props/context.\n    if (globalActionQueue !== null) {\n      throw new Error(\n        'Internal Next.js Error: createMutableActionQueue was called more ' +\n          'than once'\n      )\n    }\n    globalActionQueue = actionQueue\n  }\n\n  return actionQueue\n}\n\nexport function getCurrentAppRouterState(): AppRouterState | null {\n  return globalActionQueue !== null ? globalActionQueue.state : null\n}\n\nfunction getAppRouterActionQueue(): AppRouterActionQueue {\n  if (globalActionQueue === null) {\n    throw new Error(\n      'Internal Next.js error: Router action dispatched before initialization.'\n    )\n  }\n  return globalActionQueue\n}\n\nfunction getProfilingHookForOnNavigationStart() {\n  if (globalActionQueue !== null) {\n    return globalActionQueue.onRouterTransitionStart\n  }\n  return null\n}\n\nexport function dispatchNavigateAction(\n  href: string,\n  navigateType: NavigateAction['navigateType'],\n  scrollBehavior: ScrollBehavior,\n  linkInstanceRef: LinkInstance | null,\n  transitionTypes: string[] | undefined\n): void {\n  // TODO: This stuff could just go into the reducer. Leaving as-is for now\n  // since we're about to rewrite all the router reducer stuff anyway.\n\n  if (transitionTypes) {\n    for (const type of transitionTypes) {\n      addTransitionType(type)\n    }\n  }\n\n  const url = new URL(addBasePath(href), location.href)\n  if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {\n    window.next.__pendingUrl = url\n  }\n\n  setLinkForCurrentNavigation(linkInstanceRef)\n\n  const onRouterTransitionStart = getProfilingHookForOnNavigationStart()\n  if (onRouterTransitionStart !== null) {\n    onRouterTransitionStart(href, navigateType)\n  }\n\n  dispatchAppRouterAction({\n    type: ACTION_NAVIGATE,\n    url,\n    isExternalUrl: isExternalURL(url),\n    locationSearch: location.search,\n    scrollBehavior,\n    navigateType,\n  })\n}\n\nexport function dispatchTraverseAction(\n  href: string,\n  historyState: AppHistoryState | undefined\n) {\n  const onRouterTransitionStart = getProfilingHookForOnNavigationStart()\n  if (onRouterTransitionStart !== null) {\n    onRouterTransitionStart(href, 'traverse')\n  }\n  dispatchAppRouterAction({\n    type: ACTION_RESTORE,\n    url: new URL(href),\n    historyState,\n  })\n}\n\n/**\n * (Experimental) Perform a gesture navigation. This dispatches through React's\n * useOptimistic instead of the main action queue, allowing the state to be\n * shown during a gesture transition and discarded when the canonical navigation\n * completes.\n *\n * Only available when experimental.gestureTransition is enabled.\n */\nfunction gesturePush(href: string, options?: NavigateOptions): void {\n  if (process.env.__NEXT_GESTURE_TRANSITION) {\n    // TODO: Trigger a prefetch so the cache starts populating if there isn't\n    // already a prefetch for this route.\n    if (isJavaScriptURLString(href)) {\n      throw new Error(\n        'Next.js has blocked a javascript: URL as a security precaution.'\n      )\n    }\n\n    const state = getCurrentAppRouterState()\n    if (state === null) {\n      return\n    }\n    const url = new URL(addBasePath(href), location.href)\n    if (isExternalURL(url)) {\n      return\n    }\n\n    // Fork the router state for the duration of the gesture transition.\n    const currentUrl = new URL(state.canonicalUrl, location.href)\n    const scrollBehavior =\n      options?.scroll === false\n        ? ScrollBehavior.NoScroll\n        : ScrollBehavior.Default\n    // This is a special freshness policy that prevents dynamic requests from\n    // being spawned. During the gesture, we should only show the cached\n    // prefetched UI, not dynamic data.\n    // TODO: In the case of navigations to an unknown route, this will still\n    // end up performing a dynamic request. The plan is to do prefetch instead.\n    // There's a separate TODO for this.\n    const freshnessPolicy = FreshnessPolicy.Gesture\n    const forkedGestureState = navigate(\n      state,\n      url,\n      currentUrl,\n      state.renderedSearch,\n      state.cache,\n      state.tree,\n      state.nextUrl,\n      freshnessPolicy,\n      scrollBehavior,\n      'push'\n    )\n    dispatchGestureState(forkedGestureState)\n  }\n}\n\n/**\n * The app router that is exposed through `useRouter`. These are public API\n * methods. Internal Next.js code should call the lower level methods directly\n * (although there's lots of existing code that doesn't do that).\n */\nexport const publicAppRouterInstance: AppRouterInstance = {\n  back: () => window.history.back(),\n  forward: () => window.history.forward(),\n  prefetch:\n    // Unlike the old implementation, the Segment Cache doesn't store its\n    // data in the router reducer state; it writes into a global mutable\n    // cache. So we don't need to dispatch an action.\n    (href: string, options?: PrefetchOptions) => {\n      if (isJavaScriptURLString(href)) {\n        throw new Error(\n          'Next.js has blocked a javascript: URL as a security precaution.'\n        )\n      }\n      const actionQueue = getAppRouterActionQueue()\n      const prefetchKind = options?.kind ?? PrefetchKind.AUTO\n\n      // We don't currently offer a way to issue a runtime prefetch via `router.prefetch()`.\n      // This will be possible when we update its API to not take a PrefetchKind.\n      let fetchStrategy: PrefetchTaskFetchStrategy\n      switch (prefetchKind) {\n        case PrefetchKind.AUTO: {\n          // We default to PPR. We'll discover whether or not the route supports it with the initial prefetch.\n          fetchStrategy = FetchStrategy.PPR\n          break\n        }\n        case PrefetchKind.FULL: {\n          fetchStrategy = FetchStrategy.Full\n          break\n        }\n        default: {\n          prefetchKind satisfies never\n          // Despite typescript thinking that this can't happen,\n          // we might get an unexpected value from user code.\n          // We don't know what they want, but we know they want a prefetch,\n          // so use the default.\n          fetchStrategy = FetchStrategy.PPR\n        }\n      }\n\n      prefetchWithSegmentCache(\n        href,\n        actionQueue.state.nextUrl,\n        actionQueue.state.tree,\n        fetchStrategy,\n        options?.onInvalidate ?? null\n      )\n    },\n  replace: (href: string, options?: NavigateOptions) => {\n    if (isJavaScriptURLString(href)) {\n      throw new Error(\n        'Next.js has blocked a javascript: URL as a security precaution.'\n      )\n    }\n    startTransition(() => {\n      dispatchNavigateAction(\n        href,\n        'replace',\n        options?.scroll === false\n          ? ScrollBehavior.NoScroll\n          : ScrollBehavior.Default,\n        null,\n        options?.transitionTypes\n      )\n    })\n  },\n  push: (href: string, options?: NavigateOptions) => {\n    if (isJavaScriptURLString(href)) {\n      throw new Error(\n        'Next.js has blocked a javascript: URL as a security precaution.'\n      )\n    }\n    startTransition(() => {\n      dispatchNavigateAction(\n        href,\n        'push',\n        options?.scroll === false\n          ? ScrollBehavior.NoScroll\n          : ScrollBehavior.Default,\n        null,\n        options?.transitionTypes\n      )\n    })\n  },\n  refresh: () => {\n    startTransition(() => {\n      dispatchAppRouterAction({\n        type: ACTION_REFRESH,\n      })\n    })\n  },\n  hmrRefresh: () => {\n    if (process.env.NODE_ENV !== 'development') {\n      throw new Error(\n        'hmrRefresh can only be used in development mode. Please use refresh instead.'\n      )\n    } else {\n      // Reset the known routes table so that route predictions are cleared\n      // when routes change during development.\n      resetKnownRoutes()\n      startTransition(() => {\n        dispatchAppRouterAction({\n          type: ACTION_HMR_REFRESH,\n        })\n      })\n    }\n  },\n}\n\n// Conditionally add experimental_gesturePush when gestureTransition is enabled\nif (process.env.__NEXT_GESTURE_TRANSITION) {\n  ;(publicAppRouterInstance as any).experimental_gesturePush = gesturePush\n}\n\n// Exists for debugging purposes. Don't use in application code.\nif (typeof window !== 'undefined' && window.next) {\n  window.next.router = publicAppRouterInstance\n}\n","import type { FlightRouterState } from '../../../shared/lib/app-router-types'\nimport { createPrefetchURL } from '../app-router-utils'\nimport { createCacheKey } from './cache-key'\nimport { schedulePrefetchTask } from './scheduler'\nimport { PrefetchPriority, type PrefetchTaskFetchStrategy } from './types'\n\n/**\n * Entrypoint for prefetching a URL into the Segment Cache.\n * @param href - The URL to prefetch. Typically this will come from a <Link>,\n * or router.prefetch. It must be validated before we attempt to prefetch it.\n * @param nextUrl - A special header used by the server for interception routes.\n * Roughly corresponds to the current URL.\n * @param treeAtTimeOfPrefetch - The FlightRouterState at the time the prefetch\n * was requested. This is only used when PPR is disabled.\n * @param fetchStrategy - Whether to prefetch dynamic data, in addition to\n * static data. This is used by `<Link prefetch={true}>`.\n * @param onInvalidate - A callback that will be called when the prefetch cache\n * When called, it signals to the listener that the data associated with the\n * prefetch may have been invalidated from the cache. This is not a live\n * subscription — it's called at most once per `prefetch` call. The only\n * supported use case is to trigger a new prefetch inside the listener, if\n * desired. It also may be called even in cases where the associated data is\n * still cached. Prefetching is a poll-based (pull) operation, not an event-\n * based (push) one. Rather than subscribe to specific cache entries, you\n * occasionally poll the prefetch cache to check if anything is missing.\n */\nexport function prefetch(\n  href: string,\n  nextUrl: string | null,\n  treeAtTimeOfPrefetch: FlightRouterState,\n  fetchStrategy: PrefetchTaskFetchStrategy,\n  onInvalidate: null | (() => void)\n) {\n  const url = createPrefetchURL(href)\n  if (url === null) {\n    // This href should not be prefetched.\n    return\n  }\n  const cacheKey = createCacheKey(url.href, nextUrl)\n  schedulePrefetchTask(\n    cacheKey,\n    treeAtTimeOfPrefetch,\n    fetchStrategy,\n    PrefetchPriority.Default,\n    onInvalidate\n  )\n}\n","import React from 'react'\n\nexport const errorStyles = {\n  container: {\n    fontFamily:\n      'system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"',\n    height: '100vh',\n    display: 'flex',\n    alignItems: 'center',\n    justifyContent: 'center',\n  },\n  card: {\n    marginTop: '-32px',\n    maxWidth: '325px',\n    padding: '32px 28px',\n    textAlign: 'left' as const,\n  },\n  icon: {\n    marginBottom: '24px',\n  },\n  title: {\n    fontSize: '24px',\n    fontWeight: 500,\n    letterSpacing: '-0.02em',\n    lineHeight: '32px',\n    margin: '0 0 12px 0',\n    color: 'var(--next-error-title)',\n  },\n  message: {\n    fontSize: '14px',\n    fontWeight: 400,\n    lineHeight: '21px',\n    margin: '0 0 20px 0',\n    color: 'var(--next-error-message)',\n  },\n  form: {\n    margin: 0,\n  },\n  buttonGroup: {\n    display: 'flex',\n    gap: '8px',\n    alignItems: 'center',\n  },\n  button: {\n    display: 'inline-flex',\n    alignItems: 'center',\n    justifyContent: 'center',\n    height: '32px',\n    padding: '0 12px',\n    fontSize: '14px',\n    fontWeight: 500,\n    lineHeight: '20px',\n    borderRadius: '6px',\n    cursor: 'pointer',\n    color: 'var(--next-error-btn-text)',\n    background: 'var(--next-error-btn-bg)',\n    border: 'var(--next-error-btn-border)',\n  },\n  buttonSecondary: {\n    display: 'inline-flex',\n    alignItems: 'center',\n    justifyContent: 'center',\n    height: '32px',\n    padding: '0 12px',\n    fontSize: '14px',\n    fontWeight: 500,\n    lineHeight: '20px',\n    borderRadius: '6px',\n    cursor: 'pointer',\n    color: 'var(--next-error-btn-secondary-text)',\n    background: 'var(--next-error-btn-secondary-bg)',\n    border: 'var(--next-error-btn-secondary-border)',\n  },\n  digestFooter: {\n    position: 'fixed' as const,\n    bottom: '32px',\n    left: '0',\n    right: '0',\n    textAlign: 'center' as const,\n    fontFamily:\n      'ui-monospace,SFMono-Regular,\"SF Mono\",Menlo,Consolas,monospace',\n    fontSize: '12px',\n    lineHeight: '18px',\n    fontWeight: 400,\n    margin: '0',\n    color: 'var(--next-error-digest)',\n  },\n} as const\n\nexport const errorThemeCss = `\n:root {\n  --next-error-bg: #fff;\n  --next-error-text: #171717;\n  --next-error-title: #171717;\n  --next-error-message: #171717;\n  --next-error-digest: #666666;\n  --next-error-btn-text: #fff;\n  --next-error-btn-bg: #171717;\n  --next-error-btn-border: none;\n  --next-error-btn-secondary-text: #171717;\n  --next-error-btn-secondary-bg: transparent;\n  --next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);\n}\n@media (prefers-color-scheme: dark) {\n  :root {\n    --next-error-bg: #0a0a0a;\n    --next-error-text: #ededed;\n    --next-error-title: #ededed;\n    --next-error-message: #ededed;\n    --next-error-digest: #a0a0a0;\n    --next-error-btn-text: #0a0a0a;\n    --next-error-btn-bg: #ededed;\n    --next-error-btn-border: none;\n    --next-error-btn-secondary-text: #ededed;\n    --next-error-btn-secondary-bg: transparent;\n    --next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);\n  }\n}\nbody { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\n`.replace(/\\n\\s*/g, '')\n\nexport function WarningIcon() {\n  return (\n    <svg\n      width=\"32\"\n      height=\"32\"\n      viewBox=\"-0.2 -1.5 32 32\"\n      fill=\"none\"\n      style={errorStyles.icon}\n    >\n      <path\n        d=\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\"\n        fill=\"var(--next-error-title)\"\n      />\n    </svg>\n  )\n}\n","'use client'\n\nimport React from 'react'\nimport { handleISRError } from '../handle-isr-error'\nimport { errorStyles, errorThemeCss, WarningIcon } from './error-styles'\n\nexport type GlobalErrorComponent = React.ComponentType<{\n  error: any\n  reset: () => void\n  unstable_retry: () => void\n}>\n\nfunction DefaultGlobalError({ error }: { error: any }) {\n  const digest: string | undefined = error?.digest\n  const isServerError = !!digest\n\n  const message = isServerError\n    ? 'A server error occurred. Reload to try again.'\n    : 'Reload to try again, or go back.'\n\n  handleISRError({ error })\n\n  return (\n    <html id=\"__next_error__\">\n      <head>\n        <style dangerouslySetInnerHTML={{ __html: errorThemeCss }} />\n      </head>\n      <body>\n        <div style={errorStyles.container}>\n          <div style={errorStyles.card}>\n            <WarningIcon />\n            <h1 style={errorStyles.title}>This page couldn&#x2019;t load</h1>\n            <p style={errorStyles.message}>{message}</p>\n            <div style={errorStyles.buttonGroup}>\n              <form style={errorStyles.form}>\n                <button type=\"submit\" style={errorStyles.button}>\n                  Reload\n                </button>\n              </form>\n              {!isServerError && (\n                <button\n                  type=\"button\"\n                  style={errorStyles.buttonSecondary}\n                  onClick={() => {\n                    if (window.history.length > 1) {\n                      window.history.back()\n                    } else {\n                      window.location.href = '/'\n                    }\n                  }}\n                >\n                  Back\n                </button>\n              )}\n            </div>\n          </div>\n        </div>\n        {digest && <p style={errorStyles.digestFooter}>ERROR {digest}</p>}\n      </body>\n    </html>\n  )\n}\n\n// Exported so that the import signature in the loaders can be identical to user\n// supplied custom global error signatures.\nexport default DefaultGlobalError\n","'use client'\n\n/**\n * HTTPAccessFallbackBoundary is a boundary that catches errors and renders a\n * fallback component for HTTP errors.\n *\n * It receives the status code, and determine if it should render fallbacks for few HTTP 4xx errors.\n *\n * e.g. 404\n * 404 represents not found, and the fallback component pair contains the component and its styles.\n *\n */\n\nimport React, { useContext } from 'react'\nimport { useUntrackedPathname } from '../navigation-untracked'\nimport {\n  HTTPAccessErrorStatus,\n  getAccessFallbackHTTPStatus,\n  getAccessFallbackErrorTypeByStatus,\n  isHTTPAccessFallbackError,\n} from './http-access-fallback'\nimport { warnOnce } from '../../../shared/lib/utils/warn-once'\nimport { MissingSlotContext } from '../../../shared/lib/app-router-context.shared-runtime'\n\ninterface HTTPAccessFallbackBoundaryProps {\n  notFound?: React.ReactNode\n  forbidden?: React.ReactNode\n  unauthorized?: React.ReactNode\n  // TODO: Make this required once `React.createElement` understands that positional args go into children\n  children?: React.ReactNode\n  missingSlots?: Set<string>\n}\n\ninterface HTTPAccessFallbackErrorBoundaryProps\n  extends HTTPAccessFallbackBoundaryProps {\n  pathname: string | null\n  missingSlots?: Set<string>\n}\n\ninterface HTTPAccessBoundaryState {\n  triggeredStatus: number | undefined\n  previousPathname: string | null\n}\n\nclass HTTPAccessFallbackErrorBoundary extends React.Component<\n  HTTPAccessFallbackErrorBoundaryProps,\n  HTTPAccessBoundaryState\n> {\n  constructor(props: HTTPAccessFallbackErrorBoundaryProps) {\n    super(props)\n    this.state = {\n      triggeredStatus: undefined,\n      previousPathname: props.pathname,\n    }\n  }\n\n  componentDidCatch(): void {\n    if (\n      process.env.NODE_ENV === 'development' &&\n      this.props.missingSlots &&\n      this.props.missingSlots.size > 0 &&\n      // A missing children slot is the typical not-found case, so no need to warn\n      !this.props.missingSlots.has('children')\n    ) {\n      let warningMessage =\n        'No default component was found for a parallel route rendered on this page. Falling back to nearest NotFound boundary.\\n' +\n        'Learn more: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#defaultjs\\n\\n'\n\n      const formattedSlots = Array.from(this.props.missingSlots)\n        .sort((a, b) => a.localeCompare(b))\n        .map((slot) => `@${slot}`)\n        .join(', ')\n\n      warningMessage += 'Missing slots: ' + formattedSlots\n\n      warnOnce(warningMessage)\n    }\n  }\n\n  static getDerivedStateFromError(error: any) {\n    if (isHTTPAccessFallbackError(error)) {\n      const httpStatus = getAccessFallbackHTTPStatus(error)\n      return {\n        triggeredStatus: httpStatus,\n      }\n    }\n    // Re-throw if error is not for 404\n    throw error\n  }\n\n  static getDerivedStateFromProps(\n    props: HTTPAccessFallbackErrorBoundaryProps,\n    state: HTTPAccessBoundaryState\n  ): HTTPAccessBoundaryState | null {\n    /**\n     * Handles reset of the error boundary when a navigation happens.\n     * Ensures the error boundary does not stay enabled when navigating to a new page.\n     * Approach of setState in render is safe as it checks the previous pathname and then overrides\n     * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders\n     */\n    if (props.pathname !== state.previousPathname && state.triggeredStatus) {\n      return {\n        triggeredStatus: undefined,\n        previousPathname: props.pathname,\n      }\n    }\n    return {\n      triggeredStatus: state.triggeredStatus,\n      previousPathname: props.pathname,\n    }\n  }\n\n  render() {\n    const { notFound, forbidden, unauthorized, children } = this.props\n    const { triggeredStatus } = this.state\n    const errorComponents = {\n      [HTTPAccessErrorStatus.NOT_FOUND]: notFound,\n      [HTTPAccessErrorStatus.FORBIDDEN]: forbidden,\n      [HTTPAccessErrorStatus.UNAUTHORIZED]: unauthorized,\n    }\n\n    if (triggeredStatus) {\n      const isNotFound =\n        triggeredStatus === HTTPAccessErrorStatus.NOT_FOUND && notFound\n      const isForbidden =\n        triggeredStatus === HTTPAccessErrorStatus.FORBIDDEN && forbidden\n      const isUnauthorized =\n        triggeredStatus === HTTPAccessErrorStatus.UNAUTHORIZED && unauthorized\n\n      // If there's no matched boundary in this layer, keep throwing the error by rendering the children\n      if (!(isNotFound || isForbidden || isUnauthorized)) {\n        return children\n      }\n\n      return (\n        <>\n          <meta name=\"robots\" content=\"noindex\" />\n          {process.env.NODE_ENV === 'development' && (\n            <meta\n              name=\"boundary-next-error\"\n              content={getAccessFallbackErrorTypeByStatus(triggeredStatus)}\n            />\n          )}\n          {errorComponents[triggeredStatus]}\n        </>\n      )\n    }\n\n    return children\n  }\n}\n\nexport function HTTPAccessFallbackBoundary({\n  notFound,\n  forbidden,\n  unauthorized,\n  children,\n}: HTTPAccessFallbackBoundaryProps) {\n  // When we're rendering the missing params shell, this will return null. This\n  // is because we won't be rendering any not found boundaries or error\n  // boundaries for the missing params shell. When this runs on the client\n  // (where these error can occur), we will get the correct pathname.\n  const pathname = useUntrackedPathname()\n  const missingSlots = useContext(MissingSlotContext)\n  const hasErrorFallback = !!(notFound || forbidden || unauthorized)\n\n  if (hasErrorFallback) {\n    return (\n      <HTTPAccessFallbackErrorBoundary\n        pathname={pathname}\n        notFound={notFound}\n        forbidden={forbidden}\n        unauthorized={unauthorized}\n        missingSlots={missingSlots}\n      >\n        {children}\n      </HTTPAccessFallbackErrorBoundary>\n    )\n  }\n\n  return <>{children}</>\n}\n","'use client'\n\nimport React from 'react'\nimport { HTTPAccessFallbackBoundary } from './http-access-fallback/error-boundary'\n\n// TODO: error on using forbidden and unauthorized in root layout\nexport function bailOnRootNotFound() {\n  throw new Error('notFound() is not allowed to use in root layout')\n}\n\nfunction NotAllowedRootHTTPFallbackError() {\n  bailOnRootNotFound()\n  return null\n}\n\nexport function DevRootHTTPAccessFallbackBoundary({\n  children,\n}: {\n  children: React.ReactNode\n}) {\n  return (\n    <HTTPAccessFallbackBoundary notFound={<NotAllowedRootHTTPFallbackError />}>\n      {children}\n    </HTTPAccessFallbackBoundary>\n  )\n}\n","'use client'\n\nimport React, { startTransition, type JSX } from 'react'\nimport { useUntrackedPathname } from './navigation-untracked'\nimport { isNextRouterError } from './is-next-router-error'\nimport { handleHardNavError } from './nav-failure-handler'\nimport { handleISRError } from './handle-isr-error'\nimport { isBot } from '../../shared/lib/router/utils/is-bot'\nimport {\n  AppRouterContext,\n  type AppRouterInstance,\n} from '../../shared/lib/app-router-context.shared-runtime'\n\nconst isBotUserAgent =\n  typeof window !== 'undefined' && isBot(window.navigator.userAgent)\n\nexport type ErrorInfo = {\n  error: Error\n  reset: () => void\n  unstable_retry: () => void\n}\n\nexport type ErrorComponent = React.ComponentType<ErrorInfo>\n\nexport interface ErrorBoundaryProps {\n  children?: React.ReactNode\n  errorComponent: ErrorComponent | undefined\n  errorStyles?: React.ReactNode | undefined\n  errorScripts?: React.ReactNode | undefined\n}\n\ninterface ErrorBoundaryHandlerProps extends ErrorBoundaryProps {\n  pathname: string | null\n  errorComponent: ErrorComponent\n}\n\ninterface ErrorBoundaryHandlerState {\n  error: Error | null\n  previousPathname: string | null\n}\n\nexport class ErrorBoundaryHandler extends React.Component<\n  ErrorBoundaryHandlerProps,\n  ErrorBoundaryHandlerState\n> {\n  static contextType = AppRouterContext\n  declare context: AppRouterInstance | null\n\n  constructor(props: ErrorBoundaryHandlerProps) {\n    super(props)\n    this.state = {\n      error: null,\n      previousPathname: this.props.pathname,\n    }\n  }\n\n  static getDerivedStateFromError(error: Error) {\n    if (isNextRouterError(error)) {\n      // Re-throw if an expected internal Next.js router error occurs\n      // this means it should be handled by a different boundary (such as a NotFound boundary in a parent segment)\n      throw error\n    }\n\n    return { error }\n  }\n\n  static getDerivedStateFromProps(\n    props: ErrorBoundaryHandlerProps,\n    state: ErrorBoundaryHandlerState\n  ): ErrorBoundaryHandlerState | null {\n    const { error } = state\n\n    // if we encounter an error while\n    // a navigation is pending we shouldn't render\n    // the error boundary and instead should fallback\n    // to a hard navigation to attempt recovering\n    if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {\n      if (error && handleHardNavError(error)) {\n        // clear error so we don't render anything\n        return {\n          error: null,\n          previousPathname: props.pathname,\n        }\n      }\n    }\n\n    /**\n     * Handles reset of the error boundary when a navigation happens.\n     * Ensures the error boundary does not stay enabled when navigating to a new page.\n     * Approach of setState in render is safe as it checks the previous pathname and then overrides\n     * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders\n     */\n    if (props.pathname !== state.previousPathname && state.error) {\n      return {\n        error: null,\n        previousPathname: props.pathname,\n      }\n    }\n    return {\n      error: state.error,\n      previousPathname: props.pathname,\n    }\n  }\n\n  reset = () => {\n    this.setState({ error: null })\n  }\n\n  unstable_retry = () => {\n    startTransition(() => {\n      this.context?.refresh()\n      this.reset()\n    })\n  }\n\n  // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version.\n  render(): React.ReactNode {\n    //When it's bot request, segment level error boundary will keep rendering the children,\n    // the final error will be caught by the root error boundary and determine wether need to apply graceful degrade.\n    if (this.state.error && !isBotUserAgent) {\n      handleISRError({ error: this.state.error })\n\n      return (\n        <>\n          {this.props.errorStyles}\n          {this.props.errorScripts}\n          <this.props.errorComponent\n            error={this.state.error}\n            reset={this.reset}\n            unstable_retry={this.unstable_retry}\n          />\n        </>\n      )\n    }\n\n    return this.props.children\n  }\n}\n\n/**\n * Handles errors through `getDerivedStateFromError`.\n * Renders the provided error component and provides a way to `reset` the error boundary state.\n */\n\n/**\n * Renders error boundary with the provided \"errorComponent\" property as the fallback.\n * If no \"errorComponent\" property is provided it renders the children without an error boundary.\n */\nexport function ErrorBoundary({\n  errorComponent,\n  errorStyles,\n  errorScripts,\n  children,\n}: ErrorBoundaryProps & {\n  children: React.ReactNode\n}): JSX.Element {\n  // When we're rendering the missing params shell, this will return null. This\n  // is because we won't be rendering any not found boundaries or error\n  // boundaries for the missing params shell. When this runs on the client\n  // (where these errors can occur), we will get the correct pathname.\n  const pathname = useUntrackedPathname()\n\n  if (errorComponent) {\n    return (\n      <ErrorBoundaryHandler\n        pathname={pathname}\n        errorComponent={errorComponent}\n        errorStyles={errorStyles}\n        errorScripts={errorScripts}\n      >\n        {children}\n      </ErrorBoundaryHandler>\n    )\n  }\n\n  return <>{children}</>\n}\n","const workAsyncStorage =\n  typeof window === 'undefined'\n    ? (\n        require('../../server/app-render/work-async-storage.external') as typeof import('../../server/app-render/work-async-storage.external')\n      ).workAsyncStorage\n    : undefined\n\n// if we are revalidating we want to re-throw the error so the\n// function crashes so we can maintain our previous cache\n// instead of caching the error page\nexport function handleISRError({ error }: { error: any }) {\n  if (workAsyncStorage) {\n    const store = workAsyncStorage.getStore()\n    if (store?.isStaticGeneration) {\n      if (error) {\n        console.error(error)\n      }\n      throw error\n    }\n  }\n}\n","const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'\n\nexport class DynamicServerError extends Error {\n  digest: typeof DYNAMIC_ERROR_CODE = DYNAMIC_ERROR_CODE\n\n  constructor(public readonly description: string) {\n    super(`Dynamic server usage: ${description}`)\n  }\n}\n\nexport function isDynamicServerError(err: unknown): err is DynamicServerError {\n  if (\n    typeof err !== 'object' ||\n    err === null ||\n    !('digest' in err) ||\n    typeof err.digest !== 'string'\n  ) {\n    return false\n  }\n\n  return err.digest === DYNAMIC_ERROR_CODE\n}\n","export const HTTPAccessErrorStatus = {\n  NOT_FOUND: 404,\n  FORBIDDEN: 403,\n  UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n  digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n  error: unknown\n): error is HTTPAccessFallbackError {\n  if (\n    typeof error !== 'object' ||\n    error === null ||\n    !('digest' in error) ||\n    typeof error.digest !== 'string'\n  ) {\n    return false\n  }\n  const [prefix, httpStatus] = error.digest.split(';')\n\n  return (\n    prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n    ALLOWED_CODES.has(Number(httpStatus))\n  )\n}\n\nexport function getAccessFallbackHTTPStatus(\n  error: HTTPAccessFallbackError\n): number {\n  const httpStatus = error.digest.split(';')[1]\n  return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n  status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n  switch (status) {\n    case 401:\n      return 'unauthorized'\n    case 403:\n      return 'forbidden'\n    case 404:\n      return 'not-found'\n    default:\n      return\n  }\n}\n","import {\n  isHTTPAccessFallbackError,\n  type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n  error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n  return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n","import type { FlightRouterState } from '../../shared/lib/app-router-types'\nimport type { AppRouterInstance } from '../../shared/lib/app-router-context.shared-runtime'\nimport {\n  FetchStrategy,\n  type PrefetchTaskFetchStrategy,\n  PrefetchPriority,\n} from './segment-cache/types'\nimport { createCacheKey } from './segment-cache/cache-key'\nimport {\n  type PrefetchTask,\n  schedulePrefetchTask as scheduleSegmentPrefetchTask,\n  cancelPrefetchTask,\n  reschedulePrefetchTask,\n  isPrefetchTaskDirty,\n} from './segment-cache/scheduler'\nimport { startTransition } from 'react'\n\ntype LinkElement = HTMLAnchorElement | SVGAElement\n\ntype Element = LinkElement | HTMLFormElement\n\n// Properties that are shared between Link and Form instances. We use the same\n// shape for both to prevent a polymorphic de-opt in the VM.\ntype LinkOrFormInstanceShared = {\n  router: AppRouterInstance\n  fetchStrategy: PrefetchTaskFetchStrategy\n\n  isVisible: boolean\n\n  // The most recently initiated prefetch task. It may or may not have\n  // already completed. The same prefetch task object can be reused across\n  // multiple prefetches of the same link.\n  prefetchTask: PrefetchTask | null\n}\n\nexport type FormInstance = LinkOrFormInstanceShared & {\n  prefetchHref: string\n  setOptimisticLinkStatus: null\n}\n\ntype PrefetchableLinkInstance = LinkOrFormInstanceShared & {\n  prefetchHref: string\n  setOptimisticLinkStatus: (status: { pending: boolean }) => void\n}\n\ntype NonPrefetchableLinkInstance = LinkOrFormInstanceShared & {\n  prefetchHref: null\n  setOptimisticLinkStatus: (status: { pending: boolean }) => void\n}\n\ntype PrefetchableInstance = PrefetchableLinkInstance | FormInstance\n\nexport type LinkInstance =\n  | PrefetchableLinkInstance\n  | NonPrefetchableLinkInstance\n\n// Tracks the most recently navigated link instance. When null, indicates\n// the current navigation was not initiated by a link click.\nlet linkForMostRecentNavigation: LinkInstance | null = null\n\n// Status object indicating link is pending\nexport const PENDING_LINK_STATUS = { pending: true }\n\n// Status object indicating link is idle\nexport const IDLE_LINK_STATUS = { pending: false }\n\n// Updates the loading state when navigating between links\n// - Resets the previous link's loading state\n// - Sets the new link's loading state\n// - Updates tracking of current navigation\nexport function setLinkForCurrentNavigation(link: LinkInstance | null) {\n  startTransition(() => {\n    linkForMostRecentNavigation?.setOptimisticLinkStatus(IDLE_LINK_STATUS)\n    link?.setOptimisticLinkStatus(PENDING_LINK_STATUS)\n    linkForMostRecentNavigation = link\n  })\n}\n\n// Unmounts the current link instance from navigation tracking\nexport function unmountLinkForCurrentNavigation(link: LinkInstance) {\n  if (linkForMostRecentNavigation === link) {\n    linkForMostRecentNavigation = null\n  }\n}\n\n/**\n * Returns the link instance that initiated the most recent navigation.\n * Returns null if the navigation was not initiated by a link click.\n *\n * Used by the Instant Navigation Testing API in dev mode to match the\n * fetch strategy of the link during cache-miss navigations.\n */\nexport function getLinkForCurrentNavigation(): LinkInstance | null {\n  return linkForMostRecentNavigation\n}\n\n// Use a WeakMap to associate a Link instance with its DOM element. This is\n// used by the IntersectionObserver to track the link's visibility.\nconst prefetchable:\n  | WeakMap<Element, PrefetchableInstance>\n  | Map<Element, PrefetchableInstance> =\n  typeof WeakMap === 'function' ? new WeakMap() : new Map()\n\n// A Set of the currently visible links. We re-prefetch visible links after a\n// cache invalidation, or when the current URL changes. It's a separate data\n// structure from the WeakMap above because only the visible links need to\n// be enumerated.\nconst prefetchableAndVisible: Set<PrefetchableInstance> = new Set()\n\n// A single IntersectionObserver instance shared by all <Link> components.\nconst observer: IntersectionObserver | null =\n  typeof IntersectionObserver === 'function'\n    ? new IntersectionObserver(handleIntersect, {\n        rootMargin: '200px',\n      })\n    : null\n\nfunction observeVisibility(element: Element, instance: PrefetchableInstance) {\n  const existingInstance = prefetchable.get(element)\n  if (existingInstance !== undefined) {\n    // This shouldn't happen because each <Link> component should have its own\n    // anchor tag instance, but it's defensive coding to avoid a memory leak in\n    // case there's a logical error somewhere else.\n    unmountPrefetchableInstance(element)\n  }\n  // Only track prefetchable links that have a valid prefetch URL\n  prefetchable.set(element, instance)\n  if (observer !== null) {\n    observer.observe(element)\n  }\n}\n\nfunction coercePrefetchableUrl(href: string): URL | null {\n  if (typeof window !== 'undefined') {\n    const { createPrefetchURL } =\n      require('./app-router-utils') as typeof import('./app-router-utils')\n\n    try {\n      return createPrefetchURL(href)\n    } catch {\n      // createPrefetchURL sometimes throws an error if an invalid URL is\n      // provided, though I'm not sure if it's actually necessary.\n      // TODO: Consider removing the throw from the inner function, or change it\n      // to reportError. Or maybe the error isn't even necessary for automatic\n      // prefetches, just navigations.\n      const reportErrorFn =\n        typeof reportError === 'function' ? reportError : console.error\n      reportErrorFn(\n        `Cannot prefetch '${href}' because it cannot be converted to a URL.`\n      )\n      return null\n    }\n  } else {\n    return null\n  }\n}\n\nexport function mountLinkInstance(\n  element: LinkElement,\n  href: string,\n  router: AppRouterInstance,\n  fetchStrategy: PrefetchTaskFetchStrategy,\n  prefetchEnabled: boolean,\n  setOptimisticLinkStatus: (status: { pending: boolean }) => void\n): LinkInstance {\n  if (prefetchEnabled) {\n    const prefetchURL = coercePrefetchableUrl(href)\n    if (prefetchURL !== null) {\n      const instance: PrefetchableLinkInstance = {\n        router,\n        fetchStrategy,\n        isVisible: false,\n        prefetchTask: null,\n        prefetchHref: prefetchURL.href,\n        setOptimisticLinkStatus,\n      }\n      // We only observe the link's visibility if it's prefetchable. For\n      // example, this excludes links to external URLs.\n      observeVisibility(element, instance)\n      return instance\n    }\n  }\n  // If the link is not prefetchable, we still create an instance so we can\n  // track its optimistic state (i.e. useLinkStatus).\n  const instance: NonPrefetchableLinkInstance = {\n    router,\n    fetchStrategy,\n    isVisible: false,\n    prefetchTask: null,\n    prefetchHref: null,\n    setOptimisticLinkStatus,\n  }\n  return instance\n}\n\nexport function mountFormInstance(\n  element: HTMLFormElement,\n  href: string,\n  router: AppRouterInstance,\n  fetchStrategy: PrefetchTaskFetchStrategy\n): void {\n  const prefetchURL = coercePrefetchableUrl(href)\n  if (prefetchURL === null) {\n    // This href is not prefetchable, so we don't track it.\n    // TODO: We currently observe/unobserve a form every time its href changes.\n    // For Links, this isn't a big deal because the href doesn't usually change,\n    // but for forms it's extremely common. We should optimize this.\n    return\n  }\n  const instance: FormInstance = {\n    router,\n    fetchStrategy,\n    isVisible: false,\n    prefetchTask: null,\n    prefetchHref: prefetchURL.href,\n    setOptimisticLinkStatus: null,\n  }\n  observeVisibility(element, instance)\n}\n\nexport function unmountPrefetchableInstance(element: Element) {\n  const instance = prefetchable.get(element)\n  if (instance !== undefined) {\n    prefetchable.delete(element)\n    prefetchableAndVisible.delete(instance)\n    const prefetchTask = instance.prefetchTask\n    if (prefetchTask !== null) {\n      cancelPrefetchTask(prefetchTask)\n    }\n  }\n  if (observer !== null) {\n    observer.unobserve(element)\n  }\n}\n\nfunction handleIntersect(entries: Array<IntersectionObserverEntry>) {\n  for (const entry of entries) {\n    // Some extremely old browsers or polyfills don't reliably support\n    // isIntersecting so we check intersectionRatio instead. (Do we care? Not\n    // really. But whatever this is fine.)\n    const isVisible = entry.intersectionRatio > 0\n    onLinkVisibilityChanged(entry.target as HTMLAnchorElement, isVisible)\n  }\n}\n\nexport function onLinkVisibilityChanged(element: Element, isVisible: boolean) {\n  if (process.env.NODE_ENV !== 'production') {\n    // Prefetching on viewport is disabled in development for performance\n    // reasons, because it requires compiling the target page.\n    // TODO: Investigate re-enabling this.\n    return\n  }\n\n  const instance = prefetchable.get(element)\n  if (instance === undefined) {\n    return\n  }\n\n  instance.isVisible = isVisible\n  if (isVisible) {\n    prefetchableAndVisible.add(instance)\n  } else {\n    prefetchableAndVisible.delete(instance)\n  }\n  rescheduleLinkPrefetch(instance, PrefetchPriority.Default)\n}\n\nexport function onNavigationIntent(\n  element: HTMLAnchorElement | SVGAElement,\n  unstable_upgradeToDynamicPrefetch: boolean\n) {\n  const instance = prefetchable.get(element)\n  if (instance === undefined) {\n    return\n  }\n  // Prefetch the link on hover/touchstart.\n  if (instance !== undefined) {\n    if (\n      process.env.__NEXT_DYNAMIC_ON_HOVER &&\n      unstable_upgradeToDynamicPrefetch\n    ) {\n      // Switch to a full prefetch\n      instance.fetchStrategy = FetchStrategy.Full\n    }\n    rescheduleLinkPrefetch(instance, PrefetchPriority.Intent)\n  }\n}\n\nfunction rescheduleLinkPrefetch(\n  instance: PrefetchableInstance,\n  priority: PrefetchPriority.Default | PrefetchPriority.Intent\n) {\n  // Ensures that app-router-instance is not compiled in the server bundle\n  if (typeof window !== 'undefined') {\n    const existingPrefetchTask = instance.prefetchTask\n\n    if (!instance.isVisible) {\n      // Cancel any in-progress prefetch task. (If it already finished then this\n      // is a no-op.)\n      if (existingPrefetchTask !== null) {\n        cancelPrefetchTask(existingPrefetchTask)\n      }\n      // We don't need to reset the prefetchTask to null upon cancellation; an\n      // old task object can be rescheduled with reschedulePrefetchTask. This is a\n      // micro-optimization but also makes the code simpler (don't need to\n      // worry about whether an old task object is stale).\n      return\n    }\n\n    const { getCurrentAppRouterState } =\n      require('./app-router-instance') as typeof import('./app-router-instance')\n\n    const appRouterState = getCurrentAppRouterState()\n    if (appRouterState !== null) {\n      const treeAtTimeOfPrefetch = appRouterState.tree\n      if (existingPrefetchTask === null) {\n        // Initiate a prefetch task.\n        const nextUrl = appRouterState.nextUrl\n        const cacheKey = createCacheKey(instance.prefetchHref, nextUrl)\n        instance.prefetchTask = scheduleSegmentPrefetchTask(\n          cacheKey,\n          treeAtTimeOfPrefetch,\n          instance.fetchStrategy,\n          priority,\n          null\n        )\n      } else {\n        // We already have an old task object that we can reschedule. This is\n        // effectively the same as canceling the old task and creating a new one.\n        reschedulePrefetchTask(\n          existingPrefetchTask,\n          treeAtTimeOfPrefetch,\n          instance.fetchStrategy,\n          priority\n        )\n      }\n    }\n  }\n}\n\nexport function pingVisibleLinks(\n  nextUrl: string | null,\n  tree: FlightRouterState\n) {\n  // For each currently visible link, cancel the existing prefetch task (if it\n  // exists) and schedule a new one. This is effectively the same as if all the\n  // visible links left and then re-entered the viewport.\n  //\n  // This is called when the Next-Url or the base tree changes, since those\n  // may affect the result of a prefetch task. It's also called after a\n  // cache invalidation.\n  for (const instance of prefetchableAndVisible) {\n    const task = instance.prefetchTask\n    if (task !== null && !isPrefetchTaskDirty(task, nextUrl, tree)) {\n      // The cache has not been invalidated, and none of the inputs have\n      // changed. Bail out.\n      continue\n    }\n    // Something changed. Cancel the existing prefetch task and schedule a\n    // new one.\n    if (task !== null) {\n      cancelPrefetchTask(task)\n    }\n    const cacheKey = createCacheKey(instance.prefetchHref, nextUrl)\n    instance.prefetchTask = scheduleSegmentPrefetchTask(\n      cacheKey,\n      tree,\n      instance.fetchStrategy,\n      PrefetchPriority.Default,\n      null\n    )\n  }\n}\n","import type { Segment } from '../../shared/lib/app-router-types'\n\nexport const matchSegment = (\n  existingSegment: Segment,\n  segment: Segment\n): boolean => {\n  // segment is either Array or string\n  if (typeof existingSegment === 'string') {\n    if (typeof segment === 'string') {\n      // Common case: segment is just a string\n      return existingSegment === segment\n    }\n    return false\n  }\n\n  if (typeof segment === 'string') {\n    return false\n  }\n  return existingSegment[0] === segment[0] && existingSegment[1] === segment[1]\n}\n","import { useEffect } from 'react'\nimport { createHrefFromUrl } from './router-reducer/create-href-from-url'\n\nexport function handleHardNavError(error: unknown): boolean {\n  if (\n    error &&\n    typeof window !== 'undefined' &&\n    window.next.__pendingUrl &&\n    createHrefFromUrl(new URL(window.location.href)) !==\n      createHrefFromUrl(window.next.__pendingUrl)\n  ) {\n    console.error(\n      `Error occurred during navigation, falling back to hard navigation`,\n      error\n    )\n    window.location.href = window.next.__pendingUrl.toString()\n    return true\n  }\n  return false\n}\n\nexport function useNavFailureHandler() {\n  if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {\n    // this if is only for DCE of the feature flag not conditional\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useEffect(() => {\n      const uncaughtExceptionHandler = (\n        evt: ErrorEvent | PromiseRejectionEvent\n      ) => {\n        const error = 'reason' in evt ? evt.reason : evt.error\n        // if we have an unhandled exception/rejection during\n        // a navigation we fall back to a hard navigation to\n        // attempt recovering to a good state\n        handleHardNavError(error)\n      }\n      window.addEventListener('unhandledrejection', uncaughtExceptionHandler)\n      window.addEventListener('error', uncaughtExceptionHandler)\n      return () => {\n        window.removeEventListener('error', uncaughtExceptionHandler)\n        window.removeEventListener(\n          'unhandledrejection',\n          uncaughtExceptionHandler\n        )\n      }\n    }, [])\n  }\n}\n","import type { FlightRouterState } from '../../shared/lib/app-router-types'\nimport type { Params } from '../../server/request/params'\nimport {\n  createDevToolsInstrumentedPromise,\n  ReadonlyURLSearchParams,\n  type InstrumentedPromise,\n  type NavigationPromises,\n} from '../../shared/lib/hooks-client-context.shared-runtime'\nimport {\n  computeSelectedLayoutSegment,\n  getSelectedLayoutSegmentPath,\n} from '../../shared/lib/segment'\n\n/**\n * Promises are cached by tree to ensure stability across suspense retries.\n */\ntype LayoutSegmentPromisesCache = {\n  selectedLayoutSegmentPromises: Map<string, InstrumentedPromise<string | null>>\n  selectedLayoutSegmentsPromises: Map<string, InstrumentedPromise<string[]>>\n}\n\nconst layoutSegmentPromisesCache = new WeakMap<\n  FlightRouterState,\n  LayoutSegmentPromisesCache\n>()\n\n/**\n * Creates instrumented promises for layout segment hooks at a given tree level.\n * This is dev-only code for React Suspense DevTools instrumentation.\n */\nfunction createLayoutSegmentPromises(\n  tree: FlightRouterState\n): LayoutSegmentPromisesCache | null {\n  if (process.env.NODE_ENV === 'production') {\n    return null\n  }\n\n  // Check if we already have cached promises for this tree\n  const cached = layoutSegmentPromisesCache.get(tree)\n  if (cached) {\n    return cached\n  }\n\n  // Create new promises and cache them\n  const segmentPromises = new Map<string, InstrumentedPromise<string | null>>()\n  const segmentsPromises = new Map<string, InstrumentedPromise<string[]>>()\n\n  const parallelRoutes = tree[1]\n  for (const parallelRouteKey of Object.keys(parallelRoutes)) {\n    const segments = getSelectedLayoutSegmentPath(tree, parallelRouteKey)\n\n    // Use the shared logic to compute the segment value\n    const segment = computeSelectedLayoutSegment(segments, parallelRouteKey)\n\n    segmentPromises.set(\n      parallelRouteKey,\n      createDevToolsInstrumentedPromise('useSelectedLayoutSegment', segment)\n    )\n    segmentsPromises.set(\n      parallelRouteKey,\n      createDevToolsInstrumentedPromise('useSelectedLayoutSegments', segments)\n    )\n  }\n\n  const result: LayoutSegmentPromisesCache = {\n    selectedLayoutSegmentPromises: segmentPromises,\n    selectedLayoutSegmentsPromises: segmentsPromises,\n  }\n\n  // Cache the result for future renders\n  layoutSegmentPromisesCache.set(tree, result)\n\n  return result\n}\n\nconst rootNavigationPromisesCache = new WeakMap<\n  FlightRouterState,\n  Map<string, NavigationPromises>\n>()\n\n/**\n * Creates instrumented navigation promises for the root app-router.\n */\nexport function createRootNavigationPromises(\n  tree: FlightRouterState,\n  pathname: string,\n  searchParams: URLSearchParams,\n  pathParams: Params\n): NavigationPromises | null {\n  if (process.env.NODE_ENV === 'production') {\n    return null\n  }\n\n  // Create stable cache keys from the values\n  const searchParamsString = searchParams.toString()\n  const pathParamsString = JSON.stringify(pathParams)\n  const cacheKey = `${pathname}:${searchParamsString}:${pathParamsString}`\n\n  // Get or create the cache for this tree\n  let treeCache = rootNavigationPromisesCache.get(tree)\n  if (!treeCache) {\n    treeCache = new Map<string, NavigationPromises>()\n    rootNavigationPromisesCache.set(tree, treeCache)\n  }\n\n  // Check if we have cached promises for this combination\n  const cached = treeCache.get(cacheKey)\n  if (cached) {\n    return cached\n  }\n\n  const readonlySearchParams = new ReadonlyURLSearchParams(searchParams)\n\n  const layoutSegmentPromises = createLayoutSegmentPromises(tree)\n\n  const promises: NavigationPromises = {\n    pathname: createDevToolsInstrumentedPromise('usePathname', pathname),\n    searchParams: createDevToolsInstrumentedPromise(\n      'useSearchParams',\n      readonlySearchParams\n    ),\n    params: createDevToolsInstrumentedPromise('useParams', pathParams),\n    ...layoutSegmentPromises,\n  }\n\n  treeCache.set(cacheKey, promises)\n\n  return promises\n}\n\nconst nestedLayoutPromisesCache = new WeakMap<\n  FlightRouterState,\n  Map<NavigationPromises | null, NavigationPromises>\n>()\n\n/**\n * Creates merged navigation promises for nested layouts.\n * Merges parent promises with layout-specific segment promises.\n */\nexport function createNestedLayoutNavigationPromises(\n  tree: FlightRouterState,\n  parentNavPromises: NavigationPromises | null\n): NavigationPromises | null {\n  if (process.env.NODE_ENV === 'production') {\n    return null\n  }\n\n  const parallelRoutes = tree[1]\n  const parallelRouteKeys = Object.keys(parallelRoutes)\n\n  // Only create promises if there are parallel routes at this level\n  if (parallelRouteKeys.length === 0) {\n    return null\n  }\n\n  // Get or create the cache for this tree\n  let treeCache = nestedLayoutPromisesCache.get(tree)\n  if (!treeCache) {\n    treeCache = new Map<NavigationPromises | null, NavigationPromises>()\n    nestedLayoutPromisesCache.set(tree, treeCache)\n  }\n\n  // Check if we have cached promises for this parent combination\n  const cached = treeCache.get(parentNavPromises)\n  if (cached) {\n    return cached\n  }\n\n  // Create merged promises\n  const layoutSegmentPromises = createLayoutSegmentPromises(tree)\n  const promises: NavigationPromises = {\n    ...parentNavPromises!,\n    ...layoutSegmentPromises,\n  }\n\n  treeCache.set(parentNavPromises, promises)\n\n  return promises\n}\n","import { useContext } from 'react'\nimport { PathnameContext } from '../../shared/lib/hooks-client-context.shared-runtime'\n\n/**\n * This checks to see if the current render has any unknown route parameters that\n * would cause the pathname to be dynamic. It's used to trigger a different\n * render path in the error boundary.\n *\n * @returns true if there are any unknown route parameters, false otherwise\n */\nfunction hasFallbackRouteParams(): boolean {\n  if (typeof window === 'undefined') {\n    // AsyncLocalStorage should not be included in the client bundle.\n    const { workUnitAsyncStorage } =\n      require('../../server/app-render/work-unit-async-storage.external') as typeof import('../../server/app-render/work-unit-async-storage.external')\n\n    const workUnitStore = workUnitAsyncStorage.getStore()\n    if (!workUnitStore) return false\n\n    switch (workUnitStore.type) {\n      case 'prerender':\n      case 'prerender-client':\n      case 'prerender-ppr':\n      case 'validation-client':\n        const fallbackParams = workUnitStore.fallbackRouteParams\n        return fallbackParams ? fallbackParams.size > 0 : false\n      case 'prerender-legacy':\n      case 'request':\n      case 'prerender-runtime':\n      case 'cache':\n      case 'private-cache':\n      case 'unstable-cache':\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n\n    return false\n  }\n\n  return false\n}\n\n/**\n * This returns a `null` value if there are any unknown route parameters, and\n * otherwise returns the pathname from the context. This is an alternative to\n * `usePathname` that is used in the error boundary to avoid rendering the\n * error boundary when there are unknown route parameters. This doesn't throw\n * when accessed with unknown route parameters.\n *\n * @returns\n *\n * @internal\n */\nexport function useUntrackedPathname(): string | null {\n  // If there are any unknown route parameters we would typically throw\n  // an error, but this internal method allows us to return a null value instead\n  // for components that do not propagate the pathname to the static shell (like\n  // the error boundary).\n  if (hasFallbackRouteParams()) {\n    return null\n  }\n\n  // This shouldn't cause any issues related to conditional rendering because\n  // the environment will be consistent for the render.\n  // eslint-disable-next-line react-hooks/rules-of-hooks\n  return useContext(PathnameContext)\n}\n","import {\n  HTTP_ERROR_FALLBACK_ERROR_CODE,\n  type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\n\n/**\n * This function allows you to render the [not-found.js file](https://nextjs.org/docs/app/api-reference/file-conventions/not-found)\n * within a route segment as well as inject a tag.\n *\n * `notFound()` can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * - In a Server Component, this will insert a `<meta name=\"robots\" content=\"noindex\" />` meta tag and set the status code to 404.\n * - In a Route Handler or Server Action, it will serve a 404 to the caller.\n *\n * Read more: [Next.js Docs: `notFound`](https://nextjs.org/docs/app/api-reference/functions/not-found)\n */\n\nconst DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};404`\n\nexport function notFound(): never {\n  const error = new Error(DIGEST) as HTTPAccessFallbackError\n  ;(error as HTTPAccessFallbackError).digest = DIGEST\n\n  throw error\n}\n","/**\n * ReadonlyURLSearchParams implementation shared between client and server.\n * This file is intentionally not marked as 'use client' or 'use server'\n * so it can be imported by both environments.\n */\n\n/** @internal */\nclass ReadonlyURLSearchParamsError extends Error {\n  constructor() {\n    super(\n      'Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams'\n    )\n  }\n}\n\n/**\n * A read-only version of URLSearchParams that throws errors when mutation methods are called.\n * This ensures that the URLSearchParams returned by useSearchParams() cannot be mutated.\n */\nexport class ReadonlyURLSearchParams extends URLSearchParams {\n  /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n  append() {\n    throw new ReadonlyURLSearchParamsError()\n  }\n  /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n  delete() {\n    throw new ReadonlyURLSearchParamsError()\n  }\n  /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n  set() {\n    throw new ReadonlyURLSearchParamsError()\n  }\n  /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n  sort() {\n    throw new ReadonlyURLSearchParamsError()\n  }\n}\n","import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport type RedirectType = 'push' | 'replace'\n\nexport type RedirectError = Error & {\n  digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n  if (\n    typeof error !== 'object' ||\n    error === null ||\n    !('digest' in error) ||\n    typeof error.digest !== 'string'\n  ) {\n    return false\n  }\n\n  const digest = error.digest.split(';')\n  const [errorCode, type] = digest\n  const destination = digest.slice(2, -2).join(';')\n  const status = digest.at(-2)\n\n  const statusCode = Number(status)\n\n  return (\n    errorCode === REDIRECT_ERROR_CODE &&\n    (type === 'replace' || type === 'push') &&\n    typeof destination === 'string' &&\n    !isNaN(statusCode) &&\n    statusCode in RedirectStatusCode\n  )\n}\n","export enum RedirectStatusCode {\n  SeeOther = 303,\n  TemporaryRedirect = 307,\n  PermanentRedirect = 308,\n}\n","import { RedirectStatusCode } from './redirect-status-code'\nimport {\n  type RedirectType,\n  type RedirectError,\n  isRedirectError,\n  REDIRECT_ERROR_CODE,\n} from './redirect-error'\n\nconst actionAsyncStorage =\n  typeof window === 'undefined'\n    ? (\n        require('../../server/app-render/action-async-storage.external') as typeof import('../../server/app-render/action-async-storage.external')\n      ).actionAsyncStorage\n    : undefined\n\nexport function getRedirectError(\n  url: string,\n  type: RedirectType,\n  statusCode: RedirectStatusCode = RedirectStatusCode.TemporaryRedirect\n): RedirectError {\n  const error = new Error(REDIRECT_ERROR_CODE) as RedirectError\n  error.digest = `${REDIRECT_ERROR_CODE};${type};${url};${statusCode};`\n  return error\n}\n\n/**\n * This function allows you to redirect the user to another URL. It can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * - In a Server Component, this will insert a meta tag to redirect the user to the target page.\n * - In a Route Handler or Server Action, it will serve a 307/303 to the caller.\n * - In a Server Action, type defaults to 'push' and 'replace' elsewhere.\n *\n * Read more: [Next.js Docs: `redirect`](https://nextjs.org/docs/app/api-reference/functions/redirect)\n */\nexport function redirect(\n  /** The URL to redirect to */\n  url: string,\n  type?: RedirectType\n): never {\n  type ??= actionAsyncStorage?.getStore()?.isAction ? 'push' : 'replace'\n\n  throw getRedirectError(url, type, RedirectStatusCode.TemporaryRedirect)\n}\n\n/**\n * This function allows you to redirect the user to another URL. It can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * - In a Server Component, this will insert a meta tag to redirect the user to the target page.\n * - In a Route Handler or Server Action, it will serve a 308/303 to the caller.\n *\n * Read more: [Next.js Docs: `redirect`](https://nextjs.org/docs/app/api-reference/functions/redirect)\n */\nexport function permanentRedirect(\n  /** The URL to redirect to */\n  url: string,\n  type: RedirectType = 'replace'\n): never {\n  throw getRedirectError(url, type, RedirectStatusCode.PermanentRedirect)\n}\n\n/**\n * Returns the encoded URL from the error if it's a RedirectError, null\n * otherwise. Note that this does not validate the URL returned.\n *\n * @param error the error that may be a redirect error\n * @return the url if the error was a redirect error\n */\nexport function getURLFromRedirectError(error: RedirectError): string\nexport function getURLFromRedirectError(error: unknown): string | null {\n  if (!isRedirectError(error)) return null\n\n  // Slices off the beginning of the digest that contains the code and the\n  // separating ';'.\n  return error.digest.split(';').slice(2, -2).join(';')\n}\n\nexport function getRedirectTypeFromError(error: RedirectError): RedirectType {\n  if (!isRedirectError(error)) {\n    throw new Error('Not a redirect error')\n  }\n\n  return error.digest.split(';', 2)[1] as RedirectType\n}\n\nexport function getRedirectStatusCodeFromError(error: RedirectError): number {\n  if (!isRedirectError(error)) {\n    throw new Error('Not a redirect error')\n  }\n\n  return Number(error.digest.split(';').at(-2))\n}\n","import type {\n  FlightRouterState,\n  Segment,\n} from '../../../shared/lib/app-router-types'\nimport { INTERCEPTION_ROUTE_MARKERS } from '../../../shared/lib/router/utils/interception-routes'\nimport type { Params } from '../../../server/request/params'\nimport {\n  isGroupSegment,\n  DEFAULT_SEGMENT_KEY,\n  PAGE_SEGMENT_KEY,\n} from '../../../shared/lib/segment'\nimport { matchSegment } from '../match-segments'\n\nconst removeLeadingSlash = (segment: string): string => {\n  return segment[0] === '/' ? segment.slice(1) : segment\n}\n\nconst segmentToPathname = (segment: Segment): string => {\n  if (typeof segment === 'string') {\n    // 'children' is not a valid path -- it's technically a parallel route that corresponds with the current segment's page\n    // if we don't skip it, then the computed pathname might be something like `/children` which doesn't make sense.\n    if (segment === 'children') return ''\n\n    return segment\n  }\n\n  return segment[1]\n}\n\nconst segmentToSourcePagePathname = (segment: Segment): string => {\n  if (typeof segment === 'string') {\n    if (segment === 'children') return ''\n    if (segment.startsWith(PAGE_SEGMENT_KEY)) return 'page'\n    return segment\n  }\n\n  const [paramName, , dynamicParamType] = segment\n\n  switch (dynamicParamType) {\n    case 'c':\n      return `[...${paramName}]`\n    case 'ci(..)(..)':\n      return `(..)(..)[...${paramName}]`\n    case 'ci(.)':\n      return `(.)[...${paramName}]`\n    case 'ci(..)':\n      return `(..)[...${paramName}]`\n    case 'ci(...)':\n      return `(...)[...${paramName}]`\n    case 'oc':\n      return `[[...${paramName}]]`\n    case 'd':\n      return `[${paramName}]`\n    case 'di(..)(..)':\n      return `(..)(..)[${paramName}]`\n    case 'di(.)':\n      return `(.)[${paramName}]`\n    case 'di(..)':\n      return `(..)[${paramName}]`\n    case 'di(...)':\n      return `(...)[${paramName}]`\n    default:\n      dynamicParamType satisfies never\n      return `[${paramName}]`\n  }\n}\n\nfunction normalizeSegments(segments: string[]): string {\n  return (\n    segments.reduce((acc, segment) => {\n      segment = removeLeadingSlash(segment)\n      if (segment === '' || isGroupSegment(segment)) {\n        return acc\n      }\n\n      return `${acc}/${segment}`\n    }, '') || '/'\n  )\n}\n\nexport function extractPathFromFlightRouterState(\n  flightRouterState: FlightRouterState\n): string | undefined {\n  const segment = Array.isArray(flightRouterState[0])\n    ? flightRouterState[0][1]\n    : flightRouterState[0]\n\n  if (\n    segment === DEFAULT_SEGMENT_KEY ||\n    INTERCEPTION_ROUTE_MARKERS.some((m) => segment.startsWith(m))\n  )\n    return undefined\n\n  if (segment.startsWith(PAGE_SEGMENT_KEY)) return ''\n\n  const segments = [segmentToPathname(segment)]\n  const parallelRoutes = flightRouterState[1] ?? {}\n\n  const childrenPath = parallelRoutes.children\n    ? extractPathFromFlightRouterState(parallelRoutes.children)\n    : undefined\n\n  if (childrenPath !== undefined) {\n    segments.push(childrenPath)\n  } else {\n    for (const [key, value] of Object.entries(parallelRoutes)) {\n      if (key === 'children') continue\n\n      const childPath = extractPathFromFlightRouterState(value)\n\n      if (childPath !== undefined) {\n        segments.push(childPath)\n      }\n    }\n  }\n\n  return normalizeSegments(segments)\n}\n\nfunction extractSourcePageSegmentsFromFlightRouterState(\n  flightRouterState: FlightRouterState\n): string[] | undefined {\n  const segment = segmentToSourcePagePathname(flightRouterState[0])\n\n  if (segment === DEFAULT_SEGMENT_KEY) {\n    return undefined\n  }\n\n  if (segment === 'page') {\n    return [segment]\n  }\n\n  const parallelRoutes = flightRouterState[1] ?? {}\n\n  const childrenPath = parallelRoutes.children\n    ? extractSourcePageSegmentsFromFlightRouterState(parallelRoutes.children)\n    : undefined\n\n  if (childrenPath !== undefined) {\n    return segment === ''\n      ? childrenPath\n      : [removeLeadingSlash(segment), ...childrenPath]\n  }\n\n  for (const [key, value] of Object.entries(parallelRoutes)) {\n    if (key === 'children') continue\n\n    const childPath = extractSourcePageSegmentsFromFlightRouterState(value)\n\n    if (childPath !== undefined) {\n      return segment === ''\n        ? childPath\n        : [removeLeadingSlash(segment), ...childPath]\n    }\n  }\n\n  return undefined\n}\n\nexport function extractSourcePageFromFlightRouterState(\n  flightRouterState: FlightRouterState\n): string | undefined {\n  const sourcePageSegments =\n    extractSourcePageSegmentsFromFlightRouterState(flightRouterState)\n\n  return sourcePageSegments ? `/${sourcePageSegments.join('/')}` : undefined\n}\n\nfunction computeChangedPathImpl(\n  treeA: FlightRouterState,\n  treeB: FlightRouterState\n): string | null {\n  const [segmentA, parallelRoutesA] = treeA\n  const [segmentB, parallelRoutesB] = treeB\n\n  const normalizedSegmentA = segmentToPathname(segmentA)\n  const normalizedSegmentB = segmentToPathname(segmentB)\n\n  if (\n    INTERCEPTION_ROUTE_MARKERS.some(\n      (m) =>\n        normalizedSegmentA.startsWith(m) || normalizedSegmentB.startsWith(m)\n    )\n  ) {\n    return ''\n  }\n\n  if (!matchSegment(segmentA, segmentB)) {\n    // once we find where the tree changed, we compute the rest of the path by traversing the tree\n    return extractPathFromFlightRouterState(treeB) ?? ''\n  }\n\n  for (const parallelRouterKey in parallelRoutesA) {\n    if (parallelRoutesB[parallelRouterKey]) {\n      const changedPath = computeChangedPathImpl(\n        parallelRoutesA[parallelRouterKey],\n        parallelRoutesB[parallelRouterKey]\n      )\n      if (changedPath !== null) {\n        return `${segmentToPathname(segmentB)}/${changedPath}`\n      }\n    }\n  }\n\n  return null\n}\n\nexport function computeChangedPath(\n  treeA: FlightRouterState,\n  treeB: FlightRouterState\n): string | null {\n  const changedPath = computeChangedPathImpl(treeA, treeB)\n\n  if (changedPath == null || changedPath === '/') {\n    return changedPath\n  }\n\n  // lightweight normalization to remove route groups\n  return normalizeSegments(changedPath.split('/'))\n}\n\n/**\n * Recursively extracts dynamic parameters from FlightRouterState.\n */\nexport function getSelectedParams(\n  currentTree: FlightRouterState,\n  params: Params = {}\n): Params {\n  const parallelRoutes = currentTree[1]\n\n  for (const parallelRoute of Object.values(parallelRoutes)) {\n    const segment = parallelRoute[0]\n    const isDynamicParameter = Array.isArray(segment)\n    const segmentValue = isDynamicParameter ? segment[1] : segment\n    if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) continue\n\n    // Ensure catchAll and optional catchall are turned into an array\n    const isCatchAll =\n      isDynamicParameter && (segment[2] === 'c' || segment[2] === 'oc')\n\n    if (isCatchAll) {\n      params[segment[0]] = segment[1].split('/')\n    } else if (isDynamicParameter) {\n      params[segment[0]] = segment[1]\n    }\n\n    params = getSelectedParams(parallelRoute, params)\n  }\n\n  return params\n}\n","export function createHrefFromUrl(\n  url: Pick<URL, 'pathname' | 'search' | 'hash'>,\n  includeHash: boolean = true\n): string {\n  return url.pathname + url.search + (includeHash ? url.hash : '')\n}\n","'use client'\n\n// TODO: Explicitly import from client.browser\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {\n  createFromReadableStream as createFromReadableStreamBrowser,\n  createFromFetch as createFromFetchBrowser,\n} from 'react-server-dom-webpack/client'\n\nimport { InvariantError } from '../../../shared/lib/invariant-error'\nimport type {\n  FlightRouterState,\n  InitialRSCPayload,\n  NavigationFlightResponse,\n} from '../../../shared/lib/app-router-types'\n\nimport {\n  type NEXT_ROUTER_PREFETCH_HEADER,\n  type NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  type NEXT_INSTANT_PREFETCH_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  NEXT_RSC_UNION_QUERY,\n  NEXT_URL,\n  RSC_HEADER,\n  RSC_CONTENT_TYPE_HEADER,\n  NEXT_HMR_REFRESH_HEADER,\n  NEXT_DID_POSTPONE_HEADER,\n  NEXT_HTML_REQUEST_ID_HEADER,\n  NEXT_REQUEST_ID_HEADER,\n} from '../app-router-headers'\nimport { callServer } from '../../app-call-server'\nimport { findSourceMapURL } from '../../app-find-source-map-url'\nimport {\n  normalizeFlightData,\n  prepareFlightRouterStateForRequest,\n  type NormalizedFlightData,\n} from '../../flight-data-helpers'\nimport { setCacheBustingSearchParam } from './set-cache-busting-search-param'\nimport { urlToUrlWithoutFlightMarker } from '../../route-params'\nimport type { NormalizedSearch } from '../segment-cache/cache-key'\nimport { getDeploymentId } from '../../../shared/lib/deployment-id'\nimport { getNavigationBuildId } from '../../navigation-build-id'\nimport { NEXT_NAV_DEPLOYMENT_ID_HEADER } from '../../../lib/constants'\nimport { stripIsPartialByte } from '../segment-cache/cache'\nimport { UnknownDynamicStaleTime } from '../segment-cache/bfcache'\n\nconst createFromReadableStream =\n  createFromReadableStreamBrowser as (typeof import('react-server-dom-webpack/client.browser'))['createFromReadableStream']\nconst createFromFetch =\n  createFromFetchBrowser as (typeof import('react-server-dom-webpack/client.browser'))['createFromFetch']\n\nlet createDebugChannel:\n  | typeof import('../../dev/debug-channel').createDebugChannel\n  | undefined\n\nif (process.env.__NEXT_DEV_SERVER && process.env.__NEXT_REACT_DEBUG_CHANNEL) {\n  createDebugChannel = (\n    require('../../dev/debug-channel') as typeof import('../../dev/debug-channel')\n  ).createDebugChannel\n}\n\nexport interface FetchServerResponseOptions {\n  readonly flightRouterState: FlightRouterState\n  readonly nextUrl: string | null\n  readonly isHmrRefresh?: boolean\n}\n\nexport type StaticStageData<\n  T extends\n    | NavigationFlightResponse\n    | InitialRSCPayload = NavigationFlightResponse,\n> = {\n  readonly response: T\n  readonly isResponsePartial: boolean\n}\n\ntype SpaFetchServerResponseResult = {\n  flightData: NormalizedFlightData[]\n  canonicalUrl: URL\n  renderedSearch: NormalizedSearch\n  couldBeIntercepted: boolean\n  supportsPerSegmentPrefetching: boolean\n  postponed: boolean\n  dynamicStaleTime: number\n  staticStageData: StaticStageData | null\n  runtimePrefetchStream: ReadableStream<Uint8Array> | null\n  responseHeaders: Headers\n  debugInfo: Array<any> | null\n}\n\ntype MpaFetchServerResponseResult = string\n\nexport type FetchServerResponseResult =\n  | MpaFetchServerResponseResult\n  | SpaFetchServerResponseResult\n\nexport type RequestHeaders = {\n  [RSC_HEADER]?: '1'\n  [NEXT_ROUTER_STATE_TREE_HEADER]?: string\n  [NEXT_URL]?: string\n  [NEXT_ROUTER_PREFETCH_HEADER]?: '1' | '2'\n  [NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]?: string\n  'x-deployment-id'?: string\n  [NEXT_HMR_REFRESH_HEADER]?: '1'\n  // A header that is only added in test mode to assert on fetch priority\n  'Next-Test-Fetch-Priority'?: RequestInit['priority']\n  [NEXT_HTML_REQUEST_ID_HEADER]?: string // dev-only\n  [NEXT_REQUEST_ID_HEADER]?: string // dev-only\n  [NEXT_INSTANT_PREFETCH_HEADER]?: '1' // testing API only\n}\n\nfunction doMpaNavigation(url: string): FetchServerResponseResult {\n  return urlToUrlWithoutFlightMarker(new URL(url, location.origin)).toString()\n}\n\nlet isPageUnloading = false\n\nif (typeof window !== 'undefined') {\n  // Track when the page is unloading, e.g. due to reloading the page or\n  // performing hard navigations. This allows us to suppress error logging when\n  // the browser cancels in-flight requests during page unload.\n  window.addEventListener('pagehide', () => {\n    isPageUnloading = true\n  })\n\n  // Reset the flag on pageshow, e.g. when navigating back and the JavaScript\n  // execution context is restored by the browser.\n  window.addEventListener('pageshow', () => {\n    isPageUnloading = false\n  })\n}\n\n/**\n * Fetch the flight data for the provided url. Takes in the current router state\n * to decide what to render server-side.\n */\nexport async function fetchServerResponse(\n  url: URL,\n  options: FetchServerResponseOptions\n): Promise<FetchServerResponseResult> {\n  const { flightRouterState, nextUrl } = options\n\n  const headers: RequestHeaders = {\n    // Enable flight response\n    [RSC_HEADER]: '1',\n    // Provide the current router state\n    [NEXT_ROUTER_STATE_TREE_HEADER]: prepareFlightRouterStateForRequest(\n      flightRouterState,\n      options.isHmrRefresh\n    ),\n  }\n\n  if (process.env.NODE_ENV === 'development' && options.isHmrRefresh) {\n    headers[NEXT_HMR_REFRESH_HEADER] = '1'\n  }\n\n  if (nextUrl) {\n    headers[NEXT_URL] = nextUrl\n  }\n\n  // In static export mode, we need to modify the URL to request the .txt file,\n  // but we should preserve the original URL for the canonical URL and error handling.\n  const originalUrl = url\n\n  try {\n    if (process.env.NODE_ENV === 'production') {\n      if (process.env.__NEXT_CONFIG_OUTPUT === 'export') {\n        // In \"output: export\" mode, we can't rely on headers to distinguish\n        // between HTML and RSC requests. Instead, we append an extra prefix\n        // to the request.\n        url = new URL(url)\n        if (url.pathname.endsWith('/')) {\n          url.pathname += 'index.txt'\n        } else {\n          url.pathname += '.txt'\n        }\n      }\n    }\n\n    // Typically, during a navigation, we decode the response using Flight's\n    // `createFromFetch` API, which accepts a `fetch` promise.\n    // TODO: Remove this check once the old PPR flag is removed\n    const isLegacyPPR =\n      process.env.__NEXT_PPR && !process.env.__NEXT_CACHE_COMPONENTS\n    const shouldImmediatelyDecode = !isLegacyPPR\n    const res = await createFetch<NavigationFlightResponse>(\n      url,\n      headers,\n      'auto',\n      shouldImmediatelyDecode\n    )\n\n    const responseUrl = urlToUrlWithoutFlightMarker(new URL(res.url))\n    const canonicalUrl = res.redirected ? responseUrl : originalUrl\n\n    const contentType = res.headers.get('content-type') || ''\n    const interception = !!res.headers.get('vary')?.includes(NEXT_URL)\n    const postponed = !!res.headers.get(NEXT_DID_POSTPONE_HEADER)\n    let isFlightResponse = contentType.startsWith(RSC_CONTENT_TYPE_HEADER)\n\n    if (process.env.NODE_ENV === 'production') {\n      if (process.env.__NEXT_CONFIG_OUTPUT === 'export') {\n        if (!isFlightResponse) {\n          isFlightResponse = contentType.startsWith('text/plain')\n        }\n      }\n    }\n\n    // If fetch returns something different than flight response handle it like a mpa navigation\n    // If the fetch was not 200, we also handle it like a mpa navigation\n    if (!isFlightResponse || !res.ok || !res.body) {\n      // in case the original URL came with a hash, preserve it before redirecting to the new URL\n      if (url.hash) {\n        responseUrl.hash = url.hash\n      }\n\n      return doMpaNavigation(responseUrl.toString())\n    }\n\n    // We may navigate to a page that requires a different Webpack runtime.\n    // In prod, every page will have the same Webpack runtime.\n    // In dev, the Webpack runtime is minimal for each page.\n    // We need to ensure the Webpack runtime is updated before executing client-side JS of the new page.\n    // TODO: This needs to happen in the Flight Client.\n    // Or Webpack needs to include the runtime update in the Flight response as\n    // a blocking script.\n    if (process.env.NODE_ENV !== 'production' && !process.env.TURBOPACK) {\n      await (\n        require('../../dev/hot-reloader/app/hot-reloader-app') as typeof import('../../dev/hot-reloader/app/hot-reloader-app')\n      ).waitForWebpackRuntimeHotUpdate()\n    }\n\n    let flightResponsePromise = res.flightResponsePromise\n    if (flightResponsePromise === null) {\n      // Typically, `createFetch` would have already started decoding the\n      // Flight response. If it hasn't, though, we need to decode it now.\n      // TODO: This should only be reachable if legacy PPR is enabled (i.e. PPR\n      // without Cache Components). Remove this branch once legacy PPR\n      // is deleted.\n      flightResponsePromise =\n        createFromNextReadableStream<NavigationFlightResponse>(\n          res.body,\n          headers,\n          { allowPartialStream: postponed }\n        )\n    }\n\n    const [flightResponse, cacheData] = await Promise.all([\n      flightResponsePromise,\n      res.cacheData,\n    ])\n\n    if (\n      (res.headers.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ?? flightResponse.b) !==\n      getNavigationBuildId()\n    ) {\n      // The server build does not match the client build.\n      return doMpaNavigation(res.url)\n    }\n\n    const normalizedFlightData = normalizeFlightData(flightResponse.f)\n    if (typeof normalizedFlightData === 'string') {\n      return doMpaNavigation(normalizedFlightData)\n    }\n\n    const staticStageData =\n      cacheData !== null\n        ? await resolveStaticStageData(cacheData, flightResponse, headers)\n        : null\n\n    return {\n      flightData: normalizedFlightData,\n      canonicalUrl: canonicalUrl,\n      // TODO: We should be able to read this from the rewrite header, not the\n      // Flight response. Theoretically they should always agree, but there are\n      // currently some cases where it's incorrect for interception routes. We\n      // can always trust the value in the response body. However, per-segment\n      // prefetch responses don't embed the value in the body; they rely on the\n      // header alone. So we need to investigate why the header is sometimes\n      // wrong for interception routes.\n      renderedSearch: flightResponse.q as NormalizedSearch,\n      couldBeIntercepted: interception,\n      supportsPerSegmentPrefetching: flightResponse.S,\n      postponed,\n      // The dynamicStaleTime is only present in the response body when\n      // a page exports unstable_dynamicStaleTime and this is a dynamic render.\n      // When absent (UnknownDynamicStaleTime), the client falls back to the\n      // global DYNAMIC_STALETIME_MS. The value is in seconds.\n      dynamicStaleTime: flightResponse.d ?? UnknownDynamicStaleTime,\n      staticStageData,\n      runtimePrefetchStream: flightResponse.p ?? null,\n      responseHeaders: res.headers,\n      debugInfo: flightResponsePromise._debugInfo ?? null,\n    }\n  } catch (err) {\n    if (!isPageUnloading) {\n      console.error(\n        `Failed to fetch RSC payload for ${originalUrl}. Falling back to browser navigation.`,\n        err\n      )\n    }\n\n    // If fetch fails handle it like a mpa navigation\n    // TODO-APP: Add a test for the case where a CORS request fails, e.g. external url redirect coming from the response.\n    // See https://github.com/vercel/next.js/issues/43605#issuecomment-1451617521 for a reproduction.\n    return originalUrl.toString()\n  }\n}\n\n// This is a subset of the standard Response type. We use a custom type for\n// this so we can limit which details about the response leak into the rest of\n// the codebase. For example, there's some custom logic for manually following\n// redirects, so \"redirected\" in this type could be a composite of multiple\n// browser fetch calls; however, this fact should not leak to the caller.\nexport type RSCResponse<T> = {\n  ok: boolean\n  redirected: boolean\n  headers: Headers\n  body: ReadableStream<Uint8Array> | null\n  status: number\n  url: string\n  flightResponsePromise: (Promise<T> & { _debugInfo?: Array<any> }) | null\n  cacheData: Promise<FetchResponseCacheData | null>\n}\n\ntype FetchResponseCacheData = {\n  isResponsePartial: boolean\n  responseBodyClone?: ReadableStream<Uint8Array>\n}\n\n/**\n * Strips the leading isPartial byte from an RSC navigation response and\n * clones the body for segment cache extraction.\n *\n * When cache components is enabled, the server prepends a single byte:\n * '~' (0x7e) for partial, '#' (0x23) for complete. This must be stripped\n * before Flight decoding because it's not valid RSC data. The body is\n * cloned before Flight can consume it so the clone is available for later use.\n *\n * When cache components is disabled, returns the original response with\n * cacheData: null.\n */\nexport async function processFetch(response: Response): Promise<{\n  response: Response\n  cacheData: FetchResponseCacheData | null\n}> {\n  if (process.env.__NEXT_CACHE_COMPONENTS) {\n    if (!response.body) {\n      throw new InvariantError(\n        'Expected RSC navigation response to have a body'\n      )\n    }\n\n    const { stream, isPartial } = await stripIsPartialByte(response.body)\n\n    let responseStream: ReadableStream<Uint8Array>\n    let cacheData: FetchResponseCacheData\n\n    if (process.env.__NEXT_EXPERIMENTAL_CACHED_NAVIGATIONS) {\n      const [stream1, stream2] = stream.tee()\n      responseStream = stream1\n      cacheData = { isResponsePartial: isPartial, responseBodyClone: stream2 }\n    } else {\n      responseStream = stream\n      cacheData = { isResponsePartial: isPartial }\n    }\n\n    const strippedResponse = new Response(responseStream, {\n      headers: response.headers,\n      status: response.status,\n      statusText: response.statusText,\n    })\n\n    // The Response constructor doesn't preserve `url` or `redirected` from\n    // the original. We need both: `url` for React DevTools and `redirected`\n    // for the redirect replay logic below.\n    Object.defineProperty(strippedResponse, 'url', { value: response.url })\n    Object.defineProperty(strippedResponse, 'redirected', {\n      value: response.redirected,\n    })\n\n    return { response: strippedResponse, cacheData }\n  }\n\n  return { response, cacheData: null }\n}\n\n/**\n * Resolves the static stage response from the raw `processFetch` outputs and\n * the decoded flight response, for writing into the segment cache.\n *\n * - Fully static: use the decoded flight response as-is, no truncation needed.\n * - Not fully static + `l` field: truncate the body clone at the static stage\n *   byte boundary and decode.\n * - Otherwise: no cache-worthy data.\n */\nexport async function resolveStaticStageData<\n  T extends NavigationFlightResponse | InitialRSCPayload,\n>(\n  cacheData: FetchResponseCacheData,\n  flightResponse: T,\n  headers: RequestHeaders | undefined\n): Promise<StaticStageData<T> | null> {\n  const { isResponsePartial, responseBodyClone } = cacheData\n\n  if (responseBodyClone) {\n    if (!isResponsePartial) {\n      // Fully static — cache the entire decoded response as-is.\n      responseBodyClone.cancel()\n\n      return { response: flightResponse, isResponsePartial: false }\n    }\n\n    if (flightResponse.l !== undefined) {\n      // Partially static — truncate the body clone at the byte boundary and\n      // decode it.\n      const response = await decodeStaticStage<T>(\n        responseBodyClone,\n        flightResponse.l,\n        headers\n      )\n\n      return { response, isResponsePartial: true }\n    }\n\n    // No caching — cancel the unused clone.\n    responseBodyClone.cancel()\n  }\n\n  return null\n}\n\n/**\n * Truncates a Flight stream clone at the given byte boundary and decodes the\n * static stage prefix. Used by both the navigation path and the initial HTML\n * hydration path.\n */\nexport async function decodeStaticStage<T>(\n  responseBodyClone: ReadableStream<Uint8Array>,\n  staticStageByteLengthPromise: Promise<number>,\n  headers: RequestHeaders | undefined\n): Promise<T> {\n  const staticStageByteLength = await staticStageByteLengthPromise\n\n  const truncatedStream = truncateStream(\n    responseBodyClone,\n    staticStageByteLength\n  )\n\n  return createFromNextReadableStream<T>(truncatedStream, headers, {\n    allowPartialStream: true,\n  })\n}\n\nexport async function createFetch<T>(\n  url: URL,\n  headers: RequestHeaders,\n  fetchPriority: 'auto' | 'high' | 'low' | null,\n  shouldImmediatelyDecode: boolean,\n  signal?: AbortSignal\n): Promise<RSCResponse<T>> {\n  // TODO: In output: \"export\" mode, the headers do nothing. Omit them (and the\n  // cache busting search param) from the request so they're\n  // maximally cacheable.\n\n  if (process.env.__NEXT_TEST_MODE && fetchPriority !== null) {\n    headers['Next-Test-Fetch-Priority'] = fetchPriority\n  }\n\n  const deploymentId = getDeploymentId()\n  if (deploymentId) {\n    headers['x-deployment-id'] = deploymentId\n  }\n\n  if (process.env.__NEXT_DEV_SERVER) {\n    if (self.__next_r) {\n      headers[NEXT_HTML_REQUEST_ID_HEADER] = self.__next_r\n    }\n\n    // Create a new request ID for the server action request. The server uses\n    // this to tag debug information sent via WebSocket to the client, which\n    // then routes those chunks to the debug channel associated with this ID.\n    headers[NEXT_REQUEST_ID_HEADER] = crypto\n      .getRandomValues(new Uint32Array(1))[0]\n      .toString(16)\n  }\n\n  const fetchOptions: RequestInit = {\n    // Backwards compat for older browsers. `same-origin` is the default in modern browsers.\n    credentials: 'same-origin',\n    headers,\n    priority: fetchPriority || undefined,\n    signal,\n  }\n  // `fetchUrl` is slightly different from `url` because we add a cache-busting\n  // search param to it. This should not leak outside of this function, so we\n  // track them separately.\n  let fetchUrl = new URL(url)\n  setCacheBustingSearchParam(fetchUrl, headers)\n  let processed = fetch(fetchUrl, fetchOptions).then(processFetch)\n  let fetchPromise = processed.then(({ response }) => response)\n\n  // Immediately pass the fetch promise to the Flight client so that the debug\n  // info includes the latency from the client to the server. The internal timer\n  // in React starts as soon as `createFromFetch` is called.\n  //\n  // The only case where we don't do this is during a prefetch, because a\n  // top-level prefetch response never blocks a navigation; if it hasn't already\n  // been written into the cache by the time the navigation happens, the router\n  // will go straight to a dynamic request.\n  let flightResponsePromise = shouldImmediatelyDecode\n    ? createFromNextFetch<T>(fetchPromise, headers)\n    : null\n  let browserResponse = await fetchPromise\n\n  // If the server responds with a redirect (e.g. 307), and the redirected\n  // location does not contain the cache busting search param set in the\n  // original request, the response is likely invalid — when following the\n  // redirect, the browser forwards the request headers, but since the cache\n  // busting search param is missing, the server will reject the request due to\n  // a mismatch.\n  //\n  // Ideally, we would be able to intercept the redirect response and perform it\n  // manually, instead of letting the browser automatically follow it, but this\n  // is not allowed by the fetch API.\n  //\n  // So instead, we must \"replay\" the redirect by fetching the new location\n  // again, but this time we'll append the cache busting search param to prevent\n  // a mismatch.\n  //\n  // TODO: We can optimize Next.js's built-in middleware APIs by returning a\n  // custom status code, to prevent the browser from automatically following it.\n  //\n  // This does not affect Server Action-based redirects; those are encoded\n  // differently, as part of the Flight body. It only affects redirects that\n  // occur in a middleware or a third-party proxy.\n\n  let redirected = browserResponse.redirected\n  if (process.env.__NEXT_CLIENT_VALIDATE_RSC_REQUEST_HEADERS) {\n    // This is to prevent a redirect loop. Same limit used by Chrome.\n    const MAX_REDIRECTS = 20\n    for (let n = 0; n < MAX_REDIRECTS; n++) {\n      if (!browserResponse.redirected) {\n        // The server did not perform a redirect.\n        break\n      }\n      const responseUrl = new URL(browserResponse.url, fetchUrl)\n      if (responseUrl.origin !== fetchUrl.origin) {\n        // The server redirected to an external URL. The rest of the logic below\n        // is not relevant, because it only applies to internal redirects.\n        break\n      }\n      if (\n        responseUrl.searchParams.get(NEXT_RSC_UNION_QUERY) ===\n        fetchUrl.searchParams.get(NEXT_RSC_UNION_QUERY)\n      ) {\n        // The redirected URL already includes the cache busting search param.\n        // This was probably intentional. Regardless, there's no reason to\n        // issue another request to this URL because it already has the param\n        // value that we would have added below.\n        break\n      }\n      // The RSC request was redirected. Assume the response is invalid.\n      //\n      // Append the cache busting search param to the redirected URL and\n      // fetch again.\n      // TODO: We should abort the previous request.\n      fetchUrl = new URL(responseUrl)\n      setCacheBustingSearchParam(fetchUrl, headers)\n      processed = fetch(fetchUrl, fetchOptions).then(processFetch)\n      fetchPromise = processed.then(({ response }) => response)\n      flightResponsePromise = shouldImmediatelyDecode\n        ? createFromNextFetch<T>(fetchPromise, headers)\n        : null\n      browserResponse = await fetchPromise\n      // We just performed a manual redirect, so this is now true.\n      redirected = true\n    }\n  }\n\n  // Remove the cache busting search param from the response URL, to prevent it\n  // from leaking outside of this function.\n  const responseUrl = new URL(browserResponse.url, fetchUrl)\n  responseUrl.searchParams.delete(NEXT_RSC_UNION_QUERY)\n\n  const rscResponse: RSCResponse<T> = {\n    url: responseUrl.href,\n\n    // This is true if any redirects occurred, either automatically by the\n    // browser, or manually by us. So it's different from\n    // `browserResponse.redirected`, which only tells us whether the browser\n    // followed a redirect, and only for the last response in the chain.\n    redirected,\n\n    // These can be copied from the last browser response we received. We\n    // intentionally only expose the subset of fields that are actually used\n    // elsewhere in the codebase.\n    ok: browserResponse.ok,\n    headers: browserResponse.headers,\n    body: browserResponse.body,\n    status: browserResponse.status,\n\n    // This is the exact promise returned by `createFromFetch`. It contains\n    // debug information that we need to transfer to any derived promises that\n    // are later rendered by React.\n    flightResponsePromise: flightResponsePromise,\n\n    cacheData: processed.then(({ cacheData }) => cacheData),\n  }\n\n  return rscResponse\n}\n\nexport function createFromNextReadableStream<T>(\n  flightStream: ReadableStream<Uint8Array>,\n  requestHeaders: RequestHeaders | undefined,\n  options?: { allowPartialStream?: boolean }\n): Promise<T> {\n  return createFromReadableStream(flightStream, {\n    callServer,\n    findSourceMapURL,\n    debugChannel: createDebugChannel && createDebugChannel(requestHeaders),\n    unstable_allowPartialStream: options?.allowPartialStream,\n  })\n}\n\nfunction createFromNextFetch<T>(\n  promiseForResponse: Promise<Response>,\n  requestHeaders: RequestHeaders\n): Promise<T> & { _debugInfo?: Array<any> } {\n  return createFromFetch(promiseForResponse, {\n    callServer,\n    findSourceMapURL,\n    debugChannel: createDebugChannel && createDebugChannel(requestHeaders),\n  })\n}\n\nfunction truncateStream(\n  stream: ReadableStream<Uint8Array>,\n  byteLength: number\n): ReadableStream<Uint8Array> {\n  const reader = stream.getReader()\n  let remaining = byteLength\n\n  return new ReadableStream({\n    async pull(controller) {\n      if (remaining <= 0) {\n        reader.cancel()\n        controller.close()\n        return\n      }\n\n      const { done, value } = await reader.read()\n\n      if (done) {\n        controller.close()\n        return\n      }\n\n      if (value.byteLength <= remaining) {\n        controller.enqueue(value)\n        remaining -= value.byteLength\n      } else {\n        controller.enqueue(value.subarray(0, remaining))\n        remaining = 0\n        reader.cancel()\n        controller.close()\n      }\n    },\n    cancel() {\n      reader.cancel()\n    },\n  })\n}\n","import type {\n  CacheNodeSeedData,\n  FlightRouterState,\n  Segment,\n} from '../../../shared/lib/app-router-types'\nimport type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type { HeadData, ScrollRef } from '../../../shared/lib/app-router-types'\nimport { PrefetchHint } from '../../../shared/lib/app-router-types'\nimport {\n  PAGE_SEGMENT_KEY,\n  DEFAULT_SEGMENT_KEY,\n  NOT_FOUND_SEGMENT_KEY,\n} from '../../../shared/lib/segment'\nimport { matchSegment } from '../match-segments'\nimport { createHrefFromUrl } from './create-href-from-url'\nimport { fetchServerResponse } from './fetch-server-response'\nimport { dispatchAppRouterAction } from '../use-action-queue'\nimport {\n  ACTION_SERVER_PATCH,\n  type ServerPatchAction,\n} from './router-reducer-types'\nimport { isNavigatingToNewRootLayout } from './is-navigating-to-new-root-layout'\nimport { getLastCommittedTree } from './reducers/committed-state'\nimport {\n  convertServerPatchToFullTree,\n  type NavigationSeed,\n} from '../segment-cache/navigation'\nimport {\n  type RouteTree,\n  type RefreshState,\n  type FulfilledRouteCacheEntry,\n  convertReusedFlightRouterStateToRouteTree,\n  readSegmentCacheEntry,\n  waitForSegmentCacheEntry,\n  markRouteEntryAsDynamicRewrite,\n  invalidateRouteCacheEntries,\n  getStaleAt,\n  writeStaticStageResponseIntoCache,\n  processRuntimePrefetchStream,\n  writeDynamicRenderResponseIntoCache,\n  EntryStatus,\n} from '../segment-cache/cache'\nimport { FetchStrategy } from '../segment-cache/types'\nimport { discoverKnownRoute } from '../segment-cache/optimistic-routes'\nimport { NEXT_NAV_DEPLOYMENT_ID_HEADER } from '../../../lib/constants'\nimport type { NormalizedSearch } from '../segment-cache/cache-key'\nimport {\n  getRenderedSearchFromVaryPath,\n  type PageVaryPath,\n} from '../segment-cache/vary-path'\nimport {\n  readFromBFCache,\n  readFromBFCacheDuringRegularNavigation,\n  writeToBFCache,\n  writeHeadToBFCache,\n  updateBFCacheEntryStaleAt,\n  computeDynamicStaleAt,\n} from '../segment-cache/bfcache'\n\n// This is yet another tree type that is used to track pending promises that\n// need to be fulfilled once the dynamic data is received. The terminal nodes of\n// this tree represent the new Cache Node trees that were created during this\n// request. We can't use the Cache Node tree or Route State tree directly\n// because those include reused nodes, too. This tree is discarded as soon as\n// the navigation response is received.\nexport type NavigationTask = {\n  status: NavigationTaskStatus\n  // The router state that corresponds to the tree that this Task represents.\n  route: FlightRouterState\n  // The CacheNode that corresponds to the tree that this Task represents.\n  node: CacheNode\n  // The tree sent to the server during the dynamic request. If all the segments\n  // are static, then this will be null, and no server request is required.\n  // Otherwise, this is the same as `route`, except with the `refetch` marker\n  // set on the top-most segment that needs to be fetched.\n  dynamicRequestTree: FlightRouterState | null\n  // The URL that should be used to fetch the dynamic data. This is only set\n  // when the segment cannot be refetched from the current route, because it's\n  // part of a \"default\" parallel slot that was reused during a navigation.\n  refreshState: RefreshState | null\n  children: Map<string, NavigationTask> | null\n}\n\nexport const enum FreshnessPolicy {\n  Default,\n  Hydration,\n  HistoryTraversal,\n  RefreshAll,\n  HMRRefresh,\n  Gesture,\n}\n\nconst enum NavigationTaskStatus {\n  Pending,\n  Fulfilled,\n  Rejected,\n}\n\n/**\n * When a NavigationTask finishes, there may or may not be data still missing,\n * necessitating a retry.\n */\nconst enum NavigationTaskExitStatus {\n  /**\n   * No additional navigation is required.\n   */\n  Done = 0,\n  /**\n   * Some data failed to load, presumably due to a route tree mismatch. Perform\n   * a soft retry to reload the entire tree.\n   */\n  SoftRetry = 1,\n  /**\n   * Some data failed to load in an unrecoverable way, e.g. in an inactive\n   * parallel route. Fall back to a hard (MPA-style) retry.\n   */\n  HardRetry = 2,\n}\n\nexport type NavigationRequestAccumulation = {\n  separateRefreshUrls: Set<string> | null\n  /**\n   * Set when a navigation creates new leaf segments that should be\n   * scrolled to. Stays null when no new segments are created (e.g.\n   * during a refresh where the route structure didn't change).\n   */\n  scrollRef: ScrollRef | null\n}\n\nconst noop = () => {}\n\nexport function createInitialCacheNodeForHydration(\n  navigatedAt: number,\n  initialTree: RouteTree,\n  seedData: CacheNodeSeedData | null,\n  seedHead: HeadData,\n  seedDynamicStaleAt: number\n): NavigationTask {\n  // Create the initial cache node tree, using the data embedded into the\n  // HTML document.\n  const accumulation: NavigationRequestAccumulation = {\n    separateRefreshUrls: null,\n    scrollRef: null,\n  }\n  const task = createCacheNodeOnNavigation(\n    navigatedAt,\n    initialTree,\n    null,\n    FreshnessPolicy.Hydration,\n    seedData,\n    seedHead,\n    seedDynamicStaleAt,\n    false,\n    accumulation\n  )\n  return task\n}\n\n// Creates a new Cache Node tree (i.e. copy-on-write) that represents the\n// optimistic result of a navigation, using both the current Cache Node tree and\n// data that was prefetched prior to navigation.\n//\n// At the moment we call this function, we haven't yet received the navigation\n// response from the server. It could send back something completely different\n// from the tree that was prefetched — due to rewrites, default routes, parallel\n// routes, etc.\n//\n// But in most cases, it will return the same tree that we prefetched, just with\n// the dynamic holes filled in. So we optimistically assume this will happen,\n// and accept that the real result could be arbitrarily different.\n//\n// We'll reuse anything that was already in the previous tree, since that's what\n// the server does.\n//\n// New segments (ones that don't appear in the old tree) are assigned an\n// unresolved promise. The data for these promises will be fulfilled later, when\n// the navigation response is received.\n//\n// The tree can be rendered immediately after it is created (that's why this is\n// a synchronous function). Any new trees that do not have prefetch data will\n// suspend during rendering, until the dynamic data streams in.\n//\n// Returns a Task object, which contains both the updated Cache Node and a path\n// to the pending subtrees that need to be resolved by the navigation response.\n//\n// A return value of `null` means there were no changes, and the previous tree\n// can be reused without initiating a server request.\nexport function startPPRNavigation(\n  navigatedAt: number,\n  oldUrl: URL,\n  oldRenderedSearch: string,\n  oldCacheNode: CacheNode | null,\n  oldRouterState: FlightRouterState,\n  newRouteTree: RouteTree,\n  newMetadataVaryPath: PageVaryPath | null,\n  freshness: FreshnessPolicy,\n  seedData: CacheNodeSeedData | null,\n  seedHead: HeadData | null,\n  seedDynamicStaleAt: number,\n  isSamePageNavigation: boolean,\n  accumulation: NavigationRequestAccumulation\n): NavigationTask | null {\n  const didFindRootLayout = false\n  const parentNeedsDynamicRequest = false\n  const parentRefreshState = null\n  const oldRootRefreshState: RefreshState = {\n    canonicalUrl: createHrefFromUrl(oldUrl),\n    renderedSearch: oldRenderedSearch as NormalizedSearch,\n  }\n  return updateCacheNodeOnNavigation(\n    navigatedAt,\n    oldUrl,\n    oldCacheNode !== null ? oldCacheNode : undefined,\n    oldRouterState,\n    newRouteTree,\n    newMetadataVaryPath,\n    freshness,\n    didFindRootLayout,\n    seedData,\n    seedHead,\n    seedDynamicStaleAt,\n    isSamePageNavigation,\n    parentNeedsDynamicRequest,\n    oldRootRefreshState,\n    parentRefreshState,\n    accumulation\n  )\n}\n\nfunction updateCacheNodeOnNavigation(\n  navigatedAt: number,\n  oldUrl: URL,\n  oldCacheNode: CacheNode | void,\n  oldRouterState: FlightRouterState,\n  newRouteTree: RouteTree,\n  newMetadataVaryPath: PageVaryPath | null,\n  freshness: FreshnessPolicy,\n  didFindRootLayout: boolean,\n  seedData: CacheNodeSeedData | null,\n  seedHead: HeadData | null,\n  seedDynamicStaleAt: number,\n  isSamePageNavigation: boolean,\n  parentNeedsDynamicRequest: boolean,\n  oldRootRefreshState: RefreshState,\n  parentRefreshState: RefreshState | null,\n  accumulation: NavigationRequestAccumulation\n): NavigationTask | null {\n  // Check if this segment matches the one in the previous route.\n  const oldSegment = oldRouterState[0]\n  const newSegment = createSegmentFromRouteTree(newRouteTree)\n  if (!matchSegment(newSegment, oldSegment)) {\n    // This segment does not match the previous route. We're now entering the\n    // new part of the target route. Switch to the \"create\" path.\n    if (\n      // Check if the route tree changed before we reached a layout. (The\n      // highest-level layout in a route tree is referred to as the \"root\"\n      // layout.) This could mean that we're navigating between two different\n      // root layouts. When this happens, we perform a full-page (MPA-style)\n      // navigation.\n      //\n      // However, the algorithm for deciding where to start rendering a route\n      // (i.e. the one performed in order to reach this function) is stricter\n      // than the one used to detect a change in the root layout. So just\n      // because we're re-rendering a segment outside of the root layout does\n      // not mean we should trigger a full-page navigation.\n      //\n      // Specifically, we handle dynamic parameters differently: two segments\n      // are considered the same even if their parameter values are different.\n      //\n      // Refer to isNavigatingToNewRootLayout for details.\n      //\n      // Note that we only have to perform this extra traversal if we didn't\n      // already discover a root layout in the part of the tree that is\n      // unchanged. We also only need to compare the subtree that is not\n      // shared. In the common case, this branch is skipped completely.\n      (!didFindRootLayout &&\n        isNavigatingToNewRootLayout(oldRouterState, newRouteTree)) ||\n      // The global Not Found route (app/global-not-found.tsx) is a special\n      // case, because it acts like a root layout, but in the router tree, it\n      // is rendered in the same position as app/layout.tsx.\n      //\n      // Any navigation to the global Not Found route should trigger a\n      // full-page navigation.\n      //\n      // TODO: We should probably model this by changing the key of the root\n      // segment when this happens. Then the root layout check would work\n      // as expected, without a special case.\n      newSegment === NOT_FOUND_SEGMENT_KEY\n    ) {\n      return null\n    }\n    return createCacheNodeOnNavigation(\n      navigatedAt,\n      newRouteTree,\n      newMetadataVaryPath,\n      freshness,\n      seedData,\n      seedHead,\n      seedDynamicStaleAt,\n      parentNeedsDynamicRequest,\n      accumulation\n    )\n  }\n\n  const newSlots = newRouteTree.slots\n  const oldRouterStateChildren = oldRouterState[1]\n  const seedDataChildren = seedData !== null ? seedData[1] : null\n\n  // We're currently traversing the part of the tree that was also part of\n  // the previous route. If we discover a root layout, then we don't need to\n  // trigger an MPA navigation.\n  const childDidFindRootLayout =\n    didFindRootLayout ||\n    (newRouteTree.prefetchHints & PrefetchHint.IsRootLayout) !== 0\n\n  let shouldRefreshDynamicData: boolean = false\n  switch (freshness) {\n    case FreshnessPolicy.Default:\n    case FreshnessPolicy.HistoryTraversal:\n    case FreshnessPolicy.Hydration:\n    case FreshnessPolicy.Gesture:\n      shouldRefreshDynamicData = false\n      break\n    case FreshnessPolicy.RefreshAll:\n    case FreshnessPolicy.HMRRefresh:\n      shouldRefreshDynamicData = true\n      break\n    default:\n      freshness satisfies never\n      break\n  }\n\n  // TODO: We're not consistent about how we do this check. Some places\n  // check if the segment starts with PAGE_SEGMENT_KEY, but most seem to\n  // check if there any any children, which is why I'm doing it here. We\n  // should probably encode an empty children set as `null` though. Either\n  // way, we should update all the checks to be consistent.\n  const isLeafSegment = newSlots === null\n\n  // Get the data for this segment. Since it was part of the previous route,\n  // usually we just clone the data from the old CacheNode. However, during a\n  // refresh or a revalidation, there won't be any existing CacheNode. So we\n  // may need to consult the prefetch cache, like we would for a new segment.\n  let newCacheNode: CacheNode\n  let needsDynamicRequest: boolean\n  if (\n    oldCacheNode !== undefined &&\n    !shouldRefreshDynamicData &&\n    // During a same-page navigation, we always refetch the page segments\n    !(isLeafSegment && isSamePageNavigation)\n  ) {\n    // Reuse the existing CacheNode\n    const dropPrefetchRsc = false\n    newCacheNode = reuseSharedCacheNode(dropPrefetchRsc, oldCacheNode)\n    needsDynamicRequest = false\n  } else {\n    // If this is part of a refresh, ignore the existing CacheNode and create a\n    // new one.\n    const seedRsc = seedData !== null ? seedData[0] : null\n    const result = createCacheNodeForSegment(\n      navigatedAt,\n      newRouteTree,\n      seedRsc,\n      newMetadataVaryPath,\n      seedHead,\n      freshness,\n      seedDynamicStaleAt\n    )\n    newCacheNode = result.cacheNode\n    needsDynamicRequest = result.needsDynamicRequest\n\n    // Carry forward the old node's scrollRef. This preserves scroll\n    // intent when a prior navigation's cache node is replaced by a\n    // refresh before the scroll handler has had a chance to fire —\n    // e.g. when router.push() and router.refresh() are called in the\n    // same startTransition batch.\n    if (oldCacheNode !== undefined) {\n      newCacheNode.scrollRef = oldCacheNode.scrollRef\n    }\n  }\n\n  // During a refresh navigation, there's a special case that happens when\n  // entering a \"default\" slot. The default slot may not be part of the\n  // current route; it may have been reused from an older route. If so,\n  // we need to fetch its data from the old route's URL rather than current\n  // route's URL. Keep track of this as we traverse the tree.\n  const maybeRefreshState = newRouteTree.refreshState\n  const refreshState =\n    maybeRefreshState !== undefined && maybeRefreshState !== null\n      ? // This segment is not present in the current route. Track its\n        // refresh URL as we continue traversing the tree.\n        maybeRefreshState\n      : // Inherit the refresh URL from the parent.\n        parentRefreshState\n\n  // If this segment itself needs to fetch new data from the server, then by\n  // definition it is being refreshed. Track its refresh URL so we know which\n  // URL to request the data from.\n  if (needsDynamicRequest && refreshState !== null) {\n    accumulateRefreshUrl(accumulation, refreshState)\n  }\n\n  // As we diff the trees, we may sometimes modify (copy-on-write, not mutate)\n  // the Route Tree that was returned by the server — for example, in the case\n  // of default parallel routes, we preserve the currently active segment. To\n  // avoid mutating the original tree, we clone the router state children along\n  // the return path.\n  let patchedRouterStateChildren: {\n    [parallelRouteKey: string]: FlightRouterState\n  } = {}\n  let taskChildren = null\n\n  // Most navigations require a request to fetch additional data from the\n  // server, either because the data was not already prefetched, or because the\n  // target route contains dynamic data that cannot be prefetched.\n  //\n  // However, if the target route is fully static, and it's already completely\n  // loaded into the segment cache, then we can skip the server request.\n  //\n  // This starts off as `false`, and is set to `true` if any of the child\n  // routes requires a dynamic request.\n  let childNeedsDynamicRequest = false\n  // As we traverse the children, we'll construct a FlightRouterState that can\n  // be sent to the server to request the dynamic data. If it turns out that\n  // nothing in the subtree is dynamic (i.e. childNeedsDynamicRequest is false\n  // at the end), then this will be discarded.\n  // TODO: We can probably optimize the format of this data structure to only\n  // include paths that are dynamic. Instead of reusing the\n  // FlightRouterState type.\n  let dynamicRequestTreeChildren: {\n    [parallelRouteKey: string]: FlightRouterState\n  } = {}\n\n  let newCacheNodeSlots: Record<string, CacheNode> | null = null\n  if (newSlots !== null) {\n    const oldCacheNodeSlots =\n      oldCacheNode !== undefined ? oldCacheNode.slots : null\n\n    newCacheNode.slots = newCacheNodeSlots = {}\n    taskChildren = new Map()\n    for (let parallelRouteKey in newSlots) {\n      let newRouteTreeChild: RouteTree = newSlots[parallelRouteKey]\n      const oldRouterStateChild: FlightRouterState | void =\n        oldRouterStateChildren[parallelRouteKey]\n      if (oldRouterStateChild === undefined) {\n        // This should never happen, but if it does, it suggests a malformed\n        // server response. Trigger a full-page navigation.\n        return null\n      }\n\n      let seedDataChild: CacheNodeSeedData | void | null =\n        seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n\n      const oldSegmentChild = oldRouterStateChild[0]\n      let newSegmentChild = createSegmentFromRouteTree(newRouteTreeChild)\n      let seedHeadChild = seedHead\n      if (\n        // Skip this branch during a history traversal. We restore the tree that\n        // was stashed in the history entry as-is.\n        freshness !== FreshnessPolicy.HistoryTraversal &&\n        newSegmentChild === DEFAULT_SEGMENT_KEY &&\n        oldSegmentChild !== DEFAULT_SEGMENT_KEY\n      ) {\n        // This is a \"default\" segment. These are never sent by the server during\n        // a soft navigation; instead, the client reuses whatever segment was\n        // already active in that slot on the previous route.\n        newRouteTreeChild = reuseActiveSegmentInDefaultSlot(\n          newRouteTree,\n          parallelRouteKey,\n          oldRootRefreshState,\n          oldRouterStateChild\n        )\n        newSegmentChild = createSegmentFromRouteTree(newRouteTreeChild)\n\n        // Since we're switching to a different route tree, these are no\n        // longer valid, because they correspond to the outer tree.\n        seedDataChild = null\n        seedHeadChild = null\n      }\n\n      const oldCacheNodeChild =\n        oldCacheNodeSlots !== null\n          ? oldCacheNodeSlots[parallelRouteKey]\n          : undefined\n\n      const taskChild = updateCacheNodeOnNavigation(\n        navigatedAt,\n        oldUrl,\n        oldCacheNodeChild,\n        oldRouterStateChild,\n        newRouteTreeChild,\n        newMetadataVaryPath,\n        freshness,\n        childDidFindRootLayout,\n        seedDataChild ?? null,\n        seedHeadChild,\n        seedDynamicStaleAt,\n        isSamePageNavigation,\n        parentNeedsDynamicRequest || needsDynamicRequest,\n        oldRootRefreshState,\n        refreshState,\n        accumulation\n      )\n\n      if (taskChild === null) {\n        // One of the child tasks discovered a change to the root layout.\n        // Immediately unwind from this recursive traversal. This will trigger a\n        // full-page navigation.\n        return null\n      }\n\n      // Recursively propagate up the child tasks.\n      taskChildren.set(parallelRouteKey, taskChild)\n      newCacheNodeSlots[parallelRouteKey] = taskChild.node\n\n      // The child tree's route state may be different from the prefetched\n      // route sent by the server. We need to clone it as we traverse back up\n      // the tree.\n      const taskChildRoute = taskChild.route\n      patchedRouterStateChildren[parallelRouteKey] = taskChildRoute\n\n      const dynamicRequestTreeChild = taskChild.dynamicRequestTree\n      if (dynamicRequestTreeChild !== null) {\n        // Something in the child tree is dynamic.\n        childNeedsDynamicRequest = true\n        dynamicRequestTreeChildren[parallelRouteKey] = dynamicRequestTreeChild\n      } else {\n        dynamicRequestTreeChildren[parallelRouteKey] = taskChildRoute\n      }\n    }\n  }\n\n  const newFlightRouterState: FlightRouterState = [\n    createSegmentFromRouteTree(newRouteTree),\n    patchedRouterStateChildren,\n    refreshState !== null\n      ? [refreshState.canonicalUrl, refreshState.renderedSearch]\n      : null,\n    null,\n    newRouteTree.prefetchHints,\n  ]\n\n  return {\n    status: needsDynamicRequest\n      ? NavigationTaskStatus.Pending\n      : NavigationTaskStatus.Fulfilled,\n    route: newFlightRouterState,\n    node: newCacheNode,\n    dynamicRequestTree: createDynamicRequestTree(\n      newFlightRouterState,\n      dynamicRequestTreeChildren,\n      needsDynamicRequest,\n      childNeedsDynamicRequest,\n      parentNeedsDynamicRequest\n    ),\n    refreshState,\n    children: taskChildren,\n  }\n}\n\n/**\n * Assigns a ScrollRef to a new leaf CacheNode so the scroll handler\n * knows to scroll to it after navigation. All leaves in the same\n * navigation share the same ScrollRef — the first segment to scroll\n * consumes it, preventing others from also scrolling.\n *\n * This is only called inside `createCacheNodeOnNavigation`, which only\n * runs when segments diverge from the previous route. So for a refresh\n * where the route structure stays the same, segments match, the update\n * path is taken, and this function is never called — no scroll ref is\n * assigned. A scroll ref is only assigned when the route actually\n * changed (e.g. a redirect, or a dynamic condition on the server that\n * produces a different route).\n *\n * Skipped during hydration (initial render should not scroll) and\n * history traversal (scroll restoration is handled separately).\n */\nfunction accumulateScrollRef(\n  freshness: FreshnessPolicy,\n  cacheNode: CacheNode,\n  accumulation: NavigationRequestAccumulation\n): void {\n  switch (freshness) {\n    case FreshnessPolicy.Default:\n    case FreshnessPolicy.Gesture:\n    case FreshnessPolicy.RefreshAll:\n    case FreshnessPolicy.HMRRefresh:\n      if (accumulation.scrollRef === null) {\n        accumulation.scrollRef = { current: true }\n      }\n      cacheNode.scrollRef = accumulation.scrollRef\n      break\n    case FreshnessPolicy.Hydration:\n      // Initial render — no scroll.\n      break\n    case FreshnessPolicy.HistoryTraversal:\n      // Back/forward — scroll restoration is handled separately.\n      break\n    default:\n      freshness satisfies never\n      break\n  }\n}\n\nfunction createCacheNodeOnNavigation(\n  navigatedAt: number,\n  newRouteTree: RouteTree,\n  newMetadataVaryPath: PageVaryPath | null,\n  freshness: FreshnessPolicy,\n  seedData: CacheNodeSeedData | null,\n  seedHead: HeadData | null,\n  seedDynamicStaleAt: number,\n  parentNeedsDynamicRequest: boolean,\n  accumulation: NavigationRequestAccumulation\n): NavigationTask {\n  // Same traversal as updateCacheNodeNavigation, but simpler. We switch to this\n  // path once we reach the part of the tree that was not in the previous route.\n  // We don't need to diff against the old tree, we just need to create a new\n  // one. We also don't need to worry about any refresh-related logic.\n  //\n  // For the most part, this is a subset of updateCacheNodeOnNavigation, so any\n  // change that happens in this function likely needs to be applied to that\n  // one, too. However there are some places where the behavior intentionally\n  // diverges, which is why we keep them separate.\n\n  const newSegment = createSegmentFromRouteTree(newRouteTree)\n\n  const newSlots = newRouteTree.slots\n  const seedDataChildren = seedData !== null ? seedData[1] : null\n\n  const seedRsc = seedData !== null ? seedData[0] : null\n  const result = createCacheNodeForSegment(\n    navigatedAt,\n    newRouteTree,\n    seedRsc,\n    newMetadataVaryPath,\n    seedHead,\n    freshness,\n    seedDynamicStaleAt\n  )\n  const newCacheNode = result.cacheNode\n  const needsDynamicRequest = result.needsDynamicRequest\n\n  const isLeafSegment = newSlots === null\n  if (isLeafSegment) {\n    accumulateScrollRef(freshness, newCacheNode, accumulation)\n  }\n\n  let patchedRouterStateChildren: {\n    [parallelRouteKey: string]: FlightRouterState\n  } = {}\n  let taskChildren = null\n\n  let childNeedsDynamicRequest = false\n  let dynamicRequestTreeChildren: {\n    [parallelRouteKey: string]: FlightRouterState\n  } = {}\n\n  let newCacheNodeSlots: Record<string, CacheNode> | null = null\n  if (newSlots !== null) {\n    newCacheNode.slots = newCacheNodeSlots = {}\n    taskChildren = new Map()\n    for (let parallelRouteKey in newSlots) {\n      const newRouteTreeChild: RouteTree = newSlots[parallelRouteKey]\n      const seedDataChild: CacheNodeSeedData | void | null =\n        seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n\n      const taskChild = createCacheNodeOnNavigation(\n        navigatedAt,\n        newRouteTreeChild,\n        newMetadataVaryPath,\n        freshness,\n        seedDataChild ?? null,\n        seedHead,\n        seedDynamicStaleAt,\n        parentNeedsDynamicRequest || needsDynamicRequest,\n        accumulation\n      )\n\n      taskChildren.set(parallelRouteKey, taskChild)\n      newCacheNodeSlots[parallelRouteKey] = taskChild.node\n\n      const taskChildRoute = taskChild.route\n      patchedRouterStateChildren[parallelRouteKey] = taskChildRoute\n\n      const dynamicRequestTreeChild = taskChild.dynamicRequestTree\n      if (dynamicRequestTreeChild !== null) {\n        childNeedsDynamicRequest = true\n        dynamicRequestTreeChildren[parallelRouteKey] = dynamicRequestTreeChild\n      } else {\n        dynamicRequestTreeChildren[parallelRouteKey] = taskChildRoute\n      }\n    }\n  }\n\n  const newFlightRouterState: FlightRouterState = [\n    newSegment,\n    patchedRouterStateChildren,\n    null,\n    null,\n    newRouteTree.prefetchHints,\n  ]\n\n  return {\n    status: needsDynamicRequest\n      ? NavigationTaskStatus.Pending\n      : NavigationTaskStatus.Fulfilled,\n    route: newFlightRouterState,\n    node: newCacheNode,\n    dynamicRequestTree: createDynamicRequestTree(\n      newFlightRouterState,\n      dynamicRequestTreeChildren,\n      needsDynamicRequest,\n      childNeedsDynamicRequest,\n      parentNeedsDynamicRequest\n    ),\n    // This route is not part of the current tree, so there's no reason to\n    // track the refresh URL.\n    refreshState: null,\n    children: taskChildren,\n  }\n}\n\nfunction createSegmentFromRouteTree(newRouteTree: RouteTree): Segment {\n  if (newRouteTree.isPage) {\n    // In a dynamic server response, the server embeds the search params into\n    // the segment key, but in a static one it's omitted. The client handles\n    // this inconsistency by adding the search params back right at the end.\n    //\n    // TODO: The only thing this is used for is to create a cache key for\n    // ChildSegmentMap. But we already track the `renderedSearch` everywhere as\n    // part of the varyPath. The plan is get rid of ChildSegmentMap and\n    // store the page data in a CacheMap using the varyPath, like we do\n    // for prefetches. Then we can remove it from the segment key.\n    //\n    // As an incremental step, we can grab the search params from the varyPath.\n    const renderedSearch = getRenderedSearchFromVaryPath(newRouteTree.varyPath)\n    if (renderedSearch === null) {\n      return PAGE_SEGMENT_KEY\n    }\n    // This is based on equivalent logic in addSearchParamsIfPageSegment, used\n    // on the server.\n    const stringifiedQuery = JSON.stringify(\n      Object.fromEntries(new URLSearchParams(renderedSearch))\n    )\n    return stringifiedQuery !== '{}'\n      ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n      : PAGE_SEGMENT_KEY\n  }\n  return newRouteTree.segment\n}\n\nfunction patchRouterStateWithNewChildren(\n  baseRouterState: FlightRouterState,\n  newChildren: { [parallelRouteKey: string]: FlightRouterState }\n): FlightRouterState {\n  const clone: FlightRouterState = [baseRouterState[0], newChildren]\n  // Based on equivalent logic in apply-router-state-patch-to-tree, but should\n  // confirm whether we need to copy all of these fields. Not sure the server\n  // ever sends, e.g. the refetch marker.\n  if (2 in baseRouterState) {\n    clone[2] = baseRouterState[2]\n  }\n  if (3 in baseRouterState) {\n    clone[3] = baseRouterState[3]\n  }\n  if (4 in baseRouterState) {\n    clone[4] = baseRouterState[4]\n  }\n  return clone\n}\n\nfunction createDynamicRequestTree(\n  newRouterState: FlightRouterState,\n  dynamicRequestTreeChildren: Record<string, FlightRouterState>,\n  needsDynamicRequest: boolean,\n  childNeedsDynamicRequest: boolean,\n  parentNeedsDynamicRequest: boolean\n): FlightRouterState | null {\n  // Create a FlightRouterState that instructs the server how to render the\n  // requested segment.\n  //\n  // Or, if neither this segment nor any of the children require a new data,\n  // then we return `null` to skip the request.\n  let dynamicRequestTree: FlightRouterState | null = null\n  if (needsDynamicRequest) {\n    dynamicRequestTree = patchRouterStateWithNewChildren(\n      newRouterState,\n      dynamicRequestTreeChildren\n    )\n    // The \"refetch\" marker is set on the top-most segment that requires new\n    // data. We can omit it if a parent was already marked.\n    if (!parentNeedsDynamicRequest) {\n      dynamicRequestTree[3] = 'refetch'\n    }\n  } else if (childNeedsDynamicRequest) {\n    // This segment does not request new data, but at least one of its\n    // children does.\n    dynamicRequestTree = patchRouterStateWithNewChildren(\n      newRouterState,\n      dynamicRequestTreeChildren\n    )\n  } else {\n    dynamicRequestTree = null\n  }\n  return dynamicRequestTree\n}\n\nfunction accumulateRefreshUrl(\n  accumulation: NavigationRequestAccumulation,\n  refreshState: RefreshState\n) {\n  // This is a refresh navigation, and we're inside a \"default\" slot that's\n  // not part of the current route; it was reused from an older route. In\n  // order to get fresh data for this reused route, we need to issue a\n  // separate request using the old route's URL.\n  //\n  // Track these extra URLs in the accumulated result. Later, we'll construct\n  // an appropriate request for each unique URL in the final set. The reason\n  // we don't do it immediately here is so we can deduplicate multiple\n  // instances of the same URL into a single request. See\n  // listenForDynamicRequest for more details.\n  const refreshUrl = refreshState.canonicalUrl\n  const separateRefreshUrls = accumulation.separateRefreshUrls\n  if (separateRefreshUrls === null) {\n    accumulation.separateRefreshUrls = new Set([refreshUrl])\n  } else {\n    separateRefreshUrls.add(refreshUrl)\n  }\n}\n\nfunction reuseActiveSegmentInDefaultSlot(\n  parentRouteTree: RouteTree,\n  parallelRouteKey: string,\n  oldRootRefreshState: RefreshState,\n  oldRouterState: FlightRouterState\n): RouteTree {\n  // This is a \"default\" segment. These are never sent by the server during a\n  // soft navigation; instead, the client reuses whatever segment was already\n  // active in that slot on the previous route. This means if we later need to\n  // refresh the segment, it will have to be refetched from the previous route's\n  // URL. We store it in the Flight Router State.\n\n  let reusedUrl: string\n  let reusedRenderedSearch: NormalizedSearch\n  const oldRefreshState = oldRouterState[2]\n  if (oldRefreshState !== undefined && oldRefreshState !== null) {\n    // This segment was already reused from an even older route. Keep its\n    // existing URL and refresh state.\n    reusedUrl = oldRefreshState[0]\n    reusedRenderedSearch = oldRefreshState[1] as NormalizedSearch\n  } else {\n    // Since this route didn't already have a refresh state, it must have been\n    // reachable from the root of the old route. So we use the refresh state\n    // that represents the old route.\n    reusedUrl = oldRootRefreshState.canonicalUrl\n    reusedRenderedSearch = oldRootRefreshState.renderedSearch\n  }\n\n  const acc = { metadataVaryPath: null }\n  const reusedRouteTree = convertReusedFlightRouterStateToRouteTree(\n    parentRouteTree,\n    parallelRouteKey,\n    oldRouterState,\n    reusedRenderedSearch,\n    acc\n  )\n  reusedRouteTree.refreshState = {\n    canonicalUrl: reusedUrl,\n    renderedSearch: reusedRenderedSearch,\n  }\n  return reusedRouteTree\n}\n\nfunction reuseSharedCacheNode(\n  dropPrefetchRsc: boolean,\n  existingCacheNode: CacheNode\n): CacheNode {\n  // Clone the CacheNode that was already present in the previous tree.\n  // Carry forward the scrollRef so scroll intent from a prior navigation\n  // survives tree rebuilds (e.g. push + refresh in the same batch).\n  return createCacheNode(\n    existingCacheNode.rsc,\n    dropPrefetchRsc ? null : existingCacheNode.prefetchRsc,\n    existingCacheNode.head,\n    dropPrefetchRsc ? null : existingCacheNode.prefetchHead,\n    existingCacheNode.scrollRef\n  )\n}\n\nfunction createCacheNodeForSegment(\n  now: number,\n  tree: RouteTree,\n  seedRsc: React.ReactNode | null,\n  metadataVaryPath: PageVaryPath | null,\n  seedHead: HeadData | null,\n  freshness: FreshnessPolicy,\n  dynamicStaleAt: number\n): { cacheNode: CacheNode; needsDynamicRequest: boolean } {\n  // Construct a new CacheNode using data from the BFCache, the client's\n  // Segment Cache, or seeded from a server response.\n  //\n  // If there's a cache miss, or if we only have a partial hit, we'll render\n  // the partial state immediately, and spawn a request to the server to fill\n  // in the missing data.\n  //\n  // If the segment is fully cached on the client already, we can omit this\n  // segment from the server request.\n  //\n  // If we already have a dynamic data response associated with this navigation,\n  // as in the case of a Server Action-initiated redirect or refresh, we may\n  // also be able to use that data without spawning a new request. (This is\n  // referred to as the \"seed\" data.)\n\n  const isPage = tree.isPage\n\n  // During certain kinds of navigations, we may be able to render from\n  // the BFCache.\n  switch (freshness) {\n    case FreshnessPolicy.Default: {\n      // Check BFCache during regular navigations. The entry's staleAt\n      // determines whether it's still fresh. This is used when\n      // staleTimes.dynamic is configured globally or when a page exports\n      // unstable_dynamicStaleTime for per-page control.\n      const bfcacheEntry = readFromBFCacheDuringRegularNavigation(\n        now,\n        tree.varyPath\n      )\n      if (bfcacheEntry !== null) {\n        return {\n          cacheNode: createCacheNode(\n            bfcacheEntry.rsc,\n            bfcacheEntry.prefetchRsc,\n            bfcacheEntry.head,\n            bfcacheEntry.prefetchHead\n          ),\n          needsDynamicRequest: false,\n        }\n      }\n      break\n    }\n    case FreshnessPolicy.Hydration: {\n      // This is not related to the BFCache but it is a special case.\n      //\n      // We should never spawn network requests during hydration. We must treat\n      // the initial payload as authoritative, because the initial page load is\n      // used as a last-ditch mechanism for recovering the app.\n      //\n      // This is also an important safety check because if this leaks into the\n      // server rendering path (which theoretically it never should because the\n      // server payload should be consistent), the server would hang because these\n      // promises would never resolve.\n      //\n      // TODO: There is an existing case where the global \"not found\" boundary\n      // triggers this path. But it does render correctly despite that. That's an\n      // unusual render path so it's not surprising, but we should look into\n      // modeling it in a more consistent way. See also the /_notFound special\n      // case in updateCacheNodeOnNavigation.\n      const rsc = seedRsc\n      const prefetchRsc = null\n      const head = isPage ? seedHead : null\n      const prefetchHead = null\n      writeToBFCache(\n        now,\n        tree.varyPath,\n        rsc,\n        prefetchRsc,\n        head,\n        prefetchHead,\n        dynamicStaleAt\n      )\n      if (isPage && metadataVaryPath !== null) {\n        writeHeadToBFCache(\n          now,\n          metadataVaryPath,\n          head,\n          prefetchHead,\n          dynamicStaleAt\n        )\n      }\n      return {\n        cacheNode: createCacheNode(rsc, prefetchRsc, head, prefetchHead),\n        needsDynamicRequest: false,\n      }\n    }\n    case FreshnessPolicy.HistoryTraversal:\n      const bfcacheEntry = readFromBFCache(tree.varyPath)\n      if (bfcacheEntry !== null) {\n        // Only show prefetched data if the dynamic data is still pending. This\n        // avoids a flash back to the prefetch state in a case where it's highly\n        // likely to have already streamed in.\n        //\n        // Tehnically, what we're actually checking is whether the dynamic\n        // network response was received. But since it's a streaming response,\n        // this does not mean that all the dynamic data has fully streamed in.\n        // It just means that _some_ of the dynamic data was received. But as a\n        // heuristic, we assume that the rest dynamic data will stream in\n        // quickly, so it's still better to skip the prefetch state.\n        const oldRsc = bfcacheEntry.rsc\n        const oldRscDidResolve =\n          !isDeferredRsc(oldRsc) || oldRsc.status !== 'pending'\n        const dropPrefetchRsc = oldRscDidResolve\n        return {\n          cacheNode: createCacheNode(\n            bfcacheEntry.rsc,\n            dropPrefetchRsc ? null : bfcacheEntry.prefetchRsc,\n            bfcacheEntry.head,\n            dropPrefetchRsc ? null : bfcacheEntry.prefetchHead\n          ),\n          needsDynamicRequest: false,\n        }\n      }\n      break\n    case FreshnessPolicy.RefreshAll:\n    case FreshnessPolicy.HMRRefresh:\n    case FreshnessPolicy.Gesture:\n      // Don't consult the BFCache.\n      break\n    default:\n      freshness satisfies never\n      break\n  }\n\n  let cachedRsc: React.ReactNode | null = null\n  let isCachedRscPartial: boolean = true\n\n  const segmentEntry = readSegmentCacheEntry(now, tree.varyPath)\n  if (segmentEntry !== null) {\n    switch (segmentEntry.status) {\n      case EntryStatus.Fulfilled: {\n        // Happy path: a cache hit\n        cachedRsc = segmentEntry.rsc\n        isCachedRscPartial = segmentEntry.isPartial\n        break\n      }\n      case EntryStatus.Pending: {\n        // We haven't received data for this segment yet, but there's already\n        // an in-progress request. Since it's extremely likely to arrive\n        // before the dynamic data response, we might as well use it.\n        const promiseForFulfilledEntry = waitForSegmentCacheEntry(segmentEntry)\n        cachedRsc = promiseForFulfilledEntry.then((entry) =>\n          entry !== null ? entry.rsc : null\n        )\n        // Because the request is still pending, we typically don't know yet\n        // whether the response will be partial. We shouldn't skip this segment\n        // during the dynamic navigation request. Otherwise, we might need to\n        // do yet another request to fill in the remaining data, creating\n        // a waterfall.\n        //\n        // The one exception is if this segment is being fetched with via\n        // prefetch={true} (i.e. the \"force stale\" or \"full\" strategy). If so,\n        // we can assume the response will be full. This field is set to `false`\n        // for such segments.\n        isCachedRscPartial = segmentEntry.isPartial\n        break\n      }\n      case EntryStatus.Empty:\n      case EntryStatus.Rejected: {\n        break\n      }\n      default: {\n        segmentEntry satisfies never\n        break\n      }\n    }\n  }\n\n  // Now combine the cached data with the seed data to determine what we can\n  // render immediately, versus what needs to stream in later.\n\n  // A partial state to show immediately while we wait for the final data to\n  // arrive. If `rsc` is already a complete value (not partial), or if we\n  // don't have any useful partial state, this will be `null`.\n  let prefetchRsc: React.ReactNode | null\n  // The final, resolved segment data. If the data is missing, this will be a\n  // promise that resolves to the eventual data. A resolved value of `null`\n  // means the data failed to load; the LayoutRouter will suspend indefinitely\n  // until the router updates again (refer to finishNavigationTask).\n  let rsc: React.ReactNode | null\n  let doesSegmentNeedDynamicRequest: boolean\n\n  if (seedRsc !== null) {\n    // We already have a dynamic server response for this segment.\n    if (isCachedRscPartial) {\n      // The seed data may still be streaming in, so it's worth showing the\n      // partial cached state in the meantime.\n      prefetchRsc = cachedRsc\n      rsc = seedRsc\n    } else {\n      // We already have a completely cached segment. Ignore the seed data,\n      // which may still be streaming in. This shouldn't happen in the normal\n      // case because the client will inform the server which segments are\n      // already fully cached, and the server will skip rendering them.\n      prefetchRsc = null\n      rsc = cachedRsc\n    }\n    doesSegmentNeedDynamicRequest = false\n  } else {\n    if (isCachedRscPartial) {\n      // The cached data contains dynamic holes, or it's missing entirely. We'll\n      // show the partial state immediately (if available), and stream in the\n      // final data.\n      //\n      // Create a pending promise that we can later write to when the\n      // data arrives from the server.\n      prefetchRsc = cachedRsc\n      rsc = createDeferredRsc()\n    } else {\n      // The data is fully cached.\n      prefetchRsc = null\n      rsc = cachedRsc\n    }\n    doesSegmentNeedDynamicRequest = isCachedRscPartial\n  }\n\n  // If this is a page segment, we need to do the same for the head. This\n  // follows analogous logic to the segment data above.\n  // TODO: We don't need to store the head on the page segment's CacheNode; we\n  // can lift it to the main state object. Then we can also delete\n  // findHeadCache.\n\n  let prefetchHead: HeadData | null = null\n  let head: React.ReactNode | null = null\n  let doesHeadNeedDynamicRequest: boolean = isPage\n\n  if (isPage) {\n    let cachedHead: HeadData | null = null\n    let isCachedHeadPartial: boolean = true\n    if (metadataVaryPath !== null) {\n      const metadataEntry = readSegmentCacheEntry(now, metadataVaryPath)\n      if (metadataEntry !== null) {\n        switch (metadataEntry.status) {\n          case EntryStatus.Fulfilled: {\n            cachedHead = metadataEntry.rsc\n            isCachedHeadPartial = metadataEntry.isPartial\n            break\n          }\n          case EntryStatus.Pending: {\n            cachedHead = waitForSegmentCacheEntry(metadataEntry).then(\n              (entry) => (entry !== null ? entry.rsc : null)\n            )\n            isCachedHeadPartial = metadataEntry.isPartial\n            break\n          }\n          case EntryStatus.Empty:\n          case EntryStatus.Rejected: {\n            break\n          }\n          default: {\n            metadataEntry satisfies never\n            break\n          }\n        }\n      }\n    }\n\n    if (process.env.__NEXT_OPTIMISTIC_ROUTING && isCachedHeadPartial) {\n      // TODO: When optimistic routing is enabled, don't block on waiting for\n      // the viewport to resolve. This is a temporary workaround until Vary\n      // Params are tracked when rendering the metadata. We'll fix it before\n      // this feature is stable. However, it's not a critical issue because 1)\n      // it will stream in eventually anyway 2) metadata is wrapped in an\n      // internal Suspense boundary, so is always non-blocking; this only\n      // affects the viewport node, which is meant to blocking, however... 3)\n      // before Segment Cache landed this wasn't always the case, anyway, so\n      // it's unlikely that many people are relying on this behavior. Still,\n      // will be fixed before stable. It's the very next step in the sequence of\n      // work on this project.\n      //\n      // This line of code works because the App Router treats `null` as\n      // \"no renderable head available\", rather than an empty head. React treats\n      // an empty string as empty.\n      cachedHead = ''\n    }\n\n    if (seedHead !== null) {\n      if (isCachedHeadPartial) {\n        prefetchHead = cachedHead\n        head = seedHead\n      } else {\n        prefetchHead = null\n        head = cachedHead\n      }\n      doesHeadNeedDynamicRequest = false\n    } else {\n      if (isCachedHeadPartial) {\n        prefetchHead = cachedHead\n        head = createDeferredRsc()\n      } else {\n        prefetchHead = null\n        head = cachedHead\n      }\n      doesHeadNeedDynamicRequest = isCachedHeadPartial\n    }\n  }\n\n  // Now that we're creating a new segment, write its data to the BFCache. A\n  // subsequent back/forward navigation will reuse this same data, until or\n  // unless it's cleared by a refresh/revalidation.\n  //\n  // Skip BFCache writes for optimistic navigations since they are transient\n  // and will be replaced by the canonical navigation.\n  if (freshness !== FreshnessPolicy.Gesture) {\n    writeToBFCache(\n      now,\n      tree.varyPath,\n      rsc,\n      prefetchRsc,\n      head,\n      prefetchHead,\n      dynamicStaleAt\n    )\n    if (isPage && metadataVaryPath !== null) {\n      writeHeadToBFCache(\n        now,\n        metadataVaryPath,\n        head,\n        prefetchHead,\n        dynamicStaleAt\n      )\n    }\n  }\n\n  return {\n    cacheNode: createCacheNode(rsc, prefetchRsc, head, prefetchHead),\n    // TODO: We should store this field on the CacheNode itself. I think we can\n    // probably unify NavigationTask, CacheNode, and DeferredRsc into a\n    // single type. Or at least CacheNode and DeferredRsc.\n    needsDynamicRequest:\n      doesSegmentNeedDynamicRequest || doesHeadNeedDynamicRequest,\n  }\n}\n\nfunction createCacheNode(\n  rsc: React.ReactNode | null,\n  prefetchRsc: React.ReactNode | null,\n  head: React.ReactNode | null,\n  prefetchHead: HeadData | null,\n  scrollRef: ScrollRef | null = null\n): CacheNode {\n  return {\n    rsc,\n    prefetchRsc,\n    head,\n    prefetchHead,\n    slots: null,\n    scrollRef,\n  }\n}\n\n// Represents whether the previuos navigation resulted in a route tree mismatch.\n// A mismatch results in a refresh of the page. If there are two successive\n// mismatches, we will fall back to an MPA navigation, to prevent a retry loop.\nlet previousNavigationDidMismatch = false\n\n// Writes a dynamic server response into the tree created by\n// updateCacheNodeOnNavigation. All pending promises that were spawned by the\n// navigation will be resolved, either with dynamic data from the server, or\n// `null` to indicate that the data is missing.\n//\n// A `null` value will trigger a lazy fetch during render, which will then patch\n// up the tree using the same mechanism as the non-PPR implementation\n// (serverPatchReducer).\n//\n// Usually, the server will respond with exactly the subset of data that we're\n// waiting for — everything below the nearest shared layout. But technically,\n// the server can return anything it wants.\n//\n// This does _not_ create a new tree; it modifies the existing one in place.\n// Which means it must follow the Suspense rules of cache safety.\nexport function spawnDynamicRequests(\n  task: NavigationTask,\n  primaryUrl: URL,\n  nextUrl: string | null,\n  freshnessPolicy: FreshnessPolicy,\n  accumulation: NavigationRequestAccumulation,\n  // The route cache entry used for this navigation, if it came from route\n  // prediction. Passed through so it can be marked as having a dynamic rewrite\n  // if the server returns a different pathname than expected (indicating\n  // dynamic rewrite behavior that varies by param value).\n  routeCacheEntry: FulfilledRouteCacheEntry | null,\n  // The original navigation's push/replace intent. Threaded through to the\n  // server-patch retry logic so it can inherit the intent if the original\n  // transition hasn't committed yet.\n  navigateType: 'push' | 'replace'\n): void {\n  const dynamicRequestTree = task.dynamicRequestTree\n  if (dynamicRequestTree === null) {\n    // This navigation was fully cached. There are no dynamic requests to spawn.\n    previousNavigationDidMismatch = false\n    return\n  }\n\n  // This is intentionally not an async function to discourage the caller from\n  // awaiting the result. Any subsequent async operations spawned by this\n  // function should result in a separate navigation task, rather than\n  // block the original one.\n  //\n  // In this function we spawn (but do not await) all the network requests that\n  // block the navigation, and collect the promises. The next function,\n  // `finishNavigationTask`, can await the promises in any order without\n  // accidentally introducing a network waterfall.\n  const primaryRequestPromise = fetchMissingDynamicData(\n    task,\n    dynamicRequestTree,\n    primaryUrl,\n    nextUrl,\n    freshnessPolicy,\n    routeCacheEntry\n  )\n\n  const separateRefreshUrls = accumulation.separateRefreshUrls\n  let refreshRequestPromises: Array<\n    ReturnType<typeof fetchMissingDynamicData>\n  > | null = null\n  if (separateRefreshUrls !== null) {\n    // There are multiple URLs that we need to request the data from. This\n    // happens when a \"default\" parallel route slot is present in the tree, and\n    // its data cannot be fetched from the current route. We need to split the\n    // combined dynamic request tree into separate requests per URL.\n\n    // TODO: Create a scoped dynamic request tree that omits anything that\n    // is not relevant to the given URL. Without doing this, the server may\n    // sometimes render more data than necessary; this is not a regression\n    // compared to the pre-Segment Cache implementation, though, just an\n    // optimization we can make in the future.\n\n    // Construct a request tree for each additional refresh URL. This will\n    // prune away everything except the parts of the tree that match the\n    // given refresh URL.\n    refreshRequestPromises = []\n    const canonicalUrl = createHrefFromUrl(primaryUrl)\n    for (const refreshUrl of separateRefreshUrls) {\n      if (refreshUrl === canonicalUrl) {\n        // We already initiated a request for the this URL, above. Skip it.\n        // TODO: This only happens because the main URL is not tracked as\n        // part of the separateRefreshURLs set. There's probably a better way\n        // to structure this so this case doesn't happen.\n        continue\n      }\n      // TODO: Create a scoped dynamic request tree that omits anything that\n      // is not relevant to the given URL. Without doing this, the server may\n      // sometimes render more data than necessary; this is not a regression\n      // compared to the pre-Segment Cache implementation, though, just an\n      // optimization we can make in the future.\n      // const scopedDynamicRequestTree = splitTaskByURL(task, refreshUrl)\n      const scopedDynamicRequestTree = dynamicRequestTree\n      if (scopedDynamicRequestTree !== null) {\n        refreshRequestPromises.push(\n          fetchMissingDynamicData(\n            task,\n            scopedDynamicRequestTree,\n            new URL(refreshUrl, location.origin),\n            // TODO: Just noticed that this should actually the Next-Url at the\n            // time the refresh URL was set, not the current Next-Url. Need to\n            // start tracking this alongside the refresh URL. In the meantime,\n            // if a refresh fails due to a mismatch, it will trigger a\n            // hard refresh.\n            nextUrl,\n            freshnessPolicy,\n            routeCacheEntry\n          )\n        )\n      }\n    }\n  }\n\n  // Further async operations are moved into this separate function to\n  // discourage sequential network requests.\n  const voidPromise = finishNavigationTask(\n    task,\n    nextUrl,\n    primaryRequestPromise,\n    refreshRequestPromises,\n    routeCacheEntry,\n    navigateType\n  )\n  // `finishNavigationTask` is responsible for error handling, so we can attach\n  // noop callbacks to this promise.\n  voidPromise.then(noop, noop)\n}\n\nasync function finishNavigationTask(\n  task: NavigationTask,\n  nextUrl: string | null,\n  primaryRequestPromise: ReturnType<typeof fetchMissingDynamicData>,\n  refreshRequestPromises: Array<\n    ReturnType<typeof fetchMissingDynamicData>\n  > | null,\n  routeCacheEntry: FulfilledRouteCacheEntry | null,\n  navigateType: 'push' | 'replace'\n): Promise<void> {\n  // Wait for all the requests to finish, or for the first one to fail.\n  let exitStatus = await waitForRequestsToFinish(\n    primaryRequestPromise,\n    refreshRequestPromises\n  )\n\n  // Once the all the requests have finished, check the tree for any remaining\n  // pending tasks. If anything is still pending, it means the server response\n  // does not match the client, and we must refresh to get back to a consistent\n  // state. We can skip this step if we already detected a mismatch during the\n  // first phase; it doesn't matter in that case because we're going to refresh\n  // the whole tree regardless.\n  if (exitStatus === NavigationTaskExitStatus.Done) {\n    exitStatus = abortRemainingPendingTasks(task, null, null)\n  }\n\n  switch (exitStatus) {\n    case NavigationTaskExitStatus.Done: {\n      // The task has completely finished. There's no missing data. Exit.\n      previousNavigationDidMismatch = false\n      return\n    }\n    case NavigationTaskExitStatus.SoftRetry: {\n      // Some data failed to finish loading. Trigger a soft retry.\n      // TODO: As an extra precaution against soft retry loops, consider\n      // tracking whether a navigation was itself triggered by a retry. If two\n      // happen in a row, fall back to a hard retry.\n      const isHardRetry = false\n      const primaryRequestResult = await primaryRequestPromise\n      dispatchRetryDueToTreeMismatch(\n        isHardRetry,\n        primaryRequestResult.url,\n        nextUrl,\n        primaryRequestResult.seed,\n        task.route,\n        routeCacheEntry,\n        navigateType\n      )\n      return\n    }\n    case NavigationTaskExitStatus.HardRetry: {\n      // Some data failed to finish loading in a non-recoverable way, such as a\n      // network error. Trigger an MPA navigation.\n      //\n      // Hard navigating/refreshing is how we prevent an infinite retry loop\n      // caused by a network error — when the network fails, we fall back to the\n      // browser behavior for offline navigations. In the future, Next.js may\n      // introduce its own custom handling of offline navigations, but that\n      // doesn't exist yet.\n      const isHardRetry = true\n      const primaryRequestResult = await primaryRequestPromise\n      dispatchRetryDueToTreeMismatch(\n        isHardRetry,\n        primaryRequestResult.url,\n        nextUrl,\n        primaryRequestResult.seed,\n        task.route,\n        routeCacheEntry,\n        navigateType\n      )\n      return\n    }\n    default: {\n      return exitStatus satisfies never\n    }\n  }\n}\n\nfunction waitForRequestsToFinish(\n  primaryRequestPromise: ReturnType<typeof fetchMissingDynamicData>,\n  refreshRequestPromises: Array<\n    ReturnType<typeof fetchMissingDynamicData>\n  > | null\n) {\n  // Custom async combinator logic. This could be replaced by Promise.any but\n  // we don't assume that's available.\n  //\n  // Each promise resolves once the server responsds and the data is written\n  // into the CacheNode tree. Resolve the combined promise once all the\n  // requests finish.\n  //\n  // Or, resolve as soon as one of the requests fails, without waiting for the\n  // others to finish.\n  return new Promise<NavigationTaskExitStatus>((resolve) => {\n    const onFulfill = (result: { exitStatus: NavigationTaskExitStatus }) => {\n      if (result.exitStatus === NavigationTaskExitStatus.Done) {\n        remainingCount--\n        if (remainingCount === 0) {\n          // All the requests finished successfully.\n          resolve(NavigationTaskExitStatus.Done)\n        }\n      } else {\n        // One of the requests failed. Exit with a failing status.\n        // NOTE: It's possible for one of the requests to fail with SoftRetry\n        // and a later one to fail with HardRetry. In this case, we choose to\n        // retry immediately, rather than delay the retry until all the requests\n        // finish. If it fails again, we will hard retry on the next\n        // attempt, anyway.\n        resolve(result.exitStatus)\n      }\n    }\n    // onReject shouldn't ever be called because fetchMissingDynamicData's\n    // entire body is wrapped in a try/catch. This is just defensive.\n    const onReject = () => resolve(NavigationTaskExitStatus.HardRetry)\n\n    // Attach the listeners to the promises.\n    let remainingCount = 1\n    primaryRequestPromise.then(onFulfill, onReject)\n    if (refreshRequestPromises !== null) {\n      remainingCount += refreshRequestPromises.length\n      refreshRequestPromises.forEach((refreshRequestPromise) =>\n        refreshRequestPromise.then(onFulfill, onReject)\n      )\n    }\n  })\n}\n\nfunction dispatchRetryDueToTreeMismatch(\n  isHardRetry: boolean,\n  retryUrl: URL,\n  retryNextUrl: string | null,\n  seed: NavigationSeed | null,\n  baseTree: FlightRouterState,\n  // The route cache entry used for this navigation, if it came from route\n  // prediction. If the navigation results in a mismatch, we mark it as having\n  // a dynamic rewrite so future predictions bail out.\n  routeCacheEntry: FulfilledRouteCacheEntry | null,\n  // The original navigation's push/replace intent.\n  originalNavigateType: 'push' | 'replace'\n) {\n  // If the navigation used a route prediction, mark it as having a dynamic\n  // rewrite since it resulted in a mismatch.\n  if (routeCacheEntry !== null) {\n    markRouteEntryAsDynamicRewrite(routeCacheEntry)\n  } else if (seed !== null) {\n    // Even without a direct reference to the route cache entry, we can still\n    // mark the route as having a dynamic rewrite by traversing the known route\n    // tree. This handles cases where the navigation didn't originate from a\n    // route prediction, but still needs to mark the pattern.\n    const metadataVaryPath = seed.metadataVaryPath\n    if (metadataVaryPath !== null) {\n      const now = Date.now()\n      discoverKnownRoute(\n        now,\n        retryUrl.pathname,\n        retryNextUrl,\n        null,\n        seed.routeTree,\n        metadataVaryPath,\n        false, // couldBeIntercepted - doesn't matter, we're just marking hasDynamicRewrite\n        createHrefFromUrl(retryUrl),\n        false, // supportsPerSegmentPrefetching - doesn't matter, we're just marking hasDynamicRewrite\n        true // hasDynamicRewrite\n      )\n    }\n  }\n\n  // Invalidate all route cache entries. Other entries may have been derived\n  // from the template before we knew it had a dynamic rewrite. This also\n  // triggers re-prefetching of visible links.\n  invalidateRouteCacheEntries(retryNextUrl, baseTree)\n\n  // If this is the second time in a row that a navigation resulted in a\n  // mismatch, fall back to a hard (MPA) refresh.\n  isHardRetry = isHardRetry || previousNavigationDidMismatch\n  previousNavigationDidMismatch = true\n\n  // If the original navigation hasn't committed to the browser history yet\n  // (the transition suspended before React committed), inherit its push/replace\n  // intent. Otherwise, the pushState already ran, so use 'replace' to avoid\n  // creating a duplicate history entry.\n  //\n  // This works because React entangles the retry's state update with the\n  // original pending transition — they commit together as a single batch,\n  // so the navigate type from the retry is what HistoryUpdater ultimately sees.\n  //\n  // TODO: Ideally this check would happen right before we schedule the React\n  // update (i.e., closer to where the action is dispatched into the queue),\n  // not here where the action is constructed. But the current action queue\n  // doesn't provide a natural place for that. Revisit when we refactor the\n  // action queue into a more reactive navigation model.\n  const lastCommitted = getLastCommittedTree()\n  const retryNavigateType: 'push' | 'replace' =\n    lastCommitted !== null && baseTree !== lastCommitted\n      ? originalNavigateType\n      : 'replace'\n\n  const retryAction: ServerPatchAction = {\n    type: ACTION_SERVER_PATCH,\n    previousTree: baseTree,\n    url: retryUrl,\n    nextUrl: retryNextUrl,\n    seed,\n    mpa: isHardRetry,\n    navigateType: retryNavigateType,\n  }\n  dispatchAppRouterAction(retryAction)\n}\n\nasync function fetchMissingDynamicData(\n  task: NavigationTask,\n  dynamicRequestTree: FlightRouterState,\n  url: URL,\n  nextUrl: string | null,\n  freshnessPolicy: FreshnessPolicy,\n  routeCacheEntry: FulfilledRouteCacheEntry | null\n): Promise<{\n  exitStatus: NavigationTaskExitStatus\n  url: URL\n  seed: NavigationSeed | null\n}> {\n  try {\n    const result = await fetchServerResponse(url, {\n      flightRouterState: dynamicRequestTree,\n      nextUrl,\n      isHmrRefresh: freshnessPolicy === FreshnessPolicy.HMRRefresh,\n    })\n    if (typeof result === 'string') {\n      // fetchServerResponse will return an href to indicate that the SPA\n      // navigation failed. For example, if the server triggered a hard\n      // redirect, or the fetch request errored. Initiate an MPA navigation\n      // to the given href.\n      return {\n        exitStatus: NavigationTaskExitStatus.HardRetry,\n        url: new URL(result, location.origin),\n        seed: null,\n      }\n    }\n    const now = Date.now()\n\n    const seed = convertServerPatchToFullTree(\n      now,\n      task.route,\n      result.flightData,\n      result.renderedSearch,\n      result.dynamicStaleTime\n    )\n\n    // If the navigation lock is active, wait for it to be released before\n    // writing the dynamic data. This allows tests to assert on the prefetched\n    // UI state.\n    if (process.env.__NEXT_EXPOSE_TESTING_API) {\n      await waitForNavigationLock()\n    }\n\n    if (routeCacheEntry !== null && result.staticStageData !== null) {\n      const { response: staticStageResponse, isResponsePartial } =\n        result.staticStageData\n\n      getStaleAt(now, staticStageResponse.s)\n        .then((staleAt) => {\n          const buildId =\n            result.responseHeaders.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ??\n            staticStageResponse.b\n\n          writeStaticStageResponseIntoCache(\n            now,\n            staticStageResponse.f,\n            buildId,\n            staticStageResponse.h,\n            staleAt,\n            dynamicRequestTree,\n            result.renderedSearch,\n            isResponsePartial\n          )\n        })\n        .catch(() => {\n          // The static stage processing failed. Not fatal — the navigation\n          // completed normally, we just won't write into the cache.\n        })\n    }\n\n    if (routeCacheEntry !== null && result.runtimePrefetchStream !== null) {\n      processRuntimePrefetchStream(\n        now,\n        result.runtimePrefetchStream,\n        dynamicRequestTree,\n        result.renderedSearch\n      )\n        .then((processed) => {\n          if (processed !== null) {\n            writeDynamicRenderResponseIntoCache(\n              now,\n              FetchStrategy.PPRRuntime,\n              processed.flightDatas,\n              processed.buildId,\n              processed.isResponsePartial,\n              processed.headVaryParams,\n              processed.staleAt,\n              processed.navigationSeed,\n              null\n            )\n          }\n        })\n        .catch(() => {\n          // The runtime prefetch cache write failed. Not fatal — the\n          // navigation completed normally, we just won't cache runtime data.\n        })\n    }\n\n    // result.dynamicStaleTime is in seconds (from the server's `d` field).\n    // Convert to an absolute timestamp using the centralized helper.\n    const dynamicStaleAt = computeDynamicStaleAt(now, result.dynamicStaleTime)\n\n    const didReceiveUnknownParallelRoute = writeDynamicDataIntoNavigationTask(\n      task,\n      seed.routeTree,\n      seed.data,\n      seed.head,\n      dynamicStaleAt,\n      result.debugInfo\n    )\n\n    return {\n      exitStatus: didReceiveUnknownParallelRoute\n        ? NavigationTaskExitStatus.SoftRetry\n        : NavigationTaskExitStatus.Done,\n      url: new URL(result.canonicalUrl, location.origin),\n      seed,\n    }\n  } catch {\n    // This shouldn't happen because fetchServerResponse's entire body is\n    // wrapped in a try/catch. If it does, though, it implies the server failed\n    // to respond with any tree at all. So we must fall back to a hard retry.\n    return {\n      exitStatus: NavigationTaskExitStatus.HardRetry,\n      url: url,\n      seed: null,\n    }\n  }\n}\n\nfunction writeDynamicDataIntoNavigationTask(\n  task: NavigationTask,\n  serverRouteTree: RouteTree,\n  dynamicData: CacheNodeSeedData | null,\n  dynamicHead: HeadData,\n  dynamicStaleAt: number,\n  debugInfo: Array<any> | null\n): boolean {\n  if (task.status === NavigationTaskStatus.Pending && dynamicData !== null) {\n    task.status = NavigationTaskStatus.Fulfilled\n    finishPendingCacheNode(task.node, dynamicData, dynamicHead, debugInfo)\n\n    // Update the BFCache entry's staleAt for this segment with the value\n    // from the dynamic response. This applies the per-page\n    // unstable_dynamicStaleTime if set, or the default DYNAMIC_STALETIME_MS.\n    // We only update segments that received dynamic data — static segments\n    // are unaffected.\n    updateBFCacheEntryStaleAt(serverRouteTree.varyPath, dynamicStaleAt)\n  }\n\n  const taskChildren = task.children\n  const serverChildren = serverRouteTree.slots\n  const dynamicDataChildren = dynamicData !== null ? dynamicData[1] : null\n\n  // Detect whether the server sends a parallel route slot that the client\n  // doesn't know about.\n  let didReceiveUnknownParallelRoute = false\n\n  if (taskChildren !== null) {\n    if (serverChildren !== null) {\n      for (const parallelRouteKey in serverChildren) {\n        const serverRouteTreeChild: RouteTree = serverChildren[parallelRouteKey]\n        const dynamicDataChild: CacheNodeSeedData | null | void =\n          dynamicDataChildren !== null\n            ? dynamicDataChildren[parallelRouteKey]\n            : null\n\n        const taskChild = taskChildren.get(parallelRouteKey)\n        if (taskChild === undefined) {\n          // The server sent a child segment that the client doesn't know about.\n          //\n          // When we receive an unknown parallel route, we must consider it a\n          // mismatch. This is unlike the case where the segment itself\n          // mismatches, because multiple routes can be active simultaneously.\n          // But a given layout should never have a mismatching set of\n          // child slots.\n          //\n          // Theoretically, this should only happen in development during an HMR\n          // refresh, because the set of parallel routes for a layout does not\n          // change over the lifetime of a build/deployment. In production, we\n          // should have already mismatched on either the build id or the segment\n          // path. But as an extra precaution, we validate in prod, too.\n          didReceiveUnknownParallelRoute = true\n        } else {\n          const taskSegment = taskChild.route[0]\n          const serverSegment = createSegmentFromRouteTree(serverRouteTreeChild)\n          if (\n            matchSegment(serverSegment, taskSegment) &&\n            dynamicDataChild !== null &&\n            dynamicDataChild !== undefined\n          ) {\n            // Found a match for this task. Keep traversing down the task tree.\n            const childDidReceiveUnknownParallelRoute =\n              writeDynamicDataIntoNavigationTask(\n                taskChild,\n                serverRouteTreeChild,\n                dynamicDataChild,\n                dynamicHead,\n                dynamicStaleAt,\n                debugInfo\n              )\n            if (childDidReceiveUnknownParallelRoute) {\n              didReceiveUnknownParallelRoute = true\n            }\n          }\n        }\n      }\n    } else {\n      if (serverChildren !== null) {\n        // The server sent a child segment that the client doesn't know about.\n        didReceiveUnknownParallelRoute = true\n      }\n    }\n  }\n\n  return didReceiveUnknownParallelRoute\n}\n\nfunction finishPendingCacheNode(\n  cacheNode: CacheNode,\n  dynamicData: CacheNodeSeedData,\n  dynamicHead: HeadData,\n  debugInfo: Array<any> | null\n): void {\n  // Writes a dynamic response into an existing Cache Node tree. This does _not_\n  // create a new tree, it updates the existing tree in-place. So it must follow\n  // the Suspense rules of cache safety — it can resolve pending promises, but\n  // it cannot overwrite existing data. It can add segments to the tree (because\n  // a missing segment will cause the layout router to suspend).\n  // but it cannot delete them.\n  //\n  // We must resolve every promise in the tree, or else it will suspend\n  // indefinitely. If we did not receive data for a segment, we will resolve its\n  // data promise to `null` to trigger a lazy fetch during render.\n\n  // Use the dynamic data from the server to fulfill the deferred RSC promise\n  // on the Cache Node.\n  const rsc = cacheNode.rsc\n  const dynamicSegmentData = dynamicData[0]\n\n  if (dynamicSegmentData === null) {\n    // This is an empty CacheNode; this particular server request did not\n    // render this segment. There may be a separate pending request that will,\n    // though, so we won't abort the task until all pending requests finish.\n    return\n  }\n\n  if (rsc === null) {\n    // This is a lazy cache node. We can overwrite it. This is only safe\n    // because we know that the LayoutRouter suspends if `rsc` is `null`.\n    cacheNode.rsc = dynamicSegmentData\n  } else if (isDeferredRsc(rsc)) {\n    // This is a deferred RSC promise. We can fulfill it with the data we just\n    // received from the server. If it was already resolved by a different\n    // navigation, then this does nothing because we can't overwrite data.\n    rsc.resolve(dynamicSegmentData, debugInfo)\n  } else {\n    // This is not a deferred RSC promise, nor is it empty, so it must have\n    // been populated by a different navigation. We must not overwrite it.\n  }\n\n  // Check if this is a leaf segment. If so, it will have a `head` property with\n  // a pending promise that needs to be resolved with the dynamic head from\n  // the server.\n  const head = cacheNode.head\n  if (isDeferredRsc(head)) {\n    head.resolve(dynamicHead, debugInfo)\n  }\n}\n\nfunction abortRemainingPendingTasks(\n  task: NavigationTask,\n  error: any,\n  debugInfo: Array<any> | null\n): NavigationTaskExitStatus {\n  let exitStatus\n  if (task.status === NavigationTaskStatus.Pending) {\n    // The data for this segment is still missing.\n    task.status = NavigationTaskStatus.Rejected\n    abortPendingCacheNode(task.node, error, debugInfo)\n\n    // If the server failed to fulfill the data for this segment, it implies\n    // that the route tree received from the server mismatched the tree that\n    // was previously prefetched.\n    //\n    // In an app with fully static routes and no proxy-driven redirects or\n    // rewrites, this should never happen, because the route for a URL would\n    // always be the same across multiple requests. So, this implies that some\n    // runtime routing condition changed, likely in a proxy, without being\n    // pushed to the client.\n    //\n    // When this happens, we treat this the same as a refresh(). The entire\n    // tree will be re-rendered from the root.\n    if (task.refreshState === null) {\n      // Trigger a \"soft\" refresh. Essentially the same as calling `refresh()`\n      // in a Server Action.\n      exitStatus = NavigationTaskExitStatus.SoftRetry\n    } else {\n      // The mismatch was discovered inside an inactive parallel route. This\n      // implies the inactive parallel route is no longer reachable at the URL\n      // that originally rendered it. Fall back to an MPA refresh.\n      // TODO: An alternative could be to trigger a soft refresh but to _not_\n      // re-use the inactive parallel routes this time. Similar to what would\n      // happen if were to do a hard refrehs, but without the HTML page.\n      exitStatus = NavigationTaskExitStatus.HardRetry\n    }\n  } else {\n    // This segment finished. (An error here is treated as Done because they are\n    // surfaced to the application during render.)\n    exitStatus = NavigationTaskExitStatus.Done\n  }\n\n  const taskChildren = task.children\n  if (taskChildren !== null) {\n    for (const [, taskChild] of taskChildren) {\n      const childExitStatus = abortRemainingPendingTasks(\n        taskChild,\n        error,\n        debugInfo\n      )\n      // Propagate the exit status up the tree. The statuses are ordered by\n      // their precedence.\n      if (childExitStatus > exitStatus) {\n        exitStatus = childExitStatus\n      }\n    }\n  }\n\n  return exitStatus\n}\n\nfunction abortPendingCacheNode(\n  cacheNode: CacheNode,\n  error: any,\n  debugInfo: Array<any> | null\n): void {\n  const rsc = cacheNode.rsc\n  if (isDeferredRsc(rsc)) {\n    if (error === null) {\n      // This will trigger a lazy fetch during render.\n      rsc.resolve(null, debugInfo)\n    } else {\n      // This will trigger an error during rendering.\n      rsc.reject(error, debugInfo)\n    }\n  }\n\n  // Check if this is a leaf segment. If so, it will have a `head` property with\n  // a pending promise that needs to be resolved. If an error was provided, we\n  // will not resolve it with an error, since this is rendered at the root of\n  // the app. We want the segment to error, not the entire app.\n  const head = cacheNode.head\n  if (isDeferredRsc(head)) {\n    head.resolve(null, debugInfo)\n  }\n}\n\nconst DEFERRED = Symbol()\n\ntype PendingDeferredRsc<T> = Promise<T> & {\n  status: 'pending'\n  resolve: (value: T, debugInfo: Array<any> | null) => void\n  reject: (error: any, debugInfo: Array<any> | null) => void\n  tag: Symbol\n  _debugInfo: Array<any>\n}\n\ntype FulfilledDeferredRsc<T> = Promise<T> & {\n  status: 'fulfilled'\n  value: T\n  resolve: (value: T, debugInfo: Array<any> | null) => void\n  reject: (error: any, debugInfo: Array<any> | null) => void\n  tag: Symbol\n  _debugInfo: Array<any>\n}\n\ntype RejectedDeferredRsc<T> = Promise<T> & {\n  status: 'rejected'\n  reason: any\n  resolve: (value: T, debugInfo: Array<any> | null) => void\n  reject: (error: any, debugInfo: Array<any> | null) => void\n  tag: Symbol\n  _debugInfo: Array<any>\n}\n\ntype DeferredRsc<T extends React.ReactNode = React.ReactNode> =\n  | PendingDeferredRsc<T>\n  | FulfilledDeferredRsc<T>\n  | RejectedDeferredRsc<T>\n\n// This type exists to distinguish a DeferredRsc from a Flight promise. It's a\n// compromise to avoid adding an extra field on every Cache Node, which would be\n// awkward because the pre-PPR parts of codebase would need to account for it,\n// too. We can remove it once type Cache Node type is more settled.\nexport function isDeferredRsc(value: any): value is DeferredRsc {\n  return value && typeof value === 'object' && value.tag === DEFERRED\n}\n\nfunction createDeferredRsc<\n  T extends React.ReactNode = React.ReactNode,\n>(): PendingDeferredRsc<T> {\n  // Create an unresolved promise that represents data derived from a Flight\n  // response. The promise will be resolved later as soon as we start receiving\n  // data from the server, i.e. as soon as the Flight client decodes and returns\n  // the top-level response object.\n\n  // The `_debugInfo` field contains profiling information. Promises that are\n  // created by Flight already have this info added by React; for any derived\n  // promise created by the router, we need to transfer the Flight debug info\n  // onto the derived promise.\n  //\n  // The debug info represents the latency between the start of the navigation\n  // and the start of rendering. (It does not represent the time it takes for\n  // whole stream to finish.)\n  const debugInfo: Array<any> = []\n\n  let resolve: any\n  let reject: any\n  const pendingRsc = new Promise<T>((res, rej) => {\n    resolve = res\n    reject = rej\n  }) as PendingDeferredRsc<T>\n  pendingRsc.status = 'pending'\n  pendingRsc.resolve = (value: T, responseDebugInfo: Array<any> | null) => {\n    if (pendingRsc.status === 'pending') {\n      const fulfilledRsc: FulfilledDeferredRsc<T> = pendingRsc as any\n      fulfilledRsc.status = 'fulfilled'\n      fulfilledRsc.value = value\n      if (responseDebugInfo !== null) {\n        // Transfer the debug info to the derived promise.\n        debugInfo.push.apply(debugInfo, responseDebugInfo)\n      }\n      resolve(value)\n    }\n  }\n  pendingRsc.reject = (error: any, responseDebugInfo: Array<any> | null) => {\n    if (pendingRsc.status === 'pending') {\n      const rejectedRsc: RejectedDeferredRsc<T> = pendingRsc as any\n      rejectedRsc.status = 'rejected'\n      rejectedRsc.reason = error\n      if (responseDebugInfo !== null) {\n        // Transfer the debug info to the derived promise.\n        debugInfo.push.apply(debugInfo, responseDebugInfo)\n      }\n      reject(error)\n    }\n  }\n  pendingRsc.tag = DEFERRED\n  pendingRsc._debugInfo = debugInfo\n\n  return pendingRsc\n}\n\n/**\n * Helper for the Instant Navigation Testing API. Waits for the navigation lock\n * to be released before returning. The network request has already completed by\n * the time this is called, so this only delays writing the dynamic data.\n *\n * Not exposed in production builds by default.\n */\nasync function waitForNavigationLock(): Promise<void> {\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    const { waitForNavigationLockIfActive } =\n      require('../segment-cache/navigation-testing-lock') as typeof import('../segment-cache/navigation-testing-lock')\n    await waitForNavigationLockIfActive()\n  }\n}\n","import type { FlightRouterState } from '../../../shared/lib/app-router-types'\nimport { PrefetchHint } from '../../../shared/lib/app-router-types'\nimport type { RouteTree } from '../segment-cache/cache'\n\nexport function isNavigatingToNewRootLayout(\n  currentTree: FlightRouterState,\n  nextTree: RouteTree\n): boolean {\n  // Compare segments\n  const currentTreeSegment = currentTree[0]\n  const nextTreeSegment = nextTree.segment\n\n  // If any segment is different before we find the root layout, the root layout has changed.\n  // E.g. /same/(group1)/layout.js -> /same/(group2)/layout.js\n  // First segment is 'same' for both, keep looking. (group1) changed to (group2) before the root layout was found, it must have changed.\n  if (Array.isArray(currentTreeSegment) && Array.isArray(nextTreeSegment)) {\n    // Compare dynamic param name and type but ignore the value, different values would not affect the current root layout\n    // /[name] - /slug1 and /slug2, both values (slug1 & slug2) still has the same layout /[name]/layout.js\n    if (\n      currentTreeSegment[0] !== nextTreeSegment[0] ||\n      currentTreeSegment[2] !== nextTreeSegment[2]\n    ) {\n      return true\n    }\n  } else if (currentTreeSegment !== nextTreeSegment) {\n    return true\n  }\n\n  // Current tree root layout found\n  const currentIsRootLayout =\n    ((currentTree[4] ?? 0) & PrefetchHint.IsRootLayout) !== 0\n  const nextIsRootLayout =\n    (nextTree.prefetchHints & PrefetchHint.IsRootLayout) !== 0\n  if (currentIsRootLayout) {\n    // If the next tree doesn't have the root layout flag, it must have changed.\n    return !nextIsRootLayout\n  }\n  // Current tree didn't have its root layout here, must have changed.\n  if (nextIsRootLayout) {\n    return true\n  }\n\n  const slots = nextTree.slots\n  const currentTreeChildren = currentTree[1]\n  if (slots !== null) {\n    for (const slot in slots) {\n      const nextTreeChild = slots[slot]\n      const currentTreeChild = currentTreeChildren[slot]\n      if (\n        currentTreeChild === undefined ||\n        isNavigatingToNewRootLayout(currentTreeChild, nextTreeChild)\n      ) {\n        return true\n      }\n    }\n  }\n  return false\n}\n","import type { FlightRouterState } from '../../../../shared/lib/app-router-types'\n\n// The tree from the last state that was committed to the browser history\n// (i.e., the last state for which HistoryUpdater's useInsertionEffect ran).\n// This lets the server-patch reducer distinguish between retrying a\n// navigation that already pushed a history entry vs one whose transition\n// suspended and never committed.\n//\n// Currently only used by the server-patch retry logic, but this module is a\n// stepping stone toward a broader refactor of the navigation queue. The\n// existing AppRouter action queue will eventually be replaced by a more\n// reactive model that explicitly tracks pending vs committed navigation\n// state. This file will likely evolve into (or be subsumed by) that new\n// implementation.\nlet lastCommittedTree: FlightRouterState | null = null\n\nexport function getLastCommittedTree(): FlightRouterState | null {\n  return lastCommittedTree\n}\n\nexport function setLastCommittedTree(tree: FlightRouterState): void {\n  lastCommittedTree = tree\n}\n","import type {\n  NavigateAction,\n  ReadonlyReducerState,\n  ReducerState,\n} from '../router-reducer-types'\n\nimport {\n  completeHardNavigation,\n  navigate as navigateUsingSegmentCache,\n} from '../../segment-cache/navigation'\nimport { getStaleTimeMs } from '../../segment-cache/cache'\nimport { FreshnessPolicy } from '../ppr-navigations'\n\n// These values are set by `define-env-plugin` (based on `nextConfig.experimental.staleTimes`)\n// and default to 5 minutes (static) / 0 seconds (dynamic)\nexport const DYNAMIC_STALETIME_MS =\n  Number(process.env.__NEXT_CLIENT_ROUTER_DYNAMIC_STALETIME) * 1000\n\nexport const STATIC_STALETIME_MS = getStaleTimeMs(\n  Number(process.env.__NEXT_CLIENT_ROUTER_STATIC_STALETIME)\n)\n\nexport function navigateReducer(\n  state: ReadonlyReducerState,\n  action: NavigateAction\n): ReducerState {\n  const { url, isExternalUrl, navigateType, scrollBehavior } = action\n\n  if (isExternalUrl) {\n    return completeHardNavigation(state, url, navigateType)\n  }\n\n  // Handles case where `<meta http-equiv=\"refresh\">` tag is present,\n  // which will trigger an MPA navigation.\n  if (document.getElementById('__next-page-redirect')) {\n    return completeHardNavigation(state, url, navigateType)\n  }\n\n  // Temporary glue code between the router reducer and the new navigation\n  // implementation. Eventually we'll rewrite the router reducer to a\n  // state machine.\n  const currentUrl = new URL(state.canonicalUrl, location.origin)\n  const currentRenderedSearch = state.renderedSearch\n  return navigateUsingSegmentCache(\n    state,\n    url,\n    currentUrl,\n    currentRenderedSearch,\n    state.cache,\n    state.tree,\n    state.nextUrl,\n    FreshnessPolicy.Default,\n    scrollBehavior,\n    navigateType\n  )\n}\n","import type { CacheNode, ScrollRef } from '../../../shared/lib/app-router-types'\nimport type { FlightRouterState } from '../../../shared/lib/app-router-types'\nimport type { NavigationSeed } from '../segment-cache/navigation'\nimport type { FetchServerResponseResult } from './fetch-server-response'\n\nexport const ACTION_REFRESH = 'refresh'\nexport const ACTION_NAVIGATE = 'navigate'\nexport const ACTION_RESTORE = 'restore'\nexport const ACTION_SERVER_PATCH = 'server-patch'\nexport const ACTION_HMR_REFRESH = 'hmr-refresh'\nexport const ACTION_SERVER_ACTION = 'server-action'\n\nexport type RouterChangeByServerResponse = ({\n  navigatedAt,\n  previousTree,\n  serverResponse,\n}: {\n  navigatedAt: number\n  previousTree: FlightRouterState\n  serverResponse: FetchServerResponseResult\n}) => void\n\n/**\n * Refresh triggers a refresh of the full page data.\n * - fetches the Flight data and fills rsc at the root of the cache.\n * - The router state is updated at the root.\n */\nexport interface RefreshAction {\n  type: typeof ACTION_REFRESH\n  /**\n   * Bypass invalidating the segment cache. Used by the Instant Navigation\n   * Testing API to preserve prefetched data when refreshing after an MPA\n   * navigation. Not exposed in production builds by default.\n   */\n  bypassCacheInvalidation?: boolean\n}\n\nexport interface HmrRefreshAction {\n  type: typeof ACTION_HMR_REFRESH\n}\n\nexport type ServerActionDispatcher = (\n  args: Omit<\n    ServerActionAction,\n    'type' | 'mutable' | 'navigate' | 'changeByServerResponse' | 'cache'\n  >\n) => void\n\nexport interface ServerActionAction {\n  type: typeof ACTION_SERVER_ACTION\n  actionId: string\n  actionArgs: any[]\n  resolve: (value: any) => void\n  reject: (reason?: any) => void\n  didRevalidate?: boolean\n}\n\n/**\n * Navigate triggers a navigation to the provided url. It supports two types: `push` and `replace`.\n *\n * `navigateType`:\n * - `push` - pushes a new history entry in the browser history\n * - `replace` - replaces the current history entry in the browser history\n *\n * Navigate has multiple cache heuristics:\n * - page was prefetched\n *  - Apply router state tree from prefetch\n *  - Apply Flight data from prefetch to the cache\n *  - If Flight data is a string, it's a redirect and the state is updated to trigger a redirect\n *  - Check if hard navigation is needed\n *    - Hard navigation happens when a dynamic parameter below the common layout changed\n *    - When hard navigation is needed the cache is invalidated below the flightSegmentPath\n *    - The missing cache nodes of the page will be fetched in layout-router and trigger the SERVER_PATCH action\n *  - If hard navigation is not needed\n *    - The cache is reused\n *    - If any cache nodes are missing they'll be fetched in layout-router and trigger the SERVER_PATCH action\n * - page was not prefetched\n *  - The navigate was called from `next/router` (`router.push()` / `router.replace()`) / `next/link` without prefetched data available (e.g. the prefetch didn't come back from the server before clicking the link)\n *    - Flight data is fetched in the reducer (suspends the reducer)\n *    - Router state tree is created based on Flight data\n *    - Cache is filled based on the Flight data\n *\n * Above steps explain 3 cases:\n * - `soft` - Reuses the existing cache and fetches missing nodes in layout-router.\n * - `hard` - Creates a new cache where cache nodes are removed below the common layout and fetches missing nodes in layout-router.\n * - `optimistic` (explicit no prefetch) - Creates a new cache and kicks off the data fetch in the reducer. The data fetch is awaited in the layout-router.\n */\nexport interface NavigateAction {\n  type: typeof ACTION_NAVIGATE\n  url: URL\n  isExternalUrl: boolean\n  locationSearch: Location['search']\n  navigateType: 'push' | 'replace'\n  scrollBehavior: ScrollBehavior\n}\n\n/**\n * Restore applies the provided router state.\n * - Used for `popstate` (back/forward navigation) where a known router state has to be applied.\n * - Also used when syncing the router state with `pushState`/`replaceState` calls.\n * - Router state is applied as-is from the history state, if available.\n * - If the history state does not contain the router state, the existing router state is used.\n * - If any cache node is missing it will be fetched in layout-router during rendering and the server-patch case.\n * - If existing cache nodes match these are used.\n */\nexport interface RestoreAction {\n  type: typeof ACTION_RESTORE\n  url: URL\n  historyState: AppHistoryState | undefined\n}\n\nexport type AppHistoryState = {\n  tree: FlightRouterState\n  renderedSearch: string\n}\n\n/**\n * Server-patch applies the provided Flight data to the cache and router tree.\n */\nexport interface ServerPatchAction {\n  type: typeof ACTION_SERVER_PATCH\n  previousTree: FlightRouterState\n  url: URL\n  nextUrl: string | null\n  seed: NavigationSeed | null\n  mpa: boolean\n  navigateType: 'push' | 'replace'\n}\n\n/**\n * PrefetchKind defines the type of prefetching that should be done.\n * - `auto` - if the page is dynamic, prefetch the page data partially, if static prefetch the page data fully.\n * - `full` - prefetch the page data fully.\n */\n\nexport enum PrefetchKind {\n  AUTO = 'auto',\n  FULL = 'full',\n}\n\n/**\n * Prefetch adds the provided FlightData to the prefetch cache\n * - Creates the router state tree based on the patch in FlightData\n * - Adds the FlightData to the prefetch cache\n * - In ACTION_NAVIGATE the prefetch cache is checked and the router state tree and FlightData are applied.\n */\n\nexport interface PushRef {\n  /**\n   * If the app-router should push a new history entry in app-router's useEffect()\n   */\n  pendingPush: boolean\n  /**\n   * Multi-page navigation through location.href.\n   */\n  mpaNavigation: boolean\n  /**\n   * Skip applying the router state to the browser history state.\n   */\n  preserveCustomHistoryState: boolean\n}\n\n/**\n * Controls the scroll behavior for a navigation.\n */\nexport const enum ScrollBehavior {\n  /** Use per-node ScrollRef to decide whether to scroll. */\n  Default = 0,\n  /** Suppress scroll entirely (e.g. scroll={false} on Link or router.push). */\n  NoScroll = 1,\n}\n\nexport type FocusAndScrollRef = {\n  /**\n   * The scroll ref from the most recent navigation. Set to whatever was\n   * accumulated during tree construction (or null if nothing was\n   * accumulated). On the next navigation, if new scroll targets are\n   * created, the previous scrollRef is invalidated by setting\n   * `current = false`.\n   */\n  scrollRef: ScrollRef | null\n  /**\n   * When true, the scroll handler uses `focusAndScrollRef.scrollRef`\n   * for every segment regardless of per-node state. Used for hash-only\n   * navigations where every segment should be treated as a scroll\n   * target. When false, the handler checks `cacheNode.scrollRef`\n   * instead (per-node), so only segments that actually navigated scroll.\n   */\n  forceScroll: boolean\n  /**\n   * The hash fragment that should be scrolled to.\n   */\n  hashFragment: string | null\n  /**\n   * If only the URLs hash fragment changed\n   */\n  onlyHashChange: boolean\n}\n\n/**\n * Handles keeping the state of app-router.\n */\nexport type AppRouterState = {\n  /**\n   * The router state, this is written into the history state in app-router using replaceState/pushState.\n   * - Has to be serializable as it is written into the history state.\n   * - Holds which segments and parallel routes are shown on the screen.\n   */\n  tree: FlightRouterState\n  /**\n   * The cache holds React nodes for every segment that is shown on screen as well as previously shown segments.\n   * It also holds in-progress data requests.\n   */\n  cache: CacheNode\n  /**\n   * Decides if the update should create a new history entry and if the navigation has to trigger a browser navigation.\n   */\n  pushRef: PushRef\n  /**\n   * Decides if the update should apply scroll and focus management.\n   */\n  focusAndScrollRef: FocusAndScrollRef\n  /**\n   * The canonical url that is pushed/replaced.\n   * - This is the url you see in the browser.\n   */\n  canonicalUrl: string\n\n  /**\n   * The search query observed by the server during rendering. This may be\n   * different from the canonical URL's search query if the server performed\n   * a rewrite. Even though a client component won't observe this (unless it\n   * were passed from a Server component), the client router needs to know this\n   * so it can properly cache segment data; it'ss part of a page segment's\n   * cache key.\n   */\n  renderedSearch: string\n\n  /**\n   * The underlying \"url\" representing the UI state, which is used for intercepting routes.\n   */\n  nextUrl: string | null\n\n  /**\n   * The previous next-url that was used previous to a dynamic navigation.\n   */\n  previousNextUrl: string | null\n\n  debugInfo: Array<unknown> | null\n}\n\nexport type ReadonlyReducerState = Readonly<AppRouterState>\nexport type ReducerState =\n  | (Promise<AppRouterState> & { _debugInfo?: Array<unknown> })\n  | AppRouterState\nexport type ReducerActions = Readonly<\n  | RefreshAction\n  | NavigateAction\n  | RestoreAction\n  | ServerPatchAction\n  | HmrRefreshAction\n  | ServerActionAction\n>\n","'use client'\n\nimport { computeCacheBustingSearchParam } from '../../../shared/lib/router/utils/cache-busting-search-param'\nimport {\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  NEXT_URL,\n  NEXT_RSC_UNION_QUERY,\n} from '../app-router-headers'\nimport type { RequestHeaders } from './fetch-server-response'\n\n/**\n * Mutates the provided URL by adding a cache-busting search parameter for CDNs that don't\n * support custom headers. This helps avoid caching conflicts by making each request unique.\n *\n * Rather than relying on the Vary header which some CDNs ignore, we append a search param\n * to create a unique URL that forces a fresh request.\n *\n * Example:\n * URL before: https://example.com/path?query=1\n * URL after: https://example.com/path?query=1&_rsc=abc123\n *\n * Note: This function mutates the input URL directly and does not return anything.\n *\n * TODO: Since we need to use a search param anyway, we could simplify by removing the custom\n * headers approach entirely and just use search params.\n */\nexport const setCacheBustingSearchParam = (\n  url: URL,\n  headers: RequestHeaders\n): void => {\n  const uniqueCacheKey = computeCacheBustingSearchParam(\n    headers[NEXT_ROUTER_PREFETCH_HEADER],\n    headers[NEXT_ROUTER_SEGMENT_PREFETCH_HEADER],\n    headers[NEXT_ROUTER_STATE_TREE_HEADER],\n    headers[NEXT_URL]\n  )\n  setCacheBustingSearchParamWithHash(url, uniqueCacheKey)\n}\n\n/**\n * Sets a cache-busting search parameter on a URL using a provided hash value.\n *\n * This function performs the same logic as `setCacheBustingSearchParam` but accepts\n * a pre-computed hash instead of computing it from headers.\n *\n * Example:\n * URL before: https://example.com/path?query=1\n * hash: \"abc123\"\n * URL after: https://example.com/path?query=1&_rsc=abc123\n *\n * If the hash is null, we will set `_rsc` search param without a value.\n * Like this: https://example.com/path?query=1&_rsc\n *\n * Note: This function mutates the input URL directly and does not return anything.\n */\nexport const setCacheBustingSearchParamWithHash = (\n  url: URL,\n  hash: string\n): void => {\n  /**\n   * Note that we intentionally do not use `url.searchParams.set` here:\n   *\n   * const url = new URL('https://example.com/search?q=custom%20spacing');\n   * url.searchParams.set('_rsc', 'abc123');\n   * console.log(url.toString()); // Outputs: https://example.com/search?q=custom+spacing&_rsc=abc123\n   *                                                                             ^ <--- this is causing confusion\n   * This is in fact intended based on https://url.spec.whatwg.org/#interface-urlsearchparams, but\n   * we want to preserve the %20 as %20 if that's what the user passed in, hence the custom\n   * logic below.\n   */\n  const existingSearch = url.search\n  const rawQuery = existingSearch.startsWith('?')\n    ? existingSearch.slice(1)\n    : existingSearch\n\n  // Always remove any existing cache busting param and add a fresh one to ensure\n  // we have the correct value based on current request headers\n  const pairs = rawQuery\n    .split('&')\n    .filter((pair) => pair && !pair.startsWith(`${NEXT_RSC_UNION_QUERY}=`))\n\n  if (hash.length > 0) {\n    pairs.push(`${NEXT_RSC_UNION_QUERY}=${hash}`)\n  } else {\n    pairs.push(`${NEXT_RSC_UNION_QUERY}`)\n  }\n  url.search = pairs.length ? `?${pairs.join('&')}` : ''\n}\n","import { DYNAMIC_STALETIME_MS } from '../router-reducer/reducers/navigate-reducer'\nimport type { SegmentVaryPath } from './vary-path'\n\n/**\n * Sentinel value indicating that no per-page dynamic stale time was provided.\n * When this is the dynamicStaleTime, the default DYNAMIC_STALETIME_MS is used.\n */\nexport const UnknownDynamicStaleTime = -1\n\n/**\n * Converts a dynamic stale time (in seconds, as sent by the server in the `d`\n * field of the Flight response) to an absolute staleAt timestamp. When the\n * value is unknown, falls back to the global DYNAMIC_STALETIME_MS.\n */\nexport function computeDynamicStaleAt(\n  now: number,\n  dynamicStaleTimeSeconds: number\n): number {\n  return dynamicStaleTimeSeconds !== UnknownDynamicStaleTime\n    ? now + dynamicStaleTimeSeconds * 1000\n    : now + DYNAMIC_STALETIME_MS\n}\nimport {\n  setInCacheMap,\n  getFromCacheMap,\n  type UnknownMapEntry,\n  type CacheMap,\n  createCacheMap,\n} from './cache-map'\n\nexport type BFCacheEntry = {\n  rsc: React.ReactNode | null\n  prefetchRsc: React.ReactNode | null\n  head: React.ReactNode | null\n  prefetchHead: React.ReactNode | null\n\n  ref: UnknownMapEntry | null\n  size: number\n  // The time at which this data was received. Used to compute the stale time\n  // for dynamic prefetches (which use STATIC_STALETIME_MS instead of\n  // DYNAMIC_STALETIME_MS). Stored explicitly because staleAt may be\n  // overridden by a per-page unstable_dynamicStaleTime, which would break\n  // any reverse calculation from staleAt.\n  navigatedAt: number\n  staleAt: number\n  version: number\n}\n\nconst bfcacheMap: CacheMap<BFCacheEntry> = createCacheMap()\n\nlet currentBfCacheVersion = 0\n\nexport function invalidateBfCache(): void {\n  if (typeof window === 'undefined') {\n    return\n  }\n  currentBfCacheVersion++\n}\n\nexport function writeToBFCache(\n  now: number,\n  varyPath: SegmentVaryPath,\n  rsc: React.ReactNode,\n  prefetchRsc: React.ReactNode,\n  head: React.ReactNode,\n  prefetchHead: React.ReactNode,\n  dynamicStaleAt: number\n): void {\n  if (typeof window === 'undefined') {\n    return\n  }\n\n  const entry: BFCacheEntry = {\n    rsc,\n    prefetchRsc,\n\n    // TODO: These fields will be removed from both BFCacheEntry and\n    // SegmentCacheEntry. The head has its own separate cache entry.\n    head,\n    prefetchHead,\n\n    ref: null,\n    // TODO: This is just a heuristic. Getting the actual size of the segment\n    // isn't feasible because it's part of a larger streaming response. The\n    // LRU will still evict it, we just won't have a fully accurate total\n    // LRU size. However, we'll probably remove the size tracking from the LRU\n    // entirely and use memory pressure events instead.\n    size: 100,\n\n    navigatedAt: now,\n\n    // A back/forward navigation will disregard the stale time. This field is\n    // only relevant when staleTimes.dynamic is enabled or unstable_dynamicStaleTime\n    // is exported by a page.\n    staleAt: dynamicStaleAt,\n    version: currentBfCacheVersion,\n  }\n  const isRevalidation = false\n  setInCacheMap(bfcacheMap, varyPath, entry, isRevalidation)\n}\n\nexport function writeHeadToBFCache(\n  now: number,\n  varyPath: SegmentVaryPath,\n  head: React.ReactNode,\n  prefetchHead: React.ReactNode,\n  dynamicStaleAt: number\n): void {\n  // Read the special \"segment\" that represents the head data.\n  writeToBFCache(now, varyPath, head, prefetchHead, null, null, dynamicStaleAt)\n}\n\n/**\n * Update the staleAt of an existing BFCache entry. Used after a dynamic\n * response arrives with a per-page stale time from `unstable_dynamicStaleTime`.\n * The per-page value is authoritative — it overrides whatever staleAt was set\n * by the default DYNAMIC_STALETIME_MS.\n */\nexport function updateBFCacheEntryStaleAt(\n  varyPath: SegmentVaryPath,\n  newStaleAt: number\n): void {\n  if (typeof window === 'undefined') {\n    return\n  }\n  const isRevalidation = false\n  // Read with staleness bypass (-1) so we can update even stale entries\n  const entry = getFromCacheMap(\n    -1,\n    currentBfCacheVersion,\n    bfcacheMap,\n    varyPath,\n    isRevalidation\n  )\n  if (entry !== null) {\n    entry.staleAt = newStaleAt\n  }\n}\n\nexport function readFromBFCache(\n  varyPath: SegmentVaryPath\n): BFCacheEntry | null {\n  if (typeof window === 'undefined') {\n    return null\n  }\n  const isRevalidation = false\n  return getFromCacheMap(\n    // During a back/forward navigation, it doesn't matter how stale the data\n    // might be. Pass -1 instead of the actual current time to bypass\n    // staleness checks.\n    -1,\n    currentBfCacheVersion,\n    bfcacheMap,\n    varyPath,\n    isRevalidation\n  )\n}\n\nexport function readFromBFCacheDuringRegularNavigation(\n  now: number,\n  varyPath: SegmentVaryPath\n): BFCacheEntry | null {\n  if (typeof window === 'undefined') {\n    return null\n  }\n  const isRevalidation = false\n  return getFromCacheMap(\n    now,\n    currentBfCacheVersion,\n    bfcacheMap,\n    varyPath,\n    isRevalidation\n  )\n}\n","// TypeScript trick to simulate opaque types, like in Flow.\ntype Opaque<K, T> = T & { __brand: K }\n\n// Only functions in this module should be allowed to create CacheKeys.\nexport type NormalizedPathname = Opaque<'NormalizedPathname', string>\nexport type NormalizedSearch = Opaque<'NormalizedSearch', string>\nexport type NormalizedNextUrl = Opaque<'NormalizedNextUrl', string>\n\nexport type RouteCacheKey = Opaque<\n  'RouteCacheKey',\n  {\n    pathname: NormalizedPathname\n    search: NormalizedSearch\n    nextUrl: NormalizedNextUrl | null\n\n    // TODO: Eventually the dynamic params will be added here, too.\n  }\n>\n\nexport function createCacheKey(\n  originalHref: string,\n  nextUrl: string | null\n): RouteCacheKey {\n  const originalUrl = new URL(originalHref)\n  const cacheKey = {\n    pathname: originalUrl.pathname as NormalizedPathname,\n    search: originalUrl.search as NormalizedSearch,\n    nextUrl: nextUrl as NormalizedNextUrl | null,\n  } as RouteCacheKey\n  return cacheKey\n}\n","import type { VaryPath } from './vary-path'\nimport { lruPut, updateLruSize, deleteFromLru } from './lru'\n\n/**\n * A specialized data type for storing multi-key cache entries.\n *\n * The basic structure is a map whose keys are tuples, called the keypath.\n * When querying the cache, keypaths are compared per-element.\n *\n * Example:\n *   set(map, ['https://localhost', 'foo/bar/baz'], 'yay');\n *   get(map, ['https://localhost', 'foo/bar/baz']) -> 'yay'\n *\n * NOTE: Array syntax is used in these examples for illustration purposes, but\n * in reality the paths are lists.\n * \n * The parts of the keypath represent the different inputs that contribute\n * to the entry value. To illustrate, if you were to use this data type to store\n * HTTP responses, the keypath would include the URL and everything listed by\n * the Vary header.\n * \n * See vary-path.ts for more details.\n *\n * The order of elements in a keypath must be consistent between lookups to\n * be considered the same, but besides that, the order of the keys is not\n * semantically meaningful.\n *\n * Keypaths may include a special kind of key called Fallback. When an entry is\n * stored with Fallback as part of its keypath, it means that the entry does not\n * vary by that key. When querying the cache, if an exact match is not found for\n * a keypath, the cache will check for a Fallback match instead. Each element of\n * the keypath may have a Fallback, so retrieval is an O(n ^ 2) operation, but\n * it's expected that keypaths are relatively short.\n *\n * Example:\n *   set(cacheMap, ['store', 'product', 1], PRODUCT_PAGE_1);\n *   set(cacheMap, ['store', 'product', Fallback], GENERIC_PRODUCT_PAGE);\n *\n *   // Exact match\n *   get(cacheMap, ['store', 'product', 1]) -> PRODUCT_PAGE_1\n *\n *   // Fallback match\n *   get(cacheMap, ['store', 'product', 2]) -> GENERIC_PRODUCT_PAGE\n *\n * Because we have the Fallback mechanism, we can impose a constraint that\n * regular JS maps do not have: a value cannot be stored at multiple keypaths\n * simultaneously. These cases should be expressed with Fallback keys instead.\n *\n * Additionally, because values only exist at a single keypath at a time, we\n * can optimize successive lookups by caching the internal map entry on the\n * value itself, using the `ref` field. This is especially useful because it\n * lets us skip the O(n ^ 2) lookup that occurs when Fallback entries\n * are present.\n *\n\n * How to decide if stuff belongs in here, or in cache.ts?\n * -------------------------------------------------------\n * \n * Anything to do with retrival, lifetimes, or eviction needs to go in this\n * module because it affects the fallback algorithm. For example, when\n * performing a lookup, if an entry is stale, it needs to be treated as\n * semantically equivalent to if the entry was not present at all.\n * \n * If there's logic that's not related to the fallback algorithm, though, we\n * should prefer to put it in cache.ts.\n */\n\n// The protocol that values must implement. In practice, the only two types that\n// we ever actually deal with in this module are RouteCacheEntry and\n// SegmentCacheEntry; this is just to keep track of the coupling so we don't\n// leak concerns between the modules unnecessarily.\nexport interface MapValue {\n  ref: UnknownMapEntry | null\n  size: number\n  staleAt: number\n  version: number\n}\n\n/**\n * Represents a node in the cache map and LRU.\n * MapEntry<V> structurally satisfies this interface for any V extends MapValue.\n *\n * The LRU can contain entries of different value types\n * (e.g., both RouteCacheEntry and SegmentCacheEntry). This interface captures\n * the common structure needed for cache map and LRU operations without\n * requiring knowledge of the specific value type.\n */\nexport interface MapEntry<V extends MapValue> {\n  // Cache map structure fields\n  parent: MapEntry<V> | null\n  key: unknown\n  map: Map<unknown, MapEntry<V>> | null\n  value: V | null\n\n  // LRU linked list fields\n  prev: MapEntry<V> | null\n  next: MapEntry<V> | null\n  size: number\n}\n\n/**\n * A looser type for MapEntry\n * This allows the LRU to work with entries of different\n * value types while still providing type safety.\n *\n * The `map` field lets Map<unknown, MapEntry<V>> be assignable to this\n * type since we're only reading from the map, not inserting into it.\n */\nexport type UnknownMapEntry = {\n  parent: UnknownMapEntry | null\n  key: unknown\n  map: Pick<Map<unknown, UnknownMapEntry>, 'get' | 'delete' | 'size'> | null\n  value: MapValue | null\n\n  prev: UnknownMapEntry | null\n  next: UnknownMapEntry | null\n  size: number\n}\n\n// The CacheMap type is just the root entry of the map.\nexport type CacheMap<V extends MapValue> = MapEntry<V>\n\nexport type FallbackType = { __brand: 'Fallback' }\nexport const Fallback = {} as FallbackType\n\n// This is a special internal key that is used for \"revalidation\" entries. It's\n// an implementation detail that shouldn't leak outside of this module.\nconst Revalidation = {}\n\nexport function createCacheMap<V extends MapValue>(): CacheMap<V> {\n  const cacheMap: MapEntry<V> = {\n    parent: null,\n    key: null,\n    value: null,\n    map: null,\n\n    // LRU-related fields\n    prev: null,\n    next: null,\n    size: 0,\n  }\n  return cacheMap\n}\n\nfunction getOrInitialize<V extends MapValue>(\n  cacheMap: CacheMap<V>,\n  keys: VaryPath,\n  isRevalidation: boolean\n): MapEntry<V> {\n  // Go through each level of keys until we find the entry that matches, or\n  // create a new entry if one doesn't exist.\n  //\n  // This function will only return entries that match the keypath _exactly_.\n  // Unlike getWithFallback, it will not access fallback entries unless it's\n  // explicitly part of the keypath.\n  let entry = cacheMap\n  let remainingKeys: VaryPath | null = keys\n  let key: unknown | null = null\n  while (true) {\n    const previousKey = key\n    if (remainingKeys !== null) {\n      key = remainingKeys.value\n      remainingKeys = remainingKeys.parent\n    } else if (isRevalidation && previousKey !== Revalidation) {\n      // During a revalidation, we append an internal \"Revalidation\" key to\n      // the end of the keypath. The \"normal\" entry is its parent.\n\n      // However, if the parent entry is currently empty, we don't need to store\n      // this as a revalidation entry. Just insert the revalidation into the\n      // normal slot.\n      if (entry.value === null) {\n        return entry\n      }\n\n      // Otheriwse, create a child entry.\n      key = Revalidation\n    } else {\n      // There are no more keys. This is the terminal entry.\n      break\n    }\n\n    let map = entry.map\n    if (map !== null) {\n      const existingEntry = map.get(key)\n      if (existingEntry !== undefined) {\n        // Found a match. Keep going.\n        entry = existingEntry\n        continue\n      }\n    } else {\n      map = new Map()\n      entry.map = map\n    }\n    // No entry exists yet at this level. Create a new one.\n    const newEntry: MapEntry<V> = {\n      parent: entry,\n      key,\n      value: null,\n      map: null,\n\n      // LRU-related fields\n      prev: null,\n      next: null,\n      size: 0,\n    }\n    map.set(key, newEntry)\n    entry = newEntry\n  }\n\n  return entry\n}\n\nexport function getFromCacheMap<V extends MapValue>(\n  now: number,\n  currentCacheVersion: number,\n  rootEntry: CacheMap<V>,\n  keys: VaryPath,\n  isRevalidation: boolean\n): V | null {\n  const entry = getEntryWithFallbackImpl(\n    now,\n    currentCacheVersion,\n    rootEntry,\n    keys,\n    isRevalidation,\n    0\n  )\n  if (entry === null || entry.value === null) {\n    return null\n  }\n  // This is an LRU access. Move the entry to the front of the list.\n  lruPut(entry)\n  return entry.value\n}\n\nexport function isValueExpired(\n  now: number,\n  currentCacheVersion: number,\n  value: MapValue\n): boolean {\n  return value.staleAt <= now || value.version < currentCacheVersion\n}\n\nfunction lazilyEvictIfNeeded<V extends MapValue>(\n  now: number,\n  currentCacheVersion: number,\n  entry: MapEntry<V>\n) {\n  // We have a matching entry, but before we can return it, we need to check if\n  // it's still fresh. Otherwise it should be treated the same as a cache miss.\n\n  if (entry.value === null) {\n    // This entry has no value, so there's nothing to evict.\n    return entry\n  }\n\n  const value = entry.value\n  if (isValueExpired(now, currentCacheVersion, value)) {\n    // The value expired. Lazily evict it from the cache, and return null. This\n    // is conceptually the same as a cache miss.\n    deleteMapEntry(entry)\n    return null\n  }\n\n  // The matched entry has not expired. Return it.\n  return entry\n}\n\nfunction getEntryWithFallbackImpl<V extends MapValue>(\n  now: number,\n  currentCacheVersion: number,\n  entry: MapEntry<V>,\n  keys: VaryPath | null,\n  isRevalidation: boolean,\n  previousKey: unknown | null\n): MapEntry<V> | null {\n  // This is similar to getExactEntry, but if an exact match is not found for\n  // a key, it will return the fallback entry instead. This is recursive at\n  // every level, e.g. an entry with keypath [a, Fallback, c, Fallback] is\n  // valid match for [a, b, c, d].\n  //\n  // It will return the most specific match available.\n  let key\n  let remainingKeys: VaryPath | null\n  if (keys !== null) {\n    key = keys.value\n    remainingKeys = keys.parent\n  } else if (isRevalidation && previousKey !== Revalidation) {\n    // During a revalidation, we append an internal \"Revalidation\" key to\n    // the end of the keypath.\n    key = Revalidation\n    remainingKeys = null\n  } else {\n    // There are no more keys. This is the terminal entry.\n\n    // TODO: When performing a lookup during a navigation, as opposed to a\n    // prefetch, we may want to skip entries that are Pending if there's also\n    // a Fulfilled fallback entry. Tricky to say, though, since if it's\n    // already pending, it's likely to stream in soon. Maybe we could do this\n    // just on slow connections and offline mode.\n\n    return lazilyEvictIfNeeded(now, currentCacheVersion, entry)\n  }\n  const map = entry.map\n  if (map !== null) {\n    const existingEntry = map.get(key)\n    if (existingEntry !== undefined) {\n      // Found an exact match for this key. Keep searching.\n      const result = getEntryWithFallbackImpl(\n        now,\n        currentCacheVersion,\n        existingEntry,\n        remainingKeys,\n        isRevalidation,\n        key\n      )\n      if (result !== null) {\n        return result\n      }\n    }\n    // No match found for this key. Check if there's a fallback.\n    const fallbackEntry = map.get(Fallback)\n    if (fallbackEntry !== undefined) {\n      // Found a fallback for this key. Keep searching.\n      return getEntryWithFallbackImpl(\n        now,\n        currentCacheVersion,\n        fallbackEntry,\n        remainingKeys,\n        isRevalidation,\n        key\n      )\n    }\n  }\n  return null\n}\n\nexport function setInCacheMap<V extends MapValue>(\n  cacheMap: CacheMap<V>,\n  keys: VaryPath,\n  value: V,\n  isRevalidation: boolean\n): void {\n  // Add a value to the map at the given keypath. If the value is already\n  // part of the map, it's removed from its previous keypath. (NOTE: This is\n  // unlike a regular JS map, but the behavior is intentional.)\n  const entry = getOrInitialize(cacheMap, keys, isRevalidation)\n  setMapEntryValue(entry, value)\n\n  // This is an LRU access. Move the entry to the front of the list.\n  lruPut(entry)\n  updateLruSize(entry, value.size)\n}\n\nfunction setMapEntryValue(entry: UnknownMapEntry, value: MapValue): void {\n  if (entry.value !== null) {\n    // There's already a value at the given keypath. Disconnect the old value\n    // from the map. We're not calling `deleteMapEntry` here because the\n    // entry itself is still in the map. We just want to overwrite its value.\n    dropRef(entry.value)\n    entry.value = null\n  }\n\n  // This value may already be in the map at a different keypath.\n  // Grab a reference before we overwrite it.\n  const oldEntry = value.ref\n\n  entry.value = value\n  value.ref = entry\n\n  updateLruSize(entry, value.size)\n\n  if (oldEntry !== null && oldEntry !== entry && oldEntry.value === value) {\n    // This value is already in the map at a different keypath in the map.\n    // Values only exist at a single keypath at a time. Remove it from the\n    // previous keypath.\n    //\n    // Note that only the internal map entry is garbage collected; we don't\n    // call `dropRef` here because it's still in the map, just\n    // at a new keypath (the one we just set, above).\n    deleteMapEntry(oldEntry)\n  }\n}\n\nexport function deleteFromCacheMap(value: MapValue): void {\n  const entry = value.ref\n  if (entry === null) {\n    // This value is not a member of any map.\n    return\n  }\n\n  dropRef(value)\n  deleteMapEntry(entry)\n}\n\nfunction dropRef(value: MapValue): void {\n  // Drop the value from the map by setting its `ref` backpointer to\n  // null. This is a separate operation from `deleteMapEntry` because when\n  // re-keying a value we need to be able to delete the old, internal map\n  // entry without garbage collecting the value itself.\n  value.ref = null\n}\n\nexport function deleteMapEntry(entry: UnknownMapEntry): void {\n  // Delete the entry from the cache.\n  entry.value = null\n\n  deleteFromLru(entry)\n\n  // Check if we can garbage collect the entry.\n  const map = entry.map\n  if (map === null) {\n    // Since this entry has no value, and also no child entries, we can\n    // garbage collect it. Remove it from its parent, and keep garbage\n    // collecting the parents until we reach a non-empty entry.\n    let parent = entry.parent\n    let key = entry.key\n    while (parent !== null) {\n      const parentMap = parent.map\n      if (parentMap !== null) {\n        parentMap.delete(key)\n        if (parentMap.size === 0) {\n          // We just removed the last entry in the parent map.\n          parent.map = null\n          if (parent.value === null) {\n            // The parent node has no child entries, nor does it have a value\n            // on itself. It can be garbage collected. Keep going.\n            key = parent.key\n            parent = parent.parent\n            continue\n          }\n        }\n      }\n      // The parent is not empty. Stop garbage collecting.\n      break\n    }\n  } else {\n    // Check if there's a revalidating entry. If so, promote it to a\n    // \"normal\" entry, since the normal one was just deleted.\n    const revalidatingEntry = map.get(Revalidation)\n    if (revalidatingEntry !== undefined && revalidatingEntry.value !== null) {\n      setMapEntryValue(entry, revalidatingEntry.value)\n    }\n  }\n}\n\nexport function setSizeInCacheMap<V extends MapValue>(\n  value: V,\n  size: number\n): void {\n  const entry = value.ref\n  if (entry === null) {\n    // This value is not a member of any map.\n    return\n  }\n  // Except during initialization (when the size is set to 0), this is the only\n  // place the `size` field should be updated, to ensure it's in sync with the\n  // the LRU.\n  value.size = size\n  updateLruSize(entry, size)\n}\n","/**\n * Vary Params Decoding\n *\n * This module is shared between server and client.\n */\n\nexport type VaryParams = Set<string>\n\ntype FulfilledVaryParamsThenable = {\n  status: 'fulfilled'\n  value: VaryParams\n} & PromiseLike<VaryParams>\n\ntype PendingVaryParamsThenable = {\n  // 'resolved_model' is an internal React Flight state: the underlying model\n  // data has arrived but the thenable hasn't been \"unwrapped\" yet. Calling\n  // .then() triggers Flight to synchronously transition to 'fulfilled'.\n  status: 'pending' | 'resolved_model'\n  value: unknown\n} & PromiseLike<VaryParams>\n\nexport type VaryParamsThenable =\n  | FulfilledVaryParamsThenable\n  | PendingVaryParamsThenable\n\n/**\n * Synchronously reads vary params from a thenable.\n *\n * By the time this is called (client-side or in collectSegmentData), the\n * thenable should already be fulfilled because the Flight stream has been\n * fully received. We check the status synchronously to avoid unnecessary\n * microtasks.\n *\n * Returns null if the thenable is still pending (which shouldn't happen in\n * normal operation - it indicates the server failed to track vary params).\n */\nexport function readVaryParams(\n  thenable: VaryParamsThenable\n): VaryParams | null {\n  // Attach a no-op listener to force Flight to synchronously resolve the\n  // thenable. When a thenable arrives from the Flight stream, it may be in an\n  // intermediate 'resolved_model' state (data received but not unwrapped).\n  // Calling .then() triggers Flight to transition it to 'fulfilled', making\n  // the value available synchronously. React uses this same optimization\n  // internally to avoid unnecessary microtasks.\n  thenable.then(noop)\n  // If the thenable is still not 'fulfilled' after calling .then(), the server\n  // failed to resolve it before the stream ended. Treat as unknown.\n  if (thenable.status !== 'fulfilled') {\n    return null\n  }\n  return thenable.value\n}\n\nconst noop = () => {}\n","import type {\n  TreePrefetch,\n  RootTreePrefetch,\n  SegmentPrefetch,\n  InlinedPrefetchResponse,\n  InlinedSegmentPrefetch,\n} from '../../../server/app-render/collect-segment-data'\nimport type {\n  CacheNodeSeedData,\n  FlightData,\n  Segment as FlightRouterStateSegment,\n} from '../../../shared/lib/app-router-types'\nimport {\n  readVaryParams,\n  type VaryParams,\n  type VaryParamsThenable,\n} from '../../../shared/lib/segment-cache/vary-params-decoding'\nimport {\n  NEXT_DID_POSTPONE_HEADER,\n  NEXT_INSTANT_PREFETCH_HEADER,\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  NEXT_ROUTER_STALE_TIME_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  NEXT_URL,\n  RSC_CONTENT_TYPE_HEADER,\n  RSC_HEADER,\n} from '../app-router-headers'\nimport {\n  createFetch,\n  createFromNextReadableStream,\n  type RSCResponse,\n  type RequestHeaders,\n} from '../router-reducer/fetch-server-response'\nimport {\n  pingPrefetchTask,\n  isPrefetchTaskDirty,\n  type PrefetchTask,\n  type PrefetchSubtaskResult,\n} from './scheduler'\nimport {\n  type RouteVaryPath,\n  type SegmentVaryPath,\n  type PartialSegmentVaryPath,\n  getRouteVaryPath,\n  getFulfilledRouteVaryPath,\n  getFulfilledSegmentVaryPath,\n  getSegmentVaryPathForRequest,\n  appendLayoutVaryPath,\n  finalizeLayoutVaryPath,\n  finalizePageVaryPath,\n  clonePageVaryPathWithNewSearchParams,\n  type PageVaryPath,\n  type LayoutVaryPath,\n  finalizeMetadataVaryPath,\n  getPartialPageVaryPath,\n  getPartialLayoutVaryPath,\n  getRenderedSearchFromVaryPath,\n} from './vary-path'\nimport { createHrefFromUrl } from '../router-reducer/create-href-from-url'\nimport type {\n  NormalizedPathname,\n  NormalizedSearch,\n  NormalizedNextUrl,\n  RouteCacheKey,\n} from './cache-key'\nimport { createCacheKey as createPrefetchRequestKey } from './cache-key'\nimport {\n  doesStaticSegmentAppearInURL,\n  getCacheKeyForDynamicParam,\n  getRenderedPathname,\n  getRenderedSearch,\n  parseDynamicParamFromURLPart,\n} from '../../route-params'\nimport {\n  createCacheMap,\n  getFromCacheMap,\n  setInCacheMap,\n  setSizeInCacheMap,\n  deleteFromCacheMap,\n  isValueExpired,\n  type CacheMap,\n  type UnknownMapEntry,\n} from './cache-map'\nimport {\n  appendSegmentRequestKeyPart,\n  convertSegmentPathToStaticExportFilename,\n  createSegmentRequestKeyPart,\n  HEAD_REQUEST_KEY,\n  ROOT_SEGMENT_REQUEST_KEY,\n  type SegmentRequestKey,\n} from '../../../shared/lib/segment-cache/segment-value-encoding'\nimport type {\n  FlightRouterState,\n  NavigationFlightResponse,\n} from '../../../shared/lib/app-router-types'\nimport {\n  type NormalizedFlightData,\n  normalizeFlightData,\n  prepareFlightRouterStateForRequest,\n} from '../../flight-data-helpers'\nimport { STATIC_STALETIME_MS } from '../router-reducer/reducers/navigate-reducer'\nimport { pingVisibleLinks } from '../links'\nimport { PAGE_SEGMENT_KEY } from '../../../shared/lib/segment'\nimport { FetchStrategy } from './types'\nimport { createPromiseWithResolvers } from '../../../shared/lib/promise-with-resolvers'\nimport { readFromBFCache, UnknownDynamicStaleTime } from './bfcache'\nimport { discoverKnownRoute, matchKnownRoute } from './optimistic-routes'\nimport { convertServerPatchToFullTree, type NavigationSeed } from './navigation'\nimport { getNavigationBuildId } from '../../navigation-build-id'\nimport { NEXT_NAV_DEPLOYMENT_ID_HEADER } from '../../../lib/constants'\n\n/**\n * Ensures a minimum stale time of 30s to avoid issues where the server sends a too\n * short-lived stale time, which would prevent anything from being prefetched.\n */\nexport function getStaleTimeMs(staleTimeSeconds: number): number {\n  return Math.max(staleTimeSeconds, 30) * 1000\n}\n\n// A note on async/await when working in the prefetch cache:\n//\n// Most async operations in the prefetch cache should *not* use async/await,\n// Instead, spawn a subtask that writes the results to a cache entry, and attach\n// a \"ping\" listener to notify the prefetch queue to try again.\n//\n// The reason is we need to be able to access the segment cache and traverse its\n// data structures synchronously. For example, if there's a synchronous update\n// we can take an immediate snapshot of the cache to produce something we can\n// render. Limiting the use of async/await also makes it easier to avoid race\n// conditions, which is especially important because is cache is mutable.\n//\n// Another reason is that while we're performing async work, it's possible for\n// existing entries to become stale, or for Link prefetches to be removed from\n// the queue. For optimal scheduling, we need to be able to \"cancel\" subtasks\n// that are no longer needed. So, when a segment is received from the server, we\n// restart from the root of the tree that's being prefetched, to confirm all the\n// parent segments are still cached. If the segment is no longer reachable from\n// the root, then it's effectively canceled. This is similar to the design of\n// Rust Futures, or React Suspense.\n\ntype RouteTreeShared = {\n  requestKey: SegmentRequestKey\n  // TODO: Remove the `segment` field, now that it can be reconstructed\n  // from `param`.\n  segment: FlightRouterStateSegment\n  refreshState: RefreshState | null\n  slots: null | {\n    [parallelRouteKey: string]: RouteTree\n  }\n  // Bitmask of PrefetchHint flags. Encodes route structure metadata:\n  // root layout, loading boundaries, instant configs, and runtime prefetch\n  // hints.\n  prefetchHints: number\n}\n\nexport type RefreshState = {\n  canonicalUrl: string\n  renderedSearch: NormalizedSearch\n}\n\ntype LayoutRouteTree = RouteTreeShared & {\n  isPage: false\n  varyPath: LayoutVaryPath\n}\n\ntype PageRouteTree = RouteTreeShared & {\n  isPage: true\n  varyPath: PageVaryPath\n}\n\nexport type RouteTree = LayoutRouteTree | PageRouteTree\n\ntype RouteCacheEntryShared = {\n  // This is false only if we're certain the route cannot be intercepted. It's\n  // true in all other cases, including on initialization when we haven't yet\n  // received a response from the server.\n  couldBeIntercepted: boolean\n\n  // Map-related fields.\n  ref: UnknownMapEntry | null\n  size: number\n  staleAt: number\n  version: number\n}\n\n/**\n * Tracks the status of a cache entry as it progresses from no data (Empty),\n * waiting for server data (Pending), and finished (either Fulfilled or\n * Rejected depending on the response from the server.\n */\nexport const enum EntryStatus {\n  Empty = 0,\n  Pending = 1,\n  Fulfilled = 2,\n  Rejected = 3,\n}\n\nexport type PendingRouteCacheEntry = RouteCacheEntryShared & {\n  status: EntryStatus.Empty | EntryStatus.Pending\n  blockedTasks: Set<PrefetchTask> | null\n  canonicalUrl: null\n  renderedSearch: null\n  tree: null\n  metadata: null\n  supportsPerSegmentPrefetching: false\n}\n\ntype RejectedRouteCacheEntry = RouteCacheEntryShared & {\n  status: EntryStatus.Rejected\n  blockedTasks: Set<PrefetchTask> | null\n  canonicalUrl: null\n  renderedSearch: null\n  tree: null\n  metadata: null\n  supportsPerSegmentPrefetching: boolean\n}\n\nexport type FulfilledRouteCacheEntry = RouteCacheEntryShared & {\n  status: EntryStatus.Fulfilled\n  blockedTasks: null\n  canonicalUrl: string\n  renderedSearch: NormalizedSearch\n  tree: RouteTree\n  metadata: RouteTree\n  supportsPerSegmentPrefetching: boolean\n  // When true, this entry should not be used as a template for route\n  // prediction. Set when we discover that the URL was rewritten by middleware\n  // to a different route structure (e.g., /foo was rewritten to /bar). Since\n  // rewrite behavior can vary by param value, we can't safely predict the\n  // route structure for other URLs matching this pattern.\n  hasDynamicRewrite: boolean\n}\n\nexport type RouteCacheEntry =\n  | PendingRouteCacheEntry\n  | FulfilledRouteCacheEntry\n  | RejectedRouteCacheEntry\n\ntype SegmentCacheEntryShared = {\n  fetchStrategy: FetchStrategy\n\n  // Map-related fields.\n  ref: UnknownMapEntry | null\n  size: number\n  staleAt: number\n  version: number\n}\n\nexport type EmptySegmentCacheEntry = SegmentCacheEntryShared & {\n  status: EntryStatus.Empty\n  rsc: null\n  isPartial: true\n  promise: null\n}\n\nexport type PendingSegmentCacheEntry = SegmentCacheEntryShared & {\n  status: EntryStatus.Pending\n  rsc: null\n  isPartial: boolean\n  promise: null | PromiseWithResolvers<FulfilledSegmentCacheEntry | null>\n}\n\ntype RejectedSegmentCacheEntry = SegmentCacheEntryShared & {\n  status: EntryStatus.Rejected\n  rsc: null\n  isPartial: true\n  promise: null\n}\n\nexport type FulfilledSegmentCacheEntry = SegmentCacheEntryShared & {\n  status: EntryStatus.Fulfilled\n  rsc: React.ReactNode | null\n  isPartial: boolean\n  promise: null\n}\n\nexport type SegmentCacheEntry =\n  | EmptySegmentCacheEntry\n  | PendingSegmentCacheEntry\n  | RejectedSegmentCacheEntry\n  | FulfilledSegmentCacheEntry\n\nexport type NonEmptySegmentCacheEntry = Exclude<\n  SegmentCacheEntry,\n  EmptySegmentCacheEntry\n>\n\nconst isOutputExportMode =\n  process.env.NODE_ENV === 'production' &&\n  process.env.__NEXT_CONFIG_OUTPUT === 'export'\n\nconst MetadataOnlyRequestTree: FlightRouterState = [\n  '',\n  {},\n  null,\n  'metadata-only',\n]\n\nlet routeCacheMap: CacheMap<RouteCacheEntry> = createCacheMap()\nlet segmentCacheMap: CacheMap<SegmentCacheEntry> = createCacheMap()\n\n// All invalidation listeners for the whole cache are tracked in single set.\n// Since we don't yet support tag or path-based invalidation, there's no point\n// tracking them any more granularly than this. Once we add granular\n// invalidation, that may change, though generally the model is to just notify\n// the listeners and allow the caller to poll the prefetch cache with a new\n// prefetch task if desired.\nlet invalidationListeners: Set<PrefetchTask> | null = null\n\n// Incrementing counters used to track cache invalidations. Route and segment\n// caches have separate versions so they can be invalidated independently.\n// Invalidation does not eagerly evict anything from the cache; entries are\n// lazily evicted when read.\nlet currentRouteCacheVersion = 0\nlet currentSegmentCacheVersion = 0\n\nexport function getCurrentRouteCacheVersion(): number {\n  return currentRouteCacheVersion\n}\n\nexport function getCurrentSegmentCacheVersion(): number {\n  return currentSegmentCacheVersion\n}\n\n/**\n * Invalidates all prefetch cache entries (both route and segment caches).\n *\n * After invalidation, triggers re-prefetching of visible links and notifies\n * invalidation listeners.\n */\nexport function invalidateEntirePrefetchCache(\n  nextUrl: string | null,\n  tree: FlightRouterState\n): void {\n  currentRouteCacheVersion++\n  currentSegmentCacheVersion++\n\n  pingVisibleLinks(nextUrl, tree)\n  pingInvalidationListeners(nextUrl, tree)\n}\n\n/**\n * Invalidates all route cache entries. Route entries contain the tree structure\n * (which segments exist at a given URL) but not the segment data itself.\n *\n * After invalidation, triggers re-prefetching of visible links and notifies\n * invalidation listeners.\n */\nexport function invalidateRouteCacheEntries(\n  nextUrl: string | null,\n  tree: FlightRouterState\n): void {\n  currentRouteCacheVersion++\n\n  pingVisibleLinks(nextUrl, tree)\n  pingInvalidationListeners(nextUrl, tree)\n}\n\n/**\n * Invalidates all segment cache entries. Segment entries contain the actual\n * RSC data for each segment.\n *\n * After invalidation, triggers re-prefetching of visible links and notifies\n * invalidation listeners.\n */\nexport function invalidateSegmentCacheEntries(\n  nextUrl: string | null,\n  tree: FlightRouterState\n): void {\n  currentSegmentCacheVersion++\n\n  pingVisibleLinks(nextUrl, tree)\n  pingInvalidationListeners(nextUrl, tree)\n}\n\nfunction attachInvalidationListener(task: PrefetchTask): void {\n  // This function is called whenever a prefetch task reads a cache entry. If\n  // the task has an onInvalidate function associated with it — i.e. the one\n  // optionally passed to router.prefetch(onInvalidate) — then we attach that\n  // listener to the every cache entry that the task reads. Then, if an entry\n  // is invalidated, we call the function.\n  if (task.onInvalidate !== null) {\n    if (invalidationListeners === null) {\n      invalidationListeners = new Set([task])\n    } else {\n      invalidationListeners.add(task)\n    }\n  }\n}\n\nfunction notifyInvalidationListener(task: PrefetchTask): void {\n  const onInvalidate = task.onInvalidate\n  if (onInvalidate !== null) {\n    // Clear the callback from the task object to guarantee it's not called more\n    // than once.\n    task.onInvalidate = null\n\n    // This is a user-space function, so we must wrap in try/catch.\n    try {\n      onInvalidate()\n    } catch (error) {\n      if (typeof reportError === 'function') {\n        reportError(error)\n      } else {\n        console.error(error)\n      }\n    }\n  }\n}\n\nexport function pingInvalidationListeners(\n  nextUrl: string | null,\n  tree: FlightRouterState\n): void {\n  // The rough equivalent of pingVisibleLinks, but for onInvalidate callbacks.\n  // This is called when the Next-Url or the base tree changes, since those\n  // may affect the result of a prefetch task. It's also called after a\n  // cache invalidation.\n  if (invalidationListeners !== null) {\n    const tasks = invalidationListeners\n    invalidationListeners = null\n    for (const task of tasks) {\n      if (isPrefetchTaskDirty(task, nextUrl, tree)) {\n        notifyInvalidationListener(task)\n      }\n    }\n  }\n}\n\nexport function readRouteCacheEntry(\n  now: number,\n  key: RouteCacheKey\n): RouteCacheEntry | null {\n  const varyPath: RouteVaryPath = getRouteVaryPath(\n    key.pathname,\n    key.search,\n    key.nextUrl\n  )\n  const isRevalidation = false\n  const existingEntry = getFromCacheMap(\n    now,\n    getCurrentRouteCacheVersion(),\n    routeCacheMap,\n    varyPath,\n    isRevalidation\n  )\n  if (existingEntry !== null) {\n    return existingEntry\n  }\n\n  // No cache hit. Attempt to construct from template using the new\n  // optimistic routing mechanism (pattern-based matching).\n  if (process.env.__NEXT_OPTIMISTIC_ROUTING) {\n    return matchKnownRoute(key.pathname, key.search)\n  }\n\n  return null\n}\n\nexport function readSegmentCacheEntry(\n  now: number,\n  varyPath: SegmentVaryPath\n): SegmentCacheEntry | null {\n  const isRevalidation = false\n  return getFromCacheMap(\n    now,\n    getCurrentSegmentCacheVersion(),\n    segmentCacheMap,\n    varyPath,\n    isRevalidation\n  )\n}\n\nfunction readRevalidatingSegmentCacheEntry(\n  now: number,\n  varyPath: SegmentVaryPath\n): SegmentCacheEntry | null {\n  const isRevalidation = true\n  return getFromCacheMap(\n    now,\n    getCurrentSegmentCacheVersion(),\n    segmentCacheMap,\n    varyPath,\n    isRevalidation\n  )\n}\n\nexport function waitForSegmentCacheEntry(\n  pendingEntry: PendingSegmentCacheEntry\n): Promise<FulfilledSegmentCacheEntry | null> {\n  // Because the entry is pending, there's already a in-progress request.\n  // Attach a promise to the entry that will resolve when the server responds.\n  let promiseWithResolvers = pendingEntry.promise\n  if (promiseWithResolvers === null) {\n    promiseWithResolvers = pendingEntry.promise =\n      createPromiseWithResolvers<FulfilledSegmentCacheEntry | null>()\n  } else {\n    // There's already a promise we can use\n  }\n  return promiseWithResolvers.promise\n}\n\nfunction createDetachedRouteCacheEntry(): PendingRouteCacheEntry {\n  return {\n    canonicalUrl: null,\n    status: EntryStatus.Empty,\n    blockedTasks: null,\n    tree: null,\n    metadata: null,\n    // This is initialized to true because we don't know yet whether the route\n    // could be intercepted. It's only set to false once we receive a response\n    // from the server.\n    couldBeIntercepted: true,\n    // Similarly, we don't yet know if the route supports PPR.\n    supportsPerSegmentPrefetching: false,\n    renderedSearch: null,\n\n    // Map-related fields\n    ref: null,\n    size: 0,\n    // Since this is an empty entry, there's no reason to ever evict it. It will\n    // be updated when the data is populated.\n    staleAt: Infinity,\n    version: getCurrentRouteCacheVersion(),\n  }\n}\n\n/**\n * Checks if an entry for a route exists in the cache. If so, it returns the\n * entry, If not, it adds an empty entry to the cache and returns it.\n */\nexport function readOrCreateRouteCacheEntry(\n  now: number,\n  task: PrefetchTask,\n  key: RouteCacheKey\n): RouteCacheEntry {\n  attachInvalidationListener(task)\n\n  const existingEntry = readRouteCacheEntry(now, key)\n  if (existingEntry !== null) {\n    return existingEntry\n  }\n  // Create a pending entry and add it to the cache.\n  const pendingEntry = createDetachedRouteCacheEntry()\n  const varyPath: RouteVaryPath = getRouteVaryPath(\n    key.pathname,\n    key.search,\n    key.nextUrl\n  )\n  const isRevalidation = false\n  setInCacheMap(routeCacheMap, varyPath, pendingEntry, isRevalidation)\n  return pendingEntry\n}\n\n// TODO: This function predates the new optimisticRouting feature and will be\n// removed once optimisticRouting is stable. The new mechanism (matchKnownRoute)\n// handles search param variations more robustly as part of the general route\n// prediction system. This fallback remains for when optimisticRouting is\n// disabled (staticChildren is null).\nexport function deprecated_requestOptimisticRouteCacheEntry(\n  now: number,\n  requestedUrl: URL,\n  nextUrl: string | null\n): FulfilledRouteCacheEntry | null {\n  // This function is called during a navigation when there was no matching\n  // route tree in the prefetch cache. Before de-opting to a blocking,\n  // unprefetched navigation, we will first attempt to construct an \"optimistic\"\n  // route tree by checking the cache for similar routes.\n  //\n  // Check if there's a route with the same pathname, but with different\n  // search params. We can then base our optimistic route tree on this entry.\n  //\n  // Conceptually, we are simulating what would happen if we did perform a\n  // prefetch the requested URL, under the assumption that the server will\n  // not redirect or rewrite the request in a different manner than the\n  // base route tree. This assumption might not hold, in which case we'll have\n  // to recover when we perform the dynamic navigation request. However, this\n  // is what would happen if a route were dynamically rewritten/redirected\n  // in between the prefetch and the navigation. So the logic needs to exist\n  // to handle this case regardless.\n\n  // Look for a route with the same pathname, but with an empty search string.\n  // TODO: There's nothing inherently special about the empty search string;\n  // it's chosen somewhat arbitrarily, with the rationale that it's the most\n  // likely one to exist. But we should update this to match _any_ search\n  // string. The plan is to generalize this logic alongside other improvements\n  // related to \"fallback\" cache entries.\n  const requestedSearch = requestedUrl.search as NormalizedSearch\n  if (requestedSearch === '') {\n    // The caller would have already checked if a route with an empty search\n    // string is in the cache. So we can bail out here.\n    return null\n  }\n  const urlWithoutSearchParams = new URL(requestedUrl)\n  urlWithoutSearchParams.search = ''\n  const routeWithNoSearchParams = readRouteCacheEntry(\n    now,\n    createPrefetchRequestKey(urlWithoutSearchParams.href, nextUrl)\n  )\n\n  if (\n    routeWithNoSearchParams === null ||\n    routeWithNoSearchParams.status !== EntryStatus.Fulfilled\n  ) {\n    // Bail out of constructing an optimistic route tree. This will result in\n    // a blocking, unprefetched navigation.\n    return null\n  }\n\n  // Now we have a base route tree we can \"patch\" with our optimistic values.\n\n  // Optimistically assume that redirects for the requested pathname do\n  // not vary on the search string. Therefore, if the base route was\n  // redirected to a different search string, then the optimistic route\n  // should be redirected to the same search string. Otherwise, we use\n  // the requested search string.\n  const canonicalUrlForRouteWithNoSearchParams = new URL(\n    routeWithNoSearchParams.canonicalUrl,\n    requestedUrl.origin\n  )\n  const optimisticCanonicalSearch =\n    canonicalUrlForRouteWithNoSearchParams.search !== ''\n      ? // Base route was redirected. Reuse the same redirected search string.\n        canonicalUrlForRouteWithNoSearchParams.search\n      : requestedSearch\n\n  // Similarly, optimistically assume that rewrites for the requested\n  // pathname do not vary on the search string. Therefore, if the base\n  // route was rewritten to a different search string, then the optimistic\n  // route should be rewritten to the same search string. Otherwise, we use\n  // the requested search string.\n  const optimisticRenderedSearch =\n    routeWithNoSearchParams.renderedSearch !== ''\n      ? // Base route was rewritten. Reuse the same rewritten search string.\n        routeWithNoSearchParams.renderedSearch\n      : requestedSearch\n\n  const optimisticUrl = new URL(\n    routeWithNoSearchParams.canonicalUrl,\n    location.origin\n  )\n  optimisticUrl.search = optimisticCanonicalSearch\n  const optimisticCanonicalUrl = createHrefFromUrl(optimisticUrl)\n\n  const optimisticRouteTree = deprecated_createOptimisticRouteTree(\n    routeWithNoSearchParams.tree,\n    optimisticRenderedSearch\n  )\n  const optimisticMetadataTree = deprecated_createOptimisticRouteTree(\n    routeWithNoSearchParams.metadata,\n    optimisticRenderedSearch\n  )\n\n  // Clone the base route tree, and override the relevant fields with our\n  // optimistic values.\n  const optimisticEntry: FulfilledRouteCacheEntry = {\n    canonicalUrl: optimisticCanonicalUrl,\n\n    status: EntryStatus.Fulfilled,\n    // This isn't cloned because it's instance-specific\n    blockedTasks: null,\n    tree: optimisticRouteTree,\n    metadata: optimisticMetadataTree,\n    couldBeIntercepted: routeWithNoSearchParams.couldBeIntercepted,\n    supportsPerSegmentPrefetching:\n      routeWithNoSearchParams.supportsPerSegmentPrefetching,\n    hasDynamicRewrite: routeWithNoSearchParams.hasDynamicRewrite,\n\n    // Override the rendered search with the optimistic value.\n    renderedSearch: optimisticRenderedSearch,\n\n    // Map-related fields\n    ref: null,\n    size: 0,\n    staleAt: routeWithNoSearchParams.staleAt,\n    version: routeWithNoSearchParams.version,\n  }\n\n  // Do not insert this entry into the cache. It only exists so we can\n  // perform the current navigation. Just return it to the caller.\n  return optimisticEntry\n}\n\nfunction deprecated_createOptimisticRouteTree(\n  tree: RouteTree,\n  newRenderedSearch: NormalizedSearch\n): RouteTree {\n  // Create a new route tree that identical to the original one except for\n  // the rendered search string, which is contained in the vary path.\n\n  let clonedSlots: Record<string, RouteTree> | null = null\n  const originalSlots = tree.slots\n  if (originalSlots !== null) {\n    clonedSlots = {}\n    for (const parallelRouteKey in originalSlots) {\n      const childTree = originalSlots[parallelRouteKey]\n      clonedSlots[parallelRouteKey] = deprecated_createOptimisticRouteTree(\n        childTree,\n        newRenderedSearch\n      )\n    }\n  }\n\n  // We only need to clone the vary path if the route is a page.\n  if (tree.isPage) {\n    return {\n      requestKey: tree.requestKey,\n      segment: tree.segment,\n      refreshState: tree.refreshState,\n      varyPath: clonePageVaryPathWithNewSearchParams(\n        tree.varyPath,\n        newRenderedSearch\n      ),\n      isPage: true,\n      slots: clonedSlots,\n\n      prefetchHints: tree.prefetchHints,\n    }\n  }\n\n  return {\n    requestKey: tree.requestKey,\n    segment: tree.segment,\n    refreshState: tree.refreshState,\n    varyPath: tree.varyPath,\n    isPage: false,\n    slots: clonedSlots,\n    prefetchHints: tree.prefetchHints,\n  }\n}\n\n/**\n * Checks if an entry for a segment exists in the cache. If so, it returns the\n * entry, If not, it adds an empty entry to the cache and returns it.\n */\nexport function readOrCreateSegmentCacheEntry(\n  now: number,\n  fetchStrategy: FetchStrategy,\n  tree: RouteTree\n): SegmentCacheEntry {\n  const existingEntry = readSegmentCacheEntry(now, tree.varyPath)\n  if (existingEntry !== null) {\n    return existingEntry\n  }\n  // Create a pending entry and add it to the cache. The stale time is set to a\n  // default value; the actual stale time will be set when the entry is\n  // fulfilled with data from the server response.\n  const varyPathForRequest = getSegmentVaryPathForRequest(fetchStrategy, tree)\n  const pendingEntry = createDetachedSegmentCacheEntry(now)\n  const isRevalidation = false\n  setInCacheMap(\n    segmentCacheMap,\n    varyPathForRequest,\n    pendingEntry,\n    isRevalidation\n  )\n  return pendingEntry\n}\n\nexport function readOrCreateRevalidatingSegmentEntry(\n  now: number,\n  fetchStrategy: FetchStrategy,\n  tree: RouteTree\n): SegmentCacheEntry {\n  // This function is called when we've already confirmed that a particular\n  // segment is cached, but we want to perform another request anyway in case it\n  // returns more complete and/or fresher data than we already have. The logic\n  // for deciding whether to replace the existing entry is handled elsewhere;\n  // this function just handles retrieving a cache entry that we can use to\n  // track the revalidation.\n  //\n  // The reason revalidations are stored in the cache is because we need to be\n  // able to dedupe multiple revalidation requests. The reason they have to be\n  // handled specially is because we shouldn't overwrite a \"normal\" entry if\n  // one exists at the same keypath. So, for each internal cache location, there\n  // is a special \"revalidation\" slot that is used solely for this purpose.\n  //\n  // You can think of it as if all the revalidation entries were stored in a\n  // separate cache map from the canonical entries, and then transfered to the\n  // canonical cache map once the request is complete — this isn't how it's\n  // actually implemented, since it's more efficient to store them in the same\n  // data structure as the normal entries, but that's how it's modeled\n  // conceptually.\n\n  // TODO: Once we implement Fallback behavior for params, where an entry is\n  // re-keyed based on response information, we'll need to account for the\n  // possibility that the keypath of the previous entry is more generic than\n  // the keypath of the revalidating entry. In other words, the server could\n  // return a less generic entry upon revalidation. For now, though, this isn't\n  // a concern because the keypath is based solely on the prefetch strategy,\n  // not on data contained in the response.\n  const existingEntry = readRevalidatingSegmentCacheEntry(now, tree.varyPath)\n  if (existingEntry !== null) {\n    return existingEntry\n  }\n  // Create a pending entry and add it to the cache. The stale time is set to a\n  // default value; the actual stale time will be set when the entry is\n  // fulfilled with data from the server response.\n  const varyPathForRequest = getSegmentVaryPathForRequest(fetchStrategy, tree)\n  const pendingEntry = createDetachedSegmentCacheEntry(now)\n  const isRevalidation = true\n  setInCacheMap(\n    segmentCacheMap,\n    varyPathForRequest,\n    pendingEntry,\n    isRevalidation\n  )\n  return pendingEntry\n}\n\nexport function overwriteRevalidatingSegmentCacheEntry(\n  now: number,\n  fetchStrategy: FetchStrategy,\n  tree: RouteTree\n) {\n  // This function is called when we've already decided to replace an existing\n  // revalidation entry. Create a new entry and write it into the cache,\n  // overwriting the previous value. The stale time is set to a default value;\n  // the actual stale time will be set when the entry is fulfilled with data\n  // from the server response.\n  const varyPathForRequest = getSegmentVaryPathForRequest(fetchStrategy, tree)\n  const pendingEntry = createDetachedSegmentCacheEntry(now)\n  const isRevalidation = true\n  setInCacheMap(\n    segmentCacheMap,\n    varyPathForRequest,\n    pendingEntry,\n    isRevalidation\n  )\n  return pendingEntry\n}\n\nexport function upsertSegmentEntry(\n  now: number,\n  varyPath: SegmentVaryPath,\n  candidateEntry: SegmentCacheEntry\n): SegmentCacheEntry | null {\n  // We have a new entry that has not yet been inserted into the cache. Before\n  // we do so, we need to confirm whether it takes precedence over the existing\n  // entry (if one exists).\n  // TODO: We should not upsert an entry if its key was invalidated in the time\n  // since the request was made. We can do that by passing the \"owner\" entry to\n  // this function and confirming it's the same as `existingEntry`.\n\n  if (isValueExpired(now, getCurrentSegmentCacheVersion(), candidateEntry)) {\n    // The entry is expired. We cannot upsert it.\n    return null\n  }\n\n  const existingEntry = readSegmentCacheEntry(now, varyPath)\n  if (existingEntry !== null) {\n    // Don't replace a more specific segment with a less-specific one. A case where this\n    // might happen is if the existing segment was fetched via\n    // `<Link prefetch={true}>`.\n    if (\n      // We fetched the new segment using a different, less specific fetch strategy\n      // than the segment we already have in the cache, so it can't have more content.\n      (candidateEntry.fetchStrategy !== existingEntry.fetchStrategy &&\n        !canNewFetchStrategyProvideMoreContent(\n          existingEntry.fetchStrategy,\n          candidateEntry.fetchStrategy\n        )) ||\n      // The existing entry isn't partial, but the new one is.\n      // (TODO: can this be true if `candidateEntry.fetchStrategy >= existingEntry.fetchStrategy`?)\n      (!existingEntry.isPartial && candidateEntry.isPartial)\n    ) {\n      // We're going to leave revalidating entry in the cache so that it doesn't\n      // get revalidated again unnecessarily. Downgrade the Fulfilled entry to\n      // Rejected and null out the data so it can be garbage collected. We leave\n      // `staleAt` intact to prevent subsequent revalidation attempts only until\n      // the entry expires.\n      const rejectedEntry: RejectedSegmentCacheEntry = candidateEntry as any\n      rejectedEntry.status = EntryStatus.Rejected\n      rejectedEntry.rsc = null\n      return null\n    }\n\n    // Evict the existing entry from the cache.\n    deleteFromCacheMap(existingEntry)\n  }\n\n  const isRevalidation = false\n  setInCacheMap(segmentCacheMap, varyPath, candidateEntry, isRevalidation)\n  return candidateEntry\n}\n\nexport function createDetachedSegmentCacheEntry(\n  now: number\n): EmptySegmentCacheEntry {\n  // Default stale time for pending segment cache entries. The actual stale time\n  // is set when the entry is fulfilled with data from the server response.\n  const staleAt = now + 30 * 1000\n  const emptyEntry: EmptySegmentCacheEntry = {\n    status: EntryStatus.Empty,\n    // Default to assuming the fetch strategy will be PPR. This will be updated\n    // when a fetch is actually initiated.\n    fetchStrategy: FetchStrategy.PPR,\n    rsc: null,\n    isPartial: true,\n    promise: null,\n\n    // Map-related fields\n    ref: null,\n    size: 0,\n    staleAt,\n    version: 0,\n  }\n  return emptyEntry\n}\n\nexport function upgradeToPendingSegment(\n  emptyEntry: EmptySegmentCacheEntry,\n  fetchStrategy: FetchStrategy\n): PendingSegmentCacheEntry {\n  const pendingEntry: PendingSegmentCacheEntry = emptyEntry as any\n  pendingEntry.status = EntryStatus.Pending\n  pendingEntry.fetchStrategy = fetchStrategy\n\n  if (fetchStrategy === FetchStrategy.Full) {\n    // We can assume the response will contain the full segment data. Set this\n    // to false so we know it's OK to omit this segment from any navigation\n    // requests that may happen while the data is still pending.\n    pendingEntry.isPartial = false\n  }\n\n  // Set the version here, since this is right before the request is initiated.\n  // The next time the segment cache version is incremented, the entry will\n  // effectively be evicted. This happens before initiating the request, rather\n  // than when receiving the response, because it's guaranteed to happen\n  // before the data is read on the server.\n  pendingEntry.version = getCurrentSegmentCacheVersion()\n  return pendingEntry\n}\n\nexport function attemptToFulfillDynamicSegmentFromBFCache(\n  now: number,\n  segment: EmptySegmentCacheEntry,\n  tree: RouteTree\n): FulfilledSegmentCacheEntry | null {\n  // Attempts to fulfill an empty segment cache entry using data from the\n  // bfcache. This is only valid during a Full prefetch (i.e. one that includes\n  // dynamic data), because the bfcache stores data from navigations which\n  // always include dynamic data.\n\n  // We always use the canonical vary path when checking the bfcache. This is\n  // the same operation we'd use to access the cache during a\n  // regular navigation.\n  const varyPath = tree.varyPath\n\n  // Read from the BFCache without expiring it (pass -1). We check freshness\n  // ourselves using navigatedAt, because the BFCache's staleAt may have been\n  // overridden by a per-page unstable_dynamicStaleTime and can't be used to\n  // derive the original request time.\n  const bfcacheEntry = readFromBFCache(varyPath)\n  if (bfcacheEntry !== null) {\n    // The stale time for dynamic prefetches (default: 5 mins) is different\n    // from the stale time for regular navigations (default: 0 secs). Use\n    // navigatedAt to compute the correct expiry for prefetch purposes.\n    const dynamicPrefetchStaleAt =\n      bfcacheEntry.navigatedAt + STATIC_STALETIME_MS\n    if (now > dynamicPrefetchStaleAt) {\n      return null\n    }\n\n    const pendingSegment = upgradeToPendingSegment(segment, FetchStrategy.Full)\n    const isPartial = false\n    return fulfillSegmentCacheEntry(\n      pendingSegment,\n      bfcacheEntry.rsc,\n      dynamicPrefetchStaleAt,\n      isPartial\n    )\n  }\n  return null\n}\n\n/**\n * Attempts to replace an existing segment cache entry with data from the\n * bfcache. Unlike `attemptToFulfillDynamicSegmentFromBFCache` (which fills an\n * empty entry), this creates a new entry and upserts it, so it works even when\n * the segment is already fulfilled.\n */\nexport function attemptToUpgradeSegmentFromBFCache(\n  now: number,\n  tree: RouteTree\n): FulfilledSegmentCacheEntry | null {\n  const varyPath = tree.varyPath\n  const bfcacheEntry = readFromBFCache(varyPath)\n  if (bfcacheEntry !== null) {\n    const dynamicPrefetchStaleAt =\n      bfcacheEntry.navigatedAt + STATIC_STALETIME_MS\n    if (now > dynamicPrefetchStaleAt) {\n      return null\n    }\n    const pendingSegment = upgradeToPendingSegment(\n      createDetachedSegmentCacheEntry(now),\n      FetchStrategy.Full\n    )\n    const isPartial = false\n    const newEntry = fulfillSegmentCacheEntry(\n      pendingSegment,\n      bfcacheEntry.rsc,\n      dynamicPrefetchStaleAt,\n      isPartial\n    )\n    const segmentVaryPath = getSegmentVaryPathForRequest(\n      FetchStrategy.Full,\n      tree\n    )\n    const upserted = upsertSegmentEntry(now, segmentVaryPath, newEntry)\n    if (upserted !== null && upserted.status === EntryStatus.Fulfilled) {\n      return upserted\n    }\n  }\n  return null\n}\n\nfunction pingBlockedTasks(entry: {\n  blockedTasks: Set<PrefetchTask> | null\n}): void {\n  const blockedTasks = entry.blockedTasks\n  if (blockedTasks !== null) {\n    for (const task of blockedTasks) {\n      pingPrefetchTask(task)\n    }\n    entry.blockedTasks = null\n  }\n}\n\nexport function createMetadataRouteTree(\n  metadataVaryPath: PageVaryPath\n): RouteTree {\n  // The Head is not actually part of the route tree, but other than that, it's\n  // fetched and cached like a segment. Some functions expect a RouteTree\n  // object, so rather than fork the logic in all those places, we use this\n  // \"fake\" one.\n  const metadata: RouteTree = {\n    requestKey: HEAD_REQUEST_KEY,\n    segment: HEAD_REQUEST_KEY,\n    refreshState: null,\n    varyPath: metadataVaryPath,\n    // The metadata isn't really a \"page\" (though it isn't really a \"segment\"\n    // either) but for the purposes of how this field is used, it behaves like\n    // one. If this logic ever gets more complex we can change this to an enum.\n    isPage: true,\n    slots: null,\n    prefetchHints: 0,\n  }\n  return metadata\n}\n\nexport function fulfillRouteCacheEntry(\n  now: number,\n  entry: PendingRouteCacheEntry,\n  tree: RouteTree,\n  metadataVaryPath: PageVaryPath,\n  couldBeIntercepted: boolean,\n  canonicalUrl: string,\n  supportsPerSegmentPrefetching: boolean\n): FulfilledRouteCacheEntry {\n  // Get the rendered search from the vary path\n  const renderedSearch =\n    getRenderedSearchFromVaryPath(metadataVaryPath) ?? ('' as NormalizedSearch)\n  const fulfilledEntry: FulfilledRouteCacheEntry = entry as any\n  fulfilledEntry.status = EntryStatus.Fulfilled\n  fulfilledEntry.tree = tree\n  fulfilledEntry.metadata = createMetadataRouteTree(metadataVaryPath)\n  // Route structure is essentially static — it only changes on deploy.\n  // Always use the static stale time.\n  // NOTE: An exception is rewrites/redirects in middleware or proxy, which can\n  // change routes dynamically. We have other strategies for handling those.\n  fulfilledEntry.staleAt = now + STATIC_STALETIME_MS\n  fulfilledEntry.couldBeIntercepted = couldBeIntercepted\n  fulfilledEntry.canonicalUrl = canonicalUrl\n  fulfilledEntry.renderedSearch = renderedSearch\n  fulfilledEntry.supportsPerSegmentPrefetching = supportsPerSegmentPrefetching\n  fulfilledEntry.hasDynamicRewrite = false\n  pingBlockedTasks(entry)\n  return fulfilledEntry\n}\n\nexport function writeRouteIntoCache(\n  now: number,\n  pathname: NormalizedPathname,\n  nextUrl: string | null,\n  tree: RouteTree,\n  metadataVaryPath: PageVaryPath,\n  couldBeIntercepted: boolean,\n  canonicalUrl: string,\n  supportsPerSegmentPrefetching: boolean\n): FulfilledRouteCacheEntry {\n  const pendingEntry = createDetachedRouteCacheEntry()\n  const fulfilledEntry = fulfillRouteCacheEntry(\n    now,\n    pendingEntry,\n    tree,\n    metadataVaryPath,\n    couldBeIntercepted,\n    canonicalUrl,\n    supportsPerSegmentPrefetching\n  )\n  const renderedSearch = fulfilledEntry.renderedSearch\n  const varyPath = getFulfilledRouteVaryPath(\n    pathname,\n    renderedSearch,\n    nextUrl as NormalizedNextUrl | null,\n    couldBeIntercepted\n  )\n  const isRevalidation = false\n  setInCacheMap(routeCacheMap, varyPath, fulfilledEntry, isRevalidation)\n  return fulfilledEntry\n}\n\n/**\n * Marks a route cache entry as having a dynamic rewrite. Called when we\n * discover that a route pattern has dynamic rewrite behavior - i.e., we used\n * an optimistic route tree for prediction, but the server responded with a\n * different rendered pathname.\n *\n * Once marked, attempts to use this entry as a template for prediction will\n * bail out to server resolution.\n */\nexport function markRouteEntryAsDynamicRewrite(\n  entry: FulfilledRouteCacheEntry\n): void {\n  entry.hasDynamicRewrite = true\n  // Note: The caller is responsible for also calling invalidateRouteCacheEntries\n  // to invalidate other entries that may have been derived from this template\n  // before we knew it had a dynamic rewrite.\n}\n\nfunction fulfillSegmentCacheEntry(\n  segmentCacheEntry: PendingSegmentCacheEntry,\n  rsc: React.ReactNode,\n  staleAt: number,\n  isPartial: boolean\n): FulfilledSegmentCacheEntry {\n  const fulfilledEntry: FulfilledSegmentCacheEntry = segmentCacheEntry as any\n  fulfilledEntry.status = EntryStatus.Fulfilled\n  fulfilledEntry.rsc = rsc\n  fulfilledEntry.staleAt = staleAt\n  fulfilledEntry.isPartial = isPartial\n  // Resolve any listeners that were waiting for this data.\n  if (segmentCacheEntry.promise !== null) {\n    segmentCacheEntry.promise.resolve(fulfilledEntry)\n    // Free the promise for garbage collection.\n    fulfilledEntry.promise = null\n  }\n  return fulfilledEntry\n}\n\nfunction rejectRouteCacheEntry(\n  entry: PendingRouteCacheEntry,\n  staleAt: number\n): void {\n  const rejectedEntry: RejectedRouteCacheEntry = entry as any\n  rejectedEntry.status = EntryStatus.Rejected\n  rejectedEntry.staleAt = staleAt\n  pingBlockedTasks(entry)\n}\n\nfunction rejectSegmentCacheEntry(\n  entry: PendingSegmentCacheEntry,\n  staleAt: number\n): void {\n  const rejectedEntry: RejectedSegmentCacheEntry = entry as any\n  rejectedEntry.status = EntryStatus.Rejected\n  rejectedEntry.staleAt = staleAt\n  if (entry.promise !== null) {\n    // NOTE: We don't currently propagate the reason the prefetch was canceled\n    // but we could by accepting a `reason` argument.\n    entry.promise.resolve(null)\n    entry.promise = null\n  }\n}\n\ntype RouteTreeAccumulator = {\n  metadataVaryPath: PageVaryPath | null\n}\n\nfunction convertRootTreePrefetchToRouteTree(\n  rootTree: RootTreePrefetch,\n  renderedPathname: string,\n  renderedSearch: NormalizedSearch,\n  acc: RouteTreeAccumulator\n) {\n  // Remove trailing and leading slashes\n  const pathnameParts = renderedPathname.split('/').filter((p) => p !== '')\n  const index = 0\n  const rootSegment = ROOT_SEGMENT_REQUEST_KEY\n  return convertTreePrefetchToRouteTree(\n    rootTree.tree,\n    rootSegment,\n    null,\n    ROOT_SEGMENT_REQUEST_KEY,\n    pathnameParts,\n    index,\n    renderedSearch,\n    acc\n  )\n}\n\nfunction convertTreePrefetchToRouteTree(\n  prefetch: TreePrefetch,\n  segment: FlightRouterStateSegment,\n  partialVaryPath: PartialSegmentVaryPath | null,\n  requestKey: SegmentRequestKey,\n  pathnameParts: Array<string>,\n  pathnamePartsIndex: number,\n  renderedSearch: NormalizedSearch,\n  acc: RouteTreeAccumulator\n): RouteTree {\n  // Converts the route tree sent by the server into the format used by the\n  // cache. The cached version of the tree includes additional fields, such as a\n  // cache key for each segment. Since this is frequently accessed, we compute\n  // it once instead of on every access. This same cache key is also used to\n  // request the segment from the server.\n\n  let slots: { [parallelRouteKey: string]: RouteTree } | null = null\n  let isPage: boolean\n  let varyPath: SegmentVaryPath\n  const prefetchSlots = prefetch.slots\n  if (prefetchSlots !== null) {\n    isPage = false\n    varyPath = finalizeLayoutVaryPath(requestKey, partialVaryPath)\n\n    slots = {}\n    for (let parallelRouteKey in prefetchSlots) {\n      const childPrefetch = prefetchSlots[parallelRouteKey]\n      const childSegmentName = childPrefetch.name\n      const childParam = childPrefetch.param\n\n      let childDoesAppearInURL: boolean\n      let childSegment: FlightRouterStateSegment\n      let childPartialVaryPath: PartialSegmentVaryPath | null\n      if (childParam !== null) {\n        // This segment is parameterized. Get the param from the pathname.\n        const childParamValue = parseDynamicParamFromURLPart(\n          childParam.type,\n          pathnameParts,\n          pathnamePartsIndex\n        )\n\n        // Assign a cache key to the segment, based on the param value. In the\n        // pre-Segment Cache implementation, the server computes this and sends\n        // it in the body of the response. In the Segment Cache implementation,\n        // the server sends an empty string and we fill it in here.\n\n        // TODO: We're intentionally not adding the search param to page\n        // segments here; it's tracked separately and added back during a read.\n        // This would clearer if we waited to construct the segment until it's\n        // read from the cache, since that's effectively what we're\n        // doing anyway.\n        const childParamKey =\n          // The server omits this field from the prefetch response when\n          // cacheComponents is enabled.\n          childParam.key !== null\n            ? childParam.key\n            : // If no param key was sent, use the value parsed on the client.\n              getCacheKeyForDynamicParam(\n                childParamValue,\n                '' as NormalizedSearch\n              )\n\n        childPartialVaryPath = appendLayoutVaryPath(\n          partialVaryPath,\n          childParamKey,\n          childSegmentName\n        )\n        childSegment = [\n          childSegmentName,\n          childParamKey,\n          childParam.type,\n          childParam.siblings,\n        ]\n        childDoesAppearInURL = true\n      } else {\n        // This segment does not have a param. Inherit the partial vary path of\n        // the parent.\n        childPartialVaryPath = partialVaryPath\n        childSegment = childSegmentName\n        childDoesAppearInURL = doesStaticSegmentAppearInURL(childSegmentName)\n      }\n\n      // Only increment the index if the segment appears in the URL. If it's a\n      // \"virtual\" segment, like a route group, it remains the same.\n      const childPathnamePartsIndex = childDoesAppearInURL\n        ? pathnamePartsIndex + 1\n        : pathnamePartsIndex\n\n      const childRequestKeyPart = createSegmentRequestKeyPart(childSegment)\n      const childRequestKey = appendSegmentRequestKeyPart(\n        requestKey,\n        parallelRouteKey,\n        childRequestKeyPart\n      )\n      slots[parallelRouteKey] = convertTreePrefetchToRouteTree(\n        childPrefetch,\n        childSegment,\n        childPartialVaryPath,\n        childRequestKey,\n        pathnameParts,\n        childPathnamePartsIndex,\n        renderedSearch,\n        acc\n      )\n    }\n  } else {\n    if (requestKey.endsWith(PAGE_SEGMENT_KEY)) {\n      // This is a page segment.\n      isPage = true\n      varyPath = finalizePageVaryPath(\n        requestKey,\n        renderedSearch,\n        partialVaryPath\n      )\n      // The metadata \"segment\" is not part the route tree, but it has the same\n      // conceptual params as a page segment. Write the vary path into the\n      // accumulator object. If there are multiple parallel pages, we use the\n      // first one. Which page we choose is arbitrary as long as it's\n      // consistently the same one every time every time. See\n      // finalizeMetadataVaryPath for more details.\n      if (acc.metadataVaryPath === null) {\n        acc.metadataVaryPath = finalizeMetadataVaryPath(\n          requestKey,\n          renderedSearch,\n          partialVaryPath\n        )\n      }\n    } else {\n      // This is a layout segment.\n      isPage = false\n      varyPath = finalizeLayoutVaryPath(requestKey, partialVaryPath)\n    }\n  }\n\n  return {\n    requestKey,\n    segment,\n    refreshState: null,\n    // TODO: Cheating the type system here a bit because TypeScript can't tell\n    // that the type of isPage and varyPath are consistent. The fix would be to\n    // create separate constructors and call the appropriate one from each of\n    // the branches above. Just seems a bit overkill only for one field so I'll\n    // leave it as-is for now. If isPage were wrong it would break the behavior\n    // and we'd catch it quickly, anyway.\n    varyPath: varyPath as any,\n    isPage: isPage as boolean as any,\n    slots,\n    prefetchHints: prefetch.prefetchHints,\n  }\n}\n\nexport function convertRootFlightRouterStateToRouteTree(\n  flightRouterState: FlightRouterState,\n  renderedSearch: NormalizedSearch,\n  acc: RouteTreeAccumulator\n): RouteTree {\n  return convertFlightRouterStateToRouteTree(\n    flightRouterState,\n    ROOT_SEGMENT_REQUEST_KEY,\n    null,\n    renderedSearch,\n    acc\n  )\n}\n\nexport function convertReusedFlightRouterStateToRouteTree(\n  parentRouteTree: RouteTree,\n  parallelRouteKey: string,\n  flightRouterState: FlightRouterState,\n  renderedSearch: NormalizedSearch,\n  acc: RouteTreeAccumulator\n) {\n  // Create a RouteTree for a FlightRouterState that was reused from an older\n  // route. This happens during a navigation when a parallel route slot does not\n  // match the target route; we reuse whatever slot was already active.\n\n  // Unlike a FlightRouterState, the RouteTree type contains backreferences to\n  // the parent segments. Append the vary path to the parent's vary path.\n  const parentPartialVaryPath = parentRouteTree.isPage\n    ? getPartialPageVaryPath(parentRouteTree.varyPath)\n    : getPartialLayoutVaryPath(parentRouteTree.varyPath)\n  const segment = flightRouterState[0]\n  // And the request key.\n  const parentRequestKey = parentRouteTree.requestKey\n  const requestKeyPart = createSegmentRequestKeyPart(segment)\n  const requestKey = appendSegmentRequestKeyPart(\n    parentRequestKey,\n    parallelRouteKey,\n    requestKeyPart\n  )\n  return convertFlightRouterStateToRouteTree(\n    flightRouterState,\n    requestKey,\n    parentPartialVaryPath,\n    renderedSearch,\n    acc\n  )\n}\n\nfunction convertFlightRouterStateToRouteTree(\n  flightRouterState: FlightRouterState,\n  requestKey: SegmentRequestKey,\n  parentPartialVaryPath: PartialSegmentVaryPath | null,\n  parentRenderedSearch: NormalizedSearch,\n  acc: RouteTreeAccumulator\n): RouteTree {\n  const originalSegment = flightRouterState[0]\n\n  // If the FlightRouterState has a refresh state, then this segment is part of\n  // an inactive parallel route. It has a different rendered search query than\n  // the outer parent route. In order to construct the inactive route correctly,\n  // we must restore the query that was originally used to render it.\n  const compressedRefreshState = flightRouterState[2] ?? null\n  const refreshState =\n    compressedRefreshState !== null\n      ? {\n          canonicalUrl: compressedRefreshState[0] as string,\n          renderedSearch: compressedRefreshState[1] as NormalizedSearch,\n        }\n      : null\n  const renderedSearch =\n    refreshState !== null ? refreshState.renderedSearch : parentRenderedSearch\n\n  let segment: FlightRouterStateSegment\n  let partialVaryPath: PartialSegmentVaryPath | null\n  let isPage: boolean\n  let varyPath: SegmentVaryPath\n  if (Array.isArray(originalSegment)) {\n    isPage = false\n    const paramCacheKey = originalSegment[1]\n    const paramName = originalSegment[0]\n    partialVaryPath = appendLayoutVaryPath(\n      parentPartialVaryPath,\n      paramCacheKey,\n      paramName\n    )\n    varyPath = finalizeLayoutVaryPath(requestKey, partialVaryPath)\n    segment = originalSegment\n  } else {\n    // This segment does not have a param. Inherit the partial vary path of\n    // the parent.\n    partialVaryPath = parentPartialVaryPath\n    if (requestKey.endsWith(PAGE_SEGMENT_KEY)) {\n      // This is a page segment.\n      isPage = true\n\n      // The navigation implementation expects the search params to be included\n      // in the segment. However, in the case of a static response, the search\n      // params are omitted. So the client needs to add them back in when reading\n      // from the Segment Cache.\n      //\n      // For consistency, we'll do this for dynamic responses, too.\n      //\n      // TODO: We should move search params out of FlightRouterState and handle\n      // them entirely on the client, similar to our plan for dynamic params.\n      segment = PAGE_SEGMENT_KEY\n      varyPath = finalizePageVaryPath(\n        requestKey,\n        renderedSearch,\n        partialVaryPath\n      )\n      // The metadata \"segment\" is not part the route tree, but it has the same\n      // conceptual params as a page segment. Write the vary path into the\n      // accumulator object. If there are multiple parallel pages, we use the\n      // first one. Which page we choose is arbitrary as long as it's\n      // consistently the same one every time every time. See\n      // finalizeMetadataVaryPath for more details.\n      if (acc.metadataVaryPath === null) {\n        acc.metadataVaryPath = finalizeMetadataVaryPath(\n          requestKey,\n          renderedSearch,\n          partialVaryPath\n        )\n      }\n    } else {\n      // This is a layout segment.\n      isPage = false\n      segment = originalSegment\n      varyPath = finalizeLayoutVaryPath(requestKey, partialVaryPath)\n    }\n  }\n\n  let slots: { [parallelRouteKey: string]: RouteTree } | null = null\n\n  const parallelRoutes = flightRouterState[1]\n  for (let parallelRouteKey in parallelRoutes) {\n    const childRouterState = parallelRoutes[parallelRouteKey]\n    const childSegment = childRouterState[0]\n    // TODO: Eventually, the param values will not be included in the response\n    // from the server. We'll instead fill them in on the client by parsing\n    // the URL. This is where we'll do that.\n    const childRequestKeyPart = createSegmentRequestKeyPart(childSegment)\n    const childRequestKey = appendSegmentRequestKeyPart(\n      requestKey,\n      parallelRouteKey,\n      childRequestKeyPart\n    )\n    const childTree = convertFlightRouterStateToRouteTree(\n      childRouterState,\n      childRequestKey,\n      partialVaryPath,\n      renderedSearch,\n      acc\n    )\n    if (slots === null) {\n      slots = {\n        [parallelRouteKey]: childTree,\n      }\n    } else {\n      slots[parallelRouteKey] = childTree\n    }\n  }\n\n  return {\n    requestKey,\n    segment,\n    refreshState,\n    // TODO: Cheating the type system here a bit because TypeScript can't tell\n    // that the type of isPage and varyPath are consistent. The fix would be to\n    // create separate constructors and call the appropriate one from each of\n    // the branches above. Just seems a bit overkill only for one field so I'll\n    // leave it as-is for now. If isPage were wrong it would break the behavior\n    // and we'd catch it quickly, anyway.\n    varyPath: varyPath as any,\n    isPage: isPage as boolean as any,\n    slots,\n    prefetchHints: flightRouterState[4] ?? 0,\n  }\n}\n\nexport function convertRouteTreeToFlightRouterState(\n  routeTree: RouteTree\n): FlightRouterState {\n  const parallelRoutes: Record<string, FlightRouterState> = {}\n  if (routeTree.slots !== null) {\n    for (const parallelRouteKey in routeTree.slots) {\n      parallelRoutes[parallelRouteKey] = convertRouteTreeToFlightRouterState(\n        routeTree.slots[parallelRouteKey]\n      )\n    }\n  }\n  const flightRouterState: FlightRouterState = [\n    routeTree.segment,\n    parallelRoutes,\n    null,\n    null,\n  ]\n  return flightRouterState\n}\n\nexport async function fetchRouteOnCacheMiss(\n  entry: PendingRouteCacheEntry,\n  key: RouteCacheKey\n): Promise<PrefetchSubtaskResult<null> | null> {\n  // This function is allowed to use async/await because it contains the actual\n  // fetch that gets issued on a cache miss. Notice it writes the result to the\n  // cache entry directly, rather than return data that is then written by\n  // the caller.\n  const pathname = key.pathname\n  const search = key.search\n  const nextUrl = key.nextUrl\n  const segmentPath = '/_tree' as SegmentRequestKey\n\n  const headers: RequestHeaders = {\n    [RSC_HEADER]: '1',\n    [NEXT_ROUTER_PREFETCH_HEADER]: '1',\n    [NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]: segmentPath,\n  }\n  if (nextUrl !== null) {\n    headers[NEXT_URL] = nextUrl\n  }\n  // Tell the server to perform a static pre-render for the Instant Navigation\n  // Testing API. Static pre-renders don't normally happen during development.\n  addInstantPrefetchHeaderIfLocked(headers)\n\n  try {\n    const url = new URL(pathname + search, location.origin)\n    let response\n    let urlAfterRedirects\n    if (isOutputExportMode) {\n      // In output: \"export\" mode, we can't use headers to request a particular\n      // segment. Instead, we encode the extra request information into the URL.\n      // This is not part of the \"public\" interface of the app; it's an internal\n      // Next.js implementation detail that the app developer should not need to\n      // concern themselves with.\n      //\n      // For example, to request a segment:\n      //\n      //   Path passed to <Link>:   /path/to/page\n      //   Path passed to fetch:    /path/to/page/__next-segments/_tree\n      //\n      //   (This is not the exact protocol, just an illustration.)\n      //\n      // Before we do that, though, we need to account for redirects. Even in\n      // output: \"export\" mode, a proxy might redirect the page to a different\n      // location, but we shouldn't assume or expect that they also redirect all\n      // the segment files, too.\n      //\n      // To check whether the page is redirected, previously we perform a range\n      // request of 64 bytes of the HTML document to check if the target page\n      // is part of this app (by checking if build id matches). Only if the target\n      // page is part of this app do we determine the final canonical URL.\n      //\n      // However, as mentioned in https://github.com/vercel/next.js/pull/85903,\n      // some popular static hosting providers (like Cloudflare Pages or Render.com)\n      // do not support range requests, in the worst case, the entire HTML instead\n      // of 64 bytes could be returned, which is wasteful.\n      //\n      // So instead, we drops the check for build id here, and simply perform\n      // a HEAD request to rejects 1xx/4xx/5xx responses, and then determine the\n      // final URL after redirects.\n      //\n      // NOTE: We could embed the route tree into the HTML document, to avoid\n      // a second request. We're not doing that currently because it would make\n      // the HTML document larger and affect normal page loads.\n      const headResponse = await fetch(url, {\n        method: 'HEAD',\n      })\n      if (headResponse.status < 200 || headResponse.status >= 400) {\n        // The target page responded w/o a successful status code\n        // Could be a WAF serving a 403, or a 5xx from a backend\n        //\n        // Note that we can't use headResponse.ok here, because\n        // Response#ok returns `false` with 3xx responses.\n        rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n        return null\n      }\n\n      urlAfterRedirects = headResponse.redirected\n        ? new URL(headResponse.url)\n        : url\n\n      response = await fetchPrefetchResponse(\n        addSegmentPathToUrlInOutputExportMode(urlAfterRedirects, segmentPath),\n        headers\n      )\n    } else {\n      // \"Server\" mode. We can use request headers instead of the pathname.\n      // TODO: The eventual plan is to get rid of our custom request headers and\n      // encode everything into the URL, using a similar strategy to the\n      // \"output: export\" block above.\n      response = await fetchPrefetchResponse(url, headers)\n      urlAfterRedirects =\n        response !== null && response.redirected ? new URL(response.url) : url\n    }\n\n    if (\n      !response ||\n      !response.ok ||\n      // 204 is a Cache miss. Though theoretically this shouldn't happen when\n      // PPR is enabled, because we always respond to route tree requests, even\n      // if it needs to be blockingly generated on demand.\n      response.status === 204 ||\n      !response.body\n    ) {\n      // Server responded with an error, or with a miss. We should still cache\n      // the response, but we can try again after 10 seconds.\n      rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n      return null\n    }\n\n    // TODO: The canonical URL is the href without the origin. I think\n    // historically the reason for this is because the initial canonical URL\n    // gets passed as a prop to the top-level React component, which means it\n    // needs to be computed during SSR. If it were to include the origin, it\n    // would need to always be same as location.origin on the client, to prevent\n    // a hydration mismatch. To sidestep this complexity, we omit the origin.\n    //\n    // However, since this is neither a native URL object nor a fully qualified\n    // URL string, we need to be careful about how we use it. To prevent subtle\n    // mistakes, we should create a special type for it, instead of just string.\n    // Or, we should just use a (readonly) URL object instead. The type of the\n    // prop that we pass to seed the initial state does not need to be the same\n    // type as the state itself.\n    const canonicalUrl = createHrefFromUrl(urlAfterRedirects)\n\n    // Check whether the response varies based on the Next-Url header.\n    const varyHeader = response.headers.get('vary')\n    const couldBeIntercepted =\n      varyHeader !== null && varyHeader.includes(NEXT_URL)\n\n    // TODO: The `closed` promise was originally used to track when a streaming\n    // network connection closes, so the scheduler could limit concurrent\n    // connections. Now that prefetch responses are buffered, `closed` is\n    // resolved immediately after buffering — before the outer function even\n    // returns. This mechanism is only still meaningful for dynamic (Full)\n    // prefetches, which use incremental streaming. Consider removing the\n    // `closed` plumbing for buffered prefetch paths.\n    const closed = createPromiseWithResolvers<void>()\n\n    // This checks whether the response was served from the per-segment cache,\n    // rather than the old prefetching flow. If it fails, it implies that PPR\n    // is disabled on this route.\n    const routeIsPPREnabled =\n      response.headers.get(NEXT_DID_POSTPONE_HEADER) === '2' ||\n      // In output: \"export\" mode, we can't rely on response headers. But if we\n      // receive a well-formed response, we can assume it's a static response,\n      // because all data is static in this mode.\n      isOutputExportMode\n\n    if (routeIsPPREnabled) {\n      const { stream: prefetchStream, size: responseSize } =\n        await createNonTaskyPrefetchResponseStream(response.body)\n      closed.resolve()\n      setSizeInCacheMap(entry, responseSize)\n      const serverData = await createFromNextReadableStream<RootTreePrefetch>(\n        prefetchStream,\n        headers,\n        { allowPartialStream: true }\n      )\n\n      if (\n        (response.headers.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ??\n          serverData.buildId) !== getNavigationBuildId()\n      ) {\n        // The server build does not match the client. Treat as a 404. During\n        // an actual navigation, the router will trigger an MPA navigation.\n        // TODO: We should cache the fact that this is an MPA navigation.\n        rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n        return null\n      }\n\n      // Get the params that were used to render the target page. These may\n      // be different from the params in the request URL, if the page\n      // was rewritten.\n      const renderedPathname = getRenderedPathname(response)\n      const renderedSearch = getRenderedSearch(response)\n\n      // Convert the server-sent data into the RouteTree format used by the\n      // client cache.\n      //\n      // During this traversal, we accumulate additional data into this\n      // \"accumulator\" object.\n      const acc: RouteTreeAccumulator = { metadataVaryPath: null }\n      const routeTree = convertRootTreePrefetchToRouteTree(\n        serverData,\n        renderedPathname,\n        renderedSearch,\n        acc\n      )\n      const metadataVaryPath = acc.metadataVaryPath\n      if (metadataVaryPath === null) {\n        rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n        return null\n      }\n\n      discoverKnownRoute(\n        Date.now(),\n        pathname,\n        nextUrl,\n        entry,\n        routeTree,\n        metadataVaryPath,\n        couldBeIntercepted,\n        canonicalUrl,\n        routeIsPPREnabled,\n        false // hasDynamicRewrite\n      )\n    } else {\n      // PPR is not enabled for this route. The server responds with a\n      // different format (FlightRouterState) that we need to convert.\n      // TODO: We will unify the responses eventually. I'm keeping the types\n      // separate for now because FlightRouterState has so many\n      // overloaded concerns.\n      const { stream: prefetchStream, size: responseSize } =\n        await createNonTaskyPrefetchResponseStream(response.body)\n      closed.resolve()\n      setSizeInCacheMap(entry, responseSize)\n      const serverData =\n        await createFromNextReadableStream<NavigationFlightResponse>(\n          prefetchStream,\n          headers,\n          { allowPartialStream: true }\n        )\n\n      if (\n        (response.headers.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ??\n          serverData.b) !== getNavigationBuildId()\n      ) {\n        // The server build does not match the client. Treat as a 404. During\n        // an actual navigation, the router will trigger an MPA navigation.\n        // TODO: We should cache the fact that this is an MPA navigation.\n        rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n        return null\n      }\n\n      // Read head vary params synchronously. Individual segments carry their\n      // own thenables in CacheNodeSeedData.\n      const headVaryParamsThenable = serverData.h\n      const headVaryParams =\n        headVaryParamsThenable !== null\n          ? readVaryParams(headVaryParamsThenable)\n          : null\n      writeDynamicTreeResponseIntoCache(\n        Date.now(),\n        // The non-PPR response format is what we'd get if we prefetched these segments\n        // using the LoadingBoundary fetch strategy, so mark their cache entries accordingly.\n        FetchStrategy.LoadingBoundary,\n        response as RSCResponse<NavigationFlightResponse>,\n        serverData,\n        entry,\n        couldBeIntercepted,\n        canonicalUrl,\n        routeIsPPREnabled,\n        headVaryParams,\n        pathname,\n        nextUrl\n      )\n    }\n\n    if (!couldBeIntercepted) {\n      // This route will never be intercepted. So we can use this entry for all\n      // requests to this route, regardless of the Next-Url header. This works\n      // because when reading the cache we always check for a valid\n      // non-intercepted entry first.\n\n      // Re-key the entry. The `set` implementation handles removing it from\n      // its previous position in the cache. We don't need to do anything to\n      // update the LRU, because the entry is already in it.\n      // TODO: Treat this as an upsert — should check if an entry already\n      // exists at the new keypath, and if so, whether we should keep that\n      // one instead.\n      const fulfilledVaryPath: RouteVaryPath = getFulfilledRouteVaryPath(\n        pathname,\n        search,\n        nextUrl,\n        couldBeIntercepted\n      )\n      const isRevalidation = false\n      setInCacheMap(routeCacheMap, fulfilledVaryPath, entry, isRevalidation)\n    }\n    // Return a promise that resolves when the network connection closes, so\n    // the scheduler can track the number of concurrent network connections.\n    return { value: null, closed: closed.promise }\n  } catch (error) {\n    // Either the connection itself failed, or something bad happened while\n    // decoding the response.\n    rejectRouteCacheEntry(entry, Date.now() + 10 * 1000)\n    return null\n  }\n}\n\nexport async function fetchSegmentOnCacheMiss(\n  route: FulfilledRouteCacheEntry,\n  segmentCacheEntry: PendingSegmentCacheEntry,\n  routeKey: RouteCacheKey,\n  tree: RouteTree\n): Promise<PrefetchSubtaskResult<FulfilledSegmentCacheEntry> | null> {\n  // This function is allowed to use async/await because it contains the actual\n  // fetch that gets issued on a cache miss. Notice it writes the result to the\n  // cache entry directly, rather than return data that is then written by\n  // the caller.\n  //\n  // Segment fetches are non-blocking so we don't need to ping the scheduler\n  // on completion.\n\n  // Use the canonical URL to request the segment, not the original URL. These\n  // are usually the same, but the canonical URL will be different if the route\n  // tree response was redirected. To avoid an extra waterfall on every segment\n  // request, we pass the redirected URL instead of the original one.\n  const url = new URL(route.canonicalUrl, location.origin)\n  const nextUrl = routeKey.nextUrl\n\n  const requestKey = tree.requestKey\n  const normalizedRequestKey =\n    requestKey === ROOT_SEGMENT_REQUEST_KEY\n      ? // The root segment is a special case. To simplify the server-side\n        // handling of these requests, we encode the root segment path as\n        // `_index` instead of as an empty string. This should be treated as\n        // an implementation detail and not as a stable part of the protocol.\n        // It just needs to match the equivalent logic that happens when\n        // prerendering the responses. It should not leak outside of Next.js.\n        ('/_index' as SegmentRequestKey)\n      : requestKey\n\n  const headers: RequestHeaders = {\n    [RSC_HEADER]: '1',\n    [NEXT_ROUTER_PREFETCH_HEADER]: '1',\n    [NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]: normalizedRequestKey,\n  }\n  if (nextUrl !== null) {\n    headers[NEXT_URL] = nextUrl\n  }\n  // Tell the server to perform a static pre-render for the Instant Navigation\n  // Testing API. Static pre-renders don't normally happen during development.\n  addInstantPrefetchHeaderIfLocked(headers)\n\n  const requestUrl = isOutputExportMode\n    ? // In output: \"export\" mode, we need to add the segment path to the URL.\n      addSegmentPathToUrlInOutputExportMode(url, normalizedRequestKey)\n    : url\n  try {\n    const response = await fetchPrefetchResponse(requestUrl, headers)\n    if (\n      !response ||\n      !response.ok ||\n      response.status === 204 || // Cache miss\n      // This checks whether the response was served from the per-segment cache,\n      // rather than the old prefetching flow. If it fails, it implies that PPR\n      // is disabled on this route. Theoretically this should never happen\n      // because we only issue requests for segments once we've verified that\n      // the route supports PPR.\n      (response.headers.get(NEXT_DID_POSTPONE_HEADER) !== '2' &&\n        // In output: \"export\" mode, we can't rely on response headers. But if\n        // we receive a well-formed response, we can assume it's a static\n        // response, because all data is static in this mode.\n        !isOutputExportMode) ||\n      !response.body\n    ) {\n      // Server responded with an error, or with a miss. We should still cache\n      // the response, but we can try again after 10 seconds.\n      rejectSegmentCacheEntry(segmentCacheEntry, Date.now() + 10 * 1000)\n      return null\n    }\n\n    // See TODO in fetchRouteOnCacheMiss about removing `closed` for\n    // buffered prefetch paths.\n    const closed = createPromiseWithResolvers<void>()\n\n    const { stream: prefetchStream, size: responseSize } =\n      await createNonTaskyPrefetchResponseStream(response.body)\n    closed.resolve()\n    setSizeInCacheMap(segmentCacheEntry, responseSize)\n    const serverData = await createFromNextReadableStream<SegmentPrefetch>(\n      prefetchStream,\n      headers,\n      { allowPartialStream: true }\n    )\n    if (\n      (response.headers.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ??\n        serverData.buildId) !== getNavigationBuildId()\n    ) {\n      // The server build does not match the client. Treat as a 404. During\n      // an actual navigation, the router will trigger an MPA navigation.\n      rejectSegmentCacheEntry(segmentCacheEntry, Date.now() + 10 * 1000)\n      return null\n    }\n    const now = Date.now()\n    const staleAt = now + getStaleTimeMs(serverData.staleTime)\n    const fulfilledEntry = fulfillSegmentCacheEntry(\n      segmentCacheEntry,\n      serverData.rsc,\n      staleAt,\n      serverData.isPartial\n    )\n\n    // If the server tells us which params the segment varies by, we can re-key\n    // the entry to a more generic vary path. This allows the entry to be reused\n    // across different param values for params that the segment doesn't\n    // actually depend on.\n    const varyParams = serverData.varyParams\n    const fulfilledVaryPath =\n      process.env.__NEXT_VARY_PARAMS && varyParams !== null\n        ? getFulfilledSegmentVaryPath(tree.varyPath, varyParams)\n        : getSegmentVaryPathForRequest(segmentCacheEntry.fetchStrategy, tree)\n    // Re-key and upsert the entry at the fulfilled vary path. This ensures\n    // the entry is stored at the most generic path possible based on which\n    // params the segment actually depends on.\n    upsertSegmentEntry(now, fulfilledVaryPath, fulfilledEntry)\n\n    return {\n      value: fulfilledEntry,\n      // Return a promise that resolves when the network connection closes, so\n      // the scheduler can track the number of concurrent network connections.\n      closed: closed.promise,\n    }\n  } catch (error) {\n    // Either the connection itself failed, or something bad happened while\n    // decoding the response.\n    rejectSegmentCacheEntry(segmentCacheEntry, Date.now() + 10 * 1000)\n    return null\n  }\n}\n\n// TODO: The inlined prefetch flow below is temporary. Eventually, inlining\n// will be the default behavior controlled by a size heuristic rather than a\n// boolean flag. At that point, the per-segment and inlined fetch paths will\n// merge, and these separate functions will be removed.\n//\n// The call site in the scheduler is guarded by\n// process.env.__NEXT_PREFETCH_INLINING, so these functions are\n// dead-code-eliminated from the client bundle when the feature is disabled.\n\nexport async function fetchInlinedSegmentsOnCacheMiss(\n  route: FulfilledRouteCacheEntry,\n  routeKey: RouteCacheKey,\n  tree: RouteTree,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>\n): Promise<PrefetchSubtaskResult<null> | null> {\n  // When prefetch inlining is enabled, all segment data for a route is bundled\n  // into a single /_inlined response instead of individual per-segment\n  // requests. This function fetches that response and walks the tree to fill\n  // all segment cache entries at once.\n  const url = new URL(route.canonicalUrl, location.origin)\n  const nextUrl = routeKey.nextUrl\n\n  const headers: RequestHeaders = {\n    [RSC_HEADER]: '1',\n    [NEXT_ROUTER_PREFETCH_HEADER]: '1',\n    [NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]: '/' + PAGE_SEGMENT_KEY,\n  }\n  if (nextUrl !== null) {\n    headers[NEXT_URL] = nextUrl\n  }\n  addInstantPrefetchHeaderIfLocked(headers)\n\n  try {\n    const response = await fetchPrefetchResponse(url, headers)\n    if (\n      !response ||\n      !response.ok ||\n      response.status === 204 ||\n      (response.headers.get(NEXT_DID_POSTPONE_HEADER) !== '2' &&\n        !isOutputExportMode) ||\n      !response.body\n    ) {\n      rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000)\n      return null\n    }\n\n    // See TODO in fetchRouteOnCacheMiss about removing `closed` for\n    // buffered prefetch paths.\n    const closed = createPromiseWithResolvers<void>()\n\n    const { stream: prefetchStream } =\n      await createNonTaskyPrefetchResponseStream(response.body)\n    closed.resolve()\n    const serverData =\n      await createFromNextReadableStream<InlinedPrefetchResponse>(\n        prefetchStream,\n        headers,\n        { allowPartialStream: true }\n      )\n\n    if (\n      (response.headers.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ??\n        serverData.tree.segment.buildId) !== getNavigationBuildId()\n    ) {\n      rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000)\n      return null\n    }\n\n    const now = Date.now()\n\n    // Walk the inlined tree in parallel with the RouteTree and fill\n    // segment cache entries.\n    fillInlinedSegmentEntries(now, route, tree, serverData.tree, spawnedEntries)\n\n    // Fill the head entry.\n    const headStaleAt = now + getStaleTimeMs(serverData.head.staleTime)\n    const headKey = route.metadata.requestKey\n    const ownedHeadEntry = spawnedEntries.get(headKey)\n    if (ownedHeadEntry !== undefined) {\n      fulfillSegmentCacheEntry(\n        ownedHeadEntry,\n        serverData.head.rsc,\n        headStaleAt,\n        serverData.head.isPartial\n      )\n    } else {\n      // The head was already cached. Try to upsert if the entry is empty.\n      const existingEntry = readOrCreateSegmentCacheEntry(\n        now,\n        FetchStrategy.PPR,\n        route.metadata\n      )\n      if (existingEntry.status === EntryStatus.Empty) {\n        fulfillSegmentCacheEntry(\n          upgradeToPendingSegment(existingEntry, FetchStrategy.PPR),\n          serverData.head.rsc,\n          headStaleAt,\n          serverData.head.isPartial\n        )\n      }\n    }\n\n    // Reject any remaining entries that were not fulfilled by the response.\n    rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000)\n\n    return { value: null, closed: closed.promise }\n  } catch (error) {\n    rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000)\n    return null\n  }\n}\n\nfunction fillInlinedSegmentEntries(\n  now: number,\n  route: FulfilledRouteCacheEntry,\n  tree: RouteTree,\n  inlinedNode: InlinedSegmentPrefetch,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>\n): void {\n  // Check if the spawned entries map has an entry for this segment's key.\n  const segment = inlinedNode.segment\n  const staleAt = now + getStaleTimeMs(segment.staleTime)\n  const ownedEntry = spawnedEntries.get(tree.requestKey)\n  if (ownedEntry !== undefined) {\n    // We own this entry. Fulfill it directly.\n    fulfillSegmentCacheEntry(\n      ownedEntry,\n      segment.rsc,\n      staleAt,\n      segment.isPartial\n    )\n  } else {\n    // Not owned by us — this is extra data from the inlined response for a\n    // segment that was already cached. Try to upsert if the entry is empty.\n    const existingEntry = readOrCreateSegmentCacheEntry(\n      now,\n      FetchStrategy.PPR,\n      tree\n    )\n    if (existingEntry.status === EntryStatus.Empty) {\n      fulfillSegmentCacheEntry(\n        upgradeToPendingSegment(existingEntry, FetchStrategy.PPR),\n        segment.rsc,\n        staleAt,\n        segment.isPartial\n      )\n    }\n  }\n\n  // Recurse into children.\n  if (tree.slots !== null && inlinedNode.slots !== null) {\n    for (const parallelRouteKey in tree.slots) {\n      const childTree = tree.slots[parallelRouteKey]\n      const childInlinedNode = inlinedNode.slots[parallelRouteKey]\n      if (childInlinedNode !== undefined) {\n        fillInlinedSegmentEntries(\n          now,\n          route,\n          childTree,\n          childInlinedNode,\n          spawnedEntries\n        )\n      }\n    }\n  }\n}\n\nexport async function fetchSegmentPrefetchesUsingDynamicRequest(\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  fetchStrategy:\n    | FetchStrategy.LoadingBoundary\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.Full,\n  dynamicRequestTree: FlightRouterState,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>\n): Promise<PrefetchSubtaskResult<null> | null> {\n  const key = task.key\n  const url = new URL(route.canonicalUrl, location.origin)\n  const nextUrl = key.nextUrl\n\n  if (\n    spawnedEntries.size === 1 &&\n    spawnedEntries.has(route.metadata.requestKey)\n  ) {\n    // The only thing pending is the head. Instruct the server to\n    // skip over everything else.\n    dynamicRequestTree = MetadataOnlyRequestTree\n  }\n\n  const headers: RequestHeaders = {\n    [RSC_HEADER]: '1',\n    [NEXT_ROUTER_STATE_TREE_HEADER]:\n      prepareFlightRouterStateForRequest(dynamicRequestTree),\n  }\n  if (nextUrl !== null) {\n    headers[NEXT_URL] = nextUrl\n  }\n  switch (fetchStrategy) {\n    case FetchStrategy.Full: {\n      // We omit the prefetch header from a full prefetch because it's essentially\n      // just a navigation request that happens ahead of time — it should include\n      // all the same data in the response.\n      break\n    }\n    case FetchStrategy.PPRRuntime: {\n      headers[NEXT_ROUTER_PREFETCH_HEADER] = '2'\n      break\n    }\n    case FetchStrategy.LoadingBoundary: {\n      headers[NEXT_ROUTER_PREFETCH_HEADER] = '1'\n      break\n    }\n    default: {\n      fetchStrategy satisfies never\n    }\n  }\n\n  try {\n    const response = await fetchPrefetchResponse(url, headers)\n    if (!response || !response.ok || !response.body) {\n      // Server responded with an error, or with a miss. We should still cache\n      // the response, but we can try again after 10 seconds.\n      rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000)\n      return null\n    }\n\n    const renderedSearch = getRenderedSearch(response)\n    if (renderedSearch !== route.renderedSearch) {\n      // The search params that were used to render the target page are\n      // different from the search params in the request URL. This only happens\n      // when there's a dynamic rewrite in between the tree prefetch and the\n      // data prefetch.\n      // TODO: For now, since this is an edge case, we reject the prefetch, but\n      // the proper way to handle this is to evict the stale route tree entry\n      // then fill the cache with the new response.\n      rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000)\n      return null\n    }\n\n    // Track when the network connection closes. Only meaningful for Full\n    // (dynamic) prefetches which use incremental streaming. For buffered\n    // paths, this is resolved immediately — see TODO in fetchRouteOnCacheMiss.\n    const closed = createPromiseWithResolvers<void>()\n\n    let fulfilledEntries: Array<FulfilledSegmentCacheEntry> | null = null\n    let prefetchStream: ReadableStream<Uint8Array>\n    let bufferedResponseSize: number | null = null\n    if (fetchStrategy === FetchStrategy.Full) {\n      // Full prefetches are dynamic responses stored in the prefetch cache.\n      // They don't carry vary params or other cache metadata, so there's no\n      // need to buffer them. Use the incremental version to allow data to be\n      // processed as it arrives.\n      prefetchStream = createIncrementalPrefetchResponseStream(\n        response.body,\n        closed.resolve,\n        function onResponseSizeUpdate(totalBytesReceivedSoFar) {\n          // When processing a dynamic response, we don't know how large each\n          // individual segment is, so approximate by assigning each segment\n          // the average of the total response size.\n          if (fulfilledEntries === null) {\n            // Haven't received enough data yet to know which segments\n            // were included.\n            return\n          }\n          const averageSize = totalBytesReceivedSoFar / fulfilledEntries.length\n          for (const entry of fulfilledEntries) {\n            setSizeInCacheMap(entry, averageSize)\n          }\n        }\n      )\n    } else {\n      const { stream, size } = await createNonTaskyPrefetchResponseStream(\n        response.body\n      )\n      closed.resolve()\n      prefetchStream = stream\n      bufferedResponseSize = size\n    }\n\n    const [serverData, cacheData] = await Promise.all([\n      createFromNextReadableStream<NavigationFlightResponse>(\n        prefetchStream,\n        headers,\n        { allowPartialStream: true }\n      ),\n      response.cacheData,\n    ])\n\n    // Read head vary params synchronously. Individual segments carry their\n    // own thenables in CacheNodeSeedData.\n    const headVaryParamsThenable = serverData.h\n    const headVaryParams =\n      headVaryParamsThenable !== null\n        ? readVaryParams(headVaryParamsThenable)\n        : null\n\n    const now = Date.now()\n    const staleAt = await getStaleAt(now, serverData.s, response)\n    // PPRRuntime prefetches are partial when the server marks the response\n    // as '~' (Partial). Full/LoadingBoundary prefetches are always complete.\n    const isResponsePartial =\n      fetchStrategy === FetchStrategy.PPRRuntime &&\n      (cacheData?.isResponsePartial ?? false)\n\n    // Aside from writing the data into the cache, this function also returns\n    // the entries that were fulfilled, so we can streamingly update their sizes\n    // in the LRU as more data comes in.\n    const buildId =\n      response.headers.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ?? serverData.b\n    const flightDatas = normalizeFlightData(serverData.f)\n    if (typeof flightDatas === 'string') {\n      rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000)\n      return null\n    }\n    const navigationSeed = convertServerPatchToFullTree(\n      now,\n      dynamicRequestTree,\n      flightDatas,\n      renderedSearch,\n      // Not needed for prefetch responses; pass unknown to use the default.\n      UnknownDynamicStaleTime\n    )\n    fulfilledEntries = writeDynamicRenderResponseIntoCache(\n      now,\n      fetchStrategy,\n      flightDatas,\n      buildId,\n      isResponsePartial,\n      headVaryParams,\n      staleAt,\n      navigationSeed,\n      spawnedEntries\n    )\n\n    // For buffered responses, update LRU sizes now that we know which\n    // entries were fulfilled.\n    if (\n      bufferedResponseSize !== null &&\n      fulfilledEntries !== null &&\n      fulfilledEntries.length > 0\n    ) {\n      const averageSize = bufferedResponseSize / fulfilledEntries.length\n      for (const entry of fulfilledEntries) {\n        setSizeInCacheMap(entry, averageSize)\n      }\n    }\n\n    // Return a promise that resolves when the network connection closes, so\n    // the scheduler can track the number of concurrent network connections.\n    return { value: null, closed: closed.promise }\n  } catch (error) {\n    rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000)\n    return null\n  }\n}\n\nfunction writeDynamicTreeResponseIntoCache(\n  now: number,\n  fetchStrategy:\n    | FetchStrategy.LoadingBoundary\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.Full,\n  response: RSCResponse<NavigationFlightResponse>,\n  serverData: NavigationFlightResponse,\n  entry: PendingRouteCacheEntry,\n  couldBeIntercepted: boolean,\n  canonicalUrl: string,\n  routeIsPPREnabled: boolean,\n  headVaryParams: VaryParams | null,\n  originalPathname: string,\n  nextUrl: string | null\n): void {\n  const renderedSearch = getRenderedSearch(response)\n\n  const normalizedFlightDataResult = normalizeFlightData(serverData.f)\n  if (\n    // A string result means navigating to this route will result in an\n    // MPA navigation.\n    typeof normalizedFlightDataResult === 'string' ||\n    normalizedFlightDataResult.length !== 1\n  ) {\n    rejectRouteCacheEntry(entry, now + 10 * 1000)\n    return\n  }\n  const flightData = normalizedFlightDataResult[0]\n  if (!flightData.isRootRender) {\n    // Unexpected response format.\n    rejectRouteCacheEntry(entry, now + 10 * 1000)\n    return\n  }\n\n  const flightRouterState = flightData.tree\n  // If the response was postponed, segments may contain dynamic holes.\n  // The head has its own partiality flag (flightDataEntry.isHeadPartial)\n  // which is handled separately in writeDynamicRenderResponseIntoCache.\n  const isResponsePartial =\n    response.headers.get(NEXT_DID_POSTPONE_HEADER) === '1'\n\n  // Convert the server-sent data into the RouteTree format used by the\n  // client cache.\n  //\n  // During this traversal, we accumulate additional data into this\n  // \"accumulator\" object.\n  const acc: RouteTreeAccumulator = { metadataVaryPath: null }\n  const routeTree = convertRootFlightRouterStateToRouteTree(\n    flightRouterState,\n    renderedSearch,\n    acc\n  )\n  const metadataVaryPath = acc.metadataVaryPath\n  if (metadataVaryPath === null) {\n    rejectRouteCacheEntry(entry, now + 10 * 1000)\n    return\n  }\n\n  discoverKnownRoute(\n    now,\n    originalPathname,\n    nextUrl,\n    entry,\n    routeTree,\n    metadataVaryPath,\n    couldBeIntercepted,\n    canonicalUrl,\n    routeIsPPREnabled,\n    false // hasDynamicRewrite\n  )\n\n  // If the server sent segment data as part of the response, we should write\n  // it into the cache to prevent a second, redundant prefetch request.\n  // TODO: This is a leftover branch from before Client Segment Cache was\n  // enabled everywhere. Tree prefetches should never include segment data.  We\n  // can delete it. Leaving for a subsequent PR.\n  const navigationSeed = convertServerPatchToFullTree(\n    now,\n    flightRouterState,\n    normalizedFlightDataResult,\n    renderedSearch,\n    UnknownDynamicStaleTime\n  )\n  const buildId =\n    response.headers.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ?? serverData.b\n  writeDynamicRenderResponseIntoCache(\n    now,\n    fetchStrategy,\n    normalizedFlightDataResult,\n    buildId,\n    isResponsePartial,\n    headVaryParams,\n    getStaleAtFromHeader(now, response),\n    navigationSeed,\n    null\n  )\n}\n\nfunction rejectSegmentEntriesIfStillPending(\n  entries: Map<SegmentRequestKey, SegmentCacheEntry>,\n  staleAt: number\n): Array<FulfilledSegmentCacheEntry> {\n  const fulfilledEntries = []\n  for (const entry of entries.values()) {\n    if (entry.status === EntryStatus.Pending) {\n      rejectSegmentCacheEntry(entry, staleAt)\n    } else if (entry.status === EntryStatus.Fulfilled) {\n      fulfilledEntries.push(entry)\n    }\n  }\n  return fulfilledEntries\n}\n\nexport function writeDynamicRenderResponseIntoCache(\n  now: number,\n  fetchStrategy:\n    | FetchStrategy.LoadingBoundary\n    | FetchStrategy.PPR\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.Full,\n  flightDatas: NormalizedFlightData[],\n  buildId: string | undefined,\n  isResponsePartial: boolean,\n  headVaryParams: VaryParams | null,\n  staleAt: number,\n  navigationSeed: NavigationSeed,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry> | null\n): Array<FulfilledSegmentCacheEntry> | null {\n  if (buildId && buildId !== getNavigationBuildId()) {\n    // The server build does not match the client. Treat as a 404. During\n    // an actual navigation, the router will trigger an MPA navigation.\n    if (spawnedEntries !== null) {\n      rejectSegmentEntriesIfStillPending(spawnedEntries, now + 10 * 1000)\n    }\n    return null\n  }\n\n  const routeTree = navigationSeed.routeTree\n  const metadataTree =\n    navigationSeed.metadataVaryPath !== null\n      ? createMetadataRouteTree(navigationSeed.metadataVaryPath)\n      : null\n\n  for (const flightDataEntry of flightDatas) {\n    const seedData = flightDataEntry.seedData\n    if (seedData !== null) {\n      // The data sent by the server represents only a subtree of the app. We\n      // need to find the part of the task tree that matches the response.\n      //\n      // segmentPath represents the parent path of subtree. It's a repeating\n      // pattern of parallel route key and segment:\n      //\n      //   [string, Segment, string, Segment, string, Segment, ...]\n      const segmentPath = flightDataEntry.segmentPath\n      let tree = routeTree\n      for (let i = 0; i < segmentPath.length; i += 2) {\n        const parallelRouteKey: string = segmentPath[i]\n        if (tree?.slots?.[parallelRouteKey] !== undefined) {\n          tree = tree.slots[parallelRouteKey]\n        } else {\n          if (spawnedEntries !== null) {\n            rejectSegmentEntriesIfStillPending(spawnedEntries, now + 10 * 1000)\n          }\n          return null\n        }\n      }\n\n      writeSeedDataIntoCache(\n        now,\n        fetchStrategy,\n        tree,\n        staleAt,\n        seedData,\n        isResponsePartial,\n        spawnedEntries\n      )\n    }\n\n    const head = flightDataEntry.head\n    if (head !== null && metadataTree !== null) {\n      // When Cache Components is enabled, the server conservatively marks\n      // the head as partial during static generation (isPossiblyPartialHead\n      // in app-render.tsx), even for fully static pages where the head is\n      // actually complete. When the response is non-partial, we override\n      // this since the server confirmed no dynamic content exists.\n      //\n      // Without Cache Components, the server always sends the correct\n      // isHeadPartial value, so no override is needed.\n      const isHeadPartial =\n        !isResponsePartial && process.env.__NEXT_CACHE_COMPONENTS\n          ? false\n          : flightDataEntry.isHeadPartial\n\n      fulfillEntrySpawnedByRuntimePrefetch(\n        now,\n        fetchStrategy,\n        head,\n        isHeadPartial,\n        staleAt,\n        // For head entries, use the head-specific vary params passed as\n        // parameter.\n        headVaryParams,\n        metadataTree,\n        spawnedEntries\n      )\n    }\n  }\n  // Any entry that's still pending was intentionally not rendered by the\n  // server, because it was inside the loading boundary. Mark them as rejected\n  // so we know not to fetch them again.\n  // TODO: If PPR is enabled on some routes but not others, then it's possible\n  // that a different page is able to do a per-segment prefetch of one of the\n  // segments we're marking as rejected here. We should mark on the segment\n  // somehow that the reason for the rejection is because of a non-PPR prefetch.\n  // That way a per-segment prefetch knows to disregard the rejection.\n  if (spawnedEntries !== null) {\n    const fulfilledEntries = rejectSegmentEntriesIfStillPending(\n      spawnedEntries,\n      now + 10 * 1000\n    )\n    return fulfilledEntries\n  }\n  return null\n}\n\nfunction writeSeedDataIntoCache(\n  now: number,\n  fetchStrategy:\n    | FetchStrategy.LoadingBoundary\n    | FetchStrategy.PPR\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.Full,\n  tree: RouteTree,\n  staleAt: number,\n  seedData: CacheNodeSeedData,\n  isResponsePartial: boolean,\n  entriesOwnedByCurrentTask: Map<\n    SegmentRequestKey,\n    PendingSegmentCacheEntry\n  > | null\n) {\n  // This function is used to write the result of a runtime server request\n  // (CacheNodeSeedData) into the prefetch cache.\n  const rsc = seedData[0]\n  const isPartial = rsc === null || isResponsePartial\n  const varyParamsThenable = seedData[4]\n  // Each segment carries its own vary params thenable in the seed data. The\n  // thenable resolves to the set of params the segment accessed during render.\n  // A null thenable means tracking was not enabled (not a prerender).\n  const varyParams =\n    varyParamsThenable !== null ? readVaryParams(varyParamsThenable) : null\n  fulfillEntrySpawnedByRuntimePrefetch(\n    now,\n    fetchStrategy,\n    rsc,\n    isPartial,\n    staleAt,\n    varyParams,\n    tree,\n    entriesOwnedByCurrentTask\n  )\n\n  // Recursively write the child data into the cache.\n  const slots = tree.slots\n  if (slots !== null) {\n    const seedDataChildren = seedData[1]\n    for (const parallelRouteKey in slots) {\n      const childTree = slots[parallelRouteKey]\n      const childSeedData: CacheNodeSeedData | null | void =\n        seedDataChildren[parallelRouteKey]\n      if (childSeedData !== null && childSeedData !== undefined) {\n        writeSeedDataIntoCache(\n          now,\n          fetchStrategy,\n          childTree,\n          staleAt,\n          childSeedData,\n          isResponsePartial,\n          entriesOwnedByCurrentTask\n        )\n      }\n    }\n  }\n}\n\nfunction fulfillEntrySpawnedByRuntimePrefetch(\n  now: number,\n  fetchStrategy:\n    | FetchStrategy.LoadingBoundary\n    | FetchStrategy.PPR\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.Full,\n  rsc: React.ReactNode,\n  isPartial: boolean,\n  staleAt: number,\n  segmentVaryParams: Set<string> | null,\n  tree: RouteTree,\n  entriesOwnedByCurrentTask: Map<\n    SegmentRequestKey,\n    PendingSegmentCacheEntry\n  > | null\n) {\n  // We should only write into cache entries that are owned by us. Or create\n  // a new one and write into that. We must never write over an entry that was\n  // created by a different task, because that causes data races.\n  const ownedEntry =\n    entriesOwnedByCurrentTask !== null\n      ? entriesOwnedByCurrentTask.get(tree.requestKey)\n      : undefined\n  if (ownedEntry !== undefined) {\n    const fulfilledEntry = fulfillSegmentCacheEntry(\n      ownedEntry,\n      rsc,\n      staleAt,\n      isPartial\n    )\n    // Re-key the entry based on which params the segment actually depends on.\n    if (process.env.__NEXT_VARY_PARAMS && segmentVaryParams !== null) {\n      const fulfilledVaryPath = getFulfilledSegmentVaryPath(\n        tree.varyPath,\n        segmentVaryParams\n      )\n      const isRevalidation = false\n      setInCacheMap(\n        segmentCacheMap,\n        fulfilledVaryPath,\n        fulfilledEntry,\n        isRevalidation\n      )\n    }\n  } else {\n    // There's no matching entry. Attempt to create a new one.\n    const possiblyNewEntry = readOrCreateSegmentCacheEntry(\n      now,\n      fetchStrategy,\n      tree\n    )\n    if (possiblyNewEntry.status === EntryStatus.Empty) {\n      // Confirmed this is a new entry. We can fulfill it.\n      const newEntry = possiblyNewEntry\n      const fulfilledEntry = fulfillSegmentCacheEntry(\n        upgradeToPendingSegment(newEntry, fetchStrategy),\n        rsc,\n        staleAt,\n        isPartial\n      )\n      // Re-key the entry based on which params the segment actually depends on.\n      if (process.env.__NEXT_VARY_PARAMS && segmentVaryParams !== null) {\n        const fulfilledVaryPath = getFulfilledSegmentVaryPath(\n          tree.varyPath,\n          segmentVaryParams\n        )\n        const isRevalidation = false\n        setInCacheMap(\n          segmentCacheMap,\n          fulfilledVaryPath,\n          fulfilledEntry,\n          isRevalidation\n        )\n      }\n    } else {\n      // There was already an entry in the cache. But we may be able to\n      // replace it with the new one from the server.\n      const newEntry = fulfillSegmentCacheEntry(\n        upgradeToPendingSegment(\n          createDetachedSegmentCacheEntry(now),\n          fetchStrategy\n        ),\n        rsc,\n        staleAt,\n        isPartial\n      )\n      // Use the fulfilled vary path if available, otherwise fall back to\n      // the request vary path.\n      const varyPath =\n        process.env.__NEXT_VARY_PARAMS && segmentVaryParams !== null\n          ? getFulfilledSegmentVaryPath(tree.varyPath, segmentVaryParams)\n          : getSegmentVaryPathForRequest(fetchStrategy, tree)\n      upsertSegmentEntry(now, varyPath, newEntry)\n    }\n  }\n}\n\nasync function fetchPrefetchResponse<T>(\n  url: URL,\n  headers: RequestHeaders\n): Promise<RSCResponse<T> | null> {\n  const fetchPriority = 'low'\n  // When issuing a prefetch request, don't immediately decode the response; we\n  // use the lower level `createFromResponse` API instead because we need to do\n  // some extra processing of the response stream. See\n  // `createNonTaskyPrefetchResponseStream` for more details.\n  const shouldImmediatelyDecode = false\n  const response = await createFetch<T>(\n    url,\n    headers,\n    fetchPriority,\n    shouldImmediatelyDecode\n  )\n  if (!response.ok) {\n    return null\n  }\n\n  // Check the content type\n  if (isOutputExportMode) {\n    // In output: \"export\" mode, we relaxed about the content type, since it's\n    // not Next.js that's serving the response. If the status is OK, assume the\n    // response is valid. If it's not a valid response, the Flight client won't\n    // be able to decode it, and we'll treat it as a miss.\n  } else {\n    const contentType = response.headers.get('content-type')\n    const isFlightResponse =\n      contentType && contentType.startsWith(RSC_CONTENT_TYPE_HEADER)\n    if (!isFlightResponse) {\n      return null\n    }\n  }\n  return response\n}\n\nasync function createNonTaskyPrefetchResponseStream(\n  body: ReadableStream<Uint8Array>\n): Promise<{ stream: ReadableStream<Uint8Array>; size: number }> {\n  // Buffer the entire response before passing it to the Flight client. This\n  // ensures that when Flight processes the stream, all model data is available\n  // synchronously. This is important for readVaryParams, which synchronously\n  // checks the thenable status — if data arrived in multiple network chunks,\n  // the thenables might not yet be fulfilled.\n  //\n  // TODO: There are too many intermediate stream transformations in the\n  // prefetch response pipeline (e.g. stripIsPartialByte, this function).\n  // These could all be consolidated into a single transformation. Refactor\n  // once the cached navigations experiment lands.\n  //\n  // Read the entire response from the network.\n  const reader = body.getReader()\n  const chunks: Uint8Array[] = []\n  let size = 0\n  while (true) {\n    const { done, value } = await reader.read()\n    if (done) break\n    chunks.push(value)\n    size += value.byteLength\n  }\n  // Concatenate into a single chunk so that Flight's processBinaryChunk\n  // processes all rows synchronously in one call. Multiple chunks would not\n  // be sufficient: even though reader.read() resolves as a microtask for\n  // already-enqueued data, the `await` continuation from\n  // createFromReadableStream can interleave between chunks. If the root\n  // model row isn't the first row (e.g. outlined values come first), the\n  // PromiseResolveThenableJob from `await` can cause the root to initialize\n  // eagerly, scheduling the continuation before remaining chunks (including\n  // promise value rows) are processed. A single chunk avoids this.\n  let buffer: Uint8Array\n  if (chunks.length === 1) {\n    buffer = chunks[0]\n  } else if (chunks.length > 1) {\n    buffer = new Uint8Array(size)\n    let offset = 0\n    for (const chunk of chunks) {\n      buffer.set(chunk, offset)\n      offset += chunk.byteLength\n    }\n  } else {\n    buffer = new Uint8Array(0)\n  }\n  const stream = new ReadableStream<Uint8Array>({\n    start(controller) {\n      controller.enqueue(buffer)\n      controller.close()\n    },\n  })\n  return { stream, size }\n}\n\n/**\n * Creates a streaming (non-buffered) prefetch response stream for dynamic/Full\n * prefetches. These are essentially dynamic responses that get stored in the\n * prefetch cache — they don't carry vary params or other cache metadata that\n * requires synchronous thenable resolution, so there's no need to buffer them.\n * They should continue to stream so consumers can process data as it arrives.\n */\nfunction createIncrementalPrefetchResponseStream(\n  originalFlightStream: ReadableStream<Uint8Array>,\n  onStreamClose: () => void,\n  onResponseSizeUpdate: (size: number) => void\n): ReadableStream<Uint8Array> {\n  // While processing the original stream, we incrementally update the size\n  // of the cache entry in the LRU.\n  let totalByteLength = 0\n  const reader = originalFlightStream.getReader()\n  return new ReadableStream({\n    async pull(controller) {\n      while (true) {\n        const { done, value } = await reader.read()\n        if (!done) {\n          // Pass to the target stream and keep consuming the Flight response\n          // from the server.\n          controller.enqueue(value)\n\n          // Incrementally update the size of the cache entry in the LRU.\n          totalByteLength += value.byteLength\n          onResponseSizeUpdate(totalByteLength)\n          continue\n        }\n        controller.close()\n        onStreamClose()\n        return\n      }\n    },\n  })\n}\n\nfunction addSegmentPathToUrlInOutputExportMode(\n  url: URL,\n  segmentPath: SegmentRequestKey\n): URL {\n  if (isOutputExportMode) {\n    // In output: \"export\" mode, we cannot use a header to encode the segment\n    // path. Instead, we append it to the end of the pathname.\n    const staticUrl = new URL(url)\n    const routeDir = staticUrl.pathname.endsWith('/')\n      ? staticUrl.pathname.slice(0, -1)\n      : staticUrl.pathname\n    const staticExportFilename =\n      convertSegmentPathToStaticExportFilename(segmentPath)\n    staticUrl.pathname = `${routeDir}/${staticExportFilename}`\n    return staticUrl\n  }\n  return url\n}\n\n/**\n * Checks whether the new fetch strategy is likely to provide more content than the old one.\n *\n * Generally, when an app uses dynamic data, a \"more specific\" fetch strategy is expected to provide more content:\n * - `LoadingBoundary` only provides static layouts\n * - `PPR` can provide shells for each segment (even for segments that use dynamic data)\n * - `PPRRuntime` can additionally include content that uses searchParams, params, or cookies\n * - `Full` includes all the content, even if it uses dynamic data\n *\n * However, it's possible that a more specific fetch strategy *won't* give us more content if:\n * - a segment is fully static\n *   (then, `PPR`/`PPRRuntime`/`Full` will all yield equivalent results)\n * - providing searchParams/params/cookies doesn't reveal any more content, e.g. because of an `await connection()`\n *   (then, `PPR` and `PPRRuntime` will yield equivalent results, only `Full` will give us more)\n * Because of this, when comparing two segments, we should also check if the existing segment is partial.\n * If it's not partial, then there's no need to prefetch it again, even using a \"more specific\" strategy.\n * There's currently no way to know if `PPRRuntime` will yield more data that `PPR`, so we have to assume it will.\n *\n * Also note that, in practice, we don't expect to be comparing `LoadingBoundary` to `PPR`/`PPRRuntime`,\n * because a non-PPR-enabled route wouldn't ever use the latter strategies. It might however use `Full`.\n */\nexport function canNewFetchStrategyProvideMoreContent(\n  currentStrategy: FetchStrategy,\n  newStrategy: FetchStrategy\n): boolean {\n  return currentStrategy < newStrategy\n}\n\n/**\n * Adds the instant prefetch header if the navigation lock is active.\n * Uses a lazy require to ensure dead code elimination.\n */\nfunction addInstantPrefetchHeaderIfLocked(\n  headers: Record<string, string>\n): void {\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    const { isNavigationLocked } =\n      require('./navigation-testing-lock') as typeof import('./navigation-testing-lock')\n    if (isNavigationLocked()) {\n      headers[NEXT_INSTANT_PREFETCH_HEADER] = '1'\n    }\n  }\n}\n\nfunction getStaleAtFromHeader(\n  now: number,\n  response: RSCResponse<unknown>\n): number {\n  const staleTimeSeconds = parseInt(\n    response.headers.get(NEXT_ROUTER_STALE_TIME_HEADER) ?? '',\n    10\n  )\n\n  const staleTimeMs = !isNaN(staleTimeSeconds)\n    ? getStaleTimeMs(staleTimeSeconds)\n    : STATIC_STALETIME_MS\n\n  return now + staleTimeMs\n}\n\n/**\n * Reads the stale time from an async iterable or a response header and\n * returns a staleAt timestamp.\n *\n * TODO: Buffer the response and then read the iterable values\n * synchronously, similar to readVaryParams. This would avoid the need to\n * make this async, and we could also use it in\n * writeDynamicTreeResponseIntoCache. This will also be needed when React\n * starts leaving async iterables hanging when the outer RSC stream is\n * aborted e.g. due to sync I/O (with unstable_allowPartialStream).\n */\nexport async function getStaleAt(\n  now: number,\n  staleTimeIterable: AsyncIterable<number> | undefined,\n  response?: RSCResponse<unknown>\n): Promise<number> {\n  if (staleTimeIterable !== undefined) {\n    // Iterate the async iterable and take the last yielded value. The server\n    // yields updated staleTime values during the render; the last one is the\n    // final staleTime.\n    let staleTimeSeconds: number | undefined\n    for await (const value of staleTimeIterable) {\n      staleTimeSeconds = value\n    }\n\n    if (staleTimeSeconds !== undefined) {\n      const staleTimeMs = isNaN(staleTimeSeconds)\n        ? STATIC_STALETIME_MS\n        : getStaleTimeMs(staleTimeSeconds)\n\n      return now + staleTimeMs\n    }\n  }\n\n  if (response !== undefined) {\n    return getStaleAtFromHeader(now, response)\n  }\n\n  return now + STATIC_STALETIME_MS\n}\n\n/**\n * Writes the static stage of a navigation response into the segment cache.\n * When `isResponsePartial` is false, segments are written as non-partial with\n * `FetchStrategy.Full` so no dynamic follow-up is needed. Default segments\n * are skipped (by `writeSeedDataIntoCache`) to avoid caching fallback content\n * that would block refreshes from overwriting with dynamic data.\n */\nexport function writeStaticStageResponseIntoCache(\n  now: number,\n  flightData: FlightData,\n  buildId: string | undefined,\n  headVaryParamsThenable: VaryParamsThenable | null,\n  staleAt: number,\n  baseTree: FlightRouterState,\n  renderedSearch: string,\n  isResponsePartial: boolean\n): void {\n  const fetchStrategy = isResponsePartial\n    ? FetchStrategy.PPR\n    : FetchStrategy.Full\n\n  const headVaryParams =\n    headVaryParamsThenable !== null\n      ? readVaryParams(headVaryParamsThenable)\n      : null\n\n  const flightDatas = normalizeFlightData(flightData)\n  if (typeof flightDatas === 'string') {\n    return\n  }\n  const navigationSeed = convertServerPatchToFullTree(\n    now,\n    baseTree,\n    flightDatas,\n    renderedSearch,\n    UnknownDynamicStaleTime\n  )\n  writeDynamicRenderResponseIntoCache(\n    now,\n    fetchStrategy,\n    flightDatas,\n    buildId,\n    isResponsePartial,\n    headVaryParams,\n    staleAt,\n    navigationSeed,\n    null // spawnedEntries — no pre-created entries; will create or upsert\n  )\n}\n\n/**\n * Decodes an embedded runtime prefetch Flight stream, normalizes the flight\n * data, and derives a `NavigationSeed` from the base tree.\n *\n * Returns `null` if the response triggers an MPA navigation.\n */\nexport async function processRuntimePrefetchStream(\n  now: number,\n  runtimePrefetchStream: ReadableStream<Uint8Array>,\n  baseTree: FlightRouterState,\n  renderedSearch: string\n): Promise<{\n  flightDatas: NormalizedFlightData[]\n  navigationSeed: NavigationSeed\n  buildId: string | undefined\n  isResponsePartial: boolean\n  headVaryParams: VaryParams | null\n  staleAt: number\n} | null> {\n  const { stream, isPartial } = await stripIsPartialByte(runtimePrefetchStream)\n\n  const serverData =\n    await createFromNextReadableStream<NavigationFlightResponse>(\n      stream,\n      undefined,\n      { allowPartialStream: true }\n    )\n\n  const headVaryParamsThenable = serverData.h\n  const headVaryParams =\n    headVaryParamsThenable !== null\n      ? readVaryParams(headVaryParamsThenable)\n      : null\n\n  const staleAt = await getStaleAt(now, serverData.s)\n\n  const flightDatas = normalizeFlightData(serverData.f)\n  if (typeof flightDatas === 'string') {\n    return null\n  }\n  const navigationSeed = convertServerPatchToFullTree(\n    now,\n    baseTree,\n    flightDatas,\n    renderedSearch,\n    UnknownDynamicStaleTime\n  )\n\n  return {\n    flightDatas,\n    navigationSeed,\n    buildId: serverData.b,\n    isResponsePartial: isPartial,\n    headVaryParams,\n    staleAt,\n  }\n}\n\n/**\n * Strips the leading isPartial byte from an RSC response stream.\n *\n * The server prepends a single byte: '~' (0x7e) for partial, '#' (0x23) for\n * complete. These bytes cannot appear as the first byte of a valid RSC Flight\n * response (Flight rows start with a hex digit or ':').\n *\n * If the first byte is not a recognized marker, the stream is returned intact\n * and `isPartial` is determined by the cachedNavigations experimental flag.\n */\nexport async function stripIsPartialByte(\n  stream: ReadableStream<Uint8Array>\n): Promise<{ stream: ReadableStream<Uint8Array>; isPartial: boolean }> {\n  // When there is no recognized marker byte, the fallback depends on whether\n  // Cached Navigations is enabled. When enabled, dynamic navigation responses\n  // don't have a marker but may contain dynamic holes, so they are treated as\n  // partial. When disabled, unmarked responses are treated as non-partial.\n  const defaultIsPartial = !!process.env.__NEXT_EXPERIMENTAL_CACHED_NAVIGATIONS\n\n  const reader = stream.getReader()\n  const { done, value } = await reader.read()\n\n  if (done || !value || value.byteLength === 0) {\n    return {\n      stream: new ReadableStream({ start: (c) => c.close() }),\n      isPartial: defaultIsPartial,\n    }\n  }\n\n  const firstByte = value[0]\n  const hasMarker = firstByte === 0x23 || firstByte === 0x7e\n  const isPartial = hasMarker ? firstByte === 0x7e : defaultIsPartial\n\n  const remainder = hasMarker\n    ? value.byteLength > 1\n      ? value.subarray(1)\n      : null\n    : value\n\n  return {\n    isPartial,\n    stream: new ReadableStream<Uint8Array>({\n      start(controller) {\n        if (remainder) {\n          controller.enqueue(remainder)\n        }\n      },\n      async pull(controller) {\n        const result = await reader.read()\n        if (result.done) {\n          controller.close()\n        } else {\n          controller.enqueue(result.value)\n        }\n      },\n    }),\n  }\n}\n","import { deleteMapEntry } from './cache-map'\nimport type { UnknownMapEntry } from './cache-map'\nimport { pingPrefetchScheduler } from './scheduler'\n\n// We use an LRU for memory management. We must update this whenever we add or\n// remove a new cache entry, or when an entry changes size.\n\nlet head: UnknownMapEntry | null = null\nlet lruSize: number = 0\n\n// TODO: I chose the max size somewhat arbitrarily. Consider setting this based\n// on navigator.deviceMemory, or some other heuristic. We should make this\n// customizable via the Next.js config, too.\nconst maxLruSize = 50 * 1024 * 1024 // 50 MB\n\nexport function lruPut(node: UnknownMapEntry) {\n  if (head === node) {\n    // Already at the head\n    return\n  }\n  const prev = node.prev\n  const next = node.next\n  if (next === null || prev === null) {\n    // This is an insertion\n    lruSize += node.size\n    // Whenever we add an entry, we need to check if we've exceeded the\n    // max size. We don't evict entries immediately; they're evicted later in\n    // an asynchronous task.\n    ensureCleanupIsScheduled()\n  } else {\n    // This is a move. Remove from its current position.\n    prev.next = next\n    next.prev = prev\n  }\n\n  // Move to the front of the list\n  if (head === null) {\n    // This is the first entry\n    node.prev = node\n    node.next = node\n  } else {\n    // Add to the front of the list\n    const tail = head.prev\n    node.prev = tail\n    // In practice, this is never null, but that isn't encoded in the type\n    if (tail !== null) {\n      tail.next = node\n    }\n    node.next = head\n    head.prev = node\n  }\n  head = node\n}\n\nexport function updateLruSize(node: UnknownMapEntry, newNodeSize: number) {\n  // This is a separate function from `put` so that we can resize the entry\n  // regardless of whether it's currently being tracked by the LRU.\n  const prevNodeSize = node.size\n  node.size = newNodeSize\n  if (node.next === null) {\n    // This entry is not currently being tracked by the LRU.\n    return\n  }\n  // Update the total LRU size\n  lruSize = lruSize - prevNodeSize + newNodeSize\n  ensureCleanupIsScheduled()\n}\n\nexport function deleteFromLru(deleted: UnknownMapEntry) {\n  const next = deleted.next\n  const prev = deleted.prev\n  if (next !== null && prev !== null) {\n    lruSize -= deleted.size\n\n    deleted.next = null\n    deleted.prev = null\n\n    // Remove from the list\n    if (head === deleted) {\n      // Update the head\n      if (next === head) {\n        // This was the last entry\n        head = null\n      } else {\n        head = next\n        prev.next = next\n        next.prev = prev\n      }\n    } else {\n      prev.next = next\n      next.prev = prev\n    }\n  } else {\n    // Already deleted\n  }\n}\n\nfunction ensureCleanupIsScheduled() {\n  if (lruSize <= maxLruSize) {\n    return\n  }\n\n  // To schedule cleanup, ping the prefetch scheduler. At the end of its work\n  // loop, once there are no queued tasks and no in-progress requests, it will\n  // call cleanup().\n  pingPrefetchScheduler()\n}\n\nexport function cleanup() {\n  if (lruSize <= maxLruSize) {\n    return\n  }\n\n  // Evict entries until we're at 90% capacity. We can assume this won't\n  // infinite loop because even if `maxLruSize` were 0, eventually\n  // `deleteFromLru` sets `head` to `null` when we run out entries.\n  const ninetyPercentMax = maxLruSize * 0.9\n  while (lruSize > ninetyPercentMax && head !== null) {\n    const tail = head.prev\n    // In practice, this is never null, but that isn't encoded in the type\n    if (tail !== null) {\n      // Delete the entry from the map. In turn, this will remove it from\n      // the LRU.\n      deleteMapEntry(tail)\n    }\n  }\n}\n","/**\n * Navigation lock for the Instant Navigation Testing API.\n *\n * Manages the in-memory lock (a promise) that gates dynamic data writes\n * during instant navigation captures, and owns all cookie state\n * transitions (pending → captured-MPA, pending → captured-SPA).\n *\n * External actors (Playwright, devtools) set [0] to start a lock scope\n * and delete the cookie to end one. Next.js writes captured values.\n * The CookieStore handler distinguishes them by value: pending = external,\n * captured = self-write (ignored).\n */\n\nimport type { FlightRouterState } from '../../../shared/lib/app-router-types'\nimport { NEXT_INSTANT_TEST_COOKIE } from '../app-router-headers'\nimport { refreshOnInstantNavigationUnlock } from '../use-action-queue'\n\ntype InstantNavCookieState = 'pending' | 'mpa' | 'spa'\n\ntype InstantCookie =\n  // pending (waiting to capture)\n  | [captured: 0, id: string]\n  // captured MPA page load\n  | [captured: 1, id: string, state: null]\n  // captured SPA navigation (from/to route trees)\n  | [\n      captured: 1,\n      id: string,\n      state: { from: FlightRouterState; to: FlightRouterState | null },\n    ]\n\nfunction parseCookieValue(raw: string): InstantNavCookieState {\n  try {\n    const parsed = JSON.parse(raw)\n    if (Array.isArray(parsed) && parsed.length >= 3) {\n      const rawState = parsed[2]\n      return rawState === null ? 'mpa' : 'spa'\n    }\n  } catch {}\n  return 'pending'\n}\n\nfunction writeCookieValue(value: InstantCookie): void {\n  if (typeof cookieStore === 'undefined') {\n    return\n  }\n  // Read the existing cookie to preserve its attributes (domain, path),\n  // then write back with the new value. This updates the same cookie\n  // entry that the external actor created, regardless of how it was\n  // scoped.\n  cookieStore.get(NEXT_INSTANT_TEST_COOKIE).then((existing: any) => {\n    if (existing) {\n      const options: any = {\n        name: NEXT_INSTANT_TEST_COOKIE,\n        value: JSON.stringify(value),\n        path: existing.path ?? '/',\n      }\n      if (existing.domain) {\n        options.domain = existing.domain\n      }\n      cookieStore.set(options)\n    }\n  })\n}\n\ntype NavigationLockState = {\n  promise: Promise<void>\n  resolve: () => void\n}\n\nlet lockState: NavigationLockState | null = null\n\nfunction acquireLock(): void {\n  if (lockState !== null) {\n    return\n  }\n  let resolve: () => void\n  const promise = new Promise<void>((r) => {\n    resolve = r\n  })\n  lockState = { promise, resolve: resolve! }\n}\n\nfunction releaseLock(): void {\n  if (lockState !== null) {\n    lockState.resolve()\n    lockState = null\n  }\n}\n\n/**\n * Sets up the cookie-based lock. Handles the initial page load state and\n * registers a CookieStore listener for runtime changes.\n *\n * Called once during page initialization from app-globals.ts.\n */\nexport function startListeningForInstantNavigationCookie(): void {\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    // If the server served a static shell, this is an MPA page load\n    // while the lock is held. Transition to captured-MPA and acquire.\n    if (self.__next_instant_test) {\n      if (typeof cookieStore !== 'undefined') {\n        // If the cookie was already cleared during the MPA page\n        // transition, reload to get the full dynamic page.\n        cookieStore.get(NEXT_INSTANT_TEST_COOKIE).then((cookie: any) => {\n          if (!cookie) {\n            window.location.reload()\n          }\n        })\n      }\n\n      writeCookieValue([1, `c${Math.random()}`, null])\n      acquireLock()\n    }\n\n    if (typeof cookieStore === 'undefined') {\n      return\n    }\n\n    cookieStore.addEventListener('change', (event: CookieChangeEvent) => {\n      for (const cookie of event.changed) {\n        if (cookie.name === NEXT_INSTANT_TEST_COOKIE) {\n          const state = parseCookieValue(cookie.value ?? '')\n\n          if (state !== 'pending') {\n            // Captured value — our own transition. Ignore.\n            return\n          }\n\n          // Pending value — external actor starting a new lock scope.\n          if (lockState !== null) {\n            releaseLock()\n          }\n          acquireLock()\n          return\n        }\n      }\n\n      for (const cookie of event.deleted) {\n        if (cookie.name === NEXT_INSTANT_TEST_COOKIE) {\n          releaseLock()\n          refreshOnInstantNavigationUnlock()\n          return\n        }\n      }\n    })\n  }\n}\n\n/**\n * Transitions the cookie from pending to captured-SPA. Called when a\n * client-side navigation is captured by the lock.\n *\n * @param fromTree - The flight router state of the from-route\n * @param toTree - The flight router state of the to-route (null if not yet known)\n */\nexport function transitionToCapturedSPA(\n  fromTree: FlightRouterState,\n  toTree: FlightRouterState | null\n): void {\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    writeCookieValue([1, `c${Math.random()}`, { from: fromTree, to: toTree }])\n  }\n}\n\n/**\n * Updates the captured-SPA cookie with the resolved route trees.\n * Called after the prefetch resolves and the target route tree is known.\n */\nexport function updateCapturedSPAToTree(\n  fromTree: FlightRouterState,\n  toTree: FlightRouterState\n): void {\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    writeCookieValue([1, `c${Math.random()}`, { from: fromTree, to: toTree }])\n  }\n}\n\n/**\n * Returns true if the navigation lock is currently active.\n */\nexport function isNavigationLocked(): boolean {\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    return lockState !== null\n  }\n  return false\n}\n\n/**\n * Waits for the navigation lock to be released, if it's currently held.\n * No-op if the lock is not acquired.\n */\nexport async function waitForNavigationLockIfActive(): Promise<void> {\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    if (lockState !== null) {\n      await lockState.promise\n    }\n  }\n}\n","import type {\n  CacheNodeSeedData,\n  FlightRouterState,\n  FlightSegmentPath,\n  ScrollRef,\n} from '../../../shared/lib/app-router-types'\nimport type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type { HeadData } from '../../../shared/lib/app-router-types'\nimport type { NormalizedFlightData } from '../../flight-data-helpers'\nimport { fetchServerResponse } from '../router-reducer/fetch-server-response'\nimport {\n  startPPRNavigation,\n  spawnDynamicRequests,\n  FreshnessPolicy,\n  type NavigationRequestAccumulation,\n} from '../router-reducer/ppr-navigations'\nimport { createHrefFromUrl } from '../router-reducer/create-href-from-url'\nimport { NEXT_NAV_DEPLOYMENT_ID_HEADER } from '../../../lib/constants'\nimport {\n  EntryStatus,\n  readRouteCacheEntry,\n  deprecated_requestOptimisticRouteCacheEntry,\n  convertRootFlightRouterStateToRouteTree,\n  getStaleAt,\n  writeStaticStageResponseIntoCache,\n  processRuntimePrefetchStream,\n  writeDynamicRenderResponseIntoCache,\n  type RouteTree,\n  type FulfilledRouteCacheEntry,\n} from './cache'\nimport { discoverKnownRoute } from './optimistic-routes'\nimport { createCacheKey, type NormalizedSearch } from './cache-key'\nimport { schedulePrefetchTask } from './scheduler'\nimport { PrefetchPriority, FetchStrategy } from './types'\nimport { getLinkForCurrentNavigation } from '../links'\nimport type { PageVaryPath } from './vary-path'\nimport type { AppRouterState } from '../router-reducer/router-reducer-types'\nimport { ScrollBehavior } from '../router-reducer/router-reducer-types'\nimport { computeChangedPath } from '../router-reducer/compute-changed-path'\nimport { isJavaScriptURLString } from '../../lib/javascript-url'\nimport { UnknownDynamicStaleTime, computeDynamicStaleAt } from './bfcache'\n\n/**\n * Navigate to a new URL, using the Segment Cache to construct a response.\n *\n * To allow for synchronous navigations whenever possible, this is not an async\n * function. It returns a promise only if there's no matching prefetch in\n * the cache. Otherwise it returns an immediate result and uses Suspense/RSC to\n * stream in any missing data.\n */\nexport function navigate(\n  state: AppRouterState,\n  url: URL,\n  currentUrl: URL,\n  currentRenderedSearch: string,\n  currentCacheNode: CacheNode | null,\n  currentFlightRouterState: FlightRouterState,\n  nextUrl: string | null,\n  freshnessPolicy: FreshnessPolicy,\n  scrollBehavior: ScrollBehavior,\n  navigateType: 'push' | 'replace'\n): AppRouterState | Promise<AppRouterState> {\n  // Instant Navigation Testing API: when the lock is active, ensure a\n  // prefetch task has been initiated before proceeding with the navigation.\n  // This guarantees that segment data requests are at least pending, even\n  // for routes that already have a cached route tree. Without this, the\n  // static shell might be incomplete because some segments were never\n  // requested.\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    const { isNavigationLocked } =\n      require('./navigation-testing-lock') as typeof import('./navigation-testing-lock')\n    if (isNavigationLocked()) {\n      return ensurePrefetchThenNavigate(\n        state,\n        url,\n        currentUrl,\n        currentRenderedSearch,\n        currentCacheNode,\n        currentFlightRouterState,\n        nextUrl,\n        freshnessPolicy,\n        scrollBehavior,\n        navigateType\n      )\n    }\n  }\n\n  return navigateImpl(\n    state,\n    url,\n    currentUrl,\n    currentRenderedSearch,\n    currentCacheNode,\n    currentFlightRouterState,\n    nextUrl,\n    freshnessPolicy,\n    scrollBehavior,\n    navigateType\n  )\n}\n\nfunction navigateImpl(\n  state: AppRouterState,\n  url: URL,\n  currentUrl: URL,\n  currentRenderedSearch: string,\n  currentCacheNode: CacheNode | null,\n  currentFlightRouterState: FlightRouterState,\n  nextUrl: string | null,\n  freshnessPolicy: FreshnessPolicy,\n  scrollBehavior: ScrollBehavior,\n  navigateType: 'push' | 'replace'\n): AppRouterState | Promise<AppRouterState> {\n  const now = Date.now()\n  const href = url.href\n\n  const cacheKey = createCacheKey(href, nextUrl)\n  const route = readRouteCacheEntry(now, cacheKey)\n  if (route !== null && route.status === EntryStatus.Fulfilled) {\n    // We have a matching prefetch.\n    return navigateUsingPrefetchedRouteTree(\n      now,\n      state,\n      url,\n      currentUrl,\n      currentRenderedSearch,\n      nextUrl,\n      currentCacheNode,\n      currentFlightRouterState,\n      freshnessPolicy,\n      scrollBehavior,\n      navigateType,\n      route\n    )\n  }\n\n  // There was no matching route tree in the cache. Let's see if we can\n  // construct an \"optimistic\" route tree using the deprecated search-params\n  // based matching. This is only used when the new optimisticRouting flag is\n  // disabled.\n  //\n  // Do not construct an optimistic route tree if there was a cache hit, but\n  // the entry has a rejected status, since it may have been rejected due to a\n  // rewrite or redirect based on the search params.\n  //\n  // TODO: There are multiple reasons a prefetch might be rejected; we should\n  // track them explicitly and choose what to do here based on that.\n  if (!process.env.__NEXT_OPTIMISTIC_ROUTING) {\n    if (route === null || route.status !== EntryStatus.Rejected) {\n      const optimisticRoute = deprecated_requestOptimisticRouteCacheEntry(\n        now,\n        url,\n        nextUrl\n      )\n      if (optimisticRoute !== null) {\n        // We have an optimistic route tree. Proceed with the normal flow.\n        return navigateUsingPrefetchedRouteTree(\n          now,\n          state,\n          url,\n          currentUrl,\n          currentRenderedSearch,\n          nextUrl,\n          currentCacheNode,\n          currentFlightRouterState,\n          freshnessPolicy,\n          scrollBehavior,\n          navigateType,\n          optimisticRoute\n        )\n      }\n    }\n  }\n\n  // There's no matching prefetch for this route in the cache. We must lazily\n  // fetch it from the server before we can perform the navigation.\n  //\n  // TODO: If this is a gesture navigation, instead of performing a\n  // dynamic request, we should do a runtime prefetch.\n  return navigateToUnknownRoute(\n    now,\n    state,\n    url,\n    currentUrl,\n    currentRenderedSearch,\n    nextUrl,\n    currentCacheNode,\n    currentFlightRouterState,\n    freshnessPolicy,\n    scrollBehavior,\n    navigateType\n  ).catch(() => {\n    // If the navigation fails, return the current state\n    return state\n  })\n}\n\nexport function navigateToKnownRoute(\n  now: number,\n  state: AppRouterState,\n  url: URL,\n  canonicalUrl: string,\n  navigationSeed: NavigationSeed,\n  currentUrl: URL,\n  currentRenderedSearch: string,\n  currentCacheNode: CacheNode | null,\n  currentFlightRouterState: FlightRouterState,\n  freshnessPolicy: FreshnessPolicy,\n  nextUrl: string | null,\n  scrollBehavior: ScrollBehavior,\n  navigateType: 'push' | 'replace',\n  debugInfo: Array<unknown> | null,\n  // The route cache entry used for this navigation, if it came from route\n  // prediction. Passed through so it can be marked as having a dynamic rewrite\n  // if the server returns a different pathname (indicating dynamic rewrite\n  // behavior).\n  //\n  // When null, the navigation did not use route prediction - either because\n  // the route was already fully cached, or it's a navigation that doesn't\n  // involve prediction (refresh, history traversal, server action, etc.).\n  // In these cases, if a mismatch occurs, we still mark the route as having a\n  // dynamic rewrite by traversing the known route tree (see\n  // dispatchRetryDueToTreeMismatch).\n  routeCacheEntry: FulfilledRouteCacheEntry | null\n): AppRouterState {\n  // A version of navigate() that accepts the target route tree as an argument\n  // rather than reading it from the prefetch cache.\n  const accumulation: NavigationRequestAccumulation = {\n    separateRefreshUrls: null,\n    scrollRef: null,\n  }\n  // We special case navigations to the exact same URL as the current location.\n  // It's a common UI pattern for apps to refresh when you click a link to the\n  // current page. So when this happens, we refresh the dynamic data in the page\n  // segments.\n  //\n  // Note that this does not apply if the any part of the hash or search query\n  // has changed. This might feel a bit weird but it makes more sense when you\n  // consider that the way to trigger this behavior is to click the same link\n  // multiple times.\n  //\n  // TODO: We should probably refresh the *entire* route when this case occurs,\n  // not just the page segments. Essentially treating it the same as a refresh()\n  // triggered by an action, which is the more explicit way of modeling the UI\n  // pattern described above.\n  //\n  // Also note that this only refreshes the dynamic data, not static/ cached\n  // data. If the page segment is fully static and prefetched, the request is\n  // skipped. (This is also how refresh() works.)\n  const isSamePageNavigation = url.href === currentUrl.href\n  const task = startPPRNavigation(\n    now,\n    currentUrl,\n    currentRenderedSearch,\n    currentCacheNode,\n    currentFlightRouterState,\n    navigationSeed.routeTree,\n    navigationSeed.metadataVaryPath,\n    freshnessPolicy,\n    navigationSeed.data,\n    navigationSeed.head,\n    navigationSeed.dynamicStaleAt,\n    isSamePageNavigation,\n    accumulation\n  )\n  if (task !== null) {\n    if (freshnessPolicy !== FreshnessPolicy.Gesture) {\n      spawnDynamicRequests(\n        task,\n        url,\n        nextUrl,\n        freshnessPolicy,\n        accumulation,\n        routeCacheEntry,\n        navigateType\n      )\n    }\n    return completeSoftNavigation(\n      state,\n      url,\n      nextUrl,\n      task.route,\n      task.node,\n      navigationSeed.renderedSearch,\n      canonicalUrl,\n      navigateType,\n      scrollBehavior,\n      accumulation.scrollRef,\n      debugInfo\n    )\n  }\n  // Could not perform a SPA navigation. Revert to a full-page (MPA) navigation.\n  return completeHardNavigation(state, url, navigateType)\n}\n\nfunction navigateUsingPrefetchedRouteTree(\n  now: number,\n  state: AppRouterState,\n  url: URL,\n  currentUrl: URL,\n  currentRenderedSearch: string,\n  nextUrl: string | null,\n  currentCacheNode: CacheNode | null,\n  currentFlightRouterState: FlightRouterState,\n  freshnessPolicy: FreshnessPolicy,\n  scrollBehavior: ScrollBehavior,\n  navigateType: 'push' | 'replace',\n  route: FulfilledRouteCacheEntry\n): AppRouterState {\n  const routeTree = route.tree\n  const canonicalUrl = route.canonicalUrl + url.hash\n  const renderedSearch = route.renderedSearch\n  const prefetchSeed: NavigationSeed = {\n    renderedSearch,\n    routeTree,\n    metadataVaryPath: route.metadata.varyPath as any,\n    data: null,\n    head: null,\n    dynamicStaleAt: computeDynamicStaleAt(now, UnknownDynamicStaleTime),\n  }\n  return navigateToKnownRoute(\n    now,\n    state,\n    url,\n    canonicalUrl,\n    prefetchSeed,\n    currentUrl,\n    currentRenderedSearch,\n    currentCacheNode,\n    currentFlightRouterState,\n    freshnessPolicy,\n    nextUrl,\n    scrollBehavior,\n    navigateType,\n    null,\n    route\n  )\n}\n\n// Used to request all the dynamic data for a route, rather than just a subset,\n// e.g. during a refresh or a revalidation. Typically this gets constructed\n// during the normal flow when diffing the route tree, but for an unprefetched\n// navigation, where we don't know the structure of the target route, we use\n// this instead.\nconst DynamicRequestTreeForEntireRoute: FlightRouterState = [\n  '',\n  {},\n  null,\n  'refetch',\n]\n\nasync function navigateToUnknownRoute(\n  now: number,\n  state: AppRouterState,\n  url: URL,\n  currentUrl: URL,\n  currentRenderedSearch: string,\n  nextUrl: string | null,\n  currentCacheNode: CacheNode | null,\n  currentFlightRouterState: FlightRouterState,\n  freshnessPolicy: FreshnessPolicy,\n  scrollBehavior: ScrollBehavior,\n  navigateType: 'push' | 'replace'\n): Promise<AppRouterState> {\n  // Runs when a navigation happens but there's no cached prefetch we can use.\n  // Don't bother to wait for a prefetch response; go straight to a full\n  // navigation that contains both static and dynamic data in a single stream.\n  // (This is unlike the old navigation implementation, which instead blocks\n  // the dynamic request until a prefetch request is received.)\n  //\n  // To avoid duplication of logic, we're going to pretend that the tree\n  // returned by the dynamic request is, in fact, a prefetch tree. Then we can\n  // use the same server response to write the actual data into the CacheNode\n  // tree. So it's the same flow as the \"happy path\" (prefetch, then\n  // navigation), except we use a single server response for both stages.\n\n  let dynamicRequestTree: FlightRouterState\n  switch (freshnessPolicy) {\n    case FreshnessPolicy.Default:\n    case FreshnessPolicy.HistoryTraversal:\n    case FreshnessPolicy.Gesture:\n      dynamicRequestTree = currentFlightRouterState\n      break\n    case FreshnessPolicy.Hydration: // <- shouldn't happen during client nav\n    case FreshnessPolicy.RefreshAll:\n    case FreshnessPolicy.HMRRefresh:\n      dynamicRequestTree = DynamicRequestTreeForEntireRoute\n      break\n    default:\n      freshnessPolicy satisfies never\n      dynamicRequestTree = currentFlightRouterState\n      break\n  }\n\n  const promiseForDynamicServerResponse = fetchServerResponse(url, {\n    flightRouterState: dynamicRequestTree,\n    nextUrl,\n  })\n  const result = await promiseForDynamicServerResponse\n  if (typeof result === 'string') {\n    // This is an MPA navigation.\n    const redirectUrl = new URL(result, location.origin)\n    return completeHardNavigation(state, redirectUrl, navigateType)\n  }\n\n  const {\n    flightData,\n    canonicalUrl,\n    renderedSearch,\n    couldBeIntercepted,\n    supportsPerSegmentPrefetching,\n    dynamicStaleTime,\n    staticStageData,\n    runtimePrefetchStream,\n    responseHeaders,\n    debugInfo,\n  } = result\n\n  // Since the response format of dynamic requests and prefetches is slightly\n  // different, we'll need to massage the data a bit. Create FlightRouterState\n  // tree that simulates what we'd receive as the result of a prefetch.\n  const navigationSeed = convertServerPatchToFullTree(\n    now,\n    currentFlightRouterState,\n    flightData,\n    renderedSearch,\n    dynamicStaleTime\n  )\n\n  // Learn the route pattern so we can predict it for future navigations.\n  // hasDynamicRewrite is false because this is a fresh navigation to an\n  // unknown route - any rewrite detection happens during the traversal inside\n  // discoverKnownRoute. The hasDynamicRewrite param is only set to true when\n  // retrying after a tree mismatch (see dispatchRetryDueToTreeMismatch).\n  const metadataVaryPath = navigationSeed.metadataVaryPath\n  if (metadataVaryPath !== null) {\n    discoverKnownRoute(\n      now,\n      url.pathname,\n      nextUrl,\n      null, // No pending entry\n      navigationSeed.routeTree,\n      metadataVaryPath,\n      couldBeIntercepted,\n      createHrefFromUrl(canonicalUrl),\n      supportsPerSegmentPrefetching,\n      false // hasDynamicRewrite - not a retry, rewrite detection happens during traversal\n    )\n\n    if (staticStageData !== null) {\n      const { response: staticStageResponse, isResponsePartial } =\n        staticStageData\n\n      // Write the static stage of the response into the segment cache so that\n      // subsequent navigations can serve cached static segments instantly.\n      getStaleAt(now, staticStageResponse.s)\n        .then((staleAt) => {\n          const buildId =\n            responseHeaders.get(NEXT_NAV_DEPLOYMENT_ID_HEADER) ??\n            staticStageResponse.b\n\n          writeStaticStageResponseIntoCache(\n            now,\n            staticStageResponse.f,\n            buildId,\n            staticStageResponse.h,\n            staleAt,\n            currentFlightRouterState,\n            renderedSearch,\n            isResponsePartial\n          )\n        })\n        .catch(() => {\n          // The static stage processing failed. Not fatal — the navigation\n          // completed normally, we just won't write into the cache.\n        })\n    }\n\n    if (runtimePrefetchStream !== null) {\n      processRuntimePrefetchStream(\n        now,\n        runtimePrefetchStream,\n        currentFlightRouterState,\n        renderedSearch\n      )\n        .then((processed) => {\n          if (processed !== null) {\n            writeDynamicRenderResponseIntoCache(\n              now,\n              FetchStrategy.PPRRuntime,\n              processed.flightDatas,\n              processed.buildId,\n              processed.isResponsePartial,\n              processed.headVaryParams,\n              processed.staleAt,\n              processed.navigationSeed,\n              null\n            )\n          }\n        })\n        .catch(() => {\n          // The runtime prefetch cache write failed. Not fatal — the\n          // navigation completed normally, we just won't cache runtime data.\n        })\n    }\n  }\n\n  return navigateToKnownRoute(\n    now,\n    state,\n    url,\n    createHrefFromUrl(canonicalUrl),\n    navigationSeed,\n    currentUrl,\n    currentRenderedSearch,\n    currentCacheNode,\n    currentFlightRouterState,\n    freshnessPolicy,\n    nextUrl,\n    scrollBehavior,\n    navigateType,\n    debugInfo,\n    // Unknown route navigations don't use route prediction - the route tree\n    // came directly from the server. If a mismatch occurs during dynamic data\n    // fetch, the retry handler will traverse the known route tree to mark the\n    // entry as having a dynamic rewrite.\n    null\n  )\n}\n\nexport function completeHardNavigation(\n  state: AppRouterState,\n  url: URL,\n  navigateType: 'push' | 'replace'\n): AppRouterState {\n  if (isJavaScriptURLString(url.href)) {\n    console.error(\n      'Next.js has blocked a javascript: URL as a security precaution.'\n    )\n    return state\n  }\n  const newState: AppRouterState = {\n    canonicalUrl:\n      url.origin === location.origin ? createHrefFromUrl(url) : url.href,\n    pushRef: {\n      pendingPush: navigateType === 'push',\n      mpaNavigation: true,\n      preserveCustomHistoryState: false,\n    },\n    // TODO: None of the rest of these values are consistent with the incoming\n    // navigation. We rely on the fact that AppRouter will suspend and trigger\n    // a hard navigation before it accesses any of these values. But instead\n    // we should trigger the hard navigation and blocking any subsequent\n    // router updates without updating React.\n    renderedSearch: state.renderedSearch,\n    focusAndScrollRef: state.focusAndScrollRef,\n    cache: state.cache,\n    tree: state.tree,\n    nextUrl: state.nextUrl,\n    previousNextUrl: state.previousNextUrl,\n    debugInfo: null,\n  }\n  return newState\n}\n\nexport function completeSoftNavigation(\n  oldState: AppRouterState,\n  url: URL,\n  referringNextUrl: string | null,\n  tree: FlightRouterState,\n  cache: CacheNode,\n  renderedSearch: string,\n  canonicalUrl: string,\n  navigateType: 'push' | 'replace',\n  scrollBehavior: ScrollBehavior,\n  scrollRef: ScrollRef | null,\n  collectedDebugInfo: Array<unknown> | null\n) {\n  // The \"Next-Url\" is a special representation of the URL that Next.js\n  // uses to implement interception routes.\n  // TODO: Get rid of this extra traversal by computing this during the\n  // same traversal that computes the tree itself. We should also figure out\n  // what is the minimum information needed for the server to correctly\n  // intercept the route.\n  const changedPath = computeChangedPath(oldState.tree, tree)\n  const nextUrlForNewRoute = changedPath ? changedPath : oldState.nextUrl\n\n  // This value is stored on the state as `previousNextUrl`; the naming is\n  // confusing. What it represents is the \"Next-Url\" header that was used to\n  // fetch the incoming route. It's essentially the refererer URL, but in a\n  // Next.js specific format. During refreshes, this is sent back to the server\n  // instead of the current route's \"Next-Url\" so that the same interception\n  // logic is applied as during the original navigation.\n  const previousNextUrl = referringNextUrl\n\n  // Check if the only thing that changed was the hash fragment.\n  const oldUrl = new URL(oldState.canonicalUrl, url)\n  const onlyHashChange =\n    // We don't need to compare the origins, because client-driven\n    // navigations are always same-origin.\n    url.pathname === oldUrl.pathname &&\n    url.search === oldUrl.search &&\n    url.hash !== oldUrl.hash\n\n  // Determine whether and how the page should scroll after this\n  // navigation.\n  //\n  // By default, we scroll to the segments that were navigated to — i.e.\n  // segments in the new part of the route, as opposed to shared segments\n  // that were already part of the previous route. All newly navigated\n  // segments share a single ScrollRef. When they mount, the first one\n  // to mount initiates the scroll. They share a ref so that only one\n  // scroll happens per navigation.\n  //\n  // If a subsequent navigation produces new segments, those supersede\n  // any pending scroll from the previous navigation by invalidating its\n  // ScrollRef. If a navigation doesn't produce any new segments (e.g.\n  // a refresh where the route structure didn't change), any pending\n  // scrolls from previous navigations are unaffected.\n  //\n  // The branches below handle special cases layered on top of this\n  // default model.\n  let activeScrollRef: ScrollRef | null\n  let forceScroll: boolean\n  if (scrollBehavior === ScrollBehavior.NoScroll) {\n    // The user explicitly opted out of scrolling (e.g. scroll={false}\n    // on a Link or router.push).\n    //\n    // If this navigation created new scroll targets (scrollRef !== null),\n    // neutralize them. If it didn't, any prior scroll targets carried\n    // forward on the cache nodes via reuseSharedCacheNode remain active.\n    if (scrollRef !== null) {\n      scrollRef.current = false\n    }\n    activeScrollRef = oldState.focusAndScrollRef.scrollRef\n    forceScroll = false\n  } else if (onlyHashChange) {\n    // Hash-only navigations should scroll regardless of per-node state.\n    // Create a fresh ref so the first segment to scroll consumes it.\n    //\n    // Invalidate any scroll ref from a prior navigation that hasn't\n    // been consumed yet.\n    const oldScrollRef = oldState.focusAndScrollRef.scrollRef\n    if (oldScrollRef !== null) {\n      oldScrollRef.current = false\n    }\n    // Also invalidate any per-node refs that were accumulated during\n    // this navigation's tree construction — the hash-only ref\n    // supersedes them.\n    if (scrollRef !== null) {\n      scrollRef.current = false\n    }\n    activeScrollRef = { current: true }\n    forceScroll = true\n  } else {\n    // Default case. Use the accumulated scrollRef (may be null if no\n    // new segments were created). The handler checks per-node refs, so\n    // unchanged parallel route slots won't scroll.\n    activeScrollRef = scrollRef\n\n    // If this navigation created new scroll targets, invalidate any\n    // pending scroll from a previous navigation.\n    if (scrollRef !== null) {\n      const oldScrollRef = oldState.focusAndScrollRef.scrollRef\n      if (oldScrollRef !== null) {\n        oldScrollRef.current = false\n      }\n    }\n    forceScroll = false\n  }\n\n  const newState: AppRouterState = {\n    canonicalUrl,\n    renderedSearch,\n    pushRef: {\n      pendingPush: navigateType === 'push',\n      mpaNavigation: false,\n      preserveCustomHistoryState: false,\n    },\n    focusAndScrollRef: {\n      scrollRef: activeScrollRef,\n      forceScroll,\n      onlyHashChange,\n      hashFragment:\n        // Remove leading # and decode hash to make non-latin hashes work.\n        //\n        // Empty hash should trigger default behavior of scrolling layout into\n        // view. #top is handled in layout-router.\n        //\n        // Refer to `ScrollAndFocusHandler` for details on how this is used.\n        scrollBehavior !== ScrollBehavior.NoScroll && url.hash !== ''\n          ? decodeURIComponent(url.hash.slice(1))\n          : oldState.focusAndScrollRef.hashFragment,\n    },\n    cache,\n    tree,\n    nextUrl: nextUrlForNewRoute,\n    previousNextUrl,\n    debugInfo: collectedDebugInfo,\n  }\n  return newState\n}\n\nexport function completeTraverseNavigation(\n  state: AppRouterState,\n  url: URL,\n  renderedSearch: string,\n  cache: CacheNode,\n  tree: FlightRouterState,\n  nextUrl: string | null\n) {\n  return {\n    // Set canonical url\n    canonicalUrl: createHrefFromUrl(url),\n    renderedSearch,\n    pushRef: {\n      pendingPush: false,\n      mpaNavigation: false,\n      // Ensures that the custom history state that was set is preserved when applying this update.\n      preserveCustomHistoryState: true,\n    },\n    focusAndScrollRef: state.focusAndScrollRef,\n    cache,\n    // Restore provided tree\n    tree,\n    nextUrl,\n    // TODO: We need to restore previousNextUrl, too, which represents the\n    // Next-Url that was used to fetch the data. Anywhere we fetch using the\n    // canonical URL, there should be a corresponding Next-Url.\n    previousNextUrl: null,\n    debugInfo: null,\n  }\n}\n\n// TODO: The rest of this file is related to converting the server response into\n// the data structures used by the client. Probably should move to a\n// separate module.\n\nexport type NavigationSeed = {\n  renderedSearch: string\n  routeTree: RouteTree\n  metadataVaryPath: PageVaryPath | null\n  data: CacheNodeSeedData | null\n  head: HeadData | null\n  dynamicStaleAt: number\n}\n\nexport function convertServerPatchToFullTree(\n  now: number,\n  currentTree: FlightRouterState,\n  flightData: Array<NormalizedFlightData> | null,\n  renderedSearch: string,\n  dynamicStaleTimeSeconds: number\n): NavigationSeed {\n  // During a client navigation or prefetch, the server sends back only a patch\n  // for the parts of the tree that have changed.\n  //\n  // This applies the patch to the base tree to create a full representation of\n  // the resulting tree.\n  //\n  // The return type includes a full FlightRouterState tree and a full\n  // CacheNodeSeedData tree. (Conceptually these are the same tree, and should\n  // eventually be unified, but there's still lots of existing code that\n  // operates on FlightRouterState trees alone without the CacheNodeSeedData.)\n  //\n  // TODO: This similar to what apply-router-state-patch-to-tree does. It\n  // will eventually fully replace it. We should get rid of all the remaining\n  // places where we iterate over the server patch format. This should also\n  // eventually replace normalizeFlightData.\n\n  let baseTree: FlightRouterState = currentTree\n  let baseData: CacheNodeSeedData | null = null\n  let head: HeadData | null = null\n  if (flightData !== null) {\n    for (const {\n      segmentPath,\n      tree: treePatch,\n      seedData: dataPatch,\n      head: headPatch,\n    } of flightData) {\n      const result = convertServerPatchToFullTreeImpl(\n        baseTree,\n        baseData,\n        treePatch,\n        dataPatch,\n        segmentPath,\n        renderedSearch,\n        0\n      )\n      baseTree = result.tree\n      baseData = result.data\n      // This is the same for all patches per response, so just pick an\n      // arbitrary one\n      head = headPatch\n    }\n  }\n\n  const finalFlightRouterState = baseTree\n\n  // Convert the final FlightRouterState into a RouteTree type.\n  //\n  // TODO: Eventually, FlightRouterState will evolve to being a transport format\n  // only. The RouteTree type will become the main type used for dealing with\n  // routes on the client, and we'll store it in the state directly.\n  const acc = { metadataVaryPath: null }\n  const routeTree = convertRootFlightRouterStateToRouteTree(\n    finalFlightRouterState,\n    renderedSearch as NormalizedSearch,\n    acc\n  )\n\n  return {\n    routeTree,\n    metadataVaryPath: acc.metadataVaryPath,\n    data: baseData,\n    renderedSearch,\n    head,\n    dynamicStaleAt: computeDynamicStaleAt(now, dynamicStaleTimeSeconds),\n  }\n}\n\nfunction convertServerPatchToFullTreeImpl(\n  baseRouterState: FlightRouterState,\n  baseData: CacheNodeSeedData | null,\n  treePatch: FlightRouterState,\n  dataPatch: CacheNodeSeedData | null,\n  segmentPath: FlightSegmentPath,\n  renderedSearch: string,\n  index: number\n): { tree: FlightRouterState; data: CacheNodeSeedData | null } {\n  if (index === segmentPath.length) {\n    // We reached the part of the tree that we need to patch.\n    return {\n      tree: treePatch,\n      data: dataPatch,\n    }\n  }\n\n  // segmentPath represents the parent path of subtree. It's a repeating\n  // pattern of parallel route key and segment:\n  //\n  //   [string, Segment, string, Segment, string, Segment, ...]\n  //\n  // This path tells us which part of the base tree to apply the tree patch.\n  //\n  // NOTE: We receive the FlightRouterState patch in the same request as the\n  // seed data patch. Therefore we don't need to worry about diffing the segment\n  // values; we can assume the server sent us a correct result.\n  const updatedParallelRouteKey: string = segmentPath[index]\n  // const segment: Segment = segmentPath[index + 1] <-- Not used, see note above\n\n  const baseTreeChildren = baseRouterState[1]\n  const baseSeedDataChildren = baseData !== null ? baseData[1] : null\n  const newTreeChildren: Record<string, FlightRouterState> = {}\n  const newSeedDataChildren: Record<string, CacheNodeSeedData | null> = {}\n  for (const parallelRouteKey in baseTreeChildren) {\n    const childBaseRouterState = baseTreeChildren[parallelRouteKey]\n    const childBaseSeedData =\n      baseSeedDataChildren !== null\n        ? (baseSeedDataChildren[parallelRouteKey] ?? null)\n        : null\n    if (parallelRouteKey === updatedParallelRouteKey) {\n      const result = convertServerPatchToFullTreeImpl(\n        childBaseRouterState,\n        childBaseSeedData,\n        treePatch,\n        dataPatch,\n        segmentPath,\n        renderedSearch,\n        // Advance the index by two and keep cloning until we reach\n        // the end of the segment path.\n        index + 2\n      )\n\n      newTreeChildren[parallelRouteKey] = result.tree\n      newSeedDataChildren[parallelRouteKey] = result.data\n    } else {\n      // This child is not being patched. Copy it over as-is.\n      newTreeChildren[parallelRouteKey] = childBaseRouterState\n      newSeedDataChildren[parallelRouteKey] = childBaseSeedData\n    }\n  }\n\n  let clonedTree: FlightRouterState\n  let clonedSeedData: CacheNodeSeedData\n  // Clone all the fields except the children.\n\n  // Clone the FlightRouterState tree. Based on equivalent logic in\n  // apply-router-state-patch-to-tree, but should confirm whether we need to\n  // copy all of these fields. Not sure the server ever sends, e.g. the\n  // refetch marker.\n  clonedTree = [baseRouterState[0], newTreeChildren]\n  if (2 in baseRouterState) {\n    const compressedRefreshState = baseRouterState[2]\n    if (\n      compressedRefreshState !== undefined &&\n      compressedRefreshState !== null\n    ) {\n      // Since this part of the tree was patched with new data, any parent\n      // refresh states should be updated to reflect the new rendered search\n      // value. (The refresh state acts like a \"context provider\".) All pages\n      // within the same server response share the same renderedSearch value,\n      // but the same RouteTree could be composed from multiple different\n      // routes, and multiple responses.\n      clonedTree[2] = [compressedRefreshState[0], renderedSearch]\n    }\n  }\n  if (3 in baseRouterState) {\n    clonedTree[3] = baseRouterState[3]\n  }\n  if (4 in baseRouterState) {\n    clonedTree[4] = baseRouterState[4]\n  }\n\n  // Clone the CacheNodeSeedData tree.\n  const isEmptySeedDataPartial = true\n  clonedSeedData = [\n    null,\n    newSeedDataChildren,\n    null,\n    isEmptySeedDataPartial,\n    null,\n  ]\n\n  return {\n    tree: clonedTree,\n    data: clonedSeedData,\n  }\n}\n\n/**\n * Instant Navigation Testing API: ensures a prefetch task has been initiated\n * and completed before proceeding with the navigation. This guarantees that\n * segment data requests are at least pending, even for routes whose route\n * tree is already cached.\n *\n * After the prefetch completes, delegates to the normal navigation flow.\n */\nasync function ensurePrefetchThenNavigate(\n  state: AppRouterState,\n  url: URL,\n  currentUrl: URL,\n  currentRenderedSearch: string,\n  currentCacheNode: CacheNode | null,\n  currentFlightRouterState: FlightRouterState,\n  nextUrl: string | null,\n  freshnessPolicy: FreshnessPolicy,\n  scrollBehavior: ScrollBehavior,\n  navigateType: 'push' | 'replace'\n): Promise<AppRouterState> {\n  const link = getLinkForCurrentNavigation()\n  const fetchStrategy = link !== null ? link.fetchStrategy : FetchStrategy.PPR\n\n  // Transition the cookie to captured-SPA immediately, before waiting\n  // for the prefetch. This ensures the devtools panel can update its UI\n  // right away, even if the prefetch takes time (e.g. dev compilation).\n  // The \"to\" tree starts as null and is filled in after the prefetch\n  // resolves and the navigation produces a new router state.\n  const { transitionToCapturedSPA, updateCapturedSPAToTree } =\n    require('./navigation-testing-lock') as typeof import('./navigation-testing-lock')\n  transitionToCapturedSPA(currentFlightRouterState, null)\n\n  const cacheKey = createCacheKey(url.href, nextUrl)\n\n  await new Promise<void>((resolve) => {\n    schedulePrefetchTask(\n      cacheKey,\n      currentFlightRouterState,\n      fetchStrategy,\n      PrefetchPriority.Default,\n      null, // onInvalidate\n      resolve // _onComplete callback\n    )\n  })\n\n  // Prefetch is complete. Proceed with the normal navigation flow, which\n  // will now find the route in the cache.\n  const result = await navigateImpl(\n    state,\n    url,\n    currentUrl,\n    currentRenderedSearch,\n    currentCacheNode,\n    currentFlightRouterState,\n    nextUrl,\n    freshnessPolicy,\n    scrollBehavior,\n    navigateType\n  )\n\n  // Update the cookie with the resolved \"to\" tree so the devtools\n  // panel can display both routes immediately.\n  updateCapturedSPAToTree(currentFlightRouterState, result.tree)\n\n  return result\n}\n","/**\n * Optimistic Routing (Known Routes)\n *\n * This module enables the client to predict route structure for URLs that\n * haven't been prefetched yet, based on previously learned route patterns.\n * When successful, this allows skipping the route tree prefetch request\n * entirely.\n *\n * The core idea is that many URLs map to the same route structure. For example,\n * /blog/post-1 and /blog/post-2 both resolve to /blog/[slug]. Once we've\n * prefetched one, we can predict the structure of the other.\n *\n * However, we can't always make this prediction. Static siblings (like\n * /blog/featured alongside /blog/[slug]) have different route structures.\n * When we learn a dynamic route, we also learn its static siblings so we\n * know when NOT to apply the prediction.\n *\n * Main entry points:\n *\n * 1. discoverKnownRoute: Called after receiving a route tree from the server.\n *    Traverses the route tree, compares URL parts to segments, and populates\n *    the known route tree if they match. Routes are always inserted into the\n *    cache.\n *\n * 2. matchKnownRoute: Called when looking up a route with no cache entry.\n *    Matches the candidate URL against learned patterns. Returns a synthetic\n *    cache entry if successful, or null to fall back to server resolution.\n *\n * Rewrite detection happens during traversal: if a URL path part doesn't match\n * the corresponding route segment, we stop populating the known route tree\n * (since the mapping is incorrect) but still insert the route into the cache.\n *\n * The known route tree is append-only with no eviction. Route patterns are\n * derived from the filesystem, so they don't become stale within a session.\n * Cache invalidation on deploy clears everything anyway.\n *\n * Current limitations (deopt to server resolution):\n * - Rewrites: Detected during traversal (tree not populated, but route cached)\n * - Intercepted routes: The route tree varies by referrer (Next-Url header),\n *   so we can't predict the correct structure from the URL alone. Patterns are\n *   still stored during discovery (so the trie stays populated for non-\n *   intercepted siblings), but matching bails out when the pattern is marked\n *   as interceptable.\n */\n\nimport type { DynamicParamTypesShort } from '../../../shared/lib/app-router-types'\nimport type { RouteTree, FulfilledRouteCacheEntry } from './cache'\nimport {\n  EntryStatus,\n  writeRouteIntoCache,\n  fulfillRouteCacheEntry,\n  type PendingRouteCacheEntry,\n  createMetadataRouteTree,\n} from './cache'\nimport { doesStaticSegmentAppearInURL } from '../../route-params'\nimport type { NormalizedPathname, NormalizedSearch } from './cache-key'\nimport {\n  appendLayoutVaryPath,\n  finalizeLayoutVaryPath,\n  finalizePageVaryPath,\n  finalizeMetadataVaryPath,\n  type PartialSegmentVaryPath,\n  type PageVaryPath,\n} from './vary-path'\n\n/**\n * The known route tree is analogous to a route table. A different routing\n * implementation might use regexes or URLPattern; ours uses a trie indexed\n * by URL path segments.\n *\n * Each node (KnownRoutePart) represents a position in the URL and can have:\n * - staticChildren: Map of literal segments to child nodes\n * - dynamicChild: A single dynamic segment node ([slug], [...params], etc.)\n * - pattern: A cache entry template for routes that terminate here\n *\n * This tree only contains segments that correspond to actual filesystem routes.\n * Route groups like (marketing) and parallel routes like @modal are not\n * included since they don't appear in URLs. Similarly, if a URL is rewritten\n * to a different filesystem path, the original URL segments don't appear here\n * — only the resolved filesystem route structure is stored.\n *\n * Example tree after learning /blog/[slug], /blog/featured, and /about:\n *\n *   ├── about\n *   └── blog\n *       ├── featured\n *       └── [slug]\n *\n * When matching /blog/hello:\n *   1. \"blog\" matches static child\n *   2. \"hello\" doesn't match \"featured\", falls through to [slug]\n *   3. Returns [slug]'s pattern with resolved param { slug: \"hello\" }\n */\ntype KnownRoutePartBase = {\n  // Known static paths at this level. The null vs Map distinction is\n  // semantically meaningful:\n  // - null: Static siblings are UNKNOWN at this level (e.g., webpack dev mode\n  //   where routes are compiled on-demand). If there's a dynamicChild, we\n  //   can't safely match it because the URL might be an unknown static sibling.\n  // - Map (even if empty): Static siblings are KNOWN. We can safely match a\n  //   dynamicChild if the URL doesn't match any entry in the Map.\n  staticChildren: Map<string, KnownRoutePart> | null\n\n  // The cache entry that serves as a pattern for this route.\n  // When a URL matches, we clone this and substitute param values.\n  // null means we know this path exists (from static siblings) but haven't\n  // learned its structure yet.\n  pattern: FulfilledRouteCacheEntry | null\n\n  // TODO: For prefix rewrite support. When true, this part may not appear in\n  // the candidate URL because it was injected by a rewrite.\n  // mayBeSkippedInURL: boolean\n}\n\n// The dynamic child fields are structured as a union so that narrowing on\n// dynamicChild also narrows dynamicChildParamName and dynamicChildParamType.\ntype KnownRoutePartWithoutDynamicChild = KnownRoutePartBase & {\n  dynamicChild: null\n  dynamicChildParamName: null\n  dynamicChildParamType: null\n}\n\ntype KnownRoutePartWithDynamicChild = KnownRoutePartBase & {\n  dynamicChild: KnownRoutePart\n  dynamicChildParamName: string\n  dynamicChildParamType: DynamicParamTypesShort\n}\n\ntype KnownRoutePart =\n  | KnownRoutePartWithoutDynamicChild\n  | KnownRoutePartWithDynamicChild\n\n/**\n * Param values extracted during URL matching. Used to reify the template.\n * - string for regular dynamic [param]\n * - string[] for catch-all [...param] and optional catch-all [[...param]]\n */\ntype ResolvedParams = Map<string, string | string[]>\n\nfunction createEmptyPart(): KnownRoutePart {\n  return {\n    staticChildren: null,\n    dynamicChild: null,\n    dynamicChildParamName: null,\n    dynamicChildParamType: null,\n    pattern: null,\n  }\n}\n\n// The root of the known route tree.\nlet knownRouteTreeRoot: KnownRoutePart = createEmptyPart()\n\n/**\n * Learns a route pattern from a server response and inserts it into the cache.\n *\n * Called after receiving a route tree from the server (initial load, navigation,\n * or prefetch). Traverses the route tree, compares URL parts to segments, and\n * populates the known route tree if they match. Routes are always inserted into\n * the cache regardless of whether the URL matches the route structure.\n *\n * When pendingEntry is provided, it's fulfilled and used. When null, an entry\n * is created and inserted into the route cache map.\n *\n * When hasDynamicRewrite is true, the route entry is marked as having a\n * dynamic rewrite, which prevents it from being used as a template for future\n * predictions. This is set when we detect a mismatch between what we predicted\n * and what the server returned.\n *\n * Returns the fulfilled route cache entry.\n */\nexport function discoverKnownRoute(\n  now: number,\n  pathname: string,\n  nextUrl: string | null,\n  pendingEntry: PendingRouteCacheEntry | null,\n  routeTree: RouteTree,\n  metadataVaryPath: PageVaryPath,\n  couldBeIntercepted: boolean,\n  canonicalUrl: string,\n  supportsPerSegmentPrefetching: boolean,\n  hasDynamicRewrite: boolean\n): FulfilledRouteCacheEntry {\n  const tree = routeTree\n\n  const pathnameParts = pathname.split('/').filter((p) => p !== '')\n  const firstPart = pathnameParts.length > 0 ? pathnameParts[0] : null\n  const remainingParts = pathnameParts.length > 0 ? pathnameParts.slice(1) : []\n\n  if (pendingEntry !== null) {\n    // Fulfill the pending entry first\n    const fulfilledEntry = fulfillRouteCacheEntry(\n      now,\n      pendingEntry,\n      tree,\n      metadataVaryPath,\n      couldBeIntercepted,\n      canonicalUrl,\n      supportsPerSegmentPrefetching\n    )\n    if (hasDynamicRewrite) {\n      fulfilledEntry.hasDynamicRewrite = true\n    }\n    // Populate the known route tree (handles rewrite detection internally).\n    // The entry is already in the cache; this just stores it as a pattern\n    // if the URL matches the route structure.\n    discoverKnownRoutePart(\n      knownRouteTreeRoot,\n      tree,\n      firstPart,\n      remainingParts,\n      fulfilledEntry,\n      now,\n      pathname,\n      nextUrl,\n      tree,\n      metadataVaryPath,\n      couldBeIntercepted,\n      canonicalUrl,\n      supportsPerSegmentPrefetching,\n      hasDynamicRewrite\n    )\n    return fulfilledEntry\n  }\n\n  // No pending entry - discoverKnownRoutePart will create one and insert it\n  // into the cache, or return an existing pattern if one exists.\n  return discoverKnownRoutePart(\n    knownRouteTreeRoot,\n    tree,\n    firstPart,\n    remainingParts,\n    null,\n    now,\n    pathname,\n    nextUrl,\n    tree,\n    metadataVaryPath,\n    couldBeIntercepted,\n    canonicalUrl,\n    supportsPerSegmentPrefetching,\n    hasDynamicRewrite\n  )\n}\n\n/**\n * Gets or creates the dynamic child node for a KnownRoutePart.\n * A node can have at most one dynamic child (you can't have both [slug] and\n * [id] at the same route level), so we either return existing or create new.\n */\nfunction discoverDynamicChild(\n  part: KnownRoutePart,\n  paramName: string,\n  paramType: DynamicParamTypesShort\n): KnownRoutePart {\n  if (part.dynamicChild !== null) {\n    return part.dynamicChild\n  }\n  const newChild = createEmptyPart()\n  // Type assertion needed because we're converting from \"without\" to \"with\"\n  // dynamic child variant.\n  const mutablePart = part as unknown as KnownRoutePartWithDynamicChild\n  mutablePart.dynamicChild = newChild\n  mutablePart.dynamicChildParamName = paramName\n  mutablePart.dynamicChildParamType = paramType\n  return newChild\n}\n\n/**\n * Recursive workhorse for discoverKnownRoute.\n *\n * Walks the route tree and URL parts in parallel, building out the known\n * route tree as it goes. At each step:\n * 1. Determines if the current segment appears in the URL (dynamic/static)\n * 2. Validates URL matches route structure (detects rewrites)\n * 3. Creates/updates the corresponding KnownRoutePart node\n * 4. Records static siblings for future matching\n * 5. Recurses into child slots (parallel routes)\n *\n * If a URL/route mismatch is detected (rewrite), we stop building the known\n * route tree but still cache the route entry for direct lookup.\n */\nfunction discoverKnownRoutePart(\n  parentKnownRoutePart: KnownRoutePart,\n  routeTree: RouteTree,\n  urlPart: string | null,\n  remainingParts: string[],\n  existingEntry: FulfilledRouteCacheEntry | null,\n  // These are passed through unchanged for entry creation at the leaf\n  now: number,\n  pathname: string,\n  nextUrl: string | null,\n  fullTree: RouteTree,\n  metadataVaryPath: PageVaryPath,\n  couldBeIntercepted: boolean,\n  canonicalUrl: string,\n  supportsPerSegmentPrefetching: boolean,\n  hasDynamicRewrite: boolean\n): FulfilledRouteCacheEntry {\n  const segment = routeTree.segment\n\n  let segmentAppearsInURL: boolean\n  let paramName: string | null = null\n  let paramType: DynamicParamTypesShort | null = null\n  let staticSiblings: readonly string[] | null = null\n\n  if (typeof segment === 'string') {\n    segmentAppearsInURL = doesStaticSegmentAppearInURL(segment)\n  } else {\n    // Dynamic segment tuple: [paramName, paramCacheKey, paramType, staticSiblings]\n    paramName = segment[0]\n    paramType = segment[2]\n    staticSiblings = segment[3]\n    segmentAppearsInURL = true\n  }\n\n  let knownRoutePart: KnownRoutePart = parentKnownRoutePart\n  let nextUrlPart: string | null = urlPart\n  let nextRemainingParts: string[] = remainingParts\n\n  if (segmentAppearsInURL) {\n    // Check for mismatch: if this is a static segment, the URL part must match\n    if (paramName === null && urlPart !== segment) {\n      // URL doesn't match route structure (likely a rewrite).\n      // Don't populate the known route tree, just write the route into the\n      // cache and return immediately.\n      if (existingEntry !== null) {\n        return existingEntry\n      }\n      return writeRouteIntoCache(\n        now,\n        pathname as NormalizedPathname,\n        nextUrl,\n        fullTree,\n        metadataVaryPath,\n        couldBeIntercepted,\n        canonicalUrl,\n        supportsPerSegmentPrefetching\n      )\n    }\n\n    // URL matches route structure. Build the known route tree.\n    if (paramName !== null && paramType !== null) {\n      // Dynamic segment\n      knownRoutePart = discoverDynamicChild(\n        parentKnownRoutePart,\n        paramName,\n        paramType\n      )\n\n      // Record static siblings as placeholder parts.\n      // IMPORTANT: We use the null vs Map distinction to track whether\n      // siblings are known at this level:\n      // - staticChildren: null = siblings unknown (can't safely match dynamic)\n      // - staticChildren: Map = siblings known (even if empty)\n      // This matters in dev mode where webpack may not know all siblings yet.\n      if (staticSiblings !== null) {\n        // Siblings are known - ensure we have a Map (even if empty)\n        if (parentKnownRoutePart.staticChildren === null) {\n          parentKnownRoutePart.staticChildren = new Map()\n        }\n        for (const sibling of staticSiblings) {\n          if (!parentKnownRoutePart.staticChildren.has(sibling)) {\n            parentKnownRoutePart.staticChildren.set(sibling, createEmptyPart())\n          }\n        }\n      }\n    } else {\n      // Static segment\n      if (parentKnownRoutePart.staticChildren === null) {\n        parentKnownRoutePart.staticChildren = new Map()\n      }\n      let existingChild = parentKnownRoutePart.staticChildren.get(urlPart!)\n      if (existingChild === undefined) {\n        existingChild = createEmptyPart()\n        parentKnownRoutePart.staticChildren.set(urlPart!, existingChild)\n      }\n      knownRoutePart = existingChild\n    }\n\n    // Advance to next URL part\n    nextUrlPart = remainingParts.length > 0 ? remainingParts[0] : null\n    nextRemainingParts =\n      remainingParts.length > 0 ? remainingParts.slice(1) : []\n  }\n  // else: Transparent segment (route group, __PAGE__, etc.)\n  // Stay at the same known route part, don't advance URL parts\n\n  // Recurse into child routes. A route tree can have multiple parallel routes\n  // (e.g., @modal alongside children). Each parallel route is a separate\n  // branch, but they all share the same URL - we just need to traverse all\n  // branches to build out the known route tree.\n  const slots = routeTree.slots\n  let resultFromChildren: FulfilledRouteCacheEntry | null = null\n  if (slots !== null) {\n    for (const parallelRouteKey in slots) {\n      const childRouteTree = slots[parallelRouteKey]\n      // Skip branches with refreshState set - these were reused from a\n      // different route (e.g., a \"default\" parallel slot) and don't represent\n      // the actual route structure for this URL.\n      if (childRouteTree.refreshState !== null) {\n        continue\n      }\n      const result = discoverKnownRoutePart(\n        knownRoutePart,\n        childRouteTree,\n        nextUrlPart,\n        nextRemainingParts,\n        existingEntry,\n        now,\n        pathname,\n        nextUrl,\n        fullTree,\n        metadataVaryPath,\n        couldBeIntercepted,\n        canonicalUrl,\n        supportsPerSegmentPrefetching,\n        hasDynamicRewrite\n      )\n      // All parallel route branches share the same URL, so they should all\n      // reach compatible leaf nodes. We capture any result.\n      resultFromChildren = result\n    }\n    if (resultFromChildren !== null) {\n      return resultFromChildren\n    }\n    // Defensive fallback: no children returned a result. This shouldn't happen\n    // for valid route trees, but handle it gracefully.\n    if (existingEntry !== null) {\n      return existingEntry\n    }\n    return writeRouteIntoCache(\n      now,\n      pathname as NormalizedPathname,\n      nextUrl,\n      fullTree,\n      metadataVaryPath,\n      couldBeIntercepted,\n      canonicalUrl,\n      supportsPerSegmentPrefetching\n    )\n  }\n\n  // Reached a page node. Create/get the route cache entry and store as a\n  // pattern. First, check if there's already a pattern for this route.\n  if (knownRoutePart.pattern !== null) {\n    // If this route has a dynamic rewrite, mark the existing pattern.\n    if (hasDynamicRewrite) {\n      knownRoutePart.pattern.hasDynamicRewrite = true\n    }\n    return knownRoutePart.pattern\n  }\n\n  // Get or create the entry\n  let entry: FulfilledRouteCacheEntry\n  if (existingEntry !== null) {\n    // Already have a fulfilled entry, use it directly. It's already in the\n    // route cache map.\n    entry = existingEntry\n  } else {\n    // Create the entry and insert it into the route cache map.\n    entry = writeRouteIntoCache(\n      now,\n      pathname as NormalizedPathname,\n      nextUrl,\n      fullTree,\n      metadataVaryPath,\n      couldBeIntercepted,\n      canonicalUrl,\n      supportsPerSegmentPrefetching\n    )\n  }\n\n  if (hasDynamicRewrite) {\n    entry.hasDynamicRewrite = true\n  }\n\n  // Store as pattern\n  knownRoutePart.pattern = entry\n  return entry\n}\n\n/**\n * Attempts to match a URL against learned route patterns.\n *\n * Returns a synthetic FulfilledRouteCacheEntry if the URL matches a known\n * pattern, or null if no match is found (fall back to server resolution).\n */\nexport function matchKnownRoute(\n  pathname: string,\n  search: NormalizedSearch\n): FulfilledRouteCacheEntry | null {\n  const pathnameParts = pathname.split('/').filter((p) => p !== '')\n  const resolvedParams: ResolvedParams = new Map()\n  const match = matchKnownRoutePart(\n    knownRouteTreeRoot,\n    pathnameParts,\n    0,\n    resolvedParams\n  )\n\n  if (match === null) {\n    return null\n  }\n\n  const matchedPart = match.part\n  const pattern = match.pattern\n\n  // If the pattern could be intercepted, we can't safely use it for prediction.\n  // Interception routes resolve to different route trees depending on the\n  // referrer (the Next-Url header), which means the same URL can map to\n  // different page components depending on where the navigation originated.\n  // Since the known route tree only stores a single pattern per URL shape, we\n  // can't distinguish between the intercepted and non-intercepted cases, so we\n  // bail out to server resolution.\n  //\n  // TODO: We could store interception behavior in the known route tree itself\n  // (e.g., which segments use interception markers and what they resolve to).\n  // With enough information embedded in the trie, we could match interception\n  // routes entirely on the client without a server round-trip.\n  if (pattern.couldBeIntercepted) {\n    return null\n  }\n\n  // \"Reify\" the pattern: clone the template tree with concrete param values.\n  // This substitutes resolved params (e.g., slug: \"hello\") into dynamic\n  // segments and recomputes vary paths for correct segment cache keying.\n  const acc: ReifyAccumulator = { metadataVaryPath: null }\n  const reifiedTree = reifyRouteTree(\n    pattern.tree,\n    resolvedParams,\n    search,\n    null, // Start with null partial vary path at the root\n    acc\n  )\n\n  // The metadata tree is a flat page node without the intermediate layout\n  // structure. Clone it with the updated metadata vary path collected during\n  // the main tree traversal.\n  const metadataVaryPath = acc.metadataVaryPath\n  if (metadataVaryPath === null) {\n    // This shouldn't be reachable for a valid route tree.\n    return null\n  }\n  const reifiedMetadata = createMetadataRouteTree(metadataVaryPath)\n\n  // Create a synthetic (predicted) entry and store it as the new pattern.\n  //\n  // Why replace the pattern? We intentionally update the pattern with this\n  // synthetic entry so that if our prediction was wrong (server returns a\n  // different pathname due to dynamic rewrite), the entry gets marked with\n  // hasDynamicRewrite. Future predictions for this route will see the flag\n  // and bail out to server resolution instead of making the same mistake.\n  const syntheticEntry: FulfilledRouteCacheEntry = {\n    canonicalUrl: pathname + search,\n    status: EntryStatus.Fulfilled,\n    blockedTasks: null,\n    tree: reifiedTree,\n    metadata: reifiedMetadata,\n    couldBeIntercepted: pattern.couldBeIntercepted,\n    supportsPerSegmentPrefetching: pattern.supportsPerSegmentPrefetching,\n    hasDynamicRewrite: false,\n    renderedSearch: search,\n    ref: null,\n    size: pattern.size,\n    staleAt: pattern.staleAt,\n    version: pattern.version,\n  }\n\n  matchedPart.pattern = syntheticEntry\n\n  return syntheticEntry\n}\n\n/**\n * Result of a successful match: the matched tree node and its pattern.\n * We return both because the caller needs to update the pattern after\n * creating a synthetic entry (for dynamic rewrite detection).\n */\ntype KnownRouteMatch = {\n  part: KnownRoutePart\n  pattern: FulfilledRouteCacheEntry\n} | null\n\n/**\n * Recursively matches a URL against the known route tree.\n *\n * Matching priority (most specific first):\n * 1. Static children - exact path segment match\n * 2. Dynamic child - [param], [...param], [[...param]]\n * 3. Direct pattern - when no more URL parts remain\n *\n * Collects resolved param values in resolvedParams as it traverses.\n * Returns null if no match found (caller should fall back to server).\n */\nfunction matchKnownRoutePart(\n  part: KnownRoutePart,\n  pathnameParts: string[],\n  partIndex: number,\n  resolvedParams: ResolvedParams\n): KnownRouteMatch {\n  const urlPart =\n    partIndex < pathnameParts.length ? pathnameParts[partIndex] : null\n\n  // If staticChildren is null, we don't know what static routes exist at this\n  // level. This happens in webpack dev mode where routes are compiled\n  // on-demand. We can't safely match a dynamicChild because the URL part might\n  // be a static sibling we haven't discovered yet. Example: We know\n  // /blog/[slug] exists, but haven't compiled /blog/featured. A request for\n  // /blog/featured would incorrectly match /blog/[slug].\n  if (part.staticChildren === null) {\n    // The only safe match is a direct pattern when no URL parts remain.\n    if (urlPart === null) {\n      const pattern = part.pattern\n      if (pattern !== null && !pattern.hasDynamicRewrite) {\n        return { part, pattern }\n      }\n    }\n    return null\n  }\n\n  // Static children take priority over dynamic. This ensures /blog/featured\n  // matches its own route rather than /blog/[slug].\n  if (urlPart !== null) {\n    const staticChild = part.staticChildren.get(urlPart)\n    if (staticChild !== undefined) {\n      // Check if this is an \"unknown\" placeholder part. These are created when\n      // we learn about static siblings (from the route tree's staticSiblings\n      // field) but haven't prefetched them yet. We know the path exists but\n      // don't know its structure, so we can't predict it.\n      if (\n        staticChild.pattern === null &&\n        staticChild.dynamicChild === null &&\n        staticChild.staticChildren === null\n      ) {\n        // Bail out - server must resolve this route.\n        return null\n      }\n      const match = matchKnownRoutePart(\n        staticChild,\n        pathnameParts,\n        partIndex + 1,\n        resolvedParams\n      )\n      if (match !== null) {\n        return match\n      }\n      // Static child is a real node (not a placeholder) but its subtree\n      // didn't match the remaining URL parts. This means the route exists\n      // in the static subtree but hasn't been fully discovered yet. Do not\n      // fall through to try the dynamic child — the static match is\n      // authoritative. Bail out to server resolution.\n      return null\n    }\n  }\n\n  // Try dynamic child\n  if (part.dynamicChild !== null) {\n    const dynamicPart = part.dynamicChild\n    const paramName = part.dynamicChildParamName\n    const paramType = part.dynamicChildParamType\n    const dynamicPattern = dynamicPart.pattern\n\n    switch (paramType) {\n      case 'c':\n        // Required catch-all [...param]: consumes 1+ URL parts\n        if (\n          dynamicPattern !== null &&\n          !dynamicPattern.hasDynamicRewrite &&\n          urlPart !== null\n        ) {\n          resolvedParams.set(paramName, pathnameParts.slice(partIndex))\n          return { part: dynamicPart, pattern: dynamicPattern }\n        }\n        break\n      case 'oc':\n        // Optional catch-all [[...param]]: consumes 0+ URL parts\n        if (dynamicPattern !== null && !dynamicPattern.hasDynamicRewrite) {\n          if (urlPart !== null) {\n            resolvedParams.set(paramName, pathnameParts.slice(partIndex))\n            return { part: dynamicPart, pattern: dynamicPattern }\n          }\n          // urlPart is null - can match with zero parts, but a direct pattern\n          // (e.g., page.tsx alongside [[...param]]) takes precedence.\n          if (part.pattern === null || part.pattern.hasDynamicRewrite) {\n            resolvedParams.set(paramName, [])\n            return { part: dynamicPart, pattern: dynamicPattern }\n          }\n        }\n        break\n      case 'd':\n        // Regular dynamic [param]: consumes exactly 1 URL part.\n        // Unlike catch-all which terminates here, regular dynamic must\n        // continue recursing to find the leaf pattern.\n        if (urlPart !== null) {\n          resolvedParams.set(paramName, urlPart)\n          return matchKnownRoutePart(\n            dynamicPart,\n            pathnameParts,\n            partIndex + 1,\n            resolvedParams\n          )\n        }\n        break\n      // Intercepted routes use relative path markers like (.), (..), (...)\n      // Their behavior depends on navigation context (soft vs hard nav),\n      // so we can't predict them client-side. Defer to server.\n      case 'ci(..)(..)':\n      case 'ci(.)':\n      case 'ci(..)':\n      case 'ci(...)':\n      case 'di(..)(..)':\n      case 'di(.)':\n      case 'di(..)':\n      case 'di(...)':\n        return null\n      default:\n        paramType satisfies never\n    }\n  }\n\n  // No children matched. If we've consumed all URL parts, check for a direct\n  // pattern at this node (the route terminates here).\n  if (urlPart === null) {\n    const pattern = part.pattern\n    if (pattern !== null && !pattern.hasDynamicRewrite) {\n      return { part, pattern }\n    }\n  }\n\n  return null\n}\n\n/**\n * Accumulator for collecting data during reifyRouteTree traversal.\n * metadataVaryPath is collected from the first page node encountered\n * (parallel routes may have multiple pages, but metadata uses the first).\n */\ntype ReifyAccumulator = {\n  metadataVaryPath: PageVaryPath | null\n}\n\n/**\n * \"Reify\" means to make concrete - we take an abstract pattern (the template\n * route tree) and produce a concrete instance with actual param values.\n *\n * This function clones a RouteTree, substituting dynamic segment values from\n * resolvedParams and computing new vary paths. The vary path encodes param\n * values so segment cache entries can be correctly keyed.\n *\n * Example: Pattern for /blog/[slug] with resolvedParams { slug: \"hello\" }\n * produces a tree where segment [slug] has cacheKey \"hello\".\n */\nfunction reifyRouteTree(\n  pattern: RouteTree,\n  resolvedParams: ResolvedParams,\n  search: NormalizedSearch,\n  parentPartialVaryPath: PartialSegmentVaryPath | null,\n  acc: ReifyAccumulator\n): RouteTree {\n  const originalSegment = pattern.segment\n\n  let newSegment = originalSegment\n  let partialVaryPath: PartialSegmentVaryPath | null\n\n  if (typeof originalSegment !== 'string') {\n    // Dynamic segment: compute new cache key and append to partial vary path\n    const paramName = originalSegment[0]\n    const paramType = originalSegment[2]\n    const staticSiblings = originalSegment[3]\n    const newValue = resolvedParams.get(paramName)\n    if (newValue !== undefined) {\n      const newCacheKey = Array.isArray(newValue)\n        ? newValue.join('/')\n        : newValue\n      newSegment = [paramName, newCacheKey, paramType, staticSiblings]\n      partialVaryPath = appendLayoutVaryPath(\n        parentPartialVaryPath,\n        newCacheKey,\n        paramName\n      )\n    } else {\n      // Param not found in resolvedParams - keep original and inherit partial\n      // TODO: This should never happen. Bail out with null.\n      partialVaryPath = parentPartialVaryPath\n    }\n  } else {\n    // Static segment: inherit partial vary path from parent\n    partialVaryPath = parentPartialVaryPath\n  }\n\n  // Recurse into children with the (possibly updated) partial vary path\n  let newSlots: Record<string, RouteTree> | null = null\n  if (pattern.slots !== null) {\n    newSlots = {}\n    for (const key in pattern.slots) {\n      newSlots[key] = reifyRouteTree(\n        pattern.slots[key],\n        resolvedParams,\n        search,\n        partialVaryPath,\n        acc\n      )\n    }\n  }\n\n  if (pattern.isPage) {\n    // Page segment: finalize with search params\n    const newVaryPath = finalizePageVaryPath(\n      pattern.requestKey,\n      search,\n      partialVaryPath\n    )\n    // Collect metadata vary path (first page wins, same as original algorithm)\n    if (acc.metadataVaryPath === null) {\n      acc.metadataVaryPath = finalizeMetadataVaryPath(\n        pattern.requestKey,\n        search,\n        partialVaryPath\n      )\n    }\n    return {\n      requestKey: pattern.requestKey,\n      segment: newSegment,\n      refreshState: pattern.refreshState,\n      slots: newSlots,\n\n      prefetchHints: pattern.prefetchHints,\n      isPage: true,\n      varyPath: newVaryPath,\n    }\n  } else {\n    // Layout segment: finalize without search params\n    const newVaryPath = finalizeLayoutVaryPath(\n      pattern.requestKey,\n      partialVaryPath\n    )\n    return {\n      requestKey: pattern.requestKey,\n      segment: newSegment,\n      refreshState: pattern.refreshState,\n      slots: newSlots,\n\n      prefetchHints: pattern.prefetchHints,\n      isPage: false,\n      varyPath: newVaryPath,\n    }\n  }\n}\n\n/**\n * Resets the known route tree. Called during development when routes may\n * change due to hot reloading.\n */\nexport function resetKnownRoutes(): void {\n  knownRouteTreeRoot = createEmptyPart()\n}\n","import type {\n  FlightRouterState,\n  Segment as FlightRouterStateSegment,\n  Segment,\n} from '../../../shared/lib/app-router-types'\nimport { PrefetchHint } from '../../../shared/lib/app-router-types'\nimport { matchSegment } from '../match-segments'\nimport {\n  readOrCreateRouteCacheEntry,\n  readOrCreateSegmentCacheEntry,\n  fetchRouteOnCacheMiss,\n  fetchSegmentOnCacheMiss,\n  fetchInlinedSegmentsOnCacheMiss,\n  EntryStatus,\n  type FulfilledRouteCacheEntry,\n  type RouteCacheEntry,\n  type SegmentCacheEntry,\n  type RouteTree,\n  fetchSegmentPrefetchesUsingDynamicRequest,\n  type PendingSegmentCacheEntry,\n  convertRouteTreeToFlightRouterState,\n  readOrCreateRevalidatingSegmentEntry,\n  upgradeToPendingSegment,\n  overwriteRevalidatingSegmentCacheEntry,\n  canNewFetchStrategyProvideMoreContent,\n  attemptToFulfillDynamicSegmentFromBFCache,\n  attemptToUpgradeSegmentFromBFCache,\n} from './cache'\nimport type { RouteCacheKey } from './cache-key'\nimport { createCacheKey } from './cache-key'\nimport {\n  FetchStrategy,\n  type PrefetchTaskFetchStrategy,\n  PrefetchPriority,\n} from './types'\nimport {\n  getCurrentRouteCacheVersion,\n  getCurrentSegmentCacheVersion,\n} from './cache'\nimport {\n  addSearchParamsIfPageSegment,\n  PAGE_SEGMENT_KEY,\n} from '../../../shared/lib/segment'\nimport type { SegmentRequestKey } from '../../../shared/lib/segment-cache/segment-value-encoding'\nimport { cleanup } from './lru'\n\nconst scheduleMicrotask =\n  typeof queueMicrotask === 'function'\n    ? queueMicrotask\n    : (fn: () => unknown) =>\n        Promise.resolve()\n          .then(fn)\n          .catch((error) =>\n            setTimeout(() => {\n              throw error\n            })\n          )\n\nexport type PrefetchTask = {\n  key: RouteCacheKey\n\n  /**\n   * The FlightRouterState at the time the task was initiated. This is needed\n   * when falling back to the non-PPR behavior, which only prefetches up to\n   * the first loading boundary.\n   */\n  treeAtTimeOfPrefetch: FlightRouterState\n\n  /**\n   * The cache versions at the time the task was initiated. Used to determine\n   * if the cache was invalidated since the task was initiated. Route and\n   * segment caches have separate versions so they can be invalidated\n   * independently.\n   */\n  routeCacheVersion: number\n  segmentCacheVersion: number\n\n  /**\n   * Whether to prefetch dynamic data, in addition to static data. This is\n   * used by `<Link prefetch={true}>`.\n   *\n   * Note that a task with `FetchStrategy.PPR` might need to use\n   * `FetchStrategy.LoadingBoundary` instead if we find out that a route\n   * does not support PPR after doing the initial route prefetch.\n   */\n  fetchStrategy: PrefetchTaskFetchStrategy\n\n  /**\n   * sortId is an incrementing counter\n   *\n   * Newer prefetches are prioritized over older ones, so that as new links\n   * enter the viewport, they are not starved by older links that are no\n   * longer relevant. In the future, we can add additional prioritization\n   * heuristics, like removing prefetches once a link leaves the viewport.\n   *\n   * The sortId is assigned when the prefetch is initiated, and reassigned if\n   * the same task is prefetched again (effectively bumping it to the top of\n   * the queue).\n   *\n   * TODO: We can add additional fields here to indicate what kind of prefetch\n   * it is. For example, was it initiated by a link? Or was it an imperative\n   * call? If it was initiated by a link, we can remove it from the queue when\n   * the link leaves the viewport, but if it was an imperative call, then we\n   * should keep it in the queue until it's fulfilled.\n   *\n   * We can also add priority levels. For example, hovering over a link could\n   * increase the priority of its prefetch.\n   */\n  sortId: number\n\n  /**\n   * The priority of the task. Like sortId, this affects the task's position in\n   * the queue, so it must never be updated without resifting the heap.\n   */\n  priority: PrefetchPriority\n\n  /**\n   * The phase of the task. Tasks are split into multiple phases so that their\n   * priority can be adjusted based on what kind of work they're doing.\n   * Concretely, prefetching the route tree is higher priority than prefetching\n   * segment data.\n   */\n  phase: PrefetchPhase\n\n  /**\n   * These fields are temporary state for tracking the currently running task.\n   * They are reset after each iteration of the task queue.\n   */\n  hasBackgroundWork: boolean\n  spawnedRuntimePrefetches: Set<SegmentRequestKey> | null\n\n  /**\n   * True if the prefetch was cancelled.\n   */\n  isCanceled: boolean\n\n  /**\n   * The callback passed to `router.prefetch`, if given.\n   */\n  onInvalidate: null | (() => void)\n\n  /**\n   * The index of the task in the heap's backing array. Used to efficiently\n   * change the priority of a task by re-sifting it, which requires knowing\n   * where it is in the array. This is only used internally by the heap\n   * algorithm. The naive alternative is indexOf every time a task is queued,\n   * which has O(n) complexity.\n   *\n   * We also use this field to check whether a task is currently in the queue.\n   */\n  _heapIndex: number\n\n  /**\n   * Called when the prefetch task finishes (either completed or canceled).\n   * Used by the Instant Navigation Testing API to await prefetch completion.\n   * Not exposed in production builds by default.\n   *\n   * Note: \"Complete\" means the scheduler has no more work to do for this task\n   * — all network requests have been spawned. It does not mean all data has\n   * been retrieved; responses may still be in flight.\n   */\n  _onComplete?: () => void\n}\n\nconst enum PrefetchTaskExitStatus {\n  /**\n   * The task yielded because there are too many requests in progress.\n   */\n  InProgress,\n\n  /**\n   * The task is blocked. It needs more data before it can proceed.\n   *\n   * Currently the only reason this happens is we're still waiting to receive a\n   * route tree from the server, because we can't start prefetching the segments\n   * until we know what to prefetch.\n   */\n  Blocked,\n\n  /**\n   * There's nothing left to prefetch.\n   */\n  Done,\n}\n\n/**\n * Prefetch tasks are processed in two phases: first the route tree is fetched,\n * then the segments. We use this to priortize tasks that have not yet fetched\n * the route tree.\n */\nconst enum PrefetchPhase {\n  RouteTree = 1,\n  Segments = 0,\n}\n\nexport type PrefetchSubtaskResult<T> = {\n  /**\n   * A promise that resolves when the network connection is closed.\n   */\n  closed: Promise<void>\n  value: T\n}\n\nconst taskHeap: Array<PrefetchTask> = []\n\nlet inProgressRequests = 0\n\nlet sortIdCounter = 0\nlet didScheduleMicrotask = false\n\n// The most recently hovered (or touched, etc) link, i.e. the most recent task\n// scheduled at Intent priority. There's only ever a single task at Intent\n// priority at a time. We reserve special network bandwidth for this task only.\nlet mostRecentlyHoveredLink: PrefetchTask | null = null\n\n// CDN cache propagation delay after revalidation (in milliseconds)\nconst REVALIDATION_COOLDOWN_MS = 300\n\n// Timeout handle for the revalidation cooldown. When non-null, prefetch\n// requests are blocked to allow CDN cache propagation.\nlet revalidationCooldownTimeoutHandle: ReturnType<typeof setTimeout> | null =\n  null\n\n/**\n * Called by the cache when revalidation occurs. Starts a cooldown period\n * during which prefetch requests are blocked to allow CDN cache propagation.\n */\nexport function startRevalidationCooldown(): void {\n  // Clear any existing timeout in case multiple revalidations happen\n  // in quick succession.\n  if (revalidationCooldownTimeoutHandle !== null) {\n    clearTimeout(revalidationCooldownTimeoutHandle)\n  }\n\n  // Schedule the cooldown to expire after the delay.\n  revalidationCooldownTimeoutHandle = setTimeout(() => {\n    revalidationCooldownTimeoutHandle = null\n    // Retry the prefetch queue now that the cooldown has expired.\n    pingPrefetchScheduler()\n  }, REVALIDATION_COOLDOWN_MS)\n}\n\nexport type IncludeDynamicData = null | 'full' | 'dynamic'\n\n/**\n * Initiates a prefetch task for the given URL. If a prefetch for the same URL\n * is already in progress, this will bump it to the top of the queue.\n *\n * This is not a user-facing function. By the time this is called, the href is\n * expected to be validated and normalized.\n *\n * @param key The RouteCacheKey to prefetch.\n * @param treeAtTimeOfPrefetch The app's current FlightRouterState\n * @param fetchStrategy Whether to prefetch dynamic data, in addition to\n * static data. This is used by `<Link prefetch={true}>`.\n * @param _onComplete Called when the prefetch task finishes. Testing API only.\n */\nexport function schedulePrefetchTask(\n  key: RouteCacheKey,\n  treeAtTimeOfPrefetch: FlightRouterState,\n  fetchStrategy: PrefetchTaskFetchStrategy,\n  priority: PrefetchPriority,\n  onInvalidate: null | (() => void),\n  _onComplete?: () => void\n): PrefetchTask {\n  // Spawn a new prefetch task\n  const task: PrefetchTask = {\n    key,\n    treeAtTimeOfPrefetch,\n    routeCacheVersion: getCurrentRouteCacheVersion(),\n    segmentCacheVersion: getCurrentSegmentCacheVersion(),\n    priority,\n    phase: PrefetchPhase.RouteTree,\n    hasBackgroundWork: false,\n    spawnedRuntimePrefetches: null,\n    fetchStrategy,\n    sortId: sortIdCounter++,\n    isCanceled: false,\n    onInvalidate,\n    _heapIndex: -1,\n  }\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    task._onComplete = _onComplete\n  }\n\n  trackMostRecentlyHoveredLink(task)\n\n  heapPush(taskHeap, task)\n\n  // Schedule an async task to process the queue.\n  //\n  // The main reason we process the queue in an async task is for batching.\n  // It's common for a single JS task/event to trigger multiple prefetches.\n  // By deferring to a microtask, we only process the queue once per JS task.\n  // If they have different priorities, it also ensures they are processed in\n  // the optimal order.\n  pingPrefetchScheduler()\n\n  return task\n}\n\nexport function cancelPrefetchTask(task: PrefetchTask): void {\n  // Remove the prefetch task from the queue. If the task already completed,\n  // then this is a no-op.\n  //\n  // We must also explicitly mark the task as canceled so that a blocked task\n  // does not get added back to the queue when it's pinged by the network.\n  task.isCanceled = true\n  heapDelete(taskHeap, task)\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    // Call completion callback. In practice this shouldn't be reached for\n    // test-initiated prefetches since cancellation is only used by the Link\n    // component when elements scroll out of viewport.\n    const onComplete = task._onComplete\n    task._onComplete = undefined\n    onComplete?.()\n  }\n}\n\nexport function reschedulePrefetchTask(\n  task: PrefetchTask,\n  treeAtTimeOfPrefetch: FlightRouterState,\n  fetchStrategy: PrefetchTaskFetchStrategy,\n  priority: PrefetchPriority\n): void {\n  // Bump the prefetch task to the top of the queue, as if it were a fresh\n  // task. This is essentially the same as canceling the task and scheduling\n  // a new one, except it reuses the original object.\n  //\n  // The primary use case is to increase the priority of a Link-initated\n  // prefetch on hover.\n  //\n  // Note: _onComplete is not reset here because it's preserved on the same\n  // task object. When the rescheduled task completes, the original callback\n  // will still be invoked.\n\n  // Un-cancel the task, in case it was previously canceled.\n  task.isCanceled = false\n  task.phase = PrefetchPhase.RouteTree\n\n  // Assign a new sort ID to move it ahead of all other tasks at the same\n  // priority level. (Higher sort IDs are processed first.)\n  task.sortId = sortIdCounter++\n  task.priority =\n    // If this task is the most recently hovered link, maintain its\n    // Intent priority, even if the rescheduled priority is lower.\n    task === mostRecentlyHoveredLink ? PrefetchPriority.Intent : priority\n\n  task.treeAtTimeOfPrefetch = treeAtTimeOfPrefetch\n  task.fetchStrategy = fetchStrategy\n\n  trackMostRecentlyHoveredLink(task)\n\n  if (task._heapIndex !== -1) {\n    // The task is already in the queue.\n    heapResift(taskHeap, task)\n  } else {\n    heapPush(taskHeap, task)\n  }\n  pingPrefetchScheduler()\n}\n\nexport function isPrefetchTaskDirty(\n  task: PrefetchTask,\n  nextUrl: string | null,\n  tree: FlightRouterState\n): boolean {\n  // This is used to quickly bail out of a prefetch task if the result is\n  // guaranteed to not have changed since the task was initiated. This is\n  // strictly an optimization — theoretically, if it always returned true, no\n  // behavior should change because a full prefetch task will effectively\n  // perform the same checks.\n  return (\n    task.routeCacheVersion !== getCurrentRouteCacheVersion() ||\n    task.segmentCacheVersion !== getCurrentSegmentCacheVersion() ||\n    task.treeAtTimeOfPrefetch !== tree ||\n    task.key.nextUrl !== nextUrl\n  )\n}\n\nfunction trackMostRecentlyHoveredLink(task: PrefetchTask) {\n  // Track the mostly recently hovered link, i.e. the most recently scheduled\n  // task at Intent priority. There must only be one such task at a time.\n  if (\n    task.priority === PrefetchPriority.Intent &&\n    task !== mostRecentlyHoveredLink\n  ) {\n    if (mostRecentlyHoveredLink !== null) {\n      // Bump the previously hovered link's priority down to Default.\n      if (mostRecentlyHoveredLink.priority !== PrefetchPriority.Background) {\n        mostRecentlyHoveredLink.priority = PrefetchPriority.Default\n        heapResift(taskHeap, mostRecentlyHoveredLink)\n      }\n    }\n    mostRecentlyHoveredLink = task\n  }\n}\n\nexport function pingPrefetchScheduler() {\n  if (didScheduleMicrotask) {\n    // Already scheduled a task to process the queue\n    return\n  }\n  didScheduleMicrotask = true\n  scheduleMicrotask(processQueueInMicrotask)\n}\n\n/**\n * Checks if we've exceeded the maximum number of concurrent prefetch requests,\n * to avoid saturating the browser's internal network queue. This is a\n * cooperative limit — prefetch tasks should check this before issuing\n * new requests.\n *\n * Also checks if we're within the revalidation cooldown window, during which\n * prefetch requests are delayed to allow CDN cache propagation.\n */\nfunction hasNetworkBandwidth(task: PrefetchTask): boolean {\n  // Check if we're within the revalidation cooldown window\n  if (revalidationCooldownTimeoutHandle !== null) {\n    // We're within the cooldown window. Return false to prevent prefetching.\n    // When the cooldown expires, the timeout will call ensureWorkIsScheduled()\n    // to retry the queue.\n    return false\n  }\n\n  // TODO: Also check if there's an in-progress navigation. We should never\n  // add prefetch requests to the network queue if an actual navigation is\n  // taking place, to ensure there's sufficient bandwidth for render-blocking\n  // data and resources.\n\n  // TODO: Consider reserving some amount of bandwidth for static prefetches.\n\n  if (task.priority === PrefetchPriority.Intent) {\n    // The most recently hovered link is allowed to exceed the default limit.\n    //\n    // The goal is to always have enough bandwidth to start a new prefetch\n    // request when hovering over a link.\n    //\n    // However, because we don't abort in-progress requests, it's still possible\n    // we'll run out of bandwidth. When links are hovered in quick succession,\n    // there could be multiple hover requests running simultaneously.\n    return inProgressRequests < 12\n  }\n\n  // The default limit is lower than the limit for a hovered link.\n  return inProgressRequests < 4\n}\n\nfunction spawnPrefetchSubtask<T>(\n  prefetchSubtask: Promise<PrefetchSubtaskResult<T> | null>\n): Promise<T | null> {\n  // When the scheduler spawns an async task, we don't await its result.\n  // Instead, the async task writes its result directly into the cache, then\n  // pings the scheduler to continue.\n  //\n  // We process server responses streamingly, so the prefetch subtask will\n  // likely resolve before we're finished receiving all the data. The subtask\n  // result includes a promise that resolves once the network connection is\n  // closed. The scheduler uses this to control network bandwidth by tracking\n  // and limiting the number of concurrent requests.\n  inProgressRequests++\n  return prefetchSubtask.then((result) => {\n    if (result === null) {\n      // The prefetch task errored before it could start processing the\n      // network stream. Assume the connection is closed.\n      onPrefetchConnectionClosed()\n      return null\n    }\n    // Wait for the connection to close before freeing up more bandwidth.\n    result.closed.then(onPrefetchConnectionClosed)\n    return result.value\n  })\n}\n\nfunction onPrefetchConnectionClosed(): void {\n  inProgressRequests--\n\n  // Notify the scheduler that we have more bandwidth, and can continue\n  // processing tasks.\n  pingPrefetchScheduler()\n}\n\n/**\n * Notify the scheduler that we've received new data for an in-progress\n * prefetch. The corresponding task will be added back to the queue (unless the\n * task has been canceled in the meantime).\n */\nexport function pingPrefetchTask(task: PrefetchTask) {\n  // \"Ping\" a prefetch that's already in progress to notify it of new data.\n  if (\n    // Check if prefetch was canceled.\n    task.isCanceled ||\n    // Check if prefetch is already queued.\n    task._heapIndex !== -1\n  ) {\n    return\n  }\n  // Add the task back to the queue.\n  heapPush(taskHeap, task)\n  pingPrefetchScheduler()\n}\n\nfunction processQueueInMicrotask() {\n  didScheduleMicrotask = false\n\n  // We aim to minimize how often we read the current time. Since nearly all\n  // functions in the prefetch scheduler are synchronous, we can read the time\n  // once and pass it as an argument wherever it's needed.\n  const now = Date.now()\n\n  // Process the task queue until we run out of network bandwidth.\n  let task = heapPeek(taskHeap)\n  while (task !== null && hasNetworkBandwidth(task)) {\n    task.routeCacheVersion = getCurrentRouteCacheVersion()\n    task.segmentCacheVersion = getCurrentSegmentCacheVersion()\n\n    const exitStatus = pingRoute(now, task)\n\n    // These fields are only valid for a single attempt. Reset them after each\n    // iteration of the task queue.\n    const hasBackgroundWork = task.hasBackgroundWork\n    task.hasBackgroundWork = false\n    task.spawnedRuntimePrefetches = null\n\n    switch (exitStatus) {\n      case PrefetchTaskExitStatus.InProgress:\n        // The task yielded because there are too many requests in progress.\n        // Stop processing tasks until we have more bandwidth.\n        return\n      case PrefetchTaskExitStatus.Blocked:\n        // The task is blocked. It needs more data before it can proceed.\n        // Keep the task out of the queue until the server responds.\n        heapPop(taskHeap)\n        // Continue to the next task\n        task = heapPeek(taskHeap)\n        continue\n      case PrefetchTaskExitStatus.Done:\n        if (task.phase === PrefetchPhase.RouteTree) {\n          // Finished prefetching the route tree. Proceed to prefetching\n          // the segments.\n          task.phase = PrefetchPhase.Segments\n          heapResift(taskHeap, task)\n        } else if (hasBackgroundWork) {\n          // The task spawned additional background work. Reschedule the task\n          // at background priority.\n          task.priority = PrefetchPriority.Background\n          heapResift(taskHeap, task)\n        } else {\n          // The prefetch is complete. Continue to the next task.\n          if (process.env.__NEXT_EXPOSE_TESTING_API) {\n            // Notify the Instant Navigation Testing API that the prefetch has\n            // completed, so it can proceed with navigation.\n            const onComplete = task._onComplete\n            task._onComplete = undefined\n            onComplete?.()\n          }\n          heapPop(taskHeap)\n        }\n        task = heapPeek(taskHeap)\n        continue\n      default:\n        exitStatus satisfies never\n    }\n  }\n\n  // Run LRU cleanup only when the scheduler is fully idle: no queued tasks and\n  // no in-progress requests. At that point, all active prefetch tasks have\n  // finished reading from the cache (moving recently used entries to the front\n  // of the list), so only genuinely stale data gets evicted.\n  if (task === null && inProgressRequests === 0) {\n    cleanup()\n  }\n}\n\n/**\n * Check this during a prefetch task to determine if background work can be\n * performed. If so, it evaluates to `true`. Otherwise, it returns `false`,\n * while also scheduling a background task to run later. Usage:\n *\n * @example\n * if (background(task)) {\n *   // Perform background-pri work\n * }\n */\nfunction background(task: PrefetchTask): boolean {\n  if (task.priority === PrefetchPriority.Background) {\n    return true\n  }\n  task.hasBackgroundWork = true\n  return false\n}\n\nfunction pingRoute(now: number, task: PrefetchTask): PrefetchTaskExitStatus {\n  const key = task.key\n  const route = readOrCreateRouteCacheEntry(now, task, key)\n  const exitStatus = pingRootRouteTree(now, task, route)\n\n  if (exitStatus !== PrefetchTaskExitStatus.InProgress && key.search !== '') {\n    // If the URL has a non-empty search string, also prefetch the pathname\n    // without the search string. We use the searchless route tree as a base for\n    // optimistic routing; see requestOptimisticRouteCacheEntry for details.\n    //\n    // Note that we don't need to prefetch any of the segment data. Just the\n    // route tree.\n    //\n    // TODO: This is a temporary solution; the plan is to replace this by adding\n    // a wildcard lookup method to the TupleMap implementation. This is\n    // non-trivial to implement because it needs to account for things like\n    // fallback route entries, hence this temporary workaround.\n    const url = new URL(key.pathname, location.origin)\n    const keyWithoutSearch = createCacheKey(url.href, key.nextUrl)\n    const routeWithoutSearch = readOrCreateRouteCacheEntry(\n      now,\n      task,\n      keyWithoutSearch\n    )\n    switch (routeWithoutSearch.status) {\n      case EntryStatus.Empty: {\n        if (background(task)) {\n          routeWithoutSearch.status = EntryStatus.Pending\n          spawnPrefetchSubtask(\n            fetchRouteOnCacheMiss(routeWithoutSearch, keyWithoutSearch)\n          )\n        }\n        break\n      }\n      case EntryStatus.Pending:\n      case EntryStatus.Fulfilled:\n      case EntryStatus.Rejected: {\n        // Either the route tree is already cached, or there's already a\n        // request in progress. Since we don't need to fetch any segment data\n        // for this route, there's nothing left to do.\n        break\n      }\n      default:\n        routeWithoutSearch satisfies never\n    }\n  }\n\n  return exitStatus\n}\n\nfunction pingRootRouteTree(\n  now: number,\n  task: PrefetchTask,\n  route: RouteCacheEntry\n): PrefetchTaskExitStatus {\n  switch (route.status) {\n    case EntryStatus.Empty: {\n      // Route is not yet cached, and there's no request already in progress.\n      // Spawn a task to request the route, load it into the cache, and ping\n      // the task to continue.\n\n      // TODO: There are multiple strategies in the <Link> API for prefetching\n      // a route. Currently we've only implemented the main one: per-segment,\n      // static-data only.\n      //\n      // There's also `<Link prefetch={true}>`\n      // which prefetch both static *and* dynamic data.\n      // Similarly, we need to fallback to the old, per-page\n      // behavior if PPR is disabled for a route (via the incremental opt-in).\n      //\n      // Those cases will be handled here.\n      spawnPrefetchSubtask(fetchRouteOnCacheMiss(route, task.key))\n\n      // If the request takes longer than a minute, a subsequent request should\n      // retry instead of waiting for this one. When the response is received,\n      // this value will be replaced by a new value based on the stale time sent\n      // from the server.\n      // TODO: We should probably also manually abort the fetch task, to reclaim\n      // server bandwidth.\n      route.staleAt = now + 60 * 1000\n\n      // Upgrade to Pending so we know there's already a request in progress\n      route.status = EntryStatus.Pending\n\n      // Intentional fallthrough to the Pending branch\n    }\n    case EntryStatus.Pending: {\n      // Still pending. We can't start prefetching the segments until the route\n      // tree has loaded. Add the task to the set of blocked tasks so that it\n      // is notified when the route tree is ready.\n      const blockedTasks = route.blockedTasks\n      if (blockedTasks === null) {\n        route.blockedTasks = new Set([task])\n      } else {\n        blockedTasks.add(task)\n      }\n      return PrefetchTaskExitStatus.Blocked\n    }\n    case EntryStatus.Rejected: {\n      // Route tree failed to load. Treat as a 404.\n      return PrefetchTaskExitStatus.Done\n    }\n    case EntryStatus.Fulfilled: {\n      if (task.phase !== PrefetchPhase.Segments) {\n        // Do not prefetch segment data until we've entered the segment phase.\n        return PrefetchTaskExitStatus.Done\n      }\n      // Recursively fill in the segment tree.\n      if (!hasNetworkBandwidth(task)) {\n        // Stop prefetching segments until there's more bandwidth.\n        return PrefetchTaskExitStatus.InProgress\n      }\n      const tree = route.tree\n\n      // A task's fetch strategy gets set to `PPR` for any \"auto\" prefetch.\n      // If it turned out that the route isn't PPR-enabled, we need to use `LoadingBoundary` instead.\n      // We don't need to do this for runtime prefetches, because those are only available in\n      // `cacheComponents`, where every route is PPR.\n      let fetchStrategy: FetchStrategy\n      if (tree.prefetchHints & PrefetchHint.SubtreeHasInstant) {\n        // If `instant` is defined anywhere on the target route, ignore the\n        // fetch strategy and switch to unified strategy used by Cache\n        // Components (called `PPR` for now, will likely be renamed).\n        //\n        // In practice, this just means that a \"full\" prefetch (<Link\n        // prefetch={true}>) has no effect. You're meant to use Runtime\n        // Prefetching instead — that's the new pattern that replaces\n        // prefetch={true}.\n        //\n        // The reason we check for `instant` rather than the `cacheComponents`\n        // flag is to support incremental adoption. `prefetch={true}` will\n        // continue to work until you opt into `instant`.\n        fetchStrategy = FetchStrategy.PPR\n      } else if (task.fetchStrategy === FetchStrategy.PPR) {\n        fetchStrategy = route.supportsPerSegmentPrefetching\n          ? FetchStrategy.PPR\n          : FetchStrategy.LoadingBoundary\n      } else {\n        fetchStrategy = task.fetchStrategy\n      }\n\n      switch (fetchStrategy) {\n        case FetchStrategy.PPR: {\n          // For Cache Components pages, each segment may be prefetched\n          // statically or using a runtime request, based on various\n          // configurations and heuristics. We'll do this in two passes: first\n          // traverse the tree and perform all the static prefetches.\n          //\n          // Then, if there are any segments that need a runtime request,\n          // do another pass to perform a runtime prefetch.\n          pingStaticHead(now, task, route)\n          const exitStatus = pingSharedPartOfCacheComponentsTree(\n            now,\n            task,\n            route,\n            task.treeAtTimeOfPrefetch,\n            tree\n          )\n          if (exitStatus === PrefetchTaskExitStatus.InProgress) {\n            // Child yielded without finishing.\n            return PrefetchTaskExitStatus.InProgress\n          }\n          const spawnedRuntimePrefetches = task.spawnedRuntimePrefetches\n          if (spawnedRuntimePrefetches !== null) {\n            // During the first pass, we discovered segments that require a\n            // runtime prefetch. Do a second pass to construct a request tree.\n            const spawnedEntries = new Map<\n              SegmentRequestKey,\n              PendingSegmentCacheEntry\n            >()\n            pingRuntimeHead(\n              now,\n              task,\n              route,\n              spawnedEntries,\n              FetchStrategy.PPRRuntime\n            )\n            const requestTree = pingRuntimePrefetches(\n              now,\n              task,\n              route,\n              tree,\n              spawnedRuntimePrefetches,\n              spawnedEntries\n            )\n            let needsDynamicRequest = spawnedEntries.size > 0\n            if (needsDynamicRequest) {\n              // Perform a dynamic prefetch request and populate the cache with\n              // the result.\n              spawnPrefetchSubtask(\n                fetchSegmentPrefetchesUsingDynamicRequest(\n                  task,\n                  route,\n                  FetchStrategy.PPRRuntime,\n                  requestTree,\n                  spawnedEntries\n                )\n              )\n            }\n          }\n\n          return PrefetchTaskExitStatus.Done\n        }\n        case FetchStrategy.Full:\n        case FetchStrategy.PPRRuntime:\n        case FetchStrategy.LoadingBoundary: {\n          // Prefetch multiple segments using a single dynamic request.\n          // TODO: We can consolidate this branch with previous one by modeling\n          // it as if the first segment in the new tree has runtime prefetching\n          // enabled. Will do this as a follow-up refactor. Might want to remove\n          // the special metatdata case below first. In the meantime, it's not\n          // really that much duplication, just would be nice to remove one of\n          // these codepaths.\n          const spawnedEntries = new Map<\n            SegmentRequestKey,\n            PendingSegmentCacheEntry\n          >()\n          pingRuntimeHead(now, task, route, spawnedEntries, fetchStrategy)\n          const dynamicRequestTree = diffRouteTreeAgainstCurrent(\n            now,\n            task,\n            route,\n            task.treeAtTimeOfPrefetch,\n            tree,\n            spawnedEntries,\n            fetchStrategy\n          )\n          let needsDynamicRequest = spawnedEntries.size > 0\n          if (needsDynamicRequest) {\n            spawnPrefetchSubtask(\n              fetchSegmentPrefetchesUsingDynamicRequest(\n                task,\n                route,\n                fetchStrategy,\n                dynamicRequestTree,\n                spawnedEntries\n              )\n            )\n          }\n          return PrefetchTaskExitStatus.Done\n        }\n        default:\n          fetchStrategy satisfies never\n      }\n      break\n    }\n    default: {\n      route satisfies never\n    }\n  }\n  return PrefetchTaskExitStatus.Done\n}\n\nfunction pingStaticHead(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry\n): void {\n  // The Head data for a page (metadata, viewport) is not really a route\n  // segment, in the sense that it doesn't appear in the route tree. But we\n  // store it in the cache as if it were, using a special key.\n  pingStaticSegmentData(\n    now,\n    task,\n    route,\n    readOrCreateSegmentCacheEntry(now, FetchStrategy.PPR, route.metadata),\n    task.key,\n    route.metadata\n  )\n}\n\nfunction pingRuntimeHead(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>,\n  fetchStrategy:\n    | FetchStrategy.Full\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.LoadingBoundary\n): void {\n  pingRouteTreeAndIncludeDynamicData(\n    now,\n    task,\n    route,\n    route.metadata,\n    false,\n    spawnedEntries,\n    // When prefetching the head, there's no difference between Full\n    // and LoadingBoundary\n    fetchStrategy === FetchStrategy.LoadingBoundary\n      ? FetchStrategy.Full\n      : fetchStrategy\n  )\n}\n\n// TODO: Rename dynamic -> runtime throughout this module\n\nfunction pingSharedPartOfCacheComponentsTree(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  oldTree: FlightRouterState,\n  newTree: RouteTree\n): PrefetchTaskExitStatus {\n  // When Cache Components is enabled (or PPR, or a fully static route when PPR\n  // is disabled; those cases are treated equivalently to Cache Components), we\n  // start by prefetching each segment individually. Once we reach the \"new\"\n  // part of the tree — the part that doesn't exist on the current page — we\n  // may choose to switch to a runtime prefetch instead, based on the\n  // information sent by the server in the route tree.\n  //\n  // The traversal starts in the \"shared\" part of the tree. Once we reach the\n  // \"new\" part of the tree, we switch to a different traversal,\n  // pingNewPartOfCacheComponentsTree.\n\n  // Prefetch this segment's static data.\n  const segment = readOrCreateSegmentCacheEntry(\n    now,\n    task.fetchStrategy,\n    newTree\n  )\n  pingStaticSegmentData(now, task, route, segment, task.key, newTree)\n\n  // Recursively ping the children.\n  const oldTreeChildren = oldTree[1]\n  const newTreeChildren = newTree.slots\n  if (newTreeChildren !== null) {\n    for (const parallelRouteKey in newTreeChildren) {\n      if (!hasNetworkBandwidth(task)) {\n        // Stop prefetching segments until there's more bandwidth.\n        return PrefetchTaskExitStatus.InProgress\n      }\n      const newTreeChild = newTreeChildren[parallelRouteKey]\n      const newTreeChildSegment = newTreeChild.segment\n      const oldTreeChild: FlightRouterState | void =\n        oldTreeChildren[parallelRouteKey]\n      const oldTreeChildSegment: FlightRouterStateSegment | void =\n        oldTreeChild?.[0]\n      let childExitStatus\n      if (\n        oldTreeChildSegment !== undefined &&\n        doesCurrentSegmentMatchCachedSegment(\n          route,\n          newTreeChildSegment,\n          oldTreeChildSegment\n        )\n      ) {\n        // We're still in the \"shared\" part of the tree.\n        childExitStatus = pingSharedPartOfCacheComponentsTree(\n          now,\n          task,\n          route,\n          oldTreeChild,\n          newTreeChild\n        )\n      } else {\n        // We've entered the \"new\" part of the tree. Switch\n        // traversal functions.\n        childExitStatus = pingNewPartOfCacheComponentsTree(\n          now,\n          task,\n          route,\n          newTreeChild\n        )\n      }\n      if (childExitStatus === PrefetchTaskExitStatus.InProgress) {\n        // Child yielded without finishing.\n        return PrefetchTaskExitStatus.InProgress\n      }\n    }\n  }\n\n  return PrefetchTaskExitStatus.Done\n}\n\nfunction pingNewPartOfCacheComponentsTree(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  tree: RouteTree\n): PrefetchTaskExitStatus.InProgress | PrefetchTaskExitStatus.Done {\n  // We're now prefetching in the \"new\" part of the tree, the part that doesn't\n  // exist on the current page. (In other words, we're deeper than the\n  // shared layouts.) Segments in here default to being prefetched statically.\n  // However, if the server instructs us to, we may switch to a runtime\n  // prefetch instead. Traverse the tree and check at each segment.\n  if (tree.prefetchHints & PrefetchHint.HasRuntimePrefetch) {\n    // This route has a runtime prefetch response. Since we're below the shared\n    // layout, everything from this point should be prefetched using a single,\n    // combined runtime request, rather than using per-segment static requests.\n    // This is true even if some of the child segments are known to be fully\n    // static — once we've decided to perform a runtime prefetch, we might as\n    // well respond with the static segments in the same roundtrip. (That's how\n    // regular navigations work, too.) We'll still skip over segments that are\n    // already cached, though.\n    //\n    // It's the server's responsibility to set a reasonable value of\n    // `hasRuntimePrefetch`. Currently it's user-defined, but eventually, the\n    // server may send a value of `false` even if the user opts in, if it\n    // determines during build that the route is always fully static. There are\n    // more optimizations we can do once we implement fallback param\n    // tracking, too.\n    //\n    // Use the task object to collect the segments that need a runtime prefetch.\n    // This will signal to the outer task queue that a second traversal is\n    // required to construct a request tree.\n    if (task.spawnedRuntimePrefetches === null) {\n      task.spawnedRuntimePrefetches = new Set([tree.requestKey])\n    } else {\n      task.spawnedRuntimePrefetches.add(tree.requestKey)\n    }\n    // Then exit the traversal without prefetching anything further.\n    return PrefetchTaskExitStatus.Done\n  }\n\n  // This segment should not be runtime prefetched. Prefetch its static data.\n  const segment = readOrCreateSegmentCacheEntry(now, task.fetchStrategy, tree)\n  pingStaticSegmentData(now, task, route, segment, task.key, tree)\n  if (tree.slots !== null) {\n    if (!hasNetworkBandwidth(task)) {\n      // Stop prefetching segments until there's more bandwidth.\n      return PrefetchTaskExitStatus.InProgress\n    }\n    // Recursively ping the children.\n    for (const parallelRouteKey in tree.slots) {\n      const childTree = tree.slots[parallelRouteKey]\n      const childExitStatus = pingNewPartOfCacheComponentsTree(\n        now,\n        task,\n        route,\n        childTree\n      )\n      if (childExitStatus === PrefetchTaskExitStatus.InProgress) {\n        // Child yielded without finishing.\n        return PrefetchTaskExitStatus.InProgress\n      }\n    }\n  }\n  // This segment and all its children have finished prefetching.\n  return PrefetchTaskExitStatus.Done\n}\n\nfunction diffRouteTreeAgainstCurrent(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  oldTree: FlightRouterState,\n  newTree: RouteTree,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>,\n  fetchStrategy:\n    | FetchStrategy.Full\n    | FetchStrategy.PPRRuntime\n    | FetchStrategy.LoadingBoundary\n): FlightRouterState {\n  // This is a single recursive traversal that does multiple things:\n  // - Finds the parts of the target route (newTree) that are not part of\n  //   of the current page (oldTree) by diffing them, using the same algorithm\n  //   as a real navigation.\n  // - Constructs a request tree (FlightRouterState) that describes which\n  //   segments need to be prefetched and which ones are already cached.\n  // - Creates a set of pending cache entries for the segments that need to\n  //   be prefetched, so that a subsequent prefetch task does not request the\n  //   same segments again.\n  const oldTreeChildren = oldTree[1]\n  const newTreeChildren = newTree.slots\n  let requestTreeChildren: Record<string, FlightRouterState> = {}\n  if (newTreeChildren !== null) {\n    for (const parallelRouteKey in newTreeChildren) {\n      const newTreeChild = newTreeChildren[parallelRouteKey]\n      const newTreeChildSegment = newTreeChild.segment\n      const oldTreeChild: FlightRouterState | void =\n        oldTreeChildren[parallelRouteKey]\n      const oldTreeChildSegment: FlightRouterStateSegment | void =\n        oldTreeChild?.[0]\n      if (\n        oldTreeChildSegment !== undefined &&\n        doesCurrentSegmentMatchCachedSegment(\n          route,\n          newTreeChildSegment,\n          oldTreeChildSegment\n        )\n      ) {\n        // This segment is already part of the current route. Keep traversing.\n        const requestTreeChild = diffRouteTreeAgainstCurrent(\n          now,\n          task,\n          route,\n          oldTreeChild,\n          newTreeChild,\n          spawnedEntries,\n          fetchStrategy\n        )\n        requestTreeChildren[parallelRouteKey] = requestTreeChild\n      } else {\n        // This segment is not part of the current route. We're entering a\n        // part of the tree that we need to prefetch (unless everything is\n        // already cached).\n        switch (fetchStrategy) {\n          case FetchStrategy.LoadingBoundary: {\n            // When PPR is disabled, we can't prefetch per segment. We must\n            // fallback to the old prefetch behavior and send a dynamic request.\n            // Only routes that include a loading boundary can be prefetched in\n            // this way.\n            //\n            // This is simlar to a \"full\" prefetch, but we're much more\n            // conservative about which segments to include in the request.\n            //\n            // The server will only render up to the first loading boundary\n            // inside new part of the tree. If there's no loading boundary\n            // anywhere in the tree, the server will never return any data, so\n            // we can skip the request.\n            const subtreeHasLoadingBoundary =\n              (newTreeChild.prefetchHints &\n                (PrefetchHint.SegmentHasLoadingBoundary |\n                  PrefetchHint.SubtreeHasLoadingBoundary)) !==\n              0\n            const requestTreeChild = subtreeHasLoadingBoundary\n              ? pingPPRDisabledRouteTreeUpToLoadingBoundary(\n                  now,\n                  task,\n                  route,\n                  newTreeChild,\n                  null,\n                  spawnedEntries\n                )\n              : // There's no loading boundary within this tree. Bail out.\n                convertRouteTreeToFlightRouterState(newTreeChild)\n            requestTreeChildren[parallelRouteKey] = requestTreeChild\n            break\n          }\n          case FetchStrategy.PPRRuntime: {\n            // This is a runtime prefetch. Fetch all cacheable data in the tree,\n            // not just the static PPR shell.\n            const requestTreeChild = pingRouteTreeAndIncludeDynamicData(\n              now,\n              task,\n              route,\n              newTreeChild,\n              false,\n              spawnedEntries,\n              fetchStrategy\n            )\n            requestTreeChildren[parallelRouteKey] = requestTreeChild\n            break\n          }\n          case FetchStrategy.Full: {\n            // This is a \"full\" prefetch. Fetch all the data in the tree, both\n            // static and dynamic. We issue roughly the same request that we\n            // would during a real navigation. The goal is that once the\n            // navigation occurs, the router should not have to fetch any\n            // additional data.\n            //\n            // Although the response will include dynamic data, opting into a\n            // Full prefetch — via <Link prefetch={true}> — implicitly\n            // instructs the cache to treat the response as \"static\", or non-\n            // dynamic, since the whole point is to cache it for\n            // future navigations.\n            //\n            // Construct a tree (currently a FlightRouterState) that represents\n            // which segments need to be prefetched and which ones are already\n            // cached. If the tree is empty, then we can exit. Otherwise, we'll\n            // send the request tree to the server and use the response to\n            // populate the segment cache.\n            const requestTreeChild = pingRouteTreeAndIncludeDynamicData(\n              now,\n              task,\n              route,\n              newTreeChild,\n              false,\n              spawnedEntries,\n              fetchStrategy\n            )\n            requestTreeChildren[parallelRouteKey] = requestTreeChild\n            break\n          }\n          default:\n            fetchStrategy satisfies never\n        }\n      }\n    }\n  }\n  const requestTree: FlightRouterState = [\n    newTree.segment,\n    requestTreeChildren,\n    null,\n    null,\n  ]\n  return requestTree\n}\n\nfunction pingPPRDisabledRouteTreeUpToLoadingBoundary(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  tree: RouteTree,\n  refetchMarkerContext: 'refetch' | 'inside-shared-layout' | null,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>\n): FlightRouterState {\n  // This function is similar to pingRouteTreeAndIncludeDynamicData, except the\n  // server is only going to return a minimal loading state — it will stop\n  // rendering at the first loading boundary. Whereas a Full prefetch is\n  // intentionally aggressive and tries to pretfetch all the data that will be\n  // needed for a navigation, a LoadingBoundary prefetch is much more\n  // conservative. For example, it will omit from the request tree any segment\n  // that is already cached, regardles of whether it's partial or full. By\n  // contrast, a Full prefetch will refetch partial segments.\n\n  // \"inside-shared-layout\" tells the server where to start looking for a\n  // loading boundary.\n  let refetchMarker: 'refetch' | 'inside-shared-layout' | null =\n    refetchMarkerContext === null ? 'inside-shared-layout' : null\n\n  const segment = readOrCreateSegmentCacheEntry(now, task.fetchStrategy, tree)\n  switch (segment.status) {\n    case EntryStatus.Empty: {\n      // This segment is not cached. Add a refetch marker so the server knows\n      // to start rendering here.\n      // TODO: Instead of a \"refetch\" marker, we could just omit this subtree's\n      // FlightRouterState from the request tree. I think this would probably\n      // already work even without any updates to the server. For consistency,\n      // though, I'll send the full tree and we'll look into this later as part\n      // of a larger redesign of the request protocol.\n\n      // Add the pending cache entry to the result map.\n      spawnedEntries.set(\n        tree.requestKey,\n        upgradeToPendingSegment(\n          segment,\n          // Set the fetch strategy to LoadingBoundary to indicate that the server\n          // might not include it in the pending response. If another route is able\n          // to issue a per-segment request, we'll do that in the background.\n          FetchStrategy.LoadingBoundary\n        )\n      )\n      if (refetchMarkerContext !== 'refetch') {\n        refetchMarker = refetchMarkerContext = 'refetch'\n      } else {\n        // There's already a parent with a refetch marker, so we don't need\n        // to add another one.\n      }\n      break\n    }\n    case EntryStatus.Fulfilled: {\n      // The segment is already cached.\n      const segmentHasLoadingBoundary =\n        (tree.prefetchHints & PrefetchHint.SegmentHasLoadingBoundary) !== 0\n      if (segmentHasLoadingBoundary) {\n        // This segment has a loading boundary, which means the server won't\n        // render its children. So there's nothing left to prefetch along this\n        // path. We can bail out.\n        return convertRouteTreeToFlightRouterState(tree)\n      }\n      // NOTE: If the cached segment were fetched using PPR, then it might be\n      // partial. We could get a more complete version of the segment by\n      // including it in this non-PPR request.\n      //\n      // We're intentionally choosing not to, though, because it's generally\n      // better to avoid doing a full prefetch whenever possible.\n      break\n    }\n    case EntryStatus.Pending: {\n      // There's another prefetch currently in progress. Don't add the refetch\n      // marker yet, so the server knows it can skip rendering this segment.\n      break\n    }\n    case EntryStatus.Rejected: {\n      // The segment failed to load. We shouldn't issue another request until\n      // the stale time has elapsed.\n      break\n    }\n    default:\n      segment satisfies never\n  }\n  const requestTreeChildren: Record<string, FlightRouterState> = {}\n  if (tree.slots !== null) {\n    for (const parallelRouteKey in tree.slots) {\n      const childTree = tree.slots[parallelRouteKey]\n      requestTreeChildren[parallelRouteKey] =\n        pingPPRDisabledRouteTreeUpToLoadingBoundary(\n          now,\n          task,\n          route,\n          childTree,\n          refetchMarkerContext,\n          spawnedEntries\n        )\n    }\n  }\n  const requestTree: FlightRouterState = [\n    tree.segment,\n    requestTreeChildren,\n    null,\n    refetchMarker,\n  ]\n  return requestTree\n}\n\nfunction pingRouteTreeAndIncludeDynamicData(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  tree: RouteTree,\n  isInsideRefetchingParent: boolean,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>,\n  fetchStrategy: FetchStrategy.Full | FetchStrategy.PPRRuntime\n): FlightRouterState {\n  // The tree we're constructing is the same shape as the tree we're navigating\n  // to. But even though this is a \"new\" tree, some of the individual segments\n  // may be cached as a result of other route prefetches.\n  //\n  // So we need to find the first uncached segment along each path add an\n  // explicit \"refetch\" marker so the server knows where to start rendering.\n  // Once the server starts rendering along a path, it keeps rendering the\n  // entire subtree.\n  const segment = readOrCreateSegmentCacheEntry(\n    now,\n    // Note that `fetchStrategy` might be different from `task.fetchStrategy`,\n    // and we have to use the former here.\n    // We can have a task with `FetchStrategy.PPR` where some of its segments are configured to\n    // always use runtime prefetching (via `export const prefetch`), and those should check for\n    // entries that include search params.\n    fetchStrategy,\n    tree\n  )\n\n  let spawnedSegment: PendingSegmentCacheEntry | null = null\n\n  switch (segment.status) {\n    case EntryStatus.Empty: {\n      // This segment is not cached.\n      if (fetchStrategy === FetchStrategy.Full) {\n        // Check if there's a matching entry in the bfcache. If so, fulfill the\n        // segment using the bfcache entry instead of issuing a new request.\n        const fulfilled = attemptToFulfillDynamicSegmentFromBFCache(\n          now,\n          segment,\n          tree\n        )\n        if (fulfilled !== null) {\n          break\n        }\n      }\n      // Include it in the request.\n      spawnedSegment = upgradeToPendingSegment(segment, fetchStrategy)\n      break\n    }\n    case EntryStatus.Fulfilled: {\n      // The segment is already cached.\n      if (\n        segment.isPartial &&\n        canNewFetchStrategyProvideMoreContent(\n          segment.fetchStrategy,\n          fetchStrategy\n        )\n      ) {\n        // The cached segment contains dynamic holes, and was prefetched using a\n        // less specific strategy than the current one. This means we're in one\n        // of these cases:\n        //   - we have a static prefetch, and we're doing a runtime prefetch\n        //   - we have a static or runtime prefetch, and we're doing a Full\n        //     prefetch (or a navigation).\n        // In either case, we need to include it in the request to get a more\n        // specific (or full) version. However, if there's a non-stale bfcache\n        // entry from a previous navigation, prefer that over making a new\n        // request.\n        if (fetchStrategy === FetchStrategy.Full) {\n          const fulfilled = attemptToUpgradeSegmentFromBFCache(now, tree)\n          if (fulfilled !== null) {\n            break\n          }\n        }\n        spawnedSegment = pingFullSegmentRevalidation(now, tree, fetchStrategy)\n      }\n      break\n    }\n    case EntryStatus.Pending:\n    case EntryStatus.Rejected: {\n      // There's either another prefetch currently in progress, or the previous\n      // attempt failed. If the new strategy can provide more content, fetch it again.\n      if (\n        canNewFetchStrategyProvideMoreContent(\n          segment.fetchStrategy,\n          fetchStrategy\n        )\n      ) {\n        spawnedSegment = pingFullSegmentRevalidation(now, tree, fetchStrategy)\n      }\n      break\n    }\n    default:\n      segment satisfies never\n  }\n  const requestTreeChildren: Record<string, FlightRouterState> = {}\n  if (tree.slots !== null) {\n    for (const parallelRouteKey in tree.slots) {\n      const childTree = tree.slots[parallelRouteKey]\n      requestTreeChildren[parallelRouteKey] =\n        pingRouteTreeAndIncludeDynamicData(\n          now,\n          task,\n          route,\n          childTree,\n          isInsideRefetchingParent || spawnedSegment !== null,\n          spawnedEntries,\n          fetchStrategy\n        )\n    }\n  }\n\n  if (spawnedSegment !== null) {\n    // Add the pending entry to the result map.\n    spawnedEntries.set(tree.requestKey, spawnedSegment)\n  }\n\n  // Don't bother to add a refetch marker if one is already present in a parent.\n  const refetchMarker =\n    !isInsideRefetchingParent && spawnedSegment !== null ? 'refetch' : null\n\n  const requestTree: FlightRouterState = [\n    tree.segment,\n    requestTreeChildren,\n    null,\n    refetchMarker,\n  ]\n  return requestTree\n}\n\nfunction pingRuntimePrefetches(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  tree: RouteTree,\n  spawnedRuntimePrefetches: Set<SegmentRequestKey>,\n  spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>\n): FlightRouterState {\n  // Construct a request tree (FlightRouterState) for a runtime prefetch. If\n  // a segment is part of the runtime prefetch, the tree is constructed by\n  // diffing against what's already in the prefetch cache. Otherwise, we send\n  // a regular FlightRouterState with no special markers.\n  //\n  // See pingRouteTreeAndIncludeDynamicData for details.\n  if (spawnedRuntimePrefetches.has(tree.requestKey)) {\n    // This segment needs a runtime prefetch.\n    return pingRouteTreeAndIncludeDynamicData(\n      now,\n      task,\n      route,\n      tree,\n      false,\n      spawnedEntries,\n      FetchStrategy.PPRRuntime\n    )\n  }\n  let requestTreeChildren: Record<string, FlightRouterState> = {}\n  const slots = tree.slots\n  if (slots !== null) {\n    for (const parallelRouteKey in slots) {\n      const childTree = slots[parallelRouteKey]\n      requestTreeChildren[parallelRouteKey] = pingRuntimePrefetches(\n        now,\n        task,\n        route,\n        childTree,\n        spawnedRuntimePrefetches,\n        spawnedEntries\n      )\n    }\n  }\n\n  // This segment is not part of the runtime prefetch. Clone the base tree.\n  const requestTree: FlightRouterState = [\n    tree.segment,\n    requestTreeChildren,\n    null,\n    null,\n  ]\n  return requestTree\n}\n\nfunction pingStaticSegmentData(\n  now: number,\n  task: PrefetchTask,\n  route: FulfilledRouteCacheEntry,\n  segment: SegmentCacheEntry,\n  routeKey: RouteCacheKey,\n  tree: RouteTree\n): void {\n  switch (segment.status) {\n    case EntryStatus.Empty:\n      if (process.env.__NEXT_PREFETCH_INLINING) {\n        // All segment data for this route is bundled into a single\n        // /_inlined response. Walk the full route tree to collect all\n        // Empty segments, upgrade them to Pending, and spawn one\n        // bundled request. Subsequent calls for other segments in the\n        // same tree will see them as Pending and skip.\n        const inlinedEntries = collectInlinedEntries(now, route)\n        if (inlinedEntries.size > 0) {\n          spawnPrefetchSubtask(\n            fetchInlinedSegmentsOnCacheMiss(\n              route,\n              routeKey,\n              route.tree,\n              inlinedEntries\n            )\n          )\n        }\n        break\n      }\n      // Upgrade to Pending so we know there's already a request in progress\n      spawnPrefetchSubtask(\n        fetchSegmentOnCacheMiss(\n          route,\n          upgradeToPendingSegment(segment, FetchStrategy.PPR),\n          routeKey,\n          tree\n        )\n      )\n      break\n    case EntryStatus.Pending: {\n      // There's already a request in progress. Depending on what kind of\n      // request it is, we may want to revalidate it.\n      switch (segment.fetchStrategy) {\n        case FetchStrategy.PPR:\n        case FetchStrategy.PPRRuntime:\n        case FetchStrategy.Full:\n          // There's already a request in progress. Don't do anything.\n          break\n        case FetchStrategy.LoadingBoundary:\n          // There's a pending request, but because it's using the old\n          // prefetching strategy, we can't be sure if it will be fulfilled by\n          // the response — it might be inside the loading boundary. Perform\n          // a revalidation, but because it's speculative, wait to do it at\n          // background priority.\n          if (background(task)) {\n            // TODO: Instead of speculatively revalidating, consider including\n            // `hasLoading` in the route tree prefetch response.\n            pingPPRSegmentRevalidation(now, route, routeKey, tree)\n          }\n          break\n        default:\n          segment.fetchStrategy satisfies never\n      }\n      break\n    }\n    case EntryStatus.Rejected: {\n      // The existing entry in the cache was rejected. Depending on how it\n      // was originally fetched, we may or may not want to revalidate it.\n      switch (segment.fetchStrategy) {\n        case FetchStrategy.PPR:\n        case FetchStrategy.PPRRuntime:\n        case FetchStrategy.Full:\n          // The previous attempt to fetch this entry failed. Don't attempt to\n          // fetch it again until the entry expires.\n          break\n        case FetchStrategy.LoadingBoundary:\n          // There's a rejected entry, but it was fetched using the loading\n          // boundary strategy. So the reason it wasn't returned by the server\n          // might just be because it was inside a loading boundary. Or because\n          // there was a dynamic rewrite. Revalidate it using the per-\n          // segment strategy.\n          //\n          // Because a rejected segment will definitely prevent the segment (and\n          // all of its children) from rendering, we perform this revalidation\n          // immediately instead of deferring it to a background task.\n          pingPPRSegmentRevalidation(now, route, routeKey, tree)\n          break\n        default:\n          segment.fetchStrategy satisfies never\n      }\n      break\n    }\n    case EntryStatus.Fulfilled:\n      // Segment is already cached. There's nothing left to prefetch.\n      break\n    default:\n      segment satisfies never\n  }\n\n  // Segments do not have dependent tasks, so once the prefetch is initiated,\n  // there's nothing else for us to do (except write the server data into the\n  // entry, which is handled by `fetchSegmentOnCacheMiss`).\n}\n\n/**\n * Walks the RouteTree (including the head metadata) and collects any segments\n * that are still Empty into a Map, upgrading them to Pending. These entries\n * will be fulfilled by the inlined prefetch response.\n */\nfunction collectInlinedEntries(\n  now: number,\n  route: FulfilledRouteCacheEntry\n): Map<SegmentRequestKey, PendingSegmentCacheEntry> {\n  const entries = new Map<SegmentRequestKey, PendingSegmentCacheEntry>()\n  collectInlinedEntriesImpl(now, route.tree, entries)\n  // Also collect the head/metadata entry.\n  const headEntry = readOrCreateSegmentCacheEntry(\n    now,\n    FetchStrategy.PPR,\n    route.metadata\n  )\n  if (headEntry.status === EntryStatus.Empty) {\n    entries.set(\n      route.metadata.requestKey,\n      upgradeToPendingSegment(headEntry, FetchStrategy.PPR)\n    )\n  }\n  return entries\n}\n\nfunction collectInlinedEntriesImpl(\n  now: number,\n  tree: RouteTree,\n  entries: Map<SegmentRequestKey, PendingSegmentCacheEntry>\n): void {\n  const entry = readOrCreateSegmentCacheEntry(now, FetchStrategy.PPR, tree)\n  if (entry.status === EntryStatus.Empty) {\n    entries.set(\n      tree.requestKey,\n      upgradeToPendingSegment(entry, FetchStrategy.PPR)\n    )\n  }\n  if (tree.slots !== null) {\n    for (const parallelRouteKey in tree.slots) {\n      collectInlinedEntriesImpl(now, tree.slots[parallelRouteKey], entries)\n    }\n  }\n}\n\nfunction pingPPRSegmentRevalidation(\n  now: number,\n  route: FulfilledRouteCacheEntry,\n  routeKey: RouteCacheKey,\n  tree: RouteTree\n): void {\n  const revalidatingSegment = readOrCreateRevalidatingSegmentEntry(\n    now,\n    FetchStrategy.PPR,\n    tree\n  )\n  switch (revalidatingSegment.status) {\n    case EntryStatus.Empty:\n      // Spawn a prefetch request. The fetch function handles upserting\n      // the entry at the correct fulfilled vary path upon completion.\n      spawnPrefetchSubtask(\n        fetchSegmentOnCacheMiss(\n          route,\n          upgradeToPendingSegment(revalidatingSegment, FetchStrategy.PPR),\n          routeKey,\n          tree\n        )\n      )\n      break\n    case EntryStatus.Pending:\n      // There's already a revalidation in progress.\n      break\n    case EntryStatus.Fulfilled:\n    case EntryStatus.Rejected:\n      // A previous revalidation attempt finished, but we chose not to replace\n      // the existing entry in the cache. Don't try again until or unless the\n      // revalidation entry expires.\n      break\n    default:\n      revalidatingSegment satisfies never\n  }\n}\n\nfunction pingFullSegmentRevalidation(\n  now: number,\n  tree: RouteTree,\n  fetchStrategy: FetchStrategy.Full | FetchStrategy.PPRRuntime\n): PendingSegmentCacheEntry | null {\n  const revalidatingSegment = readOrCreateRevalidatingSegmentEntry(\n    now,\n    fetchStrategy,\n    tree\n  )\n  if (revalidatingSegment.status === EntryStatus.Empty) {\n    // During a Full/PPRRuntime prefetch, a single dynamic request is made for all the\n    // segments that we need. So we don't initiate a request here directly. By\n    // returning a pending entry from this function, it signals to the caller\n    // that this segment should be included in the request that's sent to\n    // the server.\n    const pendingSegment = upgradeToPendingSegment(\n      revalidatingSegment,\n      fetchStrategy\n    )\n    // The upsert is handled by fulfillEntrySpawnedByRuntimePrefetch\n    // when the dynamic prefetch response is written into the cache.\n    return pendingSegment\n  } else {\n    // There's already a revalidation in progress.\n    const nonEmptyRevalidatingSegment = revalidatingSegment\n    if (\n      canNewFetchStrategyProvideMoreContent(\n        nonEmptyRevalidatingSegment.fetchStrategy,\n        fetchStrategy\n      )\n    ) {\n      // The existing revalidation was fetched using a less specific strategy.\n      // Reset it and start a new revalidation.\n      const emptySegment = overwriteRevalidatingSegmentCacheEntry(\n        now,\n        fetchStrategy,\n        tree\n      )\n      const pendingSegment = upgradeToPendingSegment(\n        emptySegment,\n        fetchStrategy\n      )\n      // The upsert is handled by fulfillEntrySpawnedByRuntimePrefetch\n      // when the dynamic prefetch response is written into the cache.\n      return pendingSegment\n    }\n    switch (nonEmptyRevalidatingSegment.status) {\n      case EntryStatus.Pending:\n        // There's already an in-progress prefetch that includes this segment.\n        return null\n      case EntryStatus.Fulfilled:\n      case EntryStatus.Rejected:\n        // A previous revalidation attempt finished, but we chose not to replace\n        // the existing entry in the cache. Don't try again until or unless the\n        // revalidation entry expires.\n        return null\n      default:\n        nonEmptyRevalidatingSegment satisfies never\n        return null\n    }\n  }\n}\n\nfunction doesCurrentSegmentMatchCachedSegment(\n  route: FulfilledRouteCacheEntry,\n  currentSegment: Segment,\n  cachedSegment: Segment\n): boolean {\n  if (cachedSegment === PAGE_SEGMENT_KEY) {\n    // In the FlightRouterState stored by the router, the page segment has the\n    // rendered search params appended to the name of the segment. In the\n    // prefetch cache, however, this is stored separately. So, when comparing\n    // the router's current FlightRouterState to the cached FlightRouterState,\n    // we need to make sure we compare both parts of the segment.\n    // TODO: This is not modeled clearly. We use the same type,\n    // FlightRouterState, for both the CacheNode tree _and_ the prefetch cache\n    // _and_ the server response format, when conceptually those are three\n    // different things and treated in different ways. We should encode more of\n    // this information into the type design so mistakes are less likely.\n    return (\n      currentSegment ===\n      addSearchParamsIfPageSegment(\n        PAGE_SEGMENT_KEY,\n        Object.fromEntries(new URLSearchParams(route.renderedSearch))\n      )\n    )\n  }\n  // Non-page segments are compared using the same function as the server\n  return matchSegment(cachedSegment, currentSegment)\n}\n\n// -----------------------------------------------------------------------------\n// The remainder of the module is a MinHeap implementation. Try not to put any\n// logic below here unless it's related to the heap algorithm. We can extract\n// this to a separate module if/when we need multiple kinds of heaps.\n// -----------------------------------------------------------------------------\n\nfunction compareQueuePriority(a: PrefetchTask, b: PrefetchTask) {\n  // Since the queue is a MinHeap, this should return a positive number if b is\n  // higher priority than a, and a negative number if a is higher priority\n  // than b.\n\n  // `priority` is an integer, where higher numbers are higher priority.\n  const priorityDiff = b.priority - a.priority\n  if (priorityDiff !== 0) {\n    return priorityDiff\n  }\n\n  // If the priority is the same, check which phase the prefetch is in — is it\n  // prefetching the route tree, or the segments? Route trees are prioritized.\n  const phaseDiff = b.phase - a.phase\n  if (phaseDiff !== 0) {\n    return phaseDiff\n  }\n\n  // Finally, check the insertion order. `sortId` is an incrementing counter\n  // assigned to prefetches. We want to process the newest prefetches first.\n  return b.sortId - a.sortId\n}\n\nfunction heapPush(heap: Array<PrefetchTask>, node: PrefetchTask): void {\n  const index = heap.length\n  heap.push(node)\n  node._heapIndex = index\n  heapSiftUp(heap, node, index)\n}\n\nfunction heapPeek(heap: Array<PrefetchTask>): PrefetchTask | null {\n  return heap.length === 0 ? null : heap[0]\n}\n\nfunction heapPop(heap: Array<PrefetchTask>): PrefetchTask | null {\n  if (heap.length === 0) {\n    return null\n  }\n  const first = heap[0]\n  first._heapIndex = -1\n  const last = heap.pop() as PrefetchTask\n  if (last !== first) {\n    heap[0] = last\n    last._heapIndex = 0\n    heapSiftDown(heap, last, 0)\n  }\n  return first\n}\n\nfunction heapDelete(heap: Array<PrefetchTask>, node: PrefetchTask): void {\n  const index = node._heapIndex\n  if (index !== -1) {\n    node._heapIndex = -1\n    if (heap.length !== 0) {\n      const last = heap.pop() as PrefetchTask\n      if (last !== node) {\n        heap[index] = last\n        last._heapIndex = index\n        heapSiftDown(heap, last, index)\n      }\n    }\n  }\n}\n\nfunction heapResift(heap: Array<PrefetchTask>, node: PrefetchTask): void {\n  const index = node._heapIndex\n  if (index !== -1) {\n    if (index === 0) {\n      heapSiftDown(heap, node, 0)\n    } else {\n      const parentIndex = (index - 1) >>> 1\n      const parent = heap[parentIndex]\n      if (compareQueuePriority(parent, node) > 0) {\n        // The parent is larger. Sift up.\n        heapSiftUp(heap, node, index)\n      } else {\n        // The parent is smaller (or equal). Sift down.\n        heapSiftDown(heap, node, index)\n      }\n    }\n  }\n}\n\nfunction heapSiftUp(\n  heap: Array<PrefetchTask>,\n  node: PrefetchTask,\n  i: number\n): void {\n  let index = i\n  while (index > 0) {\n    const parentIndex = (index - 1) >>> 1\n    const parent = heap[parentIndex]\n    if (compareQueuePriority(parent, node) > 0) {\n      // The parent is larger. Swap positions.\n      heap[parentIndex] = node\n      node._heapIndex = parentIndex\n      heap[index] = parent\n      parent._heapIndex = index\n\n      index = parentIndex\n    } else {\n      // The parent is smaller. Exit.\n      return\n    }\n  }\n}\n\nfunction heapSiftDown(\n  heap: Array<PrefetchTask>,\n  node: PrefetchTask,\n  i: number\n): void {\n  let index = i\n  const length = heap.length\n  const halfLength = length >>> 1\n  while (index < halfLength) {\n    const leftIndex = (index + 1) * 2 - 1\n    const left = heap[leftIndex]\n    const rightIndex = leftIndex + 1\n    const right = heap[rightIndex]\n\n    // If the left or right node is smaller, swap with the smaller of those.\n    if (compareQueuePriority(left, node) < 0) {\n      if (rightIndex < length && compareQueuePriority(right, left) < 0) {\n        heap[index] = right\n        right._heapIndex = index\n        heap[rightIndex] = node\n        node._heapIndex = rightIndex\n\n        index = rightIndex\n      } else {\n        heap[index] = left\n        left._heapIndex = index\n        heap[leftIndex] = node\n        node._heapIndex = leftIndex\n\n        index = leftIndex\n      }\n    } else if (rightIndex < length && compareQueuePriority(right, node) < 0) {\n      heap[index] = right\n      right._heapIndex = index\n      heap[rightIndex] = node\n      node._heapIndex = rightIndex\n\n      index = rightIndex\n    } else {\n      // Neither child is smaller. Exit.\n      return\n    }\n  }\n}\n","/**\n * Shared types and constants for the Segment Cache.\n */\n\nexport const enum NavigationResultTag {\n  MPA,\n  Success,\n  NoOp,\n  Async,\n}\n\n/**\n * The priority of the prefetch task. Higher numbers are higher priority.\n */\nexport const enum PrefetchPriority {\n  /**\n   * Assigned to the most recently hovered/touched link. Special network\n   * bandwidth is reserved for this task only. There's only ever one Intent-\n   * priority task at a time; when a new Intent task is scheduled, the previous\n   * one is bumped down to Default.\n   */\n  Intent = 2,\n  /**\n   * The default priority for prefetch tasks.\n   */\n  Default = 1,\n  /**\n   * Assigned to tasks when they spawn non-blocking background work, like\n   * revalidating a partially cached entry to see if more data is available.\n   */\n  Background = 0,\n}\n\nexport const enum FetchStrategy {\n  // Deliberately ordered so we can easily compare two segments\n  // and determine if one segment is \"more specific\" than another\n  // (i.e. if it's likely that it contains more data)\n  LoadingBoundary = 0,\n  PPR = 1,\n  PPRRuntime = 2,\n  Full = 3,\n}\n\n/**\n * A subset of fetch strategies used for prefetch tasks.\n * A prefetch task can't know if it should use `PPR` or `LoadingBoundary`\n * until we complete the initial tree prefetch request, so we use `PPR` to signal both cases\n * and adjust it based on the route when actually fetching.\n * */\nexport type PrefetchTaskFetchStrategy =\n  | FetchStrategy.PPR\n  | FetchStrategy.PPRRuntime\n  | FetchStrategy.Full\n","import { FetchStrategy } from './types'\nimport type {\n  NormalizedPathname,\n  NormalizedSearch,\n  NormalizedNextUrl,\n} from './cache-key'\nimport type { RouteTree } from './cache'\nimport { Fallback, type FallbackType } from './cache-map'\nimport { HEAD_REQUEST_KEY } from '../../../shared/lib/segment-cache/segment-value-encoding'\n\ntype Opaque<T, K> = T & { __brand: K }\n\n/**\n * A linked-list of all the params (or other param-like) inputs that a cache\n * entry may vary by. This is used by the CacheMap module to reuse cache entries\n * across different param values. If a param has a value of Fallback, it means\n * the cache entry is reusable for all possible values of that param. See\n * cache-map.ts for details.\n *\n * A segment's vary path is a pure function of a segment's position in a\n * particular route tree and the (post-rewrite) URL that is being queried. More\n * concretely, successive queries of the cache for the same segment always use\n * the same vary path.\n *\n * A route's vary path is simpler: it's comprised of the pathname, search\n * string, and Next-URL header.\n */\nexport type VaryPath = {\n  /**\n   * Identifies which param this vary path node corresponds to. Used by\n   * getFulfilledSegmentVaryPath to determine which params to replace with\n   * Fallback based on the varyParams set from the server.\n   *\n   * - For path params: the param name (e.g., 'slug')\n   * - For search params: '?'\n   * - For non-param nodes (request keys, etc.): null\n   */\n  id: string | null\n  value: string | null | FallbackType\n  parent: VaryPath | null\n}\n\n// Because it's so important for vary paths to line up across cache accesses,\n// we use opaque type aliases to ensure these are only created within\n// this module.\n\n// requestKey -> searchParams -> nextUrl\nexport type RouteVaryPath = Opaque<\n  {\n    id: null\n    value: NormalizedPathname\n    parent: {\n      id: '?'\n      value: NormalizedSearch\n      parent: {\n        id: null\n        value: NormalizedNextUrl | null | FallbackType\n        parent: null\n      }\n    }\n  },\n  'RouteVaryPath'\n>\n\n// requestKey -> pathParams\nexport type LayoutVaryPath = Opaque<\n  {\n    id: null\n    value: string\n    parent: PartialSegmentVaryPath | null\n  },\n  'LayoutVaryPath'\n>\n\n// requestKey -> searchParams -> pathParams\nexport type PageVaryPath = Opaque<\n  {\n    id: null\n    value: string\n    parent: {\n      id: '?'\n      value: NormalizedSearch | FallbackType\n      parent: PartialSegmentVaryPath | null\n    }\n  },\n  'PageVaryPath'\n>\n\nexport type SegmentVaryPath = LayoutVaryPath | PageVaryPath\n\n// Intermediate type used when building a vary path during a recursive traversal\n// of the route tree.\nexport type PartialSegmentVaryPath = Opaque<VaryPath, 'PartialSegmentVaryPath'>\n\nexport function getRouteVaryPath(\n  pathname: NormalizedPathname,\n  search: NormalizedSearch,\n  nextUrl: NormalizedNextUrl | null\n): RouteVaryPath {\n  // requestKey -> searchParams -> nextUrl\n  const varyPath: VaryPath = {\n    id: null,\n    value: pathname,\n    parent: {\n      id: '?',\n      value: search,\n      parent: {\n        id: null,\n        value: nextUrl,\n        parent: null,\n      },\n    },\n  }\n  return varyPath as RouteVaryPath\n}\n\nexport function getFulfilledRouteVaryPath(\n  pathname: NormalizedPathname,\n  search: NormalizedSearch,\n  nextUrl: NormalizedNextUrl | null,\n  couldBeIntercepted: boolean\n): RouteVaryPath {\n  // This is called when a route's data is fulfilled. The cache entry will be\n  // re-keyed based on which inputs the response varies by.\n  // requestKey -> searchParams -> nextUrl\n  const varyPath: VaryPath = {\n    id: null,\n    value: pathname,\n    parent: {\n      id: '?',\n      value: search,\n      parent: {\n        id: null,\n        value: couldBeIntercepted ? nextUrl : Fallback,\n        parent: null,\n      },\n    },\n  }\n  return varyPath as RouteVaryPath\n}\n\nexport function appendLayoutVaryPath(\n  parentPath: PartialSegmentVaryPath | null,\n  cacheKey: string,\n  paramName: string\n): PartialSegmentVaryPath {\n  const varyPathPart: VaryPath = {\n    id: paramName,\n    value: cacheKey,\n    parent: parentPath,\n  }\n  return varyPathPart as PartialSegmentVaryPath\n}\n\nexport function finalizeLayoutVaryPath(\n  requestKey: string,\n  varyPath: PartialSegmentVaryPath | null\n): LayoutVaryPath {\n  const layoutVaryPath: VaryPath = {\n    id: null,\n    value: requestKey,\n    parent: varyPath,\n  }\n  return layoutVaryPath as LayoutVaryPath\n}\n\nexport function getPartialLayoutVaryPath(\n  finalizedVaryPath: LayoutVaryPath\n): PartialSegmentVaryPath | null {\n  // This is the inverse of finalizeLayoutVaryPath.\n  return finalizedVaryPath.parent\n}\n\nexport function finalizePageVaryPath(\n  requestKey: string,\n  renderedSearch: NormalizedSearch,\n  varyPath: PartialSegmentVaryPath | null\n): PageVaryPath {\n  // Unlike layouts, a page segment's vary path also includes the search string.\n  // requestKey -> searchParams -> pathParams\n  const pageVaryPath: VaryPath = {\n    id: null,\n    value: requestKey,\n    parent: {\n      id: '?',\n      value: renderedSearch,\n      parent: varyPath,\n    },\n  }\n  return pageVaryPath as PageVaryPath\n}\n\nexport function getPartialPageVaryPath(\n  finalizedVaryPath: PageVaryPath\n): PartialSegmentVaryPath | null {\n  // This is the inverse of finalizePageVaryPath.\n  return finalizedVaryPath.parent.parent\n}\n\nexport function finalizeMetadataVaryPath(\n  pageRequestKey: string,\n  renderedSearch: NormalizedSearch,\n  varyPath: PartialSegmentVaryPath | null\n): PageVaryPath {\n  // The metadata \"segment\" is not a real segment because it doesn't exist in\n  // the normal structure of the route tree, but in terms of caching, it\n  // behaves like a page segment because it varies by all the same params as\n  // a page.\n  //\n  // To keep the protocol for querying the server simple, the request key for\n  // the metadata does not include any path information. It's unnecessary from\n  // the server's perspective, because unlike page segments, there's only one\n  // metadata response per URL, i.e. there's no need to distinguish multiple\n  // parallel pages.\n  //\n  // However, this means the metadata request key is insufficient for\n  // caching the the metadata in the client cache, because on the client we\n  // use the request key to distinguish the metadata entry from all other\n  // page's metadata entries.\n  //\n  // So instead we create a simulated request key based on the page segment.\n  // Conceptually this is equivalent to the request key the server would have\n  // assigned the metadata segment if it treated it as part of the actual\n  // route structure.\n\n  // If there are multiple parallel pages, we use whichever is the first one.\n  // This is fine because the only difference between request keys for\n  // different parallel pages are things like route groups and parallel\n  // route slots. As long as it's always the same one, it doesn't matter.\n  const pageVaryPath: VaryPath = {\n    id: null,\n    // Append the actual metadata request key to the page request key. Note\n    // that we're not using a separate vary path part; it's unnecessary because\n    // these are not conceptually separate inputs.\n    value: pageRequestKey + HEAD_REQUEST_KEY,\n    parent: {\n      id: '?',\n      value: renderedSearch,\n      parent: varyPath,\n    },\n  }\n  return pageVaryPath as PageVaryPath\n}\n\nexport function getSegmentVaryPathForRequest(\n  fetchStrategy: FetchStrategy,\n  tree: RouteTree\n): SegmentVaryPath {\n  // This is used for storing pending requests in the cache. We want to choose\n  // the most generic vary path based on the strategy used to fetch it, i.e.\n  // static/PPR versus runtime prefetching, so that it can be reused as much\n  // as possible.\n  //\n  // We may be able to re-key the response to something even more generic once\n  // we receive it — for example, if the server tells us that the response\n  // doesn't vary on a particular param — but even before we send the request,\n  // we know some params are reusable based on the fetch strategy alone. For\n  // example, a static prefetch will never vary on search params.\n  //\n  // The original vary path with all the params filled in is stored on the\n  // route tree object. We will clone this one to create a new vary path\n  // where certain params are replaced with Fallback.\n  //\n  // This result of this function is not stored anywhere. It's only used to\n  // access the cache a single time.\n  //\n  // TODO: Rather than create a new list object just to access the cache, the\n  // plan is to add the concept of a \"vary mask\". This will represent all the\n  // params that can be treated as Fallback. (Or perhaps the inverse.)\n  const originalVaryPath = tree.varyPath\n\n  // Only page segments (and the special \"metadata\" segment, which is treated\n  // like a page segment for the purposes of caching) may contain search\n  // params. There's no reason to include them in the vary path otherwise.\n  if (tree.isPage) {\n    // Only a runtime prefetch will include search params in the vary path.\n    // Static prefetches never include search params, so they can be reused\n    // across all possible search param values.\n    const doesVaryOnSearchParams =\n      fetchStrategy === FetchStrategy.Full ||\n      fetchStrategy === FetchStrategy.PPRRuntime\n\n    if (!doesVaryOnSearchParams) {\n      // The response from the the server will not vary on search params. Clone\n      // the end of the original vary path to replace the search params\n      // with Fallback.\n      //\n      // requestKey -> searchParams -> pathParams\n      //               ^ This part gets replaced with Fallback\n      const searchParamsVaryPath = (originalVaryPath as PageVaryPath).parent\n      const pathParamsVaryPath = searchParamsVaryPath.parent\n      const patchedVaryPath: VaryPath = {\n        id: null,\n        value: originalVaryPath.value,\n        parent: {\n          id: '?',\n          value: Fallback,\n          parent: pathParamsVaryPath,\n        },\n      }\n      return patchedVaryPath as SegmentVaryPath\n    }\n  }\n\n  // The request does vary on search params. We don't need to modify anything.\n  return originalVaryPath as SegmentVaryPath\n}\n\nexport function clonePageVaryPathWithNewSearchParams(\n  originalVaryPath: PageVaryPath,\n  newSearch: NormalizedSearch\n): PageVaryPath {\n  // requestKey -> searchParams -> pathParams\n  //               ^ This part gets replaced with newSearch\n  const searchParamsVaryPath = originalVaryPath.parent\n  const clonedVaryPath: VaryPath = {\n    id: null,\n    value: originalVaryPath.value,\n    parent: {\n      id: '?',\n      value: newSearch,\n      parent: searchParamsVaryPath.parent,\n    },\n  }\n  return clonedVaryPath as PageVaryPath\n}\n\nexport function getRenderedSearchFromVaryPath(\n  varyPath: PageVaryPath\n): NormalizedSearch | null {\n  const searchParams = varyPath.parent.value\n  return typeof searchParams === 'string'\n    ? (searchParams as NormalizedSearch)\n    : null\n}\n\nexport function getFulfilledSegmentVaryPath(\n  original: VaryPath,\n  varyParams: Set<string>\n): SegmentVaryPath {\n  // Re-keys a segment's vary path based on which params the segment actually\n  // depends on. Params that are NOT in the varyParams set are replaced with\n  // Fallback, allowing the cache entry to be reused across different values of\n  // those params.\n\n  // This is called when a segment is fulfilled with data from the server. The\n  // varyParams set comes from the server and indicates which params were\n  // accessed during rendering.\n  const clone: VaryPath = {\n    id: original.id,\n    // If the id is null, this node is not a param (e.g., it's a request key).\n    // If the id is in the varyParams set, keep the original value.\n    // Otherwise, replace with Fallback to make it reusable.\n    value:\n      original.id === null || varyParams.has(original.id)\n        ? original.value\n        : Fallback,\n    parent:\n      original.parent === null\n        ? null\n        : getFulfilledSegmentVaryPath(original.parent, varyParams),\n  }\n  return clone as SegmentVaryPath\n}\n","const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'\n\nexport class StaticGenBailoutError extends Error {\n  public readonly code = NEXT_STATIC_GEN_BAILOUT\n}\n\nexport function isStaticGenBailoutError(\n  error: unknown\n): error is StaticGenBailoutError {\n  if (typeof error !== 'object' || error === null || !('code' in error)) {\n    return false\n  }\n\n  return error.code === NEXT_STATIC_GEN_BAILOUT\n}\n","export class UnrecognizedActionError extends Error {\n  constructor(...args: ConstructorParameters<typeof Error>) {\n    super(...args)\n    this.name = 'UnrecognizedActionError'\n  }\n}\n\n/**\n * Check whether a server action call failed because the server action was not recognized by the server.\n * This can happen if the client and the server are not from the same deployment.\n *\n * Example usage:\n * ```ts\n * try {\n *   await myServerAction();\n * } catch (err) {\n *   if (unstable_isUnrecognizedActionError(err)) {\n *     // The client is from a different deployment than the server.\n *     // Reloading the page will fix this mismatch.\n *     window.alert(\"Please refresh the page and try again\");\n *     return;\n *   }\n * }\n * ```\n * */\nexport function unstable_isUnrecognizedActionError(\n  error: unknown\n): error is UnrecognizedActionError {\n  return !!(\n    error &&\n    typeof error === 'object' &&\n    error instanceof UnrecognizedActionError\n  )\n}\n","import { isHangingPromiseRejectionError } from '../../server/dynamic-rendering-utils'\nimport { isPostpone } from '../../server/lib/router-utils/is-postpone'\nimport { isBailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { isNextRouterError } from './is-next-router-error'\nimport {\n  isDynamicPostpone,\n  isPrerenderInterruptedError,\n} from '../../server/app-render/dynamic-rendering'\nimport { isDynamicServerError } from './hooks-server-context'\n\nexport function unstable_rethrow(error: unknown): void {\n  if (\n    isNextRouterError(error) ||\n    isBailoutToCSRError(error) ||\n    isDynamicServerError(error) ||\n    isDynamicPostpone(error) ||\n    isPostpone(error) ||\n    isHangingPromiseRejectionError(error) ||\n    isPrerenderInterruptedError(error)\n  ) {\n    throw error\n  }\n\n  if (error instanceof Error && 'cause' in error) {\n    unstable_rethrow(error.cause)\n  }\n}\n","import type { Dispatch } from 'react'\nimport React, { use, useMemo, useOptimistic } from 'react'\nimport { isThenable } from '../../shared/lib/is-thenable'\nimport type { AppRouterActionQueue } from './app-router-instance'\nimport {\n  ACTION_REFRESH,\n  type AppRouterState,\n  type ReducerActions,\n  type ReducerState,\n} from './router-reducer/router-reducer-types'\n\n// The app router state lives outside of React, so we can import the dispatch\n// method directly wherever we need it, rather than passing it around via props\n// or context.\nlet dispatch: Dispatch<ReducerActions> | null = null\n\n/**\n * Called when the instant navigation test lock is released. If the router\n * is initialized, dispatches a soft refresh to fetch dynamic data. If not\n * (e.g. the lock was released before hydration finished), falls back to a\n * hard reload.\n */\nexport function refreshOnInstantNavigationUnlock() {\n  if (process.env.__NEXT_EXPOSE_TESTING_API) {\n    if (dispatch !== null) {\n      dispatch({ type: ACTION_REFRESH, bypassCacheInvalidation: true })\n    } else {\n      window.location.reload()\n    }\n  }\n}\n\nexport function dispatchAppRouterAction(action: ReducerActions) {\n  if (dispatch === null) {\n    throw new Error(\n      'Internal Next.js error: Router action dispatched before initialization.'\n    )\n  }\n  dispatch(action)\n}\n\n// Optimistic state setter for experimental_gesturePush. Only should be used\n// during a gesture transition.\nlet setGestureRouterState: ((state: ReducerState) => void) | null = null\n\nexport function dispatchGestureState(state: ReducerState) {\n  if (setGestureRouterState === null) {\n    throw new Error(\n      'Internal Next.js error: Router action dispatched before initialization.'\n    )\n  }\n  setGestureRouterState(state)\n}\n\nconst __DEV__ = process.env.NODE_ENV !== 'production'\nconst promisesWithDebugInfo: WeakMap<\n  Promise<AppRouterState>,\n  Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n> = __DEV__ ? new WeakMap() : (null as any)\n\nexport function useActionQueue(\n  actionQueue: AppRouterActionQueue\n): AppRouterState {\n  const [canonicalState, setState] = React.useState<ReducerState>(\n    actionQueue.state\n  )\n\n  // Wrap the canonical state in useOptimistic to support\n  // experimental_gesturePush. During a gesture transition, this returns a fork\n  // of the router state that represents the eventual target if/when the gesture\n  // completes. Otherwise it returns the canonical state.\n  const [state, setGesture] = useOptimistic(canonicalState)\n  if (typeof window !== 'undefined') {\n    setGestureRouterState = setGesture\n  }\n\n  // Because of a known issue that requires to decode Flight streams inside the\n  // render phase, we have to be a bit clever and assign the dispatch method to\n  // a module-level variable upon initialization. The useState hook in this\n  // module only exists to synchronize state that lives outside of React.\n  // Ideally, what we'd do instead is pass the state as a prop to root.render;\n  // this is conceptually how we're modeling the app router state, despite the\n  // weird implementation details.\n  let nextDispatch: Dispatch<ReducerActions>\n\n  if (process.env.NODE_ENV !== 'production') {\n    const { useAppDevRenderingIndicator } =\n      require('../../next-devtools/userspace/use-app-dev-rendering-indicator') as typeof import('../../next-devtools/userspace/use-app-dev-rendering-indicator')\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    const appDevRenderingIndicator = useAppDevRenderingIndicator()\n\n    nextDispatch = (action: ReducerActions) => {\n      appDevRenderingIndicator(() => {\n        actionQueue.dispatch(action, setState)\n      })\n    }\n  } else {\n    nextDispatch = (action: ReducerActions) =>\n      actionQueue.dispatch(action, setState)\n  }\n\n  if (typeof window !== 'undefined') {\n    dispatch = nextDispatch\n  }\n\n  // When navigating to a non-prefetched route, then App Router state will be\n  // blocked until the server responds. We need to transfer the `_debugInfo`\n  // from the underlying Flight response onto the top-level promise that is\n  // passed to React (via `use`) so that the latency is accurately represented\n  // in the React DevTools.\n  const stateWithDebugInfo = useMemo(() => {\n    if (!__DEV__) {\n      return state\n    }\n\n    if (isThenable(state)) {\n      // useMemo can't be used to cache a Promise since the memoized value is thrown\n      // away when we suspend. So we use a WeakMap to cache the Promise with debug info.\n      let promiseWithDebugInfo = promisesWithDebugInfo.get(state)\n      if (promiseWithDebugInfo === undefined) {\n        const debugInfo: Array<unknown> = []\n        promiseWithDebugInfo = Promise.resolve(state).then((asyncState) => {\n          if (asyncState.debugInfo !== null) {\n            debugInfo.push(...asyncState.debugInfo)\n          }\n          return asyncState\n        }) as Promise<AppRouterState> & { _debugInfo?: Array<unknown> }\n        promiseWithDebugInfo._debugInfo = debugInfo\n\n        promisesWithDebugInfo.set(state, promiseWithDebugInfo)\n      }\n\n      return promiseWithDebugInfo\n    }\n    return state\n  }, [state])\n\n  return isThenable(stateWithDebugInfo)\n    ? use(stateWithDebugInfo)\n    : stateWithDebugInfo\n}\n","import { NEXT_REQUEST_ID_HEADER } from '../components/app-router-headers'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nexport interface DebugChannelReadableWriterPair {\n  readonly readable: ReadableStream<Uint8Array>\n  readonly writer: WritableStreamDefaultWriter<Uint8Array>\n}\n\nconst pairs = new Map<string, DebugChannelReadableWriterPair>()\n\nexport function getOrCreateDebugChannelReadableWriterPair(\n  requestId: string\n): DebugChannelReadableWriterPair {\n  let pair = pairs.get(requestId)\n\n  if (!pair) {\n    const { readable, writable } = new TransformStream<Uint8Array, Uint8Array>()\n    pair = { readable, writer: writable.getWriter() }\n    pairs.set(requestId, pair)\n    pair.writer.closed.finally(() => pairs.delete(requestId))\n  }\n\n  return pair\n}\n\nexport function createDebugChannel(\n  requestHeaders: Record<string, string> | undefined\n): {\n  writable?: WritableStream\n  readable?: ReadableStream\n} {\n  let requestId: string | undefined\n\n  if (requestHeaders) {\n    requestId = requestHeaders[NEXT_REQUEST_ID_HEADER] ?? undefined\n\n    if (!requestId) {\n      throw new InvariantError(\n        `Expected a ${JSON.stringify(NEXT_REQUEST_ID_HEADER)} request header.`\n      )\n    }\n  } else {\n    requestId = self.__next_r\n\n    if (!requestId) {\n      throw new InvariantError(\n        `Expected a request ID to be defined for the document via self.__next_r.`\n      )\n    }\n  }\n\n  const { readable } = getOrCreateDebugChannelReadableWriterPair(requestId)\n\n  return { readable }\n}\n","import type { IncomingMessage, ServerResponse } from 'http'\nimport type { UrlObject } from 'url'\nimport type { Duplex } from 'stream'\nimport type { webpack } from 'next/dist/compiled/webpack/webpack'\nimport type getBaseWebpackConfig from '../../build/webpack-config'\nimport type { RouteDefinition } from '../route-definitions/route-definition'\nimport type { Project, Update as TurbopackUpdate } from '../../build/swc/types'\nimport type { VersionInfo } from './parse-version-info'\nimport type { DebugInfo } from '../../next-devtools/shared/types'\nimport type { DevIndicatorServerState } from './dev-indicator-server-state'\nimport type {\n  CacheIndicatorState,\n  ServerCacheStatus,\n} from '../../next-devtools/dev-overlay/cache-indicator'\nimport type { DevToolsConfig } from '../../next-devtools/dev-overlay/shared'\nimport type { ReactDebugChannelForBrowser } from './debug-channel'\n\nexport const enum HMR_MESSAGE_SENT_TO_BROWSER {\n  // JSON messages:\n  ADDED_PAGE = 'addedPage',\n  REMOVED_PAGE = 'removedPage',\n  RELOAD_PAGE = 'reloadPage',\n  SERVER_COMPONENT_CHANGES = 'serverComponentChanges',\n  MIDDLEWARE_CHANGES = 'middlewareChanges',\n  CLIENT_CHANGES = 'clientChanges',\n  SERVER_ONLY_CHANGES = 'serverOnlyChanges',\n  SYNC = 'sync',\n  BUILT = 'built',\n  BUILDING = 'building',\n  DEV_PAGES_MANIFEST_UPDATE = 'devPagesManifestUpdate',\n  TURBOPACK_MESSAGE = 'turbopack-message',\n  SERVER_ERROR = 'serverError',\n  TURBOPACK_CONNECTED = 'turbopack-connected',\n  ISR_MANIFEST = 'isrManifest',\n  CACHE_INDICATOR = 'cacheIndicator',\n  DEV_INDICATOR = 'devIndicator',\n  DEVTOOLS_CONFIG = 'devtoolsConfig',\n  REQUEST_CURRENT_ERROR_STATE = 'requestCurrentErrorState',\n  REQUEST_PAGE_METADATA = 'requestPageMetadata',\n\n  // Binary messages:\n  REACT_DEBUG_CHUNK = 0,\n  ERRORS_TO_SHOW_IN_BROWSER = 1,\n}\n\nexport const enum HMR_MESSAGE_SENT_TO_SERVER {\n  // JSON messages:\n  MCP_ERROR_STATE_RESPONSE = 'mcp-error-state-response',\n  MCP_PAGE_METADATA_RESPONSE = 'mcp-page-metadata-response',\n  PING = 'ping',\n}\n\nexport interface ServerErrorMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.SERVER_ERROR\n  errorJSON: string\n}\n\nexport interface TurbopackMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_MESSAGE\n  data: TurbopackUpdate | TurbopackUpdate[]\n}\n\nexport interface BuildingMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.BUILDING\n}\n\nexport interface CompilationError {\n  moduleName?: string\n  message: string\n  details?: string\n  moduleTrace?: Array<{ moduleName?: string }>\n  stack?: string\n}\n\nexport interface SyncMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.SYNC\n  hash: string\n  errors: ReadonlyArray<CompilationError>\n  warnings: ReadonlyArray<CompilationError>\n  versionInfo: VersionInfo\n  updatedModules?: ReadonlyArray<string>\n  debug?: DebugInfo\n  devIndicator: DevIndicatorServerState\n  devToolsConfig?: DevToolsConfig\n}\n\nexport interface BuiltMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.BUILT\n  hash: string\n  errors: ReadonlyArray<CompilationError>\n  warnings: ReadonlyArray<CompilationError>\n  updatedModules?: ReadonlyArray<string>\n}\n\nexport interface AddedPageMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.ADDED_PAGE\n  data: [page: string | null]\n}\n\nexport interface RemovedPageMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.REMOVED_PAGE\n  data: [page: string | null]\n}\n\nexport interface ReloadPageMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.RELOAD_PAGE\n  data: string\n}\n\nexport interface ServerComponentChangesMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.SERVER_COMPONENT_CHANGES\n  hash: string\n}\n\nexport interface MiddlewareChangesMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.MIDDLEWARE_CHANGES\n}\n\nexport interface ClientChangesMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.CLIENT_CHANGES\n}\n\nexport interface ServerOnlyChangesMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.SERVER_ONLY_CHANGES\n  pages: ReadonlyArray<string>\n}\n\nexport interface DevPagesManifestUpdateMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.DEV_PAGES_MANIFEST_UPDATE\n  data: [\n    {\n      devPagesManifest: true\n    },\n  ]\n}\n\nexport interface TurbopackConnectedMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_CONNECTED\n  data: { sessionId: number }\n}\n\nexport interface AppIsrManifestMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.ISR_MANIFEST\n  data: Record<string, boolean>\n}\n\nexport interface DevToolsConfigMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.DEVTOOLS_CONFIG\n  data: DevToolsConfig\n}\n\nexport interface ReactDebugChunkMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.REACT_DEBUG_CHUNK\n  requestId: string\n  /**\n   * A null chunk signals to the browser that no more chunks will be sent.\n   */\n  chunk: Uint8Array | null\n}\n\nexport interface ErrorsToShowInBrowserMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.ERRORS_TO_SHOW_IN_BROWSER\n  serializedErrors: Uint8Array\n}\n\nexport interface RequestCurrentErrorStateMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.REQUEST_CURRENT_ERROR_STATE\n  requestId: string\n}\n\nexport interface RequestPageMetadataMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.REQUEST_PAGE_METADATA\n  requestId: string\n}\n\nexport interface CacheIndicatorMessage {\n  type: HMR_MESSAGE_SENT_TO_BROWSER.CACHE_INDICATOR\n  state: CacheIndicatorState\n}\n\nexport type HmrMessageSentToBrowser =\n  | TurbopackMessage\n  | TurbopackConnectedMessage\n  | BuildingMessage\n  | SyncMessage\n  | BuiltMessage\n  | AddedPageMessage\n  | RemovedPageMessage\n  | ReloadPageMessage\n  | ServerComponentChangesMessage\n  | ClientChangesMessage\n  | MiddlewareChangesMessage\n  | ServerOnlyChangesMessage\n  | DevPagesManifestUpdateMessage\n  | ServerErrorMessage\n  | AppIsrManifestMessage\n  | DevToolsConfigMessage\n  | ErrorsToShowInBrowserMessage\n  | ReactDebugChunkMessage\n  | RequestCurrentErrorStateMessage\n  | RequestPageMetadataMessage\n  | CacheIndicatorMessage\n\nexport type BinaryHmrMessageSentToBrowser = Extract<\n  HmrMessageSentToBrowser,\n  { type: number }\n>\n\nexport type TurbopackMessageSentToBrowser =\n  | {\n      type: HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_MESSAGE\n      data: any\n    }\n  | {\n      type: HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_CONNECTED\n      data: { sessionId: number }\n    }\n\nexport interface NextJsHotReloaderInterface {\n  turbopackProject?: Project\n  activeWebpackConfigs?: Array<Awaited<ReturnType<typeof getBaseWebpackConfig>>>\n  serverStats: webpack.Stats | null\n  edgeServerStats: webpack.Stats | null\n  run(\n    req: IncomingMessage,\n    res: ServerResponse,\n    parsedUrl: UrlObject\n  ): Promise<{ finished?: true }>\n\n  setHmrServerError(error: Error | null): void\n  clearHmrServerError(): void\n  start(): Promise<void>\n  send(action: HmrMessageSentToBrowser): void\n  /**\n   * Send the given action only to legacy clients, i.e. Pages Router clients,\n   * and App Router clients that don't have Cache Components enabled.\n   */\n  sendToLegacyClients(action: HmrMessageSentToBrowser): void\n  setCacheStatus(status: ServerCacheStatus, htmlRequestId: string): void\n  setReactDebugChannel(\n    debugChannel: ReactDebugChannelForBrowser,\n    htmlRequestId: string,\n    requestId: string\n  ): void\n  sendErrorsToBrowser(\n    errorsRscStream: ReadableStream<Uint8Array>,\n    htmlRequestId: string\n  ): void\n  getCompilationErrors(page: string): Promise<any[]>\n  onHMR(\n    req: IncomingMessage,\n    _socket: Duplex,\n    head: Buffer,\n    onUpgrade: (\n      client: { send(data: string): void },\n      context: { isLegacyClient: boolean }\n    ) => void\n  ): void\n  invalidate({\n    reloadAfterInvalidation,\n  }: {\n    reloadAfterInvalidation: boolean\n  }): Promise<void> | void\n  buildFallbackError(): Promise<void>\n  ensurePage({\n    page,\n    clientOnly,\n    appPaths,\n    definition,\n    isApp,\n    url,\n  }: {\n    page: string\n    clientOnly: boolean\n    appPaths?: ReadonlyArray<string> | null\n    isApp?: boolean\n    definition: RouteDefinition | undefined\n    url?: string\n  }): Promise<void>\n  close(): void\n}\n","/**\nMIT License\n\nCopyright (c) 2015-present, Facebook, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\nimport stripAnsi from 'next/dist/compiled/strip-ansi'\n// This file is based on https://github.com/facebook/create-react-app/blob/7b1a32be6ec9f99a6c9a3c66813f3ac09c4736b9/packages/react-dev-utils/formatWebpackMessages.js\n// It's been edited to remove chalk and CRA-specific logic\n\nconst friendlySyntaxErrorLabel = 'Syntax error:'\n\nconst WEBPACK_BREAKING_CHANGE_POLYFILLS =\n  '\\n\\nBREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.'\n\nfunction isLikelyASyntaxError(message: string) {\n  return stripAnsi(message).includes(friendlySyntaxErrorLabel)\n}\n\nlet hadMissingSassError = false\n\n// Cleans up webpack error messages.\nfunction formatMessage(\n  message: any,\n  verbose?: boolean,\n  importTraceNote?: boolean\n) {\n  // TODO: Replace this once webpack 5 is stable\n  if (typeof message === 'object' && message.message) {\n    const filteredModuleTrace =\n      message.moduleTrace &&\n      message.moduleTrace.filter(\n        (trace: any) =>\n          !/next-(middleware|client-pages|route|edge-function)-loader\\.js/.test(\n            trace.originName\n          )\n      )\n\n    let body = message.message\n    const breakingChangeIndex = body.indexOf(WEBPACK_BREAKING_CHANGE_POLYFILLS)\n    if (breakingChangeIndex >= 0) {\n      body = body.slice(0, breakingChangeIndex)\n    }\n\n    // TODO: Rspack currently doesn't populate moduleName correctly in some cases,\n    // fall back to moduleIdentifier as a workaround\n    if (\n      process.env.NEXT_RSPACK &&\n      !message.moduleName &&\n      !message.file &&\n      message.moduleIdentifier\n    ) {\n      const parts = message.moduleIdentifier.split('!')\n      message.moduleName = parts[parts.length - 1]\n    }\n\n    message =\n      (message.moduleName ? stripAnsi(message.moduleName) + '\\n' : '') +\n      (message.file ? stripAnsi(message.file) + '\\n' : '') +\n      body +\n      (message.details && verbose ? '\\n' + message.details : '') +\n      (filteredModuleTrace && filteredModuleTrace.length\n        ? (importTraceNote || '\\n\\nImport trace for requested module:') +\n          filteredModuleTrace\n            .map((trace: any) => `\\n${trace.moduleName}`)\n            .join('')\n        : '') +\n      (message.stack && verbose ? '\\n' + message.stack : '')\n  }\n  let lines = message.split('\\n')\n\n  // Extract loader paths from Webpack-added headers and move them to end.\n  // Original format: \"Module build failed (from ./loaders/foo-loader.js):\"\n  // The header line is removed and the path is appended at the end as:\n  //   \"  (from ./loaders/foo-loader.js)\"\n  // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n  const loaderPaths: string[] = []\n  lines = lines.filter((line: string) => {\n    const match = /Module [A-z ]+\\(from (.+)\\):?\\s*$/.exec(line)\n    if (match) {\n      loaderPaths.push(match[1])\n      return false\n    }\n    return true\n  })\n\n  // Transform parsing error into syntax error\n  // TODO: move this to our ESLint formatter?\n  lines = lines.map((line: string) => {\n    const parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(\n      line\n    )\n    if (!parsingError) {\n      return line\n    }\n    const [, errorLine, errorColumn, errorMessage] = parsingError\n    return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`\n  })\n\n  message = lines.join('\\n')\n  // Smoosh syntax errors (commonly found in CSS)\n  message = message.replace(\n    /SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g,\n    `${friendlySyntaxErrorLabel} $3 ($1:$2)\\n`\n  )\n  // Clean up export errors\n  message = message.replace(\n    /^.*export '(.+?)' was not found in '(.+?)'.*$/gm,\n    `Attempted import error: '$1' is not exported from '$2'.`\n  )\n  message = message.replace(\n    /^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n    `Attempted import error: '$2' does not contain a default export (imported as '$1').`\n  )\n  message = message.replace(\n    /^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n    `Attempted import error: '$1' is not exported from '$3' (imported as '$2').`\n  )\n  lines = message.split('\\n')\n\n  // Remove leading newline\n  if (lines.length > 2 && lines[1].trim() === '') {\n    lines.splice(1, 1)\n  }\n\n  // Cleans up verbose \"module not found\" messages for files and packages.\n  if (lines[1] && lines[1].startsWith('Module not found: ')) {\n    lines = [\n      lines[0],\n      lines[1]\n        .replace('Error: ', '')\n        .replace('Module not found: Cannot find file:', 'Cannot find file:'),\n      ...lines.slice(2),\n    ]\n  }\n\n  // Add helpful message for users trying to use Sass for the first time\n  if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {\n    // ./file.module.scss (<<loader info>>) => ./file.module.scss\n    const firstLine = lines[0].split('!')\n    lines[0] = firstLine[firstLine.length - 1]\n\n    lines[1] =\n      \"To use Next.js' built-in Sass support, you first need to install `sass`.\\n\"\n    lines[1] += 'Run `npm i sass` or `yarn add sass` inside your workspace.\\n'\n    lines[1] += '\\nLearn more: https://nextjs.org/docs/messages/install-sass'\n\n    // dispose of unhelpful stack trace\n    lines = lines.slice(0, 2)\n    hadMissingSassError = true\n  } else if (\n    hadMissingSassError &&\n    message.match(/(sass-loader|resolve-url-loader: CSS error)/)\n  ) {\n    // dispose of unhelpful stack trace following missing sass module\n    lines = []\n  }\n\n  if (!verbose) {\n    message = lines.join('\\n')\n    // Internal stacks are generally useless so we strip them... with the\n    // exception of stacks containing `webpack:` because they're normally\n    // from user code generated by Webpack. For more information see\n    // https://github.com/facebook/create-react-app/pull/1050\n    message = message.replace(\n      /^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm,\n      ''\n    ) // at ... ...:x:y\n    message = message.replace(/^\\s*at\\s<anonymous>(\\n|$)/gm, '') // at <anonymous>\n\n    message = message.replace(\n      /File was processed with these loaders:\\n(.+[\\\\/](next[\\\\/]dist[\\\\/].+|@next[\\\\/]react-refresh-utils[\\\\/]loader)\\.js\\n)*You may need an additional loader to handle the result of these loaders.\\n/g,\n      ''\n    )\n\n    lines = message.split('\\n')\n  }\n\n  // Append loader paths at the end (before any remaining stack trace)\n  if (loaderPaths.length > 0) {\n    for (const loaderPath of loaderPaths) {\n      // Don't show internal Next.js loader paths — they're noise for users\n      if (!/[/\\\\]next[/\\\\]dist[/\\\\]/.test(loaderPath)) {\n        lines.push(`  (from ${loaderPath})`)\n      }\n    }\n  }\n\n  // Remove duplicated newlines\n  lines = (lines as string[]).filter(\n    (line, index, arr) =>\n      index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()\n  )\n\n  // Reassemble the message\n  message = lines.join('\\n')\n  return message.trim()\n}\n\nexport default function formatWebpackMessages(json: any, verbose?: boolean) {\n  const formattedErrors = json.errors.map((message: any) => {\n    const isUnknownNextFontError = message.message.includes(\n      'An error occurred in `next/font`.'\n    )\n    return formatMessage(message, isUnknownNextFontError || verbose)\n  })\n  const formattedWarnings = json.warnings.map((message: any) => {\n    return formatMessage(message, verbose)\n  })\n\n  // Reorder errors to put the most relevant ones first.\n  let reactServerComponentsError = -1\n\n  for (let i = 0; i < formattedErrors.length; i++) {\n    const error = formattedErrors[i]\n    if (error.includes('ReactServerComponentsError')) {\n      reactServerComponentsError = i\n      break\n    }\n  }\n\n  // Move the reactServerComponentsError to the top if it exists\n  if (reactServerComponentsError !== -1) {\n    const error = formattedErrors.splice(reactServerComponentsError, 1)\n    formattedErrors.unshift(error[0])\n  }\n\n  const result = {\n    ...json,\n    errors: formattedErrors,\n    warnings: formattedWarnings,\n  }\n  if (!verbose && result.errors.some(isLikelyASyntaxError)) {\n    // If there are any syntax errors, show just them.\n    result.errors = result.errors.filter(isLikelyASyntaxError)\n    result.warnings = []\n  }\n  return result\n}\n","import type { HmrMessageSentToBrowser } from '../../../server/dev/hot-reloader-types'\n\nexport const REACT_REFRESH_FULL_RELOAD =\n  '[Fast Refresh] performing full reload\\n\\n' +\n  \"Fast Refresh will perform a full reload when you edit a file that's imported by modules outside of the React rendering tree.\\n\" +\n  'You might have a file which exports a React component but also exports a value that is imported by a non-React component file.\\n' +\n  'Consider migrating the non-React component export to a separate file and importing it into both files.\\n\\n' +\n  'It is also possible the parent component of the component you edited is a class component, which disables Fast Refresh.\\n' +\n  'Fast Refresh requires at least one parent function component in your React tree.'\n\nexport const REACT_REFRESH_FULL_RELOAD_FROM_ERROR =\n  '[Fast Refresh] performing full reload because your application had an unrecoverable error'\n\nexport function reportInvalidHmrMessage(\n  message: HmrMessageSentToBrowser | MessageEvent<unknown>,\n  err: unknown\n) {\n  console.warn(\n    '[HMR] Invalid message: ' +\n      JSON.stringify(message) +\n      '\\n' +\n      ((err instanceof Error && err?.stack) || '')\n  )\n}\n","export function getTerminalLoggingConfig():\n  | false\n  | boolean\n  | {\n      depthLimit?: number\n      edgeLimit?: number\n      showSourceLocation?: boolean\n    } {\n  try {\n    return JSON.parse(\n      process.env.__NEXT_BROWSER_DEBUG_INFO_IN_TERMINAL || 'false'\n    )\n  } catch {\n    return false\n  }\n}\n\nexport function getIsTerminalLoggingEnabled(): boolean {\n  const config = getTerminalLoggingConfig()\n  return Boolean(config)\n}\n","// To distinguish from React error.digest, we use a different symbol here to determine if the error is from console.error or unhandled promise rejection.\nconst digestSym = Symbol.for('next.console.error.digest')\n\n// Represent non Error shape unhandled promise rejections or console.error errors.\n// Those errors will be captured and displayed in Error Overlay.\ntype ConsoleError = Error & {\n  [digestSym]: 'NEXT_CONSOLE_ERROR'\n  environmentName: string\n}\n\nexport function createConsoleError(\n  message: string | Error,\n  environmentName?: string | null\n): ConsoleError {\n  const error = (\n    typeof message === 'string' ? new Error(message) : message\n  ) as ConsoleError\n  error[digestSym] = 'NEXT_CONSOLE_ERROR'\n\n  if (environmentName && !error.environmentName) {\n    error.environmentName = environmentName\n  }\n\n  return error\n}\n\nexport const isConsoleError = (error: any): error is ConsoleError => {\n  return error && error[digestSym] === 'NEXT_CONSOLE_ERROR'\n}\n","import React from 'react'\nimport isError from '../../../../lib/is-error'\n\nconst ownerStacks = new WeakMap<Error, string | null>()\n\nexport function getOwnerStack(error: Error): string | null | undefined {\n  return ownerStacks.get(error)\n}\nexport function setOwnerStack(error: Error, stack: string | null) {\n  ownerStacks.set(error, stack)\n}\n\nexport function coerceError(value: unknown): Error {\n  return isError(value) ? value : new Error('' + value)\n}\n\nexport function setOwnerStackIfAvailable(error: Error): void {\n  // React 18 and prod does not have `captureOwnerStack`\n  if ('captureOwnerStack' in React) {\n    const ownerStack = React.captureOwnerStack()\n    // Only set if we captured a valid owner stack, or if none exists yet.\n    // This prevents overwriting a valid owner stack captured earlier\n    // (e.g., in onRecoverableError) with null captured later.\n    if (ownerStack || !ownerStacks.has(error)) {\n      setOwnerStack(error, ownerStack)\n    }\n  }\n}\n\nexport function decorateDevError(thrownValue: unknown) {\n  const error = coerceError(thrownValue)\n  setOwnerStackIfAvailable(error)\n  return error\n}\n","const symbolError = Symbol.for('NextjsError')\n\nexport function getErrorSource(error: Error): 'server' | 'edge-server' | null {\n  return (error as any)[symbolError] || null\n}\n\nexport type ErrorSourceType = 'edge-server' | 'server'\n\nexport function decorateServerError(error: Error, type: ErrorSourceType) {\n  Object.defineProperty(error, symbolError, {\n    writable: false,\n    enumerable: false,\n    configurable: false,\n    value: type,\n  })\n}\n","import { configure } from 'next/dist/compiled/safe-stable-stringify'\nimport { getTerminalLoggingConfig } from './terminal-logging-config'\nimport { UNDEFINED_MARKER } from '../../shared/forward-logs-shared'\n\nconst terminalLoggingConfig = getTerminalLoggingConfig()\n\nconst PROMISE_MARKER = 'Promise {}'\nconst UNAVAILABLE_MARKER = '[Unable to view]'\n\nconst maximumDepth =\n  typeof terminalLoggingConfig === 'object' && terminalLoggingConfig.depthLimit\n    ? terminalLoggingConfig.depthLimit\n    : 5\nconst maximumBreadth =\n  typeof terminalLoggingConfig === 'object' && terminalLoggingConfig.edgeLimit\n    ? terminalLoggingConfig.edgeLimit\n    : 100\n\nexport const safeStringifyWithDepth = configure({\n  maximumDepth,\n  maximumBreadth,\n})\n\n/**\n * allows us to:\n * - revive the undefined log in the server as it would look in the browser\n * - not read/attempt to serialize promises (next will console error if you do that, and will cause this program to infinitely recurse)\n * - if we read a proxy that throws (no way to detect if something is a proxy), explain to the user we can't read this data\n */\nexport function preLogSerializationClone<T>(\n  value: T,\n  seen = new WeakMap()\n): any {\n  if (value === undefined) return UNDEFINED_MARKER\n  if (value === null || typeof value !== 'object') return value\n  if (seen.has(value as object)) return seen.get(value as object)\n\n  try {\n    Object.keys(value as object)\n  } catch {\n    return UNAVAILABLE_MARKER\n  }\n\n  try {\n    if (typeof (value as any).then === 'function') return PROMISE_MARKER\n  } catch {\n    return UNAVAILABLE_MARKER\n  }\n\n  if (Array.isArray(value)) {\n    const out: any[] = []\n    seen.set(value, out)\n    for (const item of value) {\n      try {\n        out.push(preLogSerializationClone(item, seen))\n      } catch {\n        out.push(UNAVAILABLE_MARKER)\n      }\n    }\n    return out\n  }\n\n  const proto = Object.getPrototypeOf(value)\n  if (proto === Object.prototype || proto === null) {\n    const out: Record<string, unknown> = {}\n    seen.set(value as object, out)\n    for (const key of Object.keys(value as object)) {\n      try {\n        out[key] = preLogSerializationClone((value as any)[key], seen)\n      } catch {\n        out[key] = UNAVAILABLE_MARKER\n      }\n    }\n    return out\n  }\n\n  return Object.prototype.toString.call(value)\n}\n\n// only safe if passed safeClone data\nexport const logStringify = (data: unknown): string => {\n  try {\n    const result = safeStringifyWithDepth(data)\n    return result ?? `\"${UNAVAILABLE_MARKER}\"`\n  } catch {\n    return `\"${UNAVAILABLE_MARKER}\"`\n  }\n}\n","import { getErrorSource } from '../../../shared/lib/error-source'\nimport { getIsTerminalLoggingEnabled } from './terminal-logging-config'\nimport {\n  type ConsoleEntry,\n  type ConsoleErrorEntry,\n  type FormattedErrorEntry,\n  type ClientLogEntry,\n  type LogMethod,\n  patchConsoleMethod,\n} from '../../shared/forward-logs-shared'\nimport {\n  preLogSerializationClone,\n  logStringify,\n  safeStringifyWithDepth,\n} from './forward-logs-utils'\nimport { getOwnerStack } from './errors/stitched-error'\n\n// Client-side file logger for browser logs\nclass ClientFileLogger {\n  private logEntries: Array<{\n    timestamp: string\n    level: string // log level\n    message: string // log message\n  }> = []\n\n  private formatTimestamp(): string {\n    const now = new Date()\n    const hours = now.getHours().toString().padStart(2, '0')\n    const minutes = now.getMinutes().toString().padStart(2, '0')\n    const seconds = now.getSeconds().toString().padStart(2, '0')\n    const milliseconds = now.getMilliseconds().toString().padStart(3, '0')\n\n    return `${hours}:${minutes}:${seconds}.${milliseconds}`\n  }\n\n  log(level: string, args: any[]): void {\n    if (isReactServerReplayedLog(args)) {\n      return\n    }\n\n    // Format the args into a message string\n    const message = args\n      .map((arg) => {\n        if (typeof arg === 'string') return arg\n        if (typeof arg === 'number' || typeof arg === 'boolean')\n          return String(arg)\n        if (arg === null) return 'null'\n        if (arg === undefined) return 'undefined'\n        // Handle DOM nodes - only log the tag name to avoid React proxied elements\n        if (arg instanceof Element) {\n          return `<${arg.tagName.toLowerCase()}>`\n        }\n        return safeStringifyWithDepth(arg)\n      })\n      .join(' ')\n\n    const logEntry = {\n      timestamp: this.formatTimestamp(),\n      level: level.toUpperCase(),\n      message,\n    }\n    this.logEntries.push(logEntry)\n\n    // Schedule flush when new log is added\n    scheduleLogFlush()\n  }\n  getLogs(): Array<{ timestamp: string; level: string; message: string }> {\n    return [...this.logEntries]\n  }\n\n  clear(): void {\n    this.logEntries = []\n  }\n}\n\nconst clientFileLogger = new ClientFileLogger()\n\n// Set up flush-based sending of client file logs\nlet logFlushTimeout: NodeJS.Timeout | null = null\nlet heartbeatInterval: NodeJS.Timeout | null = null\n\nconst scheduleLogFlush = () => {\n  if (logFlushTimeout) {\n    clearTimeout(logFlushTimeout)\n  }\n\n  logFlushTimeout = setTimeout(() => {\n    sendClientFileLogs()\n    logFlushTimeout = null\n  }, 100) // Send after 100ms (much faster with debouncing)\n}\n\nconst cancelLogFlush = () => {\n  if (logFlushTimeout) {\n    clearTimeout(logFlushTimeout)\n    logFlushTimeout = null\n  }\n}\n\nconst startHeartbeat = () => {\n  if (heartbeatInterval) return\n\n  heartbeatInterval = setInterval(() => {\n    if (logQueue.socket && logQueue.socket.readyState === WebSocket.OPEN) {\n      try {\n        // Send a ping to keep the connection alive\n        logQueue.socket.send(JSON.stringify({ event: 'ping' }))\n      } catch (error) {\n        // Connection might be closed, stop heartbeat\n        stopHeartbeat()\n      }\n    } else {\n      stopHeartbeat()\n    }\n  }, 5000) // Send ping every 5 seconds\n}\n\nconst stopHeartbeat = () => {\n  if (heartbeatInterval) {\n    clearInterval(heartbeatInterval)\n    heartbeatInterval = null\n  }\n}\n\nconst isTerminalLoggingEnabled = getIsTerminalLoggingEnabled()\n\nconst methods: Array<LogMethod> = [\n  'log',\n  'info',\n  'warn',\n  'debug',\n  'table',\n  'assert',\n  'dir',\n  'dirxml',\n  'group',\n  'groupCollapsed',\n  'groupEnd',\n  'trace',\n]\n\nconst afterThisFrame = (cb: () => void) => {\n  let timeout: ReturnType<typeof setTimeout> | undefined\n\n  const rafId = requestAnimationFrame(() => {\n    timeout = setTimeout(() => {\n      cb()\n    })\n  })\n\n  return () => {\n    cancelAnimationFrame(rafId)\n    clearTimeout(timeout)\n  }\n}\n\nlet isPatched = false\n\nconst serializeEntries = (entries: Array<ClientLogEntry>) =>\n  entries.map((clientEntry) => {\n    switch (clientEntry.kind) {\n      case 'any-logged-error':\n      case 'console': {\n        return {\n          ...clientEntry,\n          args: clientEntry.args.map(stringifyUserArg),\n        }\n      }\n      case 'formatted-error': {\n        return clientEntry\n      }\n      default: {\n        return null!\n      }\n    }\n  })\n\n// Function to send client file logs to server\nconst sendClientFileLogs = () => {\n  if (!logQueue.socket || logQueue.socket.readyState !== WebSocket.OPEN) {\n    return\n  }\n\n  const logs = clientFileLogger.getLogs()\n  if (logs.length === 0) {\n    return\n  }\n\n  try {\n    const payload = JSON.stringify({\n      event: 'client-file-logs',\n      logs: logs,\n    })\n\n    logQueue.socket.send(payload)\n  } catch (error) {\n    console.error(error)\n  } finally {\n    // Clear logs regardless of send success to prevent memory leaks\n    clientFileLogger.clear()\n  }\n}\n\n// Combined state and public API\nexport const logQueue: {\n  entries: Array<ClientLogEntry>\n  onSocketReady: (socket: WebSocket) => void\n  flushScheduled: boolean\n  socket: WebSocket | null\n  cancelFlush: (() => void) | null\n  sourceType?: 'server' | 'edge-server'\n  router: 'app' | 'pages' | null\n  scheduleLogSend: (entry: ClientLogEntry) => void\n} = {\n  entries: [],\n  flushScheduled: false,\n  cancelFlush: null,\n  socket: null,\n  sourceType: undefined,\n  router: null,\n  scheduleLogSend: (entry: ClientLogEntry) => {\n    logQueue.entries.push(entry)\n    if (logQueue.flushScheduled) {\n      return\n    }\n    // safe to deref and use in setTimeout closure since we cancel on new socket\n    const socket = logQueue.socket\n    if (!socket) {\n      return\n    }\n\n    // we probably dont need this\n    logQueue.flushScheduled = true\n\n    // non blocking log flush, runs at most once per frame\n    logQueue.cancelFlush = afterThisFrame(() => {\n      logQueue.flushScheduled = false\n\n      // just incase\n      try {\n        const payload = JSON.stringify({\n          event: 'browser-logs',\n          entries: serializeEntries(logQueue.entries),\n          router: logQueue.router,\n          // needed for source mapping, we just assign the sourceType from the last error for the whole batch\n          sourceType: logQueue.sourceType,\n        })\n\n        socket.send(payload)\n        logQueue.entries = []\n        logQueue.sourceType = undefined\n\n        // Also send client file logs\n        sendClientFileLogs()\n      } catch {\n        // error (make sure u don't infinite loop)\n        /* noop */\n      }\n    })\n  },\n  onSocketReady: (socket: WebSocket) => {\n    // When MCP or terminal logging is enabled, we enable the socket connection,\n    // otherwise it will not proceed.\n    if (!isTerminalLoggingEnabled && !process.env.__NEXT_MCP_SERVER) {\n      return\n    }\n    if (socket.readyState !== WebSocket.OPEN) {\n      // invariant\n      return\n    }\n\n    // incase an existing timeout was going to run with a stale socket\n    logQueue.cancelFlush?.()\n    logQueue.socket = socket\n\n    // Add socket event listeners to track connection state\n    socket.addEventListener('close', () => {\n      cancelLogFlush()\n      stopHeartbeat()\n    })\n\n    // Only send terminal logs if enabled\n    if (isTerminalLoggingEnabled) {\n      try {\n        const payload = JSON.stringify({\n          event: 'browser-logs',\n          entries: serializeEntries(logQueue.entries),\n          router: logQueue.router,\n          sourceType: logQueue.sourceType,\n        })\n\n        socket.send(payload)\n        logQueue.entries = []\n        logQueue.sourceType = undefined\n      } catch {\n        /** noop just incase */\n      }\n    }\n\n    // Always send client file logs when socket is ready\n    sendClientFileLogs()\n\n    // Start heartbeat to keep connection alive\n    startHeartbeat()\n  },\n}\n\nconst stringifyUserArg = (\n  arg:\n    | {\n        kind: 'arg'\n        data: unknown\n      }\n    | {\n        kind: 'formatted-error-arg'\n      }\n) => {\n  if (arg.kind !== 'arg') {\n    return arg\n  }\n  return {\n    ...arg,\n    data: logStringify(arg.data),\n  }\n}\n\nconst createErrorArg = (error: Error) => {\n  return {\n    kind: 'formatted-error-arg' as const,\n    prefix: error.message ? `${error.name}: ${error.message}` : `${error.name}`,\n    stack: getErrorStackWithOwnerStack(error),\n  }\n}\n\nconst createLogEntry = (level: LogMethod, args: any[]) => {\n  // Always log to client file logger with args (formatting done inside log method)\n  clientFileLogger.log(level, args)\n\n  // Only forward to terminal if enabled\n  if (!isTerminalLoggingEnabled) {\n    return\n  }\n\n  // do not abstract this, it implicitly relies on which functions call it. forcing the inlined implementation makes you think about callers\n  // error capture stack trace maybe\n  const stack = getErrorStack(new Error())\n  const stackLines = stack?.split('\\n')\n  const cleanStack = stackLines?.slice(3).join('\\n') // this is probably ignored anyways\n  const entry: ConsoleEntry<unknown> = {\n    kind: 'console',\n    consoleMethodStack: cleanStack ?? null, // depending on browser we might not have stack\n    method: level,\n    args: args.map((arg) => {\n      if (arg instanceof Error) {\n        return createErrorArg(arg)\n      }\n      return {\n        kind: 'arg',\n        data: preLogSerializationClone(arg),\n      }\n    }),\n  }\n\n  logQueue.scheduleLogSend(entry)\n}\n\nexport const forwardErrorLog = (args: any[]) => {\n  // Skip React server replayed logs - they were already logged on the server\n  if (isReactServerReplayedLog(args)) {\n    return\n  }\n\n  // Always log to client file logger with args (formatting done inside log method)\n  clientFileLogger.log('error', args)\n  // Only forward to terminal if enabled\n  if (!isTerminalLoggingEnabled) {\n    return\n  }\n\n  const errorObjects = args.filter((arg) => arg instanceof Error)\n  const first = errorObjects.at(0)\n  if (first) {\n    const source = getErrorSource(first)\n    if (source) {\n      logQueue.sourceType = source\n    }\n  }\n  /**\n   * browser shows stack regardless of type of data passed to console.error, so we should do the same\n   *\n   * do not abstract this, it implicitly relies on which functions call it. forcing the inlined implementation makes you think about callers\n   */\n  const stack = getErrorStack(new Error())\n  const stackLines = stack?.split('\\n')\n  const cleanStack = stackLines?.slice(3).join('\\n')\n\n  const entry: ConsoleErrorEntry<unknown> = {\n    kind: 'any-logged-error',\n    method: 'error',\n    consoleErrorStack: cleanStack ?? '',\n    args: args.map((arg) => {\n      if (arg instanceof Error) {\n        return createErrorArg(arg)\n      }\n      return {\n        kind: 'arg',\n        data: preLogSerializationClone(arg),\n      }\n    }),\n  }\n\n  logQueue.scheduleLogSend(entry)\n}\n\nconst createUncaughtErrorEntry = (\n  errorName: string,\n  errorMessage: string,\n  fullStack: string\n) => {\n  const entry: FormattedErrorEntry = {\n    kind: 'formatted-error',\n    prefix: `Uncaught ${errorName}: ${errorMessage}`,\n    stack: fullStack,\n    method: 'error',\n  }\n\n  logQueue.scheduleLogSend(entry)\n}\n\nconst getErrorStack = (error: Error) => {\n  return error.stack || ''\n}\n\n// Get error stack with owner stack appended for source mapping on the server\nconst getErrorStackWithOwnerStack = (error: Error) => {\n  const errorStack = getErrorStack(error)\n  const ownerStack = getOwnerStack(error)\n  return ownerStack ? `${errorStack}\\n${ownerStack}` : errorStack\n}\n\nexport function logUnhandledRejection(reason: unknown) {\n  // Always log to client file logger\n  const message =\n    reason instanceof Error\n      ? `${reason.name}: ${reason.message}`\n      : JSON.stringify(reason)\n  clientFileLogger.log('error', [`unhandledRejection: ${message}`])\n\n  // Only forward to terminal if enabled\n  if (!isTerminalLoggingEnabled) {\n    return\n  }\n\n  if (reason instanceof Error) {\n    createUnhandledRejectionErrorEntry(\n      reason,\n      getErrorStackWithOwnerStack(reason)\n    )\n    return\n  }\n  createUnhandledRejectionNonErrorEntry(reason)\n}\n\nconst createUnhandledRejectionErrorEntry = (\n  error: Error,\n  fullStack: string\n) => {\n  const source = getErrorSource(error)\n  if (source) {\n    logQueue.sourceType = source\n  }\n\n  const entry: ClientLogEntry = {\n    kind: 'formatted-error',\n    prefix: `⨯ unhandledRejection: ${error.name}: ${error.message}`,\n    stack: fullStack,\n    method: 'error',\n  }\n\n  logQueue.scheduleLogSend(entry)\n}\n\nconst createUnhandledRejectionNonErrorEntry = (reason: unknown) => {\n  const entry: ClientLogEntry = {\n    kind: 'any-logged-error',\n    // we can't access the stack since the event is dispatched async and creating an inline error would be meaningless\n    consoleErrorStack: '',\n    method: 'error',\n    args: [\n      {\n        kind: 'arg',\n        data: `⨯ unhandledRejection:`,\n        isRejectionMessage: true,\n      },\n      {\n        kind: 'arg',\n        data: preLogSerializationClone(reason),\n      },\n    ],\n  }\n\n  logQueue.scheduleLogSend(entry)\n}\n\nconst isHMR = (args: any[]) => {\n  const firstArg = args[0]\n  if (typeof firstArg !== 'string') {\n    return false\n  }\n  if (firstArg.startsWith('[Fast Refresh]')) {\n    return true\n  }\n\n  if (firstArg.startsWith('[HMR]')) {\n    return true\n  }\n\n  return false\n}\n\n/**\n * Matches the format of logs arguments React replayed from the RSC.\n */\nconst isReactServerReplayedLog = (args: any[]) => {\n  if (args.length < 3) {\n    return false\n  }\n\n  const [format, styles, label] = args\n\n  if (\n    typeof format !== 'string' ||\n    typeof styles !== 'string' ||\n    typeof label !== 'string'\n  ) {\n    return false\n  }\n\n  return format.startsWith('%c%s%c') && styles.includes('background:')\n}\n\nexport function forwardUnhandledError(error: Error) {\n  // Always log to client file logger\n  clientFileLogger.log('error', [\n    `uncaughtError: ${error.name}: ${error.message}`,\n  ])\n\n  // Only forward to terminal if enabled\n  if (!isTerminalLoggingEnabled) {\n    return\n  }\n\n  createUncaughtErrorEntry(\n    error.name,\n    error.message,\n    getErrorStackWithOwnerStack(error)\n  )\n}\n\n// TODO: this router check is brittle, we need to update based on the current router the user is using\nexport const initializeDebugLogForwarding = (router: 'app' | 'pages'): void => {\n  // probably don't need this\n  if (isPatched) {\n    return\n  }\n  // TODO(rob): why does this break rendering on server, important to know incase the same bug appears in browser\n  if (typeof window === 'undefined') {\n    return\n  }\n\n  // better to be safe than sorry\n  try {\n    methods.forEach((method) =>\n      patchConsoleMethod(method, (_, ...args) => {\n        if (isHMR(args)) {\n          return\n        }\n        if (isReactServerReplayedLog(args)) {\n          return\n        }\n        createLogEntry(method, args)\n      })\n    )\n  } catch {}\n  logQueue.router = router\n  isPatched = true\n\n  // Cleanup on page unload\n  window.addEventListener('beforeunload', () => {\n    cancelLogFlush()\n    stopHeartbeat()\n    // Send any remaining logs before page unloads\n    sendClientFileLogs()\n  })\n}\n","import { useEffect } from 'react'\nimport { isNextRouterError } from '../../../../client/components/is-next-router-error'\nimport {\n  formatConsoleArgs,\n  parseConsoleArgs,\n} from '../../../../client/lib/console'\nimport isError from '../../../../lib/is-error'\nimport { createConsoleError } from '../../../shared/console-error'\nimport { coerceError, setOwnerStackIfAvailable } from './stitched-error'\nimport { forwardUnhandledError, logUnhandledRejection } from '../forward-logs'\n\nconst queueMicroTask =\n  globalThis.queueMicrotask || ((cb: () => void) => Promise.resolve().then(cb))\n\ntype ErrorHandler = (error: Error) => void\n\nconst errorQueue: Array<Error> = []\nconst errorHandlers: Array<ErrorHandler> = []\nconst rejectionQueue: Array<Error> = []\nconst rejectionHandlers: Array<ErrorHandler> = []\n\nexport function handleConsoleError(\n  originError: unknown,\n  consoleErrorArgs: any[]\n) {\n  let error: Error\n  const { environmentName } = parseConsoleArgs(consoleErrorArgs)\n  if (isError(originError)) {\n    error = createConsoleError(originError, environmentName)\n  } else {\n    error = createConsoleError(\n      formatConsoleArgs(consoleErrorArgs),\n      environmentName\n    )\n  }\n  setOwnerStackIfAvailable(error)\n\n  errorQueue.push(error)\n  for (const handler of errorHandlers) {\n    // Delayed the error being passed to React Dev Overlay,\n    // avoid the state being synchronously updated in the component.\n    queueMicroTask(() => {\n      handler(error)\n    })\n  }\n}\n\nexport function handleClientError(error: Error) {\n  errorQueue.push(error)\n  for (const handler of errorHandlers) {\n    // Delayed the error being passed to React Dev Overlay,\n    // avoid the state being synchronously updated in the component.\n    queueMicroTask(() => {\n      handler(error)\n    })\n  }\n}\n\nexport function useErrorHandler(\n  handleOnUnhandledError: ErrorHandler,\n  handleOnUnhandledRejection: ErrorHandler\n) {\n  useEffect(() => {\n    // Handle queued errors.\n    errorQueue.forEach(handleOnUnhandledError)\n    rejectionQueue.forEach(handleOnUnhandledRejection)\n\n    // Listen to new errors.\n    errorHandlers.push(handleOnUnhandledError)\n    rejectionHandlers.push(handleOnUnhandledRejection)\n\n    return () => {\n      // Remove listeners.\n      errorHandlers.splice(errorHandlers.indexOf(handleOnUnhandledError), 1)\n      rejectionHandlers.splice(\n        rejectionHandlers.indexOf(handleOnUnhandledRejection),\n        1\n      )\n\n      // Reset error queues.\n      errorQueue.splice(0, errorQueue.length)\n      rejectionQueue.splice(0, rejectionQueue.length)\n    }\n  }, [handleOnUnhandledError, handleOnUnhandledRejection])\n}\n\nfunction onUnhandledError(event: WindowEventMap['error']): void | boolean {\n  const thrownValue: unknown = event.error\n  if (isNextRouterError(thrownValue)) {\n    event.preventDefault()\n    return false\n  }\n  // When there's an error property present, we log the error to error overlay.\n  // Otherwise we don't do anything as it's not logging in the console either.\n  if (thrownValue) {\n    const error = coerceError(thrownValue)\n    setOwnerStackIfAvailable(error)\n    handleClientError(error)\n    forwardUnhandledError(error)\n  }\n}\n\nfunction onUnhandledRejection(ev: WindowEventMap['unhandledrejection']): void {\n  const reason: unknown = ev?.reason\n  if (isNextRouterError(reason)) {\n    ev.preventDefault()\n    return\n  }\n\n  const error = coerceError(reason)\n  setOwnerStackIfAvailable(error)\n\n  rejectionQueue.push(error)\n  for (const handler of rejectionHandlers) {\n    handler(error)\n  }\n\n  logUnhandledRejection(reason)\n}\n\nexport function handleGlobalErrors() {\n  if (typeof window !== 'undefined') {\n    try {\n      // Increase the number of stack frames on the client\n      Error.stackTraceLimit = 50\n    } catch {}\n\n    window.addEventListener('error', onUnhandledError)\n    window.addEventListener('unhandledrejection', onUnhandledRejection)\n  }\n}\n","import { useEffect } from 'react'\nimport { handleClientError } from './use-error-handler'\nimport { isNextRouterError } from '../../../../client/components/is-next-router-error'\nimport { MISSING_ROOT_TAGS_ERROR } from '../../../../shared/lib/errors/constants'\n\nfunction readSsrError(): (Error & { digest?: string }) | null {\n  if (typeof document === 'undefined') {\n    return null\n  }\n\n  const ssrErrorTemplateTag = document.querySelector(\n    'template[data-next-error-message]'\n  )\n  if (ssrErrorTemplateTag) {\n    const message: string = ssrErrorTemplateTag.getAttribute(\n      'data-next-error-message'\n    )!\n    const stack = ssrErrorTemplateTag.getAttribute('data-next-error-stack')\n    const digest = ssrErrorTemplateTag.getAttribute('data-next-error-digest')\n    const error = new Error(message)\n    if (digest) {\n      ;(error as any).digest = digest\n    }\n    // Skip Next.js SSR'd internal errors that which will be handled by the error boundaries.\n    if (isNextRouterError(error)) {\n      return null\n    }\n    error.stack = stack || ''\n    return error\n  }\n\n  return null\n}\n\n/**\n * Needs to be in the same error boundary as the shell.\n * If it commits, we know we recovered from an SSR error.\n * If it doesn't commit, we errored again and React will take care of error reporting.\n */\nexport function ReplaySsrOnlyErrors({\n  onBlockingError,\n}: {\n  onBlockingError: () => void\n}) {\n  if (process.env.NODE_ENV !== 'production') {\n    // Need to read during render. The attributes will be gone after commit.\n    const ssrError = readSsrError()\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useEffect(() => {\n      if (ssrError !== null) {\n        // TODO(veil): Include original Owner Stack (NDX-905)\n        // TODO(veil): Mark as recoverable error\n        // TODO(veil): console.error\n        handleClientError(ssrError)\n\n        // If it's missing root tags, we can't recover, make it blocking.\n        if (ssrError.digest === MISSING_ROOT_TAGS_ERROR) {\n          onBlockingError()\n        }\n      }\n    }, [ssrError, onBlockingError])\n  }\n\n  return null\n}\n","export const RuntimeErrorHandler = {\n  hadRuntimeError: false,\n}\n","import React, { PureComponent, startTransition } from 'react'\nimport { dispatcher } from 'next/dist/compiled/next-devtools'\nimport { RuntimeErrorHandler } from '../../../client/dev/runtime-error-handler'\nimport { ErrorBoundary } from '../../../client/components/error-boundary'\nimport DefaultGlobalError from '../../../client/components/builtin/global-error'\nimport type { GlobalErrorState } from '../../../client/components/app-router-instance'\nimport { SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE } from './segment-explorer-node'\nimport {\n  AppRouterContext,\n  type AppRouterInstance,\n} from '../../../shared/lib/app-router-context.shared-runtime'\n\ntype AppDevOverlayErrorBoundaryProps = {\n  children: React.ReactNode\n  globalError: GlobalErrorState\n}\n\ntype AppDevOverlayErrorBoundaryState = {\n  reactError: unknown\n}\n\nfunction ErroredHtml({\n  globalError: [GlobalError, globalErrorStyles],\n  error,\n  reset,\n  unstable_retry,\n}: {\n  globalError: GlobalErrorState\n  error: unknown\n  reset: () => void\n  unstable_retry: () => void\n}) {\n  if (!error) {\n    return (\n      <html>\n        <head />\n        <body />\n      </html>\n    )\n  }\n  return (\n    <ErrorBoundary errorComponent={DefaultGlobalError}>\n      {globalErrorStyles}\n      <GlobalError\n        error={error}\n        reset={reset}\n        unstable_retry={unstable_retry}\n      />\n    </ErrorBoundary>\n  )\n}\n\nexport class AppDevOverlayErrorBoundary extends PureComponent<\n  AppDevOverlayErrorBoundaryProps,\n  AppDevOverlayErrorBoundaryState\n> {\n  static contextType = AppRouterContext\n  declare context: AppRouterInstance | null\n\n  state: AppDevOverlayErrorBoundaryState = {\n    reactError: null,\n  }\n\n  static getDerivedStateFromError(error: Error) {\n    RuntimeErrorHandler.hadRuntimeError = true\n\n    return {\n      reactError: error,\n    }\n  }\n\n  componentDidCatch(err: Error) {\n    if (\n      process.env.NODE_ENV === 'development' &&\n      err.message === SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE\n    ) {\n      return\n    }\n    dispatcher.openErrorOverlay()\n  }\n\n  unstable_retry = () => {\n    startTransition(() => {\n      this.context?.refresh()\n      this.reset()\n    })\n  }\n\n  reset = () => {\n    this.setState({ reactError: null })\n  }\n\n  render() {\n    const { children, globalError } = this.props\n    const { reactError } = this.state\n\n    const fallback = (\n      <ErroredHtml\n        globalError={globalError}\n        error={reactError}\n        reset={this.reset}\n        unstable_retry={this.unstable_retry}\n      />\n    )\n\n    return reactError !== null ? fallback : children\n  }\n}\n","'use client'\n\nimport type { ReactNode } from 'react'\nimport {\n  useState,\n  createContext,\n  useContext,\n  use,\n  useMemo,\n  useCallback,\n} from 'react'\nimport { useLayoutEffect } from 'react'\nimport { dispatcher } from 'next/dist/compiled/next-devtools'\nimport { GlobalLayoutRouterContext } from '../../../shared/lib/app-router-context.shared-runtime'\nimport { notFound } from '../../../client/components/not-found'\n\nexport type SegmentBoundaryType =\n  | 'not-found'\n  | 'error'\n  | 'loading'\n  | 'global-error'\n\nexport const SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE =\n  'NEXT_DEVTOOLS_SIMULATED_ERROR'\n\nexport type SegmentNodeState = {\n  type: string\n  pagePath: string\n  boundaryType: string | null\n  setBoundaryType: (type: SegmentBoundaryType | null) => void\n}\n\nfunction SegmentTrieNode({\n  type,\n  pagePath,\n}: {\n  type: string\n  pagePath: string\n}): React.ReactNode {\n  const { boundaryType, setBoundaryType } = useSegmentState()\n  const nodeState: SegmentNodeState = useMemo(() => {\n    return {\n      type,\n      pagePath,\n      boundaryType,\n      setBoundaryType,\n    }\n  }, [type, pagePath, boundaryType, setBoundaryType])\n\n  // Use `useLayoutEffect` to ensure the state is updated during suspense.\n  // `useEffect` won't work as the state is preserved during suspense.\n  useLayoutEffect(() => {\n    dispatcher.segmentExplorerNodeAdd(nodeState)\n    return () => {\n      dispatcher.segmentExplorerNodeRemove(nodeState)\n    }\n  }, [nodeState])\n\n  return null\n}\n\nfunction NotFoundSegmentNode(): React.ReactNode {\n  notFound()\n}\n\nfunction ErrorSegmentNode(): React.ReactNode {\n  throw new Error(SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE)\n}\n\nconst forever = new Promise(() => {})\nfunction LoadingSegmentNode(): React.ReactNode {\n  use(forever)\n  return null\n}\n\nexport function SegmentViewStateNode({ page }: { page: string }) {\n  const { tree } = useContext(GlobalLayoutRouterContext)\n  useLayoutEffect(() => {\n    dispatcher.segmentExplorerUpdateRouteState(page, tree)\n    return () => {\n      dispatcher.segmentExplorerUpdateRouteState('', null)\n    }\n  }, [page, tree])\n  return null\n}\n\nexport function SegmentBoundaryTriggerNode() {\n  const { boundaryType } = useSegmentState()\n  let segmentNode: React.ReactNode = null\n  if (boundaryType === 'loading') {\n    segmentNode = <LoadingSegmentNode />\n  } else if (boundaryType === 'not-found') {\n    segmentNode = <NotFoundSegmentNode />\n  } else if (boundaryType === 'error') {\n    segmentNode = <ErrorSegmentNode />\n  }\n  return segmentNode\n}\n\nexport function SegmentViewNode({\n  type,\n  pagePath,\n  children,\n}: {\n  type: string\n  pagePath: string\n  children?: ReactNode\n}): React.ReactNode {\n  const segmentNode = (\n    <SegmentTrieNode key={type} type={type} pagePath={pagePath} />\n  )\n\n  return (\n    <>\n      {segmentNode}\n      {children}\n    </>\n  )\n}\n\nconst SegmentStateContext = createContext<{\n  boundaryType: SegmentBoundaryType | null\n  setBoundaryType: (type: SegmentBoundaryType | null) => void\n}>({\n  boundaryType: null,\n  setBoundaryType: () => {},\n})\n\nexport function SegmentStateProvider({ children }: { children: ReactNode }) {\n  const [boundaryType, setBoundaryType] = useState<SegmentBoundaryType | null>(\n    null\n  )\n\n  const [errorBoundaryKey, setErrorBoundaryKey] = useState(0)\n  const reloadBoundary = useCallback(\n    () => setErrorBoundaryKey((prev) => prev + 1),\n    []\n  )\n\n  const setBoundaryTypeAndReload = useCallback(\n    (type: SegmentBoundaryType | null) => {\n      if (type === null) {\n        reloadBoundary()\n      }\n      setBoundaryType(type)\n    },\n    [reloadBoundary]\n  )\n\n  return (\n    <SegmentStateContext.Provider\n      key={errorBoundaryKey}\n      value={{\n        boundaryType,\n        setBoundaryType: setBoundaryTypeAndReload,\n      }}\n    >\n      {children}\n    </SegmentStateContext.Provider>\n  )\n}\n\nexport function useSegmentState() {\n  return useContext(SegmentStateContext)\n}\n","import { useContext, useEffect } from 'react'\nimport { GlobalLayoutRouterContext } from '../../../../shared/lib/app-router-context.shared-runtime'\nimport { getSocketUrl } from '../get-socket-url'\nimport {\n  HMR_MESSAGE_SENT_TO_BROWSER,\n  type HmrMessageSentToBrowser,\n  type TurbopackMessageSentToBrowser,\n} from '../../../../server/dev/hot-reloader-types'\nimport { reportInvalidHmrMessage } from '../shared'\nimport {\n  performFullReload,\n  processMessage,\n  type StaticIndicatorState,\n} from './hot-reloader-app'\nimport { logQueue } from '../../../../next-devtools/userspace/app/forward-logs'\nimport { InvariantError } from '../../../../shared/lib/invariant-error'\nimport { WEB_SOCKET_MAX_RECONNECTIONS } from '../../../../lib/constants'\n\nlet reconnections = 0\nlet reloading = false\nlet serverSessionId: number | null = null\nlet mostRecentCompilationHash: string | null = null\n\nexport function createWebSocket(\n  assetPrefix: string,\n  staticIndicatorState: StaticIndicatorState\n) {\n  if (!self.__next_r) {\n    throw new InvariantError(\n      `Expected a request ID to be defined for the document via self.__next_r.`\n    )\n  }\n\n  let webSocket: WebSocket\n  let timer: ReturnType<typeof setTimeout>\n\n  const sendMessage = (data: string) => {\n    if (webSocket && webSocket.readyState === webSocket.OPEN) {\n      webSocket.send(data)\n    }\n  }\n\n  const processTurbopackMessage = createProcessTurbopackMessage(sendMessage)\n\n  function init() {\n    if (webSocket) {\n      webSocket.close()\n    }\n\n    const newWebSocket = new window.WebSocket(\n      `${getSocketUrl(assetPrefix)}/_next/webpack-hmr?id=${self.__next_r}`\n    )\n\n    newWebSocket.binaryType = 'arraybuffer'\n\n    function handleOnline() {\n      logQueue.onSocketReady(newWebSocket)\n\n      reconnections = 0\n      window.console.log('[HMR] connected')\n    }\n\n    function handleMessage(event: MessageEvent) {\n      // While the page is reloading, don't respond to any more messages.\n      if (reloading) {\n        return\n      }\n\n      try {\n        const message: HmrMessageSentToBrowser =\n          event.data instanceof ArrayBuffer\n            ? parseBinaryMessage(event.data)\n            : JSON.parse(event.data)\n\n        // Check for server restart in Turbopack mode\n        if (message.type === HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_CONNECTED) {\n          if (\n            serverSessionId !== null &&\n            serverSessionId !== message.data.sessionId\n          ) {\n            // Either the server's session id has changed and it's a new server, or\n            // it's been too long since we disconnected and we should reload the page.\n            window.location.reload()\n            reloading = true\n            return\n          }\n          serverSessionId = message.data.sessionId\n        }\n\n        // Track webpack compilation hash for server restart detection\n        if (\n          message.type === HMR_MESSAGE_SENT_TO_BROWSER.SYNC &&\n          'hash' in message\n        ) {\n          // If we had previously reconnected and the hash changed, the server may have restarted\n          if (\n            mostRecentCompilationHash !== null &&\n            mostRecentCompilationHash !== message.hash\n          ) {\n            window.location.reload()\n            reloading = true\n            return\n          }\n          mostRecentCompilationHash = message.hash\n        }\n\n        processMessage(\n          message,\n          sendMessage,\n          processTurbopackMessage,\n          staticIndicatorState\n        )\n      } catch (err: unknown) {\n        reportInvalidHmrMessage(event, err)\n      }\n    }\n\n    function handleDisconnect() {\n      newWebSocket.onerror = null\n      newWebSocket.onclose = null\n      newWebSocket.close()\n      reconnections++\n\n      // After 25 reconnects we'll want to reload the page as it indicates the dev server is no longer running.\n      if (reconnections > WEB_SOCKET_MAX_RECONNECTIONS) {\n        reloading = true\n        window.location.reload()\n        return\n      }\n\n      clearTimeout(timer)\n      // Try again after 5 seconds\n      timer = setTimeout(init, reconnections > 5 ? 5000 : 1000)\n    }\n\n    newWebSocket.onopen = handleOnline\n    newWebSocket.onerror = handleDisconnect\n    newWebSocket.onclose = handleDisconnect\n    newWebSocket.onmessage = handleMessage\n\n    webSocket = newWebSocket\n    return newWebSocket\n  }\n\n  return init()\n}\n\nexport function createProcessTurbopackMessage(\n  sendMessage: (data: string) => void\n): (msg: TurbopackMessageSentToBrowser) => void {\n  if (!process.env.TURBOPACK) {\n    return () => {}\n  }\n\n  let queue: TurbopackMessageSentToBrowser[] = []\n  let callback: ((msg: TurbopackMessageSentToBrowser) => void) | undefined\n\n  const processTurbopackMessage = (msg: TurbopackMessageSentToBrowser) => {\n    if (callback) {\n      callback(msg)\n    } else {\n      queue.push(msg)\n    }\n  }\n\n  import(\n    // @ts-expect-error requires \"moduleResolution\": \"node16\" in tsconfig.json and not .ts extension\n    '@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts'\n  ).then(({ connect }) => {\n    connect({\n      addMessageListener(cb: (msg: TurbopackMessageSentToBrowser) => void) {\n        callback = cb\n\n        // Replay all Turbopack messages before we were able to establish the HMR client.\n        for (const msg of queue) {\n          cb(msg)\n        }\n        queue.length = 0\n      },\n      sendMessage,\n      onUpdateError: (err: unknown) => performFullReload(err, sendMessage),\n    })\n  })\n\n  return processTurbopackMessage\n}\n\nexport function useWebSocketPing(webSocket: WebSocket | undefined) {\n  const { tree } = useContext(GlobalLayoutRouterContext)\n\n  useEffect(() => {\n    if (!webSocket) {\n      throw new InvariantError('Expected webSocket to be defined in dev mode.')\n    }\n\n    // Never send pings when using Turbopack as it's not used.\n    // Pings were originally used to keep track of active routes in on-demand-entries with webpack.\n    if (process.env.TURBOPACK) {\n      return\n    }\n\n    // Taken from on-demand-entries-client.js\n    const interval = setInterval(() => {\n      if (webSocket.readyState === webSocket.OPEN) {\n        webSocket.send(\n          JSON.stringify({\n            event: 'ping',\n            tree,\n            appDirRoute: true,\n          })\n        )\n      }\n    }, 2500)\n    return () => clearInterval(interval)\n  }, [tree, webSocket])\n}\n\nconst textDecoder = new TextDecoder()\n\nfunction parseBinaryMessage(data: ArrayBuffer): HmrMessageSentToBrowser {\n  assertByteLength(data, 1)\n  const view = new DataView(data)\n  const messageType = view.getUint8(0)\n\n  switch (messageType) {\n    case HMR_MESSAGE_SENT_TO_BROWSER.ERRORS_TO_SHOW_IN_BROWSER: {\n      const serializedErrors = new Uint8Array(data, 1)\n\n      return {\n        type: HMR_MESSAGE_SENT_TO_BROWSER.ERRORS_TO_SHOW_IN_BROWSER,\n        serializedErrors,\n      }\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.REACT_DEBUG_CHUNK: {\n      assertByteLength(data, 2)\n      const requestIdLength = view.getUint8(1)\n      assertByteLength(data, 2 + requestIdLength)\n\n      const requestId = textDecoder.decode(\n        new Uint8Array(data, 2, requestIdLength)\n      )\n\n      const chunk =\n        data.byteLength > 2 + requestIdLength\n          ? new Uint8Array(data, 2 + requestIdLength)\n          : null\n\n      return {\n        type: HMR_MESSAGE_SENT_TO_BROWSER.REACT_DEBUG_CHUNK,\n        requestId,\n        chunk,\n      }\n    }\n    default: {\n      throw new InvariantError(\n        `Invalid binary HMR message of type ${messageType}`\n      )\n    }\n  }\n}\n\nfunction assertByteLength(data: ArrayBuffer, expectedLength: number) {\n  if (data.byteLength < expectedLength) {\n    throw new InvariantError(\n      `Invalid binary HMR message: insufficient data (expected ${expectedLength} bytes, got ${data.byteLength})`\n    )\n  }\n}\n","declare global {\n  interface Window {\n    __NEXT_HMR_LATENCY_CB: ((latencyMs: number) => void) | undefined\n  }\n}\n\n/**\n * Logs information about a completed HMR to the console, the server (via a\n * `client-hmr-latency` event), and to `self.__NEXT_HMR_LATENCY_CB` (a debugging\n * hook).\n *\n * @param hasUpdate Set this to `false` to avoid reporting the HMR event via a\n *   `client-hmr-latency` event or to `self.__NEXT_HMR_LATENCY_CB`. Used by\n *   turbopack when we must report a message to the browser console (because we\n *   already logged a \"rebuilding\" message), but it's not a real HMR, so we\n *   don't want to impact our telemetry.\n */\nexport default function reportHmrLatency(\n  sendMessage: (message: string) => void,\n  updatedModules: ReadonlyArray<string | number>,\n  startMsSinceEpoch: number,\n  endMsSinceEpoch: number,\n  hasUpdate: boolean = true\n) {\n  const latencyMs = endMsSinceEpoch - startMsSinceEpoch\n  console.log(`[Fast Refresh] done in ${latencyMs}ms`)\n  if (!hasUpdate) {\n    return\n  }\n  sendMessage(\n    JSON.stringify({\n      event: 'client-hmr-latency',\n      id: window.__nextDevClientId,\n      startTime: startMsSinceEpoch,\n      endTime: endMsSinceEpoch,\n      page: window.location.pathname,\n      updatedModules,\n      // Whether the page (tab) was hidden at the time the event occurred.\n      // This can impact the accuracy of the event's timing.\n      isPageHidden: document.visibilityState === 'hidden',\n    })\n  )\n  if (self.__NEXT_HMR_LATENCY_CB) {\n    self.__NEXT_HMR_LATENCY_CB(latencyMs)\n  }\n}\n","/// <reference types=\"webpack/module.d.ts\" />\n\nimport type { ReactNode } from 'react'\nimport { useEffect, startTransition } from 'react'\nimport stripAnsi from 'next/dist/compiled/strip-ansi'\nimport formatWebpackMessages from '../../../../shared/lib/format-webpack-messages'\nimport {\n  REACT_REFRESH_FULL_RELOAD,\n  REACT_REFRESH_FULL_RELOAD_FROM_ERROR,\n} from '../shared'\nimport {\n  dispatcher,\n  getSerializedOverlayState,\n  getSegmentTrieData,\n} from 'next/dist/compiled/next-devtools'\nimport { ReplaySsrOnlyErrors } from '../../../../next-devtools/userspace/app/errors/replay-ssr-only-errors'\nimport { AppDevOverlayErrorBoundary } from '../../../../next-devtools/userspace/app/app-dev-overlay-error-boundary'\nimport { useErrorHandler } from '../../../../next-devtools/userspace/app/errors/use-error-handler'\nimport { RuntimeErrorHandler } from '../../runtime-error-handler'\nimport { useWebSocketPing } from './web-socket'\nimport {\n  HMR_MESSAGE_SENT_TO_BROWSER,\n  HMR_MESSAGE_SENT_TO_SERVER,\n} from '../../../../server/dev/hot-reloader-types'\nimport type {\n  HmrMessageSentToBrowser,\n  TurbopackMessageSentToBrowser,\n} from '../../../../server/dev/hot-reloader-types'\nimport type { McpErrorStateResponse } from '../../../../shared/lib/mcp-error-types'\nimport type { McpPageMetadataResponse } from '../../../../shared/lib/mcp-page-metadata-types'\nimport { useUntrackedPathname } from '../../../components/navigation-untracked'\nimport reportHmrLatency from '../../report-hmr-latency'\nimport { TurbopackHmr } from '../turbopack-hot-reloader-common'\nimport { NEXT_HMR_REFRESH_HASH_COOKIE } from '../../../components/app-router-headers'\nimport {\n  publicAppRouterInstance,\n  type GlobalErrorState,\n} from '../../../components/app-router-instance'\nimport { InvariantError } from '../../../../shared/lib/invariant-error'\nimport { getOrCreateDebugChannelReadableWriterPair } from '../../debug-channel'\n// TODO: Explicitly import from client.browser (doesn't work with Webpack).\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { createFromReadableStream as createFromReadableStreamBrowser } from 'react-server-dom-webpack/client'\nimport { findSourceMapURL } from '../../../app-find-source-map-url'\n\nexport interface StaticIndicatorState {\n  pathname: string | null\n  appIsrManifest: Record<string, boolean> | null\n}\n\nconst createFromReadableStream =\n  createFromReadableStreamBrowser as (typeof import('react-server-dom-webpack/client.browser'))['createFromReadableStream']\n\nlet mostRecentCompilationHash: any = null\nlet __nextDevClientId = Math.round(Math.random() * 100 + Date.now())\nlet reloading = false\nlet webpackStartMsSinceEpoch: number | null = null\nconst turbopackHmr: TurbopackHmr | null = process.env.TURBOPACK\n  ? new TurbopackHmr()\n  : null\n\nlet pendingHotUpdateWebpack = Promise.resolve()\nlet resolvePendingHotUpdateWebpack: () => void = () => {}\nfunction setPendingHotUpdateWebpack() {\n  pendingHotUpdateWebpack = new Promise((resolve) => {\n    resolvePendingHotUpdateWebpack = () => {\n      resolve()\n    }\n  })\n}\n\nexport function waitForWebpackRuntimeHotUpdate() {\n  return pendingHotUpdateWebpack\n}\n\n// There is a newer version of the code available.\nfunction handleAvailableHash(hash: string) {\n  // Update last known compilation hash.\n  mostRecentCompilationHash = hash\n}\n\n/**\n * Is there a newer version of this code available?\n * For webpack: Check if the hash changed compared to __webpack_hash__\n * For Turbopack: Always true because it doesn't have __webpack_hash__\n */\nfunction isUpdateAvailable() {\n  if (process.env.TURBOPACK) {\n    return true\n  }\n\n  /* globals __webpack_hash__ */\n  // __webpack_hash__ is the hash of the current compilation.\n  // It's a global variable injected by Webpack.\n  return mostRecentCompilationHash !== __webpack_hash__\n}\n\n// Webpack disallows updates in other states.\nfunction canApplyUpdates() {\n  return module.hot.status() === 'idle'\n}\nfunction afterApplyUpdates(fn: any) {\n  if (canApplyUpdates()) {\n    fn()\n  } else {\n    function handler(status: any) {\n      if (status === 'idle') {\n        module.hot.removeStatusHandler(handler)\n        fn()\n      }\n    }\n    module.hot.addStatusHandler(handler)\n  }\n}\n\nexport function performFullReload(\n  err: any,\n  sendMessage: (data: string) => void\n) {\n  const stackTrace =\n    err &&\n    ((err.stack && err.stack.split('\\n').slice(0, 5).join('\\n')) ||\n      err.message ||\n      err + '')\n\n  sendMessage(\n    JSON.stringify({\n      event: 'client-full-reload',\n      stackTrace,\n      hadRuntimeError: !!RuntimeErrorHandler.hadRuntimeError,\n      dependencyChain: err ? err.dependencyChain : undefined,\n    })\n  )\n\n  if (reloading) return\n  reloading = true\n  window.location.reload()\n}\n\n// Attempt to update code on the fly, fall back to a hard reload.\nfunction tryApplyUpdatesWebpack(sendMessage: (message: string) => void) {\n  if (!isUpdateAvailable() || !canApplyUpdates()) {\n    resolvePendingHotUpdateWebpack()\n    dispatcher.onBuildOk()\n    reportHmrLatency(sendMessage, [], webpackStartMsSinceEpoch!, Date.now())\n    return\n  }\n\n  function handleApplyUpdates(\n    err: any,\n    updatedModules: (string | number)[] | null\n  ) {\n    if (err || RuntimeErrorHandler.hadRuntimeError || updatedModules == null) {\n      if (err) {\n        console.warn(REACT_REFRESH_FULL_RELOAD)\n      } else if (RuntimeErrorHandler.hadRuntimeError) {\n        console.warn(REACT_REFRESH_FULL_RELOAD_FROM_ERROR)\n      }\n      performFullReload(err, sendMessage)\n      return\n    }\n\n    dispatcher.onBuildOk()\n\n    if (isUpdateAvailable()) {\n      // While we were updating, there was a new update! Do it again.\n      tryApplyUpdatesWebpack(sendMessage)\n      return\n    }\n\n    dispatcher.onRefresh()\n    resolvePendingHotUpdateWebpack()\n    reportHmrLatency(\n      sendMessage,\n      updatedModules,\n      webpackStartMsSinceEpoch!,\n      Date.now()\n    )\n\n    if (process.env.__NEXT_TEST_MODE) {\n      afterApplyUpdates(() => {\n        if (self.__NEXT_HMR_CB) {\n          self.__NEXT_HMR_CB()\n          self.__NEXT_HMR_CB = null\n        }\n      })\n    }\n  }\n\n  // https://webpack.js.org/api/hot-module-replacement/#check\n  module.hot\n    .check(/* autoApply */ false)\n    .then((updatedModules: (string | number)[] | null) => {\n      if (updatedModules == null) {\n        return null\n      }\n\n      // We should always handle an update, even if updatedModules is empty (but\n      // non-null) for any reason. That's what webpack would normally do:\n      // https://github.com/webpack/webpack/blob/3aa6b6bc3a64/lib/hmr/HotModuleReplacement.runtime.js#L296-L298\n      dispatcher.onBeforeRefresh()\n      // https://webpack.js.org/api/hot-module-replacement/#apply\n      return module.hot.apply()\n    })\n    .then(\n      (updatedModules: (string | number)[] | null) => {\n        handleApplyUpdates(null, updatedModules)\n      },\n      (err: any) => {\n        handleApplyUpdates(err, null)\n      }\n    )\n}\n\n/** Handles messages from the server for the App Router. */\nexport function processMessage(\n  message: HmrMessageSentToBrowser,\n  sendMessage: (message: string) => void,\n  processTurbopackMessage: (msg: TurbopackMessageSentToBrowser) => void,\n  staticIndicatorState: StaticIndicatorState\n) {\n  function handleErrors(errors: ReadonlyArray<unknown>) {\n    // \"Massage\" webpack messages.\n    const formatted = formatWebpackMessages({\n      errors: errors,\n      warnings: [],\n    })\n\n    // Only show the first error.\n    dispatcher.onBuildError(formatted.errors[0])\n\n    // Also log them to the console.\n    for (let i = 0; i < formatted.errors.length; i++) {\n      console.error(stripAnsi(formatted.errors[i]))\n    }\n\n    // Do not attempt to reload now.\n    // We will reload on next success instead.\n    if (process.env.__NEXT_TEST_MODE) {\n      if (self.__NEXT_HMR_CB) {\n        self.__NEXT_HMR_CB(formatted.errors[0])\n        self.__NEXT_HMR_CB = null\n      }\n    }\n  }\n\n  function handleHotUpdate() {\n    if (process.env.TURBOPACK) {\n      const hmrUpdate = turbopackHmr!.onBuilt()\n      if (hmrUpdate != null) {\n        reportHmrLatency(\n          sendMessage,\n          [...hmrUpdate.updatedModules],\n          hmrUpdate.startMsSinceEpoch,\n          hmrUpdate.endMsSinceEpoch,\n          // suppress the `client-hmr-latency` event if the update was a no-op:\n          hmrUpdate.hasUpdates\n        )\n      }\n      dispatcher.onBuildOk()\n    } else {\n      tryApplyUpdatesWebpack(sendMessage)\n    }\n  }\n\n  switch (message.type) {\n    case HMR_MESSAGE_SENT_TO_BROWSER.ISR_MANIFEST: {\n      if (process.env.__NEXT_DEV_INDICATOR) {\n        staticIndicatorState.appIsrManifest = message.data\n\n        // Handle the initial static indicator status on receiving the ISR\n        // manifest. Navigation is handled in an effect inside HotReload for\n        // pathname changes as we'll receive the updated manifest before\n        // usePathname triggers for a new value.\n\n        const isStatic = staticIndicatorState.pathname\n          ? message.data[staticIndicatorState.pathname]\n          : undefined\n\n        dispatcher.onStaticIndicator(\n          isStatic === undefined ? 'pending' : isStatic ? 'static' : 'dynamic'\n        )\n      }\n      break\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.BUILDING: {\n      dispatcher.buildingIndicatorShow()\n\n      if (process.env.TURBOPACK) {\n        turbopackHmr!.onBuilding()\n      } else {\n        webpackStartMsSinceEpoch = Date.now()\n        setPendingHotUpdateWebpack()\n        console.log('[Fast Refresh] rebuilding')\n      }\n      break\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.BUILT:\n    case HMR_MESSAGE_SENT_TO_BROWSER.SYNC: {\n      dispatcher.buildingIndicatorHide()\n\n      if (message.hash) {\n        handleAvailableHash(message.hash)\n      }\n\n      const { errors, warnings } = message\n\n      // Is undefined when it's a 'built' event\n      if ('versionInfo' in message)\n        dispatcher.onVersionInfo(message.versionInfo)\n      if ('debug' in message && message.debug)\n        dispatcher.onDebugInfo(message.debug)\n      if ('devIndicator' in message)\n        dispatcher.onDevIndicator(message.devIndicator)\n      if ('devToolsConfig' in message)\n        dispatcher.onDevToolsConfig(message.devToolsConfig)\n\n      const hasErrors = Boolean(errors && errors.length)\n      // Compilation with errors (e.g. syntax error or missing modules).\n      if (hasErrors) {\n        sendMessage(\n          JSON.stringify({\n            event: 'client-error',\n            errorCount: errors.length,\n            clientId: __nextDevClientId,\n          })\n        )\n\n        handleErrors(errors)\n        return\n      }\n\n      const hasWarnings = Boolean(warnings && warnings.length)\n      if (hasWarnings) {\n        sendMessage(\n          JSON.stringify({\n            event: 'client-warning',\n            warningCount: warnings.length,\n            clientId: __nextDevClientId,\n          })\n        )\n\n        // Print warnings to the console.\n        const formattedMessages = formatWebpackMessages({\n          warnings: warnings,\n          errors: [],\n        })\n\n        for (let i = 0; i < formattedMessages.warnings.length; i++) {\n          if (i === 5) {\n            console.warn(\n              'There were more warnings in other files.\\n' +\n                'You can find a complete log in the terminal.'\n            )\n            break\n          }\n          console.warn(stripAnsi(formattedMessages.warnings[i]))\n        }\n\n        // No early return here as we need to apply modules in the same way between warnings only and compiles without warnings\n      }\n\n      sendMessage(\n        JSON.stringify({\n          event: 'client-success',\n          clientId: __nextDevClientId,\n        })\n      )\n\n      if (message.type === HMR_MESSAGE_SENT_TO_BROWSER.BUILT) {\n        handleHotUpdate()\n      }\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_CONNECTED: {\n      processTurbopackMessage({\n        type: HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_CONNECTED,\n        data: {\n          sessionId: message.data.sessionId,\n        },\n      })\n      break\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_MESSAGE: {\n      turbopackHmr!.onTurbopackMessage(message)\n      dispatcher.onBeforeRefresh()\n      processTurbopackMessage({\n        type: HMR_MESSAGE_SENT_TO_BROWSER.TURBOPACK_MESSAGE,\n        data: message.data,\n      })\n      if (RuntimeErrorHandler.hadRuntimeError) {\n        console.warn(REACT_REFRESH_FULL_RELOAD_FROM_ERROR)\n        performFullReload(null, sendMessage)\n      }\n      dispatcher.onRefresh()\n      break\n    }\n    // TODO-APP: make server component change more granular\n    case HMR_MESSAGE_SENT_TO_BROWSER.SERVER_COMPONENT_CHANGES: {\n      turbopackHmr?.onServerComponentChanges()\n      sendMessage(\n        JSON.stringify({\n          event: 'server-component-reload-page',\n          clientId: __nextDevClientId,\n          hash: message.hash,\n        })\n      )\n\n      // Store the latest hash in a session cookie so that it's sent back to the\n      // server with any subsequent requests.\n      document.cookie = `${NEXT_HMR_REFRESH_HASH_COOKIE}=${message.hash};path=/`\n\n      if (\n        RuntimeErrorHandler.hadRuntimeError ||\n        document.documentElement.id === '__next_error__'\n      ) {\n        if (reloading) return\n        reloading = true\n        return window.location.reload()\n      }\n\n      startTransition(() => {\n        publicAppRouterInstance.hmrRefresh()\n        dispatcher.onRefresh()\n      })\n\n      if (process.env.__NEXT_TEST_MODE) {\n        if (self.__NEXT_HMR_CB) {\n          self.__NEXT_HMR_CB()\n          self.__NEXT_HMR_CB = null\n        }\n      }\n\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.RELOAD_PAGE: {\n      turbopackHmr?.onReloadPage()\n      sendMessage(\n        JSON.stringify({\n          event: 'client-reload-page',\n          clientId: __nextDevClientId,\n        })\n      )\n      if (reloading) return\n      reloading = true\n      return window.location.reload()\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.ADDED_PAGE:\n    case HMR_MESSAGE_SENT_TO_BROWSER.REMOVED_PAGE: {\n      turbopackHmr?.onPageAddRemove()\n      // TODO-APP: potentially only refresh if the currently viewed page was added/removed.\n      return publicAppRouterInstance.hmrRefresh()\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.SERVER_ERROR: {\n      const { errorJSON } = message\n      if (errorJSON) {\n        const errorObject = JSON.parse(errorJSON)\n        const error = new Error(errorObject.message)\n        error.stack = errorObject.stack\n        handleErrors([error])\n      }\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.DEV_PAGES_MANIFEST_UPDATE: {\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.DEVTOOLS_CONFIG: {\n      dispatcher.onDevToolsConfig(message.data)\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.REACT_DEBUG_CHUNK: {\n      const { requestId, chunk } = message\n      const { writer } = getOrCreateDebugChannelReadableWriterPair(requestId)\n\n      if (chunk) {\n        writer.ready.then(() => writer.write(chunk)).catch(console.error)\n      } else {\n        // A null chunk signals that no more chunks will be sent, which allows\n        // us to close the writer.\n        // TODO: Revisit this cleanup logic when we integrate the return channel\n        // that keeps the connection open to be able to lazily retrieve debug\n        // objects.\n        writer.ready.then(() => writer.close()).catch(console.error)\n      }\n\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.REQUEST_CURRENT_ERROR_STATE: {\n      const errorState = getSerializedOverlayState()\n      const response: McpErrorStateResponse = {\n        event: HMR_MESSAGE_SENT_TO_SERVER.MCP_ERROR_STATE_RESPONSE,\n        requestId: message.requestId,\n        errorState,\n        url: window.location.href,\n      }\n      sendMessage(JSON.stringify(response))\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.REQUEST_PAGE_METADATA: {\n      const segmentTrieData = getSegmentTrieData()\n      const response: McpPageMetadataResponse = {\n        event: HMR_MESSAGE_SENT_TO_SERVER.MCP_PAGE_METADATA_RESPONSE,\n        requestId: message.requestId,\n        segmentTrieData,\n        url: window.location.href,\n      }\n      sendMessage(JSON.stringify(response))\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.CACHE_INDICATOR: {\n      dispatcher.onCacheIndicator(message.state)\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.ERRORS_TO_SHOW_IN_BROWSER: {\n      createFromReadableStream<{\n        errors: Error[]\n        errorCodes: Map<Error, string>\n      }>(\n        new ReadableStream({\n          start(controller) {\n            controller.enqueue(message.serializedErrors)\n            controller.close()\n          },\n        }),\n        { findSourceMapURL }\n      ).then(\n        ({ errors, errorCodes }) => {\n          for (const error of errors) {\n            const code = errorCodes.get(error)\n            if (code !== undefined) {\n              Object.defineProperty(error, '__NEXT_ERROR_CODE', {\n                value: code,\n                enumerable: false,\n                configurable: true,\n              })\n            }\n            console.error(error)\n          }\n        },\n        (err) => {\n          console.error(\n            new Error('Failed to deserialize errors.', { cause: err })\n          )\n        }\n      )\n      return\n    }\n    case HMR_MESSAGE_SENT_TO_BROWSER.MIDDLEWARE_CHANGES:\n    case HMR_MESSAGE_SENT_TO_BROWSER.CLIENT_CHANGES:\n    case HMR_MESSAGE_SENT_TO_BROWSER.SERVER_ONLY_CHANGES:\n      // These action types are handled in src/client/page-bootstrap.ts\n      break\n    default: {\n      message satisfies never\n    }\n  }\n}\n\nexport default function HotReload({\n  children,\n  globalError,\n  webSocket,\n  staticIndicatorState,\n}: {\n  children: ReactNode\n  globalError: GlobalErrorState\n  webSocket: WebSocket | undefined\n  staticIndicatorState: StaticIndicatorState | undefined\n}) {\n  useErrorHandler(dispatcher.onUnhandledError, dispatcher.onUnhandledRejection)\n  useWebSocketPing(webSocket)\n\n  // We don't want access of the pathname for the dev tools to trigger a dynamic\n  // access (as the dev overlay will never be present in production).\n  const pathname = useUntrackedPathname()\n\n  if (process.env.__NEXT_DEV_INDICATOR) {\n    // this conditional is only for dead-code elimination which\n    // isn't a runtime conditional only build-time so ignore hooks rule\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useEffect(() => {\n      if (!staticIndicatorState) {\n        throw new InvariantError(\n          'Expected staticIndicatorState to be defined in dev mode.'\n        )\n      }\n\n      staticIndicatorState.pathname = pathname\n\n      if (staticIndicatorState.appIsrManifest) {\n        const isStatic = pathname\n          ? staticIndicatorState.appIsrManifest[pathname]\n          : undefined\n\n        dispatcher.onStaticIndicator(\n          isStatic === undefined ? 'pending' : isStatic ? 'static' : 'dynamic'\n        )\n      }\n    }, [pathname, staticIndicatorState])\n  }\n\n  return (\n    <AppDevOverlayErrorBoundary globalError={globalError}>\n      <ReplaySsrOnlyErrors onBlockingError={dispatcher.openErrorOverlay} />\n      {children}\n    </AppDevOverlayErrorBoundary>\n  )\n}\n","import type {\n  CacheNodeSeedData,\n  FlightData,\n  FlightDataPath,\n  FlightRouterState,\n  FlightSegmentPath,\n  Segment,\n  HeadData,\n  InitialRSCPayload,\n} from '../shared/lib/app-router-types'\nimport { PAGE_SEGMENT_KEY } from '../shared/lib/segment'\nimport type { NormalizedSearch } from './components/segment-cache/cache-key'\nimport {\n  getCacheKeyForDynamicParam,\n  parseDynamicParamFromURLPart,\n  doesStaticSegmentAppearInURL,\n  getRenderedPathname,\n  getRenderedSearch,\n} from './route-params'\nimport { createHrefFromUrl } from './components/router-reducer/create-href-from-url'\n\nexport type NormalizedFlightData = {\n  /**\n   * The full `FlightSegmentPath` inclusive of the final `Segment`\n   */\n  segmentPath: FlightSegmentPath\n  /**\n   * The `FlightSegmentPath` exclusive of the final `Segment`\n   */\n  pathToSegment: FlightSegmentPath\n  segment: Segment\n  tree: FlightRouterState\n  seedData: CacheNodeSeedData | null\n  head: HeadData\n  isHeadPartial: boolean\n  isRootRender: boolean\n}\n\n// TODO: We should only have to export `normalizeFlightData`, however because the initial flight data\n// that gets passed to `createInitialRouterState` doesn't conform to the `FlightDataPath` type (it's missing the root segment)\n// we're currently exporting it so we can use it directly. This should be fixed as part of the unification of\n// the different ways we express `FlightSegmentPath`.\nexport function getFlightDataPartsFromPath(\n  flightDataPath: FlightDataPath\n): NormalizedFlightData {\n  // Pick the last 4 items from the `FlightDataPath` to get the [tree, seedData, viewport, isHeadPartial].\n  const flightDataPathLength = 4\n  // tree, seedData, and head are *always* the last three items in the `FlightDataPath`.\n  const [tree, seedData, head, isHeadPartial] =\n    flightDataPath.slice(-flightDataPathLength)\n  // The `FlightSegmentPath` is everything except the last three items. For a root render, it won't be present.\n  const segmentPath = flightDataPath.slice(0, -flightDataPathLength)\n\n  return {\n    // TODO: Unify these two segment path helpers. We are inconsistently pushing an empty segment (\"\")\n    // to the start of the segment path in some places which makes it hard to use solely the segment path.\n    // Look for \"// TODO-APP: remove ''\" in the codebase.\n    pathToSegment: segmentPath.slice(0, -1),\n    segmentPath,\n    // if the `FlightDataPath` corresponds with the root, there'll be no segment path,\n    // in which case we default to ''.\n    segment: segmentPath[segmentPath.length - 1] ?? '',\n    tree,\n    seedData,\n    head,\n    isHeadPartial,\n    isRootRender: flightDataPath.length === flightDataPathLength,\n  }\n}\n\nexport function createInitialRSCPayloadFromFallbackPrerender(\n  response: Response,\n  fallbackInitialRSCPayload: InitialRSCPayload\n): InitialRSCPayload {\n  // This is a static fallback page. In order to hydrate the page, we need to\n  // parse the client params from the URL, but to account for the possibility\n  // that the page was rewritten, we need to check the response headers\n  // for x-nextjs-rewritten-path or x-nextjs-rewritten-query headers. Since\n  // we can't access the headers of the initial document response, the client\n  // performs a fetch request to the current location. Since it's possible that\n  // the fetch request will be dynamically rewritten to a different path than\n  // the initial document, this fetch request delivers _all_ the hydration data\n  // for the page; it was not inlined into the document, like it normally\n  // would be.\n  //\n  // TODO: Consider treating the case where fetch is rewritten to a different\n  // path from the document as a special deopt case. We should optimistically\n  // assume this won't happen, inline the data into the document, and perform\n  // a minimal request (like a HEAD or range request) to verify that the\n  // response matches. Tricky to get right because we need to account for\n  // all the different deployment environments we support, like output:\n  // \"export\" mode, where we currently don't assume that custom response\n  // headers are present.\n\n  // Patch the Flight data sent by the server with the correct params parsed\n  // from the URL + response object.\n  const renderedPathname = getRenderedPathname(response)\n  const renderedSearch = getRenderedSearch(response)\n  const canonicalUrl = createHrefFromUrl(new URL(location.href))\n  const originalFlightDataPath = fallbackInitialRSCPayload.f[0]\n  const originalFlightRouterState = originalFlightDataPath[0]\n  const payload: InitialRSCPayload = {\n    c: canonicalUrl.split('/'),\n    q: renderedSearch,\n    i: fallbackInitialRSCPayload.i,\n    f: [\n      [\n        fillInFallbackFlightRouterState(\n          originalFlightRouterState,\n          renderedPathname,\n          renderedSearch as NormalizedSearch\n        ),\n        originalFlightDataPath[1],\n        originalFlightDataPath[2],\n        originalFlightDataPath[2],\n      ],\n    ],\n    m: fallbackInitialRSCPayload.m,\n    G: fallbackInitialRSCPayload.G,\n    S: fallbackInitialRSCPayload.S,\n    h: fallbackInitialRSCPayload.h,\n  }\n  if (fallbackInitialRSCPayload.b) {\n    payload.b = fallbackInitialRSCPayload.b\n  }\n  return payload\n}\n\nfunction fillInFallbackFlightRouterState(\n  flightRouterState: FlightRouterState,\n  renderedPathname: string,\n  renderedSearch: NormalizedSearch\n): FlightRouterState {\n  const pathnameParts = renderedPathname.split('/').filter((p) => p !== '')\n  const index = 0\n  return fillInFallbackFlightRouterStateImpl(\n    flightRouterState,\n    renderedSearch,\n    pathnameParts,\n    index\n  )\n}\n\nfunction fillInFallbackFlightRouterStateImpl(\n  flightRouterState: FlightRouterState,\n  renderedSearch: NormalizedSearch,\n  pathnameParts: Array<string>,\n  pathnamePartsIndex: number\n): FlightRouterState {\n  const originalSegment = flightRouterState[0]\n  let newSegment: Segment\n  let doesAppearInURL: boolean\n  if (typeof originalSegment === 'string') {\n    newSegment = originalSegment\n    doesAppearInURL = doesStaticSegmentAppearInURL(originalSegment)\n  } else {\n    const paramName = originalSegment[0]\n    const paramType = originalSegment[2]\n    const staticSiblings = originalSegment[3]\n    const paramValue = parseDynamicParamFromURLPart(\n      paramType,\n      pathnameParts,\n      pathnamePartsIndex\n    )\n    const cacheKey = getCacheKeyForDynamicParam(paramValue, renderedSearch)\n    newSegment = [paramName, cacheKey, paramType, staticSiblings]\n    doesAppearInURL = true\n  }\n\n  // Only increment the index if the segment appears in the URL. If it's a\n  // \"virtual\" segment, like a route group, it remains the same.\n  const childPathnamePartsIndex = doesAppearInURL\n    ? pathnamePartsIndex + 1\n    : pathnamePartsIndex\n\n  const children = flightRouterState[1]\n  const newChildren: { [key: string]: FlightRouterState } = {}\n  for (let key in children) {\n    const childFlightRouterState = children[key]\n    newChildren[key] = fillInFallbackFlightRouterStateImpl(\n      childFlightRouterState,\n      renderedSearch,\n      pathnameParts,\n      childPathnamePartsIndex\n    )\n  }\n\n  const newState: FlightRouterState = [\n    newSegment,\n    newChildren,\n    null,\n    flightRouterState[3],\n    flightRouterState[4],\n  ]\n  return newState\n}\n\nexport function getNextFlightSegmentPath(\n  flightSegmentPath: FlightSegmentPath\n): FlightSegmentPath {\n  // Since `FlightSegmentPath` is a repeated tuple of `Segment` and `ParallelRouteKey`, we slice off two items\n  // to get the next segment path.\n  return flightSegmentPath.slice(2)\n}\n\nexport function normalizeFlightData(\n  flightData: FlightData\n): NormalizedFlightData[] | string {\n  // FlightData can be a string when the server didn't respond with a proper flight response,\n  // or when a redirect happens, to signal to the client that it needs to perform an MPA navigation.\n  if (typeof flightData === 'string') {\n    return flightData\n  }\n\n  return flightData.map((flightDataPath) =>\n    getFlightDataPartsFromPath(flightDataPath)\n  )\n}\n\n/**\n * This function is used to prepare the flight router state for the request.\n * It removes markers that are not needed by the server, and are purely used\n * for stashing state on the client.\n * @param flightRouterState - The flight router state to prepare.\n * @param isHmrRefresh - Whether this is an HMR refresh request.\n * @returns The prepared flight router state.\n */\nexport function prepareFlightRouterStateForRequest(\n  flightRouterState: FlightRouterState,\n  isHmrRefresh?: boolean\n): string {\n  // HMR requests need the complete, unmodified state for proper functionality\n  if (isHmrRefresh) {\n    return encodeURIComponent(JSON.stringify(flightRouterState))\n  }\n\n  return encodeURIComponent(\n    JSON.stringify(stripClientOnlyDataFromFlightRouterState(flightRouterState))\n  )\n}\n\n/**\n * Recursively strips client-only data from FlightRouterState while preserving\n * server-needed information for proper rendering decisions.\n */\nfunction stripClientOnlyDataFromFlightRouterState(\n  flightRouterState: FlightRouterState\n): FlightRouterState {\n  const [\n    segment,\n    parallelRoutes,\n    _refreshState, // Intentionally unused - URLs are client-only\n    refreshMarker,\n    prefetchHints,\n  ] = flightRouterState\n\n  // Strip client-only data from the segment\n  const cleanedSegment = stripClientOnlyDataFromSegment(segment)\n\n  // Recursively process parallel routes\n  const cleanedParallelRoutes: { [key: string]: FlightRouterState } = {}\n  for (const [key, childState] of Object.entries(parallelRoutes)) {\n    cleanedParallelRoutes[key] =\n      stripClientOnlyDataFromFlightRouterState(childState)\n  }\n\n  const result: FlightRouterState = [cleanedSegment, cleanedParallelRoutes]\n  if (refreshMarker) {\n    result[2] = null // null slightly more compact than undefined\n    result[3] = refreshMarker\n  }\n\n  // Append optional fields if present\n  if (prefetchHints !== undefined) {\n    result[4] = prefetchHints\n  }\n\n  // Everything else is used only by the client and is not needed for requests.\n  return result\n}\n\n/**\n * Strips client-only data from segments:\n * - Search parameters from __PAGE__ segments\n * - staticSiblings from dynamic segment tuples (only needed for client-side\n *   prefetch reuse decisions)\n */\nfunction stripClientOnlyDataFromSegment(segment: Segment): Segment {\n  if (typeof segment === 'string') {\n    // Strip search params from __PAGE__ segments\n    if (segment.startsWith(PAGE_SEGMENT_KEY + '?')) {\n      return PAGE_SEGMENT_KEY\n    }\n    return segment\n  }\n  // Dynamic segment tuple: [paramName, paramCacheKey, paramType, staticSiblings]\n  // Strip staticSiblings (4th element) since server doesn't need it\n  const [paramName, paramCacheKey, paramType] = segment\n  return [paramName, paramCacheKey, paramType, null]\n}\n","import { pathHasPrefix } from '../shared/lib/router/utils/path-has-prefix'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function hasBasePath(path: string): boolean {\n  return pathHasPrefix(path, basePath)\n}\n","// Adapted from React's sanitizeURL function found here: https://github.com/facebook/react/blob/b565373afd0cc1988497e1107106e851e8cfb261/packages/react-dom-bindings/src/shared/sanitizeURL.js\n\n// A javascript: URL can contain leading C0 control or \\u0020 SPACE,\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\nconst isJavaScriptProtocol =\n  // eslint-disable-next-line no-control-regex\n  /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i\n\nexport function isJavaScriptURLString(url: string): boolean {\n  return isJavaScriptProtocol.test('' + (url as unknown as string))\n}\n","// This gets assigned as a side-effect during app initialization. Because it\n// represents the build used to create the JS bundle, it should never change\n// after being set, so we store it in a global variable.\n//\n// When performing RSC requests, if the incoming data has a different build ID,\n// we perform an MPA navigation/refresh to load the updated build and ensure\n// that the client and server in sync.\n//\n// Starts as an empty string. In practice, because setNavigationBuildId is called during initialization\n// before hydration starts, this will always get reassigned to the actual ID before it's ever needed\n// by a navigation. If for some reasons it didn't, due to a bug or race condition, then on\n// navigation the build comparision would fail and trigger an MPA navigation.\n//\n// Note that this can also be initialized with the deployment id instead (if available). So it's not\n// the same as \"the build id\", but we are running out of alternative names for \"build id or\n// deployment id\".\nlet globalBuildId: string = ''\n\nexport function setNavigationBuildId(buildId: string) {\n  globalBuildId = buildId\n}\n\nexport function getNavigationBuildId(): string {\n  return globalBuildId\n}\n","import { hasBasePath } from './has-base-path'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function removeBasePath(path: string): string {\n  if (process.env.__NEXT_MANUAL_CLIENT_BASE_PATH) {\n    if (!hasBasePath(path)) {\n      return path\n    }\n  }\n\n  // Can't trim the basePath if it has zero length!\n  if (basePath.length === 0) return path\n\n  path = path.slice(basePath.length)\n  if (!path.startsWith('/')) path = `/${path}`\n  return path\n}\n","import type { DynamicParamTypesShort } from '../shared/lib/app-router-types'\nimport {\n  addSearchParamsIfPageSegment,\n  DEFAULT_SEGMENT_KEY,\n  PAGE_SEGMENT_KEY,\n} from '../shared/lib/segment'\nimport { ROOT_SEGMENT_REQUEST_KEY } from '../shared/lib/segment-cache/segment-value-encoding'\nimport {\n  NEXT_REWRITTEN_PATH_HEADER,\n  NEXT_REWRITTEN_QUERY_HEADER,\n  NEXT_RSC_UNION_QUERY,\n} from './components/app-router-headers'\nimport type {\n  NormalizedPathname,\n  NormalizedSearch,\n} from './components/segment-cache/cache-key'\nimport type { RSCResponse } from './components/router-reducer/fetch-server-response'\nimport type { ParsedUrlQuery } from 'querystring'\n\nexport type RouteParamValue = string | Array<string> | null\n\nexport function getRenderedSearch(\n  response: RSCResponse<unknown> | Response\n): NormalizedSearch {\n  // If the server performed a rewrite, the search params used to render the\n  // page will be different from the params in the request URL. In this case,\n  // the response will include a header that gives the rewritten search query.\n  const rewrittenQuery = response.headers.get(NEXT_REWRITTEN_QUERY_HEADER)\n  if (rewrittenQuery !== null) {\n    return (\n      rewrittenQuery === '' ? '' : '?' + rewrittenQuery\n    ) as NormalizedSearch\n  }\n  // If the header is not present, there was no rewrite, so we use the search\n  // query of the response URL.\n  return urlToUrlWithoutFlightMarker(new URL(response.url))\n    .search as NormalizedSearch\n}\n\nexport function getRenderedPathname(\n  response: RSCResponse<unknown> | Response\n): NormalizedPathname {\n  // If the server performed a rewrite, the pathname used to render the\n  // page will be different from the pathname in the request URL. In this case,\n  // the response will include a header that gives the rewritten pathname.\n  const rewrittenPath = response.headers.get(NEXT_REWRITTEN_PATH_HEADER)\n  return (rewrittenPath ??\n    urlToUrlWithoutFlightMarker(new URL(response.url))\n      .pathname) as NormalizedPathname\n}\n\nexport function parseDynamicParamFromURLPart(\n  paramType: DynamicParamTypesShort,\n  pathnameParts: Array<string>,\n  partIndex: number\n): RouteParamValue {\n  // This needs to match the behavior in get-dynamic-param.ts.\n  switch (paramType) {\n    // Catchalls\n    case 'c': {\n      // Catchalls receive all the remaining URL parts. If there are no\n      // remaining pathname parts, return an empty array.\n      return partIndex < pathnameParts.length\n        ? pathnameParts.slice(partIndex).map((s) => encodeURIComponent(s))\n        : []\n    }\n    // Catchall intercepted\n    case 'ci(..)(..)':\n    case 'ci(.)':\n    case 'ci(..)':\n    case 'ci(...)': {\n      const prefix = paramType.length - 2\n      return partIndex < pathnameParts.length\n        ? pathnameParts.slice(partIndex).map((s, i) => {\n            if (i === 0) {\n              return encodeURIComponent(s.slice(prefix))\n            }\n\n            return encodeURIComponent(s)\n          })\n        : []\n    }\n    // Optional catchalls\n    case 'oc': {\n      // Optional catchalls receive all the remaining URL parts, unless this is\n      // the end of the pathname, in which case they return null.\n      return partIndex < pathnameParts.length\n        ? pathnameParts.slice(partIndex).map((s) => encodeURIComponent(s))\n        : null\n    }\n    // Dynamic\n    case 'd': {\n      if (partIndex >= pathnameParts.length) {\n        // The route tree expected there to be more parts in the URL than there\n        // actually are. This could happen if the x-nextjs-rewritten-path header\n        // is incorrectly set, or potentially due to bug in Next.js. TODO:\n        // Should this be a hard error? During a prefetch, we can just abort.\n        // During a client navigation, we could trigger a hard refresh. But if\n        // it happens during initial render, we don't really have any\n        // recovery options.\n        return ''\n      }\n      return encodeURIComponent(pathnameParts[partIndex])\n    }\n    // Dynamic intercepted\n    case 'di(..)(..)':\n    case 'di(.)':\n    case 'di(..)':\n    case 'di(...)': {\n      const prefix = paramType.length - 2\n      if (partIndex >= pathnameParts.length) {\n        // The route tree expected there to be more parts in the URL than there\n        // actually are. This could happen if the x-nextjs-rewritten-path header\n        // is incorrectly set, or potentially due to bug in Next.js. TODO:\n        // Should this be a hard error? During a prefetch, we can just abort.\n        // During a client navigation, we could trigger a hard refresh. But if\n        // it happens during initial render, we don't really have any\n        // recovery options.\n        return ''\n      }\n\n      return encodeURIComponent(pathnameParts[partIndex].slice(prefix))\n    }\n    default:\n      paramType satisfies never\n      return ''\n  }\n}\n\nexport function doesStaticSegmentAppearInURL(segment: string): boolean {\n  // This is not a parameterized segment; however, we need to determine\n  // whether or not this segment appears in the URL. For example, this route\n  // groups do not appear in the URL, so they should be skipped. Any other\n  // special cases must be handled here.\n  // TODO: Consider encoding this directly into the router tree instead of\n  // inferring it on the client based on the segment type. Something like\n  // a `doesAppearInURL` flag in FlightRouterState.\n  if (\n    segment === ROOT_SEGMENT_REQUEST_KEY ||\n    // For some reason, the loader tree sometimes includes extra __PAGE__\n    // \"layouts\" when part of a parallel route. But it's not a leaf node.\n    // Otherwise, we wouldn't need this special case because pages are\n    // always leaf nodes.\n    // TODO: Investigate why the loader produces these fake page segments.\n    segment.startsWith(PAGE_SEGMENT_KEY) ||\n    // Route groups.\n    (segment[0] === '(' && segment.endsWith(')')) ||\n    segment === DEFAULT_SEGMENT_KEY ||\n    segment === '/_not-found'\n  ) {\n    return false\n  } else {\n    // All other segment types appear in the URL\n    return true\n  }\n}\n\nexport function getCacheKeyForDynamicParam(\n  paramValue: RouteParamValue,\n  renderedSearch: NormalizedSearch\n): string {\n  // This needs to match the logic in get-dynamic-param.ts, until we're able to\n  // unify the various implementations so that these are always computed on\n  // the client.\n  if (typeof paramValue === 'string') {\n    // TODO: Refactor or remove this helper function to accept a string rather\n    // than the whole segment type. Also we can probably just append the\n    // search string instead of turning it into JSON.\n    const pageSegmentWithSearchParams = addSearchParamsIfPageSegment(\n      paramValue,\n      Object.fromEntries(new URLSearchParams(renderedSearch))\n    ) as string\n    return pageSegmentWithSearchParams\n  } else if (paramValue === null) {\n    return ''\n  } else {\n    return paramValue.join('/')\n  }\n}\n\nexport function urlToUrlWithoutFlightMarker(url: URL): URL {\n  const urlWithoutFlightParameters = new URL(url)\n  urlWithoutFlightParameters.searchParams.delete(NEXT_RSC_UNION_QUERY)\n  if (process.env.NODE_ENV === 'production') {\n    if (\n      process.env.__NEXT_CONFIG_OUTPUT === 'export' &&\n      urlWithoutFlightParameters.pathname.endsWith('.txt')\n    ) {\n      const { pathname } = urlWithoutFlightParameters\n      const length = pathname.endsWith('/index.txt') ? 10 : 4\n      // Slice off `/index.txt` or `.txt` from the end of the pathname\n      urlWithoutFlightParameters.pathname = pathname.slice(0, -length)\n    }\n  }\n  return urlWithoutFlightParameters\n}\n\nexport function getParamValueFromCacheKey(\n  paramCacheKey: string,\n  paramType: DynamicParamTypesShort\n) {\n  // Turn the cache key string sent by the server (as part of FlightRouterState)\n  // into a value that can be passed to `useParams` and client components.\n  const isCatchAll = paramType === 'c' || paramType === 'oc'\n  if (isCatchAll) {\n    // Catch-all param keys are a concatenation of the path segments.\n    // See equivalent logic in `getSelectedParams`.\n    // TODO: We should just pass the array directly, rather than concatenate\n    // it to a string and then split it back to an array. It needs to be an\n    // array in some places, like when passing a key React, but we can convert\n    // it at runtime in those places.\n    return paramCacheKey.split('/')\n  }\n  return paramCacheKey\n}\n\nexport function urlSearchParamsToParsedUrlQuery(\n  searchParams: URLSearchParams\n): ParsedUrlQuery {\n  // Converts a URLSearchParams object to the same type used by the server when\n  // creating search params props, i.e. the type returned by Node's\n  // \"querystring\" module.\n  const result: ParsedUrlQuery = {}\n  for (const [key, value] of searchParams.entries()) {\n    if (result[key] === undefined) {\n      result[key] = value\n    } else if (Array.isArray(result[key])) {\n      result[key].push(value)\n    } else {\n      result[key] = [result[key], value]\n    }\n  }\n  return result\n}\n","import type { ServerRuntime } from '../types'\n\nexport const TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain'\nexport const HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8'\nexport const JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8'\nexport const NEXT_QUERY_PARAM_PREFIX = 'nxtP'\nexport const NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI'\n\nexport const MATCHED_PATH_HEADER = 'x-matched-path'\nexport const PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate'\nexport const PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER =\n  'x-prerender-revalidate-if-generated'\n\nexport const RSC_SEGMENTS_DIR_SUFFIX = '.segments'\nexport const RSC_SEGMENT_SUFFIX = '.segment.rsc'\nexport const RSC_SUFFIX = '.rsc'\nexport const ACTION_SUFFIX = '.action'\nexport const NEXT_DATA_SUFFIX = '.json'\nexport const NEXT_META_SUFFIX = '.meta'\nexport const NEXT_BODY_SUFFIX = '.body'\n\nexport const NEXT_NAV_DEPLOYMENT_ID_HEADER = 'x-nextjs-deployment-id'\n\nexport const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags'\nexport const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags'\nexport const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER =\n  'x-next-revalidate-tag-token'\n\nexport const NEXT_RESUME_HEADER = 'next-resume'\nexport const NEXT_RESUME_STATE_LENGTH_HEADER = 'x-next-resume-state-length'\n\n// if these change make sure we update the related\n// documentation as well\nexport const NEXT_CACHE_TAG_MAX_ITEMS = 128\nexport const NEXT_CACHE_TAG_MAX_LENGTH = 256\nexport const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024\nexport const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_'\nexport const NEXT_CACHE_ROOT_PARAM_TAG_ID = '_N_RP_'\n\n// in seconds\nexport const CACHE_ONE_YEAR_SECONDS = 31536000\n\n// in seconds, represents revalidate=false. I.e. never revaliate.\n// We use this value since it can be represented as a V8 SMI for optimal performance.\n// It can also be serialized as JSON if it ever leaks accidentally as an actual value.\nexport const INFINITE_CACHE = 0xfffffffe\n\n// Patterns to detect middleware files\nexport const MIDDLEWARE_FILENAME = 'middleware'\nexport const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`\n\n// Patterns to detect proxy files (replacement for middleware)\nexport const PROXY_FILENAME = 'proxy'\nexport const PROXY_LOCATION_REGEXP = `(?:src/)?${PROXY_FILENAME}`\n\n// Pattern to detect instrumentation hooks file\nexport const INSTRUMENTATION_HOOK_FILENAME = 'instrumentation'\n\n// Because on Windows absolute paths in the generated code can break because of numbers, eg 1 in the path,\n// we have to use a private alias\nexport const PAGES_DIR_ALIAS = 'private-next-pages'\nexport const DOT_NEXT_ALIAS = 'private-dot-next'\nexport const ROOT_DIR_ALIAS = 'private-next-root-dir'\nexport const APP_DIR_ALIAS = 'private-next-app-dir'\nexport const RSC_MOD_REF_PROXY_ALIAS = 'private-next-rsc-mod-ref-proxy'\nexport const RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate'\nexport const RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference'\nexport const RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper'\nexport const RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS =\n  'private-next-rsc-track-dynamic-import'\nexport const RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption'\nexport const RSC_ACTION_CLIENT_WRAPPER_ALIAS =\n  'private-next-rsc-action-client-wrapper'\n\nexport const PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`\n\nexport const SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`\n\nexport const SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`\n\nexport const SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`\n\nexport const STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`\n\nexport const SERVER_PROPS_EXPORT_ERROR = `pages with \\`getServerSideProps\\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`\n\nexport const GSP_NO_RETURNED_VALUE =\n  'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?'\nexport const GSSP_NO_RETURNED_VALUE =\n  'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?'\n\nexport const UNSTABLE_REVALIDATE_RENAME_ERROR =\n  'The `unstable_revalidate` property is available for general use.\\n' +\n  'Please use `revalidate` instead.'\n\nexport const GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`\n\nexport const NON_STANDARD_NODE_ENV = `You are using a non-standard \"NODE_ENV\" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`\n\nexport const SSG_FALLBACK_EXPORT_ERROR = `Pages with \\`fallback\\` enabled in \\`getStaticPaths\\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`\n\nexport const ESLINT_DEFAULT_DIRS = ['app', 'pages', 'components', 'lib', 'src']\n\nexport const SERVER_RUNTIME: Record<string, ServerRuntime> = {\n  edge: 'edge',\n  experimentalEdge: 'experimental-edge',\n  nodejs: 'nodejs',\n}\n\nexport const WEB_SOCKET_MAX_RECONNECTIONS = 12\n\n/**\n * The names of the webpack layers. These layers are the primitives for the\n * webpack chunks.\n */\nconst WEBPACK_LAYERS_NAMES = {\n  /**\n   * The layer for the shared code between the client and server bundles.\n   */\n  shared: 'shared',\n  /**\n   * The layer for server-only runtime and picking up `react-server` export conditions.\n   * Including app router RSC pages and app router custom routes and metadata routes.\n   */\n  reactServerComponents: 'rsc',\n  /**\n   * Server Side Rendering layer for app (ssr).\n   */\n  serverSideRendering: 'ssr',\n  /**\n   * The browser client bundle layer for actions.\n   */\n  actionBrowser: 'action-browser',\n  /**\n   * The Node.js bundle layer for the API routes.\n   */\n  apiNode: 'api-node',\n  /**\n   * The Edge Lite bundle layer for the API routes.\n   */\n  apiEdge: 'api-edge',\n  /**\n   * The layer for the middleware code.\n   */\n  middleware: 'middleware',\n  /**\n   * The layer for the instrumentation hooks.\n   */\n  instrument: 'instrument',\n  /**\n   * The layer for assets on the edge.\n   */\n  edgeAsset: 'edge-asset',\n  /**\n   * The browser client bundle layer for App directory.\n   */\n  appPagesBrowser: 'app-pages-browser',\n  /**\n   * The browser client bundle layer for Pages directory.\n   */\n  pagesDirBrowser: 'pages-dir-browser',\n  /**\n   * The Edge Lite bundle layer for Pages directory.\n   */\n  pagesDirEdge: 'pages-dir-edge',\n  /**\n   * The Node.js bundle layer for Pages directory.\n   */\n  pagesDirNode: 'pages-dir-node',\n} as const\n\nexport type WebpackLayerName =\n  (typeof WEBPACK_LAYERS_NAMES)[keyof typeof WEBPACK_LAYERS_NAMES]\n\nconst WEBPACK_LAYERS = {\n  ...WEBPACK_LAYERS_NAMES,\n  GROUP: {\n    builtinReact: [\n      WEBPACK_LAYERS_NAMES.reactServerComponents,\n      WEBPACK_LAYERS_NAMES.actionBrowser,\n    ],\n    serverOnly: [\n      WEBPACK_LAYERS_NAMES.reactServerComponents,\n      WEBPACK_LAYERS_NAMES.actionBrowser,\n      WEBPACK_LAYERS_NAMES.instrument,\n      WEBPACK_LAYERS_NAMES.middleware,\n    ],\n    neutralTarget: [\n      // pages api\n      WEBPACK_LAYERS_NAMES.apiNode,\n      WEBPACK_LAYERS_NAMES.apiEdge,\n    ],\n    clientOnly: [\n      WEBPACK_LAYERS_NAMES.serverSideRendering,\n      WEBPACK_LAYERS_NAMES.appPagesBrowser,\n    ],\n    bundled: [\n      WEBPACK_LAYERS_NAMES.reactServerComponents,\n      WEBPACK_LAYERS_NAMES.actionBrowser,\n      WEBPACK_LAYERS_NAMES.serverSideRendering,\n      WEBPACK_LAYERS_NAMES.appPagesBrowser,\n      WEBPACK_LAYERS_NAMES.shared,\n      WEBPACK_LAYERS_NAMES.instrument,\n      WEBPACK_LAYERS_NAMES.middleware,\n    ],\n    appPages: [\n      // app router pages and layouts\n      WEBPACK_LAYERS_NAMES.reactServerComponents,\n      WEBPACK_LAYERS_NAMES.serverSideRendering,\n      WEBPACK_LAYERS_NAMES.appPagesBrowser,\n      WEBPACK_LAYERS_NAMES.actionBrowser,\n    ],\n  },\n}\n\nconst WEBPACK_RESOURCE_QUERIES = {\n  edgeSSREntry: '__next_edge_ssr_entry__',\n  metadata: '__next_metadata__',\n  metadataRoute: '__next_metadata_route__',\n  metadataImageMeta: '__next_metadata_image_meta__',\n}\n\nexport { WEBPACK_LAYERS, WEBPACK_RESOURCE_QUERIES }\n","import path from 'path'\nimport { pathToFileURL } from 'url'\n\n/**\n * The path for a dynamic route must be URLs with a valid scheme.\n *\n * When an absolute Windows path is passed to it, it interprets the beginning of the path as a protocol (`C:`).\n * Therefore, it is important to always construct a complete path.\n * @param dir File directory\n * @param filePath Absolute or relative path\n */\nexport const formatDynamicImportPath = (dir: string, filePath: string) => {\n  const absoluteFilePath = path.isAbsolute(filePath)\n    ? filePath\n    : path.join(dir, filePath)\n  const formattedFilePath = pathToFileURL(absoluteFilePath).toString()\n\n  return formattedFilePath\n}\n","export const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'\nexport const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'\nexport const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'\nexport const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'\n","import { isPlainObject } from '../shared/lib/is-plain-object'\n\n// We allow some additional attached properties for Next.js errors\nexport interface NextError extends Error {\n  type?: string\n  page?: string\n  code?: string | number\n  cancelled?: boolean\n  digest?: string\n}\n\n/**\n * This is a safe stringify function that handles circular references.\n * We're using a simpler version here to avoid introducing\n * the dependency `safe-stable-stringify` into production bundle.\n *\n * This helper is used both in development and production.\n */\nfunction safeStringifyLite(obj: any) {\n  const seen = new WeakSet()\n\n  return JSON.stringify(obj, (_key, value) => {\n    // If value is an object and already seen, replace with \"[Circular]\"\n    if (typeof value === 'object' && value !== null) {\n      if (seen.has(value)) {\n        return '[Circular]'\n      }\n      seen.add(value)\n    }\n    return value\n  })\n}\n\n/**\n * Checks whether the given value is a NextError.\n * This can be used to print a more detailed error message with properties like `code` & `digest`.\n */\nexport default function isError(err: unknown): err is NextError {\n  return (\n    typeof err === 'object' && err !== null && 'name' in err && 'message' in err\n  )\n}\n\nexport function getProperError(err: unknown): Error {\n  if (isError(err)) {\n    return err\n  }\n\n  if (process.env.NODE_ENV === 'development') {\n    // provide better error for case where `throw undefined`\n    // is called in development\n    if (typeof err === 'undefined') {\n      return new Error(\n        'An undefined error was thrown, ' +\n          'see here for more info: https://nextjs.org/docs/messages/threw-undefined'\n      )\n    }\n\n    if (err === null) {\n      return new Error(\n        'A null error was thrown, ' +\n          'see here for more info: https://nextjs.org/docs/messages/threw-undefined'\n      )\n    }\n  }\n\n  return new Error(isPlainObject(err) ? safeStringifyLite(err) : err + '')\n}\n","export type ScheduledFn<T = void> = () => T | PromiseLike<T>\nexport type SchedulerFn<T = void> = (cb: ScheduledFn<T>) => void\n\n/**\n * Schedules a function to be called on the next tick after the other promises\n * have been resolved.\n *\n * @param cb the function to schedule\n */\nexport const scheduleOnNextTick = (cb: ScheduledFn<void>) => {\n  // We use Promise.resolve().then() here so that the operation is scheduled at\n  // the end of the promise job queue, we then add it to the next process tick\n  // to ensure it's evaluated afterwards.\n  //\n  // This was inspired by the implementation of the DataLoader interface: https://github.com/graphql/dataloader/blob/d336bd15282664e0be4b4a657cb796f09bafbc6b/src/index.js#L213-L255\n  //\n  Promise.resolve().then(() => {\n    if (process.env.NEXT_RUNTIME === 'edge') {\n      setTimeout(cb, 0)\n    } else {\n      process.nextTick(cb)\n    }\n  })\n}\n\n/**\n * Schedules a function to be called using `setImmediate` or `setTimeout` if\n * `setImmediate` is not available (like in the Edge runtime).\n *\n * @param cb the function to schedule\n */\nexport const scheduleImmediate = (cb: ScheduledFn<void>): void => {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    setTimeout(cb, 0)\n  } else {\n    setImmediate(cb)\n  }\n}\n\n/**\n * returns a promise than resolves in a future task. There is no guarantee that the task it resolves in\n * will be the next task but if you await it you can at least be sure that the current task is over and\n * most usefully that the entire microtask queue of the current task has been emptied.\n */\nexport function atLeastOneTask() {\n  return new Promise<void>((resolve) => scheduleImmediate(resolve))\n}\n\n/**\n * This utility function is extracted to make it easier to find places where we are doing\n * specific timing tricks to try to schedule work after React has rendered. This is especially\n * important at the moment because Next.js uses the edge builds of React which use setTimeout to\n * schedule work when you might expect that something like setImmediate would do the trick.\n *\n * Long term we should switch to the node versions of React rendering when possible and then\n * update this to use setImmediate rather than setTimeout\n */\nexport function waitAtLeastOneReactRenderTask(): Promise<void> {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    return new Promise((r) => setTimeout(r, 0))\n  } else {\n    return new Promise((r) => setImmediate(r))\n  }\n}\n","'use client'\n\nimport { useEffect, useTransition } from 'react'\nimport { dispatcher } from 'next/dist/compiled/next-devtools'\n\nexport const useAppDevRenderingIndicator = () => {\n  const [isPending, startTransition] = useTransition()\n\n  useEffect(() => {\n    if (isPending) {\n      dispatcher.renderingIndicatorShow()\n    } else {\n      dispatcher.renderingIndicatorHide()\n    }\n  }, [isPending])\n\n  return startTransition\n}\n","import PromiseQueue from 'next/dist/compiled/p-queue'\nimport type { RequestLifecycleOpts } from '../base-server'\nimport type { AfterCallback, AfterTask } from './after'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { isThenable } from '../../shared/lib/is-thenable'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { withExecuteRevalidates } from '../revalidation-utils'\nimport { bindSnapshot } from '../app-render/async-local-storage'\nimport {\n  workUnitAsyncStorage,\n  type WorkUnitStore,\n} from '../app-render/work-unit-async-storage.external'\nimport { afterTaskAsyncStorage } from '../app-render/after-task-async-storage.external'\n\nexport type AfterContextOpts = {\n  waitUntil: RequestLifecycleOpts['waitUntil'] | undefined\n  onClose: RequestLifecycleOpts['onClose']\n  onTaskError: RequestLifecycleOpts['onAfterTaskError'] | undefined\n}\n\nexport class AfterContext {\n  private waitUntil: RequestLifecycleOpts['waitUntil'] | undefined\n  private onClose: RequestLifecycleOpts['onClose']\n  private onTaskError: RequestLifecycleOpts['onAfterTaskError'] | undefined\n\n  private runCallbacksOnClosePromise: Promise<void> | undefined\n  private callbackQueue: PromiseQueue\n  private workUnitStores = new Set<WorkUnitStore>()\n\n  constructor({ waitUntil, onClose, onTaskError }: AfterContextOpts) {\n    this.waitUntil = waitUntil\n    this.onClose = onClose\n    this.onTaskError = onTaskError\n\n    this.callbackQueue = new PromiseQueue()\n    this.callbackQueue.pause()\n  }\n\n  public after(task: AfterTask): void {\n    if (isThenable(task)) {\n      if (!this.waitUntil) {\n        errorWaitUntilNotAvailable()\n      }\n      this.waitUntil(\n        task.catch((error) => this.reportTaskError('promise', error))\n      )\n    } else if (typeof task === 'function') {\n      // TODO(after): implement tracing\n      this.addCallback(task)\n    } else {\n      throw new Error('`after()`: Argument must be a promise or a function')\n    }\n  }\n\n  private addCallback(callback: AfterCallback) {\n    // if something is wrong, throw synchronously, bubbling up to the `after` callsite.\n    if (!this.waitUntil) {\n      errorWaitUntilNotAvailable()\n    }\n\n    const workUnitStore = workUnitAsyncStorage.getStore()\n    if (workUnitStore) {\n      this.workUnitStores.add(workUnitStore)\n    }\n\n    const afterTaskStore = afterTaskAsyncStorage.getStore()\n\n    // This is used for checking if request APIs can be called inside `after`.\n    // Note that we need to check the phase in which the *topmost* `after` was called (which should be \"action\"),\n    // not the current phase (which might be \"after\" if we're in a nested after).\n    // Otherwise, we might allow `after(() => headers())`, but not `after(() => after(() => headers()))`.\n    const rootTaskSpawnPhase = afterTaskStore\n      ? afterTaskStore.rootTaskSpawnPhase // nested after\n      : workUnitStore?.phase // topmost after\n\n    // this should only happen once.\n    if (!this.runCallbacksOnClosePromise) {\n      this.runCallbacksOnClosePromise = this.runCallbacksOnClose()\n      this.waitUntil(this.runCallbacksOnClosePromise)\n    }\n\n    // Bind the callback to the current execution context (i.e. preserve all currently available ALS-es).\n    // We do this because we want all of these to be equivalent in every regard except timing:\n    //   after(() => x())\n    //   after(x())\n    //   await x()\n    const wrappedCallback = bindSnapshot(\n      // WARNING: Don't make this a named function. It must be anonymous.\n      // See: https://github.com/facebook/react/pull/34911\n      async () => {\n        try {\n          await afterTaskAsyncStorage.run({ rootTaskSpawnPhase }, () =>\n            callback()\n          )\n        } catch (error) {\n          this.reportTaskError('function', error)\n        }\n      }\n    )\n\n    this.callbackQueue.add(wrappedCallback)\n  }\n\n  private async runCallbacksOnClose() {\n    await new Promise<void>((resolve) => this.onClose!(resolve))\n    return this.runCallbacks()\n  }\n\n  private async runCallbacks(): Promise<void> {\n    if (this.callbackQueue.size === 0) return\n\n    for (const workUnitStore of this.workUnitStores) {\n      workUnitStore.phase = 'after'\n    }\n\n    const workStore = workAsyncStorage.getStore()\n    if (!workStore) {\n      throw new InvariantError('Missing workStore in AfterContext.runCallbacks')\n    }\n\n    return withExecuteRevalidates(workStore, () => {\n      this.callbackQueue.start()\n      return this.callbackQueue.onIdle()\n    })\n  }\n\n  private reportTaskError(taskKind: 'promise' | 'function', error: unknown) {\n    // TODO(after): this is fine for now, but will need better intergration with our error reporting.\n    // TODO(after): should we log this if we have a onTaskError callback?\n    console.error(\n      taskKind === 'promise'\n        ? `A promise passed to \\`after()\\` rejected:`\n        : `An error occurred in a function passed to \\`after()\\`:`,\n      error\n    )\n    if (this.onTaskError) {\n      // this is very defensive, but we really don't want anything to blow up in an error handler\n      try {\n        this.onTaskError?.(error)\n      } catch (handlerError) {\n        console.error(\n          new InvariantError(\n            '`onTaskError` threw while handling an error thrown from an `after` task',\n            {\n              cause: handlerError,\n            }\n          )\n        )\n      }\n    }\n  }\n}\n\nfunction errorWaitUntilNotAvailable(): never {\n  throw new Error(\n    '`after()` will not work correctly, because `waitUntil` is not available in the current environment.'\n  )\n}\n","import type { IncomingMessage } from 'http'\nimport type { BaseNextRequest } from '../base-http'\nimport type { CookieSerializeOptions } from 'next/dist/compiled/cookie'\nimport type { NextApiResponse } from '../../shared/lib/utils'\n\nimport { HeadersAdapter } from '../web/spec-extension/adapters/headers'\nimport {\n  PRERENDER_REVALIDATE_HEADER,\n  PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER,\n} from '../../lib/constants'\nimport { getTracer } from '../lib/trace/tracer'\nimport { NodeSpan } from '../lib/trace/constants'\n\nexport type NextApiRequestCookies = Partial<{ [key: string]: string }>\nexport type NextApiRequestQuery = Partial<{ [key: string]: string | string[] }>\n\nexport type __ApiPreviewProps = {\n  previewModeId: string\n  previewModeEncryptionKey: string\n  previewModeSigningKey: string\n}\n\nexport function wrapApiHandler<T extends (...args: any[]) => any>(\n  page: string,\n  handler: T\n): T {\n  return ((...args) => {\n    getTracer().setRootSpanAttribute('next.route', page)\n    // Call API route method\n    return getTracer().trace(\n      NodeSpan.runHandler,\n      {\n        spanName: `executing api route (pages) ${page}`,\n      },\n      () => handler(...args)\n    )\n  }) as T\n}\n\n/**\n *\n * @param res response object\n * @param statusCode `HTTP` status code of response\n */\nexport function sendStatusCode(\n  res: NextApiResponse,\n  statusCode: number\n): NextApiResponse<any> {\n  res.statusCode = statusCode\n  return res\n}\n\n/**\n *\n * @param res response object\n * @param [statusOrUrl] `HTTP` status code of redirect\n * @param url URL of redirect\n */\nexport function redirect(\n  res: NextApiResponse,\n  statusOrUrl: string | number,\n  url?: string\n): NextApiResponse<any> {\n  if (typeof statusOrUrl === 'string') {\n    url = statusOrUrl\n    statusOrUrl = 307\n  }\n  if (typeof statusOrUrl !== 'number' || typeof url !== 'string') {\n    throw new Error(\n      `Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').`\n    )\n  }\n  res.writeHead(statusOrUrl, { Location: url })\n  res.write(url)\n  res.end()\n  return res\n}\n\nexport function checkIsOnDemandRevalidate(\n  req: Request | IncomingMessage | BaseNextRequest,\n  previewProps: __ApiPreviewProps\n): {\n  isOnDemandRevalidate: boolean\n  revalidateOnlyGenerated: boolean\n} {\n  const headers = HeadersAdapter.from(req.headers)\n\n  const previewModeId = headers.get(PRERENDER_REVALIDATE_HEADER)\n  const isOnDemandRevalidate = previewModeId === previewProps.previewModeId\n\n  const revalidateOnlyGenerated = headers.has(\n    PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER\n  )\n\n  return { isOnDemandRevalidate, revalidateOnlyGenerated }\n}\n\nexport const COOKIE_NAME_PRERENDER_BYPASS = `__prerender_bypass`\nexport const COOKIE_NAME_PRERENDER_DATA = `__next_preview_data`\n\nexport const RESPONSE_LIMIT_DEFAULT = 4 * 1024 * 1024\n\nexport const SYMBOL_PREVIEW_DATA = Symbol(COOKIE_NAME_PRERENDER_DATA)\nexport const SYMBOL_CLEARED_COOKIES = Symbol(COOKIE_NAME_PRERENDER_BYPASS)\n\nexport function clearPreviewData<T>(\n  res: NextApiResponse<T>,\n  options: {\n    path?: string\n  } = {}\n): NextApiResponse<T> {\n  if (SYMBOL_CLEARED_COOKIES in res) {\n    return res\n  }\n\n  const { serialize } =\n    require('next/dist/compiled/cookie') as typeof import('next/dist/compiled/cookie')\n  const previous = res.getHeader('Set-Cookie')\n  res.setHeader(`Set-Cookie`, [\n    ...(typeof previous === 'string'\n      ? [previous]\n      : Array.isArray(previous)\n        ? previous\n        : []),\n    serialize(COOKIE_NAME_PRERENDER_BYPASS, '', {\n      // To delete a cookie, set `expires` to a date in the past:\n      // https://tools.ietf.org/html/rfc6265#section-4.1.1\n      // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n      expires: new Date(0),\n      httpOnly: true,\n      sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n      secure: process.env.NODE_ENV !== 'development',\n      path: '/',\n      ...(options.path !== undefined\n        ? ({ path: options.path } as CookieSerializeOptions)\n        : undefined),\n    }),\n    serialize(COOKIE_NAME_PRERENDER_DATA, '', {\n      // To delete a cookie, set `expires` to a date in the past:\n      // https://tools.ietf.org/html/rfc6265#section-4.1.1\n      // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n      expires: new Date(0),\n      httpOnly: true,\n      sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n      secure: process.env.NODE_ENV !== 'development',\n      path: '/',\n      ...(options.path !== undefined\n        ? ({ path: options.path } as CookieSerializeOptions)\n        : undefined),\n    }),\n  ])\n\n  Object.defineProperty(res, SYMBOL_CLEARED_COOKIES, {\n    value: true,\n    enumerable: false,\n  })\n  return res\n}\n\n/**\n * Custom error class\n */\nexport class ApiError extends Error {\n  readonly statusCode: number\n\n  constructor(statusCode: number, message: string) {\n    super(message)\n    this.statusCode = statusCode\n  }\n}\n\n/**\n * Sends error in `response`\n * @param res response object\n * @param statusCode of response\n * @param message of response\n */\nexport function sendError(\n  res: NextApiResponse,\n  statusCode: number,\n  message: string\n): void {\n  res.statusCode = statusCode\n  res.statusMessage = message\n  res.end(message)\n}\n\ninterface LazyProps {\n  req: IncomingMessage\n}\n\n/**\n * Execute getter function only if its needed\n * @param LazyProps `req` and `params` for lazyProp\n * @param prop name of property\n * @param getter function to get data\n */\nexport function setLazyProp<T>(\n  { req }: LazyProps,\n  prop: string,\n  getter: () => T\n): void {\n  const opts = { configurable: true, enumerable: true }\n  const optsReset = { ...opts, writable: true }\n\n  Object.defineProperty(req, prop, {\n    ...opts,\n    get: () => {\n      const value = getter()\n      // we set the property on the object to avoid recalculating it\n      Object.defineProperty(req, prop, { ...optsReset, value })\n      return value\n    },\n    set: (value) => {\n      Object.defineProperty(req, prop, { ...optsReset, value })\n    },\n  })\n}\n","import type { IncomingMessage, ServerResponse } from 'http'\nimport type { NextApiResponse } from '../../../shared/lib/utils'\nimport { checkIsOnDemandRevalidate } from '../.'\nimport type { __ApiPreviewProps } from '../.'\nimport type { BaseNextRequest, BaseNextResponse } from '../../base-http'\nimport type { PreviewData } from '../../../types'\n\nimport {\n  clearPreviewData,\n  COOKIE_NAME_PRERENDER_BYPASS,\n  COOKIE_NAME_PRERENDER_DATA,\n  SYMBOL_PREVIEW_DATA,\n} from '../index'\nimport { RequestCookies } from '../../web/spec-extension/cookies'\nimport { HeadersAdapter } from '../../web/spec-extension/adapters/headers'\n\nexport function tryGetPreviewData(\n  req: IncomingMessage | BaseNextRequest | Request,\n  res: ServerResponse | BaseNextResponse,\n  options: __ApiPreviewProps,\n  multiZoneDraftMode: boolean\n): PreviewData {\n  // if an On-Demand revalidation is being done preview mode\n  // is disabled\n  if (options && checkIsOnDemandRevalidate(req, options).isOnDemandRevalidate) {\n    return false\n  }\n\n  // Read cached preview data if present\n  // TODO: use request metadata instead of a symbol\n  if (SYMBOL_PREVIEW_DATA in req) {\n    return (req as any)[SYMBOL_PREVIEW_DATA] as any\n  }\n\n  const headers = HeadersAdapter.from(req.headers)\n  const cookies = new RequestCookies(headers)\n\n  const previewModeId = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)?.value\n  const tokenPreviewData = cookies.get(COOKIE_NAME_PRERENDER_DATA)?.value\n\n  // Case: preview mode cookie set but data cookie is not set\n  if (\n    previewModeId &&\n    !tokenPreviewData &&\n    previewModeId === options.previewModeId\n  ) {\n    // This is \"Draft Mode\" which doesn't use\n    // previewData, so we return an empty object\n    // for backwards compat with \"Preview Mode\".\n    const data = {}\n    Object.defineProperty(req, SYMBOL_PREVIEW_DATA, {\n      value: data,\n      enumerable: false,\n    })\n    return data\n  }\n\n  // Case: neither cookie is set.\n  if (!previewModeId && !tokenPreviewData) {\n    return false\n  }\n\n  // Case: one cookie is set, but not the other.\n  if (!previewModeId || !tokenPreviewData) {\n    if (!multiZoneDraftMode) {\n      clearPreviewData(res as NextApiResponse)\n    }\n    return false\n  }\n\n  // Case: preview session is for an old build.\n  if (previewModeId !== options.previewModeId) {\n    if (!multiZoneDraftMode) {\n      clearPreviewData(res as NextApiResponse)\n    }\n    return false\n  }\n\n  let encryptedPreviewData: {\n    data: string\n  }\n  try {\n    const jsonwebtoken =\n      require('next/dist/compiled/jsonwebtoken') as typeof import('next/dist/compiled/jsonwebtoken')\n    encryptedPreviewData = jsonwebtoken.verify(\n      tokenPreviewData,\n      options.previewModeSigningKey\n    ) as typeof encryptedPreviewData\n  } catch {\n    // TODO: warn\n    clearPreviewData(res as NextApiResponse)\n    return false\n  }\n\n  const { decryptWithSecret } =\n    require('../../crypto-utils') as typeof import('../../crypto-utils')\n  const decryptedPreviewData = decryptWithSecret(\n    Buffer.from(options.previewModeEncryptionKey),\n    encryptedPreviewData.data\n  )\n\n  try {\n    // TODO: strict runtime type checking\n    const data = JSON.parse(decryptedPreviewData)\n    // Cache lookup\n    Object.defineProperty(req, SYMBOL_PREVIEW_DATA, {\n      value: data,\n      enumerable: false,\n    })\n    return data\n  } catch {\n    return false\n  }\n}\n","import type { AsyncLocalStorage } from 'async_hooks'\n\nconst sharedAsyncLocalStorageNotAvailableError = new Error(\n  'Invariant: AsyncLocalStorage accessed in runtime where it is not available'\n)\n\nclass FakeAsyncLocalStorage<Store extends {}>\n  implements AsyncLocalStorage<Store>\n{\n  disable(): void {\n    throw sharedAsyncLocalStorageNotAvailableError\n  }\n\n  getStore(): Store | undefined {\n    // This fake implementation of AsyncLocalStorage always returns `undefined`.\n    return undefined\n  }\n\n  run<R>(): R {\n    throw sharedAsyncLocalStorageNotAvailableError\n  }\n\n  exit<R>(): R {\n    throw sharedAsyncLocalStorageNotAvailableError\n  }\n\n  enterWith(): void {\n    throw sharedAsyncLocalStorageNotAvailableError\n  }\n\n  static bind<T>(fn: T): T {\n    return fn\n  }\n}\n\nconst maybeGlobalAsyncLocalStorage =\n  typeof globalThis !== 'undefined' && (globalThis as any).AsyncLocalStorage\n\nexport function createAsyncLocalStorage<\n  Store extends {},\n>(): AsyncLocalStorage<Store> {\n  if (maybeGlobalAsyncLocalStorage) {\n    return new maybeGlobalAsyncLocalStorage()\n  }\n  return new FakeAsyncLocalStorage()\n}\n\nexport function bindSnapshot<T>(\n  // WARNING: Don't pass a named function to this argument! See: https://github.com/facebook/react/pull/34911\n  fn: T\n): T {\n  if (maybeGlobalAsyncLocalStorage) {\n    return maybeGlobalAsyncLocalStorage.bind(fn)\n  }\n  return FakeAsyncLocalStorage.bind(fn)\n}\n\nexport function createSnapshot(): <R, TArgs extends any[]>(\n  fn: (...args: TArgs) => R,\n  ...args: TArgs\n) => R {\n  if (maybeGlobalAsyncLocalStorage) {\n    return maybeGlobalAsyncLocalStorage.snapshot()\n  }\n  return function (fn: any, ...args: any[]) {\n    return fn(...args)\n  }\n}\n","/**\n * The functions provided by this module are used to communicate certain properties\n * about the currently running code so that Next.js can make decisions on how to handle\n * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.\n *\n * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.\n * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts\n * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of\n * Dynamic indications.\n *\n * The first is simply an intention to be dynamic. unstable_noStore is an example of this where\n * the currently executing code simply declares that the current scope is dynamic but if you use it\n * inside unstable_cache it can still be cached. This type of indication can be removed if we ever\n * make the default dynamic to begin with because the only way you would ever be static is inside\n * a cache scope which this indication does not affect.\n *\n * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic\n * because it means that it is inappropriate to cache this at all. using a dynamic data source inside\n * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should\n * read that data outside the cache and pass it in as an argument to the cached function.\n */\n\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport type {\n  WorkUnitStore,\n  PrerenderStoreLegacy,\n  PrerenderStoreModern,\n  ValidationStoreClient,\n} from '../app-render/work-unit-async-storage.external'\n\n// Once postpone is in stable we should switch to importing the postpone export directly\nimport React from 'react'\n\nimport { DynamicServerError } from '../../client/components/hooks-server-context'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport {\n  throwForMissingRequestStore,\n  workUnitAsyncStorage,\n} from './work-unit-async-storage.external'\nimport { workAsyncStorage } from '../app-render/work-async-storage.external'\nimport { makeHangingPromise, getRuntimeStage } from '../dynamic-rendering-utils'\nimport {\n  METADATA_BOUNDARY_NAME,\n  VIEWPORT_BOUNDARY_NAME,\n  OUTLET_BOUNDARY_NAME,\n  ROOT_LAYOUT_BOUNDARY_NAME,\n} from '../../lib/framework/boundary-constants'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport { BailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { INSTANT_VALIDATION_BOUNDARY_NAME } from './instant-validation/boundary-constants'\nimport type { ValidationBoundaryTracking } from './instant-validation/boundary-tracking'\nimport type { InstantValidationSampleTracking } from './instant-validation/instant-samples'\n\nconst hasPostpone = typeof React.unstable_postpone === 'function'\n\nexport type DynamicAccess = {\n  /**\n   * If debugging, this will contain the stack trace of where the dynamic access\n   * occurred. This is used to provide more information to the user about why\n   * their page is being rendered dynamically.\n   */\n  stack?: string\n\n  /**\n   * The expression that was accessed dynamically.\n   */\n  expression: string\n}\n\n// Stores dynamic reasons used during an RSC render.\nexport type DynamicTrackingState = {\n  /**\n   * When true, stack information will also be tracked during dynamic access.\n   */\n  readonly isDebugDynamicAccesses: boolean | undefined\n\n  /**\n   * The dynamic accesses that occurred during the render.\n   */\n  readonly dynamicAccesses: Array<DynamicAccess>\n\n  syncDynamicErrorWithStack: null | Error\n}\n\n// Stores dynamic reasons used during an SSR render.\nexport type DynamicValidationState = {\n  hasSuspenseAboveBody: boolean\n  hasDynamicMetadata: boolean\n  dynamicMetadata: null | Error\n  hasDynamicViewport: boolean\n  hasAllowedDynamic: boolean\n  dynamicErrors: Array<Error>\n}\n\nexport function createDynamicTrackingState(\n  isDebugDynamicAccesses: boolean | undefined\n): DynamicTrackingState {\n  return {\n    isDebugDynamicAccesses,\n    dynamicAccesses: [],\n    syncDynamicErrorWithStack: null,\n  }\n}\n\nexport function createDynamicValidationState(): DynamicValidationState {\n  return {\n    hasSuspenseAboveBody: false,\n    hasDynamicMetadata: false,\n    dynamicMetadata: null,\n    hasDynamicViewport: false,\n    hasAllowedDynamic: false,\n    dynamicErrors: [],\n  }\n}\n\nexport function getFirstDynamicReason(\n  trackingState: DynamicTrackingState\n): undefined | string {\n  return trackingState.dynamicAccesses[0]?.expression\n}\n\n/**\n * This function communicates that the current scope should be treated as dynamic.\n *\n * In most cases this function is a no-op but if called during\n * a PPR prerender it will postpone the current sub-tree and calling\n * it during a normal prerender will cause the entire prerender to abort\n */\nexport function markCurrentScopeAsDynamic(\n  store: WorkStore,\n  workUnitStore: undefined | Exclude<WorkUnitStore, PrerenderStoreModern>,\n  expression: string\n): void {\n  if (workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'cache':\n      case 'unstable-cache':\n        // Inside cache scopes, marking a scope as dynamic has no effect,\n        // because the outer cache scope creates a cache boundary. This is\n        // subtly different from reading a dynamic data source, which is\n        // forbidden inside a cache scope.\n        return\n      case 'private-cache':\n        // A private cache scope is already dynamic by definition.\n        return\n      case 'prerender-legacy':\n      case 'prerender-ppr':\n      case 'request':\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n\n  // If we're forcing dynamic rendering or we're forcing static rendering, we\n  // don't need to do anything here because the entire page is already dynamic\n  // or it's static and it should not throw or postpone here.\n  if (store.forceDynamic || store.forceStatic) return\n\n  if (store.dynamicShouldError) {\n    throw new StaticGenBailoutError(\n      `Route ${store.route} with \\`dynamic = \"error\"\\` couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n    )\n  }\n\n  if (workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'prerender-ppr':\n        return postponeWithTracking(\n          store.route,\n          expression,\n          workUnitStore.dynamicTracking\n        )\n      case 'prerender-legacy':\n        workUnitStore.revalidate = 0\n\n        // We aren't prerendering, but we are generating a static page. We need\n        // to bail out of static generation.\n        const err = new DynamicServerError(\n          `Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n        )\n        store.dynamicUsageDescription = expression\n        store.dynamicUsageStack = err.stack\n\n        throw err\n      case 'request':\n        if (process.env.NODE_ENV !== 'production') {\n          workUnitStore.usedDynamic = true\n        }\n        break\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n}\n\n/**\n * This function is meant to be used when prerendering without cacheComponents or PPR.\n * When called during a build it will cause Next.js to consider the route as dynamic.\n *\n * @internal\n */\nexport function throwToInterruptStaticGeneration(\n  expression: string,\n  store: WorkStore,\n  prerenderStore: PrerenderStoreLegacy\n): never {\n  // We aren't prerendering but we are generating a static page. We need to bail out of static generation\n  const err = new DynamicServerError(\n    `Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n  )\n\n  prerenderStore.revalidate = 0\n\n  store.dynamicUsageDescription = expression\n  store.dynamicUsageStack = err.stack\n\n  throw err\n}\n\n/**\n * This function should be used to track whether something dynamic happened even when\n * we are in a dynamic render. This is useful for Dev where all renders are dynamic but\n * we still track whether dynamic APIs were accessed for helpful messaging\n *\n * @internal\n */\nexport function trackDynamicDataInDynamicRender(workUnitStore: WorkUnitStore) {\n  switch (workUnitStore.type) {\n    case 'cache':\n    case 'unstable-cache':\n      // Inside cache scopes, marking a scope as dynamic has no effect,\n      // because the outer cache scope creates a cache boundary. This is\n      // subtly different from reading a dynamic data source, which is\n      // forbidden inside a cache scope.\n      return\n    case 'private-cache':\n      // A private cache scope is already dynamic by definition.\n      return\n    case 'prerender':\n    case 'prerender-runtime':\n    case 'prerender-legacy':\n    case 'prerender-ppr':\n    case 'prerender-client':\n    case 'validation-client':\n    case 'generate-static-params':\n      break\n    case 'request':\n      if (process.env.NODE_ENV !== 'production') {\n        workUnitStore.usedDynamic = true\n      }\n      break\n    default:\n      workUnitStore satisfies never\n  }\n}\n\nfunction abortOnSynchronousDynamicDataAccess(\n  route: string,\n  expression: string,\n  prerenderStore: PrerenderStoreModern\n): void {\n  const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n\n  const error = createPrerenderInterruptedError(reason)\n\n  prerenderStore.controller.abort(error)\n\n  const dynamicTracking = prerenderStore.dynamicTracking\n  if (dynamicTracking) {\n    dynamicTracking.dynamicAccesses.push({\n      // When we aren't debugging, we don't need to create another error for the\n      // stack trace.\n      stack: dynamicTracking.isDebugDynamicAccesses\n        ? new Error().stack\n        : undefined,\n      expression,\n    })\n  }\n}\n\nexport function abortOnSynchronousPlatformIOAccess(\n  route: string,\n  expression: string,\n  errorWithStack: Error,\n  prerenderStore: PrerenderStoreModern\n): void {\n  const dynamicTracking = prerenderStore.dynamicTracking\n  abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n  // It is important that we set this tracking value after aborting. Aborts are executed\n  // synchronously except for the case where you abort during render itself. By setting this\n  // value late we can use it to determine if any of the aborted tasks are the task that\n  // called the sync IO expression in the first place.\n  if (dynamicTracking) {\n    if (dynamicTracking.syncDynamicErrorWithStack === null) {\n      dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n    }\n  }\n}\n\n/**\n * use this function when prerendering with cacheComponents. If we are doing a\n * prospective prerender we don't actually abort because we want to discover\n * all caches for the shell. If this is the actual prerender we do abort.\n *\n * This function accepts a prerenderStore but the caller should ensure we're\n * actually running in cacheComponents mode.\n *\n * @internal\n */\nexport function abortAndThrowOnSynchronousRequestDataAccess(\n  route: string,\n  expression: string,\n  errorWithStack: Error,\n  prerenderStore: PrerenderStoreModern\n): never {\n  const prerenderSignal = prerenderStore.controller.signal\n  if (prerenderSignal.aborted === false) {\n    // TODO it would be better to move this aborted check into the callsite so we can avoid making\n    // the error object when it isn't relevant to the aborting of the prerender however\n    // since we need the throw semantics regardless of whether we abort it is easier to land\n    // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer\n    // to ideal implementation\n    abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore)\n    // It is important that we set this tracking value after aborting. Aborts are executed\n    // synchronously except for the case where you abort during render itself. By setting this\n    // value late we can use it to determine if any of the aborted tasks are the task that\n    // called the sync IO expression in the first place.\n    const dynamicTracking = prerenderStore.dynamicTracking\n    if (dynamicTracking) {\n      if (dynamicTracking.syncDynamicErrorWithStack === null) {\n        dynamicTracking.syncDynamicErrorWithStack = errorWithStack\n      }\n    }\n  }\n  throw createPrerenderInterruptedError(\n    `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`\n  )\n}\n\n/**\n * This component will call `React.postpone` that throws the postponed error.\n */\ntype PostponeProps = {\n  reason: string\n  route: string\n}\nexport function Postpone({ reason, route }: PostponeProps): never {\n  const prerenderStore = workUnitAsyncStorage.getStore()\n  const dynamicTracking =\n    prerenderStore && prerenderStore.type === 'prerender-ppr'\n      ? prerenderStore.dynamicTracking\n      : null\n  postponeWithTracking(route, reason, dynamicTracking)\n}\n\nexport function postponeWithTracking(\n  route: string,\n  expression: string,\n  dynamicTracking: null | DynamicTrackingState\n): never {\n  assertPostpone()\n  if (dynamicTracking) {\n    dynamicTracking.dynamicAccesses.push({\n      // When we aren't debugging, we don't need to create another error for the\n      // stack trace.\n      stack: dynamicTracking.isDebugDynamicAccesses\n        ? new Error().stack\n        : undefined,\n      expression,\n    })\n  }\n\n  React.unstable_postpone(createPostponeReason(route, expression))\n}\n\nfunction createPostponeReason(route: string, expression: string) {\n  return (\n    `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` +\n    `React throws this special object to indicate where. It should not be caught by ` +\n    `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`\n  )\n}\n\nexport function isDynamicPostpone(err: unknown) {\n  if (\n    typeof err === 'object' &&\n    err !== null &&\n    typeof (err as any).message === 'string'\n  ) {\n    return isDynamicPostponeReason((err as any).message)\n  }\n  return false\n}\n\nfunction isDynamicPostponeReason(reason: string) {\n  return (\n    reason.includes(\n      'needs to bail out of prerendering at this point because it used'\n    ) &&\n    reason.includes(\n      'Learn more: https://nextjs.org/docs/messages/ppr-caught-error'\n    )\n  )\n}\n\nif (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {\n  throw new Error(\n    'Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'\n  )\n}\n\nconst NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'\n\nfunction createPrerenderInterruptedError(message: string): Error {\n  const error = new Error(message)\n  ;(error as any).digest = NEXT_PRERENDER_INTERRUPTED\n  return error\n}\n\ntype DigestError = Error & {\n  digest: string\n}\n\nexport function isPrerenderInterruptedError(\n  error: unknown\n): error is DigestError {\n  return (\n    typeof error === 'object' &&\n    error !== null &&\n    (error as any).digest === NEXT_PRERENDER_INTERRUPTED &&\n    'name' in error &&\n    'message' in error &&\n    error instanceof Error\n  )\n}\n\nexport function accessedDynamicData(\n  dynamicAccesses: Array<DynamicAccess>\n): boolean {\n  return dynamicAccesses.length > 0\n}\n\nexport function consumeDynamicAccess(\n  serverDynamic: DynamicTrackingState,\n  clientDynamic: DynamicTrackingState\n): DynamicTrackingState['dynamicAccesses'] {\n  // We mutate because we only call this once we are no longer writing\n  // to the dynamicTrackingState and it's more efficient than creating a new\n  // array.\n  serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses)\n  return serverDynamic.dynamicAccesses\n}\n\nexport function formatDynamicAPIAccesses(\n  dynamicAccesses: Array<DynamicAccess>\n): string[] {\n  return dynamicAccesses\n    .filter(\n      (access): access is Required<DynamicAccess> =>\n        typeof access.stack === 'string' && access.stack.length > 0\n    )\n    .map(({ expression, stack }) => {\n      stack = stack\n        .split('\\n')\n        // Remove the \"Error: \" prefix from the first line of the stack trace as\n        // well as the first 4 lines of the stack trace which is the distance\n        // from the user code and the `new Error().stack` call.\n        .slice(4)\n        .filter((line) => {\n          // Exclude Next.js internals from the stack trace.\n          if (line.includes('node_modules/next/')) {\n            return false\n          }\n\n          // Exclude anonymous functions from the stack trace.\n          if (line.includes(' (<anonymous>)')) {\n            return false\n          }\n\n          // Exclude Node.js internals from the stack trace.\n          if (line.includes(' (node:')) {\n            return false\n          }\n\n          return true\n        })\n        .join('\\n')\n      return `Dynamic API Usage Debug - ${expression}:\\n${stack}`\n    })\n}\n\nfunction assertPostpone() {\n  if (!hasPostpone) {\n    throw new Error(\n      `Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`\n    )\n  }\n}\n\n/**\n * This is a bit of a hack to allow us to abort a render using a Postpone instance instead of an Error which changes React's\n * abort semantics slightly.\n */\nexport function createRenderInBrowserAbortSignal(): AbortSignal {\n  const controller = new AbortController()\n  controller.abort(new BailoutToCSRError('Render in Browser'))\n  return controller.signal\n}\n\n/**\n * In a prerender, we may end up with hanging Promises as inputs due them\n * stalling on connection() or because they're loading dynamic data. In that\n * case we need to abort the encoding of arguments since they'll never complete.\n */\nexport function createHangingInputAbortSignal(\n  workUnitStore: WorkUnitStore\n): AbortSignal | undefined {\n  switch (workUnitStore.type) {\n    case 'prerender':\n    case 'prerender-runtime':\n      const controller = new AbortController()\n\n      if (workUnitStore.cacheSignal) {\n        // If we have a cacheSignal it means we're in a prospective render. If\n        // the input we're waiting on is coming from another cache, we do want\n        // to wait for it so that we can resolve this cache entry too.\n        workUnitStore.cacheSignal.inputReady().then(() => {\n          controller.abort()\n        })\n      } else {\n        // Otherwise we're in the final render and we should already have all\n        // our caches filled.\n        // If the prerender uses stages, we have wait until the runtime stage,\n        // at which point all runtime inputs will be resolved.\n        // (otherwise, a runtime prerender might consider `cookies()` hanging\n        //  even though they'd resolve in the next task.)\n        //\n        // We might still be waiting on some microtasks so we\n        // wait one tick before giving up. When we give up, we still want to\n        // render the content of this cache as deeply as we can so that we can\n        // suspend as deeply as possible in the tree or not at all if we don't\n        // end up waiting for the input.\n        if (\n          // eslint-disable-next-line no-restricted-syntax -- We are discriminating between two different refined types and don't need an addition exhaustive switch here\n          workUnitStore.type === 'prerender-runtime' &&\n          workUnitStore.stagedRendering\n        ) {\n          const { stagedRendering } = workUnitStore\n          stagedRendering\n            .waitForStage(getRuntimeStage(stagedRendering))\n            .then(() => scheduleOnNextTick(() => controller.abort()))\n        } else {\n          scheduleOnNextTick(() => controller.abort())\n        }\n      }\n\n      return controller.signal\n    case 'prerender-client':\n    case 'validation-client':\n    case 'prerender-ppr':\n    case 'prerender-legacy':\n    case 'request':\n    case 'cache':\n    case 'private-cache':\n    case 'unstable-cache':\n    case 'generate-static-params':\n      return undefined\n    default:\n      workUnitStore satisfies never\n  }\n}\n\nexport function annotateDynamicAccess(\n  expression: string,\n  prerenderStore: PrerenderStoreModern | ValidationStoreClient\n) {\n  const dynamicTracking = prerenderStore.dynamicTracking\n  if (dynamicTracking) {\n    dynamicTracking.dynamicAccesses.push({\n      stack: dynamicTracking.isDebugDynamicAccesses\n        ? new Error().stack\n        : undefined,\n      expression,\n    })\n  }\n}\n\nexport function useDynamicRouteParams(expression: string) {\n  const workStore = workAsyncStorage.getStore()\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workStore && workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'prerender-client':\n      case 'prerender': {\n        const fallbackParams = workUnitStore.fallbackRouteParams\n\n        if (fallbackParams && fallbackParams.size > 0) {\n          // We are in a prerender with cacheComponents semantics. We are going to\n          // hang here and never resolve. This will cause the currently\n          // rendering component to effectively be a dynamic hole.\n          React.use(\n            makeHangingPromise(\n              workUnitStore.renderSignal,\n              workStore.route,\n              expression\n            )\n          )\n        }\n        break\n      }\n      case 'prerender-ppr': {\n        const fallbackParams = workUnitStore.fallbackRouteParams\n        if (fallbackParams && fallbackParams.size > 0) {\n          return postponeWithTracking(\n            workStore.route,\n            expression,\n            workUnitStore.dynamicTracking\n          )\n        }\n        break\n      }\n      case 'validation-client': {\n        // Don't check fallbackRouteParams here. We handle params that weren't\n        // provided in the samples using a proxy that throws when accessed.\n        break\n      }\n      case 'prerender-runtime':\n        throw new InvariantError(\n          `\\`${expression}\\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n        )\n      case 'cache':\n      case 'private-cache':\n        throw new InvariantError(\n          `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n        )\n      case 'generate-static-params':\n        throw new InvariantError(\n          `\\`${expression}\\` was called in \\`generateStaticParams\\`. Next.js should be preventing ${expression} from being included in server component files statically, but did not in this case.`\n        )\n      case 'prerender-legacy':\n      case 'request':\n      case 'unstable-cache':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n}\n\nexport function useDynamicSearchParams(expression: string) {\n  const workStore = workAsyncStorage.getStore()\n  const workUnitStore = workUnitAsyncStorage.getStore()\n\n  if (!workStore) {\n    // We assume pages router context and just return\n    return\n  }\n\n  if (!workUnitStore) {\n    throwForMissingRequestStore(expression)\n  }\n\n  switch (workUnitStore.type) {\n    case 'validation-client':\n      // During instant validation we try to behave as close to client as possible,\n      // so this shouldn't hang during SSR.\n      return\n    case 'prerender-client': {\n      React.use(\n        makeHangingPromise(\n          workUnitStore.renderSignal,\n          workStore.route,\n          expression\n        )\n      )\n      break\n    }\n    case 'prerender-legacy':\n    case 'prerender-ppr': {\n      if (workStore.forceStatic) {\n        return\n      }\n      throw new BailoutToCSRError(expression)\n    }\n    case 'prerender':\n    case 'prerender-runtime':\n      throw new InvariantError(\n        `\\`${expression}\\` was called from a Server Component. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n      )\n    case 'cache':\n    case 'unstable-cache':\n    case 'private-cache':\n      throw new InvariantError(\n        `\\`${expression}\\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`\n      )\n    case 'generate-static-params':\n      throw new InvariantError(\n        `\\`${expression}\\` was called in \\`generateStaticParams\\`. Next.js should be preventing ${expression} from being included in server component files statically, but did not in this case.`\n      )\n    case 'request':\n      return\n    default:\n      workUnitStore satisfies never\n  }\n}\n\nconst hasSuspenseRegex = /\\n\\s+at Suspense \\(<anonymous>\\)/\n\n// Common implicit body tags that React will treat as body when placed directly in html\nconst bodyAndImplicitTags =\n  'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'\n\n// Detects when RootLayoutBoundary (our framework marker component) appears\n// after Suspense in the component stack, indicating the root layout is wrapped\n// within a Suspense boundary. Ensures no body/html/implicit-body components are in between.\n//\n// Example matches:\n//   at Suspense (<anonymous>)\n//   at __next_root_layout_boundary__ (<anonymous>)\n//\n// Or with other components in between (but not body/html/implicit-body):\n//   at Suspense (<anonymous>)\n//   at SomeComponent (<anonymous>)\n//   at __next_root_layout_boundary__ (<anonymous>)\nconst hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(\n  `\\\\n\\\\s+at Suspense \\\\(<anonymous>\\\\)(?:(?!\\\\n\\\\s+at (?:${bodyAndImplicitTags}) \\\\(<anonymous>\\\\))[\\\\s\\\\S])*?\\\\n\\\\s+at ${ROOT_LAYOUT_BOUNDARY_NAME} \\\\([^\\\\n]*\\\\)`\n)\n\nconst hasMetadataRegex = new RegExp(\n  `\\\\n\\\\s+at ${METADATA_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasViewportRegex = new RegExp(\n  `\\\\n\\\\s+at ${VIEWPORT_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\nconst hasOutletRegex = new RegExp(`\\\\n\\\\s+at ${OUTLET_BOUNDARY_NAME}[\\\\n\\\\s]`)\n\nconst hasInstantValidationBoundaryRegex = new RegExp(\n  `\\\\n\\\\s+at ${INSTANT_VALIDATION_BOUNDARY_NAME}[\\\\n\\\\s]`\n)\n\nexport function trackAllowedDynamicAccess(\n  workStore: WorkStore,\n  componentStack: string,\n  dynamicValidation: DynamicValidationState,\n  clientDynamic: DynamicTrackingState\n) {\n  if (hasOutletRegex.test(componentStack)) {\n    // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n    return\n  } else if (hasMetadataRegex.test(componentStack)) {\n    dynamicValidation.hasDynamicMetadata = true\n    return\n  } else if (hasViewportRegex.test(componentStack)) {\n    dynamicValidation.hasDynamicViewport = true\n    return\n  } else if (\n    hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n      componentStack\n    )\n  ) {\n    // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n    // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n    // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n    dynamicValidation.hasAllowedDynamic = true\n    dynamicValidation.hasSuspenseAboveBody = true\n    return\n  } else if (hasSuspenseRegex.test(componentStack)) {\n    // this error had a Suspense boundary above it so we don't need to report it as a source\n    // of disallowed\n    dynamicValidation.hasAllowedDynamic = true\n    return\n  } else if (clientDynamic.syncDynamicErrorWithStack) {\n    // This task was the task that called the sync error.\n    dynamicValidation.dynamicErrors.push(\n      clientDynamic.syncDynamicErrorWithStack\n    )\n    return\n  } else {\n    const message =\n      `Route \"${workStore.route}\": Uncached data was accessed outside of ` +\n      '<Suspense>. This delays the entire page from rendering, resulting in a ' +\n      'slow user experience. Learn more: ' +\n      'https://nextjs.org/docs/messages/blocking-route'\n    const error = addErrorContext(new Error(message), componentStack, null)\n    dynamicValidation.dynamicErrors.push(error)\n    return\n  }\n}\n\nexport enum DynamicHoleKind {\n  /** We know that this hole is caused by runtime data. */\n  Runtime = 1,\n  /** We know that this hole is caused by dynamic data. */\n  Dynamic = 2,\n}\n\n/** Stores dynamic reasons used during an SSR render in instant validation. */\nexport type InstantValidationState = {\n  hasDynamicMetadata: boolean\n  hasAllowedClientDynamicAboveBoundary: boolean\n  dynamicMetadata: null | Error\n  hasDynamicViewport: boolean\n  hasAllowedDynamic: boolean\n  dynamicErrors: Array<Error>\n  validationPreventingErrors: Array<Error>\n  thrownErrorsOutsideBoundary: Array<unknown>\n  createInstantStack: (() => Error) | null\n}\n\nexport function createInstantValidationState(\n  createInstantStack: (() => Error) | null\n): InstantValidationState {\n  return {\n    hasDynamicMetadata: false,\n    hasAllowedClientDynamicAboveBoundary: false,\n    dynamicMetadata: null,\n    hasDynamicViewport: false,\n    hasAllowedDynamic: false,\n    dynamicErrors: [],\n    validationPreventingErrors: [],\n    thrownErrorsOutsideBoundary: [],\n    createInstantStack,\n  }\n}\n\nexport function trackDynamicHoleInNavigation(\n  workStore: WorkStore,\n  componentStack: string,\n  dynamicValidation: InstantValidationState,\n  clientDynamic: DynamicTrackingState,\n  kind: DynamicHoleKind,\n  boundaryState: ValidationBoundaryTracking\n) {\n  if (hasOutletRegex.test(componentStack)) {\n    // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n    return\n  }\n  if (hasMetadataRegex.test(componentStack)) {\n    const usageDescription =\n      kind === DynamicHoleKind.Runtime\n        ? `Runtime data such as \\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` was accessed inside \\`generateMetadata\\` or you have file-based metadata such as icons that depend on dynamic params segments.`\n        : `Uncached data or \\`connection()\\` was accessed inside \\`generateMetadata\\`.`\n    const message = `Route \"${workStore.route}\": ${usageDescription} Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n    const error = addErrorContext(\n      new Error(message),\n      componentStack,\n      dynamicValidation.createInstantStack\n    )\n    dynamicValidation.dynamicMetadata = error\n    return\n  }\n  if (hasViewportRegex.test(componentStack)) {\n    const usageDescription =\n      kind === DynamicHoleKind.Runtime\n        ? `Runtime data such as \\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` was accessed inside \\`generateViewport\\`.`\n        : `Uncached data or \\`connection()\\` was accessed inside \\`generateViewport\\`.`\n    const message = `Route \"${workStore.route}\": ${usageDescription} This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n    const error = addErrorContext(\n      new Error(message),\n      componentStack,\n      dynamicValidation.createInstantStack\n    )\n    dynamicValidation.dynamicErrors.push(error)\n    return\n  }\n\n  const boundaryLocation =\n    hasInstantValidationBoundaryRegex.exec(componentStack)\n  if (!boundaryLocation) {\n    // We don't see the validation boundary in the component stack,\n    // so this hole must be coming from a shared parent.\n    // Shared parents are fully resolved and don't have RSC holes,\n    // but they can still suspend in a client component during SSR.\n\n    // If we managed to render all the validation boundaries, that means\n    // that the client holes aren't blocking validation and we can disregard them.\n    // Note that we don't even care whether they have suspense or not.\n    if (boundaryState.expectedIds.size === boundaryState.renderedIds.size) {\n      dynamicValidation.hasAllowedClientDynamicAboveBoundary = true\n      dynamicValidation.hasAllowedDynamic = true // Holes outside the boundary contribute to allowing dynamic metadata\n      return\n    } else {\n      // TODO(instant-validation) TODO(NAR-787)\n      // If shared parents blocked us from validating, we should only log\n      // the errors from the innermost (segments), i.e. omit layouts whose\n      // slots managed to render (because clearly they didn't block validation)\n      const message = `Route \"${workStore.route}\": Could not validate \\`unstable_instant\\` because a Client Component in a parent segment prevented the page from rendering.`\n      const error = addErrorContext(\n        new Error(message),\n        componentStack,\n        dynamicValidation.createInstantStack\n      )\n      dynamicValidation.validationPreventingErrors.push(error)\n      return\n    }\n  } else {\n    // The hole originates inside the validation boundary.\n    //\n    // Check if we have a Suspense above the hole, but below the validation boundary.\n    // If we do, then this dynamic usage wouldn't block a navigation to this subtree.\n    // Conversely, if the nearest suspense is above the validation boundary, then this subtree would block.\n    //\n    // Note that in the component stack, children come before parents.\n    //\n    // Valid:\n    //   ...\n    //   at Suspense\n    //   ...\n    //   at __next_prefetch_validation_boundary__\n    //\n    // Invalid:\n    //   ...\n    //   at __next_prefetch_validation_boundary__\n    //   ...\n    //   at Suspense\n    //\n    const suspenseLocation = hasSuspenseRegex.exec(componentStack)\n    if (suspenseLocation) {\n      if (suspenseLocation.index < boundaryLocation.index) {\n        dynamicValidation.hasAllowedDynamic = true\n        return\n      } else {\n        // invalid - fallthrough\n      }\n    }\n  }\n\n  if (clientDynamic.syncDynamicErrorWithStack) {\n    // This task was the task that called the sync error.\n    const syncError = clientDynamic.syncDynamicErrorWithStack\n    if (\n      dynamicValidation.createInstantStack !== null &&\n      syncError.cause === undefined\n    ) {\n      syncError.cause = dynamicValidation.createInstantStack()\n    }\n    dynamicValidation.dynamicErrors.push(syncError)\n    return\n  }\n\n  const usageDescription =\n    kind === DynamicHoleKind.Runtime\n      ? `Runtime data such as \\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` was accessed outside of \\`<Suspense>\\`.`\n      : `Uncached data or \\`connection()\\` was accessed outside of \\`<Suspense>\\`.`\n  const message = `Route \"${workStore.route}\": ${usageDescription} This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`\n  const error = addErrorContext(\n    new Error(message),\n    componentStack,\n    dynamicValidation.createInstantStack\n  )\n  dynamicValidation.dynamicErrors.push(error)\n  return\n}\n\nexport function trackThrownErrorInNavigation(\n  workStore: WorkStore,\n  dynamicValidation: InstantValidationState,\n  thrownValue: unknown,\n  componentStack: string\n) {\n  const boundaryLocation =\n    hasInstantValidationBoundaryRegex.exec(componentStack)\n  if (!boundaryLocation) {\n    // There's no validation boundary on the component stack.\n    // This error may have blocked a boundary from rendering.\n\n    // Wrap the error to provide component context.\n    // This helps for errors from node_modules which would otherwise\n    // have no useful stack information due to ignore-listing,\n    // e.g. next/dynamic with `ssr: false`.\n    const error = addErrorContext(\n      new Error(\n        'An error occurred while attempting to validate instant UI. This error may be preventing the validation from completing.',\n        { cause: thrownValue }\n      ),\n      componentStack,\n      null\n    )\n    dynamicValidation.thrownErrorsOutsideBoundary.push(error)\n  } else {\n    // There's validation boundary on the component stack,\n    // so we know this error didn't block a validation boundary from rendering.\n    // However, this error might be hiding be hiding dynamic content that would\n    // cause validation to fail.\n    const suspenseLocation = hasSuspenseRegex.exec(componentStack)\n    if (suspenseLocation) {\n      if (suspenseLocation.index < boundaryLocation.index) {\n        // There's a Suspense below the validation boundary but above this error's location.\n        // This subtree can't fail instant validation because any potential\n        // dynamic holes would be guarded by the Suspense anyway,\n        // so we can allow this.\n        return\n      } else {\n        // invalid - fallthrough\n      }\n    }\n    const message = `Route \"${workStore.route}\": Could not validate \\`unstable_instant\\` because an error prevented the target segment from rendering.`\n    const error = addErrorContext(\n      new Error(message, { cause: thrownValue }),\n      componentStack,\n      null // TODO(instant-validation-build): conflicting use of cause\n    )\n    dynamicValidation.validationPreventingErrors.push(error)\n  }\n}\n\nexport function trackDynamicHoleInRuntimeShell(\n  workStore: WorkStore,\n  componentStack: string,\n  dynamicValidation: DynamicValidationState,\n  clientDynamic: DynamicTrackingState\n) {\n  if (hasOutletRegex.test(componentStack)) {\n    // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n    return\n  } else if (hasMetadataRegex.test(componentStack)) {\n    const message = `Route \"${workStore.route}\": Uncached data or \\`connection()\\` was accessed inside \\`generateMetadata\\`. Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n    const error = addErrorContext(new Error(message), componentStack, null)\n    dynamicValidation.dynamicMetadata = error\n    return\n  } else if (hasViewportRegex.test(componentStack)) {\n    // TODO(instant-validation): If the page only has holes caused by runtime data,\n    // we won't find out if there's a suspense-above-body and error for dynamic viewport\n    // even if there is in fact a suspense-above-body\n    const message = `Route \"${workStore.route}\": Uncached data or \\`connection()\\` was accessed inside \\`generateViewport\\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n    const error = addErrorContext(new Error(message), componentStack, null)\n    dynamicValidation.dynamicErrors.push(error)\n    return\n  } else if (\n    hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n      componentStack\n    )\n  ) {\n    // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n    // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n    // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n    dynamicValidation.hasAllowedDynamic = true\n    dynamicValidation.hasSuspenseAboveBody = true\n    return\n  } else if (hasSuspenseRegex.test(componentStack)) {\n    // this error had a Suspense boundary above it so we don't need to report it as a source\n    // of disallowed\n    dynamicValidation.hasAllowedDynamic = true\n    return\n  } else if (clientDynamic.syncDynamicErrorWithStack) {\n    // This task was the task that called the sync error.\n    dynamicValidation.dynamicErrors.push(\n      clientDynamic.syncDynamicErrorWithStack\n    )\n    return\n  }\n\n  const message = `Route \"${workStore.route}\": Uncached data or \\`connection()\\` was accessed outside of \\`<Suspense>\\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`\n  const error = addErrorContext(new Error(message), componentStack, null)\n  dynamicValidation.dynamicErrors.push(error)\n  return\n}\n\nexport function trackDynamicHoleInStaticShell(\n  workStore: WorkStore,\n  componentStack: string,\n  dynamicValidation: DynamicValidationState,\n  clientDynamic: DynamicTrackingState\n) {\n  if (hasOutletRegex.test(componentStack)) {\n    // We don't need to track that this is dynamic. It is only so when something else is also dynamic.\n    return\n  } else if (hasMetadataRegex.test(componentStack)) {\n    const message = `Route \"${workStore.route}\": Runtime data such as \\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` was accessed inside \\`generateMetadata\\` or you have file-based metadata such as icons that depend on dynamic params segments. Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n    const error = addErrorContext(new Error(message), componentStack, null)\n    dynamicValidation.dynamicMetadata = error\n    return\n  } else if (hasViewportRegex.test(componentStack)) {\n    const message = `Route \"${workStore.route}\": Runtime data such as \\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` was accessed inside \\`generateViewport\\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n    const error = addErrorContext(new Error(message), componentStack, null)\n    dynamicValidation.dynamicErrors.push(error)\n    return\n  } else if (\n    hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(\n      componentStack\n    )\n  ) {\n    // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.\n    // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense\n    // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.\n    dynamicValidation.hasAllowedDynamic = true\n    dynamicValidation.hasSuspenseAboveBody = true\n    return\n  } else if (hasSuspenseRegex.test(componentStack)) {\n    // this error had a Suspense boundary above it so we don't need to report it as a source\n    // of disallowed\n    dynamicValidation.hasAllowedDynamic = true\n    return\n  } else if (clientDynamic.syncDynamicErrorWithStack) {\n    // This task was the task that called the sync error.\n    dynamicValidation.dynamicErrors.push(\n      clientDynamic.syncDynamicErrorWithStack\n    )\n    return\n  } else {\n    const message = `Route \"${workStore.route}\": Runtime data such as \\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` was accessed outside of \\`<Suspense>\\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`\n    const error = addErrorContext(new Error(message), componentStack, null)\n    dynamicValidation.dynamicErrors.push(error)\n    return\n  }\n}\n\n/**\n * In dev mode, we prefer using the owner stack, otherwise the provided\n * component stack is used.\n *\n * Accepts an already-created Error so the SWC error-code plugin can see the\n * `new Error(...)` call at each call site and auto-assign error codes.\n */\nfunction addErrorContext(\n  error: Error,\n  componentStack: string,\n  createInstantStack: (() => Error) | null\n) {\n  const ownerStack =\n    process.env.NODE_ENV !== 'production' && React.captureOwnerStack\n      ? React.captureOwnerStack()\n      : null\n\n  if (createInstantStack !== null) {\n    error.cause = createInstantStack()\n  }\n  // TODO go back to owner stack here if available. This is temporarily using componentStack to get the right\n  //\n  error.stack =\n    error.name + ': ' + error.message + (ownerStack || componentStack)\n  return error\n}\n\nexport enum PreludeState {\n  Full = 0,\n  Empty = 1,\n  Errored = 2,\n}\n\nexport function logDisallowedDynamicError(\n  workStore: WorkStore,\n  error: Error\n): void {\n  console.error(error)\n\n  if (process.env.NODE_ENV !== 'development') {\n    console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:\n  - Start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.\n  - Rerun the production build with \\`next build --debug-prerender\\` to generate better stack traces.`)\n  } else if (!process.env.__NEXT_DEV_SERVER) {\n    console.error(\n      `To debug the issue, start the app in development mode by running \\`next dev\\`, then open \"${workStore.route}\" in your browser to investigate the error.`\n    )\n  }\n}\n\nexport function throwIfDisallowedDynamic(\n  workStore: WorkStore,\n  prelude: PreludeState,\n  dynamicValidation: DynamicValidationState,\n  serverDynamic: DynamicTrackingState\n): void {\n  if (serverDynamic.syncDynamicErrorWithStack) {\n    logDisallowedDynamicError(\n      workStore,\n      serverDynamic.syncDynamicErrorWithStack\n    )\n    throw new StaticGenBailoutError()\n  }\n\n  if (prelude !== PreludeState.Full) {\n    if (dynamicValidation.hasSuspenseAboveBody) {\n      // This route has opted into allowing fully dynamic rendering\n      // by including a Suspense boundary above the body. In this case\n      // a lack of a shell is not considered disallowed so we simply return\n      return\n    }\n\n    // We didn't have any sync bailouts but there may be user code which\n    // blocked the root. We would have captured these during the prerender\n    // and can log them here and then terminate the build/validating render\n    const dynamicErrors = dynamicValidation.dynamicErrors\n    if (dynamicErrors.length > 0) {\n      for (let i = 0; i < dynamicErrors.length; i++) {\n        logDisallowedDynamicError(workStore, dynamicErrors[i])\n      }\n\n      throw new StaticGenBailoutError()\n    }\n\n    // If we got this far then the only other thing that could be blocking\n    // the root is dynamic Viewport. If this is dynamic then\n    // you need to opt into that by adding a Suspense boundary above the body\n    // to indicate your are ok with fully dynamic rendering.\n    if (dynamicValidation.hasDynamicViewport) {\n      console.error(\n        `Route \"${workStore.route}\" has a \\`generateViewport\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`\n      )\n      throw new StaticGenBailoutError()\n    }\n\n    if (prelude === PreludeState.Empty) {\n      // If we ever get this far then we messed up the tracking of invalid dynamic.\n      // We still adhere to the constraint that you must produce a shell but invite the\n      // user to report this as a bug in Next.js.\n      console.error(\n        `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`\n      )\n      throw new StaticGenBailoutError()\n    }\n  } else {\n    if (\n      dynamicValidation.hasAllowedDynamic === false &&\n      dynamicValidation.hasDynamicMetadata\n    ) {\n      console.error(\n        `Route \"${workStore.route}\" has a \\`generateMetadata\\` that depends on Request data (\\`cookies()\\`, etc...) or uncached external data (\\`fetch(...)\\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`\n      )\n      throw new StaticGenBailoutError()\n    }\n  }\n}\n\nexport function getStaticShellDisallowedDynamicReasons(\n  workStore: WorkStore,\n  prelude: PreludeState,\n  dynamicValidation: DynamicValidationState,\n  configAllowsBlocking: boolean\n): Array<Error> {\n  if (configAllowsBlocking || dynamicValidation.hasSuspenseAboveBody) {\n    // This route has opted into allowing fully dynamic rendering\n    // by including a Suspense boundary above the body. In this case\n    // a lack of a shell is not considered disallowed so we simply return\n    return []\n  }\n\n  if (prelude !== PreludeState.Full) {\n    // We didn't have any sync bailouts but there may be user code which\n    // blocked the root. We would have captured these during the prerender\n    // and can log them here and then terminate the build/validating render\n    const dynamicErrors = dynamicValidation.dynamicErrors\n    if (dynamicErrors.length > 0) {\n      return dynamicErrors\n    }\n\n    if (prelude === PreludeState.Empty) {\n      // If we ever get this far then we messed up the tracking of invalid dynamic.\n      // We still adhere to the constraint that you must produce a shell but invite the\n      // user to report this as a bug in Next.js.\n      return [\n        new InvariantError(\n          `Route \"${workStore.route}\" did not produce a static shell and Next.js was unable to determine a reason.`\n        ),\n      ]\n    }\n  } else {\n    // We have a prelude but we might still have dynamic metadata without any other dynamic access\n    if (\n      dynamicValidation.hasAllowedDynamic === false &&\n      dynamicValidation.dynamicErrors.length === 0 &&\n      dynamicValidation.dynamicMetadata\n    ) {\n      return [dynamicValidation.dynamicMetadata]\n    }\n  }\n  // We had a non-empty prelude and there are no dynamic holes\n  return []\n}\n\nexport function getNavigationDisallowedDynamicReasons(\n  workStore: WorkStore,\n  prelude: PreludeState,\n  dynamicValidation: InstantValidationState,\n  validationSampleTracking: InstantValidationSampleTracking | null,\n  boundaryState: ValidationBoundaryTracking\n): Array<Error> {\n  // If we have errors related to missing samples, those should take precedence over everything else.\n  if (validationSampleTracking) {\n    const { missingSampleErrors } = validationSampleTracking\n    if (missingSampleErrors.length > 0) {\n      return missingSampleErrors\n    }\n  }\n\n  const { validationPreventingErrors } = dynamicValidation\n  if (validationPreventingErrors.length > 0) {\n    return validationPreventingErrors\n  }\n\n  if (boundaryState.renderedIds.size < boundaryState.expectedIds.size) {\n    const { thrownErrorsOutsideBoundary, createInstantStack } =\n      dynamicValidation\n    if (thrownErrorsOutsideBoundary.length === 0) {\n      const message = `Route \"${workStore.route}\": Could not validate \\`unstable_instant\\` because the target segment was prevented from rendering for an unknown reason.`\n      const error =\n        createInstantStack !== null ? createInstantStack() : new Error()\n      error.name = 'Error'\n      error.message = message\n      return [error]\n    } else if (thrownErrorsOutsideBoundary.length === 1) {\n      const message = `Route \"${workStore.route}\": Could not validate \\`unstable_instant\\` because the target segment was prevented from rendering, likely due to the following error.`\n      const error =\n        createInstantStack !== null ? createInstantStack() : new Error()\n      error.name = 'Error'\n      error.message = message\n      return [error, thrownErrorsOutsideBoundary[0] as Error]\n    } else {\n      const message = `Route \"${workStore.route}\": Could not validate \\`unstable_instant\\` because the target segment was prevented from rendering, likely due to one of the following errors.`\n      const error =\n        createInstantStack !== null ? createInstantStack() : new Error()\n      error.name = 'Error'\n      error.message = message\n      return [error, ...(thrownErrorsOutsideBoundary as Error[])]\n    }\n  }\n\n  // NOTE: We don't care about Suspense above body here,\n  // we're only concerned with the validation boundary\n  if (prelude !== PreludeState.Full) {\n    const dynamicErrors = dynamicValidation.dynamicErrors\n    if (dynamicErrors.length > 0) {\n      return dynamicErrors\n    }\n\n    if (prelude === PreludeState.Empty) {\n      // If a client component suspended prevented us from rendering a shell\n      // but didn't block validation, we don't require a prelude.\n      if (dynamicValidation.hasAllowedClientDynamicAboveBoundary) {\n        return []\n      }\n      // If we ever get this far then we messed up the tracking of invalid dynamic.\n      return [\n        new InvariantError(\n          `Route \"${workStore.route}\" failed to render during instant validation and Next.js was unable to determine a reason.`\n        ),\n      ]\n    }\n  } else {\n    const dynamicErrors = dynamicValidation.dynamicErrors\n    if (dynamicErrors.length > 0) {\n      return dynamicErrors\n    }\n\n    if (\n      dynamicValidation.hasAllowedDynamic === false &&\n      dynamicValidation.dynamicMetadata\n    ) {\n      return [dynamicValidation.dynamicMetadata]\n    }\n  }\n  // We had a non-empty prelude and there are no dynamic holes\n  return []\n}\n","export const INSTANT_VALIDATION_BOUNDARY_NAME =\n  '__next_instant_validation_boundary__'\n","import type { Params } from '../../request/params'\nimport type { ReadonlyURLSearchParams } from '../../../client/components/readonly-url-search-params'\nimport { workUnitAsyncStorage } from '../work-unit-async-storage.external'\nimport { workAsyncStorage } from '../work-async-storage.external'\nimport {\n  createExhaustiveParamsProxy,\n  createExhaustiveURLSearchParamsProxy,\n  trackMissingSampleErrorAndThrow,\n} from './instant-samples'\nimport { InstantValidationError } from './instant-validation-error'\n\nexport function instrumentParamsForClientValidation<TPArams extends Params>(\n  underlyingParams: TPArams\n): TPArams {\n  const workStore = workAsyncStorage.getStore()\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workStore && workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'validation-client': {\n        if (workUnitStore.validationSamples) {\n          const declaredKeys = new Set(\n            Object.keys(workUnitStore.validationSamples.params ?? {})\n          )\n          return createExhaustiveParamsProxy(\n            underlyingParams,\n            declaredKeys,\n            workStore.route\n          )\n        }\n        break\n      }\n      case 'prerender-runtime':\n      case 'prerender-client':\n      case 'prerender-legacy':\n      case 'prerender-ppr':\n      case 'prerender':\n      case 'cache':\n      case 'request':\n      case 'private-cache':\n      case 'unstable-cache':\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n  return underlyingParams\n}\n\nexport function expectCompleteParamsInClientValidation(\n  expression: string\n): void {\n  const workStore = workAsyncStorage.getStore()\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workStore && workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'validation-client': {\n        if (workUnitStore.validationSamples) {\n          const fallbackParams = workUnitStore.fallbackRouteParams\n          if (fallbackParams && fallbackParams.size > 0) {\n            const missingParams = Array.from(fallbackParams.keys())\n            trackMissingSampleErrorAndThrow(\n              new InstantValidationError(\n                `Route \"${workStore.route}\" called ${expression} but param${missingParams.length > 1 ? 's' : ''} ${missingParams.map((p) => `\"${p}\"`).join(', ')} ${missingParams.length > 1 ? 'are' : 'is'} not defined in the \\`samples\\` of \\`unstable_instant\\`. ` +\n                  `${expression} requires all route params to be provided.`\n              )\n            )\n          }\n        }\n        break\n      }\n      case 'prerender-runtime':\n      case 'prerender-client':\n      case 'prerender-legacy':\n      case 'prerender-ppr':\n      case 'prerender':\n      case 'cache':\n      case 'request':\n      case 'private-cache':\n      case 'unstable-cache':\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n}\n\nexport function instrumentSearchParamsForClientValidation(\n  underlyingSearchParams: ReadonlyURLSearchParams\n): ReadonlyURLSearchParams {\n  const workStore = workAsyncStorage.getStore()\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workStore && workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'validation-client': {\n        if (workUnitStore.validationSamples) {\n          const declaredKeys = new Set(\n            Object.keys(workUnitStore.validationSamples.searchParams ?? {})\n          )\n          return createExhaustiveURLSearchParamsProxy(\n            underlyingSearchParams,\n            declaredKeys,\n            workStore.route\n          )\n        }\n        break\n      }\n      case 'prerender-runtime':\n      case 'prerender-client':\n      case 'prerender-legacy':\n      case 'prerender-ppr':\n      case 'prerender':\n      case 'cache':\n      case 'request':\n      case 'private-cache':\n      case 'unstable-cache':\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n  return underlyingSearchParams\n}\n","import type { InstantSample } from '../../../build/segment-config/app/app-segment-config'\nimport type { ReadonlyRequestCookies } from '../../web/spec-extension/adapters/request-cookies'\nimport type { ReadonlyHeaders } from '../../web/spec-extension/adapters/headers'\nimport type { DraftModeProvider } from '../../async-storage/draft-mode-provider'\nimport type { Params } from '../../request/params'\n\nimport { RequestCookies } from '../../web/spec-extension/cookies'\nimport { RequestCookiesAdapter } from '../../web/spec-extension/adapters/request-cookies'\nimport { HeadersAdapter } from '../../web/spec-extension/adapters/headers'\nimport type { SearchParams } from '../../request/search-params'\nimport { getSegmentParam } from '../../../shared/lib/router/utils/get-segment-param'\nimport { parseRelativeUrl } from '../../../shared/lib/router/utils/parse-relative-url'\nimport { InvariantError } from '../../../shared/lib/invariant-error'\nimport { InstantValidationError } from './instant-validation-error'\nimport { workUnitAsyncStorage } from '../work-unit-async-storage.external'\nimport { wellKnownProperties } from '../../../shared/lib/utils/reflect-utils'\nimport type { WorkStore } from '../work-async-storage.external'\n\nexport type InstantValidationSampleTracking = {\n  // TODO(instant-validation-build): track which samples config we used and attribute errors\n  missingSampleErrors: InstantValidationError[]\n}\n\nexport function createValidationSampleTracking(): InstantValidationSampleTracking {\n  return {\n    missingSampleErrors: [],\n  }\n}\n\nfunction getExpectedSampleTracking(): InstantValidationSampleTracking {\n  let validationSampleTracking: InstantValidationSampleTracking | null = null\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'request':\n      case 'validation-client':\n        // TODO(instant-validation-build): do we need any special handling for caches?\n        validationSampleTracking =\n          workUnitStore.validationSampleTracking ?? null\n        break\n      case 'cache':\n      case 'private-cache':\n      case 'unstable-cache':\n      case 'prerender-legacy':\n      case 'prerender-ppr':\n      case 'prerender-client':\n      case 'prerender':\n      case 'prerender-runtime':\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n  if (!validationSampleTracking) {\n    throw new InvariantError(\n      'Expected to have a workUnitStore that provides validationSampleTracking'\n    )\n  }\n  return validationSampleTracking\n}\n\nexport function trackMissingSampleError(error: InstantValidationError): void {\n  const validationSampleTracking = getExpectedSampleTracking()\n  validationSampleTracking.missingSampleErrors.push(error)\n}\n\nexport function trackMissingSampleErrorAndThrow(\n  error: InstantValidationError\n): never {\n  // TODO(instant-validation-build): this should abort the render\n  trackMissingSampleError(error)\n  throw error\n}\n\n/**\n * Creates ReadonlyRequestCookies from sample cookie data.\n * Accessing a cookie not declared in the sample will throw an error.\n * Cookies with `value: null` are declared (allowed to access) but return no value.\n */\nexport function createCookiesFromSample(\n  sampleCookies: InstantSample['cookies'],\n  route: string\n): ReadonlyRequestCookies {\n  const declaredNames = new Set<string>()\n\n  const cookies = new RequestCookies(new Headers())\n  if (sampleCookies) {\n    for (const cookie of sampleCookies) {\n      declaredNames.add(cookie.name)\n      if (cookie.value !== null) {\n        cookies.set(cookie.name, cookie.value)\n      }\n    }\n  }\n\n  const sealed = RequestCookiesAdapter.seal(cookies)\n\n  return new Proxy(sealed, {\n    get(target, prop, receiver) {\n      if (prop === 'has') {\n        const originalMethod = Reflect.get(target, prop, receiver)\n        const wrappedMethod: typeof originalMethod = function (name) {\n          if (!declaredNames.has(name)) {\n            trackMissingSampleErrorAndThrow(\n              createMissingCookieSampleError(route, name)\n            )\n          }\n          return originalMethod.call(target, name)\n        }\n        return wrappedMethod\n      }\n      if (prop === 'get') {\n        const originalMethod = Reflect.get(target, prop, receiver)\n        const wrappedMethod: typeof originalMethod = function (nameOrCookie) {\n          let name: string\n          if (typeof nameOrCookie === 'string') {\n            name = nameOrCookie\n          } else if (\n            nameOrCookie &&\n            typeof nameOrCookie === 'object' &&\n            typeof nameOrCookie.name === 'string'\n          ) {\n            name = nameOrCookie.name\n          } else {\n            // This is an invalid input. Pass it through to the original method so it can error.\n            return originalMethod.call(target, nameOrCookie)\n          }\n\n          if (!declaredNames.has(name)) {\n            trackMissingSampleErrorAndThrow(\n              createMissingCookieSampleError(route, name)\n            )\n          }\n          return originalMethod.call(target, name)\n        }\n        return wrappedMethod\n      }\n\n      // TODO(instant-validation-build): what should getAll do?\n      // Maybe we should only allow it if there's an array (possibly empty?)\n\n      return Reflect.get(target, prop, receiver)\n    },\n  })\n}\n\nfunction createMissingCookieSampleError(\n  route: string,\n  name: string\n): InstantValidationError {\n  return new InstantValidationError(\n    `Route \"${route}\" accessed cookie \"${name}\" which is not defined in the \\`samples\\` ` +\n      `of \\`unstable_instant\\`. Add it to the sample's \\`cookies\\` array, ` +\n      `or \\`{ name: \"${name}\", value: null }\\` if it should be absent.`\n  )\n}\n\n/**\n * Creates ReadonlyHeaders from sample header data.\n * Accessing a header not declared in the sample will throw an error.\n * Headers with `value: null` are declared (allowed to access) but return null.\n */\nexport function createHeadersFromSample(\n  rawSampleHeaders: InstantSample['headers'],\n  sampleCookies: InstantSample['cookies'],\n  route: string\n): ReadonlyHeaders {\n  // If we have cookie samples, add a `cookie` header to match.\n  // Accessing it will be implicitly allowed by the proxy --\n  // if the user defined some cookies, accessing the \"cookie\" header is also fine.\n  const sampleHeaders = rawSampleHeaders ? [...rawSampleHeaders] : []\n  if (sampleHeaders.find(([name]) => name.toLowerCase() === 'cookie')) {\n    throw new InstantValidationError(\n      'Invalid sample: Defining cookies via a \"cookie\" header is not supported. Use `cookies: [{ name: ..., value: ... }]` instead.'\n    )\n  }\n  if (sampleCookies) {\n    const cookieHeaderValue = sampleCookies.toString()\n    sampleHeaders.push([\n      'cookie',\n      // if the `cookies` samples were empty, or they were all `null`, then we have no cookies,\n      // and the header isn't present, but should remains readable, so we set it to null.\n      cookieHeaderValue !== '' ? cookieHeaderValue : null,\n    ])\n  }\n\n  const declaredNames = new Set<string>()\n  const headersInit: Record<string, string> = {}\n\n  for (const [name, value] of sampleHeaders) {\n    declaredNames.add(name.toLowerCase())\n    if (value !== null) {\n      headersInit[name.toLowerCase()] = value\n    }\n  }\n\n  const sealed = HeadersAdapter.seal(HeadersAdapter.from(headersInit))\n\n  return new Proxy(sealed, {\n    get(target, prop, receiver) {\n      if (prop === 'get' || prop === 'has') {\n        const originalMethod = Reflect.get(target, prop, receiver)\n        const patchedMethod: typeof originalMethod = function (rawName) {\n          const name = rawName.toLowerCase()\n          if (!declaredNames.has(name)) {\n            trackMissingSampleErrorAndThrow(\n              new InstantValidationError(\n                `Route \"${route}\" accessed header \"${name}\" which is not defined in the \\`samples\\` ` +\n                  `of \\`unstable_instant\\`. Add it to the sample's \\`headers\\` array, ` +\n                  `or \\`[\"${name}\", null]\\` if it should be absent.`\n              )\n            )\n          }\n          // typescript can't reconcile a union of functions with a union of return types,\n          // so we have to cast the original return type away\n          return (originalMethod as (...args: any[]) => any).call(target, name)\n        }\n        return patchedMethod\n      }\n      return Reflect.get(target, prop, receiver)\n    },\n  })\n}\n\n/**\n * Creates a DraftModeProvider that always returns isEnabled: false.\n */\nexport function createDraftModeForValidation(): DraftModeProvider {\n  // Create a minimal DraftModeProvider-compatible object\n  // that always reports draft mode as disabled.\n  //\n  // private properties that can't be set from outside the class.\n  return {\n    get isEnabled() {\n      return false\n    },\n    enable() {\n      throw new Error(\n        'Draft mode cannot be enabled during build-time instant validation.'\n      )\n    },\n    disable() {\n      throw new Error(\n        'Draft mode cannot be disabled during build-time instant validation.'\n      )\n    },\n  } as Partial<DraftModeProvider> as DraftModeProvider\n}\n\n/**\n * Creates params wrapped with an exhaustive proxy.\n * Accessing a param not declared in the sample will throw an error.\n */\nexport function createExhaustiveParamsProxy<TParams extends Params>(\n  underlyingParams: TParams,\n  declaredParamNames: Set<string>,\n  route: string\n): TParams {\n  return new Proxy(underlyingParams, {\n    get(target, prop, receiver) {\n      if (\n        typeof prop === 'string' &&\n        !wellKnownProperties.has(prop) &&\n        // Only error when accessing a param that is part of the route but wasn't provided.\n        // accessing properties that aren't expected to be a valid param value is fine.\n        prop in underlyingParams &&\n        !declaredParamNames.has(prop)\n      ) {\n        trackMissingSampleErrorAndThrow(\n          new InstantValidationError(\n            `Route \"${route}\" accessed param \"${prop}\" which is not defined in the \\`samples\\` ` +\n              `of \\`unstable_instant\\`. Add it to the sample's \\`params\\` object.`\n          )\n        )\n      }\n      return Reflect.get(target, prop, receiver)\n    },\n    // We don't need to override `has` or `ownKeys`.\n    // the shape of the params object is determined by the routing structure\n    // and independent of the samples. We only need to instrument accessing the values.\n  })\n}\n\n/**\n * Creates searchParams wrapped with an exhaustive proxy.\n * Accessing a searchParam not declared in the sample will throw an error.\n * A searchParam with `value: undefined` means \"declared but absent\" (allowed to access, returns undefined).\n */\nexport function createExhaustiveSearchParamsProxy(\n  searchParams: SearchParams,\n  declaredSearchParamNames: Set<string>,\n  route: string\n): SearchParams {\n  return new Proxy(searchParams, {\n    get(target, prop, receiver) {\n      if (\n        typeof prop === 'string' &&\n        !wellKnownProperties.has(prop) &&\n        !declaredSearchParamNames.has(prop)\n      ) {\n        trackMissingSampleErrorAndThrow(\n          createMissingSearchParamSampleError(route, prop)\n        )\n      }\n      return Reflect.get(target, prop, receiver)\n    },\n    has(target, prop) {\n      if (\n        typeof prop === 'string' &&\n        !wellKnownProperties.has(prop) &&\n        !declaredSearchParamNames.has(prop)\n      ) {\n        trackMissingSampleErrorAndThrow(\n          createMissingSearchParamSampleError(route, prop)\n        )\n      }\n      return Reflect.has(target, prop)\n    },\n  })\n}\n\n/**\n * Wraps a URLSearchParams (or subclass like ReadonlyURLSearchParams) with an\n * exhaustive proxy. Accessing a search param not declared in the sample via\n * get/getAll/has will throw an error.\n */\nexport function createExhaustiveURLSearchParamsProxy<T extends URLSearchParams>(\n  searchParams: T,\n  declaredSearchParamNames: Set<string>,\n  route: string\n): T {\n  return new Proxy(searchParams, {\n    get(target, prop, receiver) {\n      // Intercept method calls that access specific param names\n      if (prop === 'get' || prop === 'getAll' || prop === 'has') {\n        const originalMathod = Reflect.get(target, prop, receiver)\n        return (name: string) => {\n          if (typeof name === 'string' && !declaredSearchParamNames.has(name)) {\n            trackMissingSampleErrorAndThrow(\n              createMissingSearchParamSampleError(route, name)\n            )\n          }\n          return (originalMathod as (...args: any[]) => any).call(target, name)\n        }\n      }\n      const value = Reflect.get(target, prop, receiver)\n      // Prevent `TypeError: Value of \"this\" must be of type URLSearchParams` for methods\n      if (typeof value === 'function' && !Object.hasOwn(target, prop)) {\n        return value.bind(target)\n      }\n      return value\n    },\n  })\n}\n\nfunction createMissingSearchParamSampleError(\n  route: string,\n  name: string\n): InstantValidationError {\n  return new InstantValidationError(\n    `Route \"${route}\" accessed searchParam \"${name}\" which is not defined in the \\`samples\\` ` +\n      `of \\`unstable_instant\\`. Add it to the sample's \\`searchParams\\` object, ` +\n      `or \\`{ \"${name}\": null }\\` if it should be absent.`\n  )\n}\n\nexport function createRelativeURLFromSamples(\n  route: string,\n  sampleParams: InstantSample['params'],\n  sampleSearchParams: InstantSample['searchParams']\n) {\n  // Build searchParams query object and URL search string from sample\n  const pathname = createPathnameFromRouteAndSampleParams(\n    route,\n    sampleParams ?? {}\n  )\n\n  let search = ''\n  if (sampleSearchParams) {\n    const qs = createURLSearchParamsFromSample(sampleSearchParams).toString()\n    if (qs) {\n      search = '?' + qs\n    }\n  }\n\n  return parseRelativeUrl(pathname + search, undefined, true)\n}\n\nfunction createURLSearchParamsFromSample(\n  sampleSearchParams: InstantSample['searchParams']\n) {\n  const result = new URLSearchParams()\n  if (sampleSearchParams) {\n    for (const [key, value] of Object.entries(sampleSearchParams)) {\n      if (value === null || value === undefined) continue\n      if (Array.isArray(value)) {\n        for (const v of value) {\n          result.append(key, v)\n        }\n      } else {\n        result.set(key, value)\n      }\n    }\n  }\n  return result\n}\n\n/**\n * Substitute sample params into `workStore.route` to create a plausible pathname.\n * TODO(instant-validation-build): this logic is somewhat hacky and likely incomplete,\n * but it should be good enough for some initial testing.\n */\nfunction createPathnameFromRouteAndSampleParams(route: string, params: Params) {\n  let interpolatedSegments: string[] = []\n  const rawSegments = route.split('/')\n  for (const rawSegment of rawSegments) {\n    const param = getSegmentParam(rawSegment)\n    if (param) {\n      switch (param.paramType) {\n        case 'catchall':\n        case 'optional-catchall': {\n          let paramValue = params[param.paramName]\n          if (paramValue === undefined) {\n            // The value for the param was not provided. `usePathname` will detect this and throw\n            // before this can surface to userspace. Use `[...NAME]` as a placeholder for the param value\n            // in case it pops up somewhere unexpectedly.\n            paramValue = [rawSegment]\n          } else if (!Array.isArray(paramValue)) {\n            // NOTE: this happens outside of render, so we don't need `trackMissingSampleErrorAndThrow`\n            throw new InstantValidationError(\n              `Expected sample param value for segment '${rawSegment}' to be an array of strings, got ${typeof paramValue}`\n            )\n          }\n          interpolatedSegments.push(\n            ...paramValue.map((v) => encodeURIComponent(v))\n          )\n          break\n        }\n        case 'dynamic': {\n          let paramValue = params[param.paramName]\n          if (paramValue === undefined) {\n            // The value for the param was not provided. `usePathname` will detect this and throw\n            // before this can surface to userspace. Use `[NAME]` as a placeholder for the param value\n            // in case it pops up somewhere unexpectedly.\n            paramValue = rawSegment\n          } else if (typeof paramValue !== 'string') {\n            // NOTE: this happens outside of render, so we don't need `trackMissingSampleErrorAndThrow`\n            throw new InstantValidationError(\n              `Expected sample param value for segment '${rawSegment}' to be a string, got ${typeof paramValue}`\n            )\n          }\n          interpolatedSegments.push(encodeURIComponent(paramValue))\n          break\n        }\n        case 'catchall-intercepted-(..)(..)':\n        case 'catchall-intercepted-(.)':\n        case 'catchall-intercepted-(..)':\n        case 'catchall-intercepted-(...)':\n        case 'dynamic-intercepted-(..)(..)':\n        case 'dynamic-intercepted-(.)':\n        case 'dynamic-intercepted-(..)':\n        case 'dynamic-intercepted-(...)': {\n          // TODO(instant-validation-build): i don't know how these are supposed to work, or if we can even get them here\n          throw new InvariantError(\n            'Not implemented: Validation of interception routes'\n          )\n        }\n        default: {\n          param.paramType satisfies never\n        }\n      }\n    } else {\n      interpolatedSegments.push(rawSegment)\n    }\n  }\n  return interpolatedSegments.join('/')\n}\n\nexport function assertRootParamInSamples(\n  workStore: WorkStore,\n  sampleParams: Params | undefined,\n  paramName: string\n) {\n  if (sampleParams && paramName in sampleParams) {\n    // The param is defined in the samples.\n  } else {\n    const route = workStore.route\n    trackMissingSampleErrorAndThrow(\n      new InstantValidationError(\n        `Route \"${route}\" accessed root param \"${paramName}\" which is not defined in the \\`samples\\` ` +\n          `of \\`unstable_instant\\`. Add it to the sample's \\`params\\` object.`\n      )\n    )\n  }\n}\n","const INSTANT_VALIDATION_ERROR_DIGEST = 'INSTANT_VALIDATION_ERROR'\n\n/** Check if an error is an exhaustive samples validation error (by digest). */\nexport function isInstantValidationError(\n  err: unknown\n): err is InstantValidationError {\n  return !!(\n    err &&\n    typeof err === 'object' &&\n    err instanceof Error &&\n    (err as any).digest === INSTANT_VALIDATION_ERROR_DIGEST\n  )\n}\n\nexport class InstantValidationError extends Error {\n  digest = INSTANT_VALIDATION_ERROR_DIGEST\n}\n","import { InvariantError } from '../../shared/lib/invariant-error'\nimport { createPromiseWithResolvers } from '../../shared/lib/promise-with-resolvers'\n\nexport enum RenderStage {\n  Before = 1,\n  EarlyStatic = 2,\n  Static = 3,\n  EarlyRuntime = 4,\n  Runtime = 5,\n  Dynamic = 6,\n  Abandoned = 7,\n}\n\nexport type AdvanceableRenderStage =\n  | RenderStage.Static\n  | RenderStage.EarlyRuntime\n  | RenderStage.Runtime\n  | RenderStage.Dynamic\n\nexport class StagedRenderingController {\n  currentStage: RenderStage = RenderStage.Before\n\n  syncInterruptReason: Error | null = null\n  staticStageEndTime: number = Infinity\n  runtimeStageEndTime: number = Infinity\n\n  private staticStageListeners: Array<() => void> = []\n  private earlyRuntimeStageListeners: Array<() => void> = []\n  private runtimeStageListeners: Array<() => void> = []\n  private dynamicStageListeners: Array<() => void> = []\n\n  private staticStagePromise = createPromiseWithResolvers<void>()\n  private earlyRuntimeStagePromise = createPromiseWithResolvers<void>()\n  private runtimeStagePromise = createPromiseWithResolvers<void>()\n  private dynamicStagePromise = createPromiseWithResolvers<void>()\n\n  constructor(\n    private abortSignal: AbortSignal | null,\n    private abandonController: AbortController | null,\n    private shouldTrackSyncIO: boolean\n  ) {\n    if (abortSignal) {\n      abortSignal.addEventListener(\n        'abort',\n        () => {\n          // Reject all stage promises that haven't already been resolved.\n          // If a promise was already resolved via advanceStage, the reject\n          // is a no-op. The ignoreReject handler suppresses unhandled\n          // rejection warnings for promises that no one is awaiting.\n          const { reason } = abortSignal\n          this.staticStagePromise.promise.catch(ignoreReject)\n          this.staticStagePromise.reject(reason)\n          this.earlyRuntimeStagePromise.promise.catch(ignoreReject)\n          this.earlyRuntimeStagePromise.reject(reason)\n          this.runtimeStagePromise.promise.catch(ignoreReject)\n          this.runtimeStagePromise.reject(reason)\n          this.dynamicStagePromise.promise.catch(ignoreReject)\n          this.dynamicStagePromise.reject(reason)\n        },\n        { once: true }\n      )\n    }\n\n    if (abandonController) {\n      abandonController.signal.addEventListener(\n        'abort',\n        () => {\n          this.abandonRender()\n        },\n        { once: true }\n      )\n    }\n  }\n\n  onStage(stage: AdvanceableRenderStage, callback: () => void) {\n    if (this.currentStage >= stage) {\n      callback()\n    } else if (stage === RenderStage.Static) {\n      this.staticStageListeners.push(callback)\n    } else if (stage === RenderStage.EarlyRuntime) {\n      this.earlyRuntimeStageListeners.push(callback)\n    } else if (stage === RenderStage.Runtime) {\n      this.runtimeStageListeners.push(callback)\n    } else if (stage === RenderStage.Dynamic) {\n      this.dynamicStageListeners.push(callback)\n    } else {\n      // This should never happen\n      throw new InvariantError(`Invalid render stage: ${stage}`)\n    }\n  }\n\n  shouldTrackSyncInterrupt(): boolean {\n    if (!this.shouldTrackSyncIO) {\n      return false\n    }\n\n    switch (this.currentStage) {\n      case RenderStage.Before:\n        // If we haven't started the render yet, it can't be interrupted.\n        return false\n      case RenderStage.EarlyStatic:\n      case RenderStage.Static:\n        return true\n      case RenderStage.EarlyRuntime:\n        // EarlyRuntime is for runtime-prefetchable segments. Sync IO\n        // should error because it would abort a runtime prefetch.\n        return true\n      case RenderStage.Runtime:\n        // Runtime is for non-prefetchable segments. Sync IO is fine there\n        // because in practice this segment will never be runtime prefetched\n        return false\n      case RenderStage.Dynamic:\n      case RenderStage.Abandoned:\n        return false\n      default:\n        return false\n    }\n  }\n\n  syncInterruptCurrentStageWithReason(reason: Error) {\n    if (this.currentStage === RenderStage.Before) {\n      return\n    }\n\n    // If the render has already been abandoned, there's nothing to interrupt.\n    if (this.currentStage === RenderStage.Abandoned) {\n      return\n    }\n\n    // If Sync IO occurs during an abandonable render, we trigger the abandon.\n    // The abandon listener will call abandonRender which advances through\n    // stages to let caches fill before marking as Abandoned.\n    if (this.abandonController) {\n      this.abandonController.abort()\n      return\n    }\n\n    if (this.abortSignal) {\n      // If this is an abortable render, we capture the interruption reason and stop advancing.\n      // We don't release any more promises.\n      // The caller is expected to abort the signal.\n      this.syncInterruptReason = reason\n      this.currentStage = RenderStage.Abandoned\n      return\n    }\n\n    // If we're in a non-abandonable & non-abortable render,\n    // we need to advance to the Dynamic stage and capture the interruption reason.\n    // (in dev, this will be the restarted render)\n    switch (this.currentStage) {\n      case RenderStage.EarlyStatic:\n      case RenderStage.Static:\n      case RenderStage.EarlyRuntime: {\n        // EarlyRuntime is for runtime-prefetchable segments. Sync IO here\n        // means the prefetch would be aborted too early.\n        this.syncInterruptReason = reason\n        this.advanceStage(RenderStage.Dynamic)\n        return\n      }\n      case RenderStage.Runtime: {\n        // canSyncInterrupt returns false for Runtime, so we should\n        // never get here. Defensive no-op.\n        return\n      }\n      case RenderStage.Dynamic:\n      default:\n    }\n  }\n\n  getSyncInterruptReason() {\n    return this.syncInterruptReason\n  }\n\n  getStaticStageEndTime() {\n    return this.staticStageEndTime\n  }\n\n  getRuntimeStageEndTime() {\n    return this.runtimeStageEndTime\n  }\n\n  private abandonRender() {\n    // In staged rendering, only the initial render is abandonable.\n    // We can abandon the initial render if\n    //   1. We notice a cache miss, and need to wait for caches to fill\n    //   2. A sync IO error occurs, and the render should be interrupted\n    //      (this might be a lazy intitialization of a module,\n    //       so we still want to restart in this case and see if it still occurs)\n    // In either case, we'll be doing another render after this one,\n    // so we only want to unblock the next stage, not Dynamic, because\n    // unblocking the dynamic stage would likely lead to wasted (uncached) IO.\n    const { currentStage } = this\n    switch (currentStage) {\n      case RenderStage.EarlyStatic: {\n        this.resolveStaticStage()\n      }\n      // intentional fallthrough\n      case RenderStage.Static: {\n        this.resolveEarlyRuntimeStage()\n      }\n      // intentional fallthrough\n      case RenderStage.EarlyRuntime: {\n        this.resolveRuntimeStage()\n      }\n      // intentional fallthrough\n      case RenderStage.Runtime: {\n        this.currentStage = RenderStage.Abandoned\n        return\n      }\n      case RenderStage.Dynamic:\n      case RenderStage.Before:\n      case RenderStage.Abandoned:\n        break\n      default: {\n        currentStage satisfies never\n      }\n    }\n  }\n\n  advanceStage(\n    stage:\n      | RenderStage.EarlyStatic\n      | RenderStage.Static\n      | RenderStage.EarlyRuntime\n      | RenderStage.Runtime\n      | RenderStage.Dynamic\n  ) {\n    // If we're already at the target stage or beyond, do nothing.\n    // (this can happen e.g. if sync IO advanced us to the dynamic stage)\n    if (stage <= this.currentStage) {\n      return\n    }\n\n    let currentStage = this.currentStage\n    this.currentStage = stage\n\n    if (currentStage < RenderStage.Static && stage >= RenderStage.Static) {\n      this.resolveStaticStage()\n    }\n    if (\n      currentStage < RenderStage.EarlyRuntime &&\n      stage >= RenderStage.EarlyRuntime\n    ) {\n      this.resolveEarlyRuntimeStage()\n    }\n    if (currentStage < RenderStage.Runtime && stage >= RenderStage.Runtime) {\n      this.staticStageEndTime = performance.now() + performance.timeOrigin\n      this.resolveRuntimeStage()\n    }\n    if (currentStage < RenderStage.Dynamic && stage >= RenderStage.Dynamic) {\n      this.runtimeStageEndTime = performance.now() + performance.timeOrigin\n      this.resolveDynamicStage()\n      return\n    }\n  }\n\n  /** Fire the `onStage` listeners for the static stage and unblock any promises waiting for it. */\n  private resolveStaticStage() {\n    const staticListeners = this.staticStageListeners\n    for (let i = 0; i < staticListeners.length; i++) {\n      staticListeners[i]()\n    }\n    staticListeners.length = 0\n    this.staticStagePromise.resolve()\n  }\n\n  /** Fire the `onStage` listeners for the early runtime stage and unblock any promises waiting for it. */\n  private resolveEarlyRuntimeStage() {\n    const earlyRuntimeListeners = this.earlyRuntimeStageListeners\n    for (let i = 0; i < earlyRuntimeListeners.length; i++) {\n      earlyRuntimeListeners[i]()\n    }\n    earlyRuntimeListeners.length = 0\n    this.earlyRuntimeStagePromise.resolve()\n  }\n\n  /** Fire the `onStage` listeners for the runtime stage and unblock any promises waiting for it. */\n  private resolveRuntimeStage() {\n    const runtimeListeners = this.runtimeStageListeners\n    for (let i = 0; i < runtimeListeners.length; i++) {\n      runtimeListeners[i]()\n    }\n    runtimeListeners.length = 0\n    this.runtimeStagePromise.resolve()\n  }\n\n  /** Fire the `onStage` listeners for the dynamic stage and unblock any promises waiting for it. */\n  private resolveDynamicStage() {\n    const dynamicListeners = this.dynamicStageListeners\n    for (let i = 0; i < dynamicListeners.length; i++) {\n      dynamicListeners[i]()\n    }\n    dynamicListeners.length = 0\n    this.dynamicStagePromise.resolve()\n  }\n\n  private getStagePromise(stage: AdvanceableRenderStage): Promise<void> {\n    switch (stage) {\n      case RenderStage.Static: {\n        return this.staticStagePromise.promise\n      }\n      case RenderStage.EarlyRuntime: {\n        return this.earlyRuntimeStagePromise.promise\n      }\n      case RenderStage.Runtime: {\n        return this.runtimeStagePromise.promise\n      }\n      case RenderStage.Dynamic: {\n        return this.dynamicStagePromise.promise\n      }\n      default: {\n        stage satisfies never\n        throw new InvariantError(`Invalid render stage: ${stage}`)\n      }\n    }\n  }\n\n  waitForStage(stage: AdvanceableRenderStage) {\n    return this.getStagePromise(stage)\n  }\n\n  delayUntilStage<T>(\n    stage: AdvanceableRenderStage,\n    displayName: string | undefined,\n    resolvedValue: T\n  ) {\n    const ioTriggerPromise = this.getStagePromise(stage)\n\n    const promise = makeDevtoolsIOPromiseFromIOTrigger(\n      ioTriggerPromise,\n      displayName,\n      resolvedValue\n    )\n\n    // Analogously to `makeHangingPromise`, we might reject this promise if the signal is invoked.\n    // (e.g. in the case where we don't want want the render to proceed to the dynamic stage and abort it).\n    // We shouldn't consider this an unhandled rejection, so we attach a noop catch handler here to suppress this warning.\n    if (this.abortSignal) {\n      promise.catch(ignoreReject)\n    }\n    return promise\n  }\n}\n\nfunction ignoreReject() {}\n\n// TODO(restart-on-cache-miss): the layering of `delayUntilStage`,\n// `makeDevtoolsIOPromiseFromIOTrigger` and and `makeDevtoolsIOAwarePromise`\n// is confusing, we should clean it up.\nfunction makeDevtoolsIOPromiseFromIOTrigger<T>(\n  ioTrigger: Promise<any>,\n  displayName: string | undefined,\n  resolvedValue: T\n): Promise<T> {\n  // If we create a `new Promise` and give it a displayName\n  // (with no userspace code above us in the stack)\n  // React Devtools will use it as the IO cause when determining \"suspended by\".\n  // In particular, it should shadow any inner IO that resolved/rejected the promise\n  // (in case of staged rendering, this will be the `setTimeout` that triggers the relevant stage)\n  const promise = new Promise<T>((resolve, reject) => {\n    ioTrigger.then(resolve.bind(null, resolvedValue), reject)\n  })\n  if (displayName !== undefined) {\n    // @ts-expect-error\n    promise.displayName = displayName\n  }\n  return promise\n}\n","import crypto from 'crypto'\n\n// Background:\n// https://security.stackexchange.com/questions/184305/why-would-i-ever-use-aes-256-cbc-if-aes-256-gcm-is-more-secure\n\nconst CIPHER_ALGORITHM = `aes-256-gcm`,\n  CIPHER_KEY_LENGTH = 32, // https://stackoverflow.com/a/28307668/4397028\n  CIPHER_IV_LENGTH = 16, // https://stackoverflow.com/a/28307668/4397028\n  CIPHER_TAG_LENGTH = 16,\n  CIPHER_SALT_LENGTH = 64\n\nconst PBKDF2_ITERATIONS = 100_000 // https://support.1password.com/pbkdf2/\n\nexport function encryptWithSecret(secret: Buffer, data: string): string {\n  const iv = crypto.randomBytes(CIPHER_IV_LENGTH)\n  const salt = crypto.randomBytes(CIPHER_SALT_LENGTH)\n\n  // https://nodejs.org/api/crypto.html#crypto_crypto_pbkdf2sync_password_salt_iterations_keylen_digest\n  const key = crypto.pbkdf2Sync(\n    secret,\n    salt,\n    PBKDF2_ITERATIONS,\n    CIPHER_KEY_LENGTH,\n    `sha512`\n  )\n\n  const cipher = crypto.createCipheriv(CIPHER_ALGORITHM, key, iv)\n  const encrypted = Buffer.concat([cipher.update(data, `utf8`), cipher.final()])\n\n  // https://nodejs.org/api/crypto.html#crypto_cipher_getauthtag\n  const tag = cipher.getAuthTag()\n\n  return Buffer.concat([\n    // Data as required by:\n    // Salt for Key: https://nodejs.org/api/crypto.html#crypto_crypto_pbkdf2sync_password_salt_iterations_keylen_digest\n    // IV: https://nodejs.org/api/crypto.html#crypto_class_decipher\n    // Tag: https://nodejs.org/api/crypto.html#crypto_decipher_setauthtag_buffer\n    salt,\n    iv,\n    tag,\n    encrypted,\n  ]).toString(`hex`)\n}\n\nexport function decryptWithSecret(\n  secret: Buffer,\n  encryptedData: string\n): string {\n  const buffer = Buffer.from(encryptedData, `hex`)\n\n  const salt = buffer.slice(0, CIPHER_SALT_LENGTH)\n  const iv = buffer.slice(\n    CIPHER_SALT_LENGTH,\n    CIPHER_SALT_LENGTH + CIPHER_IV_LENGTH\n  )\n  const tag = buffer.slice(\n    CIPHER_SALT_LENGTH + CIPHER_IV_LENGTH,\n    CIPHER_SALT_LENGTH + CIPHER_IV_LENGTH + CIPHER_TAG_LENGTH\n  )\n  const encrypted = buffer.slice(\n    CIPHER_SALT_LENGTH + CIPHER_IV_LENGTH + CIPHER_TAG_LENGTH\n  )\n\n  // https://nodejs.org/api/crypto.html#crypto_crypto_pbkdf2sync_password_salt_iterations_keylen_digest\n  const key = crypto.pbkdf2Sync(\n    secret,\n    salt,\n    PBKDF2_ITERATIONS,\n    CIPHER_KEY_LENGTH,\n    `sha512`\n  )\n\n  const decipher = crypto.createDecipheriv(CIPHER_ALGORITHM, key, iv)\n  decipher.setAuthTag(tag)\n\n  return decipher.update(encrypted) + decipher.final(`utf8`)\n}\n","import {\n  RenderStage,\n  type AdvanceableRenderStage,\n  type StagedRenderingController,\n} from './app-render/staged-rendering'\nimport type {\n  PrerenderStoreModernRuntime,\n  RequestStore,\n} from './app-render/work-unit-async-storage.external'\n\nexport function isHangingPromiseRejectionError(\n  err: unknown\n): err is HangingPromiseRejectionError {\n  if (typeof err !== 'object' || err === null || !('digest' in err)) {\n    return false\n  }\n\n  return err.digest === HANGING_PROMISE_REJECTION\n}\n\nconst HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'\n\nclass HangingPromiseRejectionError extends Error {\n  public readonly digest = HANGING_PROMISE_REJECTION\n\n  constructor(\n    public readonly route: string,\n    public readonly expression: string\n  ) {\n    super(\n      `During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \\`setTimeout\\`, \\`after\\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route \"${route}\".`\n    )\n  }\n}\n\ntype AbortListeners = Array<(err: unknown) => void>\nconst abortListenersBySignal = new WeakMap<AbortSignal, AbortListeners>()\n\n/**\n * This function constructs a promise that will never resolve. This is primarily\n * useful for cacheComponents where we use promise resolution timing to determine which\n * parts of a render can be included in a prerender.\n *\n * @internal\n */\nexport function makeHangingPromise<T>(\n  signal: AbortSignal,\n  route: string,\n  expression: string\n): Promise<T> {\n  if (signal.aborted) {\n    return Promise.reject(new HangingPromiseRejectionError(route, expression))\n  } else {\n    const hangingPromise = new Promise<T>((_, reject) => {\n      const boundRejection = reject.bind(\n        null,\n        new HangingPromiseRejectionError(route, expression)\n      )\n      let currentListeners = abortListenersBySignal.get(signal)\n      if (currentListeners) {\n        currentListeners.push(boundRejection)\n      } else {\n        const listeners = [boundRejection]\n        abortListenersBySignal.set(signal, listeners)\n        signal.addEventListener(\n          'abort',\n          () => {\n            for (let i = 0; i < listeners.length; i++) {\n              listeners[i]()\n            }\n          },\n          { once: true }\n        )\n      }\n    })\n    // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so\n    // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct\n    // your own promise out of it you'll need to ensure you handle the error when it rejects.\n    hangingPromise.catch(ignoreReject)\n    return hangingPromise\n  }\n}\n\nfunction ignoreReject() {}\n\nexport function makeDevtoolsIOAwarePromise<T>(\n  underlying: T,\n  requestStore: RequestStore,\n  stage: AdvanceableRenderStage\n): Promise<T> {\n  if (requestStore.stagedRendering) {\n    // We resolve each stage in a timeout, so React DevTools will pick this up as IO.\n    return requestStore.stagedRendering.delayUntilStage(\n      stage,\n      undefined,\n      underlying\n    )\n  }\n  // in React DevTools if we resolve in a setTimeout we will observe\n  // the promise resolution as something that can suspend a boundary or root.\n  return new Promise<T>((resolve) => {\n    // Must use setTimeout to be considered IO React DevTools. setImmediate will not work.\n    setTimeout(() => {\n      resolve(underlying)\n    }, 0)\n  })\n}\n\n/**\n * Returns the appropriate runtime stage for the current point in the render.\n * Runtime-prefetchable segments render in the early stages and should wait\n * for EarlyRuntime. Non-prefetchable segments render in the later stages\n * and should wait for Runtime.\n */\nexport function getRuntimeStage(\n  stagedRendering: StagedRenderingController\n): RenderStage.EarlyRuntime | RenderStage.Runtime {\n  if (\n    stagedRendering.currentStage === RenderStage.EarlyStatic ||\n    stagedRendering.currentStage === RenderStage.EarlyRuntime\n  ) {\n    return RenderStage.EarlyRuntime\n  }\n  return RenderStage.Runtime\n}\n\n/**\n * Delays until the appropriate runtime stage based on the current stage of\n * the rendering pipeline:\n *\n * - Early stages → wait for EarlyRuntime\n *   (for runtime-prefetchable segments)\n * - Later stages → wait for Runtime\n *   (for segments not using runtime prefetch)\n *\n * This ensures that cookies()/headers()/etc. resolve at the right time for\n * each segment type.\n */\nexport function delayUntilRuntimeStage<T>(\n  prerenderStore: PrerenderStoreModernRuntime,\n  result: Promise<T>\n): Promise<T> {\n  const { stagedRendering } = prerenderStore\n  if (!stagedRendering) {\n    return result\n  }\n  return stagedRendering\n    .waitForStage(getRuntimeStage(stagedRendering))\n    .then(() => result)\n}\n","/**\n * This is the default \"use cache\" handler it defaults to an in-memory store.\n * In-memory caches are fragile and should not use stale-while-revalidate\n * semantics on the caches because it's not worth warming up an entry that's\n * likely going to get evicted before we get to use it anyway. However, we also\n * don't want to reuse a stale entry for too long so stale entries should be\n * considered expired/missing in such cache handlers.\n */\n\nimport { LRUCache } from '../lru-cache'\nimport type { CacheEntry, CacheHandler } from './types'\nimport {\n  areTagsExpired,\n  areTagsStale,\n  tagsManifest,\n  type TagManifestEntry,\n} from '../incremental-cache/tags-manifest.external'\n\ntype PrivateCacheEntry = {\n  entry: CacheEntry\n\n  // For the default cache we store errored cache\n  // entries and allow them to be used up to 3 times\n  // after that we want to dispose it and try for fresh\n\n  // If an entry is errored we return no entry\n  // three times so that we retry hitting origin (MISS)\n  // and then if it still fails to set after the third we\n  // return the errored content and use expiration of\n  // Math.min(30, entry.expiration)\n  isErrored: boolean\n  errorRetryCount: number\n\n  // compute size on set since we need to read size\n  // of the ReadableStream for LRU evicting\n  size: number\n}\n\nexport function createDefaultCacheHandler(maxSize: number): CacheHandler {\n  // If the max size is 0, return a cache handler that doesn't cache anything,\n  // this avoids an unnecessary LRUCache instance and potential memory\n  // allocation.\n  if (maxSize === 0) {\n    return {\n      get: () => Promise.resolve(undefined),\n      set: () => Promise.resolve(),\n      refreshTags: () => Promise.resolve(),\n      getExpiration: () => Promise.resolve(0),\n      updateTags: () => Promise.resolve(),\n    }\n  }\n\n  const memoryCache = new LRUCache<PrivateCacheEntry>(\n    maxSize,\n    (entry) => entry.size\n  )\n  const pendingSets = new Map<string, Promise<void>>()\n\n  const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n    ? console.debug.bind(console, 'DefaultCacheHandler:')\n    : undefined\n\n  return {\n    async get(cacheKey) {\n      const pendingPromise = pendingSets.get(cacheKey)\n\n      if (pendingPromise) {\n        debug?.('get', cacheKey, 'pending')\n        await pendingPromise\n      }\n\n      const privateEntry = memoryCache.get(cacheKey)\n\n      if (!privateEntry) {\n        debug?.('get', cacheKey, 'not found')\n        return undefined\n      }\n\n      const entry = privateEntry.entry\n      if (\n        performance.timeOrigin + performance.now() >\n        entry.timestamp + entry.revalidate * 1000\n      ) {\n        // In-memory caches should expire after revalidate time because it is\n        // unlikely that a new entry will be able to be used before it is dropped\n        // from the cache.\n        debug?.('get', cacheKey, 'expired')\n\n        return undefined\n      }\n\n      let revalidate = entry.revalidate\n\n      if (areTagsExpired(entry.tags, entry.timestamp)) {\n        debug?.('get', cacheKey, 'had expired tag')\n        return undefined\n      }\n\n      if (areTagsStale(entry.tags, entry.timestamp)) {\n        debug?.('get', cacheKey, 'had stale tag')\n        revalidate = -1\n      }\n\n      const [returnStream, newSaved] = entry.value.tee()\n      entry.value = newSaved\n\n      debug?.('get', cacheKey, 'found', {\n        tags: entry.tags,\n        timestamp: entry.timestamp,\n        expire: entry.expire,\n        revalidate,\n      })\n\n      return {\n        ...entry,\n        revalidate,\n        value: returnStream,\n      }\n    },\n\n    async set(cacheKey, pendingEntry) {\n      debug?.('set', cacheKey, 'start')\n\n      let resolvePending: () => void = () => {}\n      const pendingPromise = new Promise<void>((resolve) => {\n        resolvePending = resolve\n      })\n      pendingSets.set(cacheKey, pendingPromise)\n\n      const entry = await pendingEntry\n\n      let size = 0\n\n      try {\n        const [value, clonedValue] = entry.value.tee()\n        entry.value = value\n        const reader = clonedValue.getReader()\n\n        for (let chunk; !(chunk = await reader.read()).done; ) {\n          size += Buffer.from(chunk.value).byteLength\n        }\n\n        memoryCache.set(cacheKey, {\n          entry,\n          isErrored: false,\n          errorRetryCount: 0,\n          size,\n        })\n\n        debug?.('set', cacheKey, 'done')\n      } catch (err) {\n        // TODO: store partial buffer with error after we retry 3 times\n        debug?.('set', cacheKey, 'failed', err)\n      } finally {\n        resolvePending()\n        pendingSets.delete(cacheKey)\n      }\n    },\n\n    async refreshTags() {\n      // Nothing to do for an in-memory cache handler.\n    },\n\n    async getExpiration(tags) {\n      const expirations = tags.map((tag) => {\n        const entry = tagsManifest.get(tag)\n        if (!entry) return 0\n        // Return the most recent timestamp (either expired or stale)\n        return entry.expired || 0\n      })\n\n      const expiration = Math.max(...expirations, 0)\n\n      debug?.('getExpiration', { tags, expiration })\n\n      return expiration\n    },\n\n    async updateTags(tags, durations) {\n      const now = Math.round(performance.timeOrigin + performance.now())\n      debug?.('updateTags', { tags, timestamp: now })\n\n      for (const tag of tags) {\n        // TODO: update file-system-cache?\n        const existingEntry = tagsManifest.get(tag) || {}\n\n        if (durations) {\n          // Use provided durations directly\n          const updates: TagManifestEntry = { ...existingEntry }\n\n          // mark as stale immediately\n          updates.stale = now\n\n          if (durations.expire !== undefined) {\n            updates.expired = now + durations.expire * 1000 // Convert seconds to ms\n          }\n\n          tagsManifest.set(tag, updates)\n        } else {\n          // Update expired field for immediate expiration (default behavior when no durations provided)\n          tagsManifest.set(tag, { ...existingEntry, expired: now })\n        }\n      }\n    },\n  }\n}\n","/**\n * Node in the doubly-linked list used for LRU tracking.\n * Each node represents a cache entry with bidirectional pointers.\n */\nclass LRUNode<T> {\n  public readonly key: string\n  public data: T\n  public size: number\n  public prev: LRUNode<T> | SentinelNode<T> | null = null\n  public next: LRUNode<T> | SentinelNode<T> | null = null\n\n  constructor(key: string, data: T, size: number) {\n    this.key = key\n    this.data = data\n    this.size = size\n  }\n}\n\n/**\n * Sentinel node used for head/tail boundaries.\n * These nodes don't contain actual cache data but simplify list operations.\n */\nclass SentinelNode<T> {\n  public prev: LRUNode<T> | SentinelNode<T> | null = null\n  public next: LRUNode<T> | SentinelNode<T> | null = null\n}\n\n/**\n * LRU (Least Recently Used) Cache implementation using a doubly-linked list\n * and hash map for O(1) operations.\n *\n * Algorithm:\n * - Uses a doubly-linked list to maintain access order (most recent at head)\n * - Hash map provides O(1) key-to-node lookup\n * - Sentinel head/tail nodes simplify edge case handling\n * - Size-based eviction supports custom size calculation functions\n *\n * Data Structure Layout:\n * HEAD <-> [most recent] <-> ... <-> [least recent] <-> TAIL\n *\n * Operations:\n * - get(): Move accessed node to head (mark as most recent)\n * - set(): Add new node at head, evict from tail if over capacity\n * - Eviction: Remove least recent node (tail.prev) when size exceeds limit\n */\nexport class LRUCache<T> {\n  private readonly cache: Map<string, LRUNode<T>> = new Map()\n  private readonly head: SentinelNode<T>\n  private readonly tail: SentinelNode<T>\n  private totalSize: number = 0\n  private readonly maxSize: number\n  private readonly calculateSize: ((value: T) => number) | undefined\n  private readonly onEvict: ((key: string, value: T) => void) | undefined\n\n  constructor(\n    maxSize: number,\n    calculateSize?: (value: T) => number,\n    onEvict?: (key: string, value: T) => void\n  ) {\n    this.maxSize = maxSize\n    this.calculateSize = calculateSize\n    this.onEvict = onEvict\n\n    // Create sentinel nodes to simplify doubly-linked list operations\n    // HEAD <-> TAIL (empty list)\n    this.head = new SentinelNode<T>()\n    this.tail = new SentinelNode<T>()\n    this.head.next = this.tail\n    this.tail.prev = this.head\n  }\n\n  /**\n   * Adds a node immediately after the head (marks as most recently used).\n   * Used when inserting new items or when an item is accessed.\n   * PRECONDITION: node must be disconnected (prev/next should be null)\n   */\n  private addToHead(node: LRUNode<T>): void {\n    node.prev = this.head\n    node.next = this.head.next\n    // head.next is always non-null (points to tail or another node)\n    this.head.next!.prev = node\n    this.head.next = node\n  }\n\n  /**\n   * Removes a node from its current position in the doubly-linked list.\n   * Updates the prev/next pointers of adjacent nodes to maintain list integrity.\n   * PRECONDITION: node must be connected (prev/next are non-null)\n   */\n  private removeNode(node: LRUNode<T>): void {\n    // Connected nodes always have non-null prev/next\n    node.prev!.next = node.next\n    node.next!.prev = node.prev\n  }\n\n  /**\n   * Moves an existing node to the head position (marks as most recently used).\n   * This is the core LRU operation - accessed items become most recent.\n   */\n  private moveToHead(node: LRUNode<T>): void {\n    this.removeNode(node)\n    this.addToHead(node)\n  }\n\n  /**\n   * Removes and returns the least recently used node (the one before tail).\n   * This is called during eviction when the cache exceeds capacity.\n   * PRECONDITION: cache is not empty (ensured by caller)\n   */\n  private removeTail(): LRUNode<T> {\n    const lastNode = this.tail.prev as LRUNode<T>\n    // tail.prev is always non-null and always LRUNode when cache is not empty\n    this.removeNode(lastNode)\n    return lastNode\n  }\n\n  /**\n   * Sets a key-value pair in the cache.\n   * If the key exists, updates the value and moves to head.\n   * If new, adds at head and evicts from tail if necessary.\n   *\n   * Time Complexity:\n   * - O(1) for uniform item sizes\n   * - O(k) where k is the number of items evicted (can be O(N) for variable sizes)\n   */\n  public set(key: string, value: T): boolean {\n    const size = this.calculateSize?.(value) ?? 1\n    if (size <= 0) {\n      throw new Error(\n        `LRUCache: calculateSize returned ${size}, but size must be > 0. ` +\n          `Items with size 0 would never be evicted, causing unbounded cache growth.`\n      )\n    }\n    if (size > this.maxSize) {\n      console.warn('Single item size exceeds maxSize')\n      return false\n    }\n\n    const existing = this.cache.get(key)\n    if (existing) {\n      // Update existing node: adjust size and move to head (most recent)\n      existing.data = value\n      this.totalSize = this.totalSize - existing.size + size\n      existing.size = size\n      this.moveToHead(existing)\n    } else {\n      // Add new node at head (most recent position)\n      const newNode = new LRUNode(key, value, size)\n      this.cache.set(key, newNode)\n      this.addToHead(newNode)\n      this.totalSize += size\n    }\n\n    // Evict least recently used items until under capacity\n    while (this.totalSize > this.maxSize && this.cache.size > 0) {\n      const tail = this.removeTail()\n      this.cache.delete(tail.key)\n      this.totalSize -= tail.size\n      this.onEvict?.(tail.key, tail.data)\n    }\n\n    return true\n  }\n\n  /**\n   * Checks if a key exists in the cache.\n   * This is a pure query operation - does NOT update LRU order.\n   *\n   * Time Complexity: O(1)\n   */\n  public has(key: string): boolean {\n    return this.cache.has(key)\n  }\n\n  /**\n   * Retrieves a value by key and marks it as most recently used.\n   * Moving to head maintains the LRU property for future evictions.\n   *\n   * Time Complexity: O(1)\n   */\n  public get(key: string): T | undefined {\n    const node = this.cache.get(key)\n    if (!node) return undefined\n\n    // Mark as most recently used by moving to head\n    this.moveToHead(node)\n\n    return node.data\n  }\n\n  /**\n   * Returns an iterator over the cache entries. The order is outputted in the\n   * order of most recently used to least recently used.\n   */\n  public *[Symbol.iterator](): IterableIterator<[string, T]> {\n    let current = this.head.next\n    while (current && current !== this.tail) {\n      // Between head and tail, current is always LRUNode\n      const node = current as LRUNode<T>\n      yield [node.key, node.data]\n      current = current.next\n    }\n  }\n\n  /**\n   * Removes a specific key from the cache.\n   * Updates both the hash map and doubly-linked list.\n   *\n   * Note: This is an explicit removal and does NOT trigger the `onEvict`\n   * callback. Use this for intentional deletions where eviction tracking\n   * is not needed.\n   *\n   * Time Complexity: O(1)\n   */\n  public remove(key: string): void {\n    const node = this.cache.get(key)\n    if (!node) return\n\n    this.removeNode(node)\n    this.cache.delete(key)\n    this.totalSize -= node.size\n  }\n\n  /**\n   * Returns the number of items in the cache.\n   */\n  public get size(): number {\n    return this.cache.size\n  }\n\n  /**\n   * Returns the current total size of all cached items.\n   * This uses the custom size calculation if provided.\n   */\n  public get currentSize(): number {\n    return this.totalSize\n  }\n}\n","import type { CacheFs } from '../../shared/lib/utils'\n\nimport fs from 'fs'\n\nexport const nodeFs: CacheFs = {\n  existsSync: fs.existsSync,\n  readFile: fs.promises.readFile,\n  readFileSync: fs.readFileSync,\n  writeFile: (f, d) => fs.promises.writeFile(f, d),\n  mkdir: (dir) => fs.promises.mkdir(dir, { recursive: true }),\n  stat: (f) => fs.promises.stat(f),\n}\n","const REACT_POSTPONE_TYPE: symbol = Symbol.for('react.postpone')\n\nexport function isPostpone(error: any): boolean {\n  return (\n    typeof error === 'object' &&\n    error !== null &&\n    error.$$typeof === REACT_POSTPONE_TYPE\n  )\n}\n","import type { SourceMap } from 'module'\nimport { LRUCache } from './lru-cache'\n\nfunction noSourceMap(): SourceMap | undefined {\n  return undefined\n}\n\n// Edge runtime does not implement `module`\nconst findSourceMap =\n  process.env.NEXT_RUNTIME === 'edge'\n    ? noSourceMap\n    : (require('module') as typeof import('module')).findSourceMap\n\n/**\n * https://tc39.es/source-map/#index-map\n */\ninterface IndexSourceMapSection {\n  offset: {\n    line: number\n    column: number\n  }\n  map: BasicSourceMapPayload\n}\n\n// TODO(veil): Upstream types\n/** https://tc39.es/ecma426/#sec-index-source-map */\ninterface IndexSourceMap {\n  version: number\n  file: string\n  sections: IndexSourceMapSection[]\n}\n\n/** https://tc39.es/ecma426/#sec-source-map-format */\nexport interface BasicSourceMapPayload {\n  version: number\n  // TODO: Move to https://github.com/jridgewell/sourcemaps which is actively maintained\n  /** WARNING: `file` is optional. */\n  file: string\n  sourceRoot?: string\n  // TODO: Move to https://github.com/jridgewell/sourcemaps which is actively maintained\n  /** WARNING: `sources[number]` can be `null`. */\n  sources: Array<string>\n  names: Array<string>\n  mappings: string\n  ignoreList?: number[]\n}\n\nexport type ModernSourceMapPayload = BasicSourceMapPayload | IndexSourceMap\n\nexport function sourceMapIgnoreListsEverything(\n  sourceMap: BasicSourceMapPayload\n): boolean {\n  return (\n    sourceMap.ignoreList !== undefined &&\n    sourceMap.sources.length === sourceMap.ignoreList.length\n  )\n}\n\n/**\n * Finds the sourcemap payload applicable to a given frame.\n * Equal to the input unless an Index Source Map is used.\n * @param line0 - The line number of the frame, 0-based.\n * @param column0 - The column number of the frame, 0-based.\n */\nexport function findApplicableSourceMapPayload(\n  line0: number,\n  column0: number,\n  payload: ModernSourceMapPayload\n): BasicSourceMapPayload | undefined {\n  if ('sections' in payload) {\n    if (payload.sections.length === 0) {\n      return undefined\n    }\n\n    // Sections must not overlap and must be sorted: https://tc39.es/source-map/#section-object\n    // Therefore the last section that has an offset less than or equal to the frame is the applicable one.\n    const sections = payload.sections\n    let left = 0\n    let right = sections.length - 1\n    let result: IndexSourceMapSection | null = null\n\n    while (left <= right) {\n      // fast Math.floor\n      const middle = ~~((left + right) / 2)\n      const section = sections[middle]\n      const offset = section.offset\n\n      if (\n        offset.line < line0 ||\n        (offset.line === line0 && offset.column <= column0)\n      ) {\n        result = section\n        left = middle + 1\n      } else {\n        right = middle - 1\n      }\n    }\n\n    return result === null ? undefined : result.map\n  } else {\n    return payload\n  }\n}\n\nconst didWarnAboutInvalidSourceMapDEV = new Set<string>()\n\nexport function filterStackFrameDEV(\n  sourceURL: string,\n  functionName: string,\n  line1: number,\n  column1: number\n): boolean {\n  if (sourceURL === '') {\n    // The default implementation filters out <anonymous> stack frames\n    // but we want to retain them because current Server Components and\n    // built-in Components in parent stacks don't have source location.\n    // Filter out frames that show up in Promises to get good names in React's\n    // Server Request track until we come up with a better heuristic.\n    return functionName !== 'new Promise'\n  }\n  if (sourceURL.startsWith('node:') || sourceURL.includes('node_modules')) {\n    return false\n  }\n  try {\n    // Node.js loads source maps eagerly so this call is cheap.\n    // TODO: ESM sourcemaps are O(1) but CommonJS sourcemaps are O(Number of CJS modules).\n    // Make sure this doesn't adversely affect performance when CJS is used by Next.js.\n    const sourceMap = findSourceMap(sourceURL)\n    if (sourceMap === undefined) {\n      // No source map assoicated.\n      // TODO: Node.js types should reflect that `findSourceMap` can return `undefined`.\n      return true\n    }\n    const sourceMapPayload = findApplicableSourceMapPayload(\n      line1 - 1,\n      column1 - 1,\n      sourceMap.payload\n    )\n    if (sourceMapPayload === undefined) {\n      // No source map section applicable to the frame.\n      return true\n    }\n    return !sourceMapIgnoreListsEverything(sourceMapPayload)\n  } catch (cause) {\n    if (process.env.NODE_ENV !== 'production') {\n      // TODO: Share cache with patch-error-inspect\n      if (!didWarnAboutInvalidSourceMapDEV.has(sourceURL)) {\n        didWarnAboutInvalidSourceMapDEV.add(sourceURL)\n        // We should not log an actual error instance here because that will re-enter\n        // this codepath during error inspection and could lead to infinite recursion.\n        console.error(\n          `${sourceURL}: Invalid source map. Only conformant source maps can be used to filter stack frames. Cause: ${cause}`\n        )\n      }\n    }\n\n    return true\n  }\n}\n\nconst invalidSourceMap = Symbol('invalid-source-map')\nconst sourceMapURLs = new LRUCache<string | typeof invalidSourceMap>(\n  512 * 1024 * 1024,\n  (url) =>\n    url === invalidSourceMap\n      ? // Ideally we'd account for key length. So we just guestimate a small source map\n        // so that we don't create a huge cache with empty source maps.\n        8 * 1024\n      : // these URLs contain only ASCII characters so .length is equal to Buffer.byteLength\n        url.length\n)\nexport function findSourceMapURLDEV(\n  scriptNameOrSourceURL: string\n): string | null {\n  let sourceMapURL = sourceMapURLs.get(scriptNameOrSourceURL)\n  if (sourceMapURL === undefined) {\n    let sourceMapPayload: ModernSourceMapPayload | undefined\n    try {\n      sourceMapPayload = findSourceMap(scriptNameOrSourceURL)?.payload\n    } catch (cause) {\n      console.error(\n        `${scriptNameOrSourceURL}: Invalid source map. Only conformant source maps can be used to find the original code. Cause: ${cause}`\n      )\n    }\n\n    if (sourceMapPayload === undefined) {\n      sourceMapURL = invalidSourceMap\n    } else {\n      // TODO: Might be more efficient to extract the relevant section from Index Maps.\n      // Unclear if that search is worth the smaller payload we have to stringify.\n      const sourceMapJSON = JSON.stringify(sourceMapPayload)\n      const sourceMapURLData = Buffer.from(sourceMapJSON, 'utf8').toString(\n        'base64'\n      )\n      sourceMapURL = `data:application/json;base64,${sourceMapURLData}`\n    }\n\n    sourceMapURLs.set(scriptNameOrSourceURL, sourceMapURL)\n  }\n\n  return sourceMapURL === invalidSourceMap ? null : sourceMapURL\n}\n\nexport function devirtualizeReactServerURL(sourceURL: string): string {\n  if (sourceURL.startsWith('about://React/')) {\n    // about://React/Server/file://<filename>?42 => file://<filename>\n    const envIdx = sourceURL.indexOf('/', 'about://React/'.length)\n    const suffixIdx = sourceURL.lastIndexOf('?')\n    if (envIdx > -1 && suffixIdx > -1) {\n      return decodeURI(sourceURL.slice(envIdx + 1, suffixIdx))\n    }\n  }\n  return sourceURL\n}\n\nfunction isAnonymousFrameLikelyJSNative(methodName: string): boolean {\n  // Anonymous frames can also be produced in React parent stacks either from\n  // host components or Server Components. We don't want to ignore those.\n  // This could hide user-space methods that are named like native JS methods but\n  // should you really do that?\n  return (\n    // e.g. JSON.parse\n    methodName.startsWith('JSON.') ||\n    // E.g. Promise.withResolves\n    methodName.startsWith('Function.') ||\n    // various JS built-ins\n    methodName.startsWith('Promise.') ||\n    methodName.startsWith('Array.') ||\n    methodName.startsWith('Set.') ||\n    methodName.startsWith('Map.')\n  )\n}\n\nexport function ignoreListAnonymousStackFramesIfSandwiched<Frame>(\n  frames: Frame[],\n  isAnonymousFrame: (frame: Frame) => boolean,\n  isIgnoredFrame: (frame: Frame) => boolean,\n  getMethodName: (frame: Frame) => string,\n  /** only passes frames for which `isAnonymousFrame` and their method is a native JS method or `isIgnoredFrame` return true */\n  ignoreFrame: (frame: Frame) => void\n): void {\n  for (let i = 1; i < frames.length; i++) {\n    const currentFrame = frames[i]\n    if (\n      !(\n        isAnonymousFrame(currentFrame) &&\n        isAnonymousFrameLikelyJSNative(getMethodName(currentFrame))\n      )\n    ) {\n      continue\n    }\n\n    const previousFrameIsIgnored = isIgnoredFrame(frames[i - 1])\n    if (previousFrameIsIgnored && i < frames.length - 1) {\n      let ignoreSandwich = false\n      let j = i + 1\n      for (j; j < frames.length; j++) {\n        const nextFrame = frames[j]\n        const nextFrameIsAnonymous =\n          isAnonymousFrame(nextFrame) &&\n          isAnonymousFrameLikelyJSNative(getMethodName(nextFrame))\n        if (nextFrameIsAnonymous) {\n          continue\n        }\n\n        const nextFrameIsIgnored = isIgnoredFrame(nextFrame)\n        if (nextFrameIsIgnored) {\n          ignoreSandwich = true\n          break\n        }\n      }\n\n      if (ignoreSandwich) {\n        for (i; i < j; i++) {\n          ignoreFrame(frames[i])\n        }\n      }\n    }\n  }\n}\n","/**\n * Contains predefined constants for the trace span name in next/server.\n *\n * Currently, next/server/tracer is internal implementation only for tracking\n * next.js's implementation only with known span names defined here.\n **/\n\n// eslint typescript has a bug with TS enums\n\nenum BaseServerSpan {\n  handleRequest = 'BaseServer.handleRequest',\n  run = 'BaseServer.run',\n  pipe = 'BaseServer.pipe',\n  getStaticHTML = 'BaseServer.getStaticHTML',\n  render = 'BaseServer.render',\n  renderToResponseWithComponents = 'BaseServer.renderToResponseWithComponents',\n  renderToResponse = 'BaseServer.renderToResponse',\n  renderToHTML = 'BaseServer.renderToHTML',\n  renderError = 'BaseServer.renderError',\n  renderErrorToResponse = 'BaseServer.renderErrorToResponse',\n  renderErrorToHTML = 'BaseServer.renderErrorToHTML',\n  render404 = 'BaseServer.render404',\n}\n\nenum LoadComponentsSpan {\n  loadDefaultErrorComponents = 'LoadComponents.loadDefaultErrorComponents',\n  loadComponents = 'LoadComponents.loadComponents',\n}\n\nenum NextServerSpan {\n  getRequestHandler = 'NextServer.getRequestHandler',\n  getRequestHandlerWithMetadata = 'NextServer.getRequestHandlerWithMetadata',\n  getServer = 'NextServer.getServer',\n  getServerRequestHandler = 'NextServer.getServerRequestHandler',\n  createServer = 'createServer.createServer',\n}\n\nenum NextNodeServerSpan {\n  compression = 'NextNodeServer.compression',\n  getBuildId = 'NextNodeServer.getBuildId',\n  createComponentTree = 'NextNodeServer.createComponentTree',\n  clientComponentLoading = 'NextNodeServer.clientComponentLoading',\n  getLayoutOrPageModule = 'NextNodeServer.getLayoutOrPageModule',\n  generateStaticRoutes = 'NextNodeServer.generateStaticRoutes',\n  generateFsStaticRoutes = 'NextNodeServer.generateFsStaticRoutes',\n  generatePublicRoutes = 'NextNodeServer.generatePublicRoutes',\n  generateImageRoutes = 'NextNodeServer.generateImageRoutes.route',\n  sendRenderResult = 'NextNodeServer.sendRenderResult',\n  proxyRequest = 'NextNodeServer.proxyRequest',\n  runApi = 'NextNodeServer.runApi',\n  render = 'NextNodeServer.render',\n  renderHTML = 'NextNodeServer.renderHTML',\n  imageOptimizer = 'NextNodeServer.imageOptimizer',\n  getPagePath = 'NextNodeServer.getPagePath',\n  getRoutesManifest = 'NextNodeServer.getRoutesManifest',\n  findPageComponents = 'NextNodeServer.findPageComponents',\n  getFontManifest = 'NextNodeServer.getFontManifest',\n  getServerComponentManifest = 'NextNodeServer.getServerComponentManifest',\n  getRequestHandler = 'NextNodeServer.getRequestHandler',\n  renderToHTML = 'NextNodeServer.renderToHTML',\n  renderError = 'NextNodeServer.renderError',\n  renderErrorToHTML = 'NextNodeServer.renderErrorToHTML',\n  render404 = 'NextNodeServer.render404',\n  startResponse = 'NextNodeServer.startResponse',\n\n  // nested inner span, does not require parent scope name\n  route = 'route',\n  onProxyReq = 'onProxyReq',\n  apiResolver = 'apiResolver',\n  internalFetch = 'internalFetch',\n}\n\nenum StartServerSpan {\n  startServer = 'startServer.startServer',\n}\n\nenum RenderSpan {\n  getServerSideProps = 'Render.getServerSideProps',\n  getStaticProps = 'Render.getStaticProps',\n  renderToString = 'Render.renderToString',\n  renderDocument = 'Render.renderDocument',\n  createBodyResult = 'Render.createBodyResult',\n}\n\nenum AppRenderSpan {\n  renderToString = 'AppRender.renderToString',\n  renderToReadableStream = 'AppRender.renderToReadableStream',\n  getBodyResult = 'AppRender.getBodyResult',\n  fetch = 'AppRender.fetch',\n}\n\nenum RouterSpan {\n  executeRoute = 'Router.executeRoute',\n}\n\nenum NodeSpan {\n  runHandler = 'Node.runHandler',\n}\n\nenum AppRouteRouteHandlersSpan {\n  runHandler = 'AppRouteRouteHandlers.runHandler',\n}\n\nenum ResolveMetadataSpan {\n  generateMetadata = 'ResolveMetadata.generateMetadata',\n  generateViewport = 'ResolveMetadata.generateViewport',\n}\n\nenum MiddlewareSpan {\n  execute = 'Middleware.execute',\n}\n\ntype SpanTypes =\n  | `${BaseServerSpan}`\n  | `${LoadComponentsSpan}`\n  | `${NextServerSpan}`\n  | `${StartServerSpan}`\n  | `${NextNodeServerSpan}`\n  | `${RenderSpan}`\n  | `${RouterSpan}`\n  | `${AppRenderSpan}`\n  | `${NodeSpan}`\n  | `${AppRouteRouteHandlersSpan}`\n  | `${ResolveMetadataSpan}`\n  | `${MiddlewareSpan}`\n\n// This list is used to filter out spans that are not relevant to the user\nexport const NextVanillaSpanAllowlist = new Set([\n  MiddlewareSpan.execute,\n  BaseServerSpan.handleRequest,\n  RenderSpan.getServerSideProps,\n  RenderSpan.getStaticProps,\n  AppRenderSpan.fetch,\n  AppRenderSpan.getBodyResult,\n  RenderSpan.renderDocument,\n  NodeSpan.runHandler,\n  AppRouteRouteHandlersSpan.runHandler,\n  ResolveMetadataSpan.generateMetadata,\n  ResolveMetadataSpan.generateViewport,\n  NextNodeServerSpan.createComponentTree,\n  NextNodeServerSpan.findPageComponents,\n  NextNodeServerSpan.getLayoutOrPageModule,\n  NextNodeServerSpan.startResponse,\n  NextNodeServerSpan.clientComponentLoading,\n])\n\n// These Spans are allowed to be always logged\n// when the otel log prefix env is set\nexport const LogSpanAllowList = new Set([\n  NextNodeServerSpan.findPageComponents,\n  NextNodeServerSpan.createComponentTree,\n  NextNodeServerSpan.clientComponentLoading,\n])\n\nexport {\n  BaseServerSpan,\n  LoadComponentsSpan,\n  NextServerSpan,\n  NextNodeServerSpan,\n  StartServerSpan,\n  RenderSpan,\n  RouterSpan,\n  AppRenderSpan,\n  NodeSpan,\n  AppRouteRouteHandlersSpan,\n  ResolveMetadataSpan,\n  MiddlewareSpan,\n}\n\nexport type { SpanTypes }\n","import { isPostpone } from '../lib/router-utils/is-postpone'\n\nlet _global = globalThis as typeof globalThis & {\n  nextInitializedProcessErrorHandlers?: boolean\n}\n\nexport function installProcessErrorHandlers(\n  shouldRemoveUncaughtErrorAndRejectionListeners: boolean\n) {\n  if (_global.nextInitializedProcessErrorHandlers) return\n  _global.nextInitializedProcessErrorHandlers = true\n  // The conventional wisdom of Node.js and other runtimes is to treat\n  // unhandled errors as fatal and exit the process.\n  //\n  // But Next.js is not a generic JS runtime — it's a specialized runtime for\n  // React Server Components.\n  //\n  // Many unhandled rejections are due to the late-awaiting pattern for\n  // prefetching data. In Next.js it's OK to call an async function without\n  // immediately awaiting it, to start the request as soon as possible\n  // without blocking unncessarily on the result. These can end up\n  // triggering an \"unhandledRejection\" if it later turns out that the\n  // data is not needed to render the page. Example:\n  //\n  //     const promise = fetchData()\n  //     const shouldShow = await checkCondition()\n  //     if (shouldShow) {\n  //       return <Component promise={promise} />\n  //     }\n  //\n  // In this example, `fetchData` is called immediately to start the request\n  // as soon as possible, but if `shouldShow` is false, then it will be\n  // discarded without unwrapping its result. If it errors, it will trigger\n  // an \"unhandledRejection\" event.\n  //\n  // Ideally, we would suppress these rejections completely without warning,\n  // because we don't consider them real errors. (TODO: Currently we do warn.)\n  //\n  // But regardless of whether we do or don't warn, we definitely shouldn't\n  // crash the entire process.\n  //\n  // Even a \"legit\" unhandled error unrelated to prefetching shouldn't\n  // prevent the rest of the page from rendering.\n  //\n  // So, we're going to intentionally override the default error handling\n  // behavior of the outer JS runtime to be more forgiving\n\n  // Remove any existing \"unhandledRejection\" and \"uncaughtException\" handlers.\n  // This is gated behind an experimental flag until we've considered the impact\n  // in various deployment environments. It's possible this may always need to\n  // be configurable.\n  if (shouldRemoveUncaughtErrorAndRejectionListeners) {\n    process.removeAllListeners('uncaughtException')\n    process.removeAllListeners('unhandledRejection')\n  }\n\n  // Install a new handler to prevent the process from crashing.\n  process.on('unhandledRejection', (reason: unknown) => {\n    if (isPostpone(reason)) {\n      // React postpones that are unhandled might end up logged here but they're\n      // not really errors. They're just part of rendering.\n      return\n    }\n    // Immediately log the error.\n    // TODO: Ideally, if we knew that this error was triggered by application\n    // code, we would suppress it entirely without logging. We can't reliably\n    // detect all of these, but when cacheComponents is enabled, we could suppress\n    // at least some of them by waiting to log the error until after all in-\n    // progress renders have completed. Then, only log errors for which there\n    // was not a corresponding \"rejectionHandled\" event.\n    console.error(reason)\n  })\n\n  process.on('rejectionHandled', () => {\n    // TODO: See note in the unhandledRejection handler above. In the future,\n    // we may use the \"rejectionHandled\" event to de-queue an error from\n    // being logged.\n  })\n\n  // Unhandled exceptions are errors triggered by non-async functions, so this\n  // is unrelated to the late-awaiting pattern. However, for similar reasons,\n  // we still shouldn't crash the process. Just log it.\n  process.on('uncaughtException', (reason: unknown) => {\n    if (isPostpone(reason)) {\n      return\n    }\n    console.error(reason)\n  })\n}\n","import type { WorkStore } from './app-render/work-async-storage.external'\nimport type { IncrementalCache } from './lib/incremental-cache'\nimport { getCacheHandlers } from './use-cache/handlers'\n\n/** Run a callback, and execute any *new* revalidations added during its runtime. */\nexport async function withExecuteRevalidates<T>(\n  store: WorkStore | undefined,\n  callback: () => Promise<T>\n): Promise<T> {\n  if (!store) {\n    return callback()\n  }\n  // If we executed any revalidates during the request, then we don't want to execute them again.\n  // save the state so we can check if anything changed after we're done running callbacks.\n  const savedRevalidationState = cloneRevalidationState(store)\n  try {\n    return await callback()\n  } finally {\n    // Check if we have any new revalidates, and if so, wait until they are all resolved.\n    const newRevalidates = diffRevalidationState(\n      savedRevalidationState,\n      cloneRevalidationState(store)\n    )\n    await executeRevalidates(store, newRevalidates)\n  }\n}\n\ntype RevalidationState = Required<\n  Pick<\n    WorkStore,\n    'pendingRevalidatedTags' | 'pendingRevalidates' | 'pendingRevalidateWrites'\n  >\n>\n\nfunction cloneRevalidationState(store: WorkStore): RevalidationState {\n  return {\n    pendingRevalidatedTags: store.pendingRevalidatedTags\n      ? [...store.pendingRevalidatedTags]\n      : [],\n    pendingRevalidates: { ...store.pendingRevalidates },\n    pendingRevalidateWrites: store.pendingRevalidateWrites\n      ? [...store.pendingRevalidateWrites]\n      : [],\n  }\n}\n\nfunction diffRevalidationState(\n  prev: RevalidationState,\n  curr: RevalidationState\n): RevalidationState {\n  const prevTagsWithProfile = new Set(\n    prev.pendingRevalidatedTags.map((item) => {\n      const profileKey =\n        typeof item.profile === 'object'\n          ? JSON.stringify(item.profile)\n          : item.profile || ''\n      return `${item.tag}:${profileKey}`\n    })\n  )\n  const prevRevalidateWrites = new Set(prev.pendingRevalidateWrites)\n  return {\n    pendingRevalidatedTags: curr.pendingRevalidatedTags.filter((item) => {\n      const profileKey =\n        typeof item.profile === 'object'\n          ? JSON.stringify(item.profile)\n          : item.profile || ''\n      return !prevTagsWithProfile.has(`${item.tag}:${profileKey}`)\n    }),\n    pendingRevalidates: Object.fromEntries(\n      Object.entries(curr.pendingRevalidates).filter(\n        ([key]) => !(key in prev.pendingRevalidates)\n      )\n    ),\n    pendingRevalidateWrites: curr.pendingRevalidateWrites.filter(\n      (promise) => !prevRevalidateWrites.has(promise)\n    ),\n  }\n}\n\nasync function revalidateTags(\n  tagsWithProfile: Array<{\n    tag: string\n    profile?: string | { expire?: number }\n  }>,\n  incrementalCache: IncrementalCache | undefined,\n  workStore?: WorkStore\n): Promise<void> {\n  if (tagsWithProfile.length === 0) {\n    return\n  }\n\n  const handlers = getCacheHandlers()\n  const promises: Promise<void>[] = []\n\n  // Group tags by profile for batch processing\n  const tagsByProfile = new Map<\n    | string\n    | { stale?: number; revalidate?: number; expire?: number }\n    | undefined,\n    string[]\n  >()\n\n  for (const item of tagsWithProfile) {\n    const profile = item.profile\n    // Find existing profile by comparing values\n    let existingKey = undefined\n    for (const [key] of tagsByProfile) {\n      if (\n        typeof key === 'string' &&\n        typeof profile === 'string' &&\n        key === profile\n      ) {\n        existingKey = key\n        break\n      }\n      if (\n        typeof key === 'object' &&\n        typeof profile === 'object' &&\n        JSON.stringify(key) === JSON.stringify(profile)\n      ) {\n        existingKey = key\n        break\n      }\n      if (key === profile) {\n        existingKey = key\n        break\n      }\n    }\n\n    const profileKey = existingKey || profile\n    if (!tagsByProfile.has(profileKey)) {\n      tagsByProfile.set(profileKey, [])\n    }\n    tagsByProfile.get(profileKey)!.push(item.tag)\n  }\n\n  // Process each profile group\n  for (const [profile, tagsForProfile] of tagsByProfile) {\n    // Look up the cache profile from workStore if available\n    let durations: { expire?: number } | undefined\n\n    if (profile) {\n      let cacheLife:\n        | { stale?: number; revalidate?: number; expire?: number }\n        | undefined\n\n      if (typeof profile === 'object') {\n        // Profile is already a cacheLife configuration object\n        cacheLife = profile\n      } else if (typeof profile === 'string') {\n        // Profile is a string key, look it up in workStore\n        cacheLife = workStore?.cacheLifeProfiles?.[profile]\n\n        if (!cacheLife) {\n          throw new Error(\n            `Invalid profile provided \"${profile}\" must be configured under cacheLife in next.config or be \"max\"`\n          )\n        }\n      }\n\n      if (cacheLife) {\n        durations = {\n          expire: cacheLife.expire,\n        }\n      }\n    }\n    // If profile is not found and not 'max', durations will be undefined\n    // which will trigger immediate expiration in the cache handler\n\n    for (const handler of handlers || []) {\n      if (profile) {\n        promises.push(handler.updateTags?.(tagsForProfile, durations))\n      } else {\n        promises.push(handler.updateTags?.(tagsForProfile))\n      }\n    }\n\n    if (incrementalCache) {\n      promises.push(incrementalCache.revalidateTag(tagsForProfile, durations))\n    }\n  }\n\n  await Promise.all(promises)\n}\n\nexport function executeRevalidates(\n  workStore: WorkStore,\n  state?: RevalidationState\n): false | Promise<void> {\n  const promises: Promise<unknown>[] = []\n\n  const pendingRevalidatedTags =\n    state?.pendingRevalidatedTags ?? workStore.pendingRevalidatedTags ?? []\n\n  if (pendingRevalidatedTags.length > 0) {\n    promises.push(\n      revalidateTags(\n        pendingRevalidatedTags,\n        workStore.incrementalCache,\n        workStore\n      )\n    )\n  }\n\n  const pendingRevalidates = Object.values(\n    state?.pendingRevalidates ?? workStore.pendingRevalidates ?? {}\n  )\n\n  promises.push(...pendingRevalidates)\n\n  const pendingRevalidateWrites =\n    state?.pendingRevalidateWrites ?? workStore.pendingRevalidateWrites ?? []\n\n  promises.push(...pendingRevalidateWrites)\n\n  if (promises.length === 0) {\n    return false\n  }\n\n  return Promise.all(promises).then(() => undefined)\n}\n","import * as React from 'react'\nimport * as ReactDOM from 'react-dom'\nimport * as ReactJsxDevRuntime from 'react/jsx-dev-runtime'\nimport * as ReactJsxRuntime from 'react/jsx-runtime'\nimport * as ReactCompilerRuntime from 'react/compiler-runtime'\n\nimport * as ReactDOMServer from 'react-dom/server'\n\nfunction getAltProxyForBindingsDEV(\n  type: 'Turbopack' | 'Webpack',\n  pkg: 'react-server-dom-turbopack/client' | 'react-server-dom-webpack/client'\n) {\n  if (process.env.NODE_ENV === 'development') {\n    const altType = type === 'Turbopack' ? 'Webpack' : 'Turbopack'\n    const altPkg = pkg.replace(new RegExp(type, 'gi'), altType.toLowerCase())\n\n    return new Proxy(\n      {},\n      {\n        get(_, prop: string) {\n          throw new Error(\n            `Expected to use ${type} bindings (${pkg}) for React but the current process is referencing '${prop}' from the ${altType} bindings (${altPkg}). This is likely a bug in our integration of the Next.js server runtime.`\n          )\n        },\n      }\n    )\n  }\n}\n\nlet ReactServerDOMTurbopackClient, ReactServerDOMWebpackClient\nif (process.env.TURBOPACK) {\n  ReactServerDOMTurbopackClient =\n    // @ts-expect-error -- TODO: Add types\n    // eslint-disable-next-line import/no-extraneous-dependencies\n    require('react-server-dom-turbopack/client') as typeof import('react-server-dom-turbopack/client')\n  if (process.env.NODE_ENV === 'development') {\n    ReactServerDOMWebpackClient = getAltProxyForBindingsDEV(\n      'Turbopack',\n      'react-server-dom-turbopack/client'\n    )\n  }\n} else {\n  ReactServerDOMWebpackClient =\n    // eslint-disable-next-line import/no-extraneous-dependencies\n    require('react-server-dom-webpack/client') as typeof import('react-server-dom-webpack/client')\n  if (process.env.NODE_ENV === 'development') {\n    ReactServerDOMTurbopackClient = getAltProxyForBindingsDEV(\n      'Webpack',\n      'react-server-dom-webpack/client'\n    )\n  }\n}\n\nexport {\n  React,\n  ReactJsxDevRuntime,\n  ReactJsxRuntime,\n  ReactCompilerRuntime,\n  ReactDOM,\n  ReactDOMServer,\n  ReactServerDOMTurbopackClient,\n  ReactServerDOMWebpackClient,\n}\n","import { createDefaultCacheHandler } from '../lib/cache-handlers/default'\nimport type { CacheHandler } from '../lib/cache-handlers/types'\n\nconst debug = process.env.NEXT_PRIVATE_DEBUG_CACHE\n  ? (message: string, ...args: any[]) => {\n      console.log(`use-cache: ${message}`, ...args)\n    }\n  : undefined\n\nconst handlersSymbol = Symbol.for('@next/cache-handlers')\nconst handlersMapSymbol = Symbol.for('@next/cache-handlers-map')\nconst handlersSetSymbol = Symbol.for('@next/cache-handlers-set')\n\n/**\n * The reference to the cache handlers. We store the cache handlers on the\n * global object so that we can access the same instance across different\n * boundaries (such as different copies of the same module).\n */\nconst reference: typeof globalThis & {\n  [handlersSymbol]?: {\n    RemoteCache?: CacheHandler\n    DefaultCache?: CacheHandler\n  }\n  [handlersMapSymbol]?: Map<string, CacheHandler>\n  [handlersSetSymbol]?: Set<CacheHandler>\n} = globalThis\n\n/**\n * Initialize the cache handlers.\n * @param cacheMaxMemorySize - The maximum memory size of the cache in bytes, if\n *  not provided, the default memory size will be used.\n * @returns `true` if the cache handlers were initialized, `false` if they were already initialized.\n */\nexport function initializeCacheHandlers(cacheMaxMemorySize: number): boolean {\n  // If the cache handlers have already been initialized, don't do it again.\n  if (reference[handlersMapSymbol]) {\n    debug?.('cache handlers already initialized')\n    return false\n  }\n\n  debug?.('initializing cache handlers')\n  reference[handlersMapSymbol] = new Map<string, CacheHandler>()\n\n  // Initialize the cache from the symbol contents first.\n  if (reference[handlersSymbol]) {\n    let fallback: CacheHandler\n    if (reference[handlersSymbol].DefaultCache) {\n      debug?.('setting \"default\" cache handler from symbol')\n      fallback = reference[handlersSymbol].DefaultCache\n    } else {\n      debug?.('setting \"default\" cache handler from default')\n      fallback = createDefaultCacheHandler(cacheMaxMemorySize)\n    }\n\n    reference[handlersMapSymbol].set('default', fallback)\n\n    if (reference[handlersSymbol].RemoteCache) {\n      debug?.('setting \"remote\" cache handler from symbol')\n      reference[handlersMapSymbol].set(\n        'remote',\n        reference[handlersSymbol].RemoteCache\n      )\n    } else {\n      debug?.('setting \"remote\" cache handler from default')\n      reference[handlersMapSymbol].set('remote', fallback)\n    }\n  } else {\n    const handler = createDefaultCacheHandler(cacheMaxMemorySize)\n\n    debug?.('setting \"default\" cache handler from default')\n    reference[handlersMapSymbol].set('default', handler)\n    debug?.('setting \"remote\" cache handler from default')\n    reference[handlersMapSymbol].set('remote', handler)\n  }\n\n  // Create a set of the cache handlers.\n  reference[handlersSetSymbol] = new Set(reference[handlersMapSymbol].values())\n\n  return true\n}\n\n/**\n * Get a cache handler by kind.\n * @param kind - The kind of cache handler to get.\n * @returns The cache handler, or `undefined` if it does not exist.\n * @throws If the cache handlers are not initialized.\n */\nexport function getCacheHandler(kind: string): CacheHandler | undefined {\n  // This should never be called before initializeCacheHandlers.\n  if (!reference[handlersMapSymbol]) {\n    throw new Error('Cache handlers not initialized')\n  }\n\n  return reference[handlersMapSymbol].get(kind)\n}\n\n/**\n * Get a set iterator over the cache handlers.\n * @returns An iterator over the cache handlers, or `undefined` if they are not\n * initialized.\n */\nexport function getCacheHandlers(): SetIterator<CacheHandler> | undefined {\n  if (!reference[handlersSetSymbol]) {\n    return undefined\n  }\n\n  return reference[handlersSetSymbol].values()\n}\n\n/**\n * Get a map iterator over the cache handlers (keyed by kind).\n * @returns An iterator over the cache handler entries, or `undefined` if they\n * are not initialized.\n * @throws If the cache handlers are not initialized.\n */\nexport function getCacheHandlerEntries():\n  | MapIterator<[string, CacheHandler]>\n  | undefined {\n  if (!reference[handlersMapSymbol]) {\n    return undefined\n  }\n\n  return reference[handlersMapSymbol].entries()\n}\n\n/**\n * Set a cache handler by kind.\n * @param kind - The kind of cache handler to set.\n * @param cacheHandler - The cache handler to set.\n */\nexport function setCacheHandler(\n  kind: string,\n  cacheHandler: CacheHandler\n): void {\n  // This should never be called before initializeCacheHandlers.\n  if (!reference[handlersMapSymbol] || !reference[handlersSetSymbol]) {\n    throw new Error('Cache handlers not initialized')\n  }\n\n  debug?.('setting cache handler for \"%s\"', kind)\n  reference[handlersMapSymbol].set(kind, cacheHandler)\n  reference[handlersSetSymbol].add(cacheHandler)\n}\n","import type { IncomingHttpHeaders } from 'http'\n\nimport { ReflectAdapter } from './reflect'\n\n/**\n * @internal\n */\nexport class ReadonlyHeadersError extends Error {\n  constructor() {\n    super(\n      'Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers'\n    )\n  }\n\n  public static callable() {\n    throw new ReadonlyHeadersError()\n  }\n}\n\nexport type ReadonlyHeaders = Headers & {\n  /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n  append(...args: any[]): void\n  /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n  set(...args: any[]): void\n  /** @deprecated Method unavailable on `ReadonlyHeaders`. Read more: https://nextjs.org/docs/app/api-reference/functions/headers */\n  delete(...args: any[]): void\n}\nexport class HeadersAdapter extends Headers {\n  private readonly headers: IncomingHttpHeaders\n\n  constructor(headers: IncomingHttpHeaders) {\n    // We've already overridden the methods that would be called, so we're just\n    // calling the super constructor to ensure that the instanceof check works.\n    super()\n\n    this.headers = new Proxy(headers, {\n      get(target, prop, receiver) {\n        // Because this is just an object, we expect that all \"get\" operations\n        // are for properties. If it's a \"get\" for a symbol, we'll just return\n        // the symbol.\n        if (typeof prop === 'symbol') {\n          return ReflectAdapter.get(target, prop, receiver)\n        }\n\n        const lowercased = prop.toLowerCase()\n\n        // Let's find the original casing of the key. This assumes that there is\n        // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n        // headers object.\n        const original = Object.keys(headers).find(\n          (o) => o.toLowerCase() === lowercased\n        )\n\n        // If the original casing doesn't exist, return undefined.\n        if (typeof original === 'undefined') return\n\n        // If the original casing exists, return the value.\n        return ReflectAdapter.get(target, original, receiver)\n      },\n      set(target, prop, value, receiver) {\n        if (typeof prop === 'symbol') {\n          return ReflectAdapter.set(target, prop, value, receiver)\n        }\n\n        const lowercased = prop.toLowerCase()\n\n        // Let's find the original casing of the key. This assumes that there is\n        // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n        // headers object.\n        const original = Object.keys(headers).find(\n          (o) => o.toLowerCase() === lowercased\n        )\n\n        // If the original casing doesn't exist, use the prop as the key.\n        return ReflectAdapter.set(target, original ?? prop, value, receiver)\n      },\n      has(target, prop) {\n        if (typeof prop === 'symbol') return ReflectAdapter.has(target, prop)\n\n        const lowercased = prop.toLowerCase()\n\n        // Let's find the original casing of the key. This assumes that there is\n        // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n        // headers object.\n        const original = Object.keys(headers).find(\n          (o) => o.toLowerCase() === lowercased\n        )\n\n        // If the original casing doesn't exist, return false.\n        if (typeof original === 'undefined') return false\n\n        // If the original casing exists, return true.\n        return ReflectAdapter.has(target, original)\n      },\n      deleteProperty(target, prop) {\n        if (typeof prop === 'symbol')\n          return ReflectAdapter.deleteProperty(target, prop)\n\n        const lowercased = prop.toLowerCase()\n\n        // Let's find the original casing of the key. This assumes that there is\n        // no mixed case keys (e.g. \"Content-Type\" and \"content-type\") in the\n        // headers object.\n        const original = Object.keys(headers).find(\n          (o) => o.toLowerCase() === lowercased\n        )\n\n        // If the original casing doesn't exist, return true.\n        if (typeof original === 'undefined') return true\n\n        // If the original casing exists, delete the property.\n        return ReflectAdapter.deleteProperty(target, original)\n      },\n    })\n  }\n\n  /**\n   * Seals a Headers instance to prevent modification by throwing an error when\n   * any mutating method is called.\n   */\n  public static seal(headers: Headers): ReadonlyHeaders {\n    return new Proxy<ReadonlyHeaders>(headers, {\n      get(target, prop, receiver) {\n        switch (prop) {\n          case 'append':\n          case 'delete':\n          case 'set':\n            return ReadonlyHeadersError.callable\n          default:\n            return ReflectAdapter.get(target, prop, receiver)\n        }\n      },\n    })\n  }\n\n  /**\n   * Merges a header value into a string. This stores multiple values as an\n   * array, so we need to merge them into a string.\n   *\n   * @param value a header value\n   * @returns a merged header value (a string)\n   */\n  private merge(value: string | string[]): string {\n    if (Array.isArray(value)) return value.join(', ')\n\n    return value\n  }\n\n  /**\n   * Creates a Headers instance from a plain object or a Headers instance.\n   *\n   * @param headers a plain object or a Headers instance\n   * @returns a headers instance\n   */\n  public static from(headers: IncomingHttpHeaders | Headers): Headers {\n    if (headers instanceof Headers) return headers\n\n    return new HeadersAdapter(headers)\n  }\n\n  public append(name: string, value: string): void {\n    const existing = this.headers[name]\n    if (typeof existing === 'string') {\n      this.headers[name] = [existing, value]\n    } else if (Array.isArray(existing)) {\n      existing.push(value)\n    } else {\n      this.headers[name] = value\n    }\n  }\n\n  public delete(name: string): void {\n    delete this.headers[name]\n  }\n\n  public get(name: string): string | null {\n    const value = this.headers[name]\n    if (typeof value !== 'undefined') return this.merge(value)\n\n    return null\n  }\n\n  public has(name: string): boolean {\n    return typeof this.headers[name] !== 'undefined'\n  }\n\n  public set(name: string, value: string): void {\n    this.headers[name] = value\n  }\n\n  public forEach(\n    callbackfn: (value: string, name: string, parent: Headers) => void,\n    thisArg?: any\n  ): void {\n    for (const [name, value] of this.entries()) {\n      callbackfn.call(thisArg, value, name, this)\n    }\n  }\n\n  public *entries(): HeadersIterator<[string, string]> {\n    for (const key of Object.keys(this.headers)) {\n      const name = key.toLowerCase()\n      // We assert here that this is a string because we got it from the\n      // Object.keys() call above.\n      const value = this.get(name) as string\n\n      yield [name, value] as [string, string]\n    }\n  }\n\n  public *keys(): HeadersIterator<string> {\n    for (const key of Object.keys(this.headers)) {\n      const name = key.toLowerCase()\n      yield name\n    }\n  }\n\n  public *values(): HeadersIterator<string> {\n    for (const key of Object.keys(this.headers)) {\n      // We assert here that this is a string because we got it from the\n      // Object.keys() call above.\n      const value = this.get(key) as string\n\n      yield value\n    }\n  }\n\n  public [Symbol.iterator](): HeadersIterator<[string, string]> {\n    return this.entries()\n  }\n}\n","export class ReflectAdapter {\n  static get<T extends object>(\n    target: T,\n    prop: string | symbol,\n    receiver: unknown\n  ): any {\n    const value = Reflect.get(target, prop, receiver)\n    if (typeof value === 'function') {\n      return value.bind(target)\n    }\n\n    return value\n  }\n\n  static set<T extends object>(\n    target: T,\n    prop: string | symbol,\n    value: any,\n    receiver: any\n  ): boolean {\n    return Reflect.set(target, prop, value, receiver)\n  }\n\n  static has<T extends object>(target: T, prop: string | symbol): boolean {\n    return Reflect.has(target, prop)\n  }\n\n  static deleteProperty<T extends object>(\n    target: T,\n    prop: string | symbol\n  ): boolean {\n    return Reflect.deleteProperty(target, prop)\n  }\n}\n","import { RequestCookies } from '../cookies'\n\nimport { ResponseCookies } from '../cookies'\nimport { ReflectAdapter } from './reflect'\nimport { workAsyncStorage } from '../../../app-render/work-async-storage.external'\nimport type { RequestStore } from '../../../app-render/work-unit-async-storage.external'\nimport { ActionDidRevalidateStaticAndDynamic } from '../../../../shared/lib/action-revalidation-kind'\n\n/**\n * @internal\n */\nexport class ReadonlyRequestCookiesError extends Error {\n  constructor() {\n    super(\n      'Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'\n    )\n  }\n\n  public static callable() {\n    throw new ReadonlyRequestCookiesError()\n  }\n}\n\n// We use this to type some APIs but we don't construct instances directly\nexport type { ResponseCookies }\n\n// The `cookies()` API is a mix of request and response cookies. For `.get()` methods,\n// we want to return the request cookie if it exists. For mutative methods like `.set()`,\n// we want to return the response cookie.\nexport type ReadonlyRequestCookies = Omit<\n  RequestCookies,\n  'set' | 'clear' | 'delete'\n> &\n  Pick<ResponseCookies, 'set' | 'delete'>\n\nexport class RequestCookiesAdapter {\n  public static seal(cookies: RequestCookies): ReadonlyRequestCookies {\n    return new Proxy(cookies as any, {\n      get(target, prop, receiver) {\n        switch (prop) {\n          case 'clear':\n          case 'delete':\n          case 'set':\n            return ReadonlyRequestCookiesError.callable\n          default:\n            return ReflectAdapter.get(target, prop, receiver)\n        }\n      },\n    })\n  }\n}\n\nconst SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies')\n\nexport function getModifiedCookieValues(\n  cookies: ResponseCookies\n): ResponseCookie[] {\n  const modified: ResponseCookie[] | undefined = (cookies as unknown as any)[\n    SYMBOL_MODIFY_COOKIE_VALUES\n  ]\n  if (!modified || !Array.isArray(modified) || modified.length === 0) {\n    return []\n  }\n\n  return modified\n}\n\ntype SetCookieArgs =\n  | [key: string, value: string, cookie?: Partial<ResponseCookie>]\n  | [options: ResponseCookie]\n\nexport function appendMutableCookies(\n  headers: Headers,\n  mutableCookies: ResponseCookies\n): boolean {\n  const modifiedCookieValues = getModifiedCookieValues(mutableCookies)\n  if (modifiedCookieValues.length === 0) {\n    return false\n  }\n\n  // Return a new response that extends the response with\n  // the modified cookies as fallbacks. `res` cookies\n  // will still take precedence.\n  const resCookies = new ResponseCookies(headers)\n  const returnedCookies = resCookies.getAll()\n\n  // Set the modified cookies as fallbacks.\n  for (const cookie of modifiedCookieValues) {\n    resCookies.set(cookie)\n  }\n\n  // Set the original cookies as the final values.\n  for (const cookie of returnedCookies) {\n    resCookies.set(cookie)\n  }\n\n  return true\n}\n\ntype ResponseCookie = NonNullable<\n  ReturnType<InstanceType<typeof ResponseCookies>['get']>\n>\n\nexport class MutableRequestCookiesAdapter {\n  public static wrap(\n    cookies: RequestCookies,\n    onUpdateCookies?: (cookies: string[]) => void\n  ): ResponseCookies {\n    const responseCookies = new ResponseCookies(new Headers())\n    for (const cookie of cookies.getAll()) {\n      responseCookies.set(cookie)\n    }\n\n    let modifiedValues: ResponseCookie[] = []\n    const modifiedCookies = new Set<string>()\n    const updateResponseCookies = () => {\n      // TODO-APP: change method of getting workStore\n      const workStore = workAsyncStorage.getStore()\n      if (workStore) {\n        workStore.pathWasRevalidated = ActionDidRevalidateStaticAndDynamic\n      }\n\n      const allCookies = responseCookies.getAll()\n      modifiedValues = allCookies.filter((c) => modifiedCookies.has(c.name))\n      if (onUpdateCookies) {\n        const serializedCookies: string[] = []\n        for (const cookie of modifiedValues) {\n          const tempCookies = new ResponseCookies(new Headers())\n          tempCookies.set(cookie)\n          serializedCookies.push(tempCookies.toString())\n        }\n\n        onUpdateCookies(serializedCookies)\n      }\n    }\n\n    const wrappedCookies = new Proxy(responseCookies, {\n      get(target, prop, receiver) {\n        switch (prop) {\n          // A special symbol to get the modified cookie values\n          case SYMBOL_MODIFY_COOKIE_VALUES:\n            return modifiedValues\n\n          // TODO: Throw error if trying to set a cookie after the response\n          // headers have been set.\n          case 'delete':\n            return function (...args: [string] | [ResponseCookie]) {\n              modifiedCookies.add(\n                typeof args[0] === 'string' ? args[0] : args[0].name\n              )\n              try {\n                target.delete(...args)\n                return wrappedCookies\n              } finally {\n                updateResponseCookies()\n              }\n            }\n          case 'set':\n            return function (...args: SetCookieArgs) {\n              modifiedCookies.add(\n                typeof args[0] === 'string' ? args[0] : args[0].name\n              )\n              try {\n                target.set(...args)\n                return wrappedCookies\n              } finally {\n                updateResponseCookies()\n              }\n            }\n\n          default:\n            return ReflectAdapter.get(target, prop, receiver)\n        }\n      },\n    })\n\n    return wrappedCookies\n  }\n}\n\nexport function createCookiesWithMutableAccessCheck(\n  requestStore: RequestStore\n): ResponseCookies {\n  const wrappedCookies = new Proxy(requestStore.mutableCookies, {\n    get(target, prop, receiver) {\n      switch (prop) {\n        case 'delete':\n          return function (...args: [string] | [ResponseCookie]) {\n            ensureCookiesAreStillMutable(requestStore, 'cookies().delete')\n            target.delete(...args)\n            return wrappedCookies\n          }\n        case 'set':\n          return function (...args: SetCookieArgs) {\n            ensureCookiesAreStillMutable(requestStore, 'cookies().set')\n            target.set(...args)\n            return wrappedCookies\n          }\n\n        default:\n          return ReflectAdapter.get(target, prop, receiver)\n      }\n    },\n  })\n  return wrappedCookies\n}\n\nexport function areCookiesMutableInCurrentPhase(requestStore: RequestStore) {\n  return requestStore.phase === 'action'\n}\n\n/** Ensure that cookies() starts throwing on mutation\n * if we changed phases and can no longer mutate.\n *\n * This can happen when going:\n *   'render' -> 'after'\n *   'action' -> 'render'\n * */\nfunction ensureCookiesAreStillMutable(\n  requestStore: RequestStore,\n  _callingExpression: string\n) {\n  if (!areCookiesMutableInCurrentPhase(requestStore)) {\n    // TODO: maybe we can give a more precise error message based on callingExpression?\n    throw new ReadonlyRequestCookiesError()\n  }\n}\n\nexport function responseCookiesToRequestCookies(\n  responseCookies: ResponseCookies\n): RequestCookies {\n  const requestCookies = new RequestCookies(new Headers())\n  for (const cookie of responseCookies.getAll()) {\n    requestCookies.set(cookie)\n  }\n  return requestCookies\n}\n","export type ActionRevalidationKind = 0 | 1 | 2\n\nexport const ActionDidNotRevalidate = 0\nexport const ActionDidRevalidateStaticAndDynamic = 1\nexport const ActionDidRevalidateDynamicOnly = 2\n","'use client'\n\nimport type {\n  FocusAndScrollRef,\n  PrefetchKind,\n} from '../../client/components/router-reducer/router-reducer-types'\nimport type { Params } from '../../server/request/params'\nimport type {\n  FlightRouterState,\n  FlightSegmentPath,\n  CacheNode,\n  LoadingModuleData,\n} from './app-router-types'\nimport React from 'react'\n\nexport interface NavigateOptions {\n  scroll?: boolean\n  /**\n   * Transition types to apply when navigating. These types are passed to\n   * [`React.addTransitionType`](https://react.dev/reference/react/addTransitionType)\n   * inside the navigation transition, enabling\n   * [`<ViewTransition>`](https://react.dev/reference/react/ViewTransition) components\n   * to apply different animations based on the type of navigation.\n   */\n  transitionTypes?: string[]\n}\n\nexport interface PrefetchOptions {\n  kind: PrefetchKind\n  onInvalidate?: () => void\n}\n\nexport interface AppRouterInstance {\n  /**\n   * Navigate to the previous history entry.\n   */\n  back(): void\n  /**\n   * Navigate to the next history entry.\n   */\n  forward(): void\n  /**\n   * Refresh the current page.\n   */\n  refresh(): void\n  /**\n   * Refresh the current page. Use in development only.\n   * @internal\n   */\n  hmrRefresh(): void\n  /**\n   * Navigate to the provided href.\n   * Pushes a new history entry.\n   */\n  push(href: string, options?: NavigateOptions): void\n  /**\n   * Navigate to the provided href.\n   * Replaces the current history entry.\n   */\n  replace(href: string, options?: NavigateOptions): void\n  /**\n   * Prefetch the provided href.\n   */\n  prefetch(href: string, options?: PrefetchOptions): void\n  /**\n   * Perform a gesture navigation using prefetched data.\n   * Only available when experimental.gestureTransition is enabled.\n   * @experimental\n   */\n  experimental_gesturePush?(href: string, options?: NavigateOptions): void\n}\n\nexport const AppRouterContext = React.createContext<AppRouterInstance | null>(\n  null\n)\nexport const LayoutRouterContext = React.createContext<{\n  parentTree: FlightRouterState\n  parentCacheNode: CacheNode\n  parentSegmentPath: FlightSegmentPath | null\n  parentParams: Params\n  parentLoadingData: LoadingModuleData | null\n  debugNameContext: string\n  url: string\n  isActive: boolean\n} | null>(null)\n\nexport const GlobalLayoutRouterContext = React.createContext<{\n  tree: FlightRouterState\n  focusAndScrollRef: FocusAndScrollRef\n  nextUrl: string | null\n  previousNextUrl: string | null\n}>(null as any)\n\nexport const TemplateContext = React.createContext<React.ReactNode>(null as any)\n\nif (process.env.NODE_ENV !== 'production') {\n  AppRouterContext.displayName = 'AppRouterContext'\n  LayoutRouterContext.displayName = 'LayoutRouterContext'\n  GlobalLayoutRouterContext.displayName = 'GlobalLayoutRouterContext'\n  TemplateContext.displayName = 'TemplateContext'\n}\n\nexport const MissingSlotContext = React.createContext<Set<string>>(new Set())\n","/**\n * App Router types - Client-safe types for the Next.js App Router\n *\n * This file contains type definitions that can be safely imported\n * by both client-side and server-side code without circular dependencies.\n */\n\nimport type React from 'react'\n\nexport type LoadingModuleData =\n  | [React.JSX.Element, React.ReactNode, React.ReactNode]\n  | null\n\nimport type { VaryParamsThenable } from './segment-cache/vary-params-decoding'\n\n/** viewport metadata node */\nexport type HeadData = React.ReactNode\n\n/**\n * Cache node used in app-router / layout-router.\n */\n\nexport type CacheNode = {\n  /**\n   * When rsc is not null, it represents the RSC data for the\n   * corresponding segment.\n   *\n   * `null` is a valid React Node but because segment data is always a\n   * <LayoutRouter> component, we can use `null` to represent empty. When it is\n   * null, it represents missing data, and rendering should suspend.\n   */\n  rsc: React.ReactNode\n\n  /**\n   * Represents a static version of the segment that can be shown immediately,\n   * and may or may not contain dynamic holes. It's prefetched before a\n   * navigation occurs.\n   *\n   * During rendering, we will choose whether to render `rsc` or `prefetchRsc`\n   * with `useDeferredValue`. As with the `rsc` field, a value of `null` means\n   * no value was provided. In this case, the LayoutRouter will go straight to\n   * rendering the `rsc` value; if that one is also missing, it will suspend and\n   * trigger a lazy fetch.\n   */\n  prefetchRsc: React.ReactNode\n\n  prefetchHead: HeadData | null\n\n  head: HeadData\n\n  slots: Record<string, CacheNode> | null\n\n  /**\n   * A shared mutable ref that tracks whether this segment should be scrolled\n   * to. All new segments created during a single navigation share the same\n   * ref. When any segment's scroll handler fires, it sets `current` to\n   * `false` so no other segment scrolls for the same navigation.\n   *\n   * `null` means this segment is not a scroll target (e.g., a reused shared\n   * layout segment).\n   */\n  scrollRef: ScrollRef | null\n}\n\n/**\n * A mutable ref shared across all new segments created during a single\n * navigation. Used to ensure that only one segment scrolls per navigation.\n */\nexport type ScrollRef = { current: boolean }\n\nexport type DynamicParamTypes =\n  | 'catchall'\n  | 'catchall-intercepted-(..)(..)'\n  | 'catchall-intercepted-(.)'\n  | 'catchall-intercepted-(..)'\n  | 'catchall-intercepted-(...)'\n  | 'optional-catchall'\n  | 'dynamic'\n  | 'dynamic-intercepted-(..)(..)'\n  | 'dynamic-intercepted-(.)'\n  | 'dynamic-intercepted-(..)'\n  | 'dynamic-intercepted-(...)'\n\nexport type DynamicParamTypesShort =\n  | 'c'\n  | 'ci(..)(..)'\n  | 'ci(.)'\n  | 'ci(..)'\n  | 'ci(...)'\n  | 'oc'\n  | 'd'\n  | 'di(..)(..)'\n  | 'di(.)'\n  | 'di(..)'\n  | 'di(...)'\n\n// The tuple form of a segment, used for dynamic route params\nexport type DynamicSegmentTuple = [\n  // Param name\n  paramName: string,\n  // Param cache key (almost the same as the value, but arrays are\n  // concatenated into strings)\n  // TODO: We should change this to just be the value. Currently we convert\n  // it back to a value when passing to useParams. It only needs to be\n  // a string when converted to a a cache key, but that doesn't mean we\n  // need to store it as that representation.\n  paramCacheKey: string,\n  // Dynamic param type\n  dynamicParamType: DynamicParamTypesShort,\n  // Static sibling segments at the same URL level. Used by the client\n  // router to determine if a prefetch can be reused when navigating to\n  // a static sibling of a dynamic route. For example, if the route is\n  // /products/[id] and there's also /products/sale, then staticSiblings\n  // would be ['sale']. null means the siblings are unknown (e.g. in\n  // webpack dev mode).\n  staticSiblings: readonly string[] | null,\n]\n\nexport type Segment = string | DynamicSegmentTuple\n\n/**\n * Router state\n */\nexport type FlightRouterState = [\n  segment: Segment,\n  parallelRoutes: { [parallelRouterKey: string]: FlightRouterState },\n  refreshState?: CompressedRefreshState | null,\n  /**\n   * - \"refetch\" is used during a request to inform the server where rendering\n   *   should start from.\n   *\n   * - \"inside-shared-layout\" is used during a prefetch request to inform the\n   *   server that even if the segment matches, it should be treated as if it's\n   *   within the \"new\" part of a navigation — inside the shared layout. If\n   *   the segment doesn't match, then it has no effect, since it would be\n   *   treated as new regardless. If it does match, though, the server does not\n   *   need to render it, because the client already has it.\n   *\n   * - \"metadata-only\" instructs the server to skip rendering the segments and\n   *   only send the head data.\n   *\n   *   A bit confusing, but that's because it has only one extremely narrow use\n   *   case — during a non-PPR prefetch, the server uses it to find the first\n   *   loading boundary beneath a shared layout.\n   *\n   *   TODO: We should rethink the protocol for dynamic requests. It might not\n   *   make sense for the client to send a FlightRouterState, since this type is\n   *   overloaded with concerns.\n   */\n  refresh?: 'refetch' | 'inside-shared-layout' | 'metadata-only' | null,\n  /**\n   * Bitmask of PrefetchHint flags. Encodes route structure metadata:\n   * root layout, loading boundaries, instant configs, and runtime prefetch\n   * hints. Only set when non-zero.\n   */\n  prefetchHints?: number,\n]\n\n/**\n * When rendering a parallel route, some of the parallel paths may not match\n * the current URL. In that case, the Next client has to render something,\n * so it will render whichever was the last route to match that slot. We use\n * this type to track when this has happened. It's a tuple of the original\n * URL that was used to fetch the segment, and the (possibly rewritten) search\n * query that was rendered by the server. The URL is needed when performing\n * a refresh of the segment, and the search query is needed for looking up\n * matching entries in the segment cache.\n */\nexport type CompressedRefreshState = [url: string, renderedSearch: string]\n\nexport const enum PrefetchHint {\n  // This segment has a runtime prefetch enabled (via unstable_instant with\n  // prefetch: 'runtime'). Per-segment only, does not propagate to ancestors.\n  HasRuntimePrefetch = 0b00001,\n  // This segment or one of its descendants has an instant config defined\n  // (any truthy unstable_instant, regardless of prefetch mode). Propagates\n  // upward so the root segment reflects the entire subtree.\n  SubtreeHasInstant = 0b00010,\n  // This segment itself has a loading.tsx boundary.\n  SegmentHasLoadingBoundary = 0b00100,\n  // A descendant segment (but not this one) has a loading.tsx boundary.\n  // Propagates upward so the root reflects the entire subtree.\n  SubtreeHasLoadingBoundary = 0b01000,\n  // This segment is the root layout of the application.\n  IsRootLayout = 0b10000,\n  // This segment's response includes its parent's data inlined into it.\n  // Set at build time by the segment size measurement pass.\n  ParentInlinedIntoSelf = 0b100000,\n  // This segment's data is inlined into one of its children — don't fetch\n  // it separately. Set at build time by the segment size measurement pass.\n  InlinedIntoChild = 0b1000000,\n  // On a __PAGE__: this page's response includes the head (metadata/viewport)\n  // at the end of its SegmentPrefetch[] array.\n  HeadInlinedIntoSelf = 0b10000000,\n  // On the root hint node: the head was NOT inlined into any page — fetch\n  // it separately. Absence of this bit means the head is bundled into a page.\n  HeadOutlined = 0b100000000,\n}\n\n/**\n * Individual Flight response path\n */\nexport type FlightSegmentPath =\n  // Uses `any` as repeating pattern can't be typed.\n  | any[]\n  // Looks somewhat like this\n  | [\n      segment: Segment,\n      parallelRouterKey: string,\n      segment: Segment,\n      parallelRouterKey: string,\n      segment: Segment,\n      parallelRouterKey: string,\n    ]\n\n/**\n * Represents a tree of segments and the Flight data (i.e. React nodes) that\n * correspond to each one. The tree is isomorphic to the FlightRouterState;\n * however in the future we want to be able to fetch arbitrary partial segments\n * without having to fetch all its children. So this response format will\n * likely change.\n */\nexport type CacheNodeSeedData = [\n  node: React.ReactNode | null,\n  parallelRoutes: {\n    [parallelRouterKey: string]: CacheNodeSeedData | null\n  },\n  // TODO: This field is no longer used. Remove it.\n  loading: null,\n  isPartial: boolean,\n  /**\n   * A thenable that resolves to the set of route params this segment accessed\n   * during server rendering. Used by the client router to determine cache key\n   * specificity - segments that only access certain params can be reused across\n   * navigations where unaccessed params change.\n   *\n   * - null thenable: tracking was not enabled for this render (e.g., not a\n   *   prerender). Treat conservatively - assume all params vary.\n   * - Thenable resolves to empty Set: segment accesses no params (e.g., client\n   *   components, or server components that don't read params). Can be shared\n   *   across all param values.\n   * - Thenable resolves to non-empty Set: segment depends on those params.\n   *   Can only reuse when those specific params match.\n   */\n  varyParams: VaryParamsThenable | null,\n]\n\nexport type FlightDataSegment = [\n  /* segment of the rendered slice: */ Segment,\n  /* treePatch */ FlightRouterState,\n  /* cacheNodeSeedData */ CacheNodeSeedData | null, // Can be null during prefetch if there's no loading component\n  /* head: viewport */ HeadData,\n  /* isHeadPartial */ boolean,\n]\n\nexport type FlightDataPath =\n  // Uses `any` as repeating pattern can't be typed.\n  | any[]\n  // Looks somewhat like this\n  | [\n      // Holds full path to the segment.\n      ...FlightSegmentPath[],\n      ...FlightDataSegment,\n    ]\n\n/**\n * The Flight response data\n */\nexport type FlightData = Array<FlightDataPath> | string\n\n/**\n * Per-route prefetch hints computed at build time. Mirrors the shape of the\n * loader tree so hints can be traversed in parallel during router state\n * creation. Each node stores a bitmask of PrefetchHint flags\n * (ParentInlinedIntoSelf, InlinedIntoChild) computed by the segment size\n * measurement pass.\n *\n * Persisted to prefetch-hints.json as Record<string, PrefetchHints> (keyed\n * by route pattern) and loaded at server startup.\n */\nexport type PrefetchHints = {\n  /** Bitmask of PrefetchHint flags for this segment. */\n  hints: number\n  /** Child hint nodes, keyed by parallel route key. */\n  slots: Record<string, PrefetchHints> | null\n}\n\nexport type ActionResult = Promise<any>\n\nexport type InitialRSCPayload = {\n  /** buildId, can be empty if the x-nextjs-build-id header is set */\n  b?: string\n  /** initialCanonicalUrlParts */\n  c: string[]\n  /** initialRenderedSearch */\n  q: string\n  /** couldBeIntercepted */\n  i: boolean\n  /** initialFlightData */\n  f: FlightDataPath[]\n  /** missingSlots */\n  m: Set<string> | undefined\n  /** GlobalError */\n  G: [React.ComponentType<any>, React.ReactNode | undefined]\n  /** supportsPerSegmentPrefetching */\n  S: boolean\n  /**\n   * headVaryParams - vary params for the head (metadata) of the response.\n   */\n  h: VaryParamsThenable | null\n  /** staleTime in seconds - Only present when Cache Components is enabled. */\n  s?: AsyncIterable<number>\n  /** staticStageByteLength - Resolves when the static stage ends. */\n  l?: Promise<number>\n  /** runtimePrefetchStream — Embedded runtime prefetch Flight stream. */\n  p?: ReadableStream<Uint8Array>\n  /**\n   * dynamicStaleTime — Per-page BFCache stale time in seconds, from\n   * `unstable_dynamicStaleTime`. Only included for dynamic renders. Controls\n   * how long the client router cache retains dynamic navigation data. This is\n   * distinct from the `s` field, which controls segment cache (prefetch)\n   * staleness.\n   */\n  d?: number\n}\n\n// Response from `createFromFetch` for normal rendering\nexport type NavigationFlightResponse = {\n  /** buildId, can be empty if the x-nextjs-build-id header is set */\n  b?: string\n  /** flightData */\n  f: FlightData\n  /** supportsPerSegmentPrefetching */\n  S: boolean\n  /** renderedSearch */\n  q: string\n  /** couldBeIntercepted */\n  i: boolean\n  /** staleTime - Only present in dynamic runtime prefetch responses. */\n  s?: AsyncIterable<number>\n  /** staticStageByteLength - Resolves when the static stage ends. */\n  l?: Promise<number>\n  /** headVaryParams */\n  h: VaryParamsThenable | null\n  /** runtimePrefetchStream — Embedded runtime prefetch Flight stream. */\n  p?: ReadableStream<Uint8Array>\n  /**\n   * dynamicStaleTime — Per-page BFCache stale time in seconds, from\n   * `unstable_dynamicStaleTime`. Only included for dynamic renders. Controls\n   * how long the client router cache retains dynamic navigation data. This is\n   * distinct from the `s` field, which controls segment cache (prefetch)\n   * staleness.\n   */\n  d?: number\n}\n\n// Response from `createFromFetch` for server actions. Action's flight data can be null\nexport type ActionFlightResponse = {\n  /** actionResult */\n  a: ActionResult\n  /** buildId, can be empty if the x-nextjs-build-id header is set */\n  b?: string\n  /** flightData */\n  f: FlightData\n  /** renderedSearch */\n  q: string\n  /** couldBeIntercepted */\n  i: boolean\n}\n\nexport type RSCPayload =\n  | InitialRSCPayload\n  | NavigationFlightResponse\n  | ActionFlightResponse\n","let deploymentId: string | undefined\n\nif (typeof window !== 'undefined') {\n  deploymentId = document.documentElement.dataset.dplId\n  // Immediately remove the attribute to prevent hydration errors (the dplId was inserted into the\n  // HTML only), React isn't aware of it at all.\n  delete document.documentElement.dataset.dplId\n} else {\n  // Client side: replaced with globalThis.NEXT_DEPLOYMENT_ID\n  // Server side: left as is or replaced with a string or replaced with false\n  deploymentId = process.env.NEXT_DEPLOYMENT_ID || undefined\n}\n\nexport function getDeploymentId(): string | undefined {\n  return deploymentId\n}\n\nexport function getDeploymentIdQuery(ampersand = false): string {\n  let id = getDeploymentId()\n  if (id) {\n    return `${ampersand ? '&' : '?'}dpl=${id}`\n  }\n  return ''\n}\n\nexport function getAssetToken(): string | undefined {\n  return (\n    process.env.NEXT_IMMUTABLE_ASSET_TOKEN || process.env.NEXT_DEPLOYMENT_ID\n  )\n}\n\nexport function getAssetTokenQuery(ampersand = false): string {\n  let id = getAssetToken()\n  if (id) {\n    return `${ampersand ? '&' : '?'}dpl=${id}`\n  }\n  return ''\n}\n","export const MISSING_ROOT_TAGS_ERROR = 'NEXT_MISSING_ROOT_TAGS'\n","// http://www.cse.yorku.ca/~oz/hash.html\n// More specifically, 32-bit hash via djbxor\n// (ref: https://gist.github.com/eplawless/52813b1d8ad9af510d85?permalink_comment_id=3367765#gistcomment-3367765)\n// This is due to number type differences between rust for turbopack to js number types,\n// where rust does not have easy way to repreesnt js's 53-bit float number type for the matching\n// overflow behavior. This is more `correct` in terms of having canonical hash across different runtime / implementation\n// as can gaurantee determinstic output from 32bit hash.\nexport function djb2Hash(str: string) {\n  let hash = 5381\n  for (let i = 0; i < str.length; i++) {\n    const char = str.charCodeAt(i)\n    hash = ((hash << 5) + hash + char) & 0xffffffff\n  }\n  return hash >>> 0\n}\n\nexport function hexHash(str: string) {\n  return djb2Hash(str).toString(36).slice(0, 5)\n}\n","import React from 'react'\n\nexport const HeadManagerContext: React.Context<{\n  updateHead?: (state: any) => void\n  mountedInstances?: any\n  updateScripts?: (state: any) => void\n  scripts?: any\n  getIsSsr?: () => boolean\n\n  // Used in app directory, to render script tags as server components.\n  appDir?: boolean\n  nonce?: string\n}> = React.createContext({})\n\nif (process.env.NODE_ENV !== 'production') {\n  HeadManagerContext.displayName = 'HeadManagerContext'\n}\n","'use client'\n\nimport { createContext } from 'react'\nimport type { Params } from '../../server/request/params'\nimport { ReadonlyURLSearchParams } from '../../client/components/readonly-url-search-params'\n\nexport const SearchParamsContext = createContext<URLSearchParams | null>(null)\nexport const PathnameContext = createContext<string | null>(null)\nexport const PathParamsContext = createContext<Params | null>(null)\n\n// Dev-only context for Suspense DevTools instrumentation\n// These promises are used to track navigation hook usage in React DevTools\nexport type InstrumentedPromise<T> = Promise<T> & {\n  status: 'fulfilled'\n  value: T\n  displayName: string\n}\n\nexport type NavigationPromises = {\n  pathname: InstrumentedPromise<string>\n  searchParams: InstrumentedPromise<ReadonlyURLSearchParams>\n  params: InstrumentedPromise<Params>\n  // Layout segment hooks (updated at each layout boundary)\n  selectedLayoutSegmentPromises?: Map<\n    string,\n    InstrumentedPromise<string | null>\n  >\n  selectedLayoutSegmentsPromises?: Map<string, InstrumentedPromise<string[]>>\n}\n\nexport const NavigationPromisesContext =\n  createContext<NavigationPromises | null>(null)\n\n// Creates an instrumented promise for Suspense DevTools\n// These promises are always fulfilled and exist purely for\n// tracking in React's Suspense DevTools.\nexport function createDevToolsInstrumentedPromise<T>(\n  displayName: string,\n  value: T\n): InstrumentedPromise<T> {\n  const promise = Promise.resolve(value) as InstrumentedPromise<T>\n  promise.status = 'fulfilled'\n  promise.value = value\n  promise.displayName = `${displayName} (SSR)`\n  return promise\n}\n\nexport { ReadonlyURLSearchParams }\n\nif (process.env.NODE_ENV !== 'production') {\n  SearchParamsContext.displayName = 'SearchParamsContext'\n  PathnameContext.displayName = 'PathnameContext'\n  PathParamsContext.displayName = 'PathParamsContext'\n  NavigationPromisesContext.displayName = 'NavigationPromisesContext'\n}\n","export class InvariantError extends Error {\n  constructor(message: string, options?: ErrorOptions) {\n    super(\n      `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n      options\n    )\n    this.name = 'InvariantError'\n  }\n}\n","export function getObjectClassLabel(value: any): string {\n  return Object.prototype.toString.call(value)\n}\n\nexport function isPlainObject(value: any): boolean {\n  if (getObjectClassLabel(value) !== '[object Object]') {\n    return false\n  }\n\n  const prototype = Object.getPrototypeOf(value)\n\n  /**\n   * this used to be previously:\n   *\n   * `return prototype === null || prototype === Object.prototype`\n   *\n   * but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.\n   *\n   * It was changed to the current implementation since it's resilient to serialization.\n   */\n  return prototype === null || prototype.hasOwnProperty('isPrototypeOf')\n}\n","/**\n * Check to see if a value is Thenable.\n *\n * @param promise the maybe-thenable value\n * @returns true if the value is thenable\n */\nexport function isThenable<T = unknown>(\n  promise: Promise<T> | T\n): promise is Promise<T> {\n  return (\n    promise !== null &&\n    typeof promise === 'object' &&\n    'then' in promise &&\n    typeof promise.then === 'function'\n  )\n}\n","/**\n * This module is for next.js server internal usage of path module.\n * It will use native path module for nodejs runtime.\n * It will use path-browserify polyfill for edge runtime.\n */\nlet path\n\nif (process.env.NEXT_RUNTIME === 'edge') {\n  path = require('next/dist/compiled/path-browserify')\n} else {\n  path = require('path')\n}\n\nmodule.exports = path\n","// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n  public readonly digest = BAILOUT_TO_CSR\n\n  constructor(public readonly reason: string) {\n    super(`Bail out to client-side rendering: ${reason}`)\n  }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n  if (typeof err !== 'object' || err === null || !('digest' in err)) {\n    return false\n  }\n\n  return err.digest === BAILOUT_TO_CSR\n}\n","// Note: This file is JS because it's used by the taskfile-swc.js file, which is JS.\n// Keep file changes in sync with the corresponding `.d.ts` files.\n\n/**\n * These are the minimum browser versions that we consider \"modern\" and thus compile for by default.\n * This list was generated using `pnpm browserslist \"baseline widely available\"` on 2025-10-01.\n */\nconst MODERN_BROWSERSLIST_TARGET = [\n  'chrome 111',\n  'edge 111',\n  'firefox 111',\n  'safari 16.4',\n]\n\nmodule.exports = MODERN_BROWSERSLIST_TARGET\n","/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n  return path.startsWith('/') ? path : `/${path}`\n}\n","export function createPromiseWithResolvers<T>(): PromiseWithResolvers<T> {\n  // Shim of Stage 4 Promise.withResolvers proposal\n  let resolve: (value: T | PromiseLike<T>) => void\n  let reject: (reason: any) => void\n  const promise = new Promise<T>((res, rej) => {\n    resolve = res\n    reject = rej\n  })\n  return { resolve: resolve!, reject: reject!, promise }\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n  if (!path.startsWith('/') || !prefix) {\n    return path\n  }\n\n  const { pathname, query, hash } = parsePath(path)\n  return `${prefix}${pathname}${query}${hash}`\n}\n","import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n  return ensureLeadingSlash(\n    route.split('/').reduce((pathname, segment, index, segments) => {\n      // Empty segments are ignored.\n      if (!segment) {\n        return pathname\n      }\n\n      // Groups are ignored.\n      if (isGroupSegment(segment)) {\n        return pathname\n      }\n\n      // Parallel segments are ignored.\n      if (segment[0] === '@') {\n        return pathname\n      }\n\n      // The last segment (if it's a leaf) should be ignored.\n      if (\n        (segment === 'page' || segment === 'route') &&\n        index === segments.length - 1\n      ) {\n        return pathname\n      }\n\n      return `${pathname}/${segment}`\n    }, '')\n  )\n}\n\n/**\n * Comparator for sorting app paths so that parallel slot paths (containing\n * `/@`) come before the children/root page path. This ensures the last item\n * is always the children page, which is what `renderPageComponent` reads via\n * `appPaths[appPaths.length - 1]`.\n *\n * Without this, route group prefixes like `(group)` (char code 0x28) sort\n * before `@` (0x40), causing the children page to sort first instead of last\n * and leading to a manifest mismatch / 404 in webpack dev mode.\n */\nexport function compareAppPaths(a: string, b: string): number {\n  const aHasSlot = a.includes('/@')\n  const bHasSlot = b.includes('/@')\n  if (aHasSlot && !bHasSlot) return -1\n  if (!aHasSlot && bHasSlot) return 1\n  return a.localeCompare(b)\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n  return url.replace(\n    /\\.rsc($|\\?)/,\n    // $1 ensures `?` is preserved\n    '$1'\n  )\n}\n","import { hexHash } from '../../hash'\n\nexport function computeCacheBustingSearchParam(\n  prefetchHeader: '1' | '2' | '0' | undefined,\n  segmentPrefetchHeader: string | string[] | undefined,\n  stateTreeHeader: string | string[] | undefined,\n  nextUrlHeader: string | string[] | undefined\n): string {\n  if (\n    (prefetchHeader === undefined || prefetchHeader === '0') &&\n    segmentPrefetchHeader === undefined &&\n    stateTreeHeader === undefined &&\n    nextUrlHeader === undefined\n  ) {\n    return ''\n  }\n  return hexHash(\n    [\n      prefetchHeader || '0',\n      segmentPrefetchHeader || '0',\n      stateTreeHeader || '0',\n      nextUrlHeader || '0',\n    ].join(',')\n  )\n}\n","import { INTERCEPTION_ROUTE_MARKERS } from './interception-routes'\nimport type { DynamicParamTypes } from '../../app-router-types'\n\nexport type SegmentParam = {\n  paramName: string\n  paramType: DynamicParamTypes\n}\n\n/**\n * Parse dynamic route segment to type of parameter\n */\nexport function getSegmentParam(segment: string): SegmentParam | null {\n  const interceptionMarker = INTERCEPTION_ROUTE_MARKERS.find((marker) =>\n    segment.startsWith(marker)\n  )\n\n  // if an interception marker is part of the path segment, we need to jump ahead\n  // to the relevant portion for param parsing\n  if (interceptionMarker) {\n    segment = segment.slice(interceptionMarker.length)\n  }\n\n  if (segment.startsWith('[[...') && segment.endsWith(']]')) {\n    return {\n      // TODO-APP: Optional catchall does not currently work with parallel routes,\n      // so for now aren't handling a potential interception marker.\n      paramType: 'optional-catchall',\n      paramName: segment.slice(5, -2),\n    }\n  }\n\n  if (segment.startsWith('[...') && segment.endsWith(']')) {\n    return {\n      paramType: interceptionMarker\n        ? `catchall-intercepted-${interceptionMarker}`\n        : 'catchall',\n      paramName: segment.slice(4, -1),\n    }\n  }\n\n  if (segment.startsWith('[') && segment.endsWith(']')) {\n    return {\n      paramType: interceptionMarker\n        ? `dynamic-intercepted-${interceptionMarker}`\n        : 'dynamic',\n      paramName: segment.slice(1, -1),\n    }\n  }\n\n  return null\n}\n\nexport function isCatchAll(\n  type: DynamicParamTypes\n): type is\n  | 'catchall'\n  | 'catchall-intercepted-(..)(..)'\n  | 'catchall-intercepted-(.)'\n  | 'catchall-intercepted-(..)'\n  | 'catchall-intercepted-(...)'\n  | 'optional-catchall' {\n  return (\n    type === 'catchall' ||\n    type === 'catchall-intercepted-(..)(..)' ||\n    type === 'catchall-intercepted-(.)' ||\n    type === 'catchall-intercepted-(..)' ||\n    type === 'catchall-intercepted-(...)' ||\n    type === 'optional-catchall'\n  )\n}\n\nexport function getParamProperties(paramType: DynamicParamTypes): {\n  repeat: boolean\n  optional: boolean\n} {\n  let repeat = false\n  let optional = false\n\n  switch (paramType) {\n    case 'catchall':\n    case 'catchall-intercepted-(..)(..)':\n    case 'catchall-intercepted-(.)':\n    case 'catchall-intercepted-(..)':\n    case 'catchall-intercepted-(...)':\n      repeat = true\n      break\n    case 'optional-catchall':\n      repeat = true\n      optional = true\n      break\n    case 'dynamic':\n    case 'dynamic-intercepted-(..)(..)':\n    case 'dynamic-intercepted-(.)':\n    case 'dynamic-intercepted-(..)':\n    case 'dynamic-intercepted-(...)':\n      break\n    default:\n      paramType satisfies never\n  }\n\n  return { repeat, optional }\n}\n","import { normalizeAppPath } from './app-paths'\n\n// order matters here, the first match will be used\nexport const INTERCEPTION_ROUTE_MARKERS = [\n  '(..)(..)',\n  '(.)',\n  '(..)',\n  '(...)',\n] as const\n\nexport type InterceptionMarker = (typeof INTERCEPTION_ROUTE_MARKERS)[number]\n\nexport function isInterceptionRouteAppPath(path: string): boolean {\n  // TODO-APP: add more serious validation\n  return (\n    path\n      .split('/')\n      .find((segment) =>\n        INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n      ) !== undefined\n  )\n}\n\ntype InterceptionRouteInformation = {\n  /**\n   * The intercepting route. This is the route that is being intercepted or the\n   * route that the user was coming from. This is matched by the Next-Url\n   * header.\n   */\n  interceptingRoute: string\n\n  /**\n   * The intercepted route. This is the route that is being intercepted or the\n   * route that the user is going to. This is matched by the request pathname.\n   */\n  interceptedRoute: string\n}\n\nexport function extractInterceptionRouteInformation(\n  path: string\n): InterceptionRouteInformation {\n  let interceptingRoute: string | undefined\n  let marker: (typeof INTERCEPTION_ROUTE_MARKERS)[number] | undefined\n  let interceptedRoute: string | undefined\n\n  for (const segment of path.split('/')) {\n    marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n    if (marker) {\n      ;[interceptingRoute, interceptedRoute] = path.split(marker, 2)\n      break\n    }\n  }\n\n  if (!interceptingRoute || !marker || !interceptedRoute) {\n    throw new Error(\n      `Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`\n    )\n  }\n\n  interceptingRoute = normalizeAppPath(interceptingRoute) // normalize the path, e.g. /(blog)/feed -> /feed\n\n  switch (marker) {\n    case '(.)':\n      // (.) indicates that we should match with sibling routes, so we just need to append the intercepted route to the intercepting route\n      if (interceptingRoute === '/') {\n        interceptedRoute = `/${interceptedRoute}`\n      } else {\n        interceptedRoute = interceptingRoute + '/' + interceptedRoute\n      }\n      break\n    case '(..)':\n      // (..) indicates that we should match at one level up, so we need to remove the last segment of the intercepting route\n      if (interceptingRoute === '/') {\n        throw new Error(\n          `Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`\n        )\n      }\n      interceptedRoute = interceptingRoute\n        .split('/')\n        .slice(0, -1)\n        .concat(interceptedRoute)\n        .join('/')\n      break\n    case '(...)':\n      // (...) will match the route segment in the root directory, so we need to use the root directory to prepend the intercepted route\n      interceptedRoute = '/' + interceptedRoute\n      break\n    case '(..)(..)':\n      // (..)(..) indicates that we should match at two levels up, so we need to remove the last two segments of the intercepting route\n\n      const splitInterceptingRoute = interceptingRoute.split('/')\n      if (splitInterceptingRoute.length <= 2) {\n        throw new Error(\n          `Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`\n        )\n      }\n\n      interceptedRoute = splitInterceptingRoute\n        .slice(0, -2)\n        .concat(interceptedRoute)\n        .join('/')\n      break\n    default:\n      throw new Error('Invariant: unexpected marker')\n  }\n\n  return { interceptingRoute, interceptedRoute }\n}\n","// This regex contains the bots that we need to do a blocking render for and can't safely stream the response\n// due to how they parse the DOM. For example, they might explicitly check for metadata in the `head` tag, so we can't stream metadata tags after the `head` was sent.\n// Note: The pattern [\\w-]+-Google captures all Google crawlers with \"-Google\" suffix (e.g., Mediapartners-Google, AdsBot-Google, Storebot-Google)\n// as well as crawlers starting with \"Google-\" (e.g., Google-PageRenderer, Google-InspectionTool)\nexport const HTML_LIMITED_BOT_UA_RE =\n  /[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight/i\n","import { HTML_LIMITED_BOT_UA_RE } from './html-bots'\n\n// Bot crawler that will spin up a headless browser and execute JS.\n// Only the main Googlebot search crawler executes JavaScript, not other Google crawlers.\n// x-ref: https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers\n// This regex specifically matches \"Googlebot\" but NOT \"Mediapartners-Google\", \"AdsBot-Google\", etc.\nconst HEADLESS_BROWSER_BOT_UA_RE = /Googlebot(?!-)|Googlebot$/i\n\nexport const HTML_LIMITED_BOT_UA_RE_STRING = HTML_LIMITED_BOT_UA_RE.source\n\nexport { HTML_LIMITED_BOT_UA_RE }\n\nfunction isDomBotUA(userAgent: string) {\n  return HEADLESS_BROWSER_BOT_UA_RE.test(userAgent)\n}\n\nfunction isHtmlLimitedBotUA(userAgent: string) {\n  return HTML_LIMITED_BOT_UA_RE.test(userAgent)\n}\n\nexport function isBot(userAgent: string): boolean {\n  return isDomBotUA(userAgent) || isHtmlLimitedBotUA(userAgent)\n}\n\nexport function getBotType(userAgent: string): 'dom' | 'html' | undefined {\n  if (isDomBotUA(userAgent)) {\n    return 'dom'\n  }\n  if (isHtmlLimitedBotUA(userAgent)) {\n    return 'html'\n  }\n  return undefined\n}\n","/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n  const hashIndex = path.indexOf('#')\n  const queryIndex = path.indexOf('?')\n  const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n  if (hasQuery || hashIndex > -1) {\n    return {\n      pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n      query: hasQuery\n        ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n        : '',\n      hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n    }\n  }\n\n  return { pathname: path, query: '', hash: '' }\n}\n","import type { ParsedUrlQuery } from 'querystring'\nimport { getLocationOrigin } from '../../utils'\nimport { searchParamsToUrlQuery } from './querystring'\n\nexport interface ParsedRelativeUrl {\n  auth: string | null\n  hash: string\n  host: string | null\n  hostname: string | null\n  href: string\n  pathname: string\n  port: string | null\n  protocol: string | null\n  query: ParsedUrlQuery\n  search: string\n  slashes: null\n}\n\n/**\n * Parses path-relative urls (e.g. `/hello/world?foo=bar`). If url isn't path-relative\n * (e.g. `./hello`) then at least base must be.\n * Absolute urls are rejected with one exception, in the browser, absolute urls that are on\n * the current origin will be parsed as relative\n */\nexport function parseRelativeUrl(\n  url: string,\n  base?: string,\n  parseQuery?: true\n): ParsedRelativeUrl\nexport function parseRelativeUrl(\n  url: string,\n  base: string | undefined,\n  parseQuery: false\n): Omit<ParsedRelativeUrl, 'query'>\nexport function parseRelativeUrl(\n  url: string,\n  base?: string,\n  parseQuery = true\n): ParsedRelativeUrl | Omit<ParsedRelativeUrl, 'query'> {\n  const globalBase = new URL(\n    typeof window === 'undefined' ? 'http://n' : getLocationOrigin()\n  )\n\n  const resolvedBase = base\n    ? new URL(base, globalBase)\n    : url.startsWith('.')\n      ? new URL(\n          typeof window === 'undefined' ? 'http://n' : window.location.href\n        )\n      : globalBase\n\n  const { pathname, searchParams, search, hash, href, origin } = url.startsWith(\n    '/'\n  )\n    ? // 'http://localhost:3000///' would be received as '///' in Node.js' IncomingMessage\n      // See https://nodejs.org/api/http.html#messageurl\n      // Not using `origin` to support other protocols\n      new URL(`${resolvedBase.protocol}//${resolvedBase.host}${url}`)\n    : new URL(url, resolvedBase)\n\n  if (origin !== globalBase.origin) {\n    throw new Error(`invariant: invalid relative URL, router received ${url}`)\n  }\n\n  return {\n    auth: null,\n    host: null,\n    hostname: null,\n    pathname,\n    port: null,\n    protocol: null,\n    query: parseQuery ? searchParamsToUrlQuery(searchParams) : undefined,\n    search,\n    hash,\n    href: href.slice(origin.length),\n    // We don't know for relative URLs at this point since we set a custom, internal\n    // base that isn't surfaced to users.\n    slashes: null,\n  }\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n  if (typeof path !== 'string') {\n    return false\n  }\n\n  const { pathname } = parsePath(path)\n  return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n","import type { ParsedUrlQuery } from 'querystring'\n\nexport function searchParamsToUrlQuery(\n  searchParams: URLSearchParams\n): ParsedUrlQuery {\n  const query: ParsedUrlQuery = {}\n  for (const [key, value] of searchParams.entries()) {\n    const existing = query[key]\n    if (typeof existing === 'undefined') {\n      query[key] = value\n    } else if (Array.isArray(existing)) {\n      existing.push(value)\n    } else {\n      query[key] = [existing, value]\n    }\n  }\n  return query\n}\n\nfunction stringifyUrlQueryParam(param: unknown): string {\n  if (typeof param === 'string') {\n    return param\n  }\n\n  if (\n    (typeof param === 'number' && !isNaN(param)) ||\n    typeof param === 'boolean'\n  ) {\n    return String(param)\n  } else {\n    return ''\n  }\n}\n\nexport function urlQueryToSearchParams(query: ParsedUrlQuery): URLSearchParams {\n  const searchParams = new URLSearchParams()\n  for (const [key, value] of Object.entries(query)) {\n    if (Array.isArray(value)) {\n      for (const item of value) {\n        searchParams.append(key, stringifyUrlQueryParam(item))\n      }\n    } else {\n      searchParams.set(key, stringifyUrlQueryParam(value))\n    }\n  }\n  return searchParams\n}\n\nexport function assign(\n  target: URLSearchParams,\n  ...searchParamsList: URLSearchParams[]\n): URLSearchParams {\n  for (const searchParams of searchParamsList) {\n    for (const key of searchParams.keys()) {\n      target.delete(key)\n    }\n\n    for (const [key, value] of searchParams.entries()) {\n      target.append(key, value)\n    }\n  }\n\n  return target\n}\n","/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n *   - `/foo/bar/` -> `/foo/bar`\n *   - `/foo/bar` -> `/foo/bar`\n *   - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n  return route.replace(/\\/$/, '') || '/'\n}\n","import { PAGE_SEGMENT_KEY } from '../segment'\nimport type { Segment as FlightRouterStateSegment } from '../app-router-types'\n\n// TypeScript trick to simulate opaque types, like in Flow.\ntype Opaque<K, T> = T & { __brand: K }\n\nexport type SegmentRequestKeyPart = Opaque<'SegmentRequestKeyPart', string>\nexport type SegmentRequestKey = Opaque<'SegmentRequestKey', string>\n\nexport const ROOT_SEGMENT_REQUEST_KEY = '' as SegmentRequestKey\n\nexport const HEAD_REQUEST_KEY = '/_head' as SegmentRequestKey\n\nexport function createSegmentRequestKeyPart(\n  segment: FlightRouterStateSegment\n): SegmentRequestKeyPart {\n  if (typeof segment === 'string') {\n    if (segment.startsWith(PAGE_SEGMENT_KEY)) {\n      // The Flight Router State type sometimes includes the search params in\n      // the page segment. However, the Segment Cache tracks this as a separate\n      // key. So, we strip the search params here, and then add them back when\n      // the cache entry is turned back into a FlightRouterState. This is an\n      // unfortunate consequence of the FlightRouteState being used both as a\n      // transport type and as a cache key; we'll address this once more of the\n      // Segment Cache implementation has settled.\n      // TODO: We should hoist the search params out of the FlightRouterState\n      // type entirely, This is our plan for dynamic route params, too.\n      return PAGE_SEGMENT_KEY as SegmentRequestKeyPart\n    }\n    const safeName =\n      // TODO: FlightRouterState encodes Not Found routes as \"/_not-found\".\n      // But params typically don't include the leading slash. We should use\n      // a different encoding to avoid this special case.\n      segment === '/_not-found'\n        ? '_not-found'\n        : encodeToFilesystemAndURLSafeString(segment)\n    // Since this is not a dynamic segment, it's fully encoded. It does not\n    // need to be \"hydrated\" with a param value.\n    return safeName as SegmentRequestKeyPart\n  }\n\n  const name = segment[0]\n  const paramType = segment[2]\n  const safeName = encodeToFilesystemAndURLSafeString(name)\n\n  const encodedName = '$' + paramType + '$' + safeName\n  return encodedName as SegmentRequestKeyPart\n}\n\nexport function appendSegmentRequestKeyPart(\n  parentRequestKey: SegmentRequestKey,\n  parallelRouteKey: string,\n  childRequestKeyPart: SegmentRequestKeyPart\n): SegmentRequestKey {\n  // Aside from being filesystem safe, segment keys are also designed so that\n  // each segment and parallel route creates its own subdirectory. Roughly in\n  // the same shape as the source app directory. This is mostly just for easier\n  // debugging (you can open up the build folder and navigate the output); if\n  // we wanted to do we could just use a flat structure.\n\n  // Omit the parallel route key for children, since this is the most\n  // common case. Saves some bytes (and it's what the app directory does).\n  const slotKey =\n    parallelRouteKey === 'children'\n      ? childRequestKeyPart\n      : `@${encodeToFilesystemAndURLSafeString(parallelRouteKey)}/${childRequestKeyPart}`\n  return (parentRequestKey + '/' + slotKey) as SegmentRequestKey\n}\n\n// Define a regex pattern to match the most common characters found in a route\n// param. It excludes anything that might not be cross-platform filesystem\n// compatible, like |. It does not need to be precise because the fallback is to\n// just base64url-encode the whole parameter, which is fine; we just don't do it\n// by default for compactness, and for easier debugging.\nconst simpleParamValueRegex = /^[a-zA-Z0-9\\-_@]+$/\n\nfunction encodeToFilesystemAndURLSafeString(value: string) {\n  if (simpleParamValueRegex.test(value)) {\n    return value\n  }\n  // If there are any unsafe characters, base64url-encode the entire value.\n  // We also add a ! prefix so it doesn't collide with the simple case.\n  const base64url = btoa(value)\n    .replace(/\\+/g, '-') // Replace '+' with '-'\n    .replace(/\\//g, '_') // Replace '/' with '_'\n    .replace(/=+$/, '') // Remove trailing '='\n  return '!' + base64url\n}\n\nexport function convertSegmentPathToStaticExportFilename(\n  segmentPath: string\n): string {\n  return `__next${segmentPath.replace(/\\//g, '.')}.txt`\n}\n","import type { FlightRouterState, Segment } from './app-router-types'\n\nexport function getSegmentValue(segment: Segment) {\n  return Array.isArray(segment) ? segment[1] : segment\n}\n\nexport function isGroupSegment(segment: string) {\n  // Use array[0] for performant purpose\n  return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n  return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n  segment: Segment,\n  searchParams: Record<string, string | string[] | undefined>\n) {\n  const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n  if (isPageSegment) {\n    const stringifiedQuery = JSON.stringify(searchParams)\n    return stringifiedQuery !== '{}'\n      ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n      : PAGE_SEGMENT_KEY\n  }\n\n  return segment\n}\n\nexport function computeSelectedLayoutSegment(\n  segments: string[] | null,\n  parallelRouteKey: string\n): string | null {\n  if (!segments || segments.length === 0) {\n    return null\n  }\n\n  // For 'children', use first segment; for other parallel routes, use last segment\n  const rawSegment =\n    parallelRouteKey === 'children'\n      ? segments[0]\n      : segments[segments.length - 1]\n\n  // If the default slot is showing, return null since it's not technically \"selected\" (it's a fallback)\n  // Returning an internal value like `__DEFAULT__` would be confusing\n  return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment\n}\n\n/** Get the canonical parameters from the current level to the leaf node. */\nexport function getSelectedLayoutSegmentPath(\n  tree: FlightRouterState,\n  parallelRouteKey: string,\n  first = true,\n  segmentPath: string[] = []\n): string[] {\n  let node: FlightRouterState\n  if (first) {\n    // Use the provided parallel route key on the first parallel route\n    node = tree[1][parallelRouteKey]\n  } else {\n    // After first parallel route prefer children, if there's no children pick the first parallel route.\n    const parallelRoutes = tree[1]\n    node = parallelRoutes.children ?? Object.values(parallelRoutes)[0]\n  }\n\n  if (!node) return segmentPath\n  const segment = node[0]\n\n  let segmentValue = getSegmentValue(segment)\n\n  if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {\n    return segmentPath\n  }\n\n  segmentPath.push(segmentValue)\n\n  return getSelectedLayoutSegmentPath(\n    node,\n    parallelRouteKey,\n    false,\n    segmentPath\n  )\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\nexport const NOT_FOUND_SEGMENT_KEY = '/_not-found'\n","export interface ServerReferenceInfo {\n  type: 'server-action' | 'use-cache'\n  usedArgs: [boolean, boolean, boolean, boolean, boolean, boolean]\n  hasRestArgs: boolean\n}\n\n/**\n * Extracts info about the server reference for the given server reference ID by\n * parsing the first byte of the hex-encoded ID.\n *\n * ```\n * Bit positions: [7]      [6] [5] [4] [3] [2] [1]  [0]\n * Bits:          typeBit  argMask                  restArgs\n * ```\n *\n * If the `typeBit` is `1` the server reference represents a `\"use cache\"`\n * function, otherwise a server action.\n *\n * The `argMask` encodes whether the function uses the argument at the\n * respective position.\n *\n * The `restArgs` bit indicates whether the function uses a rest parameter. It's\n * also set to 1 if the function has more than 6 args.\n *\n * @param id hex-encoded server reference ID\n */\nexport function extractInfoFromServerReferenceId(\n  id: string\n): ServerReferenceInfo {\n  const infoByte = parseInt(id.slice(0, 2), 16)\n  const typeBit = (infoByte >> 7) & 0x1\n  const argMask = (infoByte >> 1) & 0x3f\n  const restArgs = infoByte & 0x1\n  const usedArgs = Array(6)\n\n  for (let index = 0; index < 6; index++) {\n    const bitPosition = 5 - index\n    const bit = (argMask >> bitPosition) & 0x1\n    usedArgs[index] = bit === 1\n  }\n\n  return {\n    type: typeBit === 1 ? 'use-cache' : 'server-action',\n    usedArgs: usedArgs as [\n      boolean,\n      boolean,\n      boolean,\n      boolean,\n      boolean,\n      boolean,\n    ],\n    hasRestArgs: restArgs === 1,\n  }\n}\n\n/**\n * Creates a sparse array containing only the used arguments based on the\n * provided action info.\n */\nexport function omitUnusedArgs(\n  args: unknown[],\n  info: ServerReferenceInfo\n): unknown[] {\n  const filteredArgs = new Array(args.length)\n  let length = 0\n\n  for (let index = 0; index < args.length; index++) {\n    if (\n      (index < 6 && info.usedArgs[index]) ||\n      // This assumes that the server reference info byte has the restArgs bit\n      // set to 1 if there are more than 6 args.\n      (index >= 6 && info.hasRestArgs)\n    ) {\n      filteredArgs[index] = args[index]\n      length = index + 1\n    }\n  }\n\n  // Trim trailing unused args from the array.\n  filteredArgs.length = length\n\n  return filteredArgs\n}\n","import type { HtmlProps } from './html-context.shared-runtime'\nimport type { ComponentType, JSX } from 'react'\nimport type { DomainLocale } from '../../server/config'\nimport type { Env } from '@next/env'\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type { NextRouter } from './router/router'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { PreviewData } from '../../types'\nimport type { COMPILER_NAMES } from './constants'\nimport type fs from 'fs'\n\nexport type NextComponentType<\n  Context extends BaseContext = NextPageContext,\n  InitialProps = {},\n  Props = {},\n> = ComponentType<Props> & {\n  /**\n   * Used for initial page load data population. Data returned from `getInitialProps` is serialized when server rendered.\n   * Make sure to return plain `Object` without using `Date`, `Map`, `Set`.\n   * @param context Context of `page`\n   */\n  getInitialProps?(context: Context): InitialProps | Promise<InitialProps>\n}\n\nexport type DocumentType = NextComponentType<\n  DocumentContext,\n  DocumentInitialProps,\n  DocumentProps\n>\n\nexport type AppType<P = {}> = NextComponentType<\n  AppContextType,\n  P,\n  AppPropsType<any, P>\n>\n\nexport type AppTreeType = ComponentType<\n  AppInitialProps & { [name: string]: any }\n>\n\n/**\n * Web vitals provided to _app.reportWebVitals by Core Web Vitals plugin developed by Google Chrome team.\n * https://nextjs.org/blog/next-9-4#integrated-web-vitals-reporting\n */\nexport const WEB_VITALS = ['CLS', 'FCP', 'FID', 'INP', 'LCP', 'TTFB'] as const\nexport type NextWebVitalsMetric = {\n  id: string\n  startTime: number\n  value: number\n  attribution?: { [key: string]: unknown }\n} & (\n  | {\n      label: 'web-vital'\n      name: (typeof WEB_VITALS)[number]\n    }\n  | {\n      label: 'custom'\n      name:\n        | 'Next.js-hydration'\n        | 'Next.js-route-change-to-render'\n        | 'Next.js-render'\n    }\n)\n\nexport type Enhancer<C> = (Component: C) => C\n\nexport type ComponentsEnhancer =\n  | {\n      enhanceApp?: Enhancer<AppType>\n      enhanceComponent?: Enhancer<NextComponentType>\n    }\n  | Enhancer<NextComponentType>\n\nexport type RenderPageResult = {\n  html: string\n  head?: Array<JSX.Element | null>\n}\n\nexport type RenderPage = (\n  options?: ComponentsEnhancer\n) => DocumentInitialProps | Promise<DocumentInitialProps>\n\nexport type BaseContext = {\n  res?: ServerResponse\n  [k: string]: any\n}\n\nexport type NEXT_DATA = {\n  props: Record<string, any>\n  page: string\n  query: ParsedUrlQuery\n  buildId: string\n  assetPrefix?: string\n  nextExport?: boolean\n  autoExport?: boolean\n  isFallback?: boolean\n  isExperimentalCompile?: boolean\n  dynamicIds?: (string | number)[]\n  err?: Error & {\n    statusCode?: number\n    source?: typeof COMPILER_NAMES.server | typeof COMPILER_NAMES.edgeServer\n  }\n  gsp?: boolean\n  gssp?: boolean\n  customServer?: boolean\n  gip?: boolean\n  appGip?: boolean\n  locale?: string\n  locales?: readonly string[]\n  defaultLocale?: string\n  domainLocales?: readonly DomainLocale[]\n  scriptLoader?: any[]\n  isPreview?: boolean\n  notFoundSrcPage?: string\n}\n\n/**\n * `Next` context\n */\nexport interface NextPageContext {\n  /**\n   * Error object if encountered during rendering\n   */\n  err?: (Error & { statusCode?: number }) | null\n  /**\n   * `HTTP` request object.\n   */\n  req?: IncomingMessage\n  /**\n   * `HTTP` response object.\n   */\n  res?: ServerResponse\n  /**\n   * Path section of `URL`.\n   */\n  pathname: string\n  /**\n   * Query string section of `URL` parsed as an object.\n   */\n  query: ParsedUrlQuery\n  /**\n   * `String` of the actual path including query.\n   */\n  asPath?: string\n  /**\n   * The currently active locale\n   */\n  locale?: string\n  /**\n   * All configured locales\n   */\n  locales?: readonly string[]\n  /**\n   * The configured default locale\n   */\n  defaultLocale?: string\n  /**\n   * `Component` the tree of the App to use if needing to render separately\n   */\n  AppTree: AppTreeType\n}\n\nexport type AppContextType<Router extends NextRouter = NextRouter> = {\n  Component: NextComponentType<NextPageContext>\n  AppTree: AppTreeType\n  ctx: NextPageContext\n  router: Router\n}\n\nexport type AppInitialProps<PageProps = any> = {\n  pageProps: PageProps\n}\n\nexport type AppPropsType<\n  Router extends NextRouter = NextRouter,\n  PageProps = {},\n> = AppInitialProps<PageProps> & {\n  Component: NextComponentType<NextPageContext, any, any>\n  router: Router\n  __N_SSG?: boolean\n  __N_SSP?: boolean\n}\n\nexport type DocumentContext = NextPageContext & {\n  renderPage: RenderPage\n  defaultGetInitialProps(\n    ctx: DocumentContext,\n    options?: { nonce?: string }\n  ): Promise<DocumentInitialProps>\n}\n\nexport type DocumentInitialProps = RenderPageResult & {\n  styles?: React.ReactElement[] | Iterable<React.ReactNode> | JSX.Element\n}\n\nexport type DocumentProps = DocumentInitialProps & HtmlProps\n\n/**\n * Next `API` route request\n */\nexport interface NextApiRequest extends IncomingMessage {\n  /**\n   * Object of `query` values from url\n   */\n  query: Partial<{\n    [key: string]: string | string[]\n  }>\n  /**\n   * Object of `cookies` from header\n   */\n  cookies: Partial<{\n    [key: string]: string\n  }>\n\n  body: any\n\n  env: Env\n\n  draftMode?: boolean\n\n  preview?: boolean\n  /**\n   * Preview data set on the request, if any\n   * */\n  previewData?: PreviewData\n}\n\n/**\n * Send body of response\n */\ntype Send<T> = (body: T) => void\n\n/**\n * Next `API` route response\n */\nexport type NextApiResponse<Data = any> = ServerResponse & {\n  /**\n   * Send data `any` data in response\n   */\n  send: Send<Data>\n  /**\n   * Send data `json` data in response\n   */\n  json: Send<Data>\n  status: (statusCode: number) => NextApiResponse<Data>\n  redirect(url: string): NextApiResponse<Data>\n  redirect(status: number, url: string): NextApiResponse<Data>\n\n  /**\n   * Set draft mode\n   */\n  setDraftMode: (options: { enable: boolean }) => NextApiResponse<Data>\n\n  /**\n   * Set preview data for Next.js' prerender mode\n   */\n  setPreviewData: (\n    data: object | string,\n    options?: {\n      /**\n       * Specifies the number (in seconds) for the preview session to last for.\n       * The given number will be converted to an integer by rounding down.\n       * By default, no maximum age is set and the preview session finishes\n       * when the client shuts down (browser is closed).\n       */\n      maxAge?: number\n      /**\n       * Specifies the path for the preview session to work under. By default,\n       * the path is considered the \"default path\", i.e., any pages under \"/\".\n       */\n      path?: string\n    }\n  ) => NextApiResponse<Data>\n\n  /**\n   * Clear preview data for Next.js' prerender mode\n   */\n  clearPreviewData: (options?: { path?: string }) => NextApiResponse<Data>\n\n  /**\n   * Revalidate a specific page and regenerate it using On-Demand Incremental\n   * Static Regeneration.\n   * The path should be an actual path, not a rewritten path. E.g. for\n   * \"/blog/[slug]\" this should be \"/blog/post-1\".\n   * @link https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath\n   */\n  revalidate: (\n    urlPath: string,\n    opts?: {\n      unstable_onlyGenerated?: boolean\n    }\n  ) => Promise<void>\n}\n\n/**\n * Next `API` route handler\n */\nexport type NextApiHandler<T = any> = (\n  req: NextApiRequest,\n  res: NextApiResponse<T>\n) => unknown | Promise<unknown>\n\n/**\n * Utils\n */\nexport function execOnce<T extends (...args: any[]) => ReturnType<T>>(\n  fn: T\n): T {\n  let used = false\n  let result: ReturnType<T>\n\n  return ((...args: any[]) => {\n    if (!used) {\n      used = true\n      result = fn(...args)\n    }\n    return result\n  }) as T\n}\n\n// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1\n// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\nconst ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\\d+\\-.]*?:/\nexport const isAbsoluteUrl = (url: string) => ABSOLUTE_URL_REGEX.test(url)\n\nexport function getLocationOrigin() {\n  const { protocol, hostname, port } = window.location\n  return `${protocol}//${hostname}${port ? ':' + port : ''}`\n}\n\nexport function getURL() {\n  const { href } = window.location\n  const origin = getLocationOrigin()\n  return href.substring(origin.length)\n}\n\nexport function getDisplayName<P>(Component: ComponentType<P>) {\n  return typeof Component === 'string'\n    ? Component\n    : Component.displayName || Component.name || 'Unknown'\n}\n\nexport function isResSent(res: ServerResponse) {\n  return res.finished || res.headersSent\n}\n\nexport function normalizeRepeatedSlashes(url: string) {\n  const urlParts = url.split('?')\n  const urlNoQuery = urlParts[0]\n\n  return (\n    urlNoQuery\n      // first we replace any non-encoded backslashes with forward\n      // then normalize repeated forward slashes\n      .replace(/\\\\/g, '/')\n      .replace(/\\/\\/+/g, '/') +\n    (urlParts[1] ? `?${urlParts.slice(1).join('?')}` : '')\n  )\n}\n\nexport async function loadGetInitialProps<\n  C extends BaseContext,\n  IP = {},\n  P = {},\n>(App: NextComponentType<C, IP, P>, ctx: C): Promise<IP> {\n  if (process.env.NODE_ENV !== 'production') {\n    if (App.prototype?.getInitialProps) {\n      const message = `\"${getDisplayName(\n        App\n      )}.getInitialProps()\" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`\n      throw new Error(message)\n    }\n  }\n  // when called from _app `ctx` is nested in `ctx`\n  const res = ctx.res || (ctx.ctx && ctx.ctx.res)\n\n  if (!App.getInitialProps) {\n    if (ctx.ctx && ctx.Component) {\n      // @ts-ignore pageProps default\n      return {\n        pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx),\n      }\n    }\n    return {} as IP\n  }\n\n  const props = await App.getInitialProps(ctx)\n\n  if (res && isResSent(res)) {\n    return props\n  }\n\n  if (!props) {\n    const message = `\"${getDisplayName(\n      App\n    )}.getInitialProps()\" should resolve to an object. But found \"${props}\" instead.`\n    throw new Error(message)\n  }\n\n  if (process.env.NODE_ENV !== 'production') {\n    if (Object.keys(props).length === 0 && !ctx.ctx) {\n      console.warn(\n        `${getDisplayName(\n          App\n        )} returned an empty object from \\`getInitialProps\\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`\n      )\n    }\n  }\n\n  return props\n}\n\nexport const SP = typeof performance !== 'undefined'\nexport const ST =\n  SP &&\n  (['mark', 'measure', 'getEntriesByName'] as const).every(\n    (method) => typeof performance[method] === 'function'\n  )\n\nexport class DecodeError extends Error {}\nexport class NormalizeError extends Error {}\nexport class PageNotFoundError extends Error {\n  code: string\n\n  constructor(page: string) {\n    super()\n    this.code = 'ENOENT'\n    this.name = 'PageNotFoundError'\n    this.message = `Cannot find module for page: ${page}`\n  }\n}\n\nexport class MissingStaticPage extends Error {\n  constructor(page: string, message: string) {\n    super()\n    this.message = `Failed to load static file for page: ${page} ${message}`\n  }\n}\n\nexport class MiddlewareNotFoundError extends Error {\n  code: string\n  constructor() {\n    super()\n    this.code = 'ENOENT'\n    this.message = `Cannot find the middleware module`\n  }\n}\n\nexport interface CacheFs {\n  existsSync: typeof fs.existsSync\n  readFile: typeof fs.promises.readFile\n  readFileSync: typeof fs.readFileSync\n  writeFile(f: string, d: any): Promise<void>\n  mkdir(dir: string): Promise<void | string>\n  stat(f: string): Promise<{ mtime: Date }>\n}\n\nexport function stringifyError(error: Error) {\n  return JSON.stringify({ message: error.message, stack: error.stack })\n}\n","// This regex will have fast negatives meaning valid identifiers may not pass\n// this test. However this is only used during static generation to provide hints\n// about why a page bailed out of some or all prerendering and we can use bracket notation\n// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`\n// even if this would have been fine too `searchParams.ಠ_ಠ`\nconst isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/\n\nexport function describeStringPropertyAccess(target: string, prop: string) {\n  if (isDefinitelyAValidIdentifier.test(prop)) {\n    return `\\`${target}.${prop}\\``\n  }\n  return `\\`${target}[${JSON.stringify(prop)}]\\``\n}\n\nexport function describeHasCheckingStringProperty(\n  target: string,\n  prop: string\n) {\n  const stringifiedProp = JSON.stringify(prop)\n  return `\\`Reflect.has(${target}, ${stringifiedProp})\\`, \\`${stringifiedProp} in ${target}\\`, or similar`\n}\n\nexport const wellKnownProperties = new Set([\n  'hasOwnProperty',\n  'isPrototypeOf',\n  'propertyIsEnumerable',\n  'toString',\n  'valueOf',\n  'toLocaleString',\n\n  // Promise prototype\n  'then',\n  'catch',\n  'finally',\n\n  // React Promise extension\n  'status',\n  // 'value',\n  // 'error',\n\n  // React introspection\n  'displayName',\n  '_debugInfo',\n\n  // Common tested properties\n  'toJSON',\n  '$$typeof',\n  '__esModule',\n\n  // Tested by flight when checking for iterables\n  '@@iterator',\n])\n","let warnOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n  const warnings = new Set<string>()\n  warnOnce = (msg: string) => {\n    if (!warnings.has(msg)) {\n      console.warn(msg)\n    }\n    warnings.add(msg)\n  }\n}\n\nexport { warnOnce }\n","/**\n * @license React\n * react-dom.react-server.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function noop() {}\n    function getCrossOriginStringAs(as, input) {\n      if (\"font\" === as) return \"\";\n      if (\"string\" === typeof input)\n        return \"use-credentials\" === input ? input : \"\";\n    }\n    function getValueDescriptorExpectingObjectForWarning(thing) {\n      return null === thing\n        ? \"`null`\"\n        : void 0 === thing\n          ? \"`undefined`\"\n          : \"\" === thing\n            ? \"an empty string\"\n            : 'something with type \"' + typeof thing + '\"';\n    }\n    function getValueDescriptorExpectingEnumForWarning(thing) {\n      return null === thing\n        ? \"`null`\"\n        : void 0 === thing\n          ? \"`undefined`\"\n          : \"\" === thing\n            ? \"an empty string\"\n            : \"string\" === typeof thing\n              ? JSON.stringify(thing)\n              : \"number\" === typeof thing\n                ? \"`\" + thing + \"`\"\n                : 'something with type \"' + typeof thing + '\"';\n    }\n    var React = require(\"next/dist/compiled/react\"),\n      Internals = {\n        d: {\n          f: noop,\n          r: function () {\n            throw Error(\n              \"Invalid form element. requestFormReset must be passed a form that was rendered by React.\"\n            );\n          },\n          D: noop,\n          C: noop,\n          L: noop,\n          m: noop,\n          X: noop,\n          S: noop,\n          M: noop\n        },\n        p: 0,\n        findDOMNode: null\n      };\n    if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)\n      throw Error(\n        'The \"react\" package in this environment is not configured correctly. The \"react-server\" condition must be enabled in any environment that runs React Server Components.'\n      );\n    (\"function\" === typeof Map &&\n      null != Map.prototype &&\n      \"function\" === typeof Map.prototype.forEach &&\n      \"function\" === typeof Set &&\n      null != Set.prototype &&\n      \"function\" === typeof Set.prototype.clear &&\n      \"function\" === typeof Set.prototype.forEach) ||\n      console.error(\n        \"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\"\n      );\n    exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n      Internals;\n    exports.preconnect = function (href, options) {\n      \"string\" === typeof href && href\n        ? null != options && \"object\" !== typeof options\n          ? console.error(\n              \"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            )\n          : null != options &&\n            \"string\" !== typeof options.crossOrigin &&\n            console.error(\n              \"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.\",\n              getValueDescriptorExpectingObjectForWarning(options.crossOrigin)\n            )\n        : console.error(\n            \"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n            getValueDescriptorExpectingObjectForWarning(href)\n          );\n      \"string\" === typeof href &&\n        (options\n          ? ((options = options.crossOrigin),\n            (options =\n              \"string\" === typeof options\n                ? \"use-credentials\" === options\n                  ? options\n                  : \"\"\n                : void 0))\n          : (options = null),\n        Internals.d.C(href, options));\n    };\n    exports.prefetchDNS = function (href) {\n      if (\"string\" !== typeof href || !href)\n        console.error(\n          \"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n          getValueDescriptorExpectingObjectForWarning(href)\n        );\n      else if (1 < arguments.length) {\n        var options = arguments[1];\n        \"object\" === typeof options && options.hasOwnProperty(\"crossOrigin\")\n          ? console.error(\n              \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            )\n          : console.error(\n              \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            );\n      }\n      \"string\" === typeof href && Internals.d.D(href);\n    };\n    exports.preinit = function (href, options) {\n      \"string\" === typeof href && href\n        ? null == options || \"object\" !== typeof options\n          ? console.error(\n              \"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.\",\n              getValueDescriptorExpectingEnumForWarning(options)\n            )\n          : \"style\" !== options.as &&\n            \"script\" !== options.as &&\n            console.error(\n              'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are \"style\" and \"script\".',\n              getValueDescriptorExpectingEnumForWarning(options.as)\n            )\n        : console.error(\n            \"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n            getValueDescriptorExpectingObjectForWarning(href)\n          );\n      if (\n        \"string\" === typeof href &&\n        options &&\n        \"string\" === typeof options.as\n      ) {\n        var as = options.as,\n          crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\n          integrity =\n            \"string\" === typeof options.integrity ? options.integrity : void 0,\n          fetchPriority =\n            \"string\" === typeof options.fetchPriority\n              ? options.fetchPriority\n              : void 0;\n        \"style\" === as\n          ? Internals.d.S(\n              href,\n              \"string\" === typeof options.precedence\n                ? options.precedence\n                : void 0,\n              {\n                crossOrigin: crossOrigin,\n                integrity: integrity,\n                fetchPriority: fetchPriority\n              }\n            )\n          : \"script\" === as &&\n            Internals.d.X(href, {\n              crossOrigin: crossOrigin,\n              integrity: integrity,\n              fetchPriority: fetchPriority,\n              nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n            });\n      }\n    };\n    exports.preinitModule = function (href, options) {\n      var encountered = \"\";\n      (\"string\" === typeof href && href) ||\n        (encountered +=\n          \" The `href` argument encountered was \" +\n          getValueDescriptorExpectingObjectForWarning(href) +\n          \".\");\n      void 0 !== options && \"object\" !== typeof options\n        ? (encountered +=\n            \" The `options` argument encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options) +\n            \".\")\n        : options &&\n          \"as\" in options &&\n          \"script\" !== options.as &&\n          (encountered +=\n            \" The `as` option encountered was \" +\n            getValueDescriptorExpectingEnumForWarning(options.as) +\n            \".\");\n      if (encountered)\n        console.error(\n          \"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s\",\n          encountered\n        );\n      else\n        switch (\n          ((encountered =\n            options && \"string\" === typeof options.as ? options.as : \"script\"),\n          encountered)\n        ) {\n          case \"script\":\n            break;\n          default:\n            (encountered =\n              getValueDescriptorExpectingEnumForWarning(encountered)),\n              console.error(\n                'ReactDOM.preinitModule(): Currently the only supported \"as\" type for this function is \"script\" but received \"%s\" instead. This warning was generated for `href` \"%s\". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',\n                encountered,\n                href\n              );\n        }\n      if (\"string\" === typeof href)\n        if (\"object\" === typeof options && null !== options) {\n          if (null == options.as || \"script\" === options.as)\n            (encountered = getCrossOriginStringAs(\n              options.as,\n              options.crossOrigin\n            )),\n              Internals.d.M(href, {\n                crossOrigin: encountered,\n                integrity:\n                  \"string\" === typeof options.integrity\n                    ? options.integrity\n                    : void 0,\n                nonce:\n                  \"string\" === typeof options.nonce ? options.nonce : void 0\n              });\n        } else null == options && Internals.d.M(href);\n    };\n    exports.preload = function (href, options) {\n      var encountered = \"\";\n      (\"string\" === typeof href && href) ||\n        (encountered +=\n          \" The `href` argument encountered was \" +\n          getValueDescriptorExpectingObjectForWarning(href) +\n          \".\");\n      null == options || \"object\" !== typeof options\n        ? (encountered +=\n            \" The `options` argument encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options) +\n            \".\")\n        : (\"string\" === typeof options.as && options.as) ||\n          (encountered +=\n            \" The `as` option encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options.as) +\n            \".\");\n      encountered &&\n        console.error(\n          'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel=\"preload\" as=\"...\" />` tag.%s',\n          encountered\n        );\n      if (\n        \"string\" === typeof href &&\n        \"object\" === typeof options &&\n        null !== options &&\n        \"string\" === typeof options.as\n      ) {\n        encountered = options.as;\n        var crossOrigin = getCrossOriginStringAs(\n          encountered,\n          options.crossOrigin\n        );\n        Internals.d.L(href, encountered, {\n          crossOrigin: crossOrigin,\n          integrity:\n            \"string\" === typeof options.integrity ? options.integrity : void 0,\n          nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n          type: \"string\" === typeof options.type ? options.type : void 0,\n          fetchPriority:\n            \"string\" === typeof options.fetchPriority\n              ? options.fetchPriority\n              : void 0,\n          referrerPolicy:\n            \"string\" === typeof options.referrerPolicy\n              ? options.referrerPolicy\n              : void 0,\n          imageSrcSet:\n            \"string\" === typeof options.imageSrcSet\n              ? options.imageSrcSet\n              : void 0,\n          imageSizes:\n            \"string\" === typeof options.imageSizes\n              ? options.imageSizes\n              : void 0,\n          media: \"string\" === typeof options.media ? options.media : void 0\n        });\n      }\n    };\n    exports.preloadModule = function (href, options) {\n      var encountered = \"\";\n      (\"string\" === typeof href && href) ||\n        (encountered +=\n          \" The `href` argument encountered was \" +\n          getValueDescriptorExpectingObjectForWarning(href) +\n          \".\");\n      void 0 !== options && \"object\" !== typeof options\n        ? (encountered +=\n            \" The `options` argument encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options) +\n            \".\")\n        : options &&\n          \"as\" in options &&\n          \"string\" !== typeof options.as &&\n          (encountered +=\n            \" The `as` option encountered was \" +\n            getValueDescriptorExpectingObjectForWarning(options.as) +\n            \".\");\n      encountered &&\n        console.error(\n          'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel=\"modulepreload\" as=\"...\" />` tag.%s',\n          encountered\n        );\n      \"string\" === typeof href &&\n        (options\n          ? ((encountered = getCrossOriginStringAs(\n              options.as,\n              options.crossOrigin\n            )),\n            Internals.d.m(href, {\n              as:\n                \"string\" === typeof options.as && \"script\" !== options.as\n                  ? options.as\n                  : void 0,\n              crossOrigin: encountered,\n              integrity:\n                \"string\" === typeof options.integrity\n                  ? options.integrity\n                  : void 0\n            }))\n          : Internals.d.m(href));\n    };\n    exports.version = \"19.3.0-canary-3f0b9e61-20260317\";\n  })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-dom.react-server.production.js');\n} else {\n  module.exports = require('./cjs/react-dom.react-server.development.js');\n}\n","/**\n * @license React\n * react-server-dom-webpack-server.node.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function voidHandler() {}\n    function getIteratorFn(maybeIterable) {\n      if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n        return null;\n      maybeIterable =\n        (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n        maybeIterable[\"@@iterator\"];\n      return \"function\" === typeof maybeIterable ? maybeIterable : null;\n    }\n    function _defineProperty(obj, key, value) {\n      a: if (\"object\" == typeof key && key) {\n        var e = key[Symbol.toPrimitive];\n        if (void 0 !== e) {\n          key = e.call(key, \"string\");\n          if (\"object\" != typeof key) break a;\n          throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n        }\n        key = String(key);\n      }\n      key = \"symbol\" == typeof key ? key : key + \"\";\n      key in obj\n        ? Object.defineProperty(obj, key, {\n            value: value,\n            enumerable: !0,\n            configurable: !0,\n            writable: !0\n          })\n        : (obj[key] = value);\n      return obj;\n    }\n    function flushBuffered(destination) {\n      \"function\" === typeof destination.flush && destination.flush();\n    }\n    function writeToDestination(destination, view) {\n      destination = destination.write(view);\n      destinationHasCapacity = destinationHasCapacity && destination;\n    }\n    function writeChunkAndReturn(destination, chunk) {\n      if (\"string\" === typeof chunk) {\n        if (0 !== chunk.length)\n          if (4096 < 3 * chunk.length)\n            0 < writtenBytes &&\n              (writeToDestination(\n                destination,\n                currentView.subarray(0, writtenBytes)\n              ),\n              (currentView = new Uint8Array(4096)),\n              (writtenBytes = 0)),\n              writeToDestination(destination, chunk);\n          else {\n            var target = currentView;\n            0 < writtenBytes && (target = currentView.subarray(writtenBytes));\n            target = textEncoder.encodeInto(chunk, target);\n            var read = target.read;\n            writtenBytes += target.written;\n            read < chunk.length &&\n              (writeToDestination(\n                destination,\n                currentView.subarray(0, writtenBytes)\n              ),\n              (currentView = new Uint8Array(4096)),\n              (writtenBytes = textEncoder.encodeInto(\n                chunk.slice(read),\n                currentView\n              ).written));\n            4096 === writtenBytes &&\n              (writeToDestination(destination, currentView),\n              (currentView = new Uint8Array(4096)),\n              (writtenBytes = 0));\n          }\n      } else\n        0 !== chunk.byteLength &&\n          (4096 < chunk.byteLength\n            ? (0 < writtenBytes &&\n                (writeToDestination(\n                  destination,\n                  currentView.subarray(0, writtenBytes)\n                ),\n                (currentView = new Uint8Array(4096)),\n                (writtenBytes = 0)),\n              writeToDestination(destination, chunk))\n            : ((target = currentView.length - writtenBytes),\n              target < chunk.byteLength &&\n                (0 === target\n                  ? writeToDestination(destination, currentView)\n                  : (currentView.set(chunk.subarray(0, target), writtenBytes),\n                    (writtenBytes += target),\n                    writeToDestination(destination, currentView),\n                    (chunk = chunk.subarray(target))),\n                (currentView = new Uint8Array(4096)),\n                (writtenBytes = 0)),\n              currentView.set(chunk, writtenBytes),\n              (writtenBytes += chunk.byteLength),\n              4096 === writtenBytes &&\n                (writeToDestination(destination, currentView),\n                (currentView = new Uint8Array(4096)),\n                (writtenBytes = 0))));\n      return destinationHasCapacity;\n    }\n    function completeWriting(destination) {\n      currentView &&\n        0 < writtenBytes &&\n        destination.write(currentView.subarray(0, writtenBytes));\n      currentView = null;\n      writtenBytes = 0;\n      destinationHasCapacity = !0;\n    }\n    function byteLengthOfChunk(chunk) {\n      return \"string\" === typeof chunk\n        ? Buffer.byteLength(chunk, \"utf8\")\n        : chunk.byteLength;\n    }\n    function isClientReference(reference) {\n      return reference.$$typeof === CLIENT_REFERENCE_TAG$1;\n    }\n    function registerClientReferenceImpl(proxyImplementation, id, async) {\n      return Object.defineProperties(proxyImplementation, {\n        $$typeof: { value: CLIENT_REFERENCE_TAG$1 },\n        $$id: { value: id },\n        $$async: { value: async }\n      });\n    }\n    function bind() {\n      var newFn = FunctionBind.apply(this, arguments);\n      if (this.$$typeof === SERVER_REFERENCE_TAG) {\n        null != arguments[0] &&\n          console.error(\n            'Cannot bind \"this\" of a Server Action. Pass null or undefined as the first argument to .bind().'\n          );\n        var args = ArraySlice.call(arguments, 1),\n          $$typeof = { value: SERVER_REFERENCE_TAG },\n          $$id = { value: this.$$id };\n        args = { value: this.$$bound ? this.$$bound.concat(args) : args };\n        return Object.defineProperties(newFn, {\n          $$typeof: $$typeof,\n          $$id: $$id,\n          $$bound: args,\n          $$location: { value: this.$$location, configurable: !0 },\n          bind: { value: bind, configurable: !0 }\n        });\n      }\n      return newFn;\n    }\n    function getReference(target, name) {\n      switch (name) {\n        case \"$$typeof\":\n          return target.$$typeof;\n        case \"$$id\":\n          return target.$$id;\n        case \"$$async\":\n          return target.$$async;\n        case \"name\":\n          return target.name;\n        case \"defaultProps\":\n          return;\n        case \"_debugInfo\":\n          return;\n        case \"toJSON\":\n          return;\n        case Symbol.toPrimitive:\n          return Object.prototype[Symbol.toPrimitive];\n        case Symbol.toStringTag:\n          return Object.prototype[Symbol.toStringTag];\n        case \"__esModule\":\n          var moduleId = target.$$id;\n          target.default = registerClientReferenceImpl(\n            function () {\n              throw Error(\n                \"Attempted to call the default export of \" +\n                  moduleId +\n                  \" from the server but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"\n              );\n            },\n            target.$$id + \"#\",\n            target.$$async\n          );\n          return !0;\n        case \"then\":\n          if (target.then) return target.then;\n          if (target.$$async) return;\n          var clientReference = registerClientReferenceImpl(\n              {},\n              target.$$id,\n              !0\n            ),\n            proxy = new Proxy(clientReference, proxyHandlers$1);\n          target.status = \"fulfilled\";\n          target.value = proxy;\n          return (target.then = registerClientReferenceImpl(\n            function (resolve) {\n              return Promise.resolve(resolve(proxy));\n            },\n            target.$$id + \"#then\",\n            !1\n          ));\n      }\n      if (\"symbol\" === typeof name)\n        throw Error(\n          \"Cannot read Symbol exports. Only named exports are supported on a client module imported on the server.\"\n        );\n      clientReference = target[name];\n      clientReference ||\n        ((clientReference = registerClientReferenceImpl(\n          function () {\n            throw Error(\n              \"Attempted to call \" +\n                String(name) +\n                \"() from the server but \" +\n                String(name) +\n                \" is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"\n            );\n          },\n          target.$$id + \"#\" + name,\n          target.$$async\n        )),\n        Object.defineProperty(clientReference, \"name\", { value: name }),\n        (clientReference = target[name] =\n          new Proxy(clientReference, deepProxyHandlers)));\n      return clientReference;\n    }\n    function resolveClientReferenceMetadata(config, clientReference) {\n      var modulePath = clientReference.$$id,\n        name = \"\",\n        resolvedModuleData = config[modulePath];\n      if (resolvedModuleData) name = resolvedModuleData.name;\n      else {\n        var idx = modulePath.lastIndexOf(\"#\");\n        -1 !== idx &&\n          ((name = modulePath.slice(idx + 1)),\n          (resolvedModuleData = config[modulePath.slice(0, idx)]));\n        if (!resolvedModuleData)\n          throw Error(\n            'Could not find the module \"' +\n              modulePath +\n              '\" in the React Client Manifest. This is probably a bug in the React Server Components bundler.'\n          );\n      }\n      if (!0 === resolvedModuleData.async && !0 === clientReference.$$async)\n        throw Error(\n          'The module \"' +\n            modulePath +\n            '\" is marked as an async ESM module but was loaded as a CJS proxy. This is probably a bug in the React Server Components bundler.'\n        );\n      return !0 === resolvedModuleData.async || !0 === clientReference.$$async\n        ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1]\n        : [resolvedModuleData.id, resolvedModuleData.chunks, name];\n    }\n    function preload(href, as, options) {\n      if (\"string\" === typeof href) {\n        var request = resolveRequest();\n        if (request) {\n          var hints = request.hints,\n            key = \"L\";\n          if (\"image\" === as && options) {\n            var imageSrcSet = options.imageSrcSet,\n              imageSizes = options.imageSizes,\n              uniquePart = \"\";\n            \"string\" === typeof imageSrcSet && \"\" !== imageSrcSet\n              ? ((uniquePart += \"[\" + imageSrcSet + \"]\"),\n                \"string\" === typeof imageSizes &&\n                  (uniquePart += \"[\" + imageSizes + \"]\"))\n              : (uniquePart += \"[][]\" + href);\n            key += \"[image]\" + uniquePart;\n          } else key += \"[\" + as + \"]\" + href;\n          hints.has(key) ||\n            (hints.add(key),\n            (options = trimOptions(options))\n              ? emitHint(request, \"L\", [href, as, options])\n              : emitHint(request, \"L\", [href, as]));\n        } else previousDispatcher.L(href, as, options);\n      }\n    }\n    function preloadModule$1(href, options) {\n      if (\"string\" === typeof href) {\n        var request = resolveRequest();\n        if (request) {\n          var hints = request.hints,\n            key = \"m|\" + href;\n          if (hints.has(key)) return;\n          hints.add(key);\n          return (options = trimOptions(options))\n            ? emitHint(request, \"m\", [href, options])\n            : emitHint(request, \"m\", href);\n        }\n        previousDispatcher.m(href, options);\n      }\n    }\n    function trimOptions(options) {\n      if (null == options) return null;\n      var hasProperties = !1,\n        trimmed = {},\n        key;\n      for (key in options)\n        null != options[key] &&\n          ((hasProperties = !0), (trimmed[key] = options[key]));\n      return hasProperties ? trimmed : null;\n    }\n    function getChildFormatContext(parentContext, type, props) {\n      switch (type) {\n        case \"img\":\n          type = props.src;\n          var srcSet = props.srcSet;\n          if (\n            !(\n              \"lazy\" === props.loading ||\n              (!type && !srcSet) ||\n              (\"string\" !== typeof type && null != type) ||\n              (\"string\" !== typeof srcSet && null != srcSet) ||\n              \"low\" === props.fetchPriority ||\n              parentContext & 3\n            ) &&\n            (\"string\" !== typeof type ||\n              \":\" !== type[4] ||\n              (\"d\" !== type[0] && \"D\" !== type[0]) ||\n              (\"a\" !== type[1] && \"A\" !== type[1]) ||\n              (\"t\" !== type[2] && \"T\" !== type[2]) ||\n              (\"a\" !== type[3] && \"A\" !== type[3])) &&\n            (\"string\" !== typeof srcSet ||\n              \":\" !== srcSet[4] ||\n              (\"d\" !== srcSet[0] && \"D\" !== srcSet[0]) ||\n              (\"a\" !== srcSet[1] && \"A\" !== srcSet[1]) ||\n              (\"t\" !== srcSet[2] && \"T\" !== srcSet[2]) ||\n              (\"a\" !== srcSet[3] && \"A\" !== srcSet[3]))\n          ) {\n            var sizes = \"string\" === typeof props.sizes ? props.sizes : void 0;\n            var input = props.crossOrigin;\n            preload(type || \"\", \"image\", {\n              imageSrcSet: srcSet,\n              imageSizes: sizes,\n              crossOrigin:\n                \"string\" === typeof input\n                  ? \"use-credentials\" === input\n                    ? input\n                    : \"\"\n                  : void 0,\n              integrity: props.integrity,\n              type: props.type,\n              fetchPriority: props.fetchPriority,\n              referrerPolicy: props.referrerPolicy\n            });\n          }\n          return parentContext;\n        case \"link\":\n          type = props.rel;\n          srcSet = props.href;\n          if (\n            !(\n              parentContext & 1 ||\n              null != props.itemProp ||\n              \"string\" !== typeof type ||\n              \"string\" !== typeof srcSet ||\n              \"\" === srcSet\n            )\n          )\n            switch (type) {\n              case \"preload\":\n                preload(srcSet, props.as, {\n                  crossOrigin: props.crossOrigin,\n                  integrity: props.integrity,\n                  nonce: props.nonce,\n                  type: props.type,\n                  fetchPriority: props.fetchPriority,\n                  referrerPolicy: props.referrerPolicy,\n                  imageSrcSet: props.imageSrcSet,\n                  imageSizes: props.imageSizes,\n                  media: props.media\n                });\n                break;\n              case \"modulepreload\":\n                preloadModule$1(srcSet, {\n                  as: props.as,\n                  crossOrigin: props.crossOrigin,\n                  integrity: props.integrity,\n                  nonce: props.nonce\n                });\n                break;\n              case \"stylesheet\":\n                preload(srcSet, \"style\", {\n                  crossOrigin: props.crossOrigin,\n                  integrity: props.integrity,\n                  nonce: props.nonce,\n                  type: props.type,\n                  fetchPriority: props.fetchPriority,\n                  referrerPolicy: props.referrerPolicy,\n                  media: props.media\n                });\n            }\n          return parentContext;\n        case \"picture\":\n          return parentContext | 2;\n        case \"noscript\":\n          return parentContext | 1;\n        default:\n          return parentContext;\n      }\n    }\n    function resolveOwner() {\n      if (currentOwner) return currentOwner;\n      var owner = componentStorage.getStore();\n      return owner ? owner : null;\n    }\n    function resolvePromiseOrAwaitNode(unresolvedNode, endTime) {\n      unresolvedNode.tag = 3 === unresolvedNode.tag ? 1 : 2;\n      unresolvedNode.end = endTime;\n      return unresolvedNode;\n    }\n    function getAsyncSequenceFromPromise(promise) {\n      try {\n        var asyncId = getAsyncId.call(promise);\n      } catch (x) {}\n      if (void 0 === asyncId) return null;\n      promise = pendingOperations.get(asyncId);\n      return void 0 === promise ? null : promise;\n    }\n    function collectStackTracePrivate(error, structuredStackTrace) {\n      error = [];\n      for (var i = framesToSkip; i < structuredStackTrace.length; i++) {\n        var callSite = structuredStackTrace[i],\n          name = callSite.getFunctionName() || \"<anonymous>\";\n        if (name.includes(\"react_stack_bottom_frame\")) break;\n        else if (callSite.isNative())\n          (callSite = callSite.isAsync()),\n            error.push([name, \"\", 0, 0, 0, 0, callSite]);\n        else {\n          if (callSite.isConstructor()) name = \"new \" + name;\n          else if (!callSite.isToplevel()) {\n            var callSite$jscomp$0 = callSite;\n            name = callSite$jscomp$0.getTypeName();\n            var methodName = callSite$jscomp$0.getMethodName();\n            callSite$jscomp$0 = callSite$jscomp$0.getFunctionName();\n            var result = \"\";\n            callSite$jscomp$0\n              ? (name &&\n                  identifierRegExp.test(callSite$jscomp$0) &&\n                  callSite$jscomp$0 !== name &&\n                  (result += name + \".\"),\n                (result += callSite$jscomp$0),\n                !methodName ||\n                  callSite$jscomp$0 === methodName ||\n                  callSite$jscomp$0.endsWith(\".\" + methodName) ||\n                  callSite$jscomp$0.endsWith(\" \" + methodName) ||\n                  (result += \" [as \" + methodName + \"]\"))\n              : (name && (result += name + \".\"),\n                (result = methodName\n                  ? result + methodName\n                  : result + \"<anonymous>\"));\n            name = result;\n          }\n          \"<anonymous>\" === name && (name = \"\");\n          methodName = callSite.getScriptNameOrSourceURL() || \"<anonymous>\";\n          \"<anonymous>\" === methodName &&\n            ((methodName = \"\"),\n            callSite.isEval() &&\n              (callSite$jscomp$0 = callSite.getEvalOrigin()) &&\n              (methodName = callSite$jscomp$0.toString() + \", <anonymous>\"));\n          callSite$jscomp$0 = callSite.getLineNumber() || 0;\n          result = callSite.getColumnNumber() || 0;\n          var enclosingLine =\n              \"function\" === typeof callSite.getEnclosingLineNumber\n                ? callSite.getEnclosingLineNumber() || 0\n                : 0,\n            enclosingCol =\n              \"function\" === typeof callSite.getEnclosingColumnNumber\n                ? callSite.getEnclosingColumnNumber() || 0\n                : 0;\n          callSite = callSite.isAsync();\n          error.push([\n            name,\n            methodName,\n            callSite$jscomp$0,\n            result,\n            enclosingLine,\n            enclosingCol,\n            callSite\n          ]);\n        }\n      }\n      collectedStackTrace = error;\n      return \"\";\n    }\n    function collectStackTrace(error, structuredStackTrace) {\n      collectStackTracePrivate(error, structuredStackTrace);\n      error = (error.name || \"Error\") + \": \" + (error.message || \"\");\n      for (var i = 0; i < structuredStackTrace.length; i++)\n        error += \"\\n    at \" + structuredStackTrace[i].toString();\n      return error;\n    }\n    function parseStackTracePrivate(error, skipFrames) {\n      collectedStackTrace = null;\n      framesToSkip = skipFrames;\n      skipFrames = Error.prepareStackTrace;\n      Error.prepareStackTrace = collectStackTracePrivate;\n      try {\n        if (\"\" !== error.stack) return null;\n      } finally {\n        Error.prepareStackTrace = skipFrames;\n      }\n      return collectedStackTrace;\n    }\n    function parseStackTrace(error, skipFrames) {\n      var existing = stackTraceCache.get(error);\n      if (void 0 !== existing) return existing;\n      collectedStackTrace = null;\n      framesToSkip = skipFrames;\n      existing = Error.prepareStackTrace;\n      Error.prepareStackTrace = collectStackTrace;\n      try {\n        var stack = String(error.stack);\n      } finally {\n        Error.prepareStackTrace = existing;\n      }\n      if (null !== collectedStackTrace)\n        return (\n          (stack = collectedStackTrace),\n          (collectedStackTrace = null),\n          stackTraceCache.set(error, stack),\n          stack\n        );\n      stack.startsWith(\"Error: react-stack-top-frame\\n\") &&\n        (stack = stack.slice(29));\n      existing = stack.indexOf(\"react_stack_bottom_frame\");\n      -1 !== existing && (existing = stack.lastIndexOf(\"\\n\", existing));\n      -1 !== existing && (stack = stack.slice(0, existing));\n      stack = stack.split(\"\\n\");\n      for (existing = []; skipFrames < stack.length; skipFrames++) {\n        var parsed = frameRegExp.exec(stack[skipFrames]);\n        if (parsed) {\n          var name = parsed[1] || \"\",\n            isAsync = \"async \" === parsed[8];\n          \"<anonymous>\" === name\n            ? (name = \"\")\n            : name.startsWith(\"async \") &&\n              ((name = name.slice(5)), (isAsync = !0));\n          var filename = parsed[2] || parsed[5] || \"\";\n          \"<anonymous>\" === filename && (filename = \"\");\n          existing.push([\n            name,\n            filename,\n            +(parsed[3] || parsed[6]),\n            +(parsed[4] || parsed[7]),\n            0,\n            0,\n            isAsync\n          ]);\n        }\n      }\n      stackTraceCache.set(error, existing);\n      return existing;\n    }\n    function createTemporaryReference(temporaryReferences, id) {\n      var reference = Object.defineProperties(\n        function () {\n          throw Error(\n            \"Attempted to call a temporary Client Reference from the server but it is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"\n          );\n        },\n        { $$typeof: { value: TEMPORARY_REFERENCE_TAG } }\n      );\n      reference = new Proxy(reference, proxyHandlers);\n      temporaryReferences.set(reference, id);\n      return reference;\n    }\n    function noop() {}\n    function trackUsedThenable(thenableState, thenable, index) {\n      index = thenableState[index];\n      void 0 === index\n        ? (thenableState.push(thenable),\n          (thenableState._stacks || (thenableState._stacks = [])).push(Error()))\n        : index !== thenable && (thenable.then(noop, noop), (thenable = index));\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return thenable.value;\n        case \"rejected\":\n          throw thenable.reason;\n        default:\n          \"string\" === typeof thenable.status\n            ? thenable.then(noop, noop)\n            : ((thenableState = thenable),\n              (thenableState.status = \"pending\"),\n              thenableState.then(\n                function (fulfilledValue) {\n                  if (\"pending\" === thenable.status) {\n                    var fulfilledThenable = thenable;\n                    fulfilledThenable.status = \"fulfilled\";\n                    fulfilledThenable.value = fulfilledValue;\n                  }\n                },\n                function (error) {\n                  if (\"pending\" === thenable.status) {\n                    var rejectedThenable = thenable;\n                    rejectedThenable.status = \"rejected\";\n                    rejectedThenable.reason = error;\n                  }\n                }\n              ));\n          switch (thenable.status) {\n            case \"fulfilled\":\n              return thenable.value;\n            case \"rejected\":\n              throw thenable.reason;\n          }\n          suspendedThenable = thenable;\n          throw SuspenseException;\n      }\n    }\n    function getSuspendedThenable() {\n      if (null === suspendedThenable)\n        throw Error(\n          \"Expected a suspended thenable. This is a bug in React. Please file an issue.\"\n        );\n      var thenable = suspendedThenable;\n      suspendedThenable = null;\n      return thenable;\n    }\n    function getThenableStateAfterSuspending() {\n      var state = thenableState || [];\n      state._componentDebugInfo = currentComponentDebugInfo;\n      thenableState = currentComponentDebugInfo = null;\n      return state;\n    }\n    function unsupportedHook() {\n      throw Error(\"This Hook is not supported in Server Components.\");\n    }\n    function unsupportedRefresh() {\n      throw Error(\n        \"Refreshing the cache is not supported in Server Components.\"\n      );\n    }\n    function unsupportedContext() {\n      throw Error(\"Cannot read a Client Context from a Server Component.\");\n    }\n    function prepareStackTrace(error, structuredStackTrace) {\n      error = (error.name || \"Error\") + \": \" + (error.message || \"\");\n      for (var i = 0; i < structuredStackTrace.length; i++)\n        error += \"\\n    at \" + structuredStackTrace[i].toString();\n      return error;\n    }\n    function resetOwnerStackLimit() {\n      var now = getCurrentTime();\n      1e3 < now - lastResetTime &&\n        ((ReactSharedInternalsServer.recentlyCreatedOwnerStacks = 0),\n        (lastResetTime = now));\n    }\n    function isObjectPrototype(object) {\n      if (!object) return !1;\n      var ObjectPrototype = Object.prototype;\n      if (object === ObjectPrototype) return !0;\n      if (getPrototypeOf(object)) return !1;\n      object = Object.getOwnPropertyNames(object);\n      for (var i = 0; i < object.length; i++)\n        if (!(object[i] in ObjectPrototype)) return !1;\n      return !0;\n    }\n    function isGetter(object, name) {\n      if (object === Object.prototype || null === object) return !1;\n      var descriptor = Object.getOwnPropertyDescriptor(object, name);\n      return void 0 === descriptor\n        ? isGetter(getPrototypeOf(object), name)\n        : \"function\" === typeof descriptor.get;\n    }\n    function isSimpleObject(object) {\n      if (!isObjectPrototype(getPrototypeOf(object))) return !1;\n      for (\n        var names = Object.getOwnPropertyNames(object), i = 0;\n        i < names.length;\n        i++\n      ) {\n        var descriptor = Object.getOwnPropertyDescriptor(object, names[i]);\n        if (\n          !descriptor ||\n          (!descriptor.enumerable &&\n            ((\"key\" !== names[i] && \"ref\" !== names[i]) ||\n              \"function\" !== typeof descriptor.get))\n        )\n          return !1;\n      }\n      return !0;\n    }\n    function objectName(object) {\n      object = Object.prototype.toString.call(object);\n      return object.slice(8, object.length - 1);\n    }\n    function describeKeyForErrorMessage(key) {\n      var encodedKey = JSON.stringify(key);\n      return '\"' + key + '\"' === encodedKey ? key : encodedKey;\n    }\n    function describeValueForErrorMessage(value) {\n      switch (typeof value) {\n        case \"string\":\n          return JSON.stringify(\n            10 >= value.length ? value : value.slice(0, 10) + \"...\"\n          );\n        case \"object\":\n          if (isArrayImpl(value)) return \"[...]\";\n          if (null !== value && value.$$typeof === CLIENT_REFERENCE_TAG)\n            return \"client\";\n          value = objectName(value);\n          return \"Object\" === value ? \"{...}\" : value;\n        case \"function\":\n          return value.$$typeof === CLIENT_REFERENCE_TAG\n            ? \"client\"\n            : (value = value.displayName || value.name)\n              ? \"function \" + value\n              : \"function\";\n        default:\n          return String(value);\n      }\n    }\n    function describeElementType(type) {\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (type.$$typeof) {\n          case REACT_FORWARD_REF_TYPE:\n            return describeElementType(type.render);\n          case REACT_MEMO_TYPE:\n            return describeElementType(type.type);\n          case REACT_LAZY_TYPE:\n            var payload = type._payload;\n            type = type._init;\n            try {\n              return describeElementType(type(payload));\n            } catch (x) {}\n        }\n      return \"\";\n    }\n    function describeObjectForErrorMessage(objectOrArray, expandedName) {\n      var objKind = objectName(objectOrArray);\n      if (\"Object\" !== objKind && \"Array\" !== objKind) return objKind;\n      var start = -1,\n        length = 0;\n      if (isArrayImpl(objectOrArray))\n        if (jsxChildrenParents.has(objectOrArray)) {\n          var type = jsxChildrenParents.get(objectOrArray);\n          objKind = \"<\" + describeElementType(type) + \">\";\n          for (var i = 0; i < objectOrArray.length; i++) {\n            var value = objectOrArray[i];\n            value =\n              \"string\" === typeof value\n                ? value\n                : \"object\" === typeof value && null !== value\n                  ? \"{\" + describeObjectForErrorMessage(value) + \"}\"\n                  : \"{\" + describeValueForErrorMessage(value) + \"}\";\n            \"\" + i === expandedName\n              ? ((start = objKind.length),\n                (length = value.length),\n                (objKind += value))\n              : (objKind =\n                  15 > value.length && 40 > objKind.length + value.length\n                    ? objKind + value\n                    : objKind + \"{...}\");\n          }\n          objKind += \"</\" + describeElementType(type) + \">\";\n        } else {\n          objKind = \"[\";\n          for (type = 0; type < objectOrArray.length; type++)\n            0 < type && (objKind += \", \"),\n              (i = objectOrArray[type]),\n              (i =\n                \"object\" === typeof i && null !== i\n                  ? describeObjectForErrorMessage(i)\n                  : describeValueForErrorMessage(i)),\n              \"\" + type === expandedName\n                ? ((start = objKind.length),\n                  (length = i.length),\n                  (objKind += i))\n                : (objKind =\n                    10 > i.length && 40 > objKind.length + i.length\n                      ? objKind + i\n                      : objKind + \"...\");\n          objKind += \"]\";\n        }\n      else if (objectOrArray.$$typeof === REACT_ELEMENT_TYPE)\n        objKind = \"<\" + describeElementType(objectOrArray.type) + \"/>\";\n      else {\n        if (objectOrArray.$$typeof === CLIENT_REFERENCE_TAG) return \"client\";\n        if (jsxPropsParents.has(objectOrArray)) {\n          objKind = jsxPropsParents.get(objectOrArray);\n          objKind = \"<\" + (describeElementType(objKind) || \"...\");\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++) {\n            objKind += \" \";\n            value = type[i];\n            objKind += describeKeyForErrorMessage(value) + \"=\";\n            var _value2 = objectOrArray[value];\n            var _substr2 =\n              value === expandedName &&\n              \"object\" === typeof _value2 &&\n              null !== _value2\n                ? describeObjectForErrorMessage(_value2)\n                : describeValueForErrorMessage(_value2);\n            \"string\" !== typeof _value2 && (_substr2 = \"{\" + _substr2 + \"}\");\n            value === expandedName\n              ? ((start = objKind.length),\n                (length = _substr2.length),\n                (objKind += _substr2))\n              : (objKind =\n                  10 > _substr2.length && 40 > objKind.length + _substr2.length\n                    ? objKind + _substr2\n                    : objKind + \"...\");\n          }\n          objKind += \">\";\n        } else {\n          objKind = \"{\";\n          type = Object.keys(objectOrArray);\n          for (i = 0; i < type.length; i++)\n            0 < i && (objKind += \", \"),\n              (value = type[i]),\n              (objKind += describeKeyForErrorMessage(value) + \": \"),\n              (_value2 = objectOrArray[value]),\n              (_value2 =\n                \"object\" === typeof _value2 && null !== _value2\n                  ? describeObjectForErrorMessage(_value2)\n                  : describeValueForErrorMessage(_value2)),\n              value === expandedName\n                ? ((start = objKind.length),\n                  (length = _value2.length),\n                  (objKind += _value2))\n                : (objKind =\n                    10 > _value2.length && 40 > objKind.length + _value2.length\n                      ? objKind + _value2\n                      : objKind + \"...\");\n          objKind += \"}\";\n        }\n      }\n      return void 0 === expandedName\n        ? objKind\n        : -1 < start && 0 < length\n          ? ((objectOrArray = \" \".repeat(start) + \"^\".repeat(length)),\n            \"\\n  \" + objKind + \"\\n  \" + objectOrArray)\n          : \"\\n  \" + objKind;\n    }\n    function defaultFilterStackFrame(filename) {\n      return (\n        \"\" !== filename &&\n        !filename.startsWith(\"node:\") &&\n        !filename.includes(\"node_modules\")\n      );\n    }\n    function devirtualizeURL(url) {\n      if (url.startsWith(\"about://React/\")) {\n        var envIdx = url.indexOf(\"/\", 14),\n          suffixIdx = url.lastIndexOf(\"?\");\n        if (-1 < envIdx && -1 < suffixIdx)\n          return decodeURI(url.slice(envIdx + 1, suffixIdx));\n      }\n      return url;\n    }\n    function isPromiseCreationInternal(url, functionName) {\n      if (\"node:internal/async_hooks\" === url) return !0;\n      if (\"\" !== url) return !1;\n      switch (functionName) {\n        case \"new Promise\":\n        case \"Function.withResolvers\":\n        case \"Function.reject\":\n        case \"Function.resolve\":\n        case \"Function.all\":\n        case \"Function.allSettled\":\n        case \"Function.race\":\n        case \"Function.try\":\n          return !0;\n        default:\n          return !1;\n      }\n    }\n    function filterStackTrace(request, stack) {\n      request = request.filterStackFrame;\n      for (var filteredStack = [], i = 0; i < stack.length; i++) {\n        var callsite = stack[i],\n          functionName = callsite[0],\n          url = devirtualizeURL(callsite[1]);\n        request(url, functionName, callsite[2], callsite[3]) &&\n          ((callsite = callsite.slice(0)),\n          (callsite[1] = url),\n          filteredStack.push(callsite));\n      }\n      return filteredStack;\n    }\n    function hasUnfilteredFrame(request, stack) {\n      request = request.filterStackFrame;\n      for (var i = 0; i < stack.length; i++) {\n        var callsite = stack[i],\n          functionName = callsite[0],\n          url = devirtualizeURL(callsite[1]),\n          lineNumber = callsite[2],\n          columnNumber = callsite[3];\n        if (\n          !callsite[6] &&\n          request(url, functionName, lineNumber, columnNumber) &&\n          \"\" !== url\n        )\n          return !0;\n      }\n      return !1;\n    }\n    function isPromiseAwaitInternal(url, functionName) {\n      if (\"node:internal/async_hooks\" === url) return !0;\n      if (\"\" !== url) return !1;\n      switch (functionName) {\n        case \"Promise.then\":\n        case \"Promise.catch\":\n        case \"Promise.finally\":\n        case \"Function.reject\":\n        case \"Function.resolve\":\n        case \"Function.all\":\n        case \"Function.allSettled\":\n        case \"Function.any\":\n        case \"Function.race\":\n        case \"Function.try\":\n        case \"Function.withResolvers\":\n          return !0;\n        default:\n          return !1;\n      }\n    }\n    function isAwaitInUserspace(request, stack) {\n      for (\n        var firstFrame = 0;\n        stack.length > firstFrame &&\n        isPromiseAwaitInternal(stack[firstFrame][1], stack[firstFrame][0]);\n\n      )\n        firstFrame++;\n      if (stack.length > firstFrame) {\n        request = request.filterStackFrame;\n        stack = stack[firstFrame];\n        firstFrame = stack[0];\n        var url = devirtualizeURL(stack[1]);\n        return request(url, firstFrame, stack[2], stack[3]) && \"\" !== url;\n      }\n      return !1;\n    }\n    function patchConsole(consoleInst, methodName) {\n      var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName);\n      if (\n        descriptor &&\n        (descriptor.configurable || descriptor.writable) &&\n        \"function\" === typeof descriptor.value\n      ) {\n        var originalMethod = descriptor.value;\n        descriptor = Object.getOwnPropertyDescriptor(originalMethod, \"name\");\n        var wrapperMethod = function () {\n          var request = resolveRequest();\n          if ((\"assert\" !== methodName || !arguments[0]) && null !== request) {\n            var stack = filterStackTrace(\n              request,\n              parseStackTracePrivate(Error(\"react-stack-top-frame\"), 1) || []\n            );\n            request.pendingDebugChunks++;\n            var owner = resolveOwner(),\n              args = Array.from(arguments);\n            a: {\n              var env = 0;\n              switch (methodName) {\n                case \"dir\":\n                case \"dirxml\":\n                case \"groupEnd\":\n                case \"table\":\n                  env = null;\n                  break a;\n                case \"assert\":\n                  env = 1;\n              }\n              var format = args[env],\n                style = args[env + 1],\n                badge = args[env + 2];\n              \"string\" === typeof format &&\n              format.startsWith(\"\\u001b[0m\\u001b[7m%c%s\\u001b[0m%c\") &&\n              \"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px\" ===\n                style &&\n              \"string\" === typeof badge\n                ? ((format = format.slice(18)),\n                  \" \" === format[0] && (format = format.slice(1)),\n                  args.splice(env, 4, format),\n                  (env = badge.slice(1, badge.length - 1)))\n                : (env = null);\n            }\n            null === env && (env = (0, request.environmentName)());\n            null != owner && outlineComponentInfo(request, owner);\n            badge = [methodName, stack, owner, env];\n            badge.push.apply(badge, args);\n            args = serializeDebugModel(\n              request,\n              (null === request.deferredDebugObjects ? 500 : 10) + stack.length,\n              badge\n            );\n            \"[\" !== args[0] &&\n              (args = serializeDebugModel(request, 10 + stack.length, [\n                methodName,\n                stack,\n                owner,\n                env,\n                \"Unknown Value: React could not send it from the server.\"\n              ]));\n            request.completedDebugChunks.push(\":W\" + args + \"\\n\");\n          }\n          return originalMethod.apply(this, arguments);\n        };\n        descriptor && Object.defineProperty(wrapperMethod, \"name\", descriptor);\n        Object.defineProperty(consoleInst, methodName, {\n          value: wrapperMethod\n        });\n      }\n    }\n    function getCurrentStackInDEV() {\n      var owner = resolveOwner();\n      if (null === owner) return \"\";\n      try {\n        var info = \"\";\n        if (owner.owner || \"string\" !== typeof owner.name) {\n          for (; owner; ) {\n            var ownerStack = owner.debugStack;\n            if (null != ownerStack) {\n              if ((owner = owner.owner)) {\n                var JSCompiler_temp_const = info;\n                var error = ownerStack,\n                  prevPrepareStackTrace = Error.prepareStackTrace;\n                Error.prepareStackTrace = prepareStackTrace;\n                var stack = error.stack;\n                Error.prepareStackTrace = prevPrepareStackTrace;\n                stack.startsWith(\"Error: react-stack-top-frame\\n\") &&\n                  (stack = stack.slice(29));\n                var idx = stack.indexOf(\"\\n\");\n                -1 !== idx && (stack = stack.slice(idx + 1));\n                idx = stack.indexOf(\"react_stack_bottom_frame\");\n                -1 !== idx && (idx = stack.lastIndexOf(\"\\n\", idx));\n                var JSCompiler_inline_result =\n                  -1 !== idx ? (stack = stack.slice(0, idx)) : \"\";\n                info =\n                  JSCompiler_temp_const + (\"\\n\" + JSCompiler_inline_result);\n              }\n            } else break;\n          }\n          var JSCompiler_inline_result$jscomp$0 = info;\n        } else {\n          JSCompiler_temp_const = owner.name;\n          if (void 0 === prefix)\n            try {\n              throw Error();\n            } catch (x) {\n              (prefix =\n                ((error = x.stack.trim().match(/\\n( *(at )?)/)) && error[1]) ||\n                \"\"),\n                (suffix =\n                  -1 < x.stack.indexOf(\"\\n    at\")\n                    ? \" (<anonymous>)\"\n                    : -1 < x.stack.indexOf(\"@\")\n                      ? \"@unknown:0:0\"\n                      : \"\");\n            }\n          JSCompiler_inline_result$jscomp$0 =\n            \"\\n\" + prefix + JSCompiler_temp_const + suffix;\n        }\n      } catch (x) {\n        JSCompiler_inline_result$jscomp$0 =\n          \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n      }\n      return JSCompiler_inline_result$jscomp$0;\n    }\n    function defaultErrorHandler(error) {\n      console.error(error);\n    }\n    function RequestInstance(\n      type,\n      model,\n      bundlerConfig,\n      onError,\n      onAllReady,\n      onFatalError,\n      identifierPrefix,\n      temporaryReferences,\n      debugStartTime,\n      environmentName,\n      filterStackFrame,\n      keepDebugAlive\n    ) {\n      if (\n        null !== ReactSharedInternalsServer.A &&\n        ReactSharedInternalsServer.A !== DefaultAsyncDispatcher\n      )\n        throw Error(\n          \"Currently React only supports one RSC renderer at a time.\"\n        );\n      ReactSharedInternalsServer.A = DefaultAsyncDispatcher;\n      ReactSharedInternalsServer.getCurrentStack = getCurrentStackInDEV;\n      var abortSet = new Set(),\n        pingedTasks = [],\n        hints = new Set();\n      this.type = type;\n      this.status = OPENING;\n      this.flushScheduled = !1;\n      this.destination = this.fatalError = null;\n      this.bundlerConfig = bundlerConfig;\n      this.cache = new Map();\n      this.cacheController = new AbortController();\n      this.pendingChunks = this.nextChunkId = 0;\n      this.hints = hints;\n      this.abortableTasks = abortSet;\n      this.pingedTasks = pingedTasks;\n      this.completedImportChunks = [];\n      this.completedHintChunks = [];\n      this.completedRegularChunks = [];\n      this.completedErrorChunks = [];\n      this.writtenSymbols = new Map();\n      this.writtenClientReferences = new Map();\n      this.writtenServerReferences = new Map();\n      this.writtenObjects = new WeakMap();\n      this.temporaryReferences = temporaryReferences;\n      this.identifierPrefix = identifierPrefix || \"\";\n      this.identifierCount = 1;\n      this.taintCleanupQueue = [];\n      this.onError = void 0 === onError ? defaultErrorHandler : onError;\n      this.onAllReady = onAllReady;\n      this.onFatalError = onFatalError;\n      this.pendingDebugChunks = 0;\n      this.completedDebugChunks = [];\n      this.debugDestination = null;\n      this.environmentName =\n        void 0 === environmentName\n          ? function () {\n              return \"Server\";\n            }\n          : \"function\" !== typeof environmentName\n            ? function () {\n                return environmentName;\n              }\n            : environmentName;\n      this.filterStackFrame =\n        void 0 === filterStackFrame\n          ? defaultFilterStackFrame\n          : filterStackFrame;\n      this.didWarnForKey = null;\n      this.writtenDebugObjects = new WeakMap();\n      this.deferredDebugObjects = keepDebugAlive\n        ? { retained: new Map(), existing: new Map() }\n        : null;\n      type =\n        \"number\" === typeof debugStartTime\n          ? (this.timeOrigin = debugStartTime - performance.timeOrigin)\n          : (this.timeOrigin = performance.now());\n      emitTimeOriginChunk(this, type + performance.timeOrigin);\n      this.abortTime = -0;\n      model = createTask(\n        this,\n        model,\n        null,\n        !1,\n        0,\n        abortSet,\n        type,\n        null,\n        null,\n        null\n      );\n      pingedTasks.push(model);\n    }\n    function createRequest(\n      model,\n      bundlerConfig,\n      onError,\n      identifierPrefix,\n      temporaryReferences,\n      debugStartTime,\n      environmentName,\n      filterStackFrame,\n      keepDebugAlive\n    ) {\n      resetOwnerStackLimit();\n      return new RequestInstance(\n        20,\n        model,\n        bundlerConfig,\n        onError,\n        noop,\n        noop,\n        identifierPrefix,\n        temporaryReferences,\n        debugStartTime,\n        environmentName,\n        filterStackFrame,\n        keepDebugAlive\n      );\n    }\n    function createPrerenderRequest(\n      model,\n      bundlerConfig,\n      onAllReady,\n      onFatalError,\n      onError,\n      identifierPrefix,\n      temporaryReferences,\n      debugStartTime,\n      environmentName,\n      filterStackFrame,\n      keepDebugAlive\n    ) {\n      resetOwnerStackLimit();\n      return new RequestInstance(\n        PRERENDER,\n        model,\n        bundlerConfig,\n        onError,\n        onAllReady,\n        onFatalError,\n        identifierPrefix,\n        temporaryReferences,\n        debugStartTime,\n        environmentName,\n        filterStackFrame,\n        keepDebugAlive\n      );\n    }\n    function resolveRequest() {\n      if (currentRequest) return currentRequest;\n      var store = requestStorage.getStore();\n      return store ? store : null;\n    }\n    function serializeDebugThenable(request, counter, thenable) {\n      request.pendingDebugChunks++;\n      var id = request.nextChunkId++,\n        ref = \"$@\" + id.toString(16);\n      request.writtenDebugObjects.set(thenable, ref);\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return (\n            emitOutlinedDebugModelChunk(request, id, counter, thenable.value),\n            ref\n          );\n        case \"rejected\":\n          return (\n            emitErrorChunk(request, id, \"\", thenable.reason, !0, null), ref\n          );\n      }\n      if (request.status === ABORTING)\n        return emitDebugHaltChunk(request, id), ref;\n      var deferredDebugObjects = request.deferredDebugObjects;\n      if (null !== deferredDebugObjects)\n        return (\n          deferredDebugObjects.retained.set(id, thenable),\n          (ref = \"$Y@\" + id.toString(16)),\n          request.writtenDebugObjects.set(thenable, ref),\n          ref\n        );\n      var cancelled = !1;\n      thenable.then(\n        function (value) {\n          cancelled ||\n            ((cancelled = !0),\n            request.status === ABORTING\n              ? emitDebugHaltChunk(request, id)\n              : (isArrayImpl(value) && 200 < value.length) ||\n                  ((value instanceof ArrayBuffer ||\n                    value instanceof Int8Array ||\n                    value instanceof Uint8Array ||\n                    value instanceof Uint8ClampedArray ||\n                    value instanceof Int16Array ||\n                    value instanceof Uint16Array ||\n                    value instanceof Int32Array ||\n                    value instanceof Uint32Array ||\n                    value instanceof Float32Array ||\n                    value instanceof Float64Array ||\n                    value instanceof BigInt64Array ||\n                    value instanceof BigUint64Array ||\n                    value instanceof DataView) &&\n                    1e3 < value.byteLength)\n                ? emitDebugHaltChunk(request, id)\n                : emitOutlinedDebugModelChunk(request, id, counter, value),\n            enqueueFlush(request));\n        },\n        function (reason) {\n          cancelled ||\n            ((cancelled = !0),\n            request.status === ABORTING\n              ? emitDebugHaltChunk(request, id)\n              : emitErrorChunk(request, id, \"\", reason, !0, null),\n            enqueueFlush(request));\n        }\n      );\n      Promise.resolve().then(function () {\n        cancelled ||\n          ((cancelled = !0),\n          emitDebugHaltChunk(request, id),\n          enqueueFlush(request),\n          (counter = request = null));\n      });\n      return ref;\n    }\n    function emitRequestedDebugThenable(request, id, counter, thenable) {\n      thenable.then(\n        function (value) {\n          request.status === ABORTING\n            ? emitDebugHaltChunk(request, id)\n            : emitOutlinedDebugModelChunk(request, id, counter, value);\n          enqueueFlush(request);\n        },\n        function (reason) {\n          request.status === ABORTING\n            ? emitDebugHaltChunk(request, id)\n            : emitErrorChunk(request, id, \"\", reason, !0, null);\n          enqueueFlush(request);\n        }\n      );\n    }\n    function serializeThenable(request, task, thenable) {\n      var newTask = createTask(\n        request,\n        thenable,\n        task.keyPath,\n        task.implicitSlot,\n        task.formatContext,\n        request.abortableTasks,\n        task.time,\n        task.debugOwner,\n        task.debugStack,\n        task.debugTask\n      );\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return (\n            forwardDebugInfoFromThenable(\n              request,\n              newTask,\n              thenable,\n              null,\n              null\n            ),\n            (newTask.model = thenable.value),\n            pingTask(request, newTask),\n            newTask.id\n          );\n        case \"rejected\":\n          return (\n            forwardDebugInfoFromThenable(\n              request,\n              newTask,\n              thenable,\n              null,\n              null\n            ),\n            erroredTask(request, newTask, thenable.reason),\n            newTask.id\n          );\n        default:\n          if (request.status === ABORTING)\n            return (\n              request.abortableTasks.delete(newTask),\n              request.type === PRERENDER\n                ? (haltTask(newTask), finishHaltedTask(newTask, request))\n                : ((task = request.fatalError),\n                  abortTask(newTask),\n                  finishAbortedTask(newTask, request, task)),\n              newTask.id\n            );\n          \"string\" !== typeof thenable.status &&\n            ((thenable.status = \"pending\"),\n            thenable.then(\n              function (fulfilledValue) {\n                \"pending\" === thenable.status &&\n                  ((thenable.status = \"fulfilled\"),\n                  (thenable.value = fulfilledValue));\n              },\n              function (error) {\n                \"pending\" === thenable.status &&\n                  ((thenable.status = \"rejected\"), (thenable.reason = error));\n              }\n            ));\n      }\n      thenable.then(\n        function (value) {\n          forwardDebugInfoFromCurrentContext(request, newTask, thenable);\n          newTask.model = value;\n          pingTask(request, newTask);\n        },\n        function (reason) {\n          newTask.status === PENDING$1 &&\n            ((newTask.timed = !0),\n            erroredTask(request, newTask, reason),\n            enqueueFlush(request));\n        }\n      );\n      return newTask.id;\n    }\n    function serializeReadableStream(request, task, stream) {\n      function progress(entry) {\n        if (streamTask.status === PENDING$1)\n          if (entry.done)\n            (streamTask.status = COMPLETED),\n              (entry = streamTask.id.toString(16) + \":C\\n\"),\n              request.completedRegularChunks.push(entry),\n              request.abortableTasks.delete(streamTask),\n              request.cacheController.signal.removeEventListener(\n                \"abort\",\n                abortStream\n              ),\n              enqueueFlush(request),\n              callOnAllReadyIfReady(request);\n          else\n            try {\n              request.pendingChunks++,\n                (streamTask.model = entry.value),\n                isByteStream\n                  ? emitTypedArrayChunk(\n                      request,\n                      streamTask.id,\n                      \"b\",\n                      streamTask.model,\n                      !1\n                    )\n                  : tryStreamTask(request, streamTask),\n                enqueueFlush(request),\n                reader.read().then(progress, error);\n            } catch (x$0) {\n              error(x$0);\n            }\n      }\n      function error(reason) {\n        streamTask.status === PENDING$1 &&\n          (request.cacheController.signal.removeEventListener(\n            \"abort\",\n            abortStream\n          ),\n          erroredTask(request, streamTask, reason),\n          enqueueFlush(request),\n          reader.cancel(reason).then(error, error));\n      }\n      function abortStream() {\n        if (streamTask.status === PENDING$1) {\n          var signal = request.cacheController.signal;\n          signal.removeEventListener(\"abort\", abortStream);\n          signal = signal.reason;\n          request.type === PRERENDER\n            ? (request.abortableTasks.delete(streamTask),\n              haltTask(streamTask),\n              finishHaltedTask(streamTask, request))\n            : (erroredTask(request, streamTask, signal), enqueueFlush(request));\n          reader.cancel(signal).then(error, error);\n        }\n      }\n      var supportsBYOB = stream.supportsBYOB;\n      if (void 0 === supportsBYOB)\n        try {\n          stream.getReader({ mode: \"byob\" }).releaseLock(), (supportsBYOB = !0);\n        } catch (x) {\n          supportsBYOB = !1;\n        }\n      var isByteStream = supportsBYOB,\n        reader = stream.getReader(),\n        streamTask = createTask(\n          request,\n          task.model,\n          task.keyPath,\n          task.implicitSlot,\n          task.formatContext,\n          request.abortableTasks,\n          task.time,\n          task.debugOwner,\n          task.debugStack,\n          task.debugTask\n        );\n      request.pendingChunks++;\n      task =\n        streamTask.id.toString(16) + \":\" + (isByteStream ? \"r\" : \"R\") + \"\\n\";\n      request.completedRegularChunks.push(task);\n      request.cacheController.signal.addEventListener(\"abort\", abortStream);\n      reader.read().then(progress, error);\n      return serializeByValueID(streamTask.id);\n    }\n    function serializeAsyncIterable(request, task, iterable, iterator) {\n      function progress(entry) {\n        if (streamTask.status === PENDING$1)\n          if (entry.done) {\n            streamTask.status = COMPLETED;\n            if (void 0 === entry.value)\n              var endStreamRow = streamTask.id.toString(16) + \":C\\n\";\n            else\n              try {\n                var chunkId = outlineModel(request, entry.value);\n                endStreamRow =\n                  streamTask.id.toString(16) +\n                  \":C\" +\n                  stringify(serializeByValueID(chunkId)) +\n                  \"\\n\";\n              } catch (x) {\n                error(x);\n                return;\n              }\n            request.completedRegularChunks.push(endStreamRow);\n            request.abortableTasks.delete(streamTask);\n            request.cacheController.signal.removeEventListener(\n              \"abort\",\n              abortIterable\n            );\n            enqueueFlush(request);\n            callOnAllReadyIfReady(request);\n          } else\n            try {\n              (streamTask.model = entry.value),\n                request.pendingChunks++,\n                tryStreamTask(request, streamTask),\n                enqueueFlush(request),\n                callIteratorInDEV(iterator, progress, error);\n            } catch (x$1) {\n              error(x$1);\n            }\n      }\n      function error(reason) {\n        streamTask.status === PENDING$1 &&\n          (request.cacheController.signal.removeEventListener(\n            \"abort\",\n            abortIterable\n          ),\n          erroredTask(request, streamTask, reason),\n          enqueueFlush(request),\n          \"function\" === typeof iterator.throw &&\n            iterator.throw(reason).then(error, error));\n      }\n      function abortIterable() {\n        if (streamTask.status === PENDING$1) {\n          var signal = request.cacheController.signal;\n          signal.removeEventListener(\"abort\", abortIterable);\n          var reason = signal.reason;\n          request.type === PRERENDER\n            ? (request.abortableTasks.delete(streamTask),\n              haltTask(streamTask),\n              finishHaltedTask(streamTask, request))\n            : (erroredTask(request, streamTask, signal.reason),\n              enqueueFlush(request));\n          \"function\" === typeof iterator.throw &&\n            iterator.throw(reason).then(error, error);\n        }\n      }\n      var isIterator = iterable === iterator,\n        streamTask = createTask(\n          request,\n          task.model,\n          task.keyPath,\n          task.implicitSlot,\n          task.formatContext,\n          request.abortableTasks,\n          task.time,\n          task.debugOwner,\n          task.debugStack,\n          task.debugTask\n        );\n      (task = iterable._debugInfo) &&\n        forwardDebugInfo(request, streamTask, task);\n      request.pendingChunks++;\n      isIterator =\n        streamTask.id.toString(16) + \":\" + (isIterator ? \"x\" : \"X\") + \"\\n\";\n      request.completedRegularChunks.push(isIterator);\n      request.cacheController.signal.addEventListener(\"abort\", abortIterable);\n      callIteratorInDEV(iterator, progress, error);\n      return serializeByValueID(streamTask.id);\n    }\n    function emitHint(request, code, model) {\n      model = stringify(model);\n      request.completedHintChunks.push(\":H\" + code + model + \"\\n\");\n      enqueueFlush(request);\n    }\n    function readThenable(thenable) {\n      if (\"fulfilled\" === thenable.status) return thenable.value;\n      if (\"rejected\" === thenable.status) throw thenable.reason;\n      throw thenable;\n    }\n    function createLazyWrapperAroundWakeable(request, task, wakeable) {\n      switch (wakeable.status) {\n        case \"fulfilled\":\n          return (\n            forwardDebugInfoFromThenable(request, task, wakeable, null, null),\n            wakeable.value\n          );\n        case \"rejected\":\n          forwardDebugInfoFromThenable(request, task, wakeable, null, null);\n          break;\n        default:\n          \"string\" !== typeof wakeable.status &&\n            ((wakeable.status = \"pending\"),\n            wakeable.then(\n              function (fulfilledValue) {\n                forwardDebugInfoFromCurrentContext(request, task, wakeable);\n                \"pending\" === wakeable.status &&\n                  ((wakeable.status = \"fulfilled\"),\n                  (wakeable.value = fulfilledValue));\n              },\n              function (error) {\n                forwardDebugInfoFromCurrentContext(request, task, wakeable);\n                \"pending\" === wakeable.status &&\n                  ((wakeable.status = \"rejected\"), (wakeable.reason = error));\n              }\n            ));\n      }\n      return {\n        $$typeof: REACT_LAZY_TYPE,\n        _payload: wakeable,\n        _init: readThenable\n      };\n    }\n    function callWithDebugContextInDEV(request, task, callback, arg) {\n      var componentDebugInfo = {\n        name: \"\",\n        env: task.environmentName,\n        key: null,\n        owner: task.debugOwner\n      };\n      componentDebugInfo.stack =\n        null === task.debugStack\n          ? null\n          : filterStackTrace(request, parseStackTrace(task.debugStack, 1));\n      componentDebugInfo.debugStack = task.debugStack;\n      request = componentDebugInfo.debugTask = task.debugTask;\n      currentOwner = componentDebugInfo;\n      try {\n        return request ? request.run(callback.bind(null, arg)) : callback(arg);\n      } finally {\n        currentOwner = null;\n      }\n    }\n    function processServerComponentReturnValue(\n      request,\n      task,\n      Component,\n      result\n    ) {\n      if (\n        \"object\" !== typeof result ||\n        null === result ||\n        isClientReference(result)\n      )\n        return result;\n      if (\"function\" === typeof result.then)\n        return (\n          result.then(function (resolvedValue) {\n            \"object\" === typeof resolvedValue &&\n              null !== resolvedValue &&\n              resolvedValue.$$typeof === REACT_ELEMENT_TYPE &&\n              (resolvedValue._store.validated = 1);\n          }, voidHandler),\n          createLazyWrapperAroundWakeable(request, task, result)\n        );\n      result.$$typeof === REACT_ELEMENT_TYPE && (result._store.validated = 1);\n      var iteratorFn = getIteratorFn(result);\n      if (iteratorFn) {\n        var multiShot = _defineProperty({}, Symbol.iterator, function () {\n          var iterator = iteratorFn.call(result);\n          iterator !== result ||\n            (\"[object GeneratorFunction]\" ===\n              Object.prototype.toString.call(Component) &&\n              \"[object Generator]\" ===\n                Object.prototype.toString.call(result)) ||\n            callWithDebugContextInDEV(request, task, function () {\n              console.error(\n                \"Returning an Iterator from a Server Component is not supported since it cannot be looped over more than once. \"\n              );\n            });\n          return iterator;\n        });\n        multiShot._debugInfo = result._debugInfo;\n        return multiShot;\n      }\n      return \"function\" !== typeof result[ASYNC_ITERATOR] ||\n        (\"function\" === typeof ReadableStream &&\n          result instanceof ReadableStream)\n        ? result\n        : ((multiShot = _defineProperty({}, ASYNC_ITERATOR, function () {\n            var iterator = result[ASYNC_ITERATOR]();\n            iterator !== result ||\n              (\"[object AsyncGeneratorFunction]\" ===\n                Object.prototype.toString.call(Component) &&\n                \"[object AsyncGenerator]\" ===\n                  Object.prototype.toString.call(result)) ||\n              callWithDebugContextInDEV(request, task, function () {\n                console.error(\n                  \"Returning an AsyncIterator from a Server Component is not supported since it cannot be looped over more than once. \"\n                );\n              });\n            return iterator;\n          })),\n          (multiShot._debugInfo = result._debugInfo),\n          multiShot);\n    }\n    function renderFunctionComponent(\n      request,\n      task,\n      key,\n      Component,\n      props,\n      validated\n    ) {\n      var prevThenableState = task.thenableState;\n      task.thenableState = null;\n      if (canEmitDebugInfo)\n        if (null !== prevThenableState)\n          var componentDebugInfo = prevThenableState._componentDebugInfo;\n        else {\n          var componentDebugID = task.id;\n          componentDebugInfo = Component.displayName || Component.name || \"\";\n          var componentEnv = (0, request.environmentName)();\n          request.pendingChunks++;\n          componentDebugInfo = {\n            name: componentDebugInfo,\n            env: componentEnv,\n            key: key,\n            owner: task.debugOwner\n          };\n          componentDebugInfo.stack =\n            null === task.debugStack\n              ? null\n              : filterStackTrace(request, parseStackTrace(task.debugStack, 1));\n          componentDebugInfo.props = props;\n          componentDebugInfo.debugStack = task.debugStack;\n          componentDebugInfo.debugTask = task.debugTask;\n          outlineComponentInfo(request, componentDebugInfo);\n          advanceTaskTime(request, task, performance.now());\n          emitDebugChunk(request, componentDebugID, componentDebugInfo);\n          task.environmentName = componentEnv;\n          2 === validated &&\n            warnForMissingKey(request, key, componentDebugInfo, task.debugTask);\n        }\n      else return outlineTask(request, task);\n      thenableIndexCounter = 0;\n      thenableState = prevThenableState;\n      currentComponentDebugInfo = componentDebugInfo;\n      props = task.debugTask\n        ? task.debugTask.run(\n            componentStorage.run.bind(\n              componentStorage,\n              componentDebugInfo,\n              callComponentInDEV,\n              Component,\n              props,\n              componentDebugInfo\n            )\n          )\n        : componentStorage.run(\n            componentDebugInfo,\n            callComponentInDEV,\n            Component,\n            props,\n            componentDebugInfo\n          );\n      if (request.status === ABORTING)\n        throw (\n          (\"object\" !== typeof props ||\n            null === props ||\n            \"function\" !== typeof props.then ||\n            isClientReference(props) ||\n            props.then(voidHandler, voidHandler),\n          null)\n        );\n      validated = thenableState;\n      if (null !== validated)\n        for (\n          prevThenableState = validated._stacks || (validated._stacks = []),\n            componentDebugID = 0;\n          componentDebugID < validated.length;\n          componentDebugID++\n        )\n          forwardDebugInfoFromThenable(\n            request,\n            task,\n            validated[componentDebugID],\n            componentDebugInfo,\n            prevThenableState[componentDebugID]\n          );\n      props = processServerComponentReturnValue(\n        request,\n        task,\n        Component,\n        props\n      );\n      task.debugOwner = componentDebugInfo;\n      task.debugStack = null;\n      task.debugTask = null;\n      Component = task.keyPath;\n      componentDebugInfo = task.implicitSlot;\n      null !== key\n        ? (task.keyPath =\n            key === REACT_OPTIMISTIC_KEY || Component === REACT_OPTIMISTIC_KEY\n              ? REACT_OPTIMISTIC_KEY\n              : null === Component\n                ? key\n                : Component + \",\" + key)\n        : null === Component && (task.implicitSlot = !0);\n      request = renderModelDestructive(request, task, emptyRoot, \"\", props);\n      task.keyPath = Component;\n      task.implicitSlot = componentDebugInfo;\n      return request;\n    }\n    function warnForMissingKey(request, key, componentDebugInfo, debugTask) {\n      function logKeyError() {\n        console.error(\n          'Each child in a list should have a unique \"key\" prop.%s%s See https://react.dev/link/warning-keys for more information.',\n          \"\",\n          \"\"\n        );\n      }\n      key = request.didWarnForKey;\n      null == key && (key = request.didWarnForKey = new WeakSet());\n      request = componentDebugInfo.owner;\n      if (null != request) {\n        if (key.has(request)) return;\n        key.add(request);\n      }\n      debugTask\n        ? debugTask.run(\n            componentStorage.run.bind(\n              componentStorage,\n              componentDebugInfo,\n              callComponentInDEV,\n              logKeyError,\n              null,\n              componentDebugInfo\n            )\n          )\n        : componentStorage.run(\n            componentDebugInfo,\n            callComponentInDEV,\n            logKeyError,\n            null,\n            componentDebugInfo\n          );\n    }\n    function renderFragment(request, task, children) {\n      for (var i = 0; i < children.length; i++) {\n        var child = children[i];\n        null === child ||\n          \"object\" !== typeof child ||\n          child.$$typeof !== REACT_ELEMENT_TYPE ||\n          null !== child.key ||\n          child._store.validated ||\n          (child._store.validated = 2);\n      }\n      if (null !== task.keyPath)\n        return (\n          (request = [\n            REACT_ELEMENT_TYPE,\n            REACT_FRAGMENT_TYPE,\n            task.keyPath,\n            { children: children },\n            null,\n            null,\n            0\n          ]),\n          task.implicitSlot ? [request] : request\n        );\n      if ((i = children._debugInfo)) {\n        if (canEmitDebugInfo) forwardDebugInfo(request, task, i);\n        else return outlineTask(request, task);\n        children = Array.from(children);\n      }\n      return children;\n    }\n    function renderAsyncFragment(request, task, children, getAsyncIterator) {\n      if (null !== task.keyPath)\n        return (\n          (request = [\n            REACT_ELEMENT_TYPE,\n            REACT_FRAGMENT_TYPE,\n            task.keyPath,\n            { children: children },\n            null,\n            null,\n            0\n          ]),\n          task.implicitSlot ? [request] : request\n        );\n      getAsyncIterator = getAsyncIterator.call(children);\n      return serializeAsyncIterable(request, task, children, getAsyncIterator);\n    }\n    function deferTask(request, task) {\n      task = createTask(\n        request,\n        task.model,\n        task.keyPath,\n        task.implicitSlot,\n        task.formatContext,\n        request.abortableTasks,\n        task.time,\n        task.debugOwner,\n        task.debugStack,\n        task.debugTask\n      );\n      pingTask(request, task);\n      return serializeLazyID(task.id);\n    }\n    function outlineTask(request, task) {\n      task = createTask(\n        request,\n        task.model,\n        task.keyPath,\n        task.implicitSlot,\n        task.formatContext,\n        request.abortableTasks,\n        task.time,\n        task.debugOwner,\n        task.debugStack,\n        task.debugTask\n      );\n      retryTask(request, task);\n      return task.status === COMPLETED\n        ? serializeByValueID(task.id)\n        : serializeLazyID(task.id);\n    }\n    function renderElement(request, task, type, key, ref, props, validated) {\n      if (null !== ref && void 0 !== ref)\n        throw Error(\n          \"Refs cannot be used in Server Components, nor passed to Client Components.\"\n        );\n      jsxPropsParents.set(props, type);\n      \"object\" === typeof props.children &&\n        null !== props.children &&\n        jsxChildrenParents.set(props.children, type);\n      if (\n        \"function\" !== typeof type ||\n        isClientReference(type) ||\n        type.$$typeof === TEMPORARY_REFERENCE_TAG\n      ) {\n        if (type === REACT_FRAGMENT_TYPE && null === key)\n          return (\n            2 === validated &&\n              ((validated = {\n                name: \"Fragment\",\n                env: (0, request.environmentName)(),\n                key: key,\n                owner: task.debugOwner,\n                stack:\n                  null === task.debugStack\n                    ? null\n                    : filterStackTrace(\n                        request,\n                        parseStackTrace(task.debugStack, 1)\n                      ),\n                props: props,\n                debugStack: task.debugStack,\n                debugTask: task.debugTask\n              }),\n              warnForMissingKey(request, key, validated, task.debugTask)),\n            (validated = task.implicitSlot),\n            null === task.keyPath && (task.implicitSlot = !0),\n            (request = renderModelDestructive(\n              request,\n              task,\n              emptyRoot,\n              \"\",\n              props.children\n            )),\n            (task.implicitSlot = validated),\n            request\n          );\n        if (\n          null != type &&\n          \"object\" === typeof type &&\n          !isClientReference(type)\n        )\n          switch (type.$$typeof) {\n            case REACT_LAZY_TYPE:\n              type = callLazyInitInDEV(type);\n              if (request.status === ABORTING) throw null;\n              return renderElement(\n                request,\n                task,\n                type,\n                key,\n                ref,\n                props,\n                validated\n              );\n            case REACT_FORWARD_REF_TYPE:\n              return renderFunctionComponent(\n                request,\n                task,\n                key,\n                type.render,\n                props,\n                validated\n              );\n            case REACT_MEMO_TYPE:\n              return renderElement(\n                request,\n                task,\n                type.type,\n                key,\n                ref,\n                props,\n                validated\n              );\n            case REACT_ELEMENT_TYPE:\n              type._store.validated = 1;\n          }\n        else if (\"string\" === typeof type) {\n          ref = task.formatContext;\n          var newFormatContext = getChildFormatContext(ref, type, props);\n          ref !== newFormatContext &&\n            null != props.children &&\n            outlineModelWithFormatContext(\n              request,\n              props.children,\n              newFormatContext\n            );\n        }\n      } else\n        return renderFunctionComponent(\n          request,\n          task,\n          key,\n          type,\n          props,\n          validated\n        );\n      ref = task.keyPath;\n      null === key\n        ? (key = ref)\n        : null !== ref &&\n          (key =\n            ref === REACT_OPTIMISTIC_KEY || key === REACT_OPTIMISTIC_KEY\n              ? REACT_OPTIMISTIC_KEY\n              : ref + \",\" + key);\n      newFormatContext = null;\n      ref = task.debugOwner;\n      null !== ref && outlineComponentInfo(request, ref);\n      if (null !== task.debugStack) {\n        newFormatContext = filterStackTrace(\n          request,\n          parseStackTrace(task.debugStack, 1)\n        );\n        var id = outlineDebugModel(\n          request,\n          { objectLimit: 2 * newFormatContext.length + 1 },\n          newFormatContext\n        );\n        request.writtenObjects.set(newFormatContext, serializeByValueID(id));\n      }\n      request = [\n        REACT_ELEMENT_TYPE,\n        type,\n        key,\n        props,\n        ref,\n        newFormatContext,\n        validated\n      ];\n      task = task.implicitSlot && null !== key ? [request] : request;\n      return task;\n    }\n    function visitAsyncNode(\n      request,\n      task$jscomp$0,\n      node$jscomp$0,\n      visited,\n      cutOff\n    ) {\n      for (\n        var chain = [];\n        null !== node$jscomp$0 && !visited.has(node$jscomp$0);\n\n      )\n        chain.push(node$jscomp$0), (node$jscomp$0 = node$jscomp$0.previous);\n      var previousIONode =\n        null !== node$jscomp$0 ? visited.get(node$jscomp$0) : null;\n      for (\n        node$jscomp$0 = chain.length - 1;\n        0 <= node$jscomp$0;\n        node$jscomp$0--\n      ) {\n        var n = chain[node$jscomp$0];\n        visited.set(n, null);\n        var result = request;\n        var task = task$jscomp$0,\n          node = n,\n          visited$jscomp$0 = visited,\n          cutOff$jscomp$0 = cutOff;\n        if (0 <= node.end && node.end <= result.timeOrigin) result = null;\n        else\n          switch (node.tag) {\n            case 0:\n              result = node;\n              break;\n            case 3:\n              result = previousIONode;\n              break;\n            case 1:\n              var awaited = node.awaited,\n                promise = node.promise.deref();\n              if (null !== awaited)\n                if (\n                  ((cutOff$jscomp$0 = visitAsyncNode(\n                    result,\n                    task,\n                    awaited,\n                    visited$jscomp$0,\n                    cutOff$jscomp$0\n                  )),\n                  void 0 === cutOff$jscomp$0)\n                ) {\n                  result = void 0;\n                  break;\n                } else\n                  null !== cutOff$jscomp$0\n                    ? (previousIONode =\n                        1 === cutOff$jscomp$0.tag\n                          ? cutOff$jscomp$0\n                          : (null !== node.stack &&\n                                hasUnfilteredFrame(result, node.stack)) ||\n                              (void 0 !== promise &&\n                                \"string\" === typeof promise.displayName &&\n                                (null === cutOff$jscomp$0.stack ||\n                                  !hasUnfilteredFrame(\n                                    result,\n                                    cutOff$jscomp$0.stack\n                                  )))\n                            ? node\n                            : cutOff$jscomp$0)\n                    : result.status === ABORTING &&\n                      node.start < result.abortTime &&\n                      node.end > result.abortTime &&\n                      ((null !== node.stack &&\n                        hasUnfilteredFrame(result, node.stack)) ||\n                        (void 0 !== promise &&\n                          \"string\" === typeof promise.displayName)) &&\n                      (previousIONode = node);\n              void 0 !== promise &&\n                ((node = promise._debugInfo),\n                null == node ||\n                  visited$jscomp$0.has(node) ||\n                  (visited$jscomp$0.set(node, null),\n                  forwardDebugInfo(result, task, node)));\n              result = previousIONode;\n              break;\n            case 4:\n              result = previousIONode;\n              break;\n            case 2:\n              awaited = node.awaited;\n              if (null !== awaited)\n                if (\n                  ((promise = visitAsyncNode(\n                    result,\n                    task,\n                    awaited,\n                    visited$jscomp$0,\n                    cutOff$jscomp$0\n                  )),\n                  void 0 === promise)\n                ) {\n                  result = void 0;\n                  break;\n                } else if (null !== promise) {\n                  var startTime = node.start,\n                    endTime = node.end;\n                  startTime < cutOff$jscomp$0\n                    ? ((previousIONode = promise),\n                      null !== node.stack &&\n                        isAwaitInUserspace(result, node.stack) &&\n                        void 0 !==\n                          (null === awaited.promise\n                            ? void 0\n                            : awaited.promise.deref()) &&\n                        serializeIONode(result, promise, awaited.promise))\n                    : null !== node.stack &&\n                        isAwaitInUserspace(result, node.stack)\n                      ? (result.status === ABORTING &&\n                          startTime > result.abortTime) ||\n                        (serializeIONode(result, promise, awaited.promise),\n                        visited$jscomp$0.set(promise, null),\n                        null != node.owner &&\n                          outlineComponentInfo(result, node.owner),\n                        (cutOff$jscomp$0 = (0, result.environmentName)()),\n                        advanceTaskTime(result, task, startTime),\n                        result.pendingChunks++,\n                        emitDebugChunk(result, task.id, {\n                          awaited: promise,\n                          env: cutOff$jscomp$0,\n                          owner: node.owner,\n                          stack:\n                            null === node.stack\n                              ? null\n                              : filterStackTrace(result, node.stack)\n                        }),\n                        markOperationEndTime(result, task, endTime),\n                        result.status === ABORTING && (previousIONode = void 0))\n                      : (previousIONode = promise);\n                }\n              node = node.promise.deref();\n              void 0 !== node &&\n                ((node = node._debugInfo),\n                null == node ||\n                  visited$jscomp$0.has(node) ||\n                  (visited$jscomp$0.set(node, null),\n                  forwardDebugInfo(result, task, node)));\n              result = previousIONode;\n              break;\n            default:\n              throw Error(\"Unknown AsyncSequence tag. This is a bug in React.\");\n          }\n        null !== result && visited.set(n, result);\n        if (void 0 === result) return;\n        previousIONode = result;\n      }\n      return previousIONode;\n    }\n    function emitAsyncSequence(\n      request,\n      task,\n      node,\n      alreadyForwardedDebugInfo,\n      owner,\n      stack\n    ) {\n      var visited = new Map();\n      alreadyForwardedDebugInfo && visited.set(alreadyForwardedDebugInfo, null);\n      node = visitAsyncNode(request, task, node, visited, task.time);\n      void 0 !== node &&\n        null !== node &&\n        (serializeIONode(request, node, node.promise),\n        request.pendingChunks++,\n        (alreadyForwardedDebugInfo = (0, request.environmentName)()),\n        (alreadyForwardedDebugInfo = {\n          awaited: node,\n          env: alreadyForwardedDebugInfo\n        }),\n        null === owner && null === stack\n          ? (null !== task.debugOwner &&\n              (alreadyForwardedDebugInfo.owner = task.debugOwner),\n            null !== task.debugStack &&\n              (alreadyForwardedDebugInfo.stack = filterStackTrace(\n                request,\n                parseStackTrace(task.debugStack, 1)\n              )))\n          : (null != owner && (alreadyForwardedDebugInfo.owner = owner),\n            null != stack &&\n              (alreadyForwardedDebugInfo.stack = filterStackTrace(\n                request,\n                parseStackTrace(stack, 1)\n              ))),\n        advanceTaskTime(request, task, task.time),\n        emitDebugChunk(request, task.id, alreadyForwardedDebugInfo),\n        markOperationEndTime(request, task, node.end));\n    }\n    function pingTask(request, task) {\n      task.timed = !0;\n      var pingedTasks = request.pingedTasks;\n      pingedTasks.push(task);\n      1 === pingedTasks.length &&\n        ((request.flushScheduled = null !== request.destination),\n        request.type === PRERENDER || request.status === OPENING\n          ? scheduleMicrotask(function () {\n              return performWork(request);\n            })\n          : setImmediate(function () {\n              return performWork(request);\n            }));\n    }\n    function createTask(\n      request,\n      model,\n      keyPath,\n      implicitSlot,\n      formatContext,\n      abortSet,\n      lastTimestamp,\n      debugOwner,\n      debugStack,\n      debugTask\n    ) {\n      request.pendingChunks++;\n      var id = request.nextChunkId++;\n      \"object\" !== typeof model ||\n        null === model ||\n        null !== keyPath ||\n        implicitSlot ||\n        request.writtenObjects.set(model, serializeByValueID(id));\n      var task = {\n        id: id,\n        status: PENDING$1,\n        model: model,\n        keyPath: keyPath,\n        implicitSlot: implicitSlot,\n        formatContext: formatContext,\n        ping: function () {\n          return pingTask(request, task);\n        },\n        toJSON: function (parentPropertyName, value) {\n          var parent = this,\n            originalValue = parent[parentPropertyName];\n          \"object\" !== typeof originalValue ||\n            originalValue === value ||\n            originalValue instanceof Date ||\n            callWithDebugContextInDEV(request, task, function () {\n              \"Object\" !== objectName(originalValue)\n                ? \"string\" === typeof jsxChildrenParents.get(parent)\n                  ? console.error(\n                      \"%s objects cannot be rendered as text children. Try formatting it using toString().%s\",\n                      objectName(originalValue),\n                      describeObjectForErrorMessage(parent, parentPropertyName)\n                    )\n                  : console.error(\n                      \"Only plain objects can be passed to Client Components from Server Components. %s objects are not supported.%s\",\n                      objectName(originalValue),\n                      describeObjectForErrorMessage(parent, parentPropertyName)\n                    )\n                : console.error(\n                    \"Only plain objects can be passed to Client Components from Server Components. Objects with toJSON methods are not supported. Convert it manually to a simple value before passing it to props.%s\",\n                    describeObjectForErrorMessage(parent, parentPropertyName)\n                  );\n            });\n          return renderModel(request, task, parent, parentPropertyName, value);\n        },\n        thenableState: null,\n        timed: !1\n      };\n      task.time = lastTimestamp;\n      task.environmentName = request.environmentName();\n      task.debugOwner = debugOwner;\n      task.debugStack = debugStack;\n      task.debugTask = debugTask;\n      abortSet.add(task);\n      return task;\n    }\n    function serializeByValueID(id) {\n      return \"$\" + id.toString(16);\n    }\n    function serializeLazyID(id) {\n      return \"$L\" + id.toString(16);\n    }\n    function serializeDeferredObject(request, value) {\n      var deferredDebugObjects = request.deferredDebugObjects;\n      return null !== deferredDebugObjects\n        ? (request.pendingDebugChunks++,\n          (request = request.nextChunkId++),\n          deferredDebugObjects.existing.set(value, request),\n          deferredDebugObjects.retained.set(request, value),\n          \"$Y\" + request.toString(16))\n        : \"$Y\";\n    }\n    function serializeNumber(number) {\n      return Number.isFinite(number)\n        ? 0 === number && -Infinity === 1 / number\n          ? \"$-0\"\n          : number\n        : Infinity === number\n          ? \"$Infinity\"\n          : -Infinity === number\n            ? \"$-Infinity\"\n            : \"$NaN\";\n    }\n    function encodeReferenceChunk(request, id, reference) {\n      request = stringify(reference);\n      return id.toString(16) + \":\" + request + \"\\n\";\n    }\n    function serializeClientReference(\n      request,\n      parent,\n      parentPropertyName,\n      clientReference\n    ) {\n      var clientReferenceKey = clientReference.$$async\n          ? clientReference.$$id + \"#async\"\n          : clientReference.$$id,\n        writtenClientReferences = request.writtenClientReferences,\n        existingId = writtenClientReferences.get(clientReferenceKey);\n      if (void 0 !== existingId)\n        return parent[0] === REACT_ELEMENT_TYPE && \"1\" === parentPropertyName\n          ? serializeLazyID(existingId)\n          : serializeByValueID(existingId);\n      try {\n        var clientReferenceMetadata = resolveClientReferenceMetadata(\n          request.bundlerConfig,\n          clientReference\n        );\n        request.pendingChunks++;\n        var importId = request.nextChunkId++;\n        emitImportChunk(request, importId, clientReferenceMetadata, !1);\n        writtenClientReferences.set(clientReferenceKey, importId);\n        return parent[0] === REACT_ELEMENT_TYPE && \"1\" === parentPropertyName\n          ? serializeLazyID(importId)\n          : serializeByValueID(importId);\n      } catch (x) {\n        return (\n          request.pendingChunks++,\n          (parent = request.nextChunkId++),\n          (parentPropertyName = logRecoverableError(request, x, null)),\n          emitErrorChunk(request, parent, parentPropertyName, x, !1, null),\n          serializeByValueID(parent)\n        );\n      }\n    }\n    function serializeDebugClientReference(\n      request,\n      parent,\n      parentPropertyName,\n      clientReference\n    ) {\n      var existingId = request.writtenClientReferences.get(\n        clientReference.$$async\n          ? clientReference.$$id + \"#async\"\n          : clientReference.$$id\n      );\n      if (void 0 !== existingId)\n        return parent[0] === REACT_ELEMENT_TYPE && \"1\" === parentPropertyName\n          ? serializeLazyID(existingId)\n          : serializeByValueID(existingId);\n      try {\n        var clientReferenceMetadata = resolveClientReferenceMetadata(\n          request.bundlerConfig,\n          clientReference\n        );\n        request.pendingDebugChunks++;\n        var importId = request.nextChunkId++;\n        emitImportChunk(request, importId, clientReferenceMetadata, !0);\n        return parent[0] === REACT_ELEMENT_TYPE && \"1\" === parentPropertyName\n          ? serializeLazyID(importId)\n          : serializeByValueID(importId);\n      } catch (x) {\n        return (\n          request.pendingDebugChunks++,\n          (parent = request.nextChunkId++),\n          (parentPropertyName = logRecoverableError(request, x, null)),\n          emitErrorChunk(request, parent, parentPropertyName, x, !0, null),\n          serializeByValueID(parent)\n        );\n      }\n    }\n    function outlineModel(request, value) {\n      return outlineModelWithFormatContext(request, value, 0);\n    }\n    function outlineModelWithFormatContext(request, value, formatContext) {\n      value = createTask(\n        request,\n        value,\n        null,\n        !1,\n        formatContext,\n        request.abortableTasks,\n        performance.now(),\n        null,\n        null,\n        null\n      );\n      retryTask(request, value);\n      return value.id;\n    }\n    function serializeServerReference(request, serverReference) {\n      var writtenServerReferences = request.writtenServerReferences,\n        existingId = writtenServerReferences.get(serverReference);\n      if (void 0 !== existingId) return \"$h\" + existingId.toString(16);\n      existingId = serverReference.$$bound;\n      existingId = null === existingId ? null : Promise.resolve(existingId);\n      var id = serverReference.$$id,\n        location = null,\n        error = serverReference.$$location;\n      error &&\n        ((error = parseStackTrace(error, 1)),\n        0 < error.length &&\n          ((location = error[0]),\n          (location = [location[0], location[1], location[2], location[3]])));\n      existingId =\n        null !== location\n          ? {\n              id: id,\n              bound: existingId,\n              name:\n                \"function\" === typeof serverReference\n                  ? serverReference.name\n                  : \"\",\n              env: (0, request.environmentName)(),\n              location: location\n            }\n          : { id: id, bound: existingId };\n      request = outlineModel(request, existingId);\n      writtenServerReferences.set(serverReference, request);\n      return \"$h\" + request.toString(16);\n    }\n    function serializeLargeTextString(request, text) {\n      request.pendingChunks++;\n      var textId = request.nextChunkId++;\n      emitTextChunk(request, textId, text, !1);\n      return serializeByValueID(textId);\n    }\n    function serializeMap(request, map) {\n      map = Array.from(map);\n      return \"$Q\" + outlineModel(request, map).toString(16);\n    }\n    function serializeFormData(request, formData) {\n      formData = Array.from(formData.entries());\n      return \"$K\" + outlineModel(request, formData).toString(16);\n    }\n    function serializeSet(request, set) {\n      set = Array.from(set);\n      return \"$W\" + outlineModel(request, set).toString(16);\n    }\n    function serializeTypedArray(request, tag, typedArray) {\n      request.pendingChunks++;\n      var bufferId = request.nextChunkId++;\n      emitTypedArrayChunk(request, bufferId, tag, typedArray, !1);\n      return serializeByValueID(bufferId);\n    }\n    function serializeDebugTypedArray(request, tag, typedArray) {\n      if (1e3 < typedArray.byteLength && !doNotLimit.has(typedArray))\n        return serializeDeferredObject(request, typedArray);\n      request.pendingDebugChunks++;\n      var bufferId = request.nextChunkId++;\n      emitTypedArrayChunk(request, bufferId, tag, typedArray, !0);\n      return serializeByValueID(bufferId);\n    }\n    function serializeDebugBlob(request, blob) {\n      function progress(entry) {\n        if (entry.done)\n          emitOutlinedDebugModelChunk(\n            request,\n            id,\n            { objectLimit: model.length + 2 },\n            model\n          ),\n            enqueueFlush(request);\n        else\n          return (\n            model.push(entry.value), reader.read().then(progress).catch(error)\n          );\n      }\n      function error(reason) {\n        emitErrorChunk(request, id, \"\", reason, !0, null);\n        enqueueFlush(request);\n        reader.cancel(reason).then(noop, noop);\n      }\n      var model = [blob.type],\n        reader = blob.stream().getReader();\n      request.pendingDebugChunks++;\n      var id = request.nextChunkId++;\n      reader.read().then(progress).catch(error);\n      return \"$B\" + id.toString(16);\n    }\n    function serializeBlob(request, blob) {\n      function progress(entry) {\n        if (newTask.status === PENDING$1)\n          if (entry.done)\n            request.cacheController.signal.removeEventListener(\n              \"abort\",\n              abortBlob\n            ),\n              pingTask(request, newTask);\n          else\n            return (\n              model.push(entry.value), reader.read().then(progress).catch(error)\n            );\n      }\n      function error(reason) {\n        newTask.status === PENDING$1 &&\n          (request.cacheController.signal.removeEventListener(\n            \"abort\",\n            abortBlob\n          ),\n          erroredTask(request, newTask, reason),\n          enqueueFlush(request),\n          reader.cancel(reason).then(error, error));\n      }\n      function abortBlob() {\n        if (newTask.status === PENDING$1) {\n          var signal = request.cacheController.signal;\n          signal.removeEventListener(\"abort\", abortBlob);\n          signal = signal.reason;\n          request.type === PRERENDER\n            ? (request.abortableTasks.delete(newTask),\n              haltTask(newTask),\n              finishHaltedTask(newTask, request))\n            : (erroredTask(request, newTask, signal), enqueueFlush(request));\n          reader.cancel(signal).then(error, error);\n        }\n      }\n      var model = [blob.type],\n        newTask = createTask(\n          request,\n          model,\n          null,\n          !1,\n          0,\n          request.abortableTasks,\n          performance.now(),\n          null,\n          null,\n          null\n        ),\n        reader = blob.stream().getReader();\n      request.cacheController.signal.addEventListener(\"abort\", abortBlob);\n      reader.read().then(progress).catch(error);\n      return \"$B\" + newTask.id.toString(16);\n    }\n    function renderModel(request, task, parent, key, value) {\n      serializedSize += key.length;\n      var prevKeyPath = task.keyPath,\n        prevImplicitSlot = task.implicitSlot;\n      try {\n        return renderModelDestructive(request, task, parent, key, value);\n      } catch (thrownValue) {\n        parent = task.model;\n        parent =\n          \"object\" === typeof parent &&\n          null !== parent &&\n          (parent.$$typeof === REACT_ELEMENT_TYPE ||\n            parent.$$typeof === REACT_LAZY_TYPE);\n        if (request.status === ABORTING) {\n          task.status = ABORTED;\n          if (request.type === PRERENDER)\n            return (\n              (task = request.nextChunkId++),\n              (task = parent\n                ? serializeLazyID(task)\n                : serializeByValueID(task)),\n              task\n            );\n          task = request.fatalError;\n          return parent ? serializeLazyID(task) : serializeByValueID(task);\n        }\n        key =\n          thrownValue === SuspenseException\n            ? getSuspendedThenable()\n            : thrownValue;\n        if (\n          \"object\" === typeof key &&\n          null !== key &&\n          \"function\" === typeof key.then\n        )\n          return (\n            (request = createTask(\n              request,\n              task.model,\n              task.keyPath,\n              task.implicitSlot,\n              task.formatContext,\n              request.abortableTasks,\n              task.time,\n              task.debugOwner,\n              task.debugStack,\n              task.debugTask\n            )),\n            (value = request.ping),\n            key.then(value, value),\n            (request.thenableState = getThenableStateAfterSuspending()),\n            (task.keyPath = prevKeyPath),\n            (task.implicitSlot = prevImplicitSlot),\n            parent\n              ? serializeLazyID(request.id)\n              : serializeByValueID(request.id)\n          );\n        task.keyPath = prevKeyPath;\n        task.implicitSlot = prevImplicitSlot;\n        request.pendingChunks++;\n        prevKeyPath = request.nextChunkId++;\n        prevImplicitSlot = logRecoverableError(request, key, task);\n        emitErrorChunk(\n          request,\n          prevKeyPath,\n          prevImplicitSlot,\n          key,\n          !1,\n          task.debugOwner\n        );\n        return parent\n          ? serializeLazyID(prevKeyPath)\n          : serializeByValueID(prevKeyPath);\n      }\n    }\n    function renderModelDestructive(\n      request,\n      task,\n      parent,\n      parentPropertyName,\n      value\n    ) {\n      task.model = value;\n      parentPropertyName === __PROTO__$1 &&\n        callWithDebugContextInDEV(request, task, function () {\n          console.error(\n            \"Expected not to serialize an object with own property `__proto__`. When parsed this property will be omitted.%s\",\n            describeObjectForErrorMessage(parent, parentPropertyName)\n          );\n        });\n      if (value === REACT_ELEMENT_TYPE) return \"$\";\n      if (null === value) return null;\n      if (\"object\" === typeof value) {\n        switch (value.$$typeof) {\n          case REACT_ELEMENT_TYPE:\n            var elementReference = null,\n              _writtenObjects = request.writtenObjects;\n            if (null === task.keyPath && !task.implicitSlot) {\n              var _existingReference = _writtenObjects.get(value);\n              if (void 0 !== _existingReference)\n                if (modelRoot === value) modelRoot = null;\n                else return _existingReference;\n              else\n                -1 === parentPropertyName.indexOf(\":\") &&\n                  ((_existingReference = _writtenObjects.get(parent)),\n                  void 0 !== _existingReference &&\n                    ((elementReference =\n                      _existingReference + \":\" + parentPropertyName),\n                    _writtenObjects.set(value, elementReference)));\n            }\n            if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task);\n            if ((_existingReference = value._debugInfo))\n              if (canEmitDebugInfo)\n                forwardDebugInfo(request, task, _existingReference);\n              else return outlineTask(request, task);\n            _existingReference = value.props;\n            var refProp = _existingReference.ref;\n            refProp = void 0 !== refProp ? refProp : null;\n            task.debugOwner = value._owner;\n            task.debugStack = value._debugStack;\n            task.debugTask = value._debugTask;\n            if (\n              void 0 === value._owner ||\n              void 0 === value._debugStack ||\n              void 0 === value._debugTask\n            ) {\n              var key = \"\";\n              null !== value.key &&\n                value.key !== REACT_OPTIMISTIC_KEY &&\n                (key = ' key=\"' + value.key + '\"');\n              console.error(\n                \"Attempted to render <%s%s> without development properties. This is not supported. It can happen if:\\n- The element is created with a production version of React but rendered in development.\\n- The element was cloned with a custom function instead of `React.cloneElement`.\\nThe props of this element may help locate this element: %o\",\n                value.type,\n                key,\n                value.props\n              );\n            }\n            request = renderElement(\n              request,\n              task,\n              value.type,\n              value.key,\n              refProp,\n              _existingReference,\n              value._store.validated\n            );\n            \"object\" === typeof request &&\n              null !== request &&\n              null !== elementReference &&\n              (_writtenObjects.has(request) ||\n                _writtenObjects.set(request, elementReference));\n            return request;\n          case REACT_LAZY_TYPE:\n            if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task);\n            task.thenableState = null;\n            elementReference = callLazyInitInDEV(value);\n            if (request.status === ABORTING) throw null;\n            if ((_writtenObjects = value._debugInfo))\n              if (canEmitDebugInfo)\n                forwardDebugInfo(request, task, _writtenObjects);\n              else return outlineTask(request, task);\n            return renderModelDestructive(\n              request,\n              task,\n              parent,\n              parentPropertyName,\n              elementReference\n            );\n          case REACT_LEGACY_ELEMENT_TYPE:\n            throw Error(\n              'A React Element from an older version of React was rendered. This is not supported. It can happen if:\\n- Multiple copies of the \"react\" package is used.\\n- A library pre-bundled an old copy of \"react\" or \"react/jsx-runtime\".\\n- A compiler tries to \"inline\" JSX instead of using the runtime.'\n            );\n        }\n        if (isClientReference(value))\n          return serializeClientReference(\n            request,\n            parent,\n            parentPropertyName,\n            value\n          );\n        if (\n          void 0 !== request.temporaryReferences &&\n          ((elementReference = request.temporaryReferences.get(value)),\n          void 0 !== elementReference)\n        )\n          return \"$T\" + elementReference;\n        elementReference = request.writtenObjects;\n        _writtenObjects = elementReference.get(value);\n        if (\"function\" === typeof value.then) {\n          if (void 0 !== _writtenObjects) {\n            if (null !== task.keyPath || task.implicitSlot)\n              return (\n                \"$@\" + serializeThenable(request, task, value).toString(16)\n              );\n            if (modelRoot === value) modelRoot = null;\n            else return _writtenObjects;\n          }\n          request = \"$@\" + serializeThenable(request, task, value).toString(16);\n          elementReference.set(value, request);\n          return request;\n        }\n        if (void 0 !== _writtenObjects)\n          if (modelRoot === value) {\n            if (_writtenObjects !== serializeByValueID(task.id))\n              return _writtenObjects;\n            modelRoot = null;\n          } else return _writtenObjects;\n        else if (\n          -1 === parentPropertyName.indexOf(\":\") &&\n          ((_writtenObjects = elementReference.get(parent)),\n          void 0 !== _writtenObjects)\n        ) {\n          _existingReference = parentPropertyName;\n          if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE)\n            switch (parentPropertyName) {\n              case \"1\":\n                _existingReference = \"type\";\n                break;\n              case \"2\":\n                _existingReference = \"key\";\n                break;\n              case \"3\":\n                _existingReference = \"props\";\n                break;\n              case \"4\":\n                _existingReference = \"_owner\";\n            }\n          elementReference.set(\n            value,\n            _writtenObjects + \":\" + _existingReference\n          );\n        }\n        if (isArrayImpl(value)) return renderFragment(request, task, value);\n        if (value instanceof Map) return serializeMap(request, value);\n        if (value instanceof Set) return serializeSet(request, value);\n        if (\"function\" === typeof FormData && value instanceof FormData)\n          return serializeFormData(request, value);\n        if (value instanceof Error) return serializeErrorValue(request, value);\n        if (value instanceof ArrayBuffer)\n          return serializeTypedArray(request, \"A\", new Uint8Array(value));\n        if (value instanceof Int8Array)\n          return serializeTypedArray(request, \"O\", value);\n        if (value instanceof Uint8Array)\n          return serializeTypedArray(request, \"o\", value);\n        if (value instanceof Uint8ClampedArray)\n          return serializeTypedArray(request, \"U\", value);\n        if (value instanceof Int16Array)\n          return serializeTypedArray(request, \"S\", value);\n        if (value instanceof Uint16Array)\n          return serializeTypedArray(request, \"s\", value);\n        if (value instanceof Int32Array)\n          return serializeTypedArray(request, \"L\", value);\n        if (value instanceof Uint32Array)\n          return serializeTypedArray(request, \"l\", value);\n        if (value instanceof Float32Array)\n          return serializeTypedArray(request, \"G\", value);\n        if (value instanceof Float64Array)\n          return serializeTypedArray(request, \"g\", value);\n        if (value instanceof BigInt64Array)\n          return serializeTypedArray(request, \"M\", value);\n        if (value instanceof BigUint64Array)\n          return serializeTypedArray(request, \"m\", value);\n        if (value instanceof DataView)\n          return serializeTypedArray(request, \"V\", value);\n        if (\"function\" === typeof Blob && value instanceof Blob)\n          return serializeBlob(request, value);\n        if ((elementReference = getIteratorFn(value)))\n          return (\n            (elementReference = elementReference.call(value)),\n            elementReference === value\n              ? \"$i\" +\n                outlineModel(request, Array.from(elementReference)).toString(16)\n              : renderFragment(request, task, Array.from(elementReference))\n          );\n        if (\n          \"function\" === typeof ReadableStream &&\n          value instanceof ReadableStream\n        )\n          return serializeReadableStream(request, task, value);\n        elementReference = value[ASYNC_ITERATOR];\n        if (\"function\" === typeof elementReference)\n          return renderAsyncFragment(request, task, value, elementReference);\n        if (value instanceof Date) return \"$D\" + value.toJSON();\n        elementReference = getPrototypeOf(value);\n        if (\n          elementReference !== ObjectPrototype$1 &&\n          (null === elementReference ||\n            null !== getPrototypeOf(elementReference))\n        )\n          throw Error(\n            \"Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported.\" +\n              describeObjectForErrorMessage(parent, parentPropertyName)\n          );\n        if (\"Object\" !== objectName(value))\n          callWithDebugContextInDEV(request, task, function () {\n            console.error(\n              \"Only plain objects can be passed to Client Components from Server Components. %s objects are not supported.%s\",\n              objectName(value),\n              describeObjectForErrorMessage(parent, parentPropertyName)\n            );\n          });\n        else if (!isSimpleObject(value))\n          callWithDebugContextInDEV(request, task, function () {\n            console.error(\n              \"Only plain objects can be passed to Client Components from Server Components. Classes or other objects with methods are not supported.%s\",\n              describeObjectForErrorMessage(parent, parentPropertyName)\n            );\n          });\n        else if (Object.getOwnPropertySymbols) {\n          var symbols = Object.getOwnPropertySymbols(value);\n          0 < symbols.length &&\n            callWithDebugContextInDEV(request, task, function () {\n              console.error(\n                \"Only plain objects can be passed to Client Components from Server Components. Objects with symbol properties like %s are not supported.%s\",\n                symbols[0].description,\n                describeObjectForErrorMessage(parent, parentPropertyName)\n              );\n            });\n        }\n        return value;\n      }\n      if (\"string\" === typeof value)\n        return (\n          (serializedSize += value.length),\n          \"Z\" === value[value.length - 1] &&\n          parent[parentPropertyName] instanceof Date\n            ? \"$D\" + value\n            : 1024 <= value.length && null !== byteLengthOfChunk\n              ? serializeLargeTextString(request, value)\n              : \"$\" === value[0]\n                ? \"$\" + value\n                : value\n        );\n      if (\"boolean\" === typeof value) return value;\n      if (\"number\" === typeof value) return serializeNumber(value);\n      if (\"undefined\" === typeof value) return \"$undefined\";\n      if (\"function\" === typeof value) {\n        if (isClientReference(value))\n          return serializeClientReference(\n            request,\n            parent,\n            parentPropertyName,\n            value\n          );\n        if (value.$$typeof === SERVER_REFERENCE_TAG)\n          return serializeServerReference(request, value);\n        if (\n          void 0 !== request.temporaryReferences &&\n          ((request = request.temporaryReferences.get(value)),\n          void 0 !== request)\n        )\n          return \"$T\" + request;\n        if (value.$$typeof === TEMPORARY_REFERENCE_TAG)\n          throw Error(\n            \"Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server.\"\n          );\n        if (/^on[A-Z]/.test(parentPropertyName))\n          throw Error(\n            \"Event handlers cannot be passed to Client Component props.\" +\n              describeObjectForErrorMessage(parent, parentPropertyName) +\n              \"\\nIf you need interactivity, consider converting part of this to a Client Component.\"\n          );\n        if (\n          jsxChildrenParents.has(parent) ||\n          (jsxPropsParents.has(parent) && \"children\" === parentPropertyName)\n        )\n          throw (\n            ((request = value.displayName || value.name || \"Component\"),\n            Error(\n              \"Functions are not valid as a child of Client Components. This may happen if you return \" +\n                request +\n                \" instead of <\" +\n                request +\n                \" /> from render. Or maybe you meant to call this function rather than return it.\" +\n                describeObjectForErrorMessage(parent, parentPropertyName)\n            ))\n          );\n        throw Error(\n          'Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with \"use server\". Or maybe you meant to call this function rather than return it.' +\n            describeObjectForErrorMessage(parent, parentPropertyName)\n        );\n      }\n      if (\"symbol\" === typeof value) {\n        task = request.writtenSymbols;\n        elementReference = task.get(value);\n        if (void 0 !== elementReference)\n          return serializeByValueID(elementReference);\n        elementReference = value.description;\n        if (Symbol.for(elementReference) !== value)\n          throw Error(\n            \"Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for(\" +\n              (value.description + \") cannot be found among global symbols.\") +\n              describeObjectForErrorMessage(parent, parentPropertyName)\n          );\n        request.pendingChunks++;\n        _writtenObjects = request.nextChunkId++;\n        emitSymbolChunk(request, _writtenObjects, elementReference);\n        task.set(value, _writtenObjects);\n        return serializeByValueID(_writtenObjects);\n      }\n      if (\"bigint\" === typeof value) return \"$n\" + value.toString(10);\n      throw Error(\n        \"Type \" +\n          typeof value +\n          \" is not supported in Client Component props.\" +\n          describeObjectForErrorMessage(parent, parentPropertyName)\n      );\n    }\n    function logRecoverableError(request, error, task) {\n      var prevRequest = currentRequest;\n      currentRequest = null;\n      try {\n        var onError = request.onError;\n        var errorDigest =\n          null !== task\n            ? requestStorage.run(\n                void 0,\n                callWithDebugContextInDEV,\n                request,\n                task,\n                onError,\n                error\n              )\n            : requestStorage.run(void 0, onError, error);\n      } finally {\n        currentRequest = prevRequest;\n      }\n      if (null != errorDigest && \"string\" !== typeof errorDigest)\n        throw Error(\n          'onError returned something with a type other than \"string\". onError should return a string and may return null or undefined but must not return anything else. It received something of type \"' +\n            typeof errorDigest +\n            '\" instead'\n        );\n      return errorDigest || \"\";\n    }\n    function fatalError(request, error) {\n      var onFatalError = request.onFatalError;\n      onFatalError(error);\n      null !== request.destination\n        ? ((request.status = CLOSED), request.destination.destroy(error))\n        : ((request.status = CLOSING), (request.fatalError = error));\n      request.cacheController.abort(\n        Error(\"The render was aborted due to a fatal error.\", { cause: error })\n      );\n    }\n    function serializeErrorValue(request, error) {\n      var name = \"Error\",\n        env = (0, request.environmentName)();\n      try {\n        name = error.name;\n        var message = String(error.message);\n        var stack = filterStackTrace(request, parseStackTrace(error, 0));\n        var errorEnv = error.environmentName;\n        \"string\" === typeof errorEnv && (env = errorEnv);\n      } catch (x) {\n        (message =\n          \"An error occurred but serializing the error message failed.\"),\n          (stack = []);\n      }\n      name = { name: name, message: message, stack: stack, env: env };\n      \"cause\" in error &&\n        ((error = outlineModel(request, error.cause)),\n        (name.cause = serializeByValueID(error)));\n      return \"$Z\" + outlineModel(request, name).toString(16);\n    }\n    function emitErrorChunk(request, id, digest, error, debug, owner) {\n      var name = \"Error\",\n        env = (0, request.environmentName)(),\n        causeReference = null;\n      try {\n        if (error instanceof Error) {\n          name = error.name;\n          var message = String(error.message);\n          var stack = filterStackTrace(request, parseStackTrace(error, 0));\n          var errorEnv = error.environmentName;\n          \"string\" === typeof errorEnv && (env = errorEnv);\n          if (\"cause\" in error) {\n            var cause = error.cause,\n              causeId = debug\n                ? outlineDebugModel(request, { objectLimit: 5 }, cause)\n                : outlineModel(request, cause);\n            causeReference = serializeByValueID(causeId);\n          }\n        } else\n          (message =\n            \"object\" === typeof error && null !== error\n              ? describeObjectForErrorMessage(error)\n              : String(error)),\n            (stack = []);\n      } catch (x) {\n        (message =\n          \"An error occurred but serializing the error message failed.\"),\n          (stack = []);\n      }\n      error = null == owner ? null : outlineComponentInfo(request, owner);\n      digest = {\n        digest: digest,\n        name: name,\n        message: message,\n        stack: stack,\n        env: env,\n        owner: error\n      };\n      null !== causeReference && (digest.cause = causeReference);\n      id = id.toString(16) + \":E\" + stringify(digest) + \"\\n\";\n      debug\n        ? request.completedDebugChunks.push(id)\n        : request.completedErrorChunks.push(id);\n    }\n    function emitImportChunk(request, id, clientReferenceMetadata, debug) {\n      clientReferenceMetadata = stringify(clientReferenceMetadata);\n      id = id.toString(16) + \":I\" + clientReferenceMetadata + \"\\n\";\n      debug\n        ? request.completedDebugChunks.push(id)\n        : request.completedImportChunks.push(id);\n    }\n    function emitSymbolChunk(request, id, name) {\n      id = encodeReferenceChunk(request, id, \"$S\" + name);\n      request.completedImportChunks.push(id);\n    }\n    function emitDebugHaltChunk(request, id) {\n      id = id.toString(16) + \":\\n\";\n      request.completedDebugChunks.push(id);\n    }\n    function emitDebugChunk(request, id, debugInfo) {\n      var json = serializeDebugModel(request, 500, debugInfo);\n      null !== request.debugDestination\n        ? '\"' === json[0] && \"$\" === json[1]\n          ? ((id = id.toString(16) + \":D\" + json + \"\\n\"),\n            request.completedRegularChunks.push(id))\n          : ((debugInfo = request.nextChunkId++),\n            (json = debugInfo.toString(16) + \":\" + json + \"\\n\"),\n            request.pendingDebugChunks++,\n            request.completedDebugChunks.push(json),\n            (id = id.toString(16) + ':D\"$' + debugInfo.toString(16) + '\"\\n'),\n            request.completedRegularChunks.push(id))\n        : ((id = id.toString(16) + \":D\" + json + \"\\n\"),\n          request.completedRegularChunks.push(id));\n    }\n    function outlineComponentInfo(request, componentInfo) {\n      var existingRef = request.writtenDebugObjects.get(componentInfo);\n      if (void 0 !== existingRef) return existingRef;\n      null != componentInfo.owner &&\n        outlineComponentInfo(request, componentInfo.owner);\n      existingRef = 10;\n      null != componentInfo.stack &&\n        (existingRef += componentInfo.stack.length);\n      existingRef = { objectLimit: existingRef };\n      var componentDebugInfo = {\n        name: componentInfo.name,\n        key: componentInfo.key\n      };\n      null != componentInfo.env && (componentDebugInfo.env = componentInfo.env);\n      null != componentInfo.owner &&\n        (componentDebugInfo.owner = componentInfo.owner);\n      null == componentInfo.stack && null != componentInfo.debugStack\n        ? (componentDebugInfo.stack = filterStackTrace(\n            request,\n            parseStackTrace(componentInfo.debugStack, 1)\n          ))\n        : null != componentInfo.stack &&\n          (componentDebugInfo.stack = componentInfo.stack);\n      componentDebugInfo.props = componentInfo.props;\n      existingRef = outlineDebugModel(request, existingRef, componentDebugInfo);\n      existingRef = serializeByValueID(existingRef);\n      request.writtenDebugObjects.set(componentInfo, existingRef);\n      request.writtenObjects.set(componentInfo, existingRef);\n      return existingRef;\n    }\n    function emitIOInfoChunk(\n      request,\n      id,\n      name,\n      start,\n      end,\n      value,\n      env,\n      owner,\n      stack\n    ) {\n      var objectLimit = 10;\n      stack && (objectLimit += stack.length);\n      name = {\n        name: name,\n        start: start - request.timeOrigin,\n        end: end - request.timeOrigin\n      };\n      null != env && (name.env = env);\n      null != stack && (name.stack = stack);\n      null != owner && (name.owner = owner);\n      void 0 !== value && (name.value = value);\n      value = serializeDebugModel(request, objectLimit, name);\n      id = id.toString(16) + \":J\" + value + \"\\n\";\n      request.completedDebugChunks.push(id);\n    }\n    function serializeIONode(request, ioNode, promiseRef) {\n      var existingRef = request.writtenDebugObjects.get(ioNode);\n      if (void 0 !== existingRef) return existingRef;\n      existingRef = null;\n      var name = \"\";\n      if (null !== ioNode.promise) {\n        var promise = ioNode.promise.deref();\n        void 0 !== promise &&\n          \"string\" === typeof promise.displayName &&\n          (name = promise.displayName);\n      }\n      if (null !== ioNode.stack) {\n        a: {\n          existingRef = ioNode.stack;\n          for (promise = 0; promise < existingRef.length; promise++) {\n            var callsite = existingRef[promise];\n            if (!isPromiseCreationInternal(callsite[1], callsite[0])) {\n              promise = 0 < promise ? existingRef.slice(promise) : existingRef;\n              break a;\n            }\n          }\n          promise = [];\n        }\n        existingRef = filterStackTrace(request, promise);\n        if (\"\" === name) {\n          a: {\n            name = promise;\n            promise = \"\";\n            callsite = request.filterStackFrame;\n            for (var i = 0; i < name.length; i++) {\n              var callsite$jscomp$0 = name[i],\n                functionName = callsite$jscomp$0[0],\n                url = devirtualizeURL(callsite$jscomp$0[1]);\n              if (\n                callsite(\n                  url,\n                  functionName,\n                  callsite$jscomp$0[2],\n                  callsite$jscomp$0[3]\n                ) &&\n                \"\" !== url\n              ) {\n                if (\"\" === promise) {\n                  name = functionName;\n                  break a;\n                }\n                name = promise;\n                break a;\n              } else promise = functionName;\n            }\n            name = \"\";\n          }\n          name.startsWith(\"Window.\")\n            ? (name = name.slice(7))\n            : name.startsWith(\"<anonymous>.\") && (name = name.slice(7));\n        }\n      }\n      promise = ioNode.owner;\n      null != promise && outlineComponentInfo(request, promise);\n      callsite = void 0;\n      null !== promiseRef && (callsite = promiseRef.deref());\n      promiseRef = (0, request.environmentName)();\n      i = 3 === ioNode.tag ? request.abortTime : ioNode.end;\n      request.pendingDebugChunks++;\n      callsite$jscomp$0 = request.nextChunkId++;\n      emitIOInfoChunk(\n        request,\n        callsite$jscomp$0,\n        name,\n        ioNode.start,\n        i,\n        callsite,\n        promiseRef,\n        promise,\n        existingRef\n      );\n      promiseRef = serializeByValueID(callsite$jscomp$0);\n      request.writtenDebugObjects.set(ioNode, promiseRef);\n      return promiseRef;\n    }\n    function emitTypedArrayChunk(request, id, tag, typedArray, debug) {\n      debug ? request.pendingDebugChunks++ : request.pendingChunks++;\n      typedArray = new Uint8Array(\n        typedArray.buffer,\n        typedArray.byteOffset,\n        typedArray.byteLength\n      );\n      var binaryLength = typedArray.byteLength;\n      id = id.toString(16) + \":\" + tag + binaryLength.toString(16) + \",\";\n      debug\n        ? request.completedDebugChunks.push(id, typedArray)\n        : request.completedRegularChunks.push(id, typedArray);\n    }\n    function emitTextChunk(request, id, text, debug) {\n      if (null === byteLengthOfChunk)\n        throw Error(\n          \"Existence of byteLengthOfChunk should have already been checked. This is a bug in React.\"\n        );\n      debug ? request.pendingDebugChunks++ : request.pendingChunks++;\n      var binaryLength = byteLengthOfChunk(text);\n      id = id.toString(16) + \":T\" + binaryLength.toString(16) + \",\";\n      debug\n        ? request.completedDebugChunks.push(id, text)\n        : request.completedRegularChunks.push(id, text);\n    }\n    function renderDebugModel(\n      request,\n      counter,\n      parent,\n      parentPropertyName,\n      value\n    ) {\n      if (null === value) return null;\n      if (value === REACT_ELEMENT_TYPE) return \"$\";\n      if (\"object\" === typeof value) {\n        if (isClientReference(value))\n          return serializeDebugClientReference(\n            request,\n            parent,\n            parentPropertyName,\n            value\n          );\n        if (value.$$typeof === CONSTRUCTOR_MARKER) {\n          value = value.constructor;\n          var ref = request.writtenDebugObjects.get(value);\n          void 0 === ref &&\n            ((request = outlineDebugModel(request, counter, value)),\n            (ref = serializeByValueID(request)));\n          return \"$P\" + ref.slice(1);\n        }\n        if (void 0 !== request.temporaryReferences) {\n          var tempRef = request.temporaryReferences.get(value);\n          if (void 0 !== tempRef) return \"$T\" + tempRef;\n        }\n        tempRef = request.writtenDebugObjects;\n        var existingDebugReference = tempRef.get(value);\n        if (void 0 !== existingDebugReference)\n          if (debugModelRoot === value) debugModelRoot = null;\n          else return existingDebugReference;\n        else if (-1 === parentPropertyName.indexOf(\":\"))\n          if (\n            ((existingDebugReference = tempRef.get(parent)),\n            void 0 !== existingDebugReference)\n          ) {\n            if (0 >= counter.objectLimit && !doNotLimit.has(value))\n              return serializeDeferredObject(request, value);\n            var propertyName = parentPropertyName;\n            if (isArrayImpl(parent) && parent[0] === REACT_ELEMENT_TYPE)\n              switch (parentPropertyName) {\n                case \"1\":\n                  propertyName = \"type\";\n                  break;\n                case \"2\":\n                  propertyName = \"key\";\n                  break;\n                case \"3\":\n                  propertyName = \"props\";\n                  break;\n                case \"4\":\n                  propertyName = \"_owner\";\n              }\n            tempRef.set(value, existingDebugReference + \":\" + propertyName);\n          } else if (debugNoOutline !== value) {\n            if (\"function\" === typeof value.then)\n              return serializeDebugThenable(request, counter, value);\n            request = outlineDebugModel(request, counter, value);\n            return serializeByValueID(request);\n          }\n        parent = request.writtenObjects.get(value);\n        if (void 0 !== parent) return parent;\n        if (0 >= counter.objectLimit && !doNotLimit.has(value))\n          return serializeDeferredObject(request, value);\n        counter.objectLimit--;\n        parent = request.deferredDebugObjects;\n        if (\n          null !== parent &&\n          ((parentPropertyName = parent.existing.get(value)),\n          void 0 !== parentPropertyName)\n        )\n          return (\n            parent.existing.delete(value),\n            parent.retained.delete(parentPropertyName),\n            emitOutlinedDebugModelChunk(\n              request,\n              parentPropertyName,\n              counter,\n              value\n            ),\n            serializeByValueID(parentPropertyName)\n          );\n        switch (value.$$typeof) {\n          case REACT_ELEMENT_TYPE:\n            null != value._owner && outlineComponentInfo(request, value._owner);\n            \"object\" === typeof value.type &&\n              null !== value.type &&\n              doNotLimit.add(value.type);\n            \"object\" === typeof value.key &&\n              null !== value.key &&\n              doNotLimit.add(value.key);\n            doNotLimit.add(value.props);\n            null !== value._owner && doNotLimit.add(value._owner);\n            counter = null;\n            if (null != value._debugStack)\n              for (\n                counter = filterStackTrace(\n                  request,\n                  parseStackTrace(value._debugStack, 1)\n                ),\n                  doNotLimit.add(counter),\n                  request = 0;\n                request < counter.length;\n                request++\n              )\n                doNotLimit.add(counter[request]);\n            return [\n              REACT_ELEMENT_TYPE,\n              value.type,\n              value.key,\n              value.props,\n              value._owner,\n              counter,\n              value._store.validated\n            ];\n          case REACT_LAZY_TYPE:\n            value = value._payload;\n            if (null !== value && \"object\" === typeof value) {\n              switch (value._status) {\n                case 1:\n                  return (\n                    (request = outlineDebugModel(\n                      request,\n                      counter,\n                      value._result\n                    )),\n                    serializeLazyID(request)\n                  );\n                case 2:\n                  return (\n                    (counter = request.nextChunkId++),\n                    emitErrorChunk(\n                      request,\n                      counter,\n                      \"\",\n                      value._result,\n                      !0,\n                      null\n                    ),\n                    serializeLazyID(counter)\n                  );\n              }\n              switch (value.status) {\n                case \"fulfilled\":\n                  return (\n                    (request = outlineDebugModel(\n                      request,\n                      counter,\n                      value.value\n                    )),\n                    serializeLazyID(request)\n                  );\n                case \"rejected\":\n                  return (\n                    (counter = request.nextChunkId++),\n                    emitErrorChunk(\n                      request,\n                      counter,\n                      \"\",\n                      value.reason,\n                      !0,\n                      null\n                    ),\n                    serializeLazyID(counter)\n                  );\n              }\n            }\n            request.pendingDebugChunks++;\n            value = request.nextChunkId++;\n            emitDebugHaltChunk(request, value);\n            return serializeLazyID(value);\n        }\n        if (\"function\" === typeof value.then)\n          return serializeDebugThenable(request, counter, value);\n        if (isArrayImpl(value))\n          return 200 < value.length && !doNotLimit.has(value)\n            ? serializeDeferredObject(request, value)\n            : value;\n        if (value instanceof Date) return \"$D\" + value.toJSON();\n        if (value instanceof Map) {\n          value = Array.from(value);\n          counter.objectLimit++;\n          for (ref = 0; ref < value.length; ref++) {\n            var entry = value[ref];\n            doNotLimit.add(entry);\n            var key = entry[0];\n            entry = entry[1];\n            \"object\" === typeof key && null !== key && doNotLimit.add(key);\n            \"object\" === typeof entry &&\n              null !== entry &&\n              doNotLimit.add(entry);\n          }\n          return \"$Q\" + outlineDebugModel(request, counter, value).toString(16);\n        }\n        if (value instanceof Set) {\n          value = Array.from(value);\n          counter.objectLimit++;\n          for (ref = 0; ref < value.length; ref++)\n            (key = value[ref]),\n              \"object\" === typeof key && null !== key && doNotLimit.add(key);\n          return \"$W\" + outlineDebugModel(request, counter, value).toString(16);\n        }\n        if (\"function\" === typeof FormData && value instanceof FormData)\n          return (\n            (value = Array.from(value.entries())),\n            \"$K\" +\n              outlineDebugModel(\n                request,\n                { objectLimit: 2 * value.length + 1 },\n                value\n              ).toString(16)\n          );\n        if (value instanceof Error) {\n          var name = \"Error\";\n          parent = (0, request.environmentName)();\n          try {\n            (name = value.name),\n              (key = String(value.message)),\n              (ref = filterStackTrace(request, parseStackTrace(value, 0))),\n              (entry = value.environmentName),\n              \"string\" === typeof entry && (parent = entry);\n          } catch (x) {\n            (key =\n              \"An error occurred but serializing the error message failed.\"),\n              (ref = []);\n          }\n          key = { name: name, message: key, stack: ref, env: parent };\n          \"cause\" in value &&\n            (counter.objectLimit--,\n            (value = outlineDebugModel(request, counter, value.cause)),\n            (key.cause = serializeByValueID(value)));\n          request =\n            \"$Z\" +\n            outlineDebugModel(\n              request,\n              { objectLimit: 2 * ref.length + 1 },\n              key\n            ).toString(16);\n          return request;\n        }\n        if (value instanceof ArrayBuffer)\n          return serializeDebugTypedArray(request, \"A\", new Uint8Array(value));\n        if (value instanceof Int8Array)\n          return serializeDebugTypedArray(request, \"O\", value);\n        if (value instanceof Uint8Array)\n          return serializeDebugTypedArray(request, \"o\", value);\n        if (value instanceof Uint8ClampedArray)\n          return serializeDebugTypedArray(request, \"U\", value);\n        if (value instanceof Int16Array)\n          return serializeDebugTypedArray(request, \"S\", value);\n        if (value instanceof Uint16Array)\n          return serializeDebugTypedArray(request, \"s\", value);\n        if (value instanceof Int32Array)\n          return serializeDebugTypedArray(request, \"L\", value);\n        if (value instanceof Uint32Array)\n          return serializeDebugTypedArray(request, \"l\", value);\n        if (value instanceof Float32Array)\n          return serializeDebugTypedArray(request, \"G\", value);\n        if (value instanceof Float64Array)\n          return serializeDebugTypedArray(request, \"g\", value);\n        if (value instanceof BigInt64Array)\n          return serializeDebugTypedArray(request, \"M\", value);\n        if (value instanceof BigUint64Array)\n          return serializeDebugTypedArray(request, \"m\", value);\n        if (value instanceof DataView)\n          return serializeDebugTypedArray(request, \"V\", value);\n        if (\"function\" === typeof Blob && value instanceof Blob)\n          return serializeDebugBlob(request, value);\n        if (getIteratorFn(value)) return Array.from(value);\n        request = getPrototypeOf(value);\n        if (request !== ObjectPrototype$1 && null !== request) {\n          counter = Object.create(null);\n          for (name in value)\n            if (hasOwnProperty.call(value, name) || isGetter(request, name))\n              counter[name] = value[name];\n          ref = request.constructor;\n          \"function\" !== typeof ref ||\n            ref.prototype !== request ||\n            hasOwnProperty.call(value, \"\") ||\n            isGetter(request, \"\") ||\n            (counter[\"\"] = { $$typeof: CONSTRUCTOR_MARKER, constructor: ref });\n          return counter;\n        }\n        return value;\n      }\n      if (\"string\" === typeof value) {\n        if (1024 <= value.length) {\n          if (0 >= counter.objectLimit)\n            return serializeDeferredObject(request, value);\n          counter.objectLimit--;\n          request.pendingDebugChunks++;\n          counter = request.nextChunkId++;\n          emitTextChunk(request, counter, value, !0);\n          return serializeByValueID(counter);\n        }\n        return \"$\" === value[0] ? \"$\" + value : value;\n      }\n      if (\"boolean\" === typeof value) return value;\n      if (\"number\" === typeof value) return serializeNumber(value);\n      if (\"undefined\" === typeof value) return \"$undefined\";\n      if (\"function\" === typeof value) {\n        if (isClientReference(value))\n          return serializeDebugClientReference(\n            request,\n            parent,\n            parentPropertyName,\n            value\n          );\n        if (\n          void 0 !== request.temporaryReferences &&\n          ((counter = request.temporaryReferences.get(value)),\n          void 0 !== counter)\n        )\n          return \"$T\" + counter;\n        counter = request.writtenDebugObjects;\n        ref = counter.get(value);\n        if (void 0 !== ref) return ref;\n        ref = Function.prototype.toString.call(value);\n        key = value.name;\n        key =\n          \"$E\" +\n          (\"string\" === typeof key\n            ? \"Object.defineProperty(\" +\n              ref +\n              ',\"name\",{value:' +\n              JSON.stringify(key) +\n              \"})\"\n            : \"(\" + ref + \")\");\n        request.pendingDebugChunks++;\n        ref = request.nextChunkId++;\n        key = encodeReferenceChunk(request, ref, key);\n        request.completedDebugChunks.push(key);\n        request = serializeByValueID(ref);\n        counter.set(value, request);\n        return request;\n      }\n      if (\"symbol\" === typeof value) {\n        counter = request.writtenSymbols.get(value);\n        if (void 0 !== counter) return serializeByValueID(counter);\n        value = value.description;\n        request.pendingChunks++;\n        counter = request.nextChunkId++;\n        emitSymbolChunk(request, counter, value);\n        return serializeByValueID(counter);\n      }\n      return \"bigint\" === typeof value\n        ? \"$n\" + value.toString(10)\n        : \"unknown type \" + typeof value;\n    }\n    function serializeDebugModel(request, objectLimit, model) {\n      function replacer(parentPropertyName) {\n        try {\n          return renderDebugModel(\n            request,\n            counter,\n            this,\n            parentPropertyName,\n            this[parentPropertyName]\n          );\n        } catch (x) {\n          return (\n            \"Unknown Value: React could not send it from the server.\\n\" +\n            x.message\n          );\n        }\n      }\n      var counter = { objectLimit: objectLimit };\n      objectLimit = debugNoOutline;\n      debugNoOutline = model;\n      try {\n        return stringify(model, replacer);\n      } catch (x) {\n        return stringify(\n          \"Unknown Value: React could not send it from the server.\\n\" +\n            x.message\n        );\n      } finally {\n        debugNoOutline = objectLimit;\n      }\n    }\n    function emitOutlinedDebugModelChunk(request, id, counter, model) {\n      function replacer(parentPropertyName) {\n        try {\n          return renderDebugModel(\n            request,\n            counter,\n            this,\n            parentPropertyName,\n            this[parentPropertyName]\n          );\n        } catch (x) {\n          return (\n            \"Unknown Value: React could not send it from the server.\\n\" +\n            x.message\n          );\n        }\n      }\n      \"object\" === typeof model && null !== model && doNotLimit.add(model);\n      var prevModelRoot = debugModelRoot;\n      debugModelRoot = model;\n      \"object\" === typeof model &&\n        null !== model &&\n        request.writtenDebugObjects.set(model, serializeByValueID(id));\n      try {\n        var json = stringify(model, replacer);\n      } catch (x) {\n        json = stringify(\n          \"Unknown Value: React could not send it from the server.\\n\" +\n            x.message\n        );\n      } finally {\n        debugModelRoot = prevModelRoot;\n      }\n      id = id.toString(16) + \":\" + json + \"\\n\";\n      request.completedDebugChunks.push(id);\n    }\n    function outlineDebugModel(request, counter, model) {\n      var id = request.nextChunkId++;\n      request.pendingDebugChunks++;\n      emitOutlinedDebugModelChunk(request, id, counter, model);\n      return id;\n    }\n    function emitTimeOriginChunk(request, timeOrigin) {\n      request.pendingDebugChunks++;\n      request.completedDebugChunks.push(\":N\" + timeOrigin + \"\\n\");\n    }\n    function forwardDebugInfo(request$jscomp$0, task, debugInfo) {\n      for (var id = task.id, i = 0; i < debugInfo.length; i++) {\n        var info = debugInfo[i];\n        if (\"number\" === typeof info.time)\n          markOperationEndTime(request$jscomp$0, task, info.time);\n        else if (\"string\" === typeof info.name)\n          outlineComponentInfo(request$jscomp$0, info),\n            request$jscomp$0.pendingChunks++,\n            emitDebugChunk(request$jscomp$0, id, info);\n        else if (info.awaited) {\n          var ioInfo = info.awaited;\n          if (!(ioInfo.end <= request$jscomp$0.timeOrigin)) {\n            var request = request$jscomp$0,\n              ioInfo$jscomp$0 = ioInfo;\n            if (!request.writtenObjects.has(ioInfo$jscomp$0)) {\n              request.pendingDebugChunks++;\n              var id$jscomp$0 = request.nextChunkId++,\n                owner = ioInfo$jscomp$0.owner;\n              null != owner && outlineComponentInfo(request, owner);\n              var debugStack =\n                null == ioInfo$jscomp$0.stack &&\n                null != ioInfo$jscomp$0.debugStack\n                  ? filterStackTrace(\n                      request,\n                      parseStackTrace(ioInfo$jscomp$0.debugStack, 1)\n                    )\n                  : ioInfo$jscomp$0.stack;\n              var env = ioInfo$jscomp$0.env;\n              null == env && (env = (0, request.environmentName)());\n              emitIOInfoChunk(\n                request,\n                id$jscomp$0,\n                ioInfo$jscomp$0.name,\n                ioInfo$jscomp$0.start,\n                ioInfo$jscomp$0.end,\n                ioInfo$jscomp$0.value,\n                env,\n                owner,\n                debugStack\n              );\n              request.writtenDebugObjects.set(\n                ioInfo$jscomp$0,\n                serializeByValueID(id$jscomp$0)\n              );\n            }\n            null != info.owner &&\n              outlineComponentInfo(request$jscomp$0, info.owner);\n            debugStack =\n              null == info.stack && null != info.debugStack\n                ? filterStackTrace(\n                    request$jscomp$0,\n                    parseStackTrace(info.debugStack, 1)\n                  )\n                : info.stack;\n            ioInfo = { awaited: ioInfo };\n            ioInfo.env =\n              null != info.env\n                ? info.env\n                : (0, request$jscomp$0.environmentName)();\n            null != info.owner && (ioInfo.owner = info.owner);\n            null != debugStack && (ioInfo.stack = debugStack);\n            request$jscomp$0.pendingChunks++;\n            emitDebugChunk(request$jscomp$0, id, ioInfo);\n          }\n        } else\n          request$jscomp$0.pendingChunks++,\n            emitDebugChunk(request$jscomp$0, id, info);\n      }\n    }\n    function forwardDebugInfoFromThenable(\n      request,\n      task,\n      thenable,\n      owner,\n      stack\n    ) {\n      var debugInfo;\n      (debugInfo = thenable._debugInfo) &&\n        forwardDebugInfo(request, task, debugInfo);\n      thenable = getAsyncSequenceFromPromise(thenable);\n      null !== thenable &&\n        emitAsyncSequence(request, task, thenable, debugInfo, owner, stack);\n    }\n    function forwardDebugInfoFromCurrentContext(request, task, thenable) {\n      (thenable = thenable._debugInfo) &&\n        forwardDebugInfo(request, task, thenable);\n      var sequence = pendingOperations.get(async_hooks.executionAsyncId());\n      sequence = void 0 === sequence ? null : sequence;\n      null !== sequence &&\n        emitAsyncSequence(request, task, sequence, thenable, null, null);\n    }\n    function forwardDebugInfoFromAbortedTask(request, task) {\n      var model = task.model;\n      if (\"object\" === typeof model && null !== model) {\n        var debugInfo;\n        (debugInfo = model._debugInfo) &&\n          forwardDebugInfo(request, task, debugInfo);\n        var thenable = null;\n        \"function\" === typeof model.then\n          ? (thenable = model)\n          : model.$$typeof === REACT_LAZY_TYPE &&\n            ((model = model._payload),\n            \"function\" === typeof model.then && (thenable = model));\n        if (\n          null !== thenable &&\n          ((model = getAsyncSequenceFromPromise(thenable)), null !== model)\n        ) {\n          for (\n            thenable = model;\n            4 === thenable.tag && null !== thenable.awaited;\n\n          )\n            thenable = thenable.awaited;\n          3 === thenable.tag\n            ? (serializeIONode(request, thenable, null),\n              request.pendingChunks++,\n              (debugInfo = (0, request.environmentName)()),\n              (debugInfo = { awaited: thenable, env: debugInfo }),\n              advanceTaskTime(request, task, task.time),\n              emitDebugChunk(request, task.id, debugInfo))\n            : emitAsyncSequence(request, task, model, debugInfo, null, null);\n        }\n      }\n    }\n    function emitTimingChunk(request, id, timestamp) {\n      request.pendingChunks++;\n      var json = '{\"time\":' + (timestamp - request.timeOrigin) + \"}\";\n      null !== request.debugDestination\n        ? ((timestamp = request.nextChunkId++),\n          (json = timestamp.toString(16) + \":\" + json + \"\\n\"),\n          request.pendingDebugChunks++,\n          request.completedDebugChunks.push(json),\n          (id = id.toString(16) + ':D\"$' + timestamp.toString(16) + '\"\\n'),\n          request.completedRegularChunks.push(id))\n        : ((id = id.toString(16) + \":D\" + json + \"\\n\"),\n          request.completedRegularChunks.push(id));\n    }\n    function advanceTaskTime(request, task, timestamp) {\n      timestamp > task.time\n        ? (emitTimingChunk(request, task.id, timestamp),\n          (task.time = timestamp))\n        : task.timed || emitTimingChunk(request, task.id, task.time);\n      task.timed = !0;\n    }\n    function markOperationEndTime(request, task, timestamp) {\n      (request.status === ABORTING && timestamp > request.abortTime) ||\n        (timestamp > task.time\n          ? (emitTimingChunk(request, task.id, timestamp),\n            (task.time = timestamp))\n          : emitTimingChunk(request, task.id, task.time));\n    }\n    function emitChunk(request, task, value) {\n      var id = task.id;\n      \"string\" === typeof value && null !== byteLengthOfChunk\n        ? emitTextChunk(request, id, value, !1)\n        : value instanceof ArrayBuffer\n          ? emitTypedArrayChunk(request, id, \"A\", new Uint8Array(value), !1)\n          : value instanceof Int8Array\n            ? emitTypedArrayChunk(request, id, \"O\", value, !1)\n            : value instanceof Uint8Array\n              ? emitTypedArrayChunk(request, id, \"o\", value, !1)\n              : value instanceof Uint8ClampedArray\n                ? emitTypedArrayChunk(request, id, \"U\", value, !1)\n                : value instanceof Int16Array\n                  ? emitTypedArrayChunk(request, id, \"S\", value, !1)\n                  : value instanceof Uint16Array\n                    ? emitTypedArrayChunk(request, id, \"s\", value, !1)\n                    : value instanceof Int32Array\n                      ? emitTypedArrayChunk(request, id, \"L\", value, !1)\n                      : value instanceof Uint32Array\n                        ? emitTypedArrayChunk(request, id, \"l\", value, !1)\n                        : value instanceof Float32Array\n                          ? emitTypedArrayChunk(request, id, \"G\", value, !1)\n                          : value instanceof Float64Array\n                            ? emitTypedArrayChunk(request, id, \"g\", value, !1)\n                            : value instanceof BigInt64Array\n                              ? emitTypedArrayChunk(request, id, \"M\", value, !1)\n                              : value instanceof BigUint64Array\n                                ? emitTypedArrayChunk(\n                                    request,\n                                    id,\n                                    \"m\",\n                                    value,\n                                    !1\n                                  )\n                                : value instanceof DataView\n                                  ? emitTypedArrayChunk(\n                                      request,\n                                      id,\n                                      \"V\",\n                                      value,\n                                      !1\n                                    )\n                                  : ((value = stringify(value, task.toJSON)),\n                                    (task =\n                                      task.id.toString(16) +\n                                      \":\" +\n                                      value +\n                                      \"\\n\"),\n                                    request.completedRegularChunks.push(task));\n    }\n    function erroredTask(request, task, error) {\n      task.timed && markOperationEndTime(request, task, performance.now());\n      task.status = ERRORED$1;\n      var digest = logRecoverableError(request, error, task);\n      emitErrorChunk(request, task.id, digest, error, !1, task.debugOwner);\n      request.abortableTasks.delete(task);\n      callOnAllReadyIfReady(request);\n    }\n    function retryTask(request, task) {\n      if (task.status === PENDING$1) {\n        var prevCanEmitDebugInfo = canEmitDebugInfo;\n        task.status = RENDERING;\n        var parentSerializedSize = serializedSize;\n        try {\n          modelRoot = task.model;\n          canEmitDebugInfo = !0;\n          var resolvedModel = renderModelDestructive(\n            request,\n            task,\n            emptyRoot,\n            \"\",\n            task.model\n          );\n          canEmitDebugInfo = !1;\n          modelRoot = resolvedModel;\n          task.keyPath = null;\n          task.implicitSlot = !1;\n          var currentEnv = (0, request.environmentName)();\n          currentEnv !== task.environmentName &&\n            (request.pendingChunks++,\n            emitDebugChunk(request, task.id, { env: currentEnv }));\n          task.timed && markOperationEndTime(request, task, performance.now());\n          if (\"object\" === typeof resolvedModel && null !== resolvedModel)\n            request.writtenObjects.set(\n              resolvedModel,\n              serializeByValueID(task.id)\n            ),\n              emitChunk(request, task, resolvedModel);\n          else {\n            var json = stringify(resolvedModel),\n              processedChunk = task.id.toString(16) + \":\" + json + \"\\n\";\n            request.completedRegularChunks.push(processedChunk);\n          }\n          task.status = COMPLETED;\n          request.abortableTasks.delete(task);\n          callOnAllReadyIfReady(request);\n        } catch (thrownValue) {\n          if (request.status === ABORTING)\n            if (\n              (request.abortableTasks.delete(task),\n              (task.status = PENDING$1),\n              request.type === PRERENDER)\n            )\n              haltTask(task), finishHaltedTask(task, request);\n            else {\n              var errorId = request.fatalError;\n              abortTask(task);\n              finishAbortedTask(task, request, errorId);\n            }\n          else {\n            var x =\n              thrownValue === SuspenseException\n                ? getSuspendedThenable()\n                : thrownValue;\n            if (\n              \"object\" === typeof x &&\n              null !== x &&\n              \"function\" === typeof x.then\n            ) {\n              task.status = PENDING$1;\n              task.thenableState = getThenableStateAfterSuspending();\n              var ping = task.ping;\n              x.then(ping, ping);\n            } else erroredTask(request, task, x);\n          }\n        } finally {\n          (canEmitDebugInfo = prevCanEmitDebugInfo),\n            (serializedSize = parentSerializedSize);\n        }\n      }\n    }\n    function tryStreamTask(request, task) {\n      var prevCanEmitDebugInfo = canEmitDebugInfo;\n      canEmitDebugInfo = !1;\n      var parentSerializedSize = serializedSize;\n      try {\n        emitChunk(request, task, task.model);\n      } finally {\n        (serializedSize = parentSerializedSize),\n          (canEmitDebugInfo = prevCanEmitDebugInfo);\n      }\n    }\n    function performWork(request) {\n      pendingOperations.delete(async_hooks.executionAsyncId());\n      var prevDispatcher = ReactSharedInternalsServer.H;\n      ReactSharedInternalsServer.H = HooksDispatcher;\n      var prevRequest = currentRequest;\n      currentRequest$1 = currentRequest = request;\n      try {\n        var pingedTasks = request.pingedTasks;\n        request.pingedTasks = [];\n        for (var i = 0; i < pingedTasks.length; i++)\n          retryTask(request, pingedTasks[i]);\n        flushCompletedChunks(request);\n      } catch (error) {\n        logRecoverableError(request, error, null), fatalError(request, error);\n      } finally {\n        (ReactSharedInternalsServer.H = prevDispatcher),\n          (currentRequest$1 = null),\n          (currentRequest = prevRequest);\n      }\n    }\n    function abortTask(task) {\n      task.status === PENDING$1 && (task.status = ABORTED);\n    }\n    function finishAbortedTask(task, request, errorId) {\n      task.status === ABORTED &&\n        (forwardDebugInfoFromAbortedTask(request, task),\n        task.timed && markOperationEndTime(request, task, request.abortTime),\n        (errorId = serializeByValueID(errorId)),\n        (task = encodeReferenceChunk(request, task.id, errorId)),\n        request.completedErrorChunks.push(task));\n    }\n    function haltTask(task) {\n      task.status === PENDING$1 && (task.status = ABORTED);\n    }\n    function finishHaltedTask(task, request) {\n      task.status === ABORTED &&\n        (forwardDebugInfoFromAbortedTask(request, task),\n        request.pendingChunks--);\n    }\n    function flushCompletedChunks(request) {\n      if (null !== request.debugDestination) {\n        var debugDestination = request.debugDestination;\n        currentView = new Uint8Array(4096);\n        writtenBytes = 0;\n        destinationHasCapacity = !0;\n        try {\n          for (\n            var debugChunks = request.completedDebugChunks, i = 0;\n            i < debugChunks.length;\n            i++\n          )\n            request.pendingDebugChunks--,\n              writeChunkAndReturn(debugDestination, debugChunks[i]);\n          debugChunks.splice(0, i);\n        } finally {\n          completeWriting(debugDestination);\n        }\n        flushBuffered(debugDestination);\n      }\n      debugDestination = request.destination;\n      if (null !== debugDestination) {\n        currentView = new Uint8Array(4096);\n        writtenBytes = 0;\n        destinationHasCapacity = !0;\n        try {\n          var importsChunks = request.completedImportChunks;\n          for (\n            debugChunks = 0;\n            debugChunks < importsChunks.length;\n            debugChunks++\n          )\n            if (\n              (request.pendingChunks--,\n              !writeChunkAndReturn(\n                debugDestination,\n                importsChunks[debugChunks]\n              ))\n            ) {\n              request.destination = null;\n              debugChunks++;\n              break;\n            }\n          importsChunks.splice(0, debugChunks);\n          var hintChunks = request.completedHintChunks;\n          for (debugChunks = 0; debugChunks < hintChunks.length; debugChunks++)\n            if (\n              !writeChunkAndReturn(debugDestination, hintChunks[debugChunks])\n            ) {\n              request.destination = null;\n              debugChunks++;\n              break;\n            }\n          hintChunks.splice(0, debugChunks);\n          if (null === request.debugDestination) {\n            var _debugChunks = request.completedDebugChunks;\n            for (\n              debugChunks = 0;\n              debugChunks < _debugChunks.length;\n              debugChunks++\n            )\n              if (\n                (request.pendingDebugChunks--,\n                !writeChunkAndReturn(\n                  debugDestination,\n                  _debugChunks[debugChunks]\n                ))\n              ) {\n                request.destination = null;\n                debugChunks++;\n                break;\n              }\n            _debugChunks.splice(0, debugChunks);\n          }\n          var regularChunks = request.completedRegularChunks;\n          for (\n            debugChunks = 0;\n            debugChunks < regularChunks.length;\n            debugChunks++\n          )\n            if (\n              (request.pendingChunks--,\n              !writeChunkAndReturn(\n                debugDestination,\n                regularChunks[debugChunks]\n              ))\n            ) {\n              request.destination = null;\n              debugChunks++;\n              break;\n            }\n          regularChunks.splice(0, debugChunks);\n          var errorChunks = request.completedErrorChunks;\n          for (debugChunks = 0; debugChunks < errorChunks.length; debugChunks++)\n            if (\n              (request.pendingChunks--,\n              !writeChunkAndReturn(debugDestination, errorChunks[debugChunks]))\n            ) {\n              request.destination = null;\n              debugChunks++;\n              break;\n            }\n          errorChunks.splice(0, debugChunks);\n        } finally {\n          (request.flushScheduled = !1), completeWriting(debugDestination);\n        }\n        flushBuffered(debugDestination);\n      }\n      0 === request.pendingChunks &&\n        ((importsChunks = request.debugDestination),\n        0 === request.pendingDebugChunks\n          ? (null !== importsChunks &&\n              (importsChunks.end(), (request.debugDestination = null)),\n            request.status < ABORTING &&\n              request.cacheController.abort(\n                Error(\n                  \"This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources.\"\n                )\n              ),\n            null !== request.destination &&\n              ((request.status = CLOSED),\n              request.destination.end(),\n              (request.destination = null)),\n            null !== request.debugDestination &&\n              (request.debugDestination.end(),\n              (request.debugDestination = null)))\n          : null !== importsChunks &&\n            null !== request.destination &&\n            ((request.status = CLOSED),\n            request.destination.end(),\n            (request.destination = null)));\n    }\n    function startWork(request) {\n      request.flushScheduled = null !== request.destination;\n      scheduleMicrotask(function () {\n        requestStorage.run(request, performWork, request);\n      });\n      setImmediate(function () {\n        request.status === OPENING && (request.status = 11);\n      });\n    }\n    function enqueueFlush(request) {\n      !1 !== request.flushScheduled ||\n        0 !== request.pingedTasks.length ||\n        (null === request.destination && null === request.debugDestination) ||\n        ((request.flushScheduled = !0),\n        setImmediate(function () {\n          request.flushScheduled = !1;\n          flushCompletedChunks(request);\n        }));\n    }\n    function callOnAllReadyIfReady(request) {\n      0 === request.abortableTasks.size &&\n        ((request = request.onAllReady), request());\n    }\n    function startFlowing(request, destination) {\n      if (request.status === CLOSING)\n        (request.status = CLOSED), destination.destroy(request.fatalError);\n      else if (request.status !== CLOSED && null === request.destination) {\n        request.destination = destination;\n        try {\n          flushCompletedChunks(request);\n        } catch (error) {\n          logRecoverableError(request, error, null), fatalError(request, error);\n        }\n      }\n    }\n    function startFlowingDebug(request, debugDestination) {\n      if (request.status === CLOSING)\n        (request.status = CLOSED), debugDestination.destroy(request.fatalError);\n      else if (request.status !== CLOSED && null === request.debugDestination) {\n        request.debugDestination = debugDestination;\n        try {\n          flushCompletedChunks(request);\n        } catch (error) {\n          logRecoverableError(request, error, null), fatalError(request, error);\n        }\n      }\n    }\n    function finishHalt(request, abortedTasks) {\n      try {\n        abortedTasks.forEach(function (task) {\n          return finishHaltedTask(task, request);\n        });\n        var onAllReady = request.onAllReady;\n        onAllReady();\n        flushCompletedChunks(request);\n      } catch (error) {\n        logRecoverableError(request, error, null), fatalError(request, error);\n      }\n    }\n    function finishAbort(request, abortedTasks, errorId) {\n      try {\n        abortedTasks.forEach(function (task) {\n          return finishAbortedTask(task, request, errorId);\n        });\n        var onAllReady = request.onAllReady;\n        onAllReady();\n        flushCompletedChunks(request);\n      } catch (error) {\n        logRecoverableError(request, error, null), fatalError(request, error);\n      }\n    }\n    function abort(request, reason) {\n      if (!(11 < request.status))\n        try {\n          request.status = ABORTING;\n          request.abortTime = performance.now();\n          request.cacheController.abort(reason);\n          var abortableTasks = request.abortableTasks;\n          if (0 < abortableTasks.size)\n            if (request.type === PRERENDER)\n              abortableTasks.forEach(function (task) {\n                return haltTask(task, request);\n              }),\n                setImmediate(function () {\n                  return finishHalt(request, abortableTasks);\n                });\n            else {\n              var error =\n                  void 0 === reason\n                    ? Error(\n                        \"The render was aborted by the server without a reason.\"\n                      )\n                    : \"object\" === typeof reason &&\n                        null !== reason &&\n                        \"function\" === typeof reason.then\n                      ? Error(\n                          \"The render was aborted by the server with a promise.\"\n                        )\n                      : reason,\n                digest = logRecoverableError(request, error, null),\n                errorId = request.nextChunkId++;\n              request.fatalError = errorId;\n              request.pendingChunks++;\n              emitErrorChunk(request, errorId, digest, error, !1, null);\n              abortableTasks.forEach(function (task) {\n                return abortTask(task, request, errorId);\n              });\n              setImmediate(function () {\n                return finishAbort(request, abortableTasks, errorId);\n              });\n            }\n          else {\n            var onAllReady = request.onAllReady;\n            onAllReady();\n            flushCompletedChunks(request);\n          }\n        } catch (error$2) {\n          logRecoverableError(request, error$2, null),\n            fatalError(request, error$2);\n        }\n    }\n    function fromHex(str) {\n      return parseInt(str, 16);\n    }\n    function resolveDebugMessage(request, message) {\n      var deferredDebugObjects = request.deferredDebugObjects;\n      if (null === deferredDebugObjects)\n        throw Error(\n          \"resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React.\"\n        );\n      if (\"\" === message) closeDebugChannel(request);\n      else {\n        var command = message.charCodeAt(0);\n        message = message.slice(2).split(\",\").map(fromHex);\n        switch (command) {\n          case 82:\n            for (command = 0; command < message.length; command++) {\n              var id = message[command],\n                retainedValue = deferredDebugObjects.retained.get(id);\n              void 0 !== retainedValue &&\n                (request.pendingDebugChunks--,\n                deferredDebugObjects.retained.delete(id),\n                deferredDebugObjects.existing.delete(retainedValue),\n                enqueueFlush(request));\n            }\n            break;\n          case 81:\n            for (command = 0; command < message.length; command++)\n              (id = message[command]),\n                (retainedValue = deferredDebugObjects.retained.get(id)),\n                void 0 !== retainedValue &&\n                  (deferredDebugObjects.retained.delete(id),\n                  deferredDebugObjects.existing.delete(retainedValue),\n                  emitOutlinedDebugModelChunk(\n                    request,\n                    id,\n                    { objectLimit: 10 },\n                    retainedValue\n                  ),\n                  enqueueFlush(request));\n            break;\n          case 80:\n            for (command = 0; command < message.length; command++)\n              (id = message[command]),\n                (retainedValue = deferredDebugObjects.retained.get(id)),\n                void 0 !== retainedValue &&\n                  (deferredDebugObjects.retained.delete(id),\n                  emitRequestedDebugThenable(\n                    request,\n                    id,\n                    { objectLimit: 10 },\n                    retainedValue\n                  ));\n            break;\n          default:\n            throw Error(\n              \"Unknown command. The debugChannel was not wired up properly.\"\n            );\n        }\n      }\n    }\n    function closeDebugChannel(request) {\n      var deferredDebugObjects = request.deferredDebugObjects;\n      if (null === deferredDebugObjects)\n        throw Error(\n          \"resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React.\"\n        );\n      deferredDebugObjects.retained.forEach(function (value, id) {\n        request.pendingDebugChunks--;\n        deferredDebugObjects.retained.delete(id);\n        deferredDebugObjects.existing.delete(value);\n      });\n      enqueueFlush(request);\n    }\n    function resolveServerReference(bundlerConfig, id) {\n      var name = \"\",\n        resolvedModuleData = bundlerConfig[id];\n      if (resolvedModuleData) name = resolvedModuleData.name;\n      else {\n        var idx = id.lastIndexOf(\"#\");\n        -1 !== idx &&\n          ((name = id.slice(idx + 1)),\n          (resolvedModuleData = bundlerConfig[id.slice(0, idx)]));\n        if (!resolvedModuleData)\n          throw Error(\n            'Could not find the module \"' +\n              id +\n              '\" in the React Server Manifest. This is probably a bug in the React Server Components bundler.'\n          );\n      }\n      return resolvedModuleData.async\n        ? [resolvedModuleData.id, resolvedModuleData.chunks, name, 1]\n        : [resolvedModuleData.id, resolvedModuleData.chunks, name];\n    }\n    function requireAsyncModule(id) {\n      var promise = globalThis.__next_require__(id);\n      if (\"function\" !== typeof promise.then || \"fulfilled\" === promise.status)\n        return null;\n      promise.then(\n        function (value) {\n          promise.status = \"fulfilled\";\n          promise.value = value;\n        },\n        function (reason) {\n          promise.status = \"rejected\";\n          promise.reason = reason;\n        }\n      );\n      return promise;\n    }\n    function ignoreReject() {}\n    function preloadModule(metadata) {\n      for (\n        var chunks = metadata[1], promises = [], i = 0;\n        i < chunks.length;\n\n      ) {\n        var chunkId = chunks[i++];\n        chunks[i++];\n        var entry = chunkCache.get(chunkId);\n        if (void 0 === entry) {\n          entry = __webpack_chunk_load__(chunkId);\n          promises.push(entry);\n          var resolve = chunkCache.set.bind(chunkCache, chunkId, null);\n          entry.then(resolve, ignoreReject);\n          chunkCache.set(chunkId, entry);\n        } else null !== entry && promises.push(entry);\n      }\n      return 4 === metadata.length\n        ? 0 === promises.length\n          ? requireAsyncModule(metadata[0])\n          : Promise.all(promises).then(function () {\n              return requireAsyncModule(metadata[0]);\n            })\n        : 0 < promises.length\n          ? Promise.all(promises)\n          : null;\n    }\n    function requireModule(metadata) {\n      var moduleExports = globalThis.__next_require__(metadata[0]);\n      if (4 === metadata.length && \"function\" === typeof moduleExports.then)\n        if (\"fulfilled\" === moduleExports.status)\n          moduleExports = moduleExports.value;\n        else throw moduleExports.reason;\n      if (\"*\" === metadata[2]) return moduleExports;\n      if (\"\" === metadata[2])\n        return moduleExports.__esModule ? moduleExports.default : moduleExports;\n      if (hasOwnProperty.call(moduleExports, metadata[2]))\n        return moduleExports[metadata[2]];\n    }\n    function ReactPromise(status, value, reason) {\n      this.status = status;\n      this.value = value;\n      this.reason = reason;\n    }\n    function wakeChunk(response, listeners, value, chunk) {\n      for (var i = 0; i < listeners.length; i++) {\n        var listener = listeners[i];\n        \"function\" === typeof listener\n          ? listener(value)\n          : fulfillReference(response, listener, value, chunk.reason);\n      }\n    }\n    function rejectChunk(response, listeners, error) {\n      for (var i = 0; i < listeners.length; i++) {\n        var listener = listeners[i];\n        \"function\" === typeof listener\n          ? listener(error)\n          : rejectReference(response, listener.handler, error);\n      }\n    }\n    function triggerErrorOnChunk(response, chunk, error) {\n      if (\"pending\" !== chunk.status && \"blocked\" !== chunk.status)\n        chunk.reason.error(error);\n      else {\n        var listeners = chunk.reason;\n        chunk.status = \"rejected\";\n        chunk.reason = error;\n        null !== listeners && rejectChunk(response, listeners, error);\n      }\n    }\n    function resolveModelChunk(response, chunk, value, id) {\n      if (\"pending\" !== chunk.status)\n        (chunk = chunk.reason),\n          \"C\" === value[0]\n            ? chunk.close(\"C\" === value ? '\"$undefined\"' : value.slice(1))\n            : chunk.enqueueModel(value);\n      else {\n        var resolveListeners = chunk.value,\n          rejectListeners = chunk.reason;\n        chunk.status = \"resolved_model\";\n        chunk.value = value;\n        chunk.reason = _defineProperty({ id: id }, RESPONSE_SYMBOL, response);\n        if (null !== resolveListeners)\n          switch ((initializeModelChunk(chunk), chunk.status)) {\n            case \"fulfilled\":\n              wakeChunk(response, resolveListeners, chunk.value, chunk);\n              break;\n            case \"blocked\":\n            case \"pending\":\n              if (chunk.value)\n                for (value = 0; value < resolveListeners.length; value++)\n                  chunk.value.push(resolveListeners[value]);\n              else chunk.value = resolveListeners;\n              if (chunk.reason) {\n                if (rejectListeners)\n                  for (value = 0; value < rejectListeners.length; value++)\n                    chunk.reason.push(rejectListeners[value]);\n              } else chunk.reason = rejectListeners;\n              break;\n            case \"rejected\":\n              rejectListeners &&\n                rejectChunk(response, rejectListeners, chunk.reason);\n          }\n      }\n    }\n    function createResolvedIteratorResultChunk(response, value, done) {\n      return new ReactPromise(\n        \"resolved_model\",\n        (done ? '{\"done\":true,\"value\":' : '{\"done\":false,\"value\":') +\n          value +\n          \"}\",\n        _defineProperty({ id: -1 }, RESPONSE_SYMBOL, response)\n      );\n    }\n    function resolveIteratorResultChunk(response, chunk, value, done) {\n      resolveModelChunk(\n        response,\n        chunk,\n        (done ? '{\"done\":true,\"value\":' : '{\"done\":false,\"value\":') +\n          value +\n          \"}\",\n        -1\n      );\n    }\n    function loadServerReference$1(response, metaData, parentObject, key) {\n      function reject(error) {\n        var rejectListeners = blockedPromise.reason,\n          erroredPromise = blockedPromise;\n        erroredPromise.status = \"rejected\";\n        erroredPromise.value = null;\n        erroredPromise.reason = error;\n        null !== rejectListeners &&\n          rejectChunk(response, rejectListeners, error);\n        rejectReference(response, handler, error);\n      }\n      var id = metaData.id;\n      if (\"string\" !== typeof id || \"then\" === key) return null;\n      var cachedPromise = metaData.$$promise;\n      if (void 0 !== cachedPromise) {\n        if (\"fulfilled\" === cachedPromise.status)\n          return (\n            (cachedPromise = cachedPromise.value),\n            \"__proto__\" === key ? null : (parentObject[key] = cachedPromise)\n          );\n        initializingHandler\n          ? ((id = initializingHandler), id.deps++)\n          : (id = initializingHandler =\n              { chunk: null, value: null, reason: null, deps: 1, errored: !1 });\n        cachedPromise.then(\n          resolveReference.bind(null, response, id, parentObject, key),\n          rejectReference.bind(null, response, id)\n        );\n        return null;\n      }\n      var blockedPromise = new ReactPromise(\"blocked\", null, null);\n      metaData.$$promise = blockedPromise;\n      var serverReference = resolveServerReference(response._bundlerConfig, id);\n      cachedPromise = metaData.bound;\n      if ((id = preloadModule(serverReference)))\n        cachedPromise instanceof ReactPromise &&\n          (id = Promise.all([id, cachedPromise]));\n      else if (cachedPromise instanceof ReactPromise)\n        id = Promise.resolve(cachedPromise);\n      else\n        return (\n          (cachedPromise = requireModule(serverReference)),\n          (id = blockedPromise),\n          (id.status = \"fulfilled\"),\n          (id.value = cachedPromise),\n          (id.reason = null),\n          cachedPromise\n        );\n      if (initializingHandler) {\n        var handler = initializingHandler;\n        handler.deps++;\n      } else\n        handler = initializingHandler = {\n          chunk: null,\n          value: null,\n          reason: null,\n          deps: 1,\n          errored: !1\n        };\n      id.then(function () {\n        var resolvedValue = requireModule(serverReference);\n        if (metaData.bound) {\n          var promiseValue = metaData.bound.value;\n          promiseValue = isArrayImpl(promiseValue) ? promiseValue.slice(0) : [];\n          if (promiseValue.length > MAX_BOUND_ARGS) {\n            reject(\n              Error(\n                \"Server Function has too many bound arguments. Received \" +\n                  promiseValue.length +\n                  \" but the limit is \" +\n                  MAX_BOUND_ARGS +\n                  \".\"\n              )\n            );\n            return;\n          }\n          promiseValue.unshift(null);\n          resolvedValue = resolvedValue.bind.apply(resolvedValue, promiseValue);\n        }\n        promiseValue = blockedPromise.value;\n        var initializedPromise = blockedPromise;\n        initializedPromise.status = \"fulfilled\";\n        initializedPromise.value = resolvedValue;\n        initializedPromise.reason = null;\n        null !== promiseValue &&\n          wakeChunk(response, promiseValue, resolvedValue, initializedPromise);\n        resolveReference(response, handler, parentObject, key, resolvedValue);\n      }, reject);\n      return null;\n    }\n    function reviveModel(\n      response,\n      parentObj,\n      parentKey,\n      value,\n      reference,\n      arrayRoot\n    ) {\n      if (\"string\" === typeof value)\n        return parseModelString(\n          response,\n          parentObj,\n          parentKey,\n          value,\n          reference,\n          arrayRoot\n        );\n      if (\"object\" === typeof value && null !== value)\n        if (\n          (void 0 !== reference &&\n            void 0 !== response._temporaryReferences &&\n            response._temporaryReferences.set(value, reference),\n          isArrayImpl(value))\n        ) {\n          if (null === arrayRoot) {\n            var childContext = { count: 0, fork: !1 };\n            response._rootArrayContexts.set(value, childContext);\n          } else childContext = arrayRoot;\n          1 < value.length && (childContext.fork = !0);\n          bumpArrayCount(childContext, value.length + 1, response);\n          for (parentObj = 0; parentObj < value.length; parentObj++)\n            value[parentObj] = reviveModel(\n              response,\n              value,\n              \"\" + parentObj,\n              value[parentObj],\n              void 0 !== reference ? reference + \":\" + parentObj : void 0,\n              childContext\n            );\n        } else\n          for (childContext in value)\n            hasOwnProperty.call(value, childContext) &&\n              (\"__proto__\" === childContext\n                ? delete value[childContext]\n                : ((parentObj =\n                    void 0 !== reference && -1 === childContext.indexOf(\":\")\n                      ? reference + \":\" + childContext\n                      : void 0),\n                  (parentObj = reviveModel(\n                    response,\n                    value,\n                    childContext,\n                    value[childContext],\n                    parentObj,\n                    null\n                  )),\n                  void 0 !== parentObj\n                    ? (value[childContext] = parentObj)\n                    : delete value[childContext]));\n      return value;\n    }\n    function bumpArrayCount(arrayContext, slots, response) {\n      if (\n        (arrayContext.count += slots) > response._arraySizeLimit &&\n        arrayContext.fork\n      )\n        throw Error(\n          \"Maximum array nesting exceeded. Large nested arrays can be dangerous. Try adding intermediate objects.\"\n        );\n    }\n    function initializeModelChunk(chunk) {\n      var prevHandler = initializingHandler;\n      initializingHandler = null;\n      var _chunk$reason = chunk.reason,\n        response = _chunk$reason[RESPONSE_SYMBOL];\n      _chunk$reason = _chunk$reason.id;\n      _chunk$reason =\n        -1 === _chunk$reason ? void 0 : _chunk$reason.toString(16);\n      var resolvedModel = chunk.value;\n      chunk.status = \"blocked\";\n      chunk.value = null;\n      chunk.reason = null;\n      try {\n        var rawModel = JSON.parse(resolvedModel);\n        resolvedModel = { count: 0, fork: !1 };\n        var value = reviveModel(\n            response,\n            { \"\": rawModel },\n            \"\",\n            rawModel,\n            _chunk$reason,\n            resolvedModel\n          ),\n          resolveListeners = chunk.value;\n        if (null !== resolveListeners)\n          for (\n            chunk.value = null, chunk.reason = null, rawModel = 0;\n            rawModel < resolveListeners.length;\n            rawModel++\n          ) {\n            var listener = resolveListeners[rawModel];\n            \"function\" === typeof listener\n              ? listener(value)\n              : fulfillReference(response, listener, value, resolvedModel);\n          }\n        if (null !== initializingHandler) {\n          if (initializingHandler.errored) throw initializingHandler.reason;\n          if (0 < initializingHandler.deps) {\n            initializingHandler.value = value;\n            initializingHandler.reason = resolvedModel;\n            initializingHandler.chunk = chunk;\n            return;\n          }\n        }\n        chunk.status = \"fulfilled\";\n        chunk.value = value;\n        chunk.reason = resolvedModel;\n      } catch (error) {\n        (chunk.status = \"rejected\"), (chunk.reason = error);\n      } finally {\n        initializingHandler = prevHandler;\n      }\n    }\n    function reportGlobalError(response, error) {\n      response._closed = !0;\n      response._closedReason = error;\n      response._chunks.forEach(function (chunk) {\n        \"pending\" === chunk.status\n          ? triggerErrorOnChunk(response, chunk, error)\n          : \"fulfilled\" === chunk.status &&\n            null !== chunk.reason &&\n            ((chunk = chunk.reason),\n            \"function\" === typeof chunk.error && chunk.error(error));\n      });\n    }\n    function getChunk(response, id) {\n      var chunks = response._chunks,\n        chunk = chunks.get(id);\n      chunk ||\n        ((chunk = response._formData.get(response._prefix + id)),\n        (chunk =\n          \"string\" === typeof chunk\n            ? new ReactPromise(\n                \"resolved_model\",\n                chunk,\n                _defineProperty({ id: id }, RESPONSE_SYMBOL, response)\n              )\n            : response._closed\n              ? new ReactPromise(\"rejected\", null, response._closedReason)\n              : new ReactPromise(\"pending\", null, null)),\n        chunks.set(id, chunk));\n      return chunk;\n    }\n    function fulfillReference(response, reference, value, arrayRoot) {\n      var handler = reference.handler,\n        parentObject = reference.parentObject,\n        key = reference.key,\n        map = reference.map,\n        path = reference.path;\n      try {\n        for (\n          var localLength = 0,\n            rootArrayContexts = response._rootArrayContexts,\n            i = 1;\n          i < path.length;\n          i++\n        ) {\n          var name = path[i];\n          if (\n            \"object\" !== typeof value ||\n            null === value ||\n            (getPrototypeOf(value) !== ObjectPrototype &&\n              getPrototypeOf(value) !== ArrayPrototype) ||\n            !hasOwnProperty.call(value, name)\n          )\n            throw Error(\"Invalid reference.\");\n          value = value[name];\n          if (isArrayImpl(value))\n            (localLength = 0),\n              (arrayRoot = rootArrayContexts.get(value) || arrayRoot);\n          else if (((arrayRoot = null), \"string\" === typeof value))\n            localLength = value.length;\n          else if (\"bigint\" === typeof value) {\n            var n = Math.abs(Number(value));\n            localLength = 0 === n ? 1 : Math.floor(Math.log10(n)) + 1;\n          } else localLength = ArrayBuffer.isView(value) ? value.byteLength : 0;\n        }\n        var resolvedValue = map(response, value, parentObject, key);\n        var referenceArrayRoot = reference.arrayRoot;\n        null !== referenceArrayRoot &&\n          (null !== arrayRoot\n            ? (arrayRoot.fork && (referenceArrayRoot.fork = !0),\n              bumpArrayCount(referenceArrayRoot, arrayRoot.count, response))\n            : 0 < localLength &&\n              bumpArrayCount(referenceArrayRoot, localLength, response));\n      } catch (error) {\n        rejectReference(response, handler, error);\n        return;\n      }\n      resolveReference(response, handler, parentObject, key, resolvedValue);\n    }\n    function resolveReference(\n      response,\n      handler,\n      parentObject,\n      key,\n      resolvedValue\n    ) {\n      \"__proto__\" !== key && (parentObject[key] = resolvedValue);\n      \"\" === key && null === handler.value && (handler.value = resolvedValue);\n      handler.deps--;\n      0 === handler.deps &&\n        ((parentObject = handler.chunk),\n        null !== parentObject &&\n          \"blocked\" === parentObject.status &&\n          ((key = parentObject.value),\n          (parentObject.status = \"fulfilled\"),\n          (parentObject.value = handler.value),\n          (parentObject.reason = handler.reason),\n          null !== key &&\n            wakeChunk(response, key, handler.value, parentObject)));\n    }\n    function rejectReference(response, handler, error) {\n      handler.errored ||\n        ((handler.errored = !0),\n        (handler.value = null),\n        (handler.reason = error),\n        (handler = handler.chunk),\n        null !== handler &&\n          \"blocked\" === handler.status &&\n          triggerErrorOnChunk(response, handler, error));\n    }\n    function getOutlinedModel(\n      response,\n      reference,\n      parentObject,\n      key,\n      referenceArrayRoot,\n      map\n    ) {\n      reference = reference.split(\":\");\n      var id = parseInt(reference[0], 16),\n        chunk = getChunk(response, id);\n      switch (chunk.status) {\n        case \"resolved_model\":\n          initializeModelChunk(chunk);\n      }\n      switch (chunk.status) {\n        case \"fulfilled\":\n          id = chunk.value;\n          chunk = chunk.reason;\n          for (\n            var localLength = 0,\n              rootArrayContexts = response._rootArrayContexts,\n              i = 1;\n            i < reference.length;\n            i++\n          ) {\n            localLength = reference[i];\n            if (\n              \"object\" !== typeof id ||\n              null === id ||\n              (getPrototypeOf(id) !== ObjectPrototype &&\n                getPrototypeOf(id) !== ArrayPrototype) ||\n              !hasOwnProperty.call(id, localLength)\n            )\n              throw Error(\"Invalid reference.\");\n            id = id[localLength];\n            isArrayImpl(id)\n              ? ((localLength = 0),\n                (chunk = rootArrayContexts.get(id) || chunk))\n              : ((chunk = null),\n                \"string\" === typeof id\n                  ? (localLength = id.length)\n                  : \"bigint\" === typeof id\n                    ? ((localLength = Math.abs(Number(id))),\n                      (localLength =\n                        0 === localLength\n                          ? 1\n                          : Math.floor(Math.log10(localLength)) + 1))\n                    : (localLength = ArrayBuffer.isView(id)\n                        ? id.byteLength\n                        : 0));\n          }\n          parentObject = map(response, id, parentObject, key);\n          null !== referenceArrayRoot &&\n            (null !== chunk\n              ? (chunk.fork && (referenceArrayRoot.fork = !0),\n                bumpArrayCount(referenceArrayRoot, chunk.count, response))\n              : 0 < localLength &&\n                bumpArrayCount(referenceArrayRoot, localLength, response));\n          return parentObject;\n        case \"blocked\":\n          return (\n            initializingHandler\n              ? ((response = initializingHandler), response.deps++)\n              : (response = initializingHandler =\n                  {\n                    chunk: null,\n                    value: null,\n                    reason: null,\n                    deps: 1,\n                    errored: !1\n                  }),\n            (referenceArrayRoot = {\n              handler: response,\n              parentObject: parentObject,\n              key: key,\n              map: map,\n              path: reference,\n              arrayRoot: referenceArrayRoot\n            }),\n            null === chunk.value\n              ? (chunk.value = [referenceArrayRoot])\n              : chunk.value.push(referenceArrayRoot),\n            null === chunk.reason\n              ? (chunk.reason = [referenceArrayRoot])\n              : chunk.reason.push(referenceArrayRoot),\n            null\n          );\n        case \"pending\":\n          throw Error(\"Invalid forward reference.\");\n        default:\n          return (\n            initializingHandler\n              ? ((initializingHandler.errored = !0),\n                (initializingHandler.value = null),\n                (initializingHandler.reason = chunk.reason))\n              : (initializingHandler = {\n                  chunk: null,\n                  value: null,\n                  reason: chunk.reason,\n                  deps: 0,\n                  errored: !0\n                }),\n            null\n          );\n      }\n    }\n    function createMap(response, model) {\n      if (!isArrayImpl(model)) throw Error(\"Invalid Map initializer.\");\n      if (!0 === model.$$consumed) throw Error(\"Already initialized Map.\");\n      response = new Map(model);\n      model.$$consumed = !0;\n      return response;\n    }\n    function createSet(response, model) {\n      if (!isArrayImpl(model)) throw Error(\"Invalid Set initializer.\");\n      if (!0 === model.$$consumed) throw Error(\"Already initialized Set.\");\n      response = new Set(model);\n      model.$$consumed = !0;\n      return response;\n    }\n    function extractIterator(response, model) {\n      if (!isArrayImpl(model)) throw Error(\"Invalid Iterator initializer.\");\n      if (!0 === model.$$consumed) throw Error(\"Already initialized Iterator.\");\n      response = model[Symbol.iterator]();\n      model.$$consumed = !0;\n      return response;\n    }\n    function createModel(response, model, parentObject, key) {\n      return \"then\" === key && \"function\" === typeof model ? null : model;\n    }\n    function parseTypedArray(\n      response,\n      reference,\n      constructor,\n      bytesPerElement,\n      parentObject,\n      parentKey,\n      referenceArrayRoot\n    ) {\n      function reject(error) {\n        if (!handler.errored) {\n          handler.errored = !0;\n          handler.value = null;\n          handler.reason = error;\n          var chunk = handler.chunk;\n          null !== chunk &&\n            \"blocked\" === chunk.status &&\n            triggerErrorOnChunk(response, chunk, error);\n        }\n      }\n      reference = parseInt(reference.slice(2), 16);\n      var key = response._prefix + reference;\n      bytesPerElement = response._chunks;\n      if (bytesPerElement.has(reference))\n        throw Error(\"Already initialized typed array.\");\n      bytesPerElement.set(\n        reference,\n        new ReactPromise(\n          \"rejected\",\n          null,\n          Error(\"Already initialized typed array.\")\n        )\n      );\n      reference = response._formData.get(key).arrayBuffer();\n      if (initializingHandler) {\n        var handler = initializingHandler;\n        handler.deps++;\n      } else\n        handler = initializingHandler = {\n          chunk: null,\n          value: null,\n          reason: null,\n          deps: 1,\n          errored: !1\n        };\n      reference.then(function (buffer) {\n        try {\n          null !== referenceArrayRoot &&\n            bumpArrayCount(referenceArrayRoot, buffer.byteLength, response);\n          var resolvedValue =\n            constructor === ArrayBuffer ? buffer : new constructor(buffer);\n          \"__proto__\" !== key && (parentObject[parentKey] = resolvedValue);\n          \"\" === parentKey &&\n            null === handler.value &&\n            (handler.value = resolvedValue);\n        } catch (x) {\n          reject(x);\n          return;\n        }\n        handler.deps--;\n        0 === handler.deps &&\n          ((buffer = handler.chunk),\n          null !== buffer &&\n            \"blocked\" === buffer.status &&\n            ((resolvedValue = buffer.value),\n            (buffer.status = \"fulfilled\"),\n            (buffer.value = handler.value),\n            (buffer.reason = null),\n            null !== resolvedValue &&\n              wakeChunk(response, resolvedValue, handler.value, buffer)));\n      }, reject);\n      return null;\n    }\n    function resolveStream(response, id, stream, controller) {\n      var chunks = response._chunks;\n      stream = new ReactPromise(\"fulfilled\", stream, controller);\n      chunks.set(id, stream);\n      response = response._formData.getAll(response._prefix + id);\n      for (id = 0; id < response.length; id++)\n        (chunks = response[id]),\n          \"string\" === typeof chunks &&\n            (\"C\" === chunks[0]\n              ? controller.close(\n                  \"C\" === chunks ? '\"$undefined\"' : chunks.slice(1)\n                )\n              : controller.enqueueModel(chunks));\n    }\n    function parseReadableStream(response, reference, type) {\n      function enqueue(value) {\n        \"bytes\" !== type || ArrayBuffer.isView(value)\n          ? controller.enqueue(value)\n          : flightController.error(Error(\"Invalid data for bytes stream.\"));\n      }\n      reference = parseInt(reference.slice(2), 16);\n      if (response._chunks.has(reference))\n        throw Error(\"Already initialized stream.\");\n      var controller = null,\n        closed = !1,\n        stream = new ReadableStream({\n          type: type,\n          start: function (c) {\n            controller = c;\n          }\n        }),\n        previousBlockedChunk = null,\n        flightController = {\n          enqueueModel: function (json) {\n            if (null === previousBlockedChunk) {\n              var chunk = new ReactPromise(\n                \"resolved_model\",\n                json,\n                _defineProperty({ id: -1 }, RESPONSE_SYMBOL, response)\n              );\n              initializeModelChunk(chunk);\n              \"fulfilled\" === chunk.status\n                ? enqueue(chunk.value)\n                : (chunk.then(enqueue, flightController.error),\n                  (previousBlockedChunk = chunk));\n            } else {\n              chunk = previousBlockedChunk;\n              var _chunk = new ReactPromise(\"pending\", null, null);\n              _chunk.then(enqueue, flightController.error);\n              previousBlockedChunk = _chunk;\n              chunk.then(function () {\n                previousBlockedChunk === _chunk &&\n                  (previousBlockedChunk = null);\n                resolveModelChunk(response, _chunk, json, -1);\n              });\n            }\n          },\n          close: function () {\n            if (!closed)\n              if (((closed = !0), null === previousBlockedChunk))\n                controller.close();\n              else {\n                var blockedChunk = previousBlockedChunk;\n                previousBlockedChunk = null;\n                blockedChunk.then(function () {\n                  return controller.close();\n                });\n              }\n          },\n          error: function (error) {\n            if (!closed)\n              if (((closed = !0), null === previousBlockedChunk))\n                controller.error(error);\n              else {\n                var blockedChunk = previousBlockedChunk;\n                previousBlockedChunk = null;\n                blockedChunk.then(function () {\n                  return controller.error(error);\n                });\n              }\n          }\n        };\n      resolveStream(response, reference, stream, flightController);\n      return stream;\n    }\n    function FlightIterator(next) {\n      this.next = next;\n    }\n    function parseAsyncIterable(response, reference, iterator) {\n      reference = parseInt(reference.slice(2), 16);\n      if (response._chunks.has(reference))\n        throw Error(\"Already initialized stream.\");\n      var buffer = [],\n        closed = !1,\n        nextWriteIndex = 0,\n        iterable = _defineProperty({}, ASYNC_ITERATOR, function () {\n          var nextReadIndex = 0;\n          return new FlightIterator(function (arg) {\n            if (void 0 !== arg)\n              throw Error(\n                \"Values cannot be passed to next() of AsyncIterables passed to Client Components.\"\n              );\n            if (nextReadIndex === buffer.length) {\n              if (closed)\n                return new ReactPromise(\n                  \"fulfilled\",\n                  { done: !0, value: void 0 },\n                  null\n                );\n              buffer[nextReadIndex] = new ReactPromise(\"pending\", null, null);\n            }\n            return buffer[nextReadIndex++];\n          });\n        });\n      iterator = iterator ? iterable[ASYNC_ITERATOR]() : iterable;\n      resolveStream(response, reference, iterator, {\n        enqueueModel: function (value) {\n          nextWriteIndex === buffer.length\n            ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk(\n                response,\n                value,\n                !1\n              ))\n            : resolveIteratorResultChunk(\n                response,\n                buffer[nextWriteIndex],\n                value,\n                !1\n              );\n          nextWriteIndex++;\n        },\n        close: function (value) {\n          if (!closed)\n            for (\n              closed = !0,\n                nextWriteIndex === buffer.length\n                  ? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk(\n                      response,\n                      value,\n                      !0\n                    ))\n                  : resolveIteratorResultChunk(\n                      response,\n                      buffer[nextWriteIndex],\n                      value,\n                      !0\n                    ),\n                nextWriteIndex++;\n              nextWriteIndex < buffer.length;\n\n            )\n              resolveIteratorResultChunk(\n                response,\n                buffer[nextWriteIndex++],\n                '\"$undefined\"',\n                !0\n              );\n        },\n        error: function (error) {\n          if (!closed)\n            for (\n              closed = !0,\n                nextWriteIndex === buffer.length &&\n                  (buffer[nextWriteIndex] = new ReactPromise(\n                    \"pending\",\n                    null,\n                    null\n                  ));\n              nextWriteIndex < buffer.length;\n\n            )\n              triggerErrorOnChunk(response, buffer[nextWriteIndex++], error);\n        }\n      });\n      return iterator;\n    }\n    function parseModelString(response, obj, key, value, reference, arrayRoot) {\n      if (\"$\" === value[0]) {\n        switch (value[1]) {\n          case \"$\":\n            return (\n              null !== arrayRoot &&\n                bumpArrayCount(arrayRoot, value.length - 1, response),\n              value.slice(1)\n            );\n          case \"@\":\n            return (\n              (obj = parseInt(value.slice(2), 16)), getChunk(response, obj)\n            );\n          case \"h\":\n            return (\n              (arrayRoot = value.slice(2)),\n              getOutlinedModel(\n                response,\n                arrayRoot,\n                obj,\n                key,\n                null,\n                loadServerReference$1\n              )\n            );\n          case \"T\":\n            if (\n              void 0 === reference ||\n              void 0 === response._temporaryReferences\n            )\n              throw Error(\n                \"Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server.\"\n              );\n            return createTemporaryReference(\n              response._temporaryReferences,\n              reference\n            );\n          case \"Q\":\n            return (\n              (arrayRoot = value.slice(2)),\n              getOutlinedModel(response, arrayRoot, obj, key, null, createMap)\n            );\n          case \"W\":\n            return (\n              (arrayRoot = value.slice(2)),\n              getOutlinedModel(response, arrayRoot, obj, key, null, createSet)\n            );\n          case \"K\":\n            obj = value.slice(2);\n            obj = response._prefix + obj + \"_\";\n            key = new FormData();\n            response = response._formData;\n            arrayRoot = Array.from(response.keys());\n            for (value = 0; value < arrayRoot.length; value++)\n              if (((reference = arrayRoot[value]), reference.startsWith(obj))) {\n                for (\n                  var entries = response.getAll(reference),\n                    newKey = reference.slice(obj.length),\n                    j = 0;\n                  j < entries.length;\n                  j++\n                )\n                  key.append(newKey, entries[j]);\n                response.delete(reference);\n              }\n            return key;\n          case \"i\":\n            return (\n              (arrayRoot = value.slice(2)),\n              getOutlinedModel(\n                response,\n                arrayRoot,\n                obj,\n                key,\n                null,\n                extractIterator\n              )\n            );\n          case \"I\":\n            return Infinity;\n          case \"-\":\n            return \"$-0\" === value ? -0 : -Infinity;\n          case \"N\":\n            return NaN;\n          case \"u\":\n            return;\n          case \"D\":\n            return new Date(Date.parse(value.slice(2)));\n          case \"n\":\n            obj = value.slice(2);\n            if (obj.length > MAX_BIGINT_DIGITS)\n              throw Error(\n                \"BigInt is too large. Received \" +\n                  obj.length +\n                  \" digits but the limit is \" +\n                  MAX_BIGINT_DIGITS +\n                  \".\"\n              );\n            null !== arrayRoot &&\n              bumpArrayCount(arrayRoot, obj.length, response);\n            return BigInt(obj);\n          case \"A\":\n            return parseTypedArray(\n              response,\n              value,\n              ArrayBuffer,\n              1,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"O\":\n            return parseTypedArray(\n              response,\n              value,\n              Int8Array,\n              1,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"o\":\n            return parseTypedArray(\n              response,\n              value,\n              Uint8Array,\n              1,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"U\":\n            return parseTypedArray(\n              response,\n              value,\n              Uint8ClampedArray,\n              1,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"S\":\n            return parseTypedArray(\n              response,\n              value,\n              Int16Array,\n              2,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"s\":\n            return parseTypedArray(\n              response,\n              value,\n              Uint16Array,\n              2,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"L\":\n            return parseTypedArray(\n              response,\n              value,\n              Int32Array,\n              4,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"l\":\n            return parseTypedArray(\n              response,\n              value,\n              Uint32Array,\n              4,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"G\":\n            return parseTypedArray(\n              response,\n              value,\n              Float32Array,\n              4,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"g\":\n            return parseTypedArray(\n              response,\n              value,\n              Float64Array,\n              8,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"M\":\n            return parseTypedArray(\n              response,\n              value,\n              BigInt64Array,\n              8,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"m\":\n            return parseTypedArray(\n              response,\n              value,\n              BigUint64Array,\n              8,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"V\":\n            return parseTypedArray(\n              response,\n              value,\n              DataView,\n              1,\n              obj,\n              key,\n              arrayRoot\n            );\n          case \"B\":\n            obj = parseInt(value.slice(2), 16);\n            response = response._formData.get(response._prefix + obj);\n            if (!(response instanceof Blob))\n              throw Error(\"Referenced Blob is not a Blob.\");\n            return response;\n          case \"R\":\n            return parseReadableStream(response, value, void 0);\n          case \"r\":\n            return parseReadableStream(response, value, \"bytes\");\n          case \"X\":\n            return parseAsyncIterable(response, value, !1);\n          case \"x\":\n            return parseAsyncIterable(response, value, !0);\n        }\n        value = value.slice(1);\n        return getOutlinedModel(\n          response,\n          value,\n          obj,\n          key,\n          arrayRoot,\n          createModel\n        );\n      }\n      null !== arrayRoot && bumpArrayCount(arrayRoot, value.length, response);\n      return value;\n    }\n    function createResponse(\n      bundlerConfig,\n      formFieldPrefix,\n      temporaryReferences\n    ) {\n      var backingFormData =\n          3 < arguments.length && void 0 !== arguments[3]\n            ? arguments[3]\n            : new FormData(),\n        arraySizeLimit =\n          4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1e6,\n        chunks = new Map();\n      return {\n        _bundlerConfig: bundlerConfig,\n        _prefix: formFieldPrefix,\n        _formData: backingFormData,\n        _chunks: chunks,\n        _closed: !1,\n        _closedReason: null,\n        _temporaryReferences: temporaryReferences,\n        _rootArrayContexts: new WeakMap(),\n        _arraySizeLimit: arraySizeLimit\n      };\n    }\n    function resolveField(response, key, value) {\n      response._formData.append(key, value);\n      var prefix = response._prefix;\n      if (key.startsWith(prefix)) {\n        var chunks = response._chunks;\n        key = +key.slice(prefix.length);\n        (chunks = chunks.get(key)) &&\n          resolveModelChunk(response, chunks, value, key);\n      }\n    }\n    function close(response) {\n      reportGlobalError(response, Error(\"Connection closed.\"));\n    }\n    function loadServerReference(bundlerConfig, metaData) {\n      var id = metaData.id;\n      if (\"string\" !== typeof id) return null;\n      var serverReference = resolveServerReference(bundlerConfig, id);\n      bundlerConfig = preloadModule(serverReference);\n      metaData = metaData.bound;\n      return metaData instanceof Promise\n        ? Promise.all([metaData, bundlerConfig]).then(function (_ref) {\n            _ref = _ref[0];\n            var fn = requireModule(serverReference);\n            if (_ref.length > MAX_BOUND_ARGS)\n              throw Error(\n                \"Server Function has too many bound arguments. Received \" +\n                  _ref.length +\n                  \" but the limit is \" +\n                  MAX_BOUND_ARGS +\n                  \".\"\n              );\n            return fn.bind.apply(fn, [null].concat(_ref));\n          })\n        : bundlerConfig\n          ? Promise.resolve(bundlerConfig).then(function () {\n              return requireModule(serverReference);\n            })\n          : Promise.resolve(requireModule(serverReference));\n    }\n    function decodeBoundActionMetaData(\n      body,\n      serverManifest,\n      formFieldPrefix,\n      arraySizeLimit\n    ) {\n      body = createResponse(\n        serverManifest,\n        formFieldPrefix,\n        void 0,\n        body,\n        arraySizeLimit\n      );\n      close(body);\n      body = getChunk(body, 0);\n      body.then(function () {});\n      if (\"fulfilled\" !== body.status) throw body.reason;\n      return body.value;\n    }\n    function createDrainHandler(destination, request) {\n      return function () {\n        return startFlowing(request, destination);\n      };\n    }\n    function createCancelHandler(request, reason) {\n      return function () {\n        request.destination = null;\n        abort(request, Error(reason));\n      };\n    }\n    function startReadingFromDebugChannelReadable(request, stream) {\n      function onData(chunk) {\n        if (\"string\" === typeof chunk) {\n          if (lastWasPartial) {\n            var JSCompiler_temp_const = stringBuffer;\n            var JSCompiler_inline_result = new Uint8Array(0);\n            JSCompiler_inline_result = stringDecoder.decode(\n              JSCompiler_inline_result\n            );\n            stringBuffer = JSCompiler_temp_const + JSCompiler_inline_result;\n            lastWasPartial = !1;\n          }\n          stringBuffer += chunk;\n        } else\n          (stringBuffer += stringDecoder.decode(chunk, decoderOptions)),\n            (lastWasPartial = !0);\n        chunk = stringBuffer.split(\"\\n\");\n        for (\n          JSCompiler_temp_const = 0;\n          JSCompiler_temp_const < chunk.length - 1;\n          JSCompiler_temp_const++\n        )\n          resolveDebugMessage(request, chunk[JSCompiler_temp_const]);\n        stringBuffer = chunk[chunk.length - 1];\n      }\n      function onError(error) {\n        abort(\n          request,\n          Error(\"Lost connection to the Debug Channel.\", { cause: error })\n        );\n      }\n      function onClose() {\n        closeDebugChannel(request);\n      }\n      var stringDecoder = new util.TextDecoder(),\n        lastWasPartial = !1,\n        stringBuffer = \"\";\n      \"function\" === typeof stream.addEventListener &&\n      \"string\" === typeof stream.binaryType\n        ? ((stream.binaryType = \"arraybuffer\"),\n          stream.addEventListener(\"message\", function (event) {\n            onData(event.data);\n          }),\n          stream.addEventListener(\"error\", function (event) {\n            onError(event.error);\n          }),\n          stream.addEventListener(\"close\", onClose))\n        : (stream.on(\"data\", onData),\n          stream.on(\"error\", onError),\n          stream.on(\"end\", onClose));\n    }\n    function createFakeWritableFromWebSocket(webSocket) {\n      return {\n        write: function (chunk) {\n          webSocket.send(chunk);\n          return !0;\n        },\n        end: function () {\n          webSocket.close();\n        },\n        destroy: function (reason) {\n          \"object\" === typeof reason &&\n            null !== reason &&\n            (reason = reason.message);\n          \"string\" === typeof reason\n            ? webSocket.close(1011, reason)\n            : webSocket.close(1011);\n        }\n      };\n    }\n    function createFakeWritableFromReadableStreamController(controller) {\n      return {\n        write: function (chunk) {\n          \"string\" === typeof chunk && (chunk = textEncoder.encode(chunk));\n          controller.enqueue(chunk);\n          return !0;\n        },\n        end: function () {\n          controller.close();\n        },\n        destroy: function (error) {\n          \"function\" === typeof controller.error\n            ? controller.error(error)\n            : controller.close();\n        }\n      };\n    }\n    function startReadingFromDebugChannelReadableStream(request, stream) {\n      function progress(_ref) {\n        var done = _ref.done,\n          buffer = _ref.value;\n        _ref = stringBuffer;\n        done\n          ? ((buffer = new Uint8Array(0)),\n            (buffer = stringDecoder.decode(buffer)))\n          : (buffer = stringDecoder.decode(buffer, decoderOptions));\n        stringBuffer = _ref + buffer;\n        _ref = stringBuffer.split(\"\\n\");\n        for (buffer = 0; buffer < _ref.length - 1; buffer++)\n          resolveDebugMessage(request, _ref[buffer]);\n        stringBuffer = _ref[_ref.length - 1];\n        if (done) closeDebugChannel(request);\n        else return reader.read().then(progress).catch(error);\n      }\n      function error(e) {\n        abort(\n          request,\n          Error(\"Lost connection to the Debug Channel.\", { cause: e })\n        );\n      }\n      var reader = stream.getReader(),\n        stringDecoder = new util.TextDecoder(),\n        stringBuffer = \"\";\n      reader.read().then(progress).catch(error);\n    }\n    function createFakeWritableFromNodeReadable(readable) {\n      return {\n        write: function (chunk) {\n          return readable.push(chunk);\n        },\n        end: function () {\n          readable.push(null);\n        },\n        destroy: function (error) {\n          readable.destroy(error);\n        }\n      };\n    }\n    var stream = require(\"stream\"),\n      util = require(\"util\");\n    require(\"crypto\");\n    var async_hooks = require(\"async_hooks\"),\n      ReactDOM = require(\"react-dom\"),\n      React = require(\"react\"),\n      REACT_LEGACY_ELEMENT_TYPE = Symbol.for(\"react.element\"),\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_MEMO_CACHE_SENTINEL = Symbol.for(\"react.memo_cache_sentinel\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n      ASYNC_ITERATOR = Symbol.asyncIterator,\n      REACT_OPTIMISTIC_KEY = Symbol.for(\"react.optimistic_key\"),\n      scheduleMicrotask = queueMicrotask,\n      currentView = null,\n      writtenBytes = 0,\n      destinationHasCapacity = !0,\n      textEncoder = new util.TextEncoder(),\n      CLIENT_REFERENCE_TAG$1 = Symbol.for(\"react.client.reference\"),\n      SERVER_REFERENCE_TAG = Symbol.for(\"react.server.reference\"),\n      FunctionBind = Function.prototype.bind,\n      ArraySlice = Array.prototype.slice,\n      serverReferenceToString = {\n        value: function () {\n          return \"function () { [omitted code] }\";\n        },\n        configurable: !0,\n        writable: !0\n      },\n      PROMISE_PROTOTYPE = Promise.prototype,\n      deepProxyHandlers = {\n        get: function (target, name, receiver) {\n          switch (name) {\n            case \"$$typeof\":\n              return target.$$typeof;\n            case \"$$id\":\n              return target.$$id;\n            case \"$$async\":\n              return target.$$async;\n            case \"name\":\n              return target.name;\n            case \"displayName\":\n              return;\n            case \"defaultProps\":\n              return;\n            case \"_debugInfo\":\n              return;\n            case \"toJSON\":\n              return;\n            case Symbol.toPrimitive:\n              return Object.prototype[Symbol.toPrimitive];\n            case Symbol.toStringTag:\n              return Object.prototype[Symbol.toStringTag];\n            case \"Provider\":\n              return receiver;\n            case \"then\":\n              throw Error(\n                \"Cannot await or return from a thenable. You cannot await a client module from a server component.\"\n              );\n          }\n          throw Error(\n            \"Cannot access \" +\n              (String(target.name) + \".\" + String(name)) +\n              \" on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.\"\n          );\n        },\n        set: function () {\n          throw Error(\"Cannot assign to a client module from a server module.\");\n        }\n      },\n      proxyHandlers$1 = {\n        get: function (target, name) {\n          return getReference(target, name);\n        },\n        getOwnPropertyDescriptor: function (target, name) {\n          var descriptor = Object.getOwnPropertyDescriptor(target, name);\n          descriptor ||\n            ((descriptor = {\n              value: getReference(target, name),\n              writable: !1,\n              configurable: !1,\n              enumerable: !1\n            }),\n            Object.defineProperty(target, name, descriptor));\n          return descriptor;\n        },\n        getPrototypeOf: function () {\n          return PROMISE_PROTOTYPE;\n        },\n        set: function () {\n          throw Error(\"Cannot assign to a client module from a server module.\");\n        }\n      },\n      ReactDOMSharedInternals =\n        ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n      previousDispatcher = ReactDOMSharedInternals.d;\n    ReactDOMSharedInternals.d = {\n      f: previousDispatcher.f,\n      r: previousDispatcher.r,\n      D: function (href) {\n        if (\"string\" === typeof href && href) {\n          var request = resolveRequest();\n          if (request) {\n            var hints = request.hints,\n              key = \"D|\" + href;\n            hints.has(key) || (hints.add(key), emitHint(request, \"D\", href));\n          } else previousDispatcher.D(href);\n        }\n      },\n      C: function (href, crossOrigin) {\n        if (\"string\" === typeof href) {\n          var request = resolveRequest();\n          if (request) {\n            var hints = request.hints,\n              key =\n                \"C|\" +\n                (null == crossOrigin ? \"null\" : crossOrigin) +\n                \"|\" +\n                href;\n            hints.has(key) ||\n              (hints.add(key),\n              \"string\" === typeof crossOrigin\n                ? emitHint(request, \"C\", [href, crossOrigin])\n                : emitHint(request, \"C\", href));\n          } else previousDispatcher.C(href, crossOrigin);\n        }\n      },\n      L: preload,\n      m: preloadModule$1,\n      X: function (src, options) {\n        if (\"string\" === typeof src) {\n          var request = resolveRequest();\n          if (request) {\n            var hints = request.hints,\n              key = \"X|\" + src;\n            if (hints.has(key)) return;\n            hints.add(key);\n            return (options = trimOptions(options))\n              ? emitHint(request, \"X\", [src, options])\n              : emitHint(request, \"X\", src);\n          }\n          previousDispatcher.X(src, options);\n        }\n      },\n      S: function (href, precedence, options) {\n        if (\"string\" === typeof href) {\n          var request = resolveRequest();\n          if (request) {\n            var hints = request.hints,\n              key = \"S|\" + href;\n            if (hints.has(key)) return;\n            hints.add(key);\n            return (options = trimOptions(options))\n              ? emitHint(request, \"S\", [\n                  href,\n                  \"string\" === typeof precedence ? precedence : 0,\n                  options\n                ])\n              : \"string\" === typeof precedence\n                ? emitHint(request, \"S\", [href, precedence])\n                : emitHint(request, \"S\", href);\n          }\n          previousDispatcher.S(href, precedence, options);\n        }\n      },\n      M: function (src, options) {\n        if (\"string\" === typeof src) {\n          var request = resolveRequest();\n          if (request) {\n            var hints = request.hints,\n              key = \"M|\" + src;\n            if (hints.has(key)) return;\n            hints.add(key);\n            return (options = trimOptions(options))\n              ? emitHint(request, \"M\", [src, options])\n              : emitHint(request, \"M\", src);\n          }\n          previousDispatcher.M(src, options);\n        }\n      }\n    };\n    var currentOwner = null,\n      getAsyncId = async_hooks.AsyncResource.prototype.asyncId,\n      pendingOperations = new Map(),\n      lastRanAwait = null,\n      emptyStack = [],\n      framesToSkip = 0,\n      collectedStackTrace = null,\n      identifierRegExp = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/,\n      frameRegExp =\n        /^ {3} at (?:(.+) \\((?:(.+):(\\d+):(\\d+)|<anonymous>)\\)|(?:async )?(.+):(\\d+):(\\d+)|<anonymous>)$/,\n      stackTraceCache = new WeakMap(),\n      requestStorage = new async_hooks.AsyncLocalStorage(),\n      componentStorage = new async_hooks.AsyncLocalStorage(),\n      TEMPORARY_REFERENCE_TAG = Symbol.for(\"react.temporary.reference\"),\n      proxyHandlers = {\n        get: function (target, name, receiver) {\n          switch (name) {\n            case \"$$typeof\":\n              return target.$$typeof;\n            case \"name\":\n              return;\n            case \"displayName\":\n              return;\n            case \"defaultProps\":\n              return;\n            case \"_debugInfo\":\n              return;\n            case \"toJSON\":\n              return;\n            case Symbol.toPrimitive:\n              return Object.prototype[Symbol.toPrimitive];\n            case Symbol.toStringTag:\n              return Object.prototype[Symbol.toStringTag];\n            case \"Provider\":\n              return receiver;\n            case \"then\":\n              return;\n          }\n          throw Error(\n            \"Cannot access \" +\n              String(name) +\n              \" on the server. You cannot dot into a temporary client reference from a server component. You can only pass the value through to the client.\"\n          );\n        },\n        set: function () {\n          throw Error(\n            \"Cannot assign to a temporary client reference from a server module.\"\n          );\n        }\n      },\n      SuspenseException = Error(\n        \"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\\n\\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`.\"\n      ),\n      suspendedThenable = null,\n      currentRequest$1 = null,\n      thenableIndexCounter = 0,\n      thenableState = null,\n      currentComponentDebugInfo = null,\n      HooksDispatcher = {\n        readContext: unsupportedContext,\n        use: function (usable) {\n          if (\n            (null !== usable && \"object\" === typeof usable) ||\n            \"function\" === typeof usable\n          ) {\n            if (\"function\" === typeof usable.then) {\n              var index = thenableIndexCounter;\n              thenableIndexCounter += 1;\n              null === thenableState && (thenableState = []);\n              return trackUsedThenable(thenableState, usable, index);\n            }\n            usable.$$typeof === REACT_CONTEXT_TYPE && unsupportedContext();\n          }\n          if (isClientReference(usable)) {\n            if (\n              null != usable.value &&\n              usable.value.$$typeof === REACT_CONTEXT_TYPE\n            )\n              throw Error(\n                \"Cannot read a Client Context from a Server Component.\"\n              );\n            throw Error(\"Cannot use() an already resolved Client Reference.\");\n          }\n          throw Error(\n            \"An unsupported type was passed to use(): \" + String(usable)\n          );\n        },\n        useCallback: function (callback) {\n          return callback;\n        },\n        useContext: unsupportedContext,\n        useEffect: unsupportedHook,\n        useImperativeHandle: unsupportedHook,\n        useLayoutEffect: unsupportedHook,\n        useInsertionEffect: unsupportedHook,\n        useMemo: function (nextCreate) {\n          return nextCreate();\n        },\n        useReducer: unsupportedHook,\n        useRef: unsupportedHook,\n        useState: unsupportedHook,\n        useDebugValue: function () {},\n        useDeferredValue: unsupportedHook,\n        useTransition: unsupportedHook,\n        useSyncExternalStore: unsupportedHook,\n        useId: function () {\n          if (null === currentRequest$1)\n            throw Error(\"useId can only be used while React is rendering\");\n          var id = currentRequest$1.identifierCount++;\n          return (\n            \"_\" +\n            currentRequest$1.identifierPrefix +\n            \"S_\" +\n            id.toString(32) +\n            \"_\"\n          );\n        },\n        useHostTransitionStatus: unsupportedHook,\n        useFormState: unsupportedHook,\n        useActionState: unsupportedHook,\n        useOptimistic: unsupportedHook,\n        useMemoCache: function (size) {\n          for (var data = Array(size), i = 0; i < size; i++)\n            data[i] = REACT_MEMO_CACHE_SENTINEL;\n          return data;\n        },\n        useCacheRefresh: function () {\n          return unsupportedRefresh;\n        },\n        useEffectEvent: unsupportedHook\n      },\n      DefaultAsyncDispatcher = {\n        getCacheForType: function (resourceType) {\n          var cache = (cache = resolveRequest()) ? cache.cache : new Map();\n          var entry = cache.get(resourceType);\n          void 0 === entry &&\n            ((entry = resourceType()), cache.set(resourceType, entry));\n          return entry;\n        },\n        cacheSignal: function () {\n          var request = resolveRequest();\n          return request ? request.cacheController.signal : null;\n        }\n      };\n    DefaultAsyncDispatcher.getOwner = resolveOwner;\n    var ReactSharedInternalsServer =\n      React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n    if (!ReactSharedInternalsServer)\n      throw Error(\n        'The \"react\" package in this environment is not configured correctly. The \"react-server\" condition must be enabled in any environment that runs React Server Components.'\n      );\n    var prefix, suffix;\n    new (\"function\" === typeof WeakMap ? WeakMap : Map)();\n    var lastResetTime = 0;\n    if (\n      \"object\" === typeof performance &&\n      \"function\" === typeof performance.now\n    ) {\n      var localPerformance = performance;\n      var getCurrentTime = function () {\n        return localPerformance.now();\n      };\n    } else {\n      var localDate = Date;\n      getCurrentTime = function () {\n        return localDate.now();\n      };\n    }\n    var callComponent = {\n        react_stack_bottom_frame: function (\n          Component,\n          props,\n          componentDebugInfo\n        ) {\n          currentOwner = componentDebugInfo;\n          try {\n            return Component(props, void 0);\n          } finally {\n            currentOwner = null;\n          }\n        }\n      },\n      callComponentInDEV =\n        callComponent.react_stack_bottom_frame.bind(callComponent),\n      callLazyInit = {\n        react_stack_bottom_frame: function (lazy) {\n          var init = lazy._init;\n          return init(lazy._payload);\n        }\n      },\n      callLazyInitInDEV =\n        callLazyInit.react_stack_bottom_frame.bind(callLazyInit),\n      callIterator = {\n        react_stack_bottom_frame: function (iterator, progress, error) {\n          iterator.next().then(progress, error);\n        }\n      },\n      callIteratorInDEV =\n        callIterator.react_stack_bottom_frame.bind(callIterator),\n      isArrayImpl = Array.isArray,\n      getPrototypeOf = Object.getPrototypeOf,\n      jsxPropsParents = new WeakMap(),\n      jsxChildrenParents = new WeakMap(),\n      CLIENT_REFERENCE_TAG = Symbol.for(\"react.client.reference\"),\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      doNotLimit = new WeakSet();\n    (function () {\n      async_hooks\n        .createHook({\n          init: function (asyncId, type, triggerAsyncId, resource) {\n            var trigger = pendingOperations.get(triggerAsyncId);\n            if (\"PROMISE\" === type)\n              if (\n                ((type = async_hooks.executionAsyncId()),\n                type !== triggerAsyncId)\n              ) {\n                if (void 0 === trigger) return;\n                triggerAsyncId = null;\n                if (\n                  null === trigger.stack ||\n                  (2 !== trigger.tag && 4 !== trigger.tag)\n                ) {\n                  resource = new WeakRef(resource);\n                  var request = resolveRequest();\n                  null !== request &&\n                    ((triggerAsyncId = parseStackTracePrivate(Error(), 5)),\n                    null === triggerAsyncId ||\n                      isAwaitInUserspace(request, triggerAsyncId) ||\n                      (triggerAsyncId = null));\n                } else\n                  (triggerAsyncId = emptyStack),\n                    (resource =\n                      void 0 !== resource._debugInfo\n                        ? new WeakRef(resource)\n                        : trigger.promise);\n                type = pendingOperations.get(type);\n                trigger = {\n                  tag: 4,\n                  owner: resolveOwner(),\n                  stack: triggerAsyncId,\n                  start: performance.now(),\n                  end: -1.1,\n                  promise: resource,\n                  awaited: trigger,\n                  previous: void 0 === type ? null : type\n                };\n              } else\n                (type = resolveOwner()),\n                  (trigger = {\n                    tag: 3,\n                    owner: type,\n                    stack:\n                      null === type ? null : parseStackTracePrivate(Error(), 5),\n                    start: performance.now(),\n                    end: -1.1,\n                    promise: new WeakRef(resource),\n                    awaited: void 0 === trigger ? null : trigger,\n                    previous: null\n                  });\n            else if (\n              \"bound-anonymous-fn\" === type ||\n              \"Microtask\" === type ||\n              \"TickObject\" === type ||\n              \"Immediate\" === type\n            ) {\n              if (void 0 === trigger) return;\n            } else if (void 0 === trigger)\n              (trigger = resolveOwner()),\n                (trigger = {\n                  tag: 0,\n                  owner: trigger,\n                  stack:\n                    null === trigger\n                      ? parseStackTracePrivate(Error(), 3)\n                      : null,\n                  start: performance.now(),\n                  end: -1.1,\n                  promise: null,\n                  awaited: null,\n                  previous: null\n                });\n            else if (2 === trigger.tag || 4 === trigger.tag)\n              (resource = resolveOwner()),\n                (trigger = {\n                  tag: 0,\n                  owner: resource,\n                  stack:\n                    null === resource\n                      ? parseStackTracePrivate(Error(), 3)\n                      : null,\n                  start: performance.now(),\n                  end: -1.1,\n                  promise: null,\n                  awaited: null,\n                  previous: trigger\n                });\n            pendingOperations.set(asyncId, trigger);\n          },\n          before: function (asyncId) {\n            var node = pendingOperations.get(asyncId);\n            if (void 0 !== node)\n              switch (node.tag) {\n                case 0:\n                  lastRanAwait = null;\n                  0 > node.end\n                    ? (node.end = performance.now())\n                    : ((node = {\n                        tag: 0,\n                        owner: node.owner,\n                        stack: node.stack,\n                        start: node.start,\n                        end: performance.now(),\n                        promise: node.promise,\n                        awaited: node.awaited,\n                        previous: node.previous\n                      }),\n                      pendingOperations.set(asyncId, node));\n                  break;\n                case 4:\n                  lastRanAwait = resolvePromiseOrAwaitNode(\n                    node,\n                    performance.now()\n                  );\n                  break;\n                case 2:\n                  lastRanAwait = node;\n                  break;\n                case 3:\n                  resolvePromiseOrAwaitNode(node, performance.now()).previous =\n                    lastRanAwait;\n                  lastRanAwait = null;\n                  break;\n                default:\n                  lastRanAwait = null;\n              }\n          },\n          promiseResolve: function (asyncId) {\n            var node = pendingOperations.get(asyncId);\n            if (void 0 !== node) {\n              switch (node.tag) {\n                case 4:\n                case 3:\n                  node = resolvePromiseOrAwaitNode(node, performance.now());\n                  break;\n                case 2:\n                case 1:\n                  break;\n                default:\n                  throw Error(\n                    \"A Promise should never be an IO_NODE. This is a bug in React.\"\n                  );\n              }\n              var currentAsyncId = async_hooks.executionAsyncId();\n              asyncId !== currentAsyncId &&\n                ((asyncId = pendingOperations.get(currentAsyncId)),\n                1 === node.tag\n                  ? (node.awaited = void 0 === asyncId ? null : asyncId)\n                  : void 0 !== asyncId &&\n                    ((currentAsyncId = {\n                      tag: 2,\n                      owner: node.owner,\n                      stack: node.stack,\n                      start: node.start,\n                      end: node.end,\n                      promise: node.promise,\n                      awaited: node.awaited,\n                      previous: node.previous\n                    }),\n                    (node.start = node.end),\n                    (node.end = performance.now()),\n                    (node.previous = currentAsyncId),\n                    (node.awaited = asyncId)));\n            }\n          },\n          destroy: function (asyncId) {\n            pendingOperations.delete(asyncId);\n          }\n        })\n        .enable();\n    })();\n    \"object\" === typeof console &&\n      null !== console &&\n      (patchConsole(console, \"assert\"),\n      patchConsole(console, \"debug\"),\n      patchConsole(console, \"dir\"),\n      patchConsole(console, \"dirxml\"),\n      patchConsole(console, \"error\"),\n      patchConsole(console, \"group\"),\n      patchConsole(console, \"groupCollapsed\"),\n      patchConsole(console, \"groupEnd\"),\n      patchConsole(console, \"info\"),\n      patchConsole(console, \"log\"),\n      patchConsole(console, \"table\"),\n      patchConsole(console, \"trace\"),\n      patchConsole(console, \"warn\"));\n    var ObjectPrototype$1 = Object.prototype,\n      stringify = JSON.stringify,\n      PENDING$1 = 0,\n      COMPLETED = 1,\n      ABORTED = 3,\n      ERRORED$1 = 4,\n      RENDERING = 5,\n      __PROTO__$1 = \"__proto__\",\n      OPENING = 10,\n      ABORTING = 12,\n      CLOSING = 13,\n      CLOSED = 14,\n      PRERENDER = 21,\n      currentRequest = null,\n      canEmitDebugInfo = !1,\n      serializedSize = 0,\n      MAX_ROW_SIZE = 3200,\n      modelRoot = !1,\n      CONSTRUCTOR_MARKER = Symbol(),\n      debugModelRoot = null,\n      debugNoOutline = null,\n      emptyRoot = {},\n      decoderOptions = { stream: !0 },\n      chunkCache = new Map(),\n      RESPONSE_SYMBOL = Symbol();\n    ReactPromise.prototype = Object.create(Promise.prototype);\n    ReactPromise.prototype.then = function (resolve, reject) {\n      switch (this.status) {\n        case \"resolved_model\":\n          initializeModelChunk(this);\n      }\n      switch (this.status) {\n        case \"fulfilled\":\n          if (\"function\" === typeof resolve) {\n            for (\n              var inspectedValue = this.value,\n                cycleProtection = 0,\n                visited = new Set();\n              inspectedValue instanceof ReactPromise;\n\n            ) {\n              cycleProtection++;\n              if (\n                inspectedValue === this ||\n                visited.has(inspectedValue) ||\n                1e3 < cycleProtection\n              ) {\n                \"function\" === typeof reject &&\n                  reject(Error(\"Cannot have cyclic thenables.\"));\n                return;\n              }\n              visited.add(inspectedValue);\n              if (\"fulfilled\" === inspectedValue.status)\n                inspectedValue = inspectedValue.value;\n              else break;\n            }\n            resolve(this.value);\n          }\n          break;\n        case \"pending\":\n        case \"blocked\":\n          \"function\" === typeof resolve &&\n            (null === this.value && (this.value = []),\n            this.value.push(resolve));\n          \"function\" === typeof reject &&\n            (null === this.reason && (this.reason = []),\n            this.reason.push(reject));\n          break;\n        default:\n          \"function\" === typeof reject && reject(this.reason);\n      }\n    };\n    var ObjectPrototype = Object.prototype,\n      ArrayPrototype = Array.prototype,\n      initializingHandler = null;\n    FlightIterator.prototype = {};\n    FlightIterator.prototype[ASYNC_ITERATOR] = function () {\n      return this;\n    };\n    var MAX_BIGINT_DIGITS = 300,\n      MAX_BOUND_ARGS = 1e3;\n    exports.createClientModuleProxy = function (moduleId) {\n      moduleId = registerClientReferenceImpl({}, moduleId, !1);\n      return new Proxy(moduleId, proxyHandlers$1);\n    };\n    exports.createTemporaryReferenceSet = function () {\n      return new WeakMap();\n    };\n    exports.decodeAction = function (body, serverManifest) {\n      var formData = new FormData(),\n        action = null,\n        seenActions = new Set();\n      body.forEach(function (value, key) {\n        key.startsWith(\"$ACTION_\")\n          ? key.startsWith(\"$ACTION_REF_\")\n            ? seenActions.has(key) ||\n              (seenActions.add(key),\n              (value = \"$ACTION_\" + key.slice(12) + \":\"),\n              (value = decodeBoundActionMetaData(body, serverManifest, value)),\n              (action = loadServerReference(serverManifest, value)))\n            : key.startsWith(\"$ACTION_ID_\") &&\n              !seenActions.has(key) &&\n              (seenActions.add(key),\n              (value = key.slice(11)),\n              (action = loadServerReference(serverManifest, {\n                id: value,\n                bound: null\n              })))\n          : formData.append(key, value);\n      });\n      return null === action\n        ? null\n        : action.then(function (fn) {\n            return fn.bind(null, formData);\n          });\n    };\n    exports.decodeFormState = function (actionResult, body, serverManifest) {\n      var keyPath = body.get(\"$ACTION_KEY\");\n      if (\"string\" !== typeof keyPath) return Promise.resolve(null);\n      var metaData = null;\n      body.forEach(function (value, key) {\n        key.startsWith(\"$ACTION_REF_\") &&\n          ((value = \"$ACTION_\" + key.slice(12) + \":\"),\n          (metaData = decodeBoundActionMetaData(body, serverManifest, value)));\n      });\n      if (null === metaData) return Promise.resolve(null);\n      var referenceId = metaData.id;\n      return Promise.resolve(metaData.bound).then(function (bound) {\n        return null === bound\n          ? null\n          : [actionResult, keyPath, referenceId, bound.length - 1];\n      });\n    };\n    exports.decodeReply = function (body, webpackMap, options) {\n      if (\"string\" === typeof body) {\n        var form = new FormData();\n        form.append(\"0\", body);\n        body = form;\n      }\n      body = createResponse(\n        webpackMap,\n        \"\",\n        options ? options.temporaryReferences : void 0,\n        body,\n        options ? options.arraySizeLimit : void 0\n      );\n      webpackMap = getChunk(body, 0);\n      close(body);\n      return webpackMap;\n    };\n    exports.decodeReplyFromAsyncIterable = function (\n      iterable,\n      webpackMap,\n      options\n    ) {\n      function progress(entry) {\n        if (entry.done) close(response);\n        else {\n          var _entry$value = entry.value;\n          entry = _entry$value[0];\n          _entry$value = _entry$value[1];\n          \"string\" === typeof _entry$value\n            ? resolveField(response, entry, _entry$value)\n            : response._formData.append(entry, _entry$value);\n          iterator.next().then(progress, error);\n        }\n      }\n      function error(reason) {\n        reportGlobalError(response, reason);\n        \"function\" === typeof iterator.throw &&\n          iterator.throw(reason).then(error, error);\n      }\n      var iterator = iterable[ASYNC_ITERATOR](),\n        response = createResponse(\n          webpackMap,\n          \"\",\n          options ? options.temporaryReferences : void 0,\n          void 0,\n          options ? options.arraySizeLimit : void 0\n        );\n      iterator.next().then(progress, error);\n      return getChunk(response, 0);\n    };\n    exports.decodeReplyFromBusboy = function (\n      busboyStream,\n      webpackMap,\n      options\n    ) {\n      var response = createResponse(\n          webpackMap,\n          \"\",\n          options ? options.temporaryReferences : void 0,\n          void 0,\n          options ? options.arraySizeLimit : void 0\n        ),\n        pendingFiles = 0,\n        queuedFields = [];\n      busboyStream.on(\"field\", function (name, value) {\n        if (0 < pendingFiles) queuedFields.push(name, value);\n        else\n          try {\n            resolveField(response, name, value);\n          } catch (error) {\n            busboyStream.destroy(error);\n          }\n      });\n      busboyStream.on(\"file\", function (name, value, _ref2) {\n        var filename = _ref2.filename,\n          mimeType = _ref2.mimeType;\n        if (\"base64\" === _ref2.encoding.toLowerCase())\n          busboyStream.destroy(\n            Error(\n              \"React doesn't accept base64 encoded file uploads because we don't expect form data passed from a browser to ever encode data that way. If that's the wrong assumption, we can easily fix it.\"\n            )\n          );\n        else {\n          pendingFiles++;\n          var JSCompiler_object_inline_chunks_284 = [];\n          value.on(\"data\", function (chunk) {\n            JSCompiler_object_inline_chunks_284.push(chunk);\n          });\n          value.on(\"end\", function () {\n            try {\n              var blob = new Blob(JSCompiler_object_inline_chunks_284, {\n                type: mimeType\n              });\n              response._formData.append(name, blob, filename);\n              pendingFiles--;\n              if (0 === pendingFiles) {\n                for (blob = 0; blob < queuedFields.length; blob += 2)\n                  resolveField(\n                    response,\n                    queuedFields[blob],\n                    queuedFields[blob + 1]\n                  );\n                queuedFields.length = 0;\n              }\n            } catch (error) {\n              busboyStream.destroy(error);\n            }\n          });\n        }\n      });\n      busboyStream.on(\"finish\", function () {\n        close(response);\n      });\n      busboyStream.on(\"error\", function (err) {\n        reportGlobalError(response, err);\n      });\n      return getChunk(response, 0);\n    };\n    exports.prerender = function (model, webpackMap, options) {\n      return new Promise(function (resolve, reject) {\n        var request = createPrerenderRequest(\n          model,\n          webpackMap,\n          function () {\n            var writable,\n              stream = new ReadableStream(\n                {\n                  type: \"bytes\",\n                  start: function (controller) {\n                    writable =\n                      createFakeWritableFromReadableStreamController(\n                        controller\n                      );\n                  },\n                  pull: function () {\n                    startFlowing(request, writable);\n                  },\n                  cancel: function (reason) {\n                    request.destination = null;\n                    abort(request, reason);\n                  }\n                },\n                { highWaterMark: 0 }\n              );\n            resolve({ prelude: stream });\n          },\n          reject,\n          options ? options.onError : void 0,\n          options ? options.identifierPrefix : void 0,\n          options ? options.temporaryReferences : void 0,\n          options ? options.startTime : void 0,\n          options ? options.environmentName : void 0,\n          options ? options.filterStackFrame : void 0,\n          !1\n        );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.prerenderToNodeStream = function (model, webpackMap, options) {\n      return new Promise(function (resolve, reject) {\n        var request = createPrerenderRequest(\n          model,\n          webpackMap,\n          function () {\n            var readable = new stream.Readable({\n                read: function () {\n                  startFlowing(request, writable);\n                }\n              }),\n              writable = createFakeWritableFromNodeReadable(readable);\n            resolve({ prelude: readable });\n          },\n          reject,\n          options ? options.onError : void 0,\n          options ? options.identifierPrefix : void 0,\n          options ? options.temporaryReferences : void 0,\n          options ? options.startTime : void 0,\n          options ? options.environmentName : void 0,\n          options ? options.filterStackFrame : void 0,\n          !1\n        );\n        if (options && options.signal) {\n          var signal = options.signal;\n          if (signal.aborted) abort(request, signal.reason);\n          else {\n            var listener = function () {\n              abort(request, signal.reason);\n              signal.removeEventListener(\"abort\", listener);\n            };\n            signal.addEventListener(\"abort\", listener);\n          }\n        }\n        startWork(request);\n      });\n    };\n    exports.registerClientReference = function (\n      proxyImplementation,\n      id,\n      exportName\n    ) {\n      return registerClientReferenceImpl(\n        proxyImplementation,\n        id + \"#\" + exportName,\n        !1\n      );\n    };\n    exports.registerServerReference = function (reference, id, exportName) {\n      return Object.defineProperties(reference, {\n        $$typeof: { value: SERVER_REFERENCE_TAG },\n        $$id: {\n          value: null === exportName ? id : id + \"#\" + exportName,\n          configurable: !0\n        },\n        $$bound: { value: null, configurable: !0 },\n        $$location: { value: Error(\"react-stack-top-frame\"), configurable: !0 },\n        bind: { value: bind, configurable: !0 },\n        toString: serverReferenceToString\n      });\n    };\n    exports.renderToPipeableStream = function (model, webpackMap, options) {\n      var debugChannel = options ? options.debugChannel : void 0,\n        debugChannelReadable =\n          void 0 === debugChannel ||\n          (\"function\" !== typeof debugChannel.read &&\n            \"number\" !== typeof debugChannel.readyState)\n            ? void 0\n            : debugChannel;\n      debugChannel =\n        void 0 !== debugChannel\n          ? \"function\" === typeof debugChannel.write\n            ? debugChannel\n            : \"function\" === typeof debugChannel.send\n              ? createFakeWritableFromWebSocket(debugChannel)\n              : void 0\n          : void 0;\n      var request = createRequest(\n          model,\n          webpackMap,\n          options ? options.onError : void 0,\n          options ? options.identifierPrefix : void 0,\n          options ? options.temporaryReferences : void 0,\n          options ? options.startTime : void 0,\n          options ? options.environmentName : void 0,\n          options ? options.filterStackFrame : void 0,\n          void 0 !== debugChannelReadable\n        ),\n        hasStartedFlowing = !1;\n      startWork(request);\n      void 0 !== debugChannel && startFlowingDebug(request, debugChannel);\n      void 0 !== debugChannelReadable &&\n        startReadingFromDebugChannelReadable(request, debugChannelReadable);\n      return {\n        pipe: function (destination) {\n          if (hasStartedFlowing)\n            throw Error(\n              \"React currently only supports piping to one writable stream.\"\n            );\n          hasStartedFlowing = !0;\n          startFlowing(request, destination);\n          destination.on(\"drain\", createDrainHandler(destination, request));\n          destination.on(\n            \"error\",\n            createCancelHandler(\n              request,\n              \"The destination stream errored while writing data.\"\n            )\n          );\n          if (void 0 === debugChannelReadable)\n            destination.on(\n              \"close\",\n              createCancelHandler(\n                request,\n                \"The destination stream closed early.\"\n              )\n            );\n          return destination;\n        },\n        abort: function (reason) {\n          abort(request, reason);\n        }\n      };\n    };\n    exports.renderToReadableStream = function (model, webpackMap, options) {\n      var debugChannelReadable =\n          options && options.debugChannel\n            ? options.debugChannel.readable\n            : void 0,\n        debugChannelWritable =\n          options && options.debugChannel\n            ? options.debugChannel.writable\n            : void 0,\n        request = createRequest(\n          model,\n          webpackMap,\n          options ? options.onError : void 0,\n          options ? options.identifierPrefix : void 0,\n          options ? options.temporaryReferences : void 0,\n          options ? options.startTime : void 0,\n          options ? options.environmentName : void 0,\n          options ? options.filterStackFrame : void 0,\n          void 0 !== debugChannelReadable\n        );\n      if (options && options.signal) {\n        var signal = options.signal;\n        if (signal.aborted) abort(request, signal.reason);\n        else {\n          var listener = function () {\n            abort(request, signal.reason);\n            signal.removeEventListener(\"abort\", listener);\n          };\n          signal.addEventListener(\"abort\", listener);\n        }\n      }\n      if (void 0 !== debugChannelWritable) {\n        var debugWritable;\n        new ReadableStream(\n          {\n            type: \"bytes\",\n            start: function (controller) {\n              debugWritable =\n                createFakeWritableFromReadableStreamController(controller);\n            },\n            pull: function () {\n              startFlowingDebug(request, debugWritable);\n            }\n          },\n          { highWaterMark: 0 }\n        ).pipeTo(debugChannelWritable);\n      }\n      void 0 !== debugChannelReadable &&\n        startReadingFromDebugChannelReadableStream(\n          request,\n          debugChannelReadable\n        );\n      var writable;\n      return new ReadableStream(\n        {\n          type: \"bytes\",\n          start: function (controller) {\n            writable =\n              createFakeWritableFromReadableStreamController(controller);\n            startWork(request);\n          },\n          pull: function () {\n            startFlowing(request, writable);\n          },\n          cancel: function (reason) {\n            request.destination = null;\n            abort(request, reason);\n          }\n        },\n        { highWaterMark: 0 }\n      );\n    };\n  })();\n","'use strict';\n\nvar s;\nif (process.env.NODE_ENV === 'production') {\n  s = require('./cjs/react-server-dom-webpack-server.node.production.js');\n} else {\n  s = require('./cjs/react-server-dom-webpack-server.node.development.js');\n}\n\nexports.renderToReadableStream = s.renderToReadableStream;\nexports.renderToPipeableStream = s.renderToPipeableStream;\nexports.decodeReply = s.decodeReply;\nexports.decodeReplyFromBusboy = s.decodeReplyFromBusboy;\nexports.decodeReplyFromAsyncIterable = s.decodeReplyFromAsyncIterable;\nexports.decodeAction = s.decodeAction;\nexports.decodeFormState = s.decodeFormState;\nexports.registerServerReference = s.registerServerReference;\nexports.registerClientReference = s.registerClientReference;\nexports.createClientModuleProxy = s.createClientModuleProxy;\nexports.createTemporaryReferenceSet = s.createTemporaryReferenceSet;\n","'use strict';\n\nvar s;\nif (process.env.NODE_ENV === 'production') {\n  s = require('./cjs/react-server-dom-webpack-server.node.production.js');\n} else {\n  s = require('./cjs/react-server-dom-webpack-server.node.development.js');\n}\n\nexports.prerender = s.prerender;\nexports.prerenderToNodeStream = s.prerenderToNodeStream;\n","/**\n * @license React\n * react-jsx-dev-runtime.react-server.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkKeyStringCoercion(value) {\n      try {\n        testStringCoercion(value);\n        var JSCompiler_inline_result = !1;\n      } catch (e) {\n        JSCompiler_inline_result = !0;\n      }\n      if (JSCompiler_inline_result) {\n        JSCompiler_inline_result = console;\n        var JSCompiler_temp_const = JSCompiler_inline_result.error;\n        var JSCompiler_inline_result$jscomp$0 =\n          (\"function\" === typeof Symbol &&\n            Symbol.toStringTag &&\n            value[Symbol.toStringTag]) ||\n          value.constructor.name ||\n          \"Object\";\n        JSCompiler_temp_const.call(\n          JSCompiler_inline_result,\n          \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          JSCompiler_inline_result$jscomp$0\n        );\n        return testStringCoercion(value);\n      }\n    }\n    function getTaskName(type) {\n      if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n      if (\n        \"object\" === typeof type &&\n        null !== type &&\n        type.$$typeof === REACT_LAZY_TYPE\n      )\n        return \"<...>\";\n      try {\n        var name = getComponentNameFromType(type);\n        return name ? \"<\" + name + \">\" : \"<...>\";\n      } catch (x) {\n        return \"<...>\";\n      }\n    }\n    function getOwner() {\n      var dispatcher = ReactSharedInternalsServer.A;\n      return null === dispatcher ? null : dispatcher.getOwner();\n    }\n    function UnknownOwner() {\n      return Error(\"react-stack-top-frame\");\n    }\n    function hasValidKey(config) {\n      if (hasOwnProperty.call(config, \"key\")) {\n        var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n        if (getter && getter.isReactWarning) return !1;\n      }\n      return void 0 !== config.key;\n    }\n    function defineKeyPropWarningGetter(props, displayName) {\n      function warnAboutAccessingKey() {\n        specialPropKeyWarningShown ||\n          ((specialPropKeyWarningShown = !0),\n          console.error(\n            \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n            displayName\n          ));\n      }\n      warnAboutAccessingKey.isReactWarning = !0;\n      Object.defineProperty(props, \"key\", {\n        get: warnAboutAccessingKey,\n        configurable: !0\n      });\n    }\n    function elementRefGetterWithDeprecationWarning() {\n      var componentName = getComponentNameFromType(this.type);\n      didWarnAboutElementRef[componentName] ||\n        ((didWarnAboutElementRef[componentName] = !0),\n        console.error(\n          \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n        ));\n      componentName = this.props.ref;\n      return void 0 !== componentName ? componentName : null;\n    }\n    function ReactElement(type, key, props, owner, debugStack, debugTask) {\n      var refProp = props.ref;\n      type = {\n        $$typeof: REACT_ELEMENT_TYPE,\n        type: type,\n        key: key,\n        props: props,\n        _owner: owner\n      };\n      null !== (void 0 !== refProp ? refProp : null)\n        ? Object.defineProperty(type, \"ref\", {\n            enumerable: !1,\n            get: elementRefGetterWithDeprecationWarning\n          })\n        : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n      type._store = {};\n      Object.defineProperty(type._store, \"validated\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: 0\n      });\n      Object.defineProperty(type, \"_debugInfo\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: null\n      });\n      Object.defineProperty(type, \"_debugStack\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugStack\n      });\n      Object.defineProperty(type, \"_debugTask\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugTask\n      });\n      Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n      return type;\n    }\n    function jsxDEVImpl(\n      type,\n      config,\n      maybeKey,\n      isStaticChildren,\n      debugStack,\n      debugTask\n    ) {\n      var children = config.children;\n      if (void 0 !== children)\n        if (isStaticChildren)\n          if (isArrayImpl(children)) {\n            for (\n              isStaticChildren = 0;\n              isStaticChildren < children.length;\n              isStaticChildren++\n            )\n              validateChildKeys(children[isStaticChildren]);\n            Object.freeze && Object.freeze(children);\n          } else\n            console.error(\n              \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n            );\n        else validateChildKeys(children);\n      if (hasOwnProperty.call(config, \"key\")) {\n        children = getComponentNameFromType(type);\n        var keys = Object.keys(config).filter(function (k) {\n          return \"key\" !== k;\n        });\n        isStaticChildren =\n          0 < keys.length\n            ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n            : \"{key: someKey}\";\n        didWarnAboutKeySpread[children + isStaticChildren] ||\n          ((keys =\n            0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n          console.error(\n            'A props object containing a \"key\" prop is being spread into JSX:\\n  let props = %s;\\n  <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n  let props = %s;\\n  <%s key={someKey} {...props} />',\n            isStaticChildren,\n            children,\n            keys,\n            children\n          ),\n          (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n      }\n      children = null;\n      void 0 !== maybeKey &&\n        (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n      hasValidKey(config) &&\n        (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n      if (\"key\" in config) {\n        maybeKey = {};\n        for (var propName in config)\n          \"key\" !== propName && (maybeKey[propName] = config[propName]);\n      } else maybeKey = config;\n      children &&\n        defineKeyPropWarningGetter(\n          maybeKey,\n          \"function\" === typeof type\n            ? type.displayName || type.name || \"Unknown\"\n            : type\n        );\n      return ReactElement(\n        type,\n        children,\n        maybeKey,\n        getOwner(),\n        debugStack,\n        debugTask\n      );\n    }\n    function validateChildKeys(node) {\n      isValidElement(node)\n        ? node._store && (node._store.validated = 1)\n        : \"object\" === typeof node &&\n          null !== node &&\n          node.$$typeof === REACT_LAZY_TYPE &&\n          (\"fulfilled\" === node._payload.status\n            ? isValidElement(node._payload.value) &&\n              node._payload.value._store &&\n              (node._payload.value._store.validated = 1)\n            : node._store && (node._store.validated = 1));\n    }\n    function isValidElement(object) {\n      return (\n        \"object\" === typeof object &&\n        null !== object &&\n        object.$$typeof === REACT_ELEMENT_TYPE\n      );\n    }\n    var React = require(\"next/dist/compiled/react\"),\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      ReactSharedInternalsServer =\n        React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n    if (!ReactSharedInternalsServer)\n      throw Error(\n        'The \"react\" package in this environment is not configured correctly. The \"react-server\" condition must be enabled in any environment that runs React Server Components.'\n      );\n    var hasOwnProperty = Object.prototype.hasOwnProperty,\n      isArrayImpl = Array.isArray,\n      createTask = console.createTask\n        ? console.createTask\n        : function () {\n            return null;\n          };\n    React = {\n      react_stack_bottom_frame: function (callStackForError) {\n        return callStackForError();\n      }\n    };\n    var specialPropKeyWarningShown;\n    var didWarnAboutElementRef = {};\n    var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n      React,\n      UnknownOwner\n    )();\n    var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n    var didWarnAboutKeySpread = {};\n    exports.Fragment = REACT_FRAGMENT_TYPE;\n    exports.jsx = function (type, config, maybeKey) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        !1,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n    exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        isStaticChildren,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n    exports.jsxs = function (type, config, maybeKey) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        !0,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n  })();\n","/**\n * @license React\n * react-jsx-runtime.react-server.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkKeyStringCoercion(value) {\n      try {\n        testStringCoercion(value);\n        var JSCompiler_inline_result = !1;\n      } catch (e) {\n        JSCompiler_inline_result = !0;\n      }\n      if (JSCompiler_inline_result) {\n        JSCompiler_inline_result = console;\n        var JSCompiler_temp_const = JSCompiler_inline_result.error;\n        var JSCompiler_inline_result$jscomp$0 =\n          (\"function\" === typeof Symbol &&\n            Symbol.toStringTag &&\n            value[Symbol.toStringTag]) ||\n          value.constructor.name ||\n          \"Object\";\n        JSCompiler_temp_const.call(\n          JSCompiler_inline_result,\n          \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          JSCompiler_inline_result$jscomp$0\n        );\n        return testStringCoercion(value);\n      }\n    }\n    function getTaskName(type) {\n      if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n      if (\n        \"object\" === typeof type &&\n        null !== type &&\n        type.$$typeof === REACT_LAZY_TYPE\n      )\n        return \"<...>\";\n      try {\n        var name = getComponentNameFromType(type);\n        return name ? \"<\" + name + \">\" : \"<...>\";\n      } catch (x) {\n        return \"<...>\";\n      }\n    }\n    function getOwner() {\n      var dispatcher = ReactSharedInternalsServer.A;\n      return null === dispatcher ? null : dispatcher.getOwner();\n    }\n    function UnknownOwner() {\n      return Error(\"react-stack-top-frame\");\n    }\n    function hasValidKey(config) {\n      if (hasOwnProperty.call(config, \"key\")) {\n        var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n        if (getter && getter.isReactWarning) return !1;\n      }\n      return void 0 !== config.key;\n    }\n    function defineKeyPropWarningGetter(props, displayName) {\n      function warnAboutAccessingKey() {\n        specialPropKeyWarningShown ||\n          ((specialPropKeyWarningShown = !0),\n          console.error(\n            \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n            displayName\n          ));\n      }\n      warnAboutAccessingKey.isReactWarning = !0;\n      Object.defineProperty(props, \"key\", {\n        get: warnAboutAccessingKey,\n        configurable: !0\n      });\n    }\n    function elementRefGetterWithDeprecationWarning() {\n      var componentName = getComponentNameFromType(this.type);\n      didWarnAboutElementRef[componentName] ||\n        ((didWarnAboutElementRef[componentName] = !0),\n        console.error(\n          \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n        ));\n      componentName = this.props.ref;\n      return void 0 !== componentName ? componentName : null;\n    }\n    function ReactElement(type, key, props, owner, debugStack, debugTask) {\n      var refProp = props.ref;\n      type = {\n        $$typeof: REACT_ELEMENT_TYPE,\n        type: type,\n        key: key,\n        props: props,\n        _owner: owner\n      };\n      null !== (void 0 !== refProp ? refProp : null)\n        ? Object.defineProperty(type, \"ref\", {\n            enumerable: !1,\n            get: elementRefGetterWithDeprecationWarning\n          })\n        : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n      type._store = {};\n      Object.defineProperty(type._store, \"validated\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: 0\n      });\n      Object.defineProperty(type, \"_debugInfo\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: null\n      });\n      Object.defineProperty(type, \"_debugStack\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugStack\n      });\n      Object.defineProperty(type, \"_debugTask\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugTask\n      });\n      Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n      return type;\n    }\n    function jsxDEVImpl(\n      type,\n      config,\n      maybeKey,\n      isStaticChildren,\n      debugStack,\n      debugTask\n    ) {\n      var children = config.children;\n      if (void 0 !== children)\n        if (isStaticChildren)\n          if (isArrayImpl(children)) {\n            for (\n              isStaticChildren = 0;\n              isStaticChildren < children.length;\n              isStaticChildren++\n            )\n              validateChildKeys(children[isStaticChildren]);\n            Object.freeze && Object.freeze(children);\n          } else\n            console.error(\n              \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n            );\n        else validateChildKeys(children);\n      if (hasOwnProperty.call(config, \"key\")) {\n        children = getComponentNameFromType(type);\n        var keys = Object.keys(config).filter(function (k) {\n          return \"key\" !== k;\n        });\n        isStaticChildren =\n          0 < keys.length\n            ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n            : \"{key: someKey}\";\n        didWarnAboutKeySpread[children + isStaticChildren] ||\n          ((keys =\n            0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n          console.error(\n            'A props object containing a \"key\" prop is being spread into JSX:\\n  let props = %s;\\n  <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n  let props = %s;\\n  <%s key={someKey} {...props} />',\n            isStaticChildren,\n            children,\n            keys,\n            children\n          ),\n          (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n      }\n      children = null;\n      void 0 !== maybeKey &&\n        (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n      hasValidKey(config) &&\n        (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n      if (\"key\" in config) {\n        maybeKey = {};\n        for (var propName in config)\n          \"key\" !== propName && (maybeKey[propName] = config[propName]);\n      } else maybeKey = config;\n      children &&\n        defineKeyPropWarningGetter(\n          maybeKey,\n          \"function\" === typeof type\n            ? type.displayName || type.name || \"Unknown\"\n            : type\n        );\n      return ReactElement(\n        type,\n        children,\n        maybeKey,\n        getOwner(),\n        debugStack,\n        debugTask\n      );\n    }\n    function validateChildKeys(node) {\n      isValidElement(node)\n        ? node._store && (node._store.validated = 1)\n        : \"object\" === typeof node &&\n          null !== node &&\n          node.$$typeof === REACT_LAZY_TYPE &&\n          (\"fulfilled\" === node._payload.status\n            ? isValidElement(node._payload.value) &&\n              node._payload.value._store &&\n              (node._payload.value._store.validated = 1)\n            : node._store && (node._store.validated = 1));\n    }\n    function isValidElement(object) {\n      return (\n        \"object\" === typeof object &&\n        null !== object &&\n        object.$$typeof === REACT_ELEMENT_TYPE\n      );\n    }\n    var React = require(\"next/dist/compiled/react\"),\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      ReactSharedInternalsServer =\n        React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n    if (!ReactSharedInternalsServer)\n      throw Error(\n        'The \"react\" package in this environment is not configured correctly. The \"react-server\" condition must be enabled in any environment that runs React Server Components.'\n      );\n    var hasOwnProperty = Object.prototype.hasOwnProperty,\n      isArrayImpl = Array.isArray,\n      createTask = console.createTask\n        ? console.createTask\n        : function () {\n            return null;\n          };\n    React = {\n      react_stack_bottom_frame: function (callStackForError) {\n        return callStackForError();\n      }\n    };\n    var specialPropKeyWarningShown;\n    var didWarnAboutElementRef = {};\n    var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n      React,\n      UnknownOwner\n    )();\n    var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n    var didWarnAboutKeySpread = {};\n    exports.Fragment = REACT_FRAGMENT_TYPE;\n    exports.jsx = function (type, config, maybeKey) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        !1,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n    exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        isStaticChildren,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n    exports.jsxs = function (type, config, maybeKey) {\n      var trackActualOwner =\n        1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;\n      if (trackActualOwner) {\n        var previousStackTraceLimit = Error.stackTraceLimit;\n        Error.stackTraceLimit = 10;\n        var debugStackDEV = Error(\"react-stack-top-frame\");\n        Error.stackTraceLimit = previousStackTraceLimit;\n      } else debugStackDEV = unknownOwnerDebugStack;\n      return jsxDEVImpl(\n        type,\n        config,\n        maybeKey,\n        !0,\n        debugStackDEV,\n        trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n  })();\n","/**\n * @license React\n * react.react-server.development.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\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function noop() {}\n    function getIteratorFn(maybeIterable) {\n      if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n        return null;\n      maybeIterable =\n        (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n        maybeIterable[\"@@iterator\"];\n      return \"function\" === typeof maybeIterable ? maybeIterable : null;\n    }\n    function testStringCoercion(value) {\n      return \"\" + value;\n    }\n    function checkKeyStringCoercion(value) {\n      try {\n        testStringCoercion(value);\n        var JSCompiler_inline_result = !1;\n      } catch (e) {\n        JSCompiler_inline_result = !0;\n      }\n      if (JSCompiler_inline_result) {\n        JSCompiler_inline_result = console;\n        var JSCompiler_temp_const = JSCompiler_inline_result.error;\n        var JSCompiler_inline_result$jscomp$0 =\n          (\"function\" === typeof Symbol &&\n            Symbol.toStringTag &&\n            value[Symbol.toStringTag]) ||\n          value.constructor.name ||\n          \"Object\";\n        JSCompiler_temp_const.call(\n          JSCompiler_inline_result,\n          \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n          JSCompiler_inline_result$jscomp$0\n        );\n        return testStringCoercion(value);\n      }\n    }\n    function getComponentNameFromType(type) {\n      if (null == type) return null;\n      if (\"function\" === typeof type)\n        return type.$$typeof === REACT_CLIENT_REFERENCE\n          ? null\n          : type.displayName || type.name || null;\n      if (\"string\" === typeof type) return type;\n      switch (type) {\n        case REACT_FRAGMENT_TYPE:\n          return \"Fragment\";\n        case REACT_PROFILER_TYPE:\n          return \"Profiler\";\n        case REACT_STRICT_MODE_TYPE:\n          return \"StrictMode\";\n        case REACT_SUSPENSE_TYPE:\n          return \"Suspense\";\n        case REACT_SUSPENSE_LIST_TYPE:\n          return \"SuspenseList\";\n        case REACT_ACTIVITY_TYPE:\n          return \"Activity\";\n        case REACT_VIEW_TRANSITION_TYPE:\n          return \"ViewTransition\";\n      }\n      if (\"object\" === typeof type)\n        switch (\n          (\"number\" === typeof type.tag &&\n            console.error(\n              \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n            ),\n          type.$$typeof)\n        ) {\n          case REACT_PORTAL_TYPE:\n            return \"Portal\";\n          case REACT_CONTEXT_TYPE:\n            return type.displayName || \"Context\";\n          case REACT_CONSUMER_TYPE:\n            return (type._context.displayName || \"Context\") + \".Consumer\";\n          case REACT_FORWARD_REF_TYPE:\n            var innerType = type.render;\n            type = type.displayName;\n            type ||\n              ((type = innerType.displayName || innerType.name || \"\"),\n              (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n            return type;\n          case REACT_MEMO_TYPE:\n            return (\n              (innerType = type.displayName || null),\n              null !== innerType\n                ? innerType\n                : getComponentNameFromType(type.type) || \"Memo\"\n            );\n          case REACT_LAZY_TYPE:\n            innerType = type._payload;\n            type = type._init;\n            try {\n              return getComponentNameFromType(type(innerType));\n            } catch (x) {}\n        }\n      return null;\n    }\n    function getTaskName(type) {\n      if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n      if (\n        \"object\" === typeof type &&\n        null !== type &&\n        type.$$typeof === REACT_LAZY_TYPE\n      )\n        return \"<...>\";\n      try {\n        var name = getComponentNameFromType(type);\n        return name ? \"<\" + name + \">\" : \"<...>\";\n      } catch (x) {\n        return \"<...>\";\n      }\n    }\n    function getOwner() {\n      var dispatcher = ReactSharedInternals.A;\n      return null === dispatcher ? null : dispatcher.getOwner();\n    }\n    function UnknownOwner() {\n      return Error(\"react-stack-top-frame\");\n    }\n    function hasValidKey(config) {\n      if (hasOwnProperty.call(config, \"key\")) {\n        var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n        if (getter && getter.isReactWarning) return !1;\n      }\n      return void 0 !== config.key;\n    }\n    function defineKeyPropWarningGetter(props, displayName) {\n      function warnAboutAccessingKey() {\n        specialPropKeyWarningShown ||\n          ((specialPropKeyWarningShown = !0),\n          console.error(\n            \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n            displayName\n          ));\n      }\n      warnAboutAccessingKey.isReactWarning = !0;\n      Object.defineProperty(props, \"key\", {\n        get: warnAboutAccessingKey,\n        configurable: !0\n      });\n    }\n    function elementRefGetterWithDeprecationWarning() {\n      var componentName = getComponentNameFromType(this.type);\n      didWarnAboutElementRef[componentName] ||\n        ((didWarnAboutElementRef[componentName] = !0),\n        console.error(\n          \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n        ));\n      componentName = this.props.ref;\n      return void 0 !== componentName ? componentName : null;\n    }\n    function ReactElement(type, key, props, owner, debugStack, debugTask) {\n      var refProp = props.ref;\n      type = {\n        $$typeof: REACT_ELEMENT_TYPE,\n        type: type,\n        key: key,\n        props: props,\n        _owner: owner\n      };\n      null !== (void 0 !== refProp ? refProp : null)\n        ? Object.defineProperty(type, \"ref\", {\n            enumerable: !1,\n            get: elementRefGetterWithDeprecationWarning\n          })\n        : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n      type._store = {};\n      Object.defineProperty(type._store, \"validated\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: 0\n      });\n      Object.defineProperty(type, \"_debugInfo\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: null\n      });\n      Object.defineProperty(type, \"_debugStack\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugStack\n      });\n      Object.defineProperty(type, \"_debugTask\", {\n        configurable: !1,\n        enumerable: !1,\n        writable: !0,\n        value: debugTask\n      });\n      Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n      return type;\n    }\n    function cloneAndReplaceKey(oldElement, newKey) {\n      newKey = ReactElement(\n        oldElement.type,\n        newKey,\n        oldElement.props,\n        oldElement._owner,\n        oldElement._debugStack,\n        oldElement._debugTask\n      );\n      oldElement._store &&\n        (newKey._store.validated = oldElement._store.validated);\n      return newKey;\n    }\n    function validateChildKeys(node) {\n      isValidElement(node)\n        ? node._store && (node._store.validated = 1)\n        : \"object\" === typeof node &&\n          null !== node &&\n          node.$$typeof === REACT_LAZY_TYPE &&\n          (\"fulfilled\" === node._payload.status\n            ? isValidElement(node._payload.value) &&\n              node._payload.value._store &&\n              (node._payload.value._store.validated = 1)\n            : node._store && (node._store.validated = 1));\n    }\n    function isValidElement(object) {\n      return (\n        \"object\" === typeof object &&\n        null !== object &&\n        object.$$typeof === REACT_ELEMENT_TYPE\n      );\n    }\n    function escape(key) {\n      var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n      return (\n        \"$\" +\n        key.replace(/[=:]/g, function (match) {\n          return escaperLookup[match];\n        })\n      );\n    }\n    function getElementKey(element, index) {\n      return \"object\" === typeof element &&\n        null !== element &&\n        null != element.key\n        ? (checkKeyStringCoercion(element.key), escape(\"\" + element.key))\n        : index.toString(36);\n    }\n    function resolveThenable(thenable) {\n      switch (thenable.status) {\n        case \"fulfilled\":\n          return thenable.value;\n        case \"rejected\":\n          throw thenable.reason;\n        default:\n          switch (\n            (\"string\" === typeof thenable.status\n              ? thenable.then(noop, noop)\n              : ((thenable.status = \"pending\"),\n                thenable.then(\n                  function (fulfilledValue) {\n                    \"pending\" === thenable.status &&\n                      ((thenable.status = \"fulfilled\"),\n                      (thenable.value = fulfilledValue));\n                  },\n                  function (error) {\n                    \"pending\" === thenable.status &&\n                      ((thenable.status = \"rejected\"),\n                      (thenable.reason = error));\n                  }\n                )),\n            thenable.status)\n          ) {\n            case \"fulfilled\":\n              return thenable.value;\n            case \"rejected\":\n              throw thenable.reason;\n          }\n      }\n      throw thenable;\n    }\n    function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n      var type = typeof children;\n      if (\"undefined\" === type || \"boolean\" === type) children = null;\n      var invokeCallback = !1;\n      if (null === children) invokeCallback = !0;\n      else\n        switch (type) {\n          case \"bigint\":\n          case \"string\":\n          case \"number\":\n            invokeCallback = !0;\n            break;\n          case \"object\":\n            switch (children.$$typeof) {\n              case REACT_ELEMENT_TYPE:\n              case REACT_PORTAL_TYPE:\n                invokeCallback = !0;\n                break;\n              case REACT_LAZY_TYPE:\n                return (\n                  (invokeCallback = children._init),\n                  mapIntoArray(\n                    invokeCallback(children._payload),\n                    array,\n                    escapedPrefix,\n                    nameSoFar,\n                    callback\n                  )\n                );\n            }\n        }\n      if (invokeCallback) {\n        invokeCallback = children;\n        callback = callback(invokeCallback);\n        var childKey =\n          \"\" === nameSoFar ? \".\" + getElementKey(invokeCallback, 0) : nameSoFar;\n        isArrayImpl(callback)\n          ? ((escapedPrefix = \"\"),\n            null != childKey &&\n              (escapedPrefix =\n                childKey.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n            mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n              return c;\n            }))\n          : null != callback &&\n            (isValidElement(callback) &&\n              (null != callback.key &&\n                ((invokeCallback && invokeCallback.key === callback.key) ||\n                  checkKeyStringCoercion(callback.key)),\n              (escapedPrefix = cloneAndReplaceKey(\n                callback,\n                escapedPrefix +\n                  (null == callback.key ||\n                  (invokeCallback && invokeCallback.key === callback.key)\n                    ? \"\"\n                    : (\"\" + callback.key).replace(\n                        userProvidedKeyEscapeRegex,\n                        \"$&/\"\n                      ) + \"/\") +\n                  childKey\n              )),\n              \"\" !== nameSoFar &&\n                null != invokeCallback &&\n                isValidElement(invokeCallback) &&\n                null == invokeCallback.key &&\n                invokeCallback._store &&\n                !invokeCallback._store.validated &&\n                (escapedPrefix._store.validated = 2),\n              (callback = escapedPrefix)),\n            array.push(callback));\n        return 1;\n      }\n      invokeCallback = 0;\n      childKey = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n      if (isArrayImpl(children))\n        for (var i = 0; i < children.length; i++)\n          (nameSoFar = children[i]),\n            (type = childKey + getElementKey(nameSoFar, i)),\n            (invokeCallback += mapIntoArray(\n              nameSoFar,\n              array,\n              escapedPrefix,\n              type,\n              callback\n            ));\n      else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n        for (\n          i === children.entries &&\n            (didWarnAboutMaps ||\n              console.warn(\n                \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n              ),\n            (didWarnAboutMaps = !0)),\n            children = i.call(children),\n            i = 0;\n          !(nameSoFar = children.next()).done;\n\n        )\n          (nameSoFar = nameSoFar.value),\n            (type = childKey + getElementKey(nameSoFar, i++)),\n            (invokeCallback += mapIntoArray(\n              nameSoFar,\n              array,\n              escapedPrefix,\n              type,\n              callback\n            ));\n      else if (\"object\" === type) {\n        if (\"function\" === typeof children.then)\n          return mapIntoArray(\n            resolveThenable(children),\n            array,\n            escapedPrefix,\n            nameSoFar,\n            callback\n          );\n        array = String(children);\n        throw Error(\n          \"Objects are not valid as a React child (found: \" +\n            (\"[object Object]\" === array\n              ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n              : array) +\n            \"). If you meant to render a collection of children, use an array instead.\"\n        );\n      }\n      return invokeCallback;\n    }\n    function mapChildren(children, func, context) {\n      if (null == children) return children;\n      var result = [],\n        count = 0;\n      mapIntoArray(children, result, \"\", \"\", function (child) {\n        return func.call(context, child, count++);\n      });\n      return result;\n    }\n    function resolveDispatcher() {\n      var dispatcher = ReactSharedInternals.H;\n      null === dispatcher &&\n        console.error(\n          \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n        );\n      return dispatcher;\n    }\n    function lazyInitializer(payload) {\n      if (-1 === payload._status) {\n        var resolveDebugValue = null,\n          rejectDebugValue = null,\n          ioInfo = payload._ioInfo;\n        null != ioInfo &&\n          ((ioInfo.start = ioInfo.end = performance.now()),\n          (ioInfo.value = new Promise(function (resolve, reject) {\n            resolveDebugValue = resolve;\n            rejectDebugValue = reject;\n          })));\n        ioInfo = payload._result;\n        var thenable = ioInfo();\n        thenable.then(\n          function (moduleObject) {\n            if (0 === payload._status || -1 === payload._status) {\n              payload._status = 1;\n              payload._result = moduleObject;\n              var _ioInfo = payload._ioInfo;\n              if (null != _ioInfo) {\n                _ioInfo.end = performance.now();\n                var debugValue =\n                  null == moduleObject ? void 0 : moduleObject.default;\n                resolveDebugValue(debugValue);\n                _ioInfo.value.status = \"fulfilled\";\n                _ioInfo.value.value = debugValue;\n              }\n              void 0 === thenable.status &&\n                ((thenable.status = \"fulfilled\"),\n                (thenable.value = moduleObject));\n            }\n          },\n          function (error) {\n            if (0 === payload._status || -1 === payload._status) {\n              payload._status = 2;\n              payload._result = error;\n              var _ioInfo2 = payload._ioInfo;\n              null != _ioInfo2 &&\n                ((_ioInfo2.end = performance.now()),\n                _ioInfo2.value.then(noop, noop),\n                rejectDebugValue(error),\n                (_ioInfo2.value.status = \"rejected\"),\n                (_ioInfo2.value.reason = error));\n              void 0 === thenable.status &&\n                ((thenable.status = \"rejected\"), (thenable.reason = error));\n            }\n          }\n        );\n        ioInfo = payload._ioInfo;\n        if (null != ioInfo) {\n          var displayName = thenable.displayName;\n          \"string\" === typeof displayName && (ioInfo.name = displayName);\n        }\n        -1 === payload._status &&\n          ((payload._status = 0), (payload._result = thenable));\n      }\n      if (1 === payload._status)\n        return (\n          (ioInfo = payload._result),\n          void 0 === ioInfo &&\n            console.error(\n              \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n  const MyComponent = lazy(() => import('./MyComponent'))\\n\\nDid you accidentally put curly braces around the import?\",\n              ioInfo\n            ),\n          \"default\" in ioInfo ||\n            console.error(\n              \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n  const MyComponent = lazy(() => import('./MyComponent'))\",\n              ioInfo\n            ),\n          ioInfo.default\n        );\n      throw payload._result;\n    }\n    function createCacheRoot() {\n      return new WeakMap();\n    }\n    function createCacheNode() {\n      return { s: 0, v: void 0, o: null, p: null };\n    }\n    var ReactSharedInternals = {\n        H: null,\n        A: null,\n        getCurrentStack: null,\n        recentlyCreatedOwnerStacks: 0\n      },\n      isArrayImpl = Array.isArray,\n      REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n      REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n      REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n      REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n      REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n      REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n      REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n      REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n      REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n      REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n      REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n      REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n      REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n      REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n      MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n      REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n      hasOwnProperty = Object.prototype.hasOwnProperty,\n      assign = Object.assign,\n      createTask = console.createTask\n        ? console.createTask\n        : function () {\n            return null;\n          },\n      createFakeCallStack = {\n        react_stack_bottom_frame: function (callStackForError) {\n          return callStackForError();\n        }\n      },\n      specialPropKeyWarningShown,\n      didWarnAboutOldJSXRuntime;\n    var didWarnAboutElementRef = {};\n    var unknownOwnerDebugStack =\n      createFakeCallStack.react_stack_bottom_frame.bind(\n        createFakeCallStack,\n        UnknownOwner\n      )();\n    var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n    var didWarnAboutMaps = !1,\n      userProvidedKeyEscapeRegex = /\\/+/g;\n    createFakeCallStack = {\n      map: mapChildren,\n      forEach: function (children, forEachFunc, forEachContext) {\n        mapChildren(\n          children,\n          function () {\n            forEachFunc.apply(this, arguments);\n          },\n          forEachContext\n        );\n      },\n      count: function (children) {\n        var n = 0;\n        mapChildren(children, function () {\n          n++;\n        });\n        return n;\n      },\n      toArray: function (children) {\n        return (\n          mapChildren(children, function (child) {\n            return child;\n          }) || []\n        );\n      },\n      only: function (children) {\n        if (!isValidElement(children))\n          throw Error(\n            \"React.Children.only expected to receive a single React element child.\"\n          );\n        return children;\n      }\n    };\n    exports.Activity = REACT_ACTIVITY_TYPE;\n    exports.Children = createFakeCallStack;\n    exports.Fragment = REACT_FRAGMENT_TYPE;\n    exports.Profiler = REACT_PROFILER_TYPE;\n    exports.StrictMode = REACT_STRICT_MODE_TYPE;\n    exports.Suspense = REACT_SUSPENSE_TYPE;\n    exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;\n    exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n      ReactSharedInternals;\n    exports.cache = function (fn) {\n      return function () {\n        var dispatcher = ReactSharedInternals.A;\n        if (!dispatcher) return fn.apply(null, arguments);\n        var fnMap = dispatcher.getCacheForType(createCacheRoot);\n        dispatcher = fnMap.get(fn);\n        void 0 === dispatcher &&\n          ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher));\n        fnMap = 0;\n        for (var l = arguments.length; fnMap < l; fnMap++) {\n          var arg = arguments[fnMap];\n          if (\n            \"function\" === typeof arg ||\n            (\"object\" === typeof arg && null !== arg)\n          ) {\n            var objectCache = dispatcher.o;\n            null === objectCache &&\n              (dispatcher.o = objectCache = new WeakMap());\n            dispatcher = objectCache.get(arg);\n            void 0 === dispatcher &&\n              ((dispatcher = createCacheNode()),\n              objectCache.set(arg, dispatcher));\n          } else\n            (objectCache = dispatcher.p),\n              null === objectCache && (dispatcher.p = objectCache = new Map()),\n              (dispatcher = objectCache.get(arg)),\n              void 0 === dispatcher &&\n                ((dispatcher = createCacheNode()),\n                objectCache.set(arg, dispatcher));\n        }\n        if (1 === dispatcher.s) return dispatcher.v;\n        if (2 === dispatcher.s) throw dispatcher.v;\n        try {\n          var result = fn.apply(null, arguments);\n          fnMap = dispatcher;\n          fnMap.s = 1;\n          return (fnMap.v = result);\n        } catch (error) {\n          throw (\n            ((result = dispatcher), (result.s = 2), (result.v = error), error)\n          );\n        }\n      };\n    };\n    exports.cacheSignal = function () {\n      var dispatcher = ReactSharedInternals.A;\n      return dispatcher ? dispatcher.cacheSignal() : null;\n    };\n    exports.captureOwnerStack = function () {\n      var getCurrentStack = ReactSharedInternals.getCurrentStack;\n      return null === getCurrentStack ? null : getCurrentStack();\n    };\n    exports.cloneElement = function (element, config, children) {\n      if (null === element || void 0 === element)\n        throw Error(\n          \"The argument must be a React element, but you passed \" +\n            element +\n            \".\"\n        );\n      var props = assign({}, element.props),\n        key = element.key,\n        owner = element._owner;\n      if (null != config) {\n        var JSCompiler_inline_result;\n        a: {\n          if (\n            hasOwnProperty.call(config, \"ref\") &&\n            (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(\n              config,\n              \"ref\"\n            ).get) &&\n            JSCompiler_inline_result.isReactWarning\n          ) {\n            JSCompiler_inline_result = !1;\n            break a;\n          }\n          JSCompiler_inline_result = void 0 !== config.ref;\n        }\n        JSCompiler_inline_result && (owner = getOwner());\n        hasValidKey(config) &&\n          (checkKeyStringCoercion(config.key), (key = \"\" + config.key));\n        for (propName in config)\n          !hasOwnProperty.call(config, propName) ||\n            \"key\" === propName ||\n            \"__self\" === propName ||\n            \"__source\" === propName ||\n            (\"ref\" === propName && void 0 === config.ref) ||\n            (props[propName] = config[propName]);\n      }\n      var propName = arguments.length - 2;\n      if (1 === propName) props.children = children;\n      else if (1 < propName) {\n        JSCompiler_inline_result = Array(propName);\n        for (var i = 0; i < propName; i++)\n          JSCompiler_inline_result[i] = arguments[i + 2];\n        props.children = JSCompiler_inline_result;\n      }\n      props = ReactElement(\n        element.type,\n        key,\n        props,\n        owner,\n        element._debugStack,\n        element._debugTask\n      );\n      for (key = 2; key < arguments.length; key++)\n        validateChildKeys(arguments[key]);\n      return props;\n    };\n    exports.createElement = function (type, config, children) {\n      for (var i = 2; i < arguments.length; i++)\n        validateChildKeys(arguments[i]);\n      var propName;\n      i = {};\n      var key = null;\n      if (null != config)\n        for (propName in (didWarnAboutOldJSXRuntime ||\n          !(\"__self\" in config) ||\n          \"key\" in config ||\n          ((didWarnAboutOldJSXRuntime = !0),\n          console.warn(\n            \"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform\"\n          )),\n        hasValidKey(config) &&\n          (checkKeyStringCoercion(config.key), (key = \"\" + config.key)),\n        config))\n          hasOwnProperty.call(config, propName) &&\n            \"key\" !== propName &&\n            \"__self\" !== propName &&\n            \"__source\" !== propName &&\n            (i[propName] = config[propName]);\n      var childrenLength = arguments.length - 2;\n      if (1 === childrenLength) i.children = children;\n      else if (1 < childrenLength) {\n        for (\n          var childArray = Array(childrenLength), _i = 0;\n          _i < childrenLength;\n          _i++\n        )\n          childArray[_i] = arguments[_i + 2];\n        Object.freeze && Object.freeze(childArray);\n        i.children = childArray;\n      }\n      if (type && type.defaultProps)\n        for (propName in ((childrenLength = type.defaultProps), childrenLength))\n          void 0 === i[propName] && (i[propName] = childrenLength[propName]);\n      key &&\n        defineKeyPropWarningGetter(\n          i,\n          \"function\" === typeof type\n            ? type.displayName || type.name || \"Unknown\"\n            : type\n        );\n      (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++)\n        ? ((childArray = Error.stackTraceLimit),\n          (Error.stackTraceLimit = 10),\n          (childrenLength = Error(\"react-stack-top-frame\")),\n          (Error.stackTraceLimit = childArray))\n        : (childrenLength = unknownOwnerDebugStack);\n      return ReactElement(\n        type,\n        key,\n        i,\n        getOwner(),\n        childrenLength,\n        propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n      );\n    };\n    exports.createRef = function () {\n      var refObject = { current: null };\n      Object.seal(refObject);\n      return refObject;\n    };\n    exports.forwardRef = function (render) {\n      null != render && render.$$typeof === REACT_MEMO_TYPE\n        ? console.error(\n            \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).\"\n          )\n        : \"function\" !== typeof render\n          ? console.error(\n              \"forwardRef requires a render function but was given %s.\",\n              null === render ? \"null\" : typeof render\n            )\n          : 0 !== render.length &&\n            2 !== render.length &&\n            console.error(\n              \"forwardRef render functions accept exactly two parameters: props and ref. %s\",\n              1 === render.length\n                ? \"Did you forget to use the ref parameter?\"\n                : \"Any additional parameter will be undefined.\"\n            );\n      null != render &&\n        null != render.defaultProps &&\n        console.error(\n          \"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?\"\n        );\n      var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },\n        ownName;\n      Object.defineProperty(elementType, \"displayName\", {\n        enumerable: !1,\n        configurable: !0,\n        get: function () {\n          return ownName;\n        },\n        set: function (name) {\n          ownName = name;\n          render.name ||\n            render.displayName ||\n            (Object.defineProperty(render, \"name\", { value: name }),\n            (render.displayName = name));\n        }\n      });\n      return elementType;\n    };\n    exports.isValidElement = isValidElement;\n    exports.lazy = function (ctor) {\n      ctor = { _status: -1, _result: ctor };\n      var lazyType = {\n          $$typeof: REACT_LAZY_TYPE,\n          _payload: ctor,\n          _init: lazyInitializer\n        },\n        ioInfo = {\n          name: \"lazy\",\n          start: -1,\n          end: -1,\n          value: null,\n          owner: null,\n          debugStack: Error(\"react-stack-top-frame\"),\n          debugTask: console.createTask ? console.createTask(\"lazy()\") : null\n        };\n      ctor._ioInfo = ioInfo;\n      lazyType._debugInfo = [{ awaited: ioInfo }];\n      return lazyType;\n    };\n    exports.memo = function (type, compare) {\n      null == type &&\n        console.error(\n          \"memo: The first argument must be a component. Instead received: %s\",\n          null === type ? \"null\" : typeof type\n        );\n      compare = {\n        $$typeof: REACT_MEMO_TYPE,\n        type: type,\n        compare: void 0 === compare ? null : compare\n      };\n      var ownName;\n      Object.defineProperty(compare, \"displayName\", {\n        enumerable: !1,\n        configurable: !0,\n        get: function () {\n          return ownName;\n        },\n        set: function (name) {\n          ownName = name;\n          type.name ||\n            type.displayName ||\n            (Object.defineProperty(type, \"name\", { value: name }),\n            (type.displayName = name));\n        }\n      });\n      return compare;\n    };\n    exports.use = function (usable) {\n      return resolveDispatcher().use(usable);\n    };\n    exports.useCallback = function (callback, deps) {\n      return resolveDispatcher().useCallback(callback, deps);\n    };\n    exports.useDebugValue = function (value, formatterFn) {\n      return resolveDispatcher().useDebugValue(value, formatterFn);\n    };\n    exports.useId = function () {\n      return resolveDispatcher().useId();\n    };\n    exports.useMemo = function (create, deps) {\n      return resolveDispatcher().useMemo(create, deps);\n    };\n    exports.version = \"19.3.0-canary-3f0b9e61-20260317\";\n  })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-jsx-dev-runtime.react-server.production.js');\n} else {\n  module.exports = require('./cjs/react-jsx-dev-runtime.react-server.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-jsx-runtime.react-server.production.js');\n} else {\n  module.exports = require('./cjs/react-jsx-runtime.react-server.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react.react-server.production.js');\n} else {\n  module.exports = require('./cjs/react.react-server.development.js');\n}\n","import * as React from 'react'\nimport * as ReactDOM from 'react-dom'\nimport * as ReactJsxDevRuntime from 'react/jsx-dev-runtime'\nimport * as ReactJsxRuntime from 'react/jsx-runtime'\nimport * as ReactCompilerRuntime from 'react/compiler-runtime'\n\nfunction getAltProxyForBindingsDEV(\n  type: 'Turbopack' | 'Webpack',\n  pkg:\n    | 'react-server-dom-turbopack/server'\n    | 'react-server-dom-turbopack/static'\n    | 'react-server-dom-webpack/server'\n    | 'react-server-dom-webpack/static'\n) {\n  if (process.env.NODE_ENV === 'development') {\n    const altType = type === 'Turbopack' ? 'Webpack' : 'Turbopack'\n    const altPkg = pkg.replace(new RegExp(type, 'gi'), altType.toLowerCase())\n\n    return new Proxy(\n      {},\n      {\n        get(_, prop: string) {\n          throw new Error(\n            `Expected to use ${type} bindings (${pkg}) for React but the current process is referencing '${prop}' from the ${altType} bindings (${altPkg}). This is likely a bug in our integration of the Next.js server runtime.`\n          )\n        },\n      }\n    )\n  }\n}\n\nlet ReactServerDOMTurbopackServer, ReactServerDOMWebpackServer\nlet ReactServerDOMTurbopackStatic, ReactServerDOMWebpackStatic\n\nif (process.env.TURBOPACK) {\n  ReactServerDOMTurbopackServer =\n    // @ts-expect-error -- TODO: Add types\n    // eslint-disable-next-line import/no-extraneous-dependencies\n    require('react-server-dom-turbopack/server') as typeof import('react-server-dom-turbopack/server')\n  if (process.env.NODE_ENV === 'development') {\n    ReactServerDOMWebpackServer = getAltProxyForBindingsDEV(\n      'Turbopack',\n      'react-server-dom-turbopack/server'\n    )\n  }\n  ReactServerDOMTurbopackStatic =\n    // @ts-expect-error -- TODO: Add types\n    // eslint-disable-next-line import/no-extraneous-dependencies\n    require('react-server-dom-turbopack/static') as typeof import('react-server-dom-turbopack/static')\n  if (process.env.NODE_ENV === 'development') {\n    ReactServerDOMWebpackStatic = getAltProxyForBindingsDEV(\n      'Turbopack',\n      'react-server-dom-turbopack/static'\n    )\n  }\n} else {\n  ReactServerDOMWebpackServer =\n    // eslint-disable-next-line import/no-extraneous-dependencies\n    require('react-server-dom-webpack/server') as typeof import('react-server-dom-webpack/server')\n  if (process.env.NODE_ENV === 'development') {\n    ReactServerDOMTurbopackServer = getAltProxyForBindingsDEV(\n      'Webpack',\n      'react-server-dom-webpack/server'\n    )\n  }\n  ReactServerDOMWebpackStatic =\n    // eslint-disable-next-line import/no-extraneous-dependencies\n    require('react-server-dom-webpack/static') as typeof import('react-server-dom-webpack/static')\n  if (process.env.NODE_ENV === 'development') {\n    ReactServerDOMTurbopackStatic = getAltProxyForBindingsDEV(\n      'Webpack',\n      'react-server-dom-webpack/static'\n    )\n  }\n}\n\nexport {\n  React,\n  ReactJsxDevRuntime,\n  ReactJsxRuntime,\n  ReactCompilerRuntime,\n  ReactDOM,\n  ReactServerDOMTurbopackServer,\n  ReactServerDOMTurbopackStatic,\n  ReactServerDOMWebpackServer,\n  ReactServerDOMWebpackStatic,\n}\n","(()=>{var e={113:e=>{\"use strict\";e.exports=require(\"crypto\")},660:(e,r,t)=>{let l=t(113);let{urlAlphabet:a}=t(591);const n=128;let _,u;let fillPool=e=>{if(!_||_.length<e){_=Buffer.allocUnsafe(e*n);l.randomFillSync(_);u=0}else if(u+e>_.length){l.randomFillSync(_);u=0}u+=e};let random=e=>{fillPool(e-=0);return _.subarray(u-e,u)};let customRandom=(e,r,t)=>{let l=(2<<31-Math.clz32(e.length-1|1))-1;let a=Math.ceil(1.6*l*r/e.length);return()=>{let n=\"\";while(true){let _=t(a);let u=a;while(u--){n+=e[_[u]&l]||\"\";if(n.length===r)return n}}}};let customAlphabet=(e,r)=>customRandom(e,r,random);let nanoid=(e=21)=>{fillPool(e-=0);let r=\"\";for(let t=u-e;t<u;t++){r+=a[_[t]&63]}return r};e.exports={nanoid:nanoid,customAlphabet:customAlphabet,customRandom:customRandom,urlAlphabet:a,random:random}},591:e=>{let r=\"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\";e.exports={urlAlphabet:r}}};var r={};function __nccwpck_require__(t){var l=r[t];if(l!==undefined){return l.exports}var a=r[t]={exports:{}};var n=true;try{e[t](a,a.exports,__nccwpck_require__);n=false}finally{if(n)delete r[t]}return a.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var t=__nccwpck_require__(660);module.exports=t})();","(()=>{var e={318:function(e,t){(function(e,n){true?n(t):0})(this,(function(e){\"use strict\";class StructError extends TypeError{constructor(e,t){let n;const{message:r,explanation:i,...c}=e;const{path:o}=e;const a=o.length===0?r:`At path: ${o.join(\".\")} -- ${r}`;super(i??a);if(i!=null)this.cause=a;Object.assign(this,c);this.name=this.constructor.name;this.failures=()=>n??(n=[e,...t()])}}function isIterable(e){return isObject(e)&&typeof e[Symbol.iterator]===\"function\"}function isObject(e){return typeof e===\"object\"&&e!=null}function isPlainObject(e){if(Object.prototype.toString.call(e)!==\"[object Object]\"){return false}const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function print(e){if(typeof e===\"symbol\"){return e.toString()}return typeof e===\"string\"?JSON.stringify(e):`${e}`}function shiftIterator(e){const{done:t,value:n}=e.next();return t?undefined:n}function toFailure(e,t,n,r){if(e===true){return}else if(e===false){e={}}else if(typeof e===\"string\"){e={message:e}}const{path:i,branch:c}=t;const{type:o}=n;const{refinement:a,message:s=`Expected a value of type \\`${o}\\`${a?` with refinement \\`${a}\\``:\"\"}, but received: \\`${print(r)}\\``}=e;return{value:r,type:o,refinement:a,key:i[i.length-1],path:i,branch:c,...e,message:s}}function*toFailures(e,t,n,r){if(!isIterable(e)){e=[e]}for(const i of e){const e=toFailure(i,t,n,r);if(e){yield e}}}function*run(e,t,n={}){const{path:r=[],branch:i=[e],coerce:c=false,mask:o=false}=n;const a={path:r,branch:i};if(c){e=t.coercer(e,a);if(o&&t.type!==\"type\"&&isObject(t.schema)&&isObject(e)&&!Array.isArray(e)){for(const n in e){if(t.schema[n]===undefined){delete e[n]}}}}let s=\"valid\";for(const r of t.validator(e,a)){r.explanation=n.message;s=\"not_valid\";yield[r,undefined]}for(let[u,f,l]of t.entries(e,a)){const t=run(f,l,{path:u===undefined?r:[...r,u],branch:u===undefined?i:[...i,f],coerce:c,mask:o,message:n.message});for(const n of t){if(n[0]){s=n[0].refinement!=null?\"not_refined\":\"not_valid\";yield[n[0],undefined]}else if(c){f=n[1];if(u===undefined){e=f}else if(e instanceof Map){e.set(u,f)}else if(e instanceof Set){e.add(f)}else if(isObject(e)){if(f!==undefined||u in e)e[u]=f}}}}if(s!==\"not_valid\"){for(const r of t.refiner(e,a)){r.explanation=n.message;s=\"not_refined\";yield[r,undefined]}}if(s===\"valid\"){yield[undefined,e]}}class Struct{constructor(e){const{type:t,schema:n,validator:r,refiner:i,coercer:c=(e=>e),entries:o=function*(){}}=e;this.type=t;this.schema=n;this.entries=o;this.coercer=c;if(r){this.validator=(e,t)=>{const n=r(e,t);return toFailures(n,t,this,e)}}else{this.validator=()=>[]}if(i){this.refiner=(e,t)=>{const n=i(e,t);return toFailures(n,t,this,e)}}else{this.refiner=()=>[]}}assert(e,t){return assert(e,this,t)}create(e,t){return create(e,this,t)}is(e){return is(e,this)}mask(e,t){return mask(e,this,t)}validate(e,t={}){return validate(e,this,t)}}function assert(e,t,n){const r=validate(e,t,{message:n});if(r[0]){throw r[0]}}function create(e,t,n){const r=validate(e,t,{coerce:true,message:n});if(r[0]){throw r[0]}else{return r[1]}}function mask(e,t,n){const r=validate(e,t,{coerce:true,mask:true,message:n});if(r[0]){throw r[0]}else{return r[1]}}function is(e,t){const n=validate(e,t);return!n[0]}function validate(e,t,n={}){const r=run(e,t,n);const i=shiftIterator(r);if(i[0]){const e=new StructError(i[0],(function*(){for(const e of r){if(e[0]){yield e[0]}}}));return[e,undefined]}else{const e=i[1];return[undefined,e]}}function assign(...e){const t=e[0].type===\"type\";const n=e.map((e=>e.schema));const r=Object.assign({},...n);return t?type(r):object(r)}function define(e,t){return new Struct({type:e,schema:null,validator:t})}function deprecated(e,t){return new Struct({...e,refiner:(t,n)=>t===undefined||e.refiner(t,n),validator(n,r){if(n===undefined){return true}else{t(n,r);return e.validator(n,r)}}})}function dynamic(e){return new Struct({type:\"dynamic\",schema:null,*entries(t,n){const r=e(t,n);yield*r.entries(t,n)},validator(t,n){const r=e(t,n);return r.validator(t,n)},coercer(t,n){const r=e(t,n);return r.coercer(t,n)},refiner(t,n){const r=e(t,n);return r.refiner(t,n)}})}function lazy(e){let t;return new Struct({type:\"lazy\",schema:null,*entries(n,r){t??(t=e());yield*t.entries(n,r)},validator(n,r){t??(t=e());return t.validator(n,r)},coercer(n,r){t??(t=e());return t.coercer(n,r)},refiner(n,r){t??(t=e());return t.refiner(n,r)}})}function omit(e,t){const{schema:n}=e;const r={...n};for(const e of t){delete r[e]}switch(e.type){case\"type\":return type(r);default:return object(r)}}function partial(e){const t=e instanceof Struct?{...e.schema}:{...e};for(const e in t){t[e]=optional(t[e])}return object(t)}function pick(e,t){const{schema:n}=e;const r={};for(const e of t){r[e]=n[e]}return object(r)}function struct(e,t){console.warn(\"superstruct@0.11 - The `struct` helper has been renamed to `define`.\");return define(e,t)}function any(){return define(\"any\",(()=>true))}function array(e){return new Struct({type:\"array\",schema:e,*entries(t){if(e&&Array.isArray(t)){for(const[n,r]of t.entries()){yield[n,r,e]}}},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${print(e)}`}})}function bigint(){return define(\"bigint\",(e=>typeof e===\"bigint\"))}function boolean(){return define(\"boolean\",(e=>typeof e===\"boolean\"))}function date(){return define(\"date\",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \\`Date\\` object, but received: ${print(e)}`))}function enums(e){const t={};const n=e.map((e=>print(e))).join();for(const n of e){t[n]=n}return new Struct({type:\"enums\",schema:t,validator(t){return e.includes(t)||`Expected one of \\`${n}\\`, but received: ${print(t)}`}})}function func(){return define(\"func\",(e=>typeof e===\"function\"||`Expected a function, but received: ${print(e)}`))}function instance(e){return define(\"instance\",(t=>t instanceof e||`Expected a \\`${e.name}\\` instance, but received: ${print(t)}`))}function integer(){return define(\"integer\",(e=>typeof e===\"number\"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${print(e)}`))}function intersection(e){return new Struct({type:\"intersection\",schema:null,*entries(t,n){for(const r of e){yield*r.entries(t,n)}},*validator(t,n){for(const r of e){yield*r.validator(t,n)}},*refiner(t,n){for(const r of e){yield*r.refiner(t,n)}}})}function literal(e){const t=print(e);const n=typeof e;return new Struct({type:\"literal\",schema:n===\"string\"||n===\"number\"||n===\"boolean\"?e:null,validator(n){return n===e||`Expected the literal \\`${t}\\`, but received: ${print(n)}`}})}function map(e,t){return new Struct({type:\"map\",schema:null,*entries(n){if(e&&t&&n instanceof Map){for(const[r,i]of n.entries()){yield[r,r,e];yield[r,i,t]}}},coercer(e){return e instanceof Map?new Map(e):e},validator(e){return e instanceof Map||`Expected a \\`Map\\` object, but received: ${print(e)}`}})}function never(){return define(\"never\",(()=>false))}function nullable(e){return new Struct({...e,validator:(t,n)=>t===null||e.validator(t,n),refiner:(t,n)=>t===null||e.refiner(t,n)})}function number(){return define(\"number\",(e=>typeof e===\"number\"&&!isNaN(e)||`Expected a number, but received: ${print(e)}`))}function object(e){const t=e?Object.keys(e):[];const n=never();return new Struct({type:\"object\",schema:e?e:null,*entries(r){if(e&&isObject(r)){const i=new Set(Object.keys(r));for(const n of t){i.delete(n);yield[n,r[n],e[n]]}for(const e of i){yield[e,r[e],n]}}},validator(e){return isObject(e)||`Expected an object, but received: ${print(e)}`},coercer(e){return isObject(e)?{...e}:e}})}function optional(e){return new Struct({...e,validator:(t,n)=>t===undefined||e.validator(t,n),refiner:(t,n)=>t===undefined||e.refiner(t,n)})}function record(e,t){return new Struct({type:\"record\",schema:null,*entries(n){if(isObject(n)){for(const r in n){const i=n[r];yield[r,r,e];yield[r,i,t]}}},validator(e){return isObject(e)||`Expected an object, but received: ${print(e)}`}})}function regexp(){return define(\"regexp\",(e=>e instanceof RegExp))}function set(e){return new Struct({type:\"set\",schema:null,*entries(t){if(e&&t instanceof Set){for(const n of t){yield[n,n,e]}}},coercer(e){return e instanceof Set?new Set(e):e},validator(e){return e instanceof Set||`Expected a \\`Set\\` object, but received: ${print(e)}`}})}function string(){return define(\"string\",(e=>typeof e===\"string\"||`Expected a string, but received: ${print(e)}`))}function tuple(e){const t=never();return new Struct({type:\"tuple\",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let i=0;i<r;i++){yield[i,n[i],e[i]||t]}}},validator(e){return Array.isArray(e)||`Expected an array, but received: ${print(e)}`}})}function type(e){const t=Object.keys(e);return new Struct({type:\"type\",schema:e,*entries(n){if(isObject(n)){for(const r of t){yield[r,n[r],e[r]]}}},validator(e){return isObject(e)||`Expected an object, but received: ${print(e)}`},coercer(e){return isObject(e)?{...e}:e}})}function union(e){const t=e.map((e=>e.type)).join(\" | \");return new Struct({type:\"union\",schema:null,coercer(t){for(const n of e){const[e,r]=n.validate(t,{coerce:true});if(!e){return r}}return t},validator(n,r){const i=[];for(const t of e){const[...e]=run(n,t,r);const[c]=e;if(!c[0]){return[]}else{for(const[t]of e){if(t){i.push(t)}}}}return[`Expected the value to satisfy a union of \\`${t}\\`, but received: ${print(n)}`,...i]}})}function unknown(){return define(\"unknown\",(()=>true))}function coerce(e,t,n){return new Struct({...e,coercer:(r,i)=>is(r,t)?e.coercer(n(r,i),i):e.coercer(r,i)})}function defaulted(e,t,n={}){return coerce(e,unknown(),(e=>{const r=typeof t===\"function\"?t():t;if(e===undefined){return r}if(!n.strict&&isPlainObject(e)&&isPlainObject(r)){const t={...e};let n=false;for(const e in r){if(t[e]===undefined){t[e]=r[e];n=true}}if(n){return t}}return e}))}function trimmed(e){return coerce(e,string(),(e=>e.trim()))}function empty(e){return refine(e,\"empty\",(t=>{const n=getSize(t);return n===0||`Expected an empty ${e.type} but received one with a size of \\`${n}\\``}))}function getSize(e){if(e instanceof Map||e instanceof Set){return e.size}else{return e.length}}function max(e,t,n={}){const{exclusive:r}=n;return refine(e,\"max\",(n=>r?n<t:n<=t||`Expected a ${e.type} less than ${r?\"\":\"or equal to \"}${t} but received \\`${n}\\``))}function min(e,t,n={}){const{exclusive:r}=n;return refine(e,\"min\",(n=>r?n>t:n>=t||`Expected a ${e.type} greater than ${r?\"\":\"or equal to \"}${t} but received \\`${n}\\``))}function nonempty(e){return refine(e,\"nonempty\",(t=>{const n=getSize(t);return n>0||`Expected a nonempty ${e.type} but received an empty one`}))}function pattern(e,t){return refine(e,\"pattern\",(n=>t.test(n)||`Expected a ${e.type} matching \\`/${t.source}/\\` but received \"${n}\"`))}function size(e,t,n=t){const r=`Expected a ${e.type}`;const i=t===n?`of \\`${t}\\``:`between \\`${t}\\` and \\`${n}\\``;return refine(e,\"size\",(e=>{if(typeof e===\"number\"||e instanceof Date){return t<=e&&e<=n||`${r} ${i} but received \\`${e}\\``}else if(e instanceof Map||e instanceof Set){const{size:c}=e;return t<=c&&c<=n||`${r} with a size ${i} but received one with a size of \\`${c}\\``}else{const{length:c}=e;return t<=c&&c<=n||`${r} with a length ${i} but received one with a length of \\`${c}\\``}}))}function refine(e,t,n){return new Struct({...e,*refiner(r,i){yield*e.refiner(r,i);const c=n(r,i);const o=toFailures(c,i,e,r);for(const e of o){yield{...e,refinement:t}}}})}e.Struct=Struct;e.StructError=StructError;e.any=any;e.array=array;e.assert=assert;e.assign=assign;e.bigint=bigint;e.boolean=boolean;e.coerce=coerce;e.create=create;e.date=date;e.defaulted=defaulted;e.define=define;e.deprecated=deprecated;e.dynamic=dynamic;e.empty=empty;e.enums=enums;e.func=func;e.instance=instance;e.integer=integer;e.intersection=intersection;e.is=is;e.lazy=lazy;e.literal=literal;e.map=map;e.mask=mask;e.max=max;e.min=min;e.never=never;e.nonempty=nonempty;e.nullable=nullable;e.number=number;e.object=object;e.omit=omit;e.optional=optional;e.partial=partial;e.pattern=pattern;e.pick=pick;e.record=record;e.refine=refine;e.regexp=regexp;e.set=set;e.size=size;e.string=string;e.struct=struct;e.trimmed=trimmed;e.tuple=tuple;e.type=type;e.union=union;e.unknown=unknown;e.validate=validate}))}};if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var t={};e[318](0,t);module.exports=t})();","// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n        if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n            Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n        }\n    }\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(\n\t\tObject.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t\t__webpack_require__.f[key](chunkId, promises);\n\t\t\treturn promises;\n\t\t}, [])\n\t);\n};","__webpack_require__.hmd = (module) => {\n  module = Object.create(module);\n  if (!module.children) module.children = [];\n  Object.defineProperty(module, 'exports', {\n      enumerable: true,\n      set: () => {\n          throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n      }\n  });\n  return module;\n};","// This function allow to reference chunks\n__webpack_require__.u = (chunkId) => {\n  // return url for filenames not based on template\n  \n  // return url for filenames based on template\n  return \"\" + chunkId + \".runtime.dev.js\"\n}","__webpack_require__.h = () => (\"f2505ee963096477\")","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n  module.paths = [];\n  if (!module.children) module.children = [];\n  return module;\n};","import React, {\n  useEffect,\n  useMemo,\n  startTransition,\n  useInsertionEffect,\n  useDeferredValue,\n} from 'react'\nimport {\n  AppRouterContext,\n  LayoutRouterContext,\n  GlobalLayoutRouterContext,\n} from '../../shared/lib/app-router-context.shared-runtime'\nimport type { CacheNode } from '../../shared/lib/app-router-types'\nimport { ACTION_RESTORE } from './router-reducer/router-reducer-types'\nimport type {\n  AppHistoryState,\n  AppRouterState,\n} from './router-reducer/router-reducer-types'\nimport { createHrefFromUrl } from './router-reducer/create-href-from-url'\nimport {\n  SearchParamsContext,\n  PathnameContext,\n  PathParamsContext,\n  NavigationPromisesContext,\n  type NavigationPromises,\n} from '../../shared/lib/hooks-client-context.shared-runtime'\nimport { dispatchAppRouterAction, useActionQueue } from './use-action-queue'\nimport { setLastCommittedTree } from './router-reducer/reducers/committed-state'\nimport { AppRouterAnnouncer } from './app-router-announcer'\nimport { RedirectBoundary } from './redirect-boundary'\nimport { findHeadInCache } from './router-reducer/reducers/find-head-in-cache'\nimport { unresolvedThenable } from './unresolved-thenable'\nimport { removeBasePath } from '../remove-base-path'\nimport { hasBasePath } from '../has-base-path'\nimport {\n  extractSourcePageFromFlightRouterState,\n  getSelectedParams,\n} from './router-reducer/compute-changed-path'\nimport { useNavFailureHandler } from './nav-failure-handler'\nimport {\n  dispatchTraverseAction,\n  publicAppRouterInstance,\n  type AppRouterActionQueue,\n  type GlobalErrorState,\n} from './app-router-instance'\nimport { getRedirectTypeFromError, getURLFromRedirectError } from './redirect'\nimport { isRedirectError } from './redirect-error'\nimport { pingVisibleLinks } from './links'\nimport RootErrorBoundary from './errors/root-error-boundary'\nimport DefaultGlobalError from './builtin/global-error'\nimport { RootLayoutBoundary } from '../../lib/framework/boundary-components'\nimport type { StaticIndicatorState } from '../dev/hot-reloader/app/hot-reloader-app'\nimport { getAssetTokenQuery } from '../../shared/lib/deployment-id'\n\nconst globalMutable: {\n  pendingMpaPath?: string\n} = {}\n\nfunction HistoryUpdater({\n  appRouterState,\n}: {\n  appRouterState: AppRouterState\n}) {\n  useInsertionEffect(() => {\n    if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {\n      // clear pending URL as navigation is no longer\n      // in flight\n      window.next.__pendingUrl = undefined\n    }\n\n    const { tree, pushRef, canonicalUrl, renderedSearch } = appRouterState\n\n    const appHistoryState: AppHistoryState = {\n      tree,\n      renderedSearch,\n    }\n\n    // TODO: Use Navigation API if available\n    const historyState = {\n      ...(pushRef.preserveCustomHistoryState ? window.history.state : {}),\n      // Identifier is shortened intentionally.\n      // __NA is used to identify if the history entry can be handled by the app-router.\n      // __N is used to identify if the history entry can be handled by the old router.\n      __NA: true,\n      __PRIVATE_NEXTJS_INTERNALS_TREE: appHistoryState,\n    }\n    if (\n      pushRef.pendingPush &&\n      // Skip pushing an additional history entry if the canonicalUrl is the same as the current url.\n      // This mirrors the browser behavior for normal navigation.\n      createHrefFromUrl(new URL(window.location.href)) !== canonicalUrl\n    ) {\n      // This intentionally mutates React state, pushRef is overwritten to ensure additional push/replace calls do not trigger an additional history entry.\n      pushRef.pendingPush = false\n      window.history.pushState(historyState, '', canonicalUrl)\n    } else {\n      window.history.replaceState(historyState, '', canonicalUrl)\n    }\n\n    setLastCommittedTree(tree)\n  }, [appRouterState])\n\n  useEffect(() => {\n    // The Next-Url and the base tree may affect the result of a prefetch\n    // task. Re-prefetch all visible links with the updated values. In most\n    // cases, this will not result in any new network requests, only if\n    // the prefetch result actually varies on one of these inputs.\n    pingVisibleLinks(appRouterState.nextUrl, appRouterState.tree)\n  }, [appRouterState.nextUrl, appRouterState.tree])\n\n  return null\n}\n\nfunction copyNextJsInternalHistoryState(data: any) {\n  if (data == null) data = {}\n  const currentState = window.history.state\n  const __NA = currentState?.__NA\n  if (__NA) {\n    data.__NA = __NA\n  }\n  const __PRIVATE_NEXTJS_INTERNALS_TREE =\n    currentState?.__PRIVATE_NEXTJS_INTERNALS_TREE\n  if (__PRIVATE_NEXTJS_INTERNALS_TREE) {\n    data.__PRIVATE_NEXTJS_INTERNALS_TREE = __PRIVATE_NEXTJS_INTERNALS_TREE\n  }\n\n  return data\n}\n\nfunction Head({\n  headCacheNode,\n}: {\n  headCacheNode: CacheNode | null\n}): React.ReactNode {\n  // If this segment has a `prefetchHead`, it's the statically prefetched data.\n  // We should use that on initial render instead of `head`. Then we'll switch\n  // to `head` when the dynamic response streams in.\n  const head = headCacheNode !== null ? headCacheNode.head : null\n  const prefetchHead =\n    headCacheNode !== null ? headCacheNode.prefetchHead : null\n\n  // If no prefetch data is available, then we go straight to rendering `head`.\n  const resolvedPrefetchRsc = prefetchHead !== null ? prefetchHead : head\n\n  // We use `useDeferredValue` to handle switching between the prefetched and\n  // final values. The second argument is returned on initial render, then it\n  // re-renders with the first argument.\n  return useDeferredValue(head, resolvedPrefetchRsc)\n}\n\n/**\n * The global router that wraps the application components.\n */\nfunction Router({\n  actionQueue,\n  globalError,\n  webSocket,\n  staticIndicatorState,\n}: {\n  actionQueue: AppRouterActionQueue\n  globalError: GlobalErrorState\n  webSocket: WebSocket | undefined\n  staticIndicatorState: StaticIndicatorState | undefined\n}) {\n  const state = useActionQueue(actionQueue)\n  const { canonicalUrl } = state\n  // Add memoized pathname/query for useSearchParams and usePathname.\n  const { searchParams, pathname } = useMemo(() => {\n    const url = new URL(\n      canonicalUrl,\n      typeof window === 'undefined' ? 'http://n' : window.location.href\n    )\n\n    return {\n      // This is turned into a readonly class in `useSearchParams`\n      searchParams: url.searchParams,\n      pathname: hasBasePath(url.pathname)\n        ? removeBasePath(url.pathname)\n        : url.pathname,\n    }\n  }, [canonicalUrl])\n\n  if (process.env.NODE_ENV !== 'production') {\n    const { cache, tree } = state\n\n    // This hook is in a conditional but that is ok because `process.env.NODE_ENV` never changes\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useEffect(() => {\n      // Add `window.nd` for debugging purposes.\n      // This is not meant for use in applications as concurrent rendering will affect the cache/tree/router.\n      // @ts-ignore this is for debugging\n      window.nd = {\n        router: publicAppRouterInstance,\n        cache,\n        tree,\n      }\n    }, [cache, tree])\n  }\n\n  useEffect(() => {\n    const sourcePage = extractSourcePageFromFlightRouterState(state.tree)\n\n    if (sourcePage !== undefined) {\n      window.next.__internal_src_page = sourcePage\n    } else {\n      delete window.next.__internal_src_page\n    }\n  }, [state.tree])\n\n  useEffect(() => {\n    // If the app is restored from bfcache, it's possible that\n    // pushRef.mpaNavigation is true, which would mean that any re-render of this component\n    // would trigger the mpa navigation logic again from the lines below.\n    // This will restore the router to the initial state in the event that the app is restored from bfcache.\n    function handlePageShow(event: PageTransitionEvent) {\n      if (\n        !event.persisted ||\n        !window.history.state?.__PRIVATE_NEXTJS_INTERNALS_TREE\n      ) {\n        return\n      }\n\n      // Clear the pendingMpaPath value so that a subsequent MPA navigation to the same URL can be triggered.\n      // This is necessary because if the browser restored from bfcache, the pendingMpaPath would still be set to the value\n      // of the last MPA navigation.\n      globalMutable.pendingMpaPath = undefined\n\n      dispatchAppRouterAction({\n        type: ACTION_RESTORE,\n        url: new URL(window.location.href),\n        historyState: window.history.state.__PRIVATE_NEXTJS_INTERNALS_TREE,\n      })\n    }\n\n    window.addEventListener('pageshow', handlePageShow)\n\n    return () => {\n      window.removeEventListener('pageshow', handlePageShow)\n    }\n  }, [])\n\n  useEffect(() => {\n    // Ensure that any redirect errors that bubble up outside of the RedirectBoundary\n    // are caught and handled by the router.\n    function handleUnhandledRedirect(\n      event: ErrorEvent | PromiseRejectionEvent\n    ) {\n      const error = 'reason' in event ? event.reason : event.error\n      if (isRedirectError(error)) {\n        event.preventDefault()\n        const url = getURLFromRedirectError(error)\n        const redirectType = getRedirectTypeFromError(error)\n        // TODO: This should access the router methods directly, rather than\n        // go through the public interface.\n        if (redirectType === 'push') {\n          publicAppRouterInstance.push(url, {})\n        } else {\n          publicAppRouterInstance.replace(url, {})\n        }\n      }\n    }\n    window.addEventListener('error', handleUnhandledRedirect)\n    window.addEventListener('unhandledrejection', handleUnhandledRedirect)\n\n    return () => {\n      window.removeEventListener('error', handleUnhandledRedirect)\n      window.removeEventListener('unhandledrejection', handleUnhandledRedirect)\n    }\n  }, [])\n\n  // When mpaNavigation flag is set do a hard navigation to the new url.\n  // Infinitely suspend because we don't actually want to rerender any child\n  // components with the new URL and any entangled state updates shouldn't\n  // commit either (eg: useTransition isPending should stay true until the page\n  // unloads).\n  //\n  // This is a side effect in render. Don't try this at home, kids. It's\n  // probably safe because we know this is a singleton component and it's never\n  // in <Offscreen>. At least I hope so. (It will run twice in dev strict mode,\n  // but that's... fine?)\n  const { pushRef } = state\n  if (pushRef.mpaNavigation) {\n    // if there's a re-render, we don't want to trigger another redirect if one is already in flight to the same URL\n    if (globalMutable.pendingMpaPath !== canonicalUrl) {\n      const location = window.location\n      if (pushRef.pendingPush) {\n        location.assign(canonicalUrl)\n      } else {\n        location.replace(canonicalUrl)\n      }\n\n      globalMutable.pendingMpaPath = canonicalUrl\n    }\n    // TODO-APP: Should we listen to navigateerror here to catch failed\n    // navigations somehow? And should we call window.stop() if a SPA navigation\n    // should interrupt an MPA one?\n    // NOTE: This is intentionally using `throw` instead of `use` because we're\n    // inside an externally mutable condition (pushRef.mpaNavigation), which\n    // violates the rules of hooks.\n    throw unresolvedThenable\n  }\n\n  useEffect(() => {\n    const originalPushState = window.history.pushState.bind(window.history)\n    const originalReplaceState = window.history.replaceState.bind(\n      window.history\n    )\n\n    // Ensure the canonical URL in the Next.js Router is updated when the URL is changed so that `usePathname` and `useSearchParams` hold the pushed values.\n    const applyUrlFromHistoryPushReplace = (\n      url: string | URL | null | undefined\n    ) => {\n      const href = window.location.href\n      const appHistoryState: AppHistoryState | undefined =\n        window.history.state?.__PRIVATE_NEXTJS_INTERNALS_TREE\n\n      startTransition(() => {\n        dispatchAppRouterAction({\n          type: ACTION_RESTORE,\n          url: new URL(url ?? href, href),\n          historyState: appHistoryState,\n        })\n      })\n    }\n\n    /**\n     * Patch pushState to ensure external changes to the history are reflected in the Next.js Router.\n     * Ensures Next.js internal history state is copied to the new history entry.\n     * Ensures usePathname and useSearchParams hold the newly provided url.\n     */\n    window.history.pushState = function pushState(\n      data: any,\n      _unused: string,\n      url?: string | URL | null\n    ): void {\n      // TODO: Warn when Navigation API is available (navigation.navigate() should be used)\n      // Avoid a loop when Next.js internals trigger pushState/replaceState\n      if (data?.__NA || data?._N) {\n        return originalPushState(data, _unused, url)\n      }\n\n      data = copyNextJsInternalHistoryState(data)\n\n      if (url) {\n        applyUrlFromHistoryPushReplace(url)\n      }\n\n      return originalPushState(data, _unused, url)\n    }\n\n    /**\n     * Patch replaceState to ensure external changes to the history are reflected in the Next.js Router.\n     * Ensures Next.js internal history state is copied to the new history entry.\n     * Ensures usePathname and useSearchParams hold the newly provided url.\n     */\n    window.history.replaceState = function replaceState(\n      data: any,\n      _unused: string,\n      url?: string | URL | null\n    ): void {\n      // TODO: Warn when Navigation API is available (navigation.navigate() should be used)\n      // Avoid a loop when Next.js internals trigger pushState/replaceState\n      if (data?.__NA || data?._N) {\n        return originalReplaceState(data, _unused, url)\n      }\n      data = copyNextJsInternalHistoryState(data)\n\n      if (url) {\n        applyUrlFromHistoryPushReplace(url)\n      }\n      return originalReplaceState(data, _unused, url)\n    }\n\n    /**\n     * Handle popstate event, this is used to handle back/forward in the browser.\n     * By default dispatches ACTION_RESTORE, however if the history entry was not pushed/replaced by app-router it will reload the page.\n     * That case can happen when the old router injected the history entry.\n     */\n    const onPopState = (event: PopStateEvent) => {\n      if (!event.state) {\n        // TODO-APP: this case only happens when pushState/replaceState was called outside of Next.js. It should probably reload the page in this case.\n        return\n      }\n\n      // This case happens when the history entry was pushed by the `pages` router.\n      if (!event.state.__NA) {\n        window.location.reload()\n        return\n      }\n\n      // TODO-APP: Ideally the back button should not use startTransition as it should apply the updates synchronously\n      // Without startTransition works if the cache is there for this path\n      startTransition(() => {\n        dispatchTraverseAction(\n          window.location.href,\n          event.state.__PRIVATE_NEXTJS_INTERNALS_TREE\n        )\n      })\n    }\n\n    // Register popstate event to call onPopstate.\n    window.addEventListener('popstate', onPopState)\n    return () => {\n      window.history.pushState = originalPushState\n      window.history.replaceState = originalReplaceState\n      window.removeEventListener('popstate', onPopState)\n    }\n  }, [])\n\n  const { cache, tree, nextUrl, focusAndScrollRef, previousNextUrl } = state\n\n  const matchingHead = useMemo(() => {\n    return findHeadInCache(cache, tree[1])\n  }, [cache, tree])\n\n  // Add memoized pathParams for useParams.\n  const pathParams = useMemo(() => {\n    return getSelectedParams(tree)\n  }, [tree])\n\n  // Create instrumented promises for navigation hooks (dev-only)\n  // These are specially instrumented promises to show in the Suspense DevTools\n  // Promises are cached outside of render to survive suspense retries.\n  let instrumentedNavigationPromises: NavigationPromises | null = null\n  if (process.env.NODE_ENV !== 'production') {\n    const { createRootNavigationPromises } =\n      require('./navigation-devtools') as typeof import('./navigation-devtools')\n\n    instrumentedNavigationPromises = createRootNavigationPromises(\n      tree,\n      pathname,\n      searchParams,\n      pathParams\n    )\n  }\n\n  const layoutRouterContext = useMemo(() => {\n    return {\n      parentTree: tree,\n      parentCacheNode: cache,\n      parentSegmentPath: null,\n      parentParams: {},\n      parentLoadingData: null,\n      // This is the <Activity> \"name\" that shows up in the Suspense DevTools.\n      // It represents the root of the app.\n      debugNameContext: '/',\n      // Root node always has `url`\n      // Provided in AppTreeContext to ensure it can be overwritten in layout-router\n      url: canonicalUrl,\n      // Root segment is always active\n      isActive: true,\n    }\n  }, [tree, cache, canonicalUrl])\n\n  const globalLayoutRouterContext = useMemo(() => {\n    return {\n      tree,\n      focusAndScrollRef,\n      nextUrl,\n      previousNextUrl,\n    }\n  }, [tree, focusAndScrollRef, nextUrl, previousNextUrl])\n\n  let head\n  if (matchingHead !== null) {\n    // The head is wrapped in an extra component so we can use\n    // `useDeferredValue` to swap between the prefetched and final versions of\n    // the head. (This is what LayoutRouter does for segment data, too.)\n    //\n    // The `key` is used to remount the component whenever the head moves to\n    // a different segment.\n    const [headCacheNode, headKey, headKeyWithoutSearchParams] = matchingHead\n\n    head = (\n      <Head\n        key={\n          // Necessary for PPR: omit search params from the key to match prerendered keys\n          typeof window === 'undefined' ? headKeyWithoutSearchParams : headKey\n        }\n        headCacheNode={headCacheNode}\n      />\n    )\n  } else {\n    head = null\n  }\n\n  let content = (\n    <RedirectBoundary>\n      {head}\n      {/* RootLayoutBoundary enables detection of Suspense boundaries around the root layout.\n          When users wrap their layout in <Suspense>, this creates the component stack pattern\n          \"Suspense -> RootLayoutBoundary\" which dynamic-rendering.ts uses to allow dynamic rendering. */}\n      <RootLayoutBoundary>{cache.rsc}</RootLayoutBoundary>\n      <AppRouterAnnouncer tree={tree} />\n    </RedirectBoundary>\n  )\n\n  if (process.env.__NEXT_DEV_SERVER) {\n    // In development, we apply few error boundaries and hot-reloader:\n    // - DevRootHTTPAccessFallbackBoundary: avoid using navigation API like notFound() in root layout\n    // - HotReloader:\n    //  - hot-reload the app when the code changes\n    //  - render dev overlay\n    //  - catch runtime errors and display global-error when necessary\n    if (typeof window !== 'undefined') {\n      const { DevRootHTTPAccessFallbackBoundary } =\n        require('./dev-root-http-access-fallback-boundary') as typeof import('./dev-root-http-access-fallback-boundary')\n      content = (\n        <DevRootHTTPAccessFallbackBoundary>\n          {content}\n        </DevRootHTTPAccessFallbackBoundary>\n      )\n    }\n    const HotReloader: typeof import('../dev/hot-reloader/app/hot-reloader-app').default =\n      (\n        require('../dev/hot-reloader/app/hot-reloader-app') as typeof import('../dev/hot-reloader/app/hot-reloader-app')\n      ).default\n\n    content = (\n      <HotReloader\n        globalError={globalError}\n        webSocket={webSocket}\n        staticIndicatorState={staticIndicatorState}\n      >\n        {content}\n      </HotReloader>\n    )\n  } else {\n    content = (\n      <RootErrorBoundary\n        errorComponent={globalError[0]}\n        errorStyles={globalError[1]}\n      >\n        {content}\n      </RootErrorBoundary>\n    )\n  }\n\n  return (\n    <>\n      <HistoryUpdater appRouterState={state} />\n      {process.env.TURBOPACK ? null : <RuntimeStylesForWebpack />}\n      <NavigationPromisesContext.Provider\n        value={instrumentedNavigationPromises}\n      >\n        <PathParamsContext.Provider value={pathParams}>\n          <PathnameContext.Provider value={pathname}>\n            <SearchParamsContext.Provider value={searchParams}>\n              <GlobalLayoutRouterContext.Provider\n                value={globalLayoutRouterContext}\n              >\n                {/* TODO: We should be able to remove this context. useRouter\n                    should import from app-router-instance instead. It's only\n                    necessary because useRouter is shared between Pages and\n                    App Router. We should fork that module, then remove this\n                    context provider. */}\n                <AppRouterContext.Provider value={publicAppRouterInstance}>\n                  <LayoutRouterContext.Provider value={layoutRouterContext}>\n                    {content}\n                  </LayoutRouterContext.Provider>\n                </AppRouterContext.Provider>\n              </GlobalLayoutRouterContext.Provider>\n            </SearchParamsContext.Provider>\n          </PathnameContext.Provider>\n        </PathParamsContext.Provider>\n      </NavigationPromisesContext.Provider>\n    </>\n  )\n}\n\nexport default function AppRouter({\n  actionQueue,\n  globalErrorState,\n  webSocket,\n  staticIndicatorState,\n}: {\n  actionQueue: AppRouterActionQueue\n  globalErrorState: GlobalErrorState\n  webSocket?: WebSocket\n  staticIndicatorState?: StaticIndicatorState\n}) {\n  useNavFailureHandler()\n\n  const router = (\n    <Router\n      actionQueue={actionQueue}\n      globalError={globalErrorState}\n      webSocket={webSocket}\n      staticIndicatorState={staticIndicatorState}\n    />\n  )\n\n  // At the very top level, use the default GlobalError component as the final fallback.\n  // When the app router itself fails, which means the framework itself fails, we show the default error.\n  return (\n    <RootErrorBoundary errorComponent={DefaultGlobalError}>\n      {router}\n    </RootErrorBoundary>\n  )\n}\n\nlet runtimeStyles: Set<string> | undefined\nlet runtimeStyleChanged: Set<() => void> | undefined\nif (!process.env.TURBOPACK && typeof window !== 'undefined') {\n  runtimeStyles = new Set<string>()\n  runtimeStyleChanged = new Set<() => void>()\n\n  globalThis._N_E_STYLE_LOAD = function (href: string) {\n    if (!runtimeStyles || !runtimeStyleChanged) return Promise.resolve()\n    let len = runtimeStyles.size\n    runtimeStyles.add(href)\n    if (runtimeStyles.size !== len) {\n      runtimeStyleChanged.forEach((cb) => cb())\n    }\n    // TODO figure out how to get a promise here\n    // But maybe it's not necessary as react would block rendering until it's loaded\n    return Promise.resolve()\n  }\n}\n\nfunction RuntimeStylesForWebpack() {\n  const [, forceUpdate] = React.useState(0)\n  const renderedStylesSize = runtimeStyles?.size ?? 0\n  useEffect(() => {\n    if (!runtimeStyles || !runtimeStyleChanged) return\n    const changed = () => forceUpdate((c) => c + 1)\n    runtimeStyleChanged.add(changed)\n    if (renderedStylesSize !== runtimeStyles.size) {\n      changed()\n    }\n    return () => {\n      runtimeStyleChanged.delete(changed)\n    }\n  }, [renderedStylesSize, forceUpdate])\n\n  const query = getAssetTokenQuery()\n  return [...(runtimeStyles || [])].map((href, i) => (\n    <link\n      key={i}\n      rel=\"stylesheet\"\n      href={`${href}${query}`}\n      // @ts-ignore\n      precedence=\"next\"\n      // TODO figure out crossOrigin and nonce\n      // crossOrigin={TODO}\n      // nonce={TODO}\n    />\n  ))\n}\n","import type { AppPageRouteDefinition } from '../../route-definitions/app-page-route-definition'\nimport type RenderResult from '../../render-result'\nimport type { RenderOpts } from '../../app-render/types'\nimport { addRequestMeta, type NextParsedUrlQuery } from '../../request-meta'\nimport type { LoaderTree } from '../../lib/app-dir-module'\nimport type { PrerenderManifest } from '../../../build'\n\nimport {\n  renderToHTMLOrFlight,\n  type AppSharedContext,\n} from '../../app-render/app-render'\nimport {\n  RouteModule,\n  type RouteModuleOptions,\n  type RouteModuleHandleContext,\n} from '../route-module'\nimport * as vendoredContexts from './vendored/contexts/entrypoints'\nimport type { BaseNextRequest, BaseNextResponse } from '../../base-http'\nimport type { ServerComponentsHmrCache } from '../../response-cache'\nimport type { OpaqueFallbackRouteParams } from '../../request/fallback-params'\nimport { PrerenderManifestMatcher } from './helpers/prerender-manifest-matcher'\nimport type { DeepReadonly } from '../../../shared/lib/deep-readonly'\nimport {\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  NEXT_URL,\n  RSC_HEADER,\n} from '../../../client/components/app-router-headers'\nimport { isInterceptionRouteAppPath } from '../../../shared/lib/router/utils/interception-routes'\nimport { RSCPathnameNormalizer } from '../../normalizers/request/rsc'\nimport { SegmentPrefixRSCPathnameNormalizer } from '../../normalizers/request/segment-prefix-rsc'\nimport type { UrlWithParsedQuery } from 'url'\nimport type { IncomingMessage } from 'http'\nimport { normalizeAppPageRequestUrl } from './normalize-request-url'\n\nlet vendoredReactRSC\nlet vendoredReactSSR\n\n// the vendored Reacts are loaded from their original source in the edge runtime\nif (process.env.NEXT_RUNTIME !== 'edge') {\n  vendoredReactRSC =\n    require('./vendored/rsc/entrypoints') as typeof import('./vendored/rsc/entrypoints')\n  vendoredReactSSR =\n    require('./vendored/ssr/entrypoints') as typeof import('./vendored/ssr/entrypoints')\n\n  // In Node environments we need to access the correct React instance from external modules such\n  // as global patches. We register the loaded React instances here.\n  const { registerServerReact, registerClientReact } =\n    require('../../runtime-reacts.external') as typeof import('../../runtime-reacts.external')\n  registerServerReact(vendoredReactRSC.React)\n  registerClientReact(vendoredReactSSR.React)\n}\n\n/**\n * The AppPageModule is the type of the module exported by the bundled app page\n * module.\n */\nexport type AppPageModule = typeof import('../../../build/templates/app-page')\n\ntype AppPageUserlandModule = {\n  /**\n   * The tree created in next-app-loader that holds component segments and modules\n   */\n  loaderTree: LoaderTree\n}\n\nexport interface AppPageRouteHandlerContext extends RouteModuleHandleContext {\n  page: string\n  query: NextParsedUrlQuery\n  fallbackRouteParams: OpaqueFallbackRouteParams | null\n  renderOpts: RenderOpts\n  serverComponentsHmrCache?: ServerComponentsHmrCache\n  sharedContext: AppSharedContext\n}\n\nexport type AppPageRouteModuleOptions = RouteModuleOptions<\n  AppPageRouteDefinition,\n  AppPageUserlandModule\n>\n\nexport class AppPageRouteModule extends RouteModule<\n  AppPageRouteDefinition,\n  AppPageUserlandModule\n> {\n  private matchers = new WeakMap<\n    DeepReadonly<PrerenderManifest>,\n    PrerenderManifestMatcher\n  >()\n  public match(\n    pathname: string,\n    prerenderManifest: DeepReadonly<PrerenderManifest>\n  ) {\n    // Lazily create the matcher based on the provided prerender manifest.\n    let matcher = this.matchers.get(prerenderManifest)\n    if (!matcher) {\n      matcher = new PrerenderManifestMatcher(\n        this.definition.pathname,\n        prerenderManifest\n      )\n      this.matchers.set(prerenderManifest, matcher)\n    }\n\n    // Match the pathname to the dynamic route.\n    return matcher.match(pathname)\n  }\n\n  private normalizers = {\n    rsc: new RSCPathnameNormalizer(),\n    segmentPrefetchRSC: new SegmentPrefixRSCPathnameNormalizer(),\n  }\n\n  public normalizeUrl(\n    req: IncomingMessage | BaseNextRequest,\n    parsedUrl: UrlWithParsedQuery\n  ) {\n    if (this.normalizers.segmentPrefetchRSC.match(parsedUrl.pathname || '/')) {\n      const result = this.normalizers.segmentPrefetchRSC.extract(\n        parsedUrl.pathname || '/'\n      )\n      if (!result) return false\n\n      const { originalPathname, segmentPath } = result\n      parsedUrl.pathname = originalPathname\n\n      // Mark the request as a router prefetch request.\n      req.headers[RSC_HEADER] = '1'\n      req.headers[NEXT_ROUTER_PREFETCH_HEADER] = '1'\n      req.headers[NEXT_ROUTER_SEGMENT_PREFETCH_HEADER] = segmentPath\n\n      addRequestMeta(req, 'isRSCRequest', true)\n      addRequestMeta(req, 'isPrefetchRSCRequest', true)\n      addRequestMeta(req, 'segmentPrefetchRSCRequest', segmentPath)\n    } else if (this.normalizers.rsc.match(parsedUrl.pathname || '/')) {\n      parsedUrl.pathname = this.normalizers.rsc.normalize(\n        parsedUrl.pathname || '/',\n        true\n      )\n\n      // Mark the request as a RSC request.\n      req.headers[RSC_HEADER] = '1'\n      addRequestMeta(req, 'isRSCRequest', true)\n    } else {\n      super.normalizeUrl(req, parsedUrl)\n    }\n\n    normalizeAppPageRequestUrl(req, parsedUrl.pathname || '/')\n  }\n\n  public render(\n    req: BaseNextRequest,\n    res: BaseNextResponse,\n    context: AppPageRouteHandlerContext\n  ): Promise<RenderResult> {\n    return renderToHTMLOrFlight(\n      req,\n      res,\n      context.page,\n      context.query,\n      context.fallbackRouteParams,\n      context.renderOpts,\n      context.serverComponentsHmrCache,\n      context.sharedContext\n    )\n  }\n\n  private pathCouldBeIntercepted(\n    resolvedPathname: string,\n    interceptionRoutePatterns: RegExp[]\n  ): boolean {\n    return (\n      isInterceptionRouteAppPath(resolvedPathname) ||\n      interceptionRoutePatterns.some((regexp) => {\n        return regexp.test(resolvedPathname)\n      })\n    )\n  }\n\n  public getVaryHeader(\n    resolvedPathname: string,\n    interceptionRoutePatterns: RegExp[]\n  ): string {\n    const baseVaryHeader = `${RSC_HEADER}, ${NEXT_ROUTER_STATE_TREE_HEADER}, ${NEXT_ROUTER_PREFETCH_HEADER}, ${NEXT_ROUTER_SEGMENT_PREFETCH_HEADER}`\n\n    if (\n      this.pathCouldBeIntercepted(resolvedPathname, interceptionRoutePatterns)\n    ) {\n      // Interception route responses can vary based on the `Next-URL` header.\n      // We use the Vary header to signal this behavior to the client to properly cache the response.\n      return `${baseVaryHeader}, ${NEXT_URL}`\n    } else {\n      // We don't need to include `Next-URL` in the Vary header for non-interception routes since it won't affect the response.\n      // We also set this header for pages to avoid caching issues when navigating between pages and app.\n      return baseVaryHeader\n    }\n  }\n}\n\nconst vendored = {\n  'react-rsc': vendoredReactRSC,\n  'react-ssr': vendoredReactSSR,\n  contexts: vendoredContexts,\n}\n\nexport { renderToHTMLOrFlight, vendored }\n\nexport default AppPageRouteModule\n","import type { OutgoingHttpHeaders } from 'http'\nimport type RenderResult from '../render-result'\nimport type { CacheControl, Revalidate } from '../lib/cache-control'\nimport type { RouteKind } from '../route-kind'\n\nexport interface ResponseCacheBase {\n  get(\n    key: string | null,\n    responseGenerator: ResponseGenerator,\n    context: {\n      isOnDemandRevalidate?: boolean\n      isPrefetch?: boolean\n      incrementalCache: IncrementalCache\n      /**\n       * This is a hint to the cache to help it determine what kind of route\n       * this is so it knows where to look up the cache entry from. If not\n       * provided it will test the filesystem to check.\n       */\n      routeKind: RouteKind\n\n      /**\n       * True if this is a fallback request.\n       */\n      isFallback?: boolean\n\n      /**\n       * True if the route is enabled for PPR.\n       */\n      isRoutePPREnabled?: boolean\n    }\n  ): Promise<ResponseCacheEntry | null>\n}\n\n// The server components HMR cache might store other data as well in the future,\n// at which point this should be refactored to a discriminated union type.\nexport interface ServerComponentsHmrCache {\n  get(key: string): CachedFetchData | undefined\n  set(key: string, data: CachedFetchData): void\n}\n\nexport type CachedFetchData = {\n  headers: Record<string, string>\n  body: string\n  url: string\n  status?: number\n}\n\nexport const enum CachedRouteKind {\n  APP_PAGE = 'APP_PAGE',\n  APP_ROUTE = 'APP_ROUTE',\n  PAGES = 'PAGES',\n  FETCH = 'FETCH',\n  REDIRECT = 'REDIRECT',\n  IMAGE = 'IMAGE',\n}\n\nexport interface CachedFetchValue {\n  kind: CachedRouteKind.FETCH\n  data: CachedFetchData\n  // tags are only present with file-system-cache\n  // fetch cache stores tags outside of cache entry\n  tags?: string[]\n  revalidate: number\n}\n\nexport interface CachedRedirectValue {\n  kind: CachedRouteKind.REDIRECT\n  props: Object\n}\n\nexport interface CachedAppPageValue {\n  kind: CachedRouteKind.APP_PAGE\n  // this needs to be a RenderResult so since renderResponse\n  // expects that type instead of a string\n  html: RenderResult\n  rscData: Buffer | undefined\n  status: number | undefined\n  postponed: string | undefined\n  headers: OutgoingHttpHeaders | undefined\n  segmentData: Map<string, Buffer> | undefined\n}\n\nexport interface CachedPageValue {\n  kind: CachedRouteKind.PAGES\n  // this needs to be a RenderResult so since renderResponse\n  // expects that type instead of a string\n  html: RenderResult\n  pageData: Object\n  status: number | undefined\n  headers: OutgoingHttpHeaders | undefined\n}\n\nexport interface CachedRouteValue {\n  kind: CachedRouteKind.APP_ROUTE\n  // this needs to be a RenderResult so since renderResponse\n  // expects that type instead of a string\n  body: Buffer\n  status: number\n  headers: OutgoingHttpHeaders\n}\n\nexport interface CachedImageValue {\n  kind: CachedRouteKind.IMAGE\n  etag: string\n  upstreamEtag: string\n  buffer: Buffer\n  extension: string\n  revalidate?: number\n  isMiss?: boolean\n  isStale?: boolean\n}\n\nexport interface IncrementalCachedAppPageValue {\n  kind: CachedRouteKind.APP_PAGE\n  // this needs to be a string since the cache expects to store\n  // the string value\n  html: string\n  rscData: Buffer | undefined\n  headers: OutgoingHttpHeaders | undefined\n  postponed: string | undefined\n  status: number | undefined\n  segmentData: Map<string, Buffer> | undefined\n}\n\nexport interface IncrementalCachedPageValue {\n  kind: CachedRouteKind.PAGES\n  // this needs to be a string since the cache expects to store\n  // the string value\n  html: string\n  pageData: Object\n  headers: OutgoingHttpHeaders | undefined\n  status: number | undefined\n}\n\nexport interface IncrementalResponseCacheEntry {\n  cacheControl?: CacheControl\n  /**\n   * timestamp in milliseconds to revalidate after\n   */\n  revalidateAfter?: Revalidate\n  /**\n   * `-1` here dictates a blocking revalidate should be used\n   */\n  isStale?: boolean | -1\n  isMiss?: boolean\n  isFallback?: boolean\n  value: Exclude<IncrementalCacheValue, CachedFetchValue> | null\n}\n\nexport interface IncrementalFetchCacheEntry {\n  /**\n   * `-1` here dictates a blocking revalidate should be used\n   */\n  isStale?: boolean | -1\n  value: CachedFetchValue\n}\n\nexport type IncrementalCacheEntry =\n  | IncrementalResponseCacheEntry\n  | IncrementalFetchCacheEntry\n\nexport type IncrementalCacheValue =\n  | CachedRedirectValue\n  | IncrementalCachedPageValue\n  | IncrementalCachedAppPageValue\n  | CachedImageValue\n  | CachedFetchValue\n  | CachedRouteValue\n\nexport type ResponseCacheValue =\n  | CachedRedirectValue\n  | CachedPageValue\n  | CachedAppPageValue\n  | CachedImageValue\n  | CachedRouteValue\n\nexport type ResponseCacheEntry = {\n  cacheControl?: CacheControl\n  value: ResponseCacheValue | null\n  isStale?: boolean | -1\n  isMiss?: boolean\n  isFallback?: boolean\n}\n\n/**\n * @param hasResolved whether the responseGenerator has resolved it's promise\n * @param previousCacheEntry the previous cache entry if it exists or the current\n */\nexport type ResponseGenerator = (state: {\n  hasResolved: boolean\n  previousCacheEntry?: IncrementalResponseCacheEntry | null\n  isRevalidating?: boolean\n  span?: any\n\n  /**\n   * When true, this indicates that the response generator is being called in a\n   * context where the response must be generated statically.\n   *\n   * CRITICAL: This should only currently be used when revalidating due to a\n   * dynamic RSC request.\n   */\n  forceStaticRender?: boolean\n}) => Promise<ResponseCacheEntry | null>\n\nexport const enum IncrementalCacheKind {\n  APP_PAGE = 'APP_PAGE',\n  APP_ROUTE = 'APP_ROUTE',\n  PAGES = 'PAGES',\n  FETCH = 'FETCH',\n  IMAGE = 'IMAGE',\n}\n\nexport interface GetIncrementalFetchCacheContext {\n  kind: IncrementalCacheKind.FETCH\n  revalidate?: Revalidate\n  fetchUrl?: string\n  fetchIdx?: number\n  tags?: string[]\n  softTags?: string[]\n}\n\nexport interface GetIncrementalResponseCacheContext {\n  kind: Exclude<IncrementalCacheKind, IncrementalCacheKind.FETCH>\n\n  /**\n   * True if the route is enabled for PPR.\n   */\n  isRoutePPREnabled?: boolean\n\n  /**\n   * True if this is a fallback request.\n   */\n  isFallback: boolean\n}\n\nexport interface SetIncrementalFetchCacheContext {\n  fetchCache: true\n  fetchUrl?: string\n  fetchIdx?: number\n  tags?: string[]\n  isImplicitBuildTimeCache?: boolean\n}\n\nexport interface SetIncrementalResponseCacheContext {\n  fetchCache?: false\n  cacheControl?: CacheControl\n\n  /**\n   * True if the route is enabled for PPR.\n   */\n  isRoutePPREnabled?: boolean\n\n  /**\n   * True if this is a fallback request.\n   */\n  isFallback?: boolean\n}\n\nexport interface IncrementalResponseCache {\n  get(\n    cacheKey: string,\n    ctx: GetIncrementalResponseCacheContext\n  ): Promise<IncrementalResponseCacheEntry | null>\n  set(\n    key: string,\n    data: Exclude<IncrementalCacheValue, CachedFetchValue> | null,\n    ctx: SetIncrementalResponseCacheContext\n  ): Promise<void>\n}\n\nexport interface IncrementalCache extends IncrementalResponseCache {\n  get(\n    cacheKey: string,\n    ctx: GetIncrementalFetchCacheContext\n  ): Promise<IncrementalFetchCacheEntry | null>\n  get(\n    cacheKey: string,\n    ctx: GetIncrementalResponseCacheContext\n  ): Promise<IncrementalResponseCacheEntry | null>\n  set(\n    key: string,\n    data: CachedFetchValue | null,\n    ctx: SetIncrementalFetchCacheContext\n  ): Promise<void>\n  set(\n    key: string,\n    data: Exclude<IncrementalCacheValue, CachedFetchValue> | null,\n    ctx: SetIncrementalResponseCacheContext\n  ): Promise<void>\n  revalidateTag(\n    tags: string | string[],\n    durations?: { expire?: number }\n  ): Promise<void>\n}\n","export const enum RouteKind {\n  /**\n   * `PAGES` represents all the React pages that are under `pages/`.\n   */\n  PAGES = 'PAGES',\n  /**\n   * `PAGES_API` represents all the API routes under `pages/api/`.\n   */\n  PAGES_API = 'PAGES_API',\n  /**\n   * `APP_PAGE` represents all the React pages that are under `app/` with the\n   * filename of `page.{j,t}s{,x}`.\n   */\n  APP_PAGE = 'APP_PAGE',\n  /**\n   * `APP_ROUTE` represents all the API routes and metadata routes that are under `app/` with the\n   * filename of `route.{j,t}s{,x}`.\n   */\n  APP_ROUTE = 'APP_ROUTE',\n\n  /**\n   * `IMAGE` represents all the images that are generated by `next/image`.\n   */\n  IMAGE = 'IMAGE',\n}\n","import type {\n  OpaqueFallbackRouteParamEntries,\n  OpaqueFallbackRouteParams,\n} from '../../server/request/fallback-params'\nimport { getDynamicParam } from '../../shared/lib/router/utils/get-dynamic-param'\nimport type { Params } from '../request/params'\nimport {\n  createPrerenderResumeDataCache,\n  createRenderResumeDataCache,\n  type PrerenderResumeDataCache,\n  type RenderResumeDataCache,\n} from '../resume-data-cache/resume-data-cache'\nimport { stringifyResumeDataCache } from '../resume-data-cache/resume-data-cache'\n\nexport enum DynamicState {\n  /**\n   * The dynamic access occurred during the RSC render phase.\n   */\n  DATA = 1,\n\n  /**\n   * The dynamic access occurred during the HTML shell render phase.\n   */\n  HTML = 2,\n}\n\n/**\n * The postponed state for dynamic data.\n */\nexport type DynamicDataPostponedState = {\n  /**\n   * The type of dynamic state.\n   */\n  readonly type: DynamicState.DATA\n\n  /**\n   * The immutable resume data cache.\n   */\n  readonly renderResumeDataCache: RenderResumeDataCache\n}\n\n/**\n * The postponed state for dynamic HTML.\n */\nexport type DynamicHTMLPostponedState = {\n  /**\n   * The type of dynamic state.\n   */\n  readonly type: DynamicState.HTML\n\n  /**\n   * The postponed data used by React.\n   */\n  readonly data: [\n    preludeState: DynamicHTMLPreludeState,\n    postponed: ReactPostponed,\n  ]\n\n  /**\n   * The immutable resume data cache.\n   */\n  readonly renderResumeDataCache: RenderResumeDataCache\n}\n\nexport const enum DynamicHTMLPreludeState {\n  Empty = 0,\n  Full = 1,\n}\n\ntype ReactPostponed = NonNullable<\n  import('react-dom/static').PrerenderResult['postponed']\n>\n\nexport type PostponedState =\n  | DynamicDataPostponedState\n  | DynamicHTMLPostponedState\n\nexport async function getDynamicHTMLPostponedState(\n  postponed: ReactPostponed,\n  preludeState: DynamicHTMLPreludeState,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  resumeDataCache: PrerenderResumeDataCache | RenderResumeDataCache,\n  isCacheComponentsEnabled: boolean\n): Promise<string> {\n  const data: DynamicHTMLPostponedState['data'] = [preludeState, postponed]\n  const dataString = JSON.stringify(data)\n\n  // If there are no fallback route params, we can just serialize the postponed\n  // state as is.\n  if (!fallbackRouteParams || fallbackRouteParams.size === 0) {\n    // Serialized as `<postponedString.length>:<postponedString><renderResumeDataCache>`\n    return `${dataString.length}:${dataString}${await stringifyResumeDataCache(\n      createRenderResumeDataCache(resumeDataCache),\n      isCacheComponentsEnabled\n    )}`\n  }\n\n  const replacements: OpaqueFallbackRouteParamEntries = Array.from(\n    fallbackRouteParams.entries()\n  )\n  const replacementsString = JSON.stringify(replacements)\n\n  // Serialized as `<replacements.length><replacements><data>`\n  const postponedString = `${replacementsString.length}${replacementsString}${dataString}`\n\n  // Serialized as `<postponedString.length>:<postponedString><renderResumeDataCache>`\n  return `${postponedString.length}:${postponedString}${await stringifyResumeDataCache(resumeDataCache, isCacheComponentsEnabled)}`\n}\n\nexport async function getDynamicDataPostponedState(\n  resumeDataCache: PrerenderResumeDataCache | RenderResumeDataCache,\n  isCacheComponentsEnabled: boolean\n): Promise<string> {\n  return `4:null${await stringifyResumeDataCache(createRenderResumeDataCache(resumeDataCache), isCacheComponentsEnabled)}`\n}\n\nexport function parsePostponedState(\n  state: string,\n  interpolatedParams: Params,\n  maxPostponedStateSizeBytes: number | undefined\n): PostponedState {\n  try {\n    const postponedStringLengthMatch = state.match(/^([0-9]*):/)?.[1]\n    if (!postponedStringLengthMatch) {\n      throw new Error(`Invariant: invalid postponed state ${state}`)\n    }\n\n    const postponedStringLength = parseInt(postponedStringLengthMatch)\n\n    // We add a `:` to the end of the length as the first character of the\n    // postponed string is the length of the replacement entries.\n    const postponedString = state.slice(\n      postponedStringLengthMatch.length + 1,\n      postponedStringLengthMatch.length + postponedStringLength + 1\n    )\n\n    const renderResumeDataCache = createRenderResumeDataCache(\n      state.slice(\n        postponedStringLengthMatch.length + postponedStringLength + 1\n      ),\n      maxPostponedStateSizeBytes\n    )\n\n    try {\n      if (postponedString === 'null') {\n        return { type: DynamicState.DATA, renderResumeDataCache }\n      }\n\n      if (/^[0-9]/.test(postponedString)) {\n        const match = postponedString.match(/^([0-9]*)/)?.[1]\n        if (!match) {\n          throw new Error(\n            `Invariant: invalid postponed state ${JSON.stringify(postponedString)}`\n          )\n        }\n\n        // This is the length of the replacements entries.\n        const length = parseInt(match)\n        const replacements = JSON.parse(\n          postponedString.slice(\n            match.length,\n            // We then go to the end of the string.\n            match.length + length\n          )\n        ) as OpaqueFallbackRouteParamEntries\n\n        let postponed = postponedString.slice(match.length + length)\n        for (const [\n          segmentKey,\n          [searchValue, dynamicParamType],\n        ] of replacements) {\n          const {\n            treeSegment: [\n              ,\n              // This is the same value that'll be used in the postponed state\n              // as it's part of the tree data. That's why we use it as the\n              // replacement value.\n              value,\n            ],\n          } = getDynamicParam(\n            interpolatedParams,\n            segmentKey,\n            dynamicParamType,\n            null,\n            null // staticSiblings not needed for postponed state\n          )\n\n          postponed = postponed.replaceAll(searchValue, value)\n        }\n\n        return {\n          type: DynamicState.HTML,\n          data: JSON.parse(postponed),\n          renderResumeDataCache,\n        }\n      }\n\n      return {\n        type: DynamicState.HTML,\n        data: JSON.parse(postponedString),\n        renderResumeDataCache,\n      }\n    } catch (err) {\n      console.error('Failed to parse postponed state', err)\n      return { type: DynamicState.DATA, renderResumeDataCache }\n    }\n  } catch (err) {\n    console.error('Failed to parse postponed state', err)\n    return {\n      type: DynamicState.DATA,\n      renderResumeDataCache: createPrerenderResumeDataCache(),\n    }\n  }\n}\n\nexport function getPostponedFromState(state: DynamicHTMLPostponedState) {\n  const [preludeState, postponed] = state.data\n  return { preludeState, postponed }\n}\n","import { getDigestForWellKnownError } from './create-error-handler'\nimport { isReactLargeShellError } from './react-large-shell-error'\n\nexport enum Phase {\n  ProspectiveRender = 'the prospective render',\n  SegmentCollection = 'segment collection',\n  InstantValidation = 'instant validation',\n}\n\nexport function printDebugThrownValueForProspectiveRender(\n  thrownValue: unknown,\n  route: string,\n  phase: Phase\n) {\n  // We don't need to print well-known Next.js errors.\n  if (getDigestForWellKnownError(thrownValue)) {\n    return\n  }\n\n  if (isReactLargeShellError(thrownValue)) {\n    // TODO: Aggregate\n    console.error(thrownValue)\n    return undefined\n  }\n\n  let message: undefined | string\n  if (\n    typeof thrownValue === 'object' &&\n    thrownValue !== null &&\n    typeof (thrownValue as any).message === 'string'\n  ) {\n    message = (thrownValue as any).message\n    if (typeof (thrownValue as any).stack === 'string') {\n      const originalErrorStack: string = (thrownValue as any).stack\n      const stackStart = originalErrorStack.indexOf('\\n')\n      if (stackStart > -1) {\n        const error = new Error(\n          `Route ${route} errored during ${phase}. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled.\n          \nOriginal Error: ${message}`\n        )\n        error.stack =\n          'Error: ' + error.message + originalErrorStack.slice(stackStart)\n        console.error(error)\n        return\n      }\n    }\n  } else if (typeof thrownValue === 'string') {\n    message = thrownValue\n  }\n\n  if (message) {\n    console.error(`Route ${route} errored during ${phase}. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled. No stack was provided.\n          \nOriginal Message: ${message}`)\n    return\n  }\n\n  console.error(\n    `Route ${route} errored during ${phase}. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled. The thrown value is logged just following this message`\n  )\n  console.error(thrownValue)\n  return\n}\n","// ISC License\n\n// Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov\n\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n//\n// https://github.com/alexeyraspopov/picocolors/blob/b6261487e7b81aaab2440e397a356732cad9e342/picocolors.js#L1\n\nconst { env, stdout } = globalThis?.process ?? {}\n\nconst enabled =\n  env &&\n  !env.NO_COLOR &&\n  (env.FORCE_COLOR || (stdout?.isTTY && !env.CI && env.TERM !== 'dumb'))\n\nconst replaceClose = (\n  str: string,\n  close: string,\n  replace: string,\n  index: number\n): string => {\n  const start = str.substring(0, index) + replace\n  const end = str.substring(index + close.length)\n  const nextIndex = end.indexOf(close)\n  return ~nextIndex\n    ? start + replaceClose(end, close, replace, nextIndex)\n    : start + end\n}\n\nconst formatter = (open: string, close: string, replace = open) => {\n  if (!enabled) return String\n  return (input: string) => {\n    const string = '' + input\n    const index = string.indexOf(close, open.length)\n    return ~index\n      ? open + replaceClose(string, close, replace, index) + close\n      : open + string + close\n  }\n}\n\nexport const reset = enabled ? (s: string) => `\\x1b[0m${s}\\x1b[0m` : String\nexport const bold = formatter('\\x1b[1m', '\\x1b[22m', '\\x1b[22m\\x1b[1m')\nexport const dim = formatter('\\x1b[2m', '\\x1b[22m', '\\x1b[22m\\x1b[2m')\nexport const italic = formatter('\\x1b[3m', '\\x1b[23m')\nexport const underline = formatter('\\x1b[4m', '\\x1b[24m')\nexport const inverse = formatter('\\x1b[7m', '\\x1b[27m')\nexport const hidden = formatter('\\x1b[8m', '\\x1b[28m')\nexport const strikethrough = formatter('\\x1b[9m', '\\x1b[29m')\nexport const black = formatter('\\x1b[30m', '\\x1b[39m')\nexport const red = formatter('\\x1b[31m', '\\x1b[39m')\nexport const green = formatter('\\x1b[32m', '\\x1b[39m')\nexport const yellow = formatter('\\x1b[33m', '\\x1b[39m')\nexport const blue = formatter('\\x1b[34m', '\\x1b[39m')\nexport const magenta = formatter('\\x1b[35m', '\\x1b[39m')\nexport const purple = formatter('\\x1b[38;2;173;127;168m', '\\x1b[39m')\nexport const cyan = formatter('\\x1b[36m', '\\x1b[39m')\nexport const white = formatter('\\x1b[37m', '\\x1b[39m')\nexport const gray = formatter('\\x1b[90m', '\\x1b[39m')\nexport const bgBlack = formatter('\\x1b[40m', '\\x1b[49m')\nexport const bgRed = formatter('\\x1b[41m', '\\x1b[49m')\nexport const bgGreen = formatter('\\x1b[42m', '\\x1b[49m')\nexport const bgYellow = formatter('\\x1b[43m', '\\x1b[49m')\nexport const bgBlue = formatter('\\x1b[44m', '\\x1b[49m')\nexport const bgMagenta = formatter('\\x1b[45m', '\\x1b[49m')\nexport const bgCyan = formatter('\\x1b[46m', '\\x1b[49m')\nexport const bgWhite = formatter('\\x1b[47m', '\\x1b[49m')\n","import type { IncomingMessage, ServerResponse } from 'http'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { UrlWithParsedQuery } from 'url'\nimport type { BaseNextRequest } from './base-http'\nimport type { CloneableBody } from './body-streams'\nimport type { RouteMatch } from './route-matches/route-match'\nimport type { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'\nimport type {\n  ResponseCacheEntry,\n  ServerComponentsHmrCache,\n} from './response-cache'\nimport type { PagesDevOverlayBridgeType } from '../next-devtools/userspace/pages/pages-dev-overlay-setup'\nimport type { OpaqueFallbackRouteParams } from './request/fallback-params'\nimport type { IncrementalCache } from './lib/incremental-cache'\nimport type { RevalidateFn } from './lib/router-utils/router-server-context'\nimport type { NextRequest } from './web/exports'\n\n// FIXME: (wyattjoh) this is a temporary solution to allow us to pass data between bundled modules\nexport const NEXT_REQUEST_META = Symbol.for('NextInternalRequestMeta')\n\nexport type NextIncomingMessage = (\n  | BaseNextRequest\n  | IncomingMessage\n  | NextRequest\n) & {\n  [NEXT_REQUEST_META]?: RequestMeta\n}\n\n/**\n * The callback function to call when a response cache entry was generated or\n * looked up in the cache. When it returns true, the server assumes that the\n * handler has already responded to the request and will not do so itself.\n */\nexport type OnCacheEntryHandler = (\n  /**\n   * The response cache entry that was generated or looked up in the cache.\n   */\n  cacheEntry: ResponseCacheEntry,\n\n  /**\n   * The request metadata.\n   */\n  requestMeta: {\n    /**\n     * The URL that was used to make the request.\n     */\n    url: string | undefined\n  }\n) => Promise<boolean | void> | boolean | void\n\nexport interface RequestMeta {\n  /**\n   * The query that was used to make the request.\n   */\n  initQuery?: ParsedUrlQuery\n\n  /**\n   * The URL that was used to make the request.\n   */\n  initURL?: string\n\n  /**\n   * The protocol that was used to make the request.\n   */\n  initProtocol?: string\n\n  /**\n   * The body that was read from the request. This is used to allow the body to\n   * be read multiple times.\n   */\n  clonableBody?: CloneableBody\n\n  /**\n   * True when the request matched a locale domain that was configured in the\n   * next.config.js file.\n   */\n  isLocaleDomain?: boolean\n\n  /**\n   * True when the request had locale information stripped from the pathname\n   * part of the URL.\n   */\n  didStripLocale?: boolean\n\n  /**\n   * If the request had its URL rewritten, this is the pathname it was rewritten\n   * to (not a full URL, just the pathname).\n   */\n  rewrittenPathname?: string\n\n  /**\n   * The resolved pathname for the request. Dynamic route params are\n   * interpolated, the pathname is decoded, and the trailing slash is removed.\n   */\n  resolvedPathname?: string\n\n  /**\n   * The cookies that were added by middleware and were added to the response.\n   */\n  middlewareCookie?: string[]\n\n  /**\n   * The match on the request for a given route.\n   */\n  match?: RouteMatch\n\n  /**\n   * The incremental cache to use for the request.\n   */\n  incrementalCache?: IncrementalCache\n\n  /**\n   * The server components HMR cache, only for dev.\n   */\n  serverComponentsHmrCache?: ServerComponentsHmrCache\n\n  /**\n   * Equals the segment path that was used for the prefetch RSC request.\n   */\n  segmentPrefetchRSCRequest?: string\n\n  /**\n   * True when the request is for the prefetch flight data.\n   */\n  isPrefetchRSCRequest?: true\n\n  /**\n   * True when the request is for the flight data.\n   */\n  isRSCRequest?: true\n\n  /**\n   * A search param set by the Next.js client when performing RSC requests.\n   * Because some CDNs do not vary their cache entries on our custom headers,\n   * this search param represents a hash of the header values. For any cached\n   * RSC request, we should verify that the hash matches before responding.\n   * Otherwise this can lead to cache poisoning.\n   * TODO: Consider not using custom request headers at all, and instead encode\n   * everything into the search param.\n   */\n  cacheBustingSearchParam?: string\n\n  /**\n   * True when the request is for the `/_next/data` route using the pages\n   * router.\n   */\n  isNextDataReq?: true\n\n  /**\n   * Postponed state to use for resumption. If present it's assumed that the\n   * request is for a page that has postponed (there are no guarantees that the\n   * page actually has postponed though as it would incur an additional cache\n   * lookup).\n   */\n  postponed?: string\n\n  /**\n   * The action body extracted from a server action request when the postponed\n   * state was prepended to the body by the proxy. This allows the action\n   * handler to read the action payload without re-reading the consumed stream.\n   */\n  actionBody?: Buffer\n\n  /**\n   * If provided, this will be called when a response cache entry was generated\n   * or looked up in the cache.\n   *\n   * @deprecated Use `onCacheEntryV2` instead.\n   */\n  onCacheEntry?: OnCacheEntryHandler\n\n  /**\n   * If provided, this will be called when a response cache entry was generated\n   * or looked up in the cache.\n   */\n  onCacheEntryV2?: OnCacheEntryHandler\n\n  /**\n   * The previous revalidate before rendering 404 page for notFound: true\n   */\n  notFoundRevalidate?: number | false\n\n  /**\n   * In development, the original source page that returned a 404.\n   */\n  developmentNotFoundSourcePage?: string\n\n  /**\n   * The path we routed to and should be invoked\n   */\n  invokePath?: string\n\n  /**\n   * The specific page output we should be matching\n   */\n  invokeOutput?: string\n\n  /**\n   * The status we are invoking the request with from routing\n   */\n  invokeStatus?: number\n\n  /**\n   * The routing error we are invoking with\n   */\n  invokeError?: Error\n\n  /**\n   * The query parsed for the invocation\n   */\n  invokeQuery?: Record<string, undefined | string | string[]>\n\n  /**\n   * Whether the request is a middleware invocation\n   */\n  middlewareInvoke?: boolean\n\n  /**\n   * Whether the request should render the fallback shell or not.\n   */\n  renderFallbackShell?: boolean\n\n  /**\n   * Whether the request is for the custom error page.\n   */\n  customErrorRender?: true\n\n  /**\n   * Whether to bubble up the NoFallbackError to the caller when a 404 is\n   * returned.\n   */\n  bubbleNoFallback?: true\n\n  /**\n   * True when the request had locale information inferred from the default\n   * locale.\n   */\n  localeInferredFromDefault?: true\n\n  /**\n   * The locale that was inferred or explicitly set for the request.\n   */\n  locale?: string\n\n  /**\n   * The default locale that was inferred or explicitly set for the request.\n   */\n  defaultLocale?: string\n\n  /**\n   * The relative project dir the server is running in from project root\n   */\n  relativeProjectDir?: string\n\n  /**\n   * The dist directory the server is currently using\n   */\n  distDir?: string\n\n  /**\n    Optional hostname used by route handlers when constructing absolute URLs.\n    hostname: '127.0.0.1',\n   */\n  hostname?: string\n\n  /**\n   Optional internal revalidate function to avoid revalidating over the network\n   */\n  revalidate?: RevalidateFn\n\n  /**\n   Optional function to render the 404 page for pages router `notFound: true`\n   */\n  render404?: (\n    req: IncomingMessage,\n    res: ServerResponse,\n    parsedUrl?: UrlWithParsedQuery,\n    setHeaders?: boolean\n  ) => Promise<void>\n\n  /**\n   * The query after resolving routes\n   */\n  query?: ParsedUrlQuery\n\n  /**\n   * The params after resolving routes\n   */\n  params?: ParsedUrlQuery\n\n  /**\n   * ErrorOverlay component to use in development for pages router\n   */\n  PagesErrorDebug?: PagesDevOverlayBridgeType\n\n  /**\n   * Whether server is in minimal mode (this will be replaced with more\n   * specific flags in future)\n   */\n  minimalMode?: boolean\n\n  /**\n   * The fallback params for this route. In dev, used for validating prerenders.\n   * In production, used to defer params resolution during staged rendering.\n   */\n  fallbackParams?: OpaqueFallbackRouteParams\n\n  /**\n   * DEV only: Request timings in process.hrtime.bigint()\n   */\n  devRequestTimingStart?: bigint\n  devRequestTimingMiddlewareStart?: bigint\n  devRequestTimingMiddlewareEnd?: bigint\n  devRequestTimingInternalsEnd?: bigint\n\n  /**\n   * DEV only: The duration of getStaticPaths/generateStaticParams in process.hrtime.bigint()\n   */\n  devGenerateStaticParamsDuration?: bigint\n\n  /**\n   * DEV only: Server action log info to be logged after the request log\n   */\n  devServerActionLog?: {\n    functionName: string\n    args: unknown[]\n    location: string\n    duration: number\n  }\n}\n\n/**\n * Gets the request metadata. If no key is provided, the entire metadata object\n * is returned.\n *\n * @param req the request to get the metadata from\n * @param key the key to get from the metadata (optional)\n * @returns the value for the key or the entire metadata object\n */\nexport function getRequestMeta(\n  req: NextIncomingMessage,\n  key?: undefined\n): RequestMeta\nexport function getRequestMeta<K extends keyof RequestMeta>(\n  req: NextIncomingMessage,\n  key: K\n): RequestMeta[K]\nexport function getRequestMeta<K extends keyof RequestMeta>(\n  req: NextIncomingMessage,\n  key?: K\n): RequestMeta | RequestMeta[K] {\n  const meta = req[NEXT_REQUEST_META] || {}\n  return typeof key === 'string' ? meta[key] : meta\n}\n\n/**\n * Sets the request metadata.\n *\n * @param req the request to set the metadata on\n * @param meta the metadata to set\n * @returns the mutated request metadata\n */\nexport function setRequestMeta(req: NextIncomingMessage, meta: RequestMeta) {\n  req[NEXT_REQUEST_META] = meta\n  return meta\n}\n\n/**\n * Adds a value to the request metadata.\n *\n * @param request the request to mutate\n * @param key the key to set\n * @param value the value to set\n * @returns the mutated request metadata\n */\nexport function addRequestMeta<K extends keyof RequestMeta>(\n  request: NextIncomingMessage,\n  key: K,\n  value: RequestMeta[K]\n) {\n  const meta = getRequestMeta(request)\n  meta[key] = value\n  return setRequestMeta(request, meta)\n}\n\n/**\n * Removes a key from the request metadata.\n *\n * @param request the request to mutate\n * @param key the key to remove\n * @returns the mutated request metadata\n */\nexport function removeRequestMeta<K extends keyof RequestMeta>(\n  request: NextIncomingMessage,\n  key: K\n) {\n  const meta = getRequestMeta(request)\n  delete meta[key]\n  return setRequestMeta(request, meta)\n}\n\ntype NextQueryMetadata = {\n  /**\n   * The `_rsc` query parameter used for cache busting to ensure that the RSC\n   * requests do not get cached by the browser explicitly.\n   */\n  [NEXT_RSC_UNION_QUERY]?: string\n}\n\nexport type NextParsedUrlQuery = ParsedUrlQuery & NextQueryMetadata\n\n/**\n * subset of `url.parse` return value\n */\ninterface LegacyUrl {\n  auth?: string | null\n  hash: string | null\n  hostname: string | null\n  href: string\n  pathname: string | null\n  protocol: string | null\n  search: string | null\n  slashes: boolean | null\n  port: string | null\n  query: string | null | ParsedUrlQuery\n}\ninterface LegacyUrlWithParsedQuery extends LegacyUrl {\n  query: ParsedUrlQuery\n}\n\n// TODO: Remove in favor of WHATWG URLs\nexport interface NextUrlWithParsedQuery extends LegacyUrlWithParsedQuery {\n  query: NextParsedUrlQuery\n}\n","/**\n * A `Promise.withResolvers` implementation that exposes the `resolve` and\n * `reject` functions on a `Promise`.\n *\n * @see https://tc39.es/proposal-promise-with-resolvers/\n */\nexport class DetachedPromise<T = any> {\n  public readonly resolve: (value: T | PromiseLike<T>) => void\n  public readonly reject: (reason: any) => void\n  public readonly promise: Promise<T>\n\n  constructor() {\n    let resolve: (value: T | PromiseLike<T>) => void\n    let reject: (reason: any) => void\n\n    // Create the promise and assign the resolvers to the object.\n    this.promise = new Promise<T>((res, rej) => {\n      resolve = res\n      reject = rej\n    })\n\n    // We know that resolvers is defined because the Promise constructor runs\n    // synchronously.\n    this.resolve = resolve!\n    this.reject = reject!\n  }\n}\n","export const ENCODED_TAGS = {\n  // opening tags do not have the closing `>` since they can contain other attributes such as `<body className=''>`\n  OPENING: {\n    // <html\n    HTML: new Uint8Array([60, 104, 116, 109, 108]),\n    // <head\n    HEAD: new Uint8Array([60, 104, 101, 97, 100]),\n    // <body\n    BODY: new Uint8Array([60, 98, 111, 100, 121]),\n  },\n  CLOSED: {\n    // </head>\n    HEAD: new Uint8Array([60, 47, 104, 101, 97, 100, 62]),\n    // </body>\n    BODY: new Uint8Array([60, 47, 98, 111, 100, 121, 62]),\n    // </html>\n    HTML: new Uint8Array([60, 47, 104, 116, 109, 108, 62]),\n    // </body></html>\n    BODY_AND_HTML: new Uint8Array([\n      60, 47, 98, 111, 100, 121, 62, 60, 47, 104, 116, 109, 108, 62,\n    ]),\n  },\n  META: {\n    // Only the match the prefix cause the suffix can be different wether it's xml compatible or not \">\" or \"/>\"\n    // <meta name=\"«nxt-icon»\"\n    // This is a special mark that will be replaced by the icon insertion script tag.\n    ICON_MARK: new Uint8Array([\n      60, 109, 101, 116, 97, 32, 110, 97, 109, 101, 61, 34, 194, 171, 110, 120,\n      116, 45, 105, 99, 111, 110, 194, 187, 34,\n    ]),\n  },\n} as const\n","/**\n * Find the starting index of Uint8Array `b` within Uint8Array `a`.\n */\nexport function indexOfUint8Array(a: Uint8Array, b: Uint8Array) {\n  if (b.length === 0) return 0\n  if (a.length === 0 || b.length > a.length) return -1\n\n  // Use Node's native implementation when available.\n  if (typeof Buffer !== 'undefined') {\n    const haystack = Buffer.isBuffer(a)\n      ? a\n      : Buffer.from(a.buffer, a.byteOffset, a.byteLength)\n    return haystack.indexOf(b)\n  }\n\n  // start iterating through `a`\n  for (let i = 0; i <= a.length - b.length; i++) {\n    let completeMatch = true\n    // from index `i`, iterate through `b` and check for mismatch\n    for (let j = 0; j < b.length; j++) {\n      // if the values do not match, then this isn't a complete match, exit `b` iteration early and iterate to next index of `a`.\n      if (a[i + j] !== b[j]) {\n        completeMatch = false\n        break\n      }\n    }\n\n    if (completeMatch) {\n      return i\n    }\n  }\n\n  return -1\n}\n\n/**\n * Check if two Uint8Arrays are strictly equivalent.\n */\nexport function isEquivalentUint8Arrays(a: Uint8Array, b: Uint8Array) {\n  if (a.length !== b.length) return false\n\n  for (let i = 0; i < a.length; i++) {\n    if (a[i] !== b[i]) return false\n  }\n\n  return true\n}\n\n/**\n * Remove Uint8Array `b` from Uint8Array `a`.\n *\n * If `b` is not in `a`, `a` is returned unchanged.\n *\n * Otherwise, the function returns a new Uint8Array instance with size `a.length - b.length`\n */\nexport function removeFromUint8Array(a: Uint8Array, b: Uint8Array) {\n  const tagIndex = indexOfUint8Array(a, b)\n  if (tagIndex === 0) return a.subarray(b.length)\n  if (tagIndex > -1) {\n    const removed = new Uint8Array(a.length - b.length)\n    removed.set(a.subarray(0, tagIndex))\n    removed.set(a.subarray(tagIndex + b.length), tagIndex)\n    return removed\n  } else {\n    return a\n  }\n}\n","import type { ReactDOMServerReadableStream } from 'react-dom/server'\nimport { getTracer } from '../lib/trace/tracer'\nimport { AppRenderSpan } from '../lib/trace/constants'\nimport { DetachedPromise } from '../../lib/detached-promise'\nimport {\n  scheduleImmediate,\n  atLeastOneTask,\n  waitAtLeastOneReactRenderTask,\n} from '../../lib/scheduler'\nimport { ENCODED_TAGS } from './encoded-tags'\nimport {\n  indexOfUint8Array,\n  isEquivalentUint8Arrays,\n  removeFromUint8Array,\n} from './uint8array-helpers'\nimport { MISSING_ROOT_TAGS_ERROR } from '../../shared/lib/errors/constants'\nimport {\n  RSC_HEADER,\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  NEXT_RSC_UNION_QUERY,\n  NEXT_INSTANT_PREFETCH_HEADER,\n} from '../../client/components/app-router-headers'\nimport { computeCacheBustingSearchParam } from '../../shared/lib/router/utils/cache-busting-search-param'\n\nfunction voidCatch() {\n  // this catcher is designed to be used with pipeTo where we expect the underlying\n  // pipe implementation to forward errors but we don't want the pipeTo promise to reject\n  // and be unhandled\n}\n\n// We can share the same encoder instance everywhere\n// Notably we cannot do the same for TextDecoder because it is stateful\n// when handling streaming data\nconst encoder = new TextEncoder()\n\nexport function chainStreams<T>(\n  ...streams: ReadableStream<T>[]\n): ReadableStream<T> {\n  // If we have no streams, return an empty stream. This behavior is\n  // intentional as we're now providing the `RenderResult.EMPTY` value.\n  if (streams.length === 0) {\n    return new ReadableStream<T>({\n      start(controller) {\n        controller.close()\n      },\n    })\n  }\n\n  // If we only have 1 stream we fast path it by returning just this stream\n  if (streams.length === 1) {\n    return streams[0]\n  }\n\n  const { readable, writable } = new TransformStream()\n\n  // We always initiate pipeTo immediately. We know we have at least 2 streams\n  // so we need to avoid closing the writable when this one finishes.\n  let promise = streams[0].pipeTo(writable, { preventClose: true })\n\n  let i = 1\n  for (; i < streams.length - 1; i++) {\n    const nextStream = streams[i]\n    promise = promise.then(() =>\n      nextStream.pipeTo(writable, { preventClose: true })\n    )\n  }\n\n  // We can omit the length check because we halted before the last stream and there\n  // is at least two streams so the lastStream here will always be defined\n  const lastStream = streams[i]\n  promise = promise.then(() => lastStream.pipeTo(writable))\n\n  // Catch any errors from the streams and ignore them, they will be handled\n  // by whatever is consuming the readable stream.\n  promise.catch(voidCatch)\n\n  return readable\n}\n\nexport function streamFromString(str: string): ReadableStream<Uint8Array> {\n  return new ReadableStream({\n    start(controller) {\n      controller.enqueue(encoder.encode(str))\n      controller.close()\n    },\n  })\n}\n\nexport function streamFromBuffer(chunk: Buffer): ReadableStream<Uint8Array> {\n  return new ReadableStream({\n    start(controller) {\n      controller.enqueue(chunk)\n      controller.close()\n    },\n  })\n}\n\nasync function streamToChunks(\n  stream: ReadableStream<Uint8Array>\n): Promise<Array<Uint8Array>> {\n  const reader = stream.getReader()\n  const chunks: Array<Uint8Array> = []\n\n  while (true) {\n    const { done, value } = await reader.read()\n    if (done) {\n      break\n    }\n\n    chunks.push(value)\n  }\n\n  return chunks\n}\n\nfunction concatUint8Arrays(chunks: Array<Uint8Array>): Uint8Array {\n  const totalLength = chunks.reduce((sum, chunk) => sum + chunk.length, 0)\n  const result = new Uint8Array(totalLength)\n  let offset = 0\n  for (const chunk of chunks) {\n    result.set(chunk, offset)\n    offset += chunk.length\n  }\n  return result\n}\n\nexport async function streamToUint8Array(\n  stream: ReadableStream<Uint8Array>\n): Promise<Uint8Array> {\n  return concatUint8Arrays(await streamToChunks(stream))\n}\n\nexport async function streamToBuffer(\n  stream: ReadableStream<Uint8Array>\n): Promise<Buffer> {\n  return Buffer.concat(await streamToChunks(stream))\n}\n\nexport async function streamToString(\n  stream: ReadableStream<Uint8Array>,\n  signal?: AbortSignal\n): Promise<string> {\n  const decoder = new TextDecoder('utf-8', { fatal: true })\n  let string = ''\n\n  for await (const chunk of stream) {\n    if (signal?.aborted) {\n      return string\n    }\n\n    string += decoder.decode(chunk, { stream: true })\n  }\n\n  string += decoder.decode()\n\n  return string\n}\n\nexport type BufferedTransformOptions = {\n  /**\n   * Flush synchronously once the buffer reaches this many bytes.\n   */\n  readonly maxBufferByteLength?: number\n}\n\nexport function createBufferedTransformStream(\n  options: BufferedTransformOptions = {}\n): TransformStream<Uint8Array, Uint8Array> {\n  const { maxBufferByteLength = Infinity } = options\n\n  let bufferedChunks: Array<Uint8Array> = []\n  let bufferByteLength: number = 0\n  let pending: DetachedPromise<void> | undefined\n\n  const flush = (controller: TransformStreamDefaultController) => {\n    try {\n      if (bufferedChunks.length === 0) {\n        return\n      }\n\n      const chunk = new Uint8Array(bufferByteLength)\n      let copiedBytes = 0\n\n      for (let i = 0; i < bufferedChunks.length; i++) {\n        const bufferedChunk = bufferedChunks[i]\n        chunk.set(bufferedChunk, copiedBytes)\n        copiedBytes += bufferedChunk.byteLength\n      }\n      // We just wrote all the buffered chunks so we need to reset the bufferedChunks array\n      // and our bufferByteLength to prepare for the next round of buffered chunks\n      bufferedChunks.length = 0\n      bufferByteLength = 0\n      controller.enqueue(chunk)\n    } catch {\n      // If an error occurs while enqueuing, it can't be due to this\n      // transformer. It's most likely caused by the controller having been\n      // errored (for example, if the stream was cancelled).\n    }\n  }\n\n  const scheduleFlush = (controller: TransformStreamDefaultController) => {\n    if (pending) {\n      return\n    }\n\n    const detached = new DetachedPromise<void>()\n    pending = detached\n\n    scheduleImmediate(() => {\n      try {\n        flush(controller)\n      } finally {\n        pending = undefined\n        detached.resolve()\n      }\n    })\n  }\n\n  return new TransformStream({\n    transform(chunk, controller) {\n      // Combine the previous buffer with the new chunk.\n      bufferedChunks.push(chunk)\n      bufferByteLength += chunk.byteLength\n\n      if (bufferByteLength >= maxBufferByteLength) {\n        flush(controller)\n      } else {\n        scheduleFlush(controller)\n      }\n    },\n    flush() {\n      return pending?.promise\n    },\n  })\n}\n\n// TODO this is currently unused but once we add proper output:export support, it needs to be\n// revisited. See https://github.com/vercel/next.js/pull/89478 for more details\n//\n// function createPrefetchCommentStream(\n//   isBuildTimePrerendering: boolean,\n//   buildId: string\n// ): TransformStream<Uint8Array, Uint8Array> {\n//   // Insert an extra comment at the beginning of the HTML document. This must\n//   // come after the DOCTYPE, which is inserted by React.\n//   //\n//   // The first chunk sent by React will contain the doctype. After that, we can\n//   // pass through the rest of the chunks as-is.\n//   let didTransformFirstChunk = false\n//   return new TransformStream({\n//     transform(chunk, controller) {\n//       if (isBuildTimePrerendering && !didTransformFirstChunk) {\n//         didTransformFirstChunk = true\n//         const decoder = new TextDecoder('utf-8', { fatal: true })\n//         const chunkStr = decoder.decode(chunk, {\n//           stream: true,\n//         })\n//         const updatedChunkStr = insertBuildIdComment(chunkStr, buildId)\n//         controller.enqueue(encoder.encode(updatedChunkStr))\n//         return\n//       }\n//       controller.enqueue(chunk)\n//     },\n//   })\n// }\n\nexport function renderToInitialFizzStream({\n  ReactDOMServer,\n  element,\n  streamOptions,\n}: {\n  ReactDOMServer: {\n    renderToReadableStream: typeof import('react-dom/server').renderToReadableStream\n  }\n  element: React.ReactElement\n  streamOptions?: Parameters<typeof ReactDOMServer.renderToReadableStream>[1]\n}): Promise<ReactDOMServerReadableStream> {\n  return getTracer().trace(AppRenderSpan.renderToReadableStream, async () =>\n    ReactDOMServer.renderToReadableStream(element, streamOptions)\n  )\n}\n\nfunction createMetadataTransformStream(\n  insert: () => Promise<string> | string\n): TransformStream<Uint8Array, Uint8Array> {\n  let chunkIndex = -1\n  let isMarkRemoved = false\n\n  return new TransformStream({\n    async transform(chunk, controller) {\n      let iconMarkIndex = -1\n      let closedHeadIndex = -1\n      chunkIndex++\n\n      if (isMarkRemoved) {\n        controller.enqueue(chunk)\n        return\n      }\n      let iconMarkLength = 0\n      // Only search for the closed head tag once\n      if (iconMarkIndex === -1) {\n        iconMarkIndex = indexOfUint8Array(chunk, ENCODED_TAGS.META.ICON_MARK)\n        if (iconMarkIndex === -1) {\n          controller.enqueue(chunk)\n          return\n        } else {\n          // When we found the `<meta name=\"«nxt-icon»\"` tag prefix, we will remove it from the chunk.\n          // Its close tag could either be `/>` or `>`, checking the next char to ensure we cover both cases.\n          iconMarkLength = ENCODED_TAGS.META.ICON_MARK.length\n          // Check if next char is /, this is for xml mode.\n          if (chunk[iconMarkIndex + iconMarkLength] === 47) {\n            iconMarkLength += 2\n          } else {\n            // The last char is `>`\n            iconMarkLength++\n          }\n        }\n      }\n\n      // Check if icon mark is inside <head> tag in the first chunk.\n      if (chunkIndex === 0) {\n        closedHeadIndex = indexOfUint8Array(chunk, ENCODED_TAGS.CLOSED.HEAD)\n        if (iconMarkIndex !== -1) {\n          // The mark icon is located in the 1st chunk before the head tag.\n          // We do not need to insert the script tag in this case because it's in the head.\n          // Just remove the icon mark from the chunk.\n          if (iconMarkIndex < closedHeadIndex) {\n            const replaced = new Uint8Array(chunk.length - iconMarkLength)\n\n            // Remove the icon mark from the chunk.\n            replaced.set(chunk.subarray(0, iconMarkIndex))\n            replaced.set(\n              chunk.subarray(iconMarkIndex + iconMarkLength),\n              iconMarkIndex\n            )\n            chunk = replaced\n          } else {\n            // The icon mark is after the head tag, replace and insert the script tag at that position.\n            const insertion = await insert()\n            const encodedInsertion = encoder.encode(insertion)\n            const insertionLength = encodedInsertion.length\n            const replaced = new Uint8Array(\n              chunk.length - iconMarkLength + insertionLength\n            )\n            replaced.set(chunk.subarray(0, iconMarkIndex))\n            replaced.set(encodedInsertion, iconMarkIndex)\n            replaced.set(\n              chunk.subarray(iconMarkIndex + iconMarkLength),\n              iconMarkIndex + insertionLength\n            )\n            chunk = replaced\n          }\n          isMarkRemoved = true\n        }\n        // If there's no icon mark located, it will be handled later when if present in the following chunks.\n      } else {\n        // When it's appeared in the following chunks, we'll need to\n        // remove the mark and then insert the script tag at that position.\n        const insertion = await insert()\n        const encodedInsertion = encoder.encode(insertion)\n        const insertionLength = encodedInsertion.length\n        // Replace the icon mark with the hoist script or empty string.\n        const replaced = new Uint8Array(\n          chunk.length - iconMarkLength + insertionLength\n        )\n        // Set the first part of the chunk, before the icon mark.\n        replaced.set(chunk.subarray(0, iconMarkIndex))\n        // Set the insertion after the icon mark.\n        replaced.set(encodedInsertion, iconMarkIndex)\n\n        // Set the rest of the chunk after the icon mark.\n        replaced.set(\n          chunk.subarray(iconMarkIndex + iconMarkLength),\n          iconMarkIndex + insertionLength\n        )\n        chunk = replaced\n        isMarkRemoved = true\n      }\n      controller.enqueue(chunk)\n    },\n  })\n}\n\nfunction createHeadInsertionTransformStream(\n  insert: () => Promise<string>\n): TransformStream<Uint8Array, Uint8Array> {\n  let inserted = false\n\n  // We need to track if this transform saw any bytes because if it didn't\n  // we won't want to insert any server HTML at all\n  let hasBytes = false\n\n  return new TransformStream({\n    async transform(chunk, controller) {\n      hasBytes = true\n\n      const insertion = await insert()\n      if (inserted) {\n        if (insertion) {\n          const encodedInsertion = encoder.encode(insertion)\n          controller.enqueue(encodedInsertion)\n        }\n        controller.enqueue(chunk)\n      } else {\n        // TODO (@Ethan-Arrowood): Replace the generic `indexOfUint8Array` method with something finely tuned for the subset of things actually being checked for.\n        const index = indexOfUint8Array(chunk, ENCODED_TAGS.CLOSED.HEAD)\n        // In fully static rendering or non PPR rendering cases:\n        // `/head>` will always be found in the chunk in first chunk rendering.\n        if (index !== -1) {\n          if (insertion) {\n            const encodedInsertion = encoder.encode(insertion)\n            // Get the total count of the bytes in the chunk and the insertion\n            // e.g.\n            // chunk = <head><meta charset=\"utf-8\"></head>\n            // insertion = <script>...</script>\n            // output = <head><meta charset=\"utf-8\"> [ <script>...</script> ] </head>\n            const insertedHeadContent = new Uint8Array(\n              chunk.length + encodedInsertion.length\n            )\n            // Append the first part of the chunk, before the head tag\n            insertedHeadContent.set(chunk.slice(0, index))\n            // Append the server inserted content\n            insertedHeadContent.set(encodedInsertion, index)\n            // Append the rest of the chunk\n            insertedHeadContent.set(\n              chunk.slice(index),\n              index + encodedInsertion.length\n            )\n            controller.enqueue(insertedHeadContent)\n          } else {\n            controller.enqueue(chunk)\n          }\n          inserted = true\n        } else {\n          // This will happens in PPR rendering during next start, when the page is partially rendered.\n          // When the page resumes, the head tag will be found in the middle of the chunk.\n          // Where we just need to append the insertion and chunk to the current stream.\n          // e.g.\n          // PPR-static: <head>...</head><body> [ resume content ] </body>\n          // PPR-resume: [ insertion ] [ rest content ]\n          if (insertion) {\n            controller.enqueue(encoder.encode(insertion))\n          }\n          controller.enqueue(chunk)\n          inserted = true\n        }\n      }\n    },\n    async flush(controller) {\n      // Check before closing if there's anything remaining to insert.\n      if (hasBytes) {\n        const insertion = await insert()\n        if (insertion) {\n          controller.enqueue(encoder.encode(insertion))\n        }\n      }\n    },\n  })\n}\n\nfunction createClientResumeScriptInsertionTransformStream(): TransformStream<\n  Uint8Array,\n  Uint8Array\n> {\n  const segmentPath = '/_full'\n  const cacheBustingHeader = computeCacheBustingSearchParam(\n    '1', //            headers[NEXT_ROUTER_PREFETCH_HEADER]\n    '/_full', //       headers[NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]\n    undefined, //      headers[NEXT_ROUTER_STATE_TREE_HEADER]\n    undefined //       headers[NEXT_URL]\n  )\n  const searchStr = `${NEXT_RSC_UNION_QUERY}=${cacheBustingHeader}`\n  const NEXT_CLIENT_RESUME_SCRIPT = `<script>__NEXT_CLIENT_RESUME=fetch(location.pathname+'?${searchStr}',{credentials:'same-origin',headers:{'${RSC_HEADER}': '1','${NEXT_ROUTER_PREFETCH_HEADER}': '1','${NEXT_ROUTER_SEGMENT_PREFETCH_HEADER}': '${segmentPath}'}})</script>`\n\n  let didAlreadyInsert = false\n  return new TransformStream({\n    transform(chunk, controller) {\n      if (didAlreadyInsert) {\n        // Already inserted the script into the head. Pass through.\n        controller.enqueue(chunk)\n        return\n      }\n      // TODO (@Ethan-Arrowood): Replace the generic `indexOfUint8Array` method with something finely tuned for the subset of things actually being checked for.\n      const headClosingTagIndex = indexOfUint8Array(\n        chunk,\n        ENCODED_TAGS.CLOSED.HEAD\n      )\n\n      if (headClosingTagIndex === -1) {\n        // In fully static rendering or non PPR rendering cases:\n        // `/head>` will always be found in the chunk in first chunk rendering.\n        controller.enqueue(chunk)\n        return\n      }\n\n      const encodedInsertion = encoder.encode(NEXT_CLIENT_RESUME_SCRIPT)\n      // Get the total count of the bytes in the chunk and the insertion\n      // e.g.\n      // chunk = <head><meta charset=\"utf-8\"></head>\n      // insertion = <script>...</script>\n      // output = <head><meta charset=\"utf-8\"> [ <script>...</script> ] </head>\n      const insertedHeadContent = new Uint8Array(\n        chunk.length + encodedInsertion.length\n      )\n      // Append the first part of the chunk, before the head tag\n      insertedHeadContent.set(chunk.slice(0, headClosingTagIndex))\n      // Append the server inserted content\n      insertedHeadContent.set(encodedInsertion, headClosingTagIndex)\n      // Append the rest of the chunk\n      insertedHeadContent.set(\n        chunk.slice(headClosingTagIndex),\n        headClosingTagIndex + encodedInsertion.length\n      )\n\n      controller.enqueue(insertedHeadContent)\n      didAlreadyInsert = true\n    },\n  })\n}\n\n/**\n * Creates a transform stream that injects an inline script as the first\n * element inside <head>. Used during instant navigation testing to set\n * self.__next_instant_test before any async bootstrap scripts execute.\n */\nexport function createInstantTestScriptInsertionTransformStream(\n  requestId: string | null\n): TransformStream<Uint8Array, Uint8Array> {\n  // Kick off a fetch for the static RSC payload. This is the hydration\n  // source for the locked static shell — same as the __NEXT_CLIENT_RESUME\n  // fetch used for fallback routes, but with NEXT_INSTANT_PREFETCH_HEADER\n  // so the server returns static-only data.\n  //\n  // The fetch promise is stored as self.__next_instant_test, which doubles\n  // as the feature flag (truthy = instant test mode). The client processes\n  // this as a fallback prerender payload for hydration.\n  const segmentPath = '/_full'\n  const cacheBustingHeader = computeCacheBustingSearchParam(\n    '1',\n    segmentPath,\n    undefined,\n    undefined\n  )\n  const searchStr = `${NEXT_RSC_UNION_QUERY}=${cacheBustingHeader}`\n  // In dev mode, inject self.__next_r (request ID) so that HMR WebSocket\n  // and debug channel initialization don't crash. The static shell\n  // bypasses renderToFizzStream which normally injects this via\n  // bootstrapScriptContent.\n  const requestIdScript =\n    requestId !== null ? `self.__next_r=${JSON.stringify(requestId)};` : ''\n  const INSTANT_TEST_SCRIPT = `<script>${requestIdScript}self.__next_instant_test=fetch(location.pathname+'?${searchStr}',{credentials:'same-origin',headers:{'${RSC_HEADER}':'1','${NEXT_ROUTER_PREFETCH_HEADER}':'1','${NEXT_ROUTER_SEGMENT_PREFETCH_HEADER}':'${segmentPath}','${NEXT_INSTANT_PREFETCH_HEADER}':'1'}})</script>`\n\n  let didAlreadyInsert = false\n  return new TransformStream({\n    transform(chunk, controller) {\n      if (didAlreadyInsert) {\n        // Already inserted the script into the head. Pass through.\n        controller.enqueue(chunk)\n        return\n      }\n\n      // Find the opening <head tag (may have attributes like <head class=\"...\">)\n      const headOpenIndex = indexOfUint8Array(chunk, ENCODED_TAGS.OPENING.HEAD)\n\n      if (headOpenIndex === -1) {\n        controller.enqueue(chunk)\n        return\n      }\n\n      // Find the closing > of the <head ...> tag\n      const headCloseAngle = chunk.indexOf(\n        62, // '>'\n        headOpenIndex + ENCODED_TAGS.OPENING.HEAD.length\n      )\n      if (headCloseAngle === -1) {\n        controller.enqueue(chunk)\n        return\n      }\n\n      const encodedInsertion = encoder.encode(INSTANT_TEST_SCRIPT)\n      const insertionPoint = headCloseAngle + 1\n      // e.g.\n      // chunk = <!DOCTYPE html><html><head><meta charset=\"utf-8\">...\n      // insertion = <script>self.__next_instant_test=fetch(...)</script>\n      // output = <!DOCTYPE html><html><head> [ <script>...</script> ] <meta charset=\"utf-8\">...\n      const insertedHeadContent = new Uint8Array(\n        chunk.length + encodedInsertion.length\n      )\n      insertedHeadContent.set(chunk.slice(0, insertionPoint))\n      insertedHeadContent.set(encodedInsertion, insertionPoint)\n      insertedHeadContent.set(\n        chunk.slice(insertionPoint),\n        insertionPoint + encodedInsertion.length\n      )\n\n      controller.enqueue(insertedHeadContent)\n      didAlreadyInsert = true\n    },\n    flush(controller) {\n      // Append closing tags so the browser can parse the full document.\n      controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML)\n    },\n  })\n}\n\n// Suffix after main body content - scripts before </body>,\n// but wait for the major chunks to be enqueued.\nfunction createDeferredSuffixStream(\n  suffix: string\n): TransformStream<Uint8Array, Uint8Array> {\n  let flushed = false\n  let pending: DetachedPromise<void> | undefined\n\n  const flush = (controller: TransformStreamDefaultController) => {\n    const detached = new DetachedPromise<void>()\n    pending = detached\n\n    scheduleImmediate(() => {\n      try {\n        controller.enqueue(encoder.encode(suffix))\n      } catch {\n        // If an error occurs while enqueuing it can't be due to this\n        // transformers fault. It's likely due to the controller being\n        // errored due to the stream being cancelled.\n      } finally {\n        pending = undefined\n        detached.resolve()\n      }\n    })\n  }\n\n  return new TransformStream({\n    transform(chunk, controller) {\n      controller.enqueue(chunk)\n\n      // If we've already flushed, we're done.\n      if (flushed) return\n\n      // Schedule the flush to happen.\n      flushed = true\n      flush(controller)\n    },\n    flush(controller) {\n      if (pending) return pending.promise\n      if (flushed) return\n\n      // Flush now.\n      controller.enqueue(encoder.encode(suffix))\n    },\n  })\n}\n\nfunction createFlightDataInjectionTransformStream(\n  stream: ReadableStream<Uint8Array>,\n  delayDataUntilFirstHtmlChunk: boolean\n): TransformStream<Uint8Array, Uint8Array> {\n  let htmlStreamFinished = false\n\n  let pull: Promise<void> | null = null\n  let donePulling = false\n\n  function startOrContinuePulling(\n    controller: TransformStreamDefaultController\n  ) {\n    if (!pull) {\n      pull = startPulling(controller)\n    }\n    return pull\n  }\n\n  async function startPulling(controller: TransformStreamDefaultController) {\n    const reader = stream.getReader()\n\n    if (delayDataUntilFirstHtmlChunk) {\n      // NOTE: streaming flush\n      // We are buffering here for the inlined data stream because the\n      // \"shell\" stream might be chunkenized again by the underlying stream\n      // implementation, e.g. with a specific high-water mark. To ensure it's\n      // the safe timing to pipe the data stream, this extra tick is\n      // necessary.\n\n      // We don't start reading until we've left the current Task to ensure\n      // that it's inserted after flushing the shell. Note that this implementation\n      // might get stale if impl details of Fizz change in the future.\n      await atLeastOneTask()\n    }\n\n    try {\n      while (true) {\n        const { done, value } = await reader.read()\n        if (done) {\n          donePulling = true\n          return\n        }\n\n        // We want to prioritize HTML over RSC data.\n        // The SSR render is based on the same RSC stream, so when we get a new RSC chunk,\n        // we're likely to produce an HTML chunk as well, so give it a chance to flush first.\n        if (!delayDataUntilFirstHtmlChunk && !htmlStreamFinished) {\n          await atLeastOneTask()\n        }\n        controller.enqueue(value)\n      }\n    } catch (err) {\n      controller.error(err)\n    }\n  }\n\n  return new TransformStream({\n    start(controller) {\n      if (!delayDataUntilFirstHtmlChunk) {\n        startOrContinuePulling(controller)\n      }\n    },\n    transform(chunk, controller) {\n      controller.enqueue(chunk)\n\n      // Start the streaming if it hasn't already been started yet.\n      if (delayDataUntilFirstHtmlChunk) {\n        startOrContinuePulling(controller)\n      }\n    },\n    flush(controller) {\n      htmlStreamFinished = true\n      if (donePulling) {\n        return\n      }\n      return startOrContinuePulling(controller)\n    },\n  })\n}\n\nconst CLOSE_TAG = '</body></html>'\n\n/**\n * This transform stream moves the suffix to the end of the stream, so results\n * like `</body></html><script>...</script>` will be transformed to\n * `<script>...</script></body></html>`.\n */\nfunction createMoveSuffixStream(): TransformStream<Uint8Array, Uint8Array> {\n  let foundSuffix = false\n\n  return new TransformStream({\n    transform(chunk, controller) {\n      if (foundSuffix) {\n        return controller.enqueue(chunk)\n      }\n\n      const index = indexOfUint8Array(chunk, ENCODED_TAGS.CLOSED.BODY_AND_HTML)\n      if (index > -1) {\n        foundSuffix = true\n\n        // If the whole chunk is the suffix, then don't write anything, it will\n        // be written in the flush.\n        if (chunk.length === ENCODED_TAGS.CLOSED.BODY_AND_HTML.length) {\n          return\n        }\n\n        // Write out the part before the suffix.\n        const before = chunk.slice(0, index)\n        controller.enqueue(before)\n\n        // In the case where the suffix is in the middle of the chunk, we need\n        // to split the chunk into two parts.\n        if (chunk.length > ENCODED_TAGS.CLOSED.BODY_AND_HTML.length + index) {\n          // Write out the part after the suffix.\n          const after = chunk.slice(\n            index + ENCODED_TAGS.CLOSED.BODY_AND_HTML.length\n          )\n          controller.enqueue(after)\n        }\n      } else {\n        controller.enqueue(chunk)\n      }\n    },\n    flush(controller) {\n      // Even if we didn't find the suffix, the HTML is not valid if we don't\n      // add it, so insert it at the end.\n      controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML)\n    },\n  })\n}\n\nfunction createStripDocumentClosingTagsTransform(): TransformStream<\n  Uint8Array,\n  Uint8Array\n> {\n  return new TransformStream({\n    transform(chunk, controller) {\n      // We rely on the assumption that chunks will never break across a code unit.\n      // This is reasonable because we currently concat all of React's output from a single\n      // flush into one chunk before streaming it forward which means the chunk will represent\n      // a single coherent utf-8 string. This is not safe to use if we change our streaming to no\n      // longer do this large buffered chunk\n      if (\n        isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.BODY_AND_HTML) ||\n        isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.BODY) ||\n        isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.HTML)\n      ) {\n        // the entire chunk is the closing tags; return without enqueueing anything.\n        return\n      }\n\n      // We assume these tags will go at together at the end of the document and that\n      // they won't appear anywhere else in the document. This is not really a safe assumption\n      // but until we revamp our streaming infra this is a performant way to string the tags\n      chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.BODY)\n      chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.HTML)\n\n      controller.enqueue(chunk)\n    },\n  })\n}\n\nfunction createHtmlDataDplIdTransformStream(\n  dplId: string\n): TransformStream<Uint8Array, Uint8Array> {\n  let didTransform = false\n\n  return new TransformStream({\n    transform(chunk, controller) {\n      if (didTransform) {\n        controller.enqueue(chunk)\n        return\n      }\n\n      const htmlTagIndex = indexOfUint8Array(chunk, ENCODED_TAGS.OPENING.HTML)\n      if (htmlTagIndex === -1) {\n        controller.enqueue(chunk)\n        return\n      }\n\n      // Insert the data-dpl-id attribute right after \"<html \"\n      const insertionPoint = htmlTagIndex + ENCODED_TAGS.OPENING.HTML.length\n      const attribute = ` data-dpl-id=\"${dplId}\"`\n      const encodedAttribute = encoder.encode(attribute)\n      const modifiedChunk = new Uint8Array(\n        chunk.length + encodedAttribute.length\n      )\n\n      // Copy everything before the insertion point\n      modifiedChunk.set(chunk.subarray(0, insertionPoint))\n      // Insert the attribute\n      modifiedChunk.set(encodedAttribute, insertionPoint)\n      // Copy everything after\n      modifiedChunk.set(\n        chunk.subarray(insertionPoint),\n        insertionPoint + encodedAttribute.length\n      )\n\n      controller.enqueue(modifiedChunk)\n      didTransform = true\n    },\n  })\n}\n\n/*\n * Checks if the root layout is missing the html or body tags\n * and if so, it will inject a script tag to throw an error in the browser, showing the user\n * the error message in the error overlay.\n */\nexport function createRootLayoutValidatorStream(): TransformStream<\n  Uint8Array,\n  Uint8Array\n> {\n  let foundHtml = false\n  let foundBody = false\n  return new TransformStream({\n    async transform(chunk, controller) {\n      // Peek into the streamed chunk to see if the tags are present.\n      if (\n        !foundHtml &&\n        indexOfUint8Array(chunk, ENCODED_TAGS.OPENING.HTML) > -1\n      ) {\n        foundHtml = true\n      }\n\n      if (\n        !foundBody &&\n        indexOfUint8Array(chunk, ENCODED_TAGS.OPENING.BODY) > -1\n      ) {\n        foundBody = true\n      }\n\n      controller.enqueue(chunk)\n    },\n    flush(controller) {\n      const missingTags: ('html' | 'body')[] = []\n      if (!foundHtml) missingTags.push('html')\n      if (!foundBody) missingTags.push('body')\n\n      if (!missingTags.length) return\n\n      controller.enqueue(\n        encoder.encode(\n          `<html id=\"__next_error__\">\n            <template\n              data-next-error-message=\"Missing ${missingTags\n                .map((c) => `<${c}>`)\n                .join(\n                  missingTags.length > 1 ? ' and ' : ''\n                )} tags in the root layout.\\nRead more at https://nextjs.org/docs/messages/missing-root-layout-tags\"\n              data-next-error-digest=\"${MISSING_ROOT_TAGS_ERROR}\"\n              data-next-error-stack=\"\"\n            ></template>\n          `\n        )\n      )\n    },\n  })\n}\n\nfunction chainTransformers<T>(\n  readable: ReadableStream<T>,\n  transformers: ReadonlyArray<TransformStream<T, T> | null>\n): ReadableStream<T> {\n  let stream = readable\n  for (const transformer of transformers) {\n    if (!transformer) continue\n\n    stream = stream.pipeThrough(transformer)\n  }\n  return stream\n}\n\nexport type ContinueStreamOptions = {\n  inlinedDataStream: ReadableStream<Uint8Array> | undefined\n  isStaticGeneration: boolean\n  deploymentId: string | undefined\n  getServerInsertedHTML: () => Promise<string>\n  getServerInsertedMetadata: () => Promise<string>\n  validateRootLayout?: boolean\n  /**\n   * Suffix to inject after the buffered data, but before the close tags.\n   */\n  suffix?: string | undefined\n}\n\nexport async function continueFizzStream(\n  renderStream: ReactDOMServerReadableStream,\n  {\n    suffix,\n    inlinedDataStream,\n    isStaticGeneration,\n    deploymentId,\n    getServerInsertedHTML,\n    getServerInsertedMetadata,\n    validateRootLayout,\n  }: ContinueStreamOptions\n): Promise<ReadableStream<Uint8Array>> {\n  // Suffix itself might contain close tags at the end, so we need to split it.\n  const suffixUnclosed = suffix ? suffix.split(CLOSE_TAG, 1)[0] : null\n\n  if (isStaticGeneration) {\n    // If we're generating static HTML we need to wait for it to resolve before continuing.\n    await renderStream.allReady\n  } else {\n    // Otherwise, we want to make sure Fizz is done with all microtasky work\n    // before we start pulling the stream and cause a flush.\n    await waitAtLeastOneReactRenderTask()\n  }\n\n  return chainTransformers(renderStream, [\n    // Buffer everything to avoid flushing too frequently\n    createBufferedTransformStream(),\n\n    // Insert data-dpl-id attribute on the html tag\n    deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,\n\n    // Transform metadata\n    createMetadataTransformStream(getServerInsertedMetadata),\n\n    // Insert suffix content\n    suffixUnclosed != null && suffixUnclosed.length > 0\n      ? createDeferredSuffixStream(suffixUnclosed)\n      : null,\n\n    // Insert the inlined data (Flight data, form state, etc.) stream into the HTML\n    inlinedDataStream\n      ? createFlightDataInjectionTransformStream(inlinedDataStream, true)\n      : null,\n\n    // Validate the root layout for missing html or body tags\n    validateRootLayout ? createRootLayoutValidatorStream() : null,\n\n    // Close tags should always be deferred to the end\n    createMoveSuffixStream(),\n\n    // Special head insertions\n    // TODO-APP: Insert server side html to end of head in app layout rendering, to avoid\n    // hydration errors. Remove this once it's ready to be handled by react itself.\n    createHeadInsertionTransformStream(getServerInsertedHTML),\n  ])\n}\n\ntype ContinueDynamicPrerenderOptions = {\n  getServerInsertedHTML: () => Promise<string>\n  getServerInsertedMetadata: () => Promise<string>\n  deploymentId: string | undefined\n}\n\nexport async function continueDynamicPrerender(\n  prerenderStream: ReadableStream<Uint8Array>,\n  {\n    getServerInsertedHTML,\n    getServerInsertedMetadata,\n    deploymentId,\n  }: ContinueDynamicPrerenderOptions\n) {\n  return chainTransformers(prerenderStream, [\n    // Buffer everything to avoid flushing too frequently\n    createBufferedTransformStream(),\n    createStripDocumentClosingTagsTransform(),\n    // Insert data-dpl-id attribute on the html tag\n    deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,\n    // Insert generated tags to head\n    createHeadInsertionTransformStream(getServerInsertedHTML),\n    // Transform metadata\n    createMetadataTransformStream(getServerInsertedMetadata),\n  ])\n}\n\ntype ContinueStaticPrerenderOptions = {\n  inlinedDataStream: ReadableStream<Uint8Array>\n  getServerInsertedHTML: () => Promise<string>\n  getServerInsertedMetadata: () => Promise<string>\n  deploymentId: string | undefined\n}\n\nexport async function continueStaticPrerender(\n  prerenderStream: ReadableStream<Uint8Array>,\n  {\n    inlinedDataStream,\n    getServerInsertedHTML,\n    getServerInsertedMetadata,\n    deploymentId,\n  }: ContinueStaticPrerenderOptions\n) {\n  return chainTransformers(prerenderStream, [\n    // Buffer everything to avoid flushing too frequently\n    createBufferedTransformStream(),\n    // Add build id comment to start of the HTML document (in export mode)\n    // Insert data-dpl-id attribute on the html tag\n    deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,\n    // Insert generated tags to head\n    createHeadInsertionTransformStream(getServerInsertedHTML),\n    // Transform metadata\n    createMetadataTransformStream(getServerInsertedMetadata),\n    // Insert the inlined data (Flight data, form state, etc.) stream into the HTML\n    createFlightDataInjectionTransformStream(inlinedDataStream, true),\n    // Close tags should always be deferred to the end\n    createMoveSuffixStream(),\n  ])\n}\n\nexport async function continueStaticFallbackPrerender(\n  prerenderStream: ReadableStream<Uint8Array>,\n  {\n    inlinedDataStream,\n    getServerInsertedHTML,\n    getServerInsertedMetadata,\n    deploymentId,\n  }: ContinueStaticPrerenderOptions\n) {\n  // Same as `continueStaticPrerender`, but also inserts an additional script\n  // to instruct the client to start fetching the hydration data as early\n  // as possible.\n  return chainTransformers(prerenderStream, [\n    // Buffer everything to avoid flushing too frequently\n    createBufferedTransformStream(),\n    // Insert data-dpl-id attribute on the html tag\n    deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,\n    // Insert generated tags to head\n    createHeadInsertionTransformStream(getServerInsertedHTML),\n    // Insert the client resume script into the head\n    createClientResumeScriptInsertionTransformStream(),\n    // Transform metadata\n    createMetadataTransformStream(getServerInsertedMetadata),\n    // Insert the inlined data (Flight data, form state, etc.) stream into the HTML\n    createFlightDataInjectionTransformStream(inlinedDataStream, true),\n    // Close tags should always be deferred to the end\n    createMoveSuffixStream(),\n  ])\n}\n\ntype ContinueResumeOptions = {\n  inlinedDataStream: ReadableStream<Uint8Array>\n  getServerInsertedHTML: () => Promise<string>\n  getServerInsertedMetadata: () => Promise<string>\n  delayDataUntilFirstHtmlChunk: boolean\n  deploymentId: string | undefined\n}\n\nexport async function continueDynamicHTMLResume(\n  renderStream: ReadableStream<Uint8Array>,\n  {\n    delayDataUntilFirstHtmlChunk,\n    inlinedDataStream,\n    getServerInsertedHTML,\n    getServerInsertedMetadata,\n    deploymentId,\n  }: ContinueResumeOptions\n) {\n  return chainTransformers(renderStream, [\n    // Buffer everything to avoid flushing too frequently\n    createBufferedTransformStream(),\n    // Insert data-dpl-id attribute on the html tag\n    deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,\n    // Insert generated tags to head\n    createHeadInsertionTransformStream(getServerInsertedHTML),\n    // Transform metadata\n    createMetadataTransformStream(getServerInsertedMetadata),\n    // Insert the inlined data (Flight data, form state, etc.) stream into the HTML\n    createFlightDataInjectionTransformStream(\n      inlinedDataStream,\n      delayDataUntilFirstHtmlChunk\n    ),\n    // Close tags should always be deferred to the end\n    createMoveSuffixStream(),\n  ])\n}\n\nexport function createDocumentClosingStream(): ReadableStream<Uint8Array> {\n  return streamFromString(CLOSE_TAG)\n}\n\n// ---------------------------------------------------------------------------\n// Runtime prefetch transform (Web streams)\n// ---------------------------------------------------------------------------\n\n/**\n * Web TransformStream that replaces the runtime prefetch sentinel in an RSC\n * payload stream: `[<sentinel>]` -> `[<isPartial>,<staleTime>]`.\n *\n * This is the web equivalent of createRuntimePrefetchNodeTransform\n * in node-stream-helpers.ts.\n */\nexport function createRuntimePrefetchTransformStream(\n  sentinel: number,\n  isPartial: boolean,\n  staleTime: number\n): TransformStream<Uint8Array, Uint8Array> {\n  const enc = new TextEncoder()\n\n  // Search for: [<sentinel>]\n  // Replace with: [<isPartial>,<staleTime>]\n  const search = enc.encode(`[${sentinel}]`)\n  const first = search[0]\n  const replace = enc.encode(`[${isPartial},${staleTime}]`)\n  const searchLen = search.length\n\n  let currentChunk: Uint8Array | null = null\n  let found = false\n\n  function processChunk(\n    controller: TransformStreamDefaultController<Uint8Array>,\n    nextChunk: null | Uint8Array\n  ) {\n    if (found) {\n      if (nextChunk) {\n        controller.enqueue(nextChunk)\n      }\n      return\n    }\n\n    if (currentChunk) {\n      // We can't search past the index that can contain a full match\n      let exclusiveUpperBound = currentChunk.length - (searchLen - 1)\n      if (nextChunk) {\n        // If we have any overflow bytes we can search up to the chunk's final byte\n        exclusiveUpperBound += Math.min(nextChunk.length, searchLen - 1)\n      }\n      if (exclusiveUpperBound < 1) {\n        // we can't match the current chunk.\n        controller.enqueue(currentChunk)\n        currentChunk = nextChunk // advance so we don't process this chunk again\n        return\n      }\n\n      let currentIndex = currentChunk.indexOf(first)\n\n      // check the current candidate match if it is within the bounds of our search space for the currentChunk\n      candidateLoop: while (\n        -1 < currentIndex &&\n        currentIndex < exclusiveUpperBound\n      ) {\n        // We already know index 0 matches because we used indexOf to find the candidateIndex so we start at index 1\n        let matchIndex = 1\n        while (matchIndex < searchLen) {\n          const candidateIndex = currentIndex + matchIndex\n          const candidateValue =\n            candidateIndex < currentChunk.length\n              ? currentChunk[candidateIndex]\n              : // if we ever hit this condition it is because there is a nextChunk we can read from\n                nextChunk![candidateIndex - currentChunk.length]\n          if (candidateValue !== search[matchIndex]) {\n            // No match, reset and continue the search from the next position\n            currentIndex = currentChunk.indexOf(first, currentIndex + 1)\n            continue candidateLoop\n          }\n          matchIndex++\n        }\n        // We found a complete match. currentIndex is our starting point to replace the value.\n        found = true\n        // enqueue everything up to the match\n        controller.enqueue(currentChunk.subarray(0, currentIndex))\n        // enqueue the replacement value\n        controller.enqueue(replace)\n        // If there are bytes in the currentChunk after the match enqueue them\n        if (currentIndex + searchLen < currentChunk.length) {\n          controller.enqueue(currentChunk.slice(currentIndex + searchLen))\n        }\n        // If we have a next chunk we enqueue it now\n        if (nextChunk) {\n          // if replacement spills over to the next chunk we first exclude the replaced bytes\n          const overflowBytes = currentIndex + searchLen - currentChunk.length\n          const truncatedChunk =\n            overflowBytes > 0 ? nextChunk!.subarray(overflowBytes) : nextChunk\n          controller.enqueue(truncatedChunk)\n        }\n        // We are now in found mode and don't need to track currentChunk anymore\n        currentChunk = null\n        return\n      }\n      // No match found in this chunk, emit it and wait for the next one\n      controller.enqueue(currentChunk)\n    }\n\n    // Advance to the next chunk\n    currentChunk = nextChunk\n  }\n\n  return new TransformStream<Uint8Array, Uint8Array>({\n    transform(chunk, controller) {\n      processChunk(controller, chunk)\n    },\n    flush(controller) {\n      processChunk(controller, null)\n    },\n  })\n}\n","import type { OutgoingHttpHeaders } from 'http'\nimport {\n  NEXT_INTERCEPTION_MARKER_PREFIX,\n  NEXT_QUERY_PARAM_PREFIX,\n} from '../../lib/constants'\n\n/**\n * Converts a Node.js IncomingHttpHeaders object to a Headers object. Any\n * headers with multiple values will be joined with a comma and space. Any\n * headers that have an undefined value will be ignored and others will be\n * coerced to strings.\n *\n * @param nodeHeaders the headers object to convert\n * @returns the converted headers object\n */\nexport function fromNodeOutgoingHttpHeaders(\n  nodeHeaders: OutgoingHttpHeaders\n): Headers {\n  const headers = new Headers()\n  for (let [key, value] of Object.entries(nodeHeaders)) {\n    const values = Array.isArray(value) ? value : [value]\n    for (let v of values) {\n      if (typeof v === 'undefined') continue\n      if (typeof v === 'number') {\n        v = v.toString()\n      }\n\n      headers.append(key, v)\n    }\n  }\n  return headers\n}\n\n/*\n  Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas\n  that are within a single set-cookie field-value, such as in the Expires portion.\n  This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2\n  Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128\n  React Native's fetch does this for *every* header, including set-cookie.\n  \n  Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25\n  Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation\n*/\nexport function splitCookiesString(cookiesString: string) {\n  var cookiesStrings = []\n  var pos = 0\n  var start\n  var ch\n  var lastComma\n  var nextStart\n  var cookiesSeparatorFound\n\n  function skipWhitespace() {\n    while (pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))) {\n      pos += 1\n    }\n    return pos < cookiesString.length\n  }\n\n  function notSpecialChar() {\n    ch = cookiesString.charAt(pos)\n\n    return ch !== '=' && ch !== ';' && ch !== ','\n  }\n\n  while (pos < cookiesString.length) {\n    start = pos\n    cookiesSeparatorFound = false\n\n    while (skipWhitespace()) {\n      ch = cookiesString.charAt(pos)\n      if (ch === ',') {\n        // ',' is a cookie separator if we have later first '=', not ';' or ','\n        lastComma = pos\n        pos += 1\n\n        skipWhitespace()\n        nextStart = pos\n\n        while (pos < cookiesString.length && notSpecialChar()) {\n          pos += 1\n        }\n\n        // currently special character\n        if (pos < cookiesString.length && cookiesString.charAt(pos) === '=') {\n          // we found cookies separator\n          cookiesSeparatorFound = true\n          // pos is inside the next cookie, so back up and return it.\n          pos = nextStart\n          cookiesStrings.push(cookiesString.substring(start, lastComma))\n          start = pos\n        } else {\n          // in param ',' or param separator ';',\n          // we continue from that comma\n          pos = lastComma + 1\n        }\n      } else {\n        pos += 1\n      }\n    }\n\n    if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n      cookiesStrings.push(cookiesString.substring(start, cookiesString.length))\n    }\n  }\n\n  return cookiesStrings\n}\n\n/**\n * Converts a Headers object to a Node.js OutgoingHttpHeaders object. This is\n * required to support the set-cookie header, which may have multiple values.\n *\n * @param headers the headers object to convert\n * @returns the converted headers object\n */\nexport function toNodeOutgoingHttpHeaders(\n  headers: Headers\n): OutgoingHttpHeaders {\n  const nodeHeaders: OutgoingHttpHeaders = {}\n  const cookies: string[] = []\n  if (headers) {\n    for (const [key, value] of headers.entries()) {\n      if (key.toLowerCase() === 'set-cookie') {\n        // We may have gotten a comma joined string of cookies, or multiple\n        // set-cookie headers. We need to merge them into one header array\n        // to represent all the cookies.\n        cookies.push(...splitCookiesString(value))\n        nodeHeaders[key] = cookies.length === 1 ? cookies[0] : cookies\n      } else {\n        nodeHeaders[key] = value\n      }\n    }\n  }\n  return nodeHeaders\n}\n\n/**\n * Validate the correctness of a user-provided URL.\n */\nexport function validateURL(url: string | URL): string {\n  try {\n    return String(new URL(String(url)))\n  } catch (error: any) {\n    throw new Error(\n      `URL is malformed \"${String(\n        url\n      )}\". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,\n      { cause: error }\n    )\n  }\n}\n\n/**\n * Normalizes `nxtP` and `nxtI` query param values to remove the prefix.\n * This function does not mutate the input key.\n */\nexport function normalizeNextQueryParam(key: string): null | string {\n  const prefixes = [NEXT_QUERY_PARAM_PREFIX, NEXT_INTERCEPTION_MARKER_PREFIX]\n  for (const prefix of prefixes) {\n    if (key !== prefix && key.startsWith(prefix)) {\n      return key.substring(prefix.length)\n    }\n  }\n  return null\n}\n","import type { DomainLocale } from '../../../server/config-shared'\n\nexport function detectDomainLocale(\n  domainItems?: readonly DomainLocale[],\n  hostname?: string,\n  detectedLocale?: string\n) {\n  if (!domainItems) return\n\n  if (detectedLocale) {\n    detectedLocale = detectedLocale.toLowerCase()\n  }\n\n  for (const item of domainItems) {\n    // remove port if present\n    const domainHostname = item.domain?.split(':', 1)[0].toLowerCase()\n    if (\n      hostname === domainHostname ||\n      detectedLocale === item.defaultLocale.toLowerCase() ||\n      item.locales?.some((locale) => locale.toLowerCase() === detectedLocale)\n    ) {\n      return item\n    }\n  }\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n  if (!path.startsWith('/') || !suffix) {\n    return path\n  }\n\n  const { pathname, query, hash } = parsePath(path)\n  return `${pathname}${suffix}${query}${hash}`\n}\n","import type { OutgoingHttpHeaders } from 'http'\n\n/**\n * Takes an object with a hostname property (like a parsed URL) and some\n * headers that may contain Host and returns the preferred hostname.\n * @param parsed An object containing a hostname property.\n * @param headers A dictionary with headers containing a `host`.\n */\nexport function getHostname(\n  parsed: { hostname?: string | null },\n  headers?: OutgoingHttpHeaders\n): string | undefined {\n  // Get the hostname from the headers if it exists, otherwise use the parsed\n  // hostname.\n  let hostname: string\n  if (headers?.host && !Array.isArray(headers.host)) {\n    hostname = headers.host.toString().split(':', 1)[0]\n  } else if (parsed.hostname) {\n    hostname = parsed.hostname\n  } else return\n\n  return hostname.toLowerCase()\n}\n","export interface PathLocale {\n  detectedLocale?: string\n  pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap<readonly string[], readonly string[]>()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n  pathname: string,\n  locales?: readonly string[]\n): PathLocale {\n  // If locales is undefined, return the pathname as is.\n  if (!locales) return { pathname }\n\n  // Get the cached lowercased locales or create a new cache entry.\n  let lowercasedLocales = cache.get(locales)\n  if (!lowercasedLocales) {\n    lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n    cache.set(locales, lowercasedLocales)\n  }\n\n  let detectedLocale: string | undefined\n\n  // The first segment will be empty, because it has a leading `/`. If\n  // there is no further segment, there is no locale (or it's the default).\n  const segments = pathname.split('/', 2)\n\n  // If there's no second segment (ie, the pathname is just `/`), there's no\n  // locale.\n  if (!segments[1]) return { pathname }\n\n  // The second segment will contain the locale part if any.\n  const segment = segments[1].toLowerCase()\n\n  // See if the segment matches one of the locales. If it doesn't, there is\n  // no locale (or it's the default).\n  const index = lowercasedLocales.indexOf(segment)\n  if (index < 0) return { pathname }\n\n  // Return the case-sensitive locale.\n  detectedLocale = locales[index]\n\n  // Remove the `/${locale}` part of the pathname.\n  pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n  return { pathname, detectedLocale }\n}\n","import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n  // If the path doesn't start with the prefix we can return it as is. This\n  // protects us from situations where the prefix is a substring of the path\n  // prefix such as:\n  //\n  // For prefix: /blog\n  //\n  //   /blog -> true\n  //   /blog/ -> true\n  //   /blog/1 -> true\n  //   /blogging -> false\n  //   /blogging/ -> false\n  //   /blogging/1 -> false\n  if (!pathHasPrefix(path, prefix)) {\n    return path\n  }\n\n  // Remove the prefix from the path via slicing.\n  const withoutPrefix = path.slice(prefix.length)\n\n  // If the path without the prefix starts with a `/` we can return it as is.\n  if (withoutPrefix.startsWith('/')) {\n    return withoutPrefix\n  }\n\n  // If the path without the prefix doesn't start with a `/` we need to add it\n  // back to the path to make sure it's a valid path.\n  return `/${withoutPrefix}`\n}\n","import type { OutgoingHttpHeaders } from 'http'\nimport type { DomainLocale, I18NConfig } from '../config-shared'\nimport type { I18NProvider } from '../lib/i18n-provider'\n\nimport { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale'\nimport { formatNextPathnameInfo } from '../../shared/lib/router/utils/format-next-pathname-info'\nimport { getHostname } from '../../shared/lib/get-hostname'\nimport { getNextPathnameInfo } from '../../shared/lib/router/utils/get-next-pathname-info'\n\ninterface Options {\n  base?: string | URL\n  headers?: OutgoingHttpHeaders\n  forceLocale?: boolean\n  nextConfig?: {\n    basePath?: string\n    i18n?: I18NConfig | null\n    trailingSlash?: boolean\n  }\n  i18nProvider?: I18NProvider\n}\n\nconst REGEX_LOCALHOST_HOSTNAME =\n  /^(?:127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\\[::1\\]|localhost)$/\n\nfunction parseURL(url: string | URL, base?: string | URL) {\n  const parsed = new URL(String(url), base && String(base))\n  if (REGEX_LOCALHOST_HOSTNAME.test(parsed.hostname)) {\n    parsed.hostname = 'localhost'\n  }\n  return parsed\n}\n\nconst Internal = Symbol('NextURLInternal')\n\nexport class NextURL {\n  private [Internal]: {\n    basePath: string\n    buildId?: string\n    flightSearchParameters?: Record<string, string>\n    defaultLocale?: string\n    domainLocale?: DomainLocale\n    locale?: string\n    options: Options\n    trailingSlash?: boolean\n    url: URL\n  }\n\n  constructor(input: string | URL, base?: string | URL, opts?: Options)\n  constructor(input: string | URL, opts?: Options)\n  constructor(\n    input: string | URL,\n    baseOrOpts?: string | URL | Options,\n    opts?: Options\n  ) {\n    let base: undefined | string | URL\n    let options: Options\n\n    if (\n      (typeof baseOrOpts === 'object' && 'pathname' in baseOrOpts) ||\n      typeof baseOrOpts === 'string'\n    ) {\n      base = baseOrOpts\n      options = opts || {}\n    } else {\n      options = opts || baseOrOpts || {}\n    }\n\n    this[Internal] = {\n      url: parseURL(input, base ?? options.base),\n      options: options,\n      basePath: '',\n    }\n\n    this.analyze()\n  }\n\n  private analyze() {\n    const info = getNextPathnameInfo(this[Internal].url.pathname, {\n      nextConfig: this[Internal].options.nextConfig,\n      parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,\n      i18nProvider: this[Internal].options.i18nProvider,\n    })\n\n    const hostname = getHostname(\n      this[Internal].url,\n      this[Internal].options.headers\n    )\n    this[Internal].domainLocale = this[Internal].options.i18nProvider\n      ? this[Internal].options.i18nProvider.detectDomainLocale(hostname)\n      : detectDomainLocale(\n          this[Internal].options.nextConfig?.i18n?.domains,\n          hostname\n        )\n\n    const defaultLocale =\n      this[Internal].domainLocale?.defaultLocale ||\n      this[Internal].options.nextConfig?.i18n?.defaultLocale\n\n    this[Internal].url.pathname = info.pathname\n    this[Internal].defaultLocale = defaultLocale\n    this[Internal].basePath = info.basePath ?? ''\n    this[Internal].buildId = info.buildId\n    this[Internal].locale = info.locale ?? defaultLocale\n    this[Internal].trailingSlash = info.trailingSlash\n  }\n\n  private formatPathname() {\n    return formatNextPathnameInfo({\n      basePath: this[Internal].basePath,\n      buildId: this[Internal].buildId,\n      defaultLocale: !this[Internal].options.forceLocale\n        ? this[Internal].defaultLocale\n        : undefined,\n      locale: this[Internal].locale,\n      pathname: this[Internal].url.pathname,\n      trailingSlash: this[Internal].trailingSlash,\n    })\n  }\n\n  private formatSearch() {\n    return this[Internal].url.search\n  }\n\n  public get buildId() {\n    return this[Internal].buildId\n  }\n\n  public set buildId(buildId: string | undefined) {\n    this[Internal].buildId = buildId\n  }\n\n  public get locale() {\n    return this[Internal].locale ?? ''\n  }\n\n  public set locale(locale: string) {\n    if (\n      !this[Internal].locale ||\n      !this[Internal].options.nextConfig?.i18n?.locales.includes(locale)\n    ) {\n      throw new TypeError(\n        `The NextURL configuration includes no locale \"${locale}\"`\n      )\n    }\n\n    this[Internal].locale = locale\n  }\n\n  get defaultLocale() {\n    return this[Internal].defaultLocale\n  }\n\n  get domainLocale() {\n    return this[Internal].domainLocale\n  }\n\n  get searchParams() {\n    return this[Internal].url.searchParams\n  }\n\n  get host() {\n    return this[Internal].url.host\n  }\n\n  set host(value: string) {\n    this[Internal].url.host = value\n  }\n\n  get hostname() {\n    return this[Internal].url.hostname\n  }\n\n  set hostname(value: string) {\n    this[Internal].url.hostname = value\n  }\n\n  get port() {\n    return this[Internal].url.port\n  }\n\n  set port(value: string) {\n    this[Internal].url.port = value\n  }\n\n  get protocol() {\n    return this[Internal].url.protocol\n  }\n\n  set protocol(value: string) {\n    this[Internal].url.protocol = value\n  }\n\n  get href() {\n    const pathname = this.formatPathname()\n    const search = this.formatSearch()\n    return `${this.protocol}//${this.host}${pathname}${search}${this.hash}`\n  }\n\n  set href(url: string) {\n    this[Internal].url = parseURL(url)\n    this.analyze()\n  }\n\n  get origin() {\n    return this[Internal].url.origin\n  }\n\n  get pathname() {\n    return this[Internal].url.pathname\n  }\n\n  set pathname(value: string) {\n    this[Internal].url.pathname = value\n  }\n\n  get hash() {\n    return this[Internal].url.hash\n  }\n\n  set hash(value: string) {\n    this[Internal].url.hash = value\n  }\n\n  get search() {\n    return this[Internal].url.search\n  }\n\n  set search(value: string) {\n    this[Internal].url.search = value\n  }\n\n  get password() {\n    return this[Internal].url.password\n  }\n\n  set password(value: string) {\n    this[Internal].url.password = value\n  }\n\n  get username() {\n    return this[Internal].url.username\n  }\n\n  set username(value: string) {\n    this[Internal].url.username = value\n  }\n\n  get basePath() {\n    return this[Internal].basePath\n  }\n\n  set basePath(value: string) {\n    this[Internal].basePath = value.startsWith('/') ? value : `/${value}`\n  }\n\n  toString() {\n    return this.href\n  }\n\n  toJSON() {\n    return this.href\n  }\n\n  [Symbol.for('edge-runtime.inspect.custom')]() {\n    return {\n      href: this.href,\n      origin: this.origin,\n      protocol: this.protocol,\n      username: this.username,\n      password: this.password,\n      host: this.host,\n      hostname: this.hostname,\n      port: this.port,\n      pathname: this.pathname,\n      search: this.search,\n      searchParams: this.searchParams,\n      hash: this.hash,\n    }\n  }\n\n  clone() {\n    return new NextURL(String(this), this[Internal].options)\n  }\n}\n","import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n  /**\n   * The base path in case the pathname included it.\n   */\n  basePath?: string\n  /**\n   * The buildId for when the parsed URL is a data URL. Parsing it can be\n   * disabled with the `parseData` option.\n   */\n  buildId?: string\n  /**\n   * If there was a locale in the pathname, this will hold its value.\n   */\n  locale?: string\n  /**\n   * The processed pathname without a base path, locale, or data URL elements\n   * when parsing it is enabled.\n   */\n  pathname: string\n  /**\n   * A boolean telling if the pathname had a trailingSlash. This can be only\n   * true if trailingSlash is enabled.\n   */\n  trailingSlash?: boolean\n}\n\ninterface Options {\n  /**\n   * When passed to true, this function will also parse Nextjs data URLs.\n   */\n  parseData?: boolean\n  /**\n   * A partial of the Next.js configuration to parse the URL.\n   */\n  nextConfig?: {\n    basePath?: string\n    i18n?: { locales?: readonly string[] } | null\n    trailingSlash?: boolean\n  }\n\n  /**\n   * If provided, this normalizer will be used to detect the locale instead of\n   * the default locale detection.\n   */\n  i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n  pathname: string,\n  options: Options\n): NextPathnameInfo {\n  const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n  const info: NextPathnameInfo = {\n    pathname,\n    trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n  }\n\n  if (basePath && pathHasPrefix(info.pathname, basePath)) {\n    info.pathname = removePathPrefix(info.pathname, basePath)\n    info.basePath = basePath\n  }\n  let pathnameNoDataPrefix = info.pathname\n\n  if (\n    info.pathname.startsWith('/_next/data/') &&\n    info.pathname.endsWith('.json')\n  ) {\n    const paths = info.pathname\n      .replace(/^\\/_next\\/data\\//, '')\n      .replace(/\\.json$/, '')\n      .split('/')\n\n    const buildId = paths[0]\n    info.buildId = buildId\n    pathnameNoDataPrefix =\n      paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n    // update pathname with normalized if enabled although\n    // we use normalized to populate locale info still\n    if (options.parseData === true) {\n      info.pathname = pathnameNoDataPrefix\n    }\n  }\n\n  // If provided, use the locale route normalizer to detect the locale instead\n  // of the function below.\n  if (i18n) {\n    let result = options.i18nProvider\n      ? options.i18nProvider.analyze(info.pathname)\n      : normalizeLocalePath(info.pathname, i18n.locales)\n\n    info.locale = result.detectedLocale\n    info.pathname = result.pathname ?? info.pathname\n\n    if (!result.detectedLocale && info.buildId) {\n      result = options.i18nProvider\n        ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n        : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n      if (result.detectedLocale) {\n        info.locale = result.detectedLocale\n      }\n    }\n  }\n  return info\n}\n","import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n  defaultLocale?: string\n  ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n  let pathname = addLocale(\n    info.pathname,\n    info.locale,\n    info.buildId ? undefined : info.defaultLocale,\n    info.ignorePrefix\n  )\n\n  if (info.buildId || !info.trailingSlash) {\n    pathname = removeTrailingSlash(pathname)\n  }\n\n  if (info.buildId) {\n    pathname = addPathSuffix(\n      addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n      info.pathname === '/' ? 'index.json' : '.json'\n    )\n  }\n\n  pathname = addPathPrefix(pathname, info.basePath)\n  return !info.buildId && info.trailingSlash\n    ? !pathname.endsWith('/')\n      ? addPathSuffix(pathname, '/')\n      : pathname\n    : removeTrailingSlash(pathname)\n}\n","import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n  path: string,\n  locale?: string | false,\n  defaultLocale?: string,\n  ignorePrefix?: boolean\n) {\n  // If no locale was given or the locale is the default locale, we don't need\n  // to prefix the path.\n  if (!locale || locale === defaultLocale) return path\n\n  const lower = path.toLowerCase()\n\n  // If the path is an API path or the path already has the locale prefix, we\n  // don't need to prefix the path.\n  if (!ignorePrefix) {\n    if (pathHasPrefix(lower, '/api')) return path\n    if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n  }\n\n  // Add the locale prefix to the path.\n  return addPathPrefix(path, `/${locale}`)\n}\n","import type { I18NConfig } from '../../config-shared'\nimport { NextURL } from '../next-url'\nimport { toNodeOutgoingHttpHeaders, validateURL } from '../utils'\nimport { RemovedUAError, RemovedPageError } from '../error'\nimport { RequestCookies } from './cookies'\n\nexport const INTERNALS = Symbol('internal request')\n\n/**\n * This class extends the [Web `Request` API](https://developer.mozilla.org/docs/Web/API/Request) with additional convenience methods.\n *\n * Read more: [Next.js Docs: `NextRequest`](https://nextjs.org/docs/app/api-reference/functions/next-request)\n */\nexport class NextRequest extends Request {\n  /** @internal */\n  [INTERNALS]: {\n    cookies: RequestCookies\n    url: string\n    nextUrl: NextURL\n  }\n\n  constructor(input: URL | RequestInfo, init: RequestInit = {}) {\n    const url =\n      typeof input !== 'string' && 'url' in input ? input.url : String(input)\n\n    validateURL(url)\n\n    // node Request instance requires duplex option when a body\n    // is present or it errors, we don't handle this for\n    // Request being passed in since it would have already\n    // errored if this wasn't configured\n    if (process.env.NEXT_RUNTIME !== 'edge') {\n      if (init.body && init.duplex !== 'half') {\n        init.duplex = 'half'\n      }\n    }\n\n    if (input instanceof Request) super(input, init)\n    else super(url, init)\n\n    const nextUrl = new NextURL(url, {\n      headers: toNodeOutgoingHttpHeaders(this.headers),\n      nextConfig: init.nextConfig,\n    })\n    this[INTERNALS] = {\n      cookies: new RequestCookies(this.headers),\n      nextUrl,\n      url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE\n        ? url\n        : nextUrl.toString(),\n    }\n  }\n\n  [Symbol.for('edge-runtime.inspect.custom')]() {\n    return {\n      cookies: this.cookies,\n      nextUrl: this.nextUrl,\n      url: this.url,\n      // rest of props come from Request\n      bodyUsed: this.bodyUsed,\n      cache: this.cache,\n      credentials: this.credentials,\n      destination: this.destination,\n      headers: Object.fromEntries(this.headers),\n      integrity: this.integrity,\n      keepalive: this.keepalive,\n      method: this.method,\n      mode: this.mode,\n      redirect: this.redirect,\n      referrer: this.referrer,\n      referrerPolicy: this.referrerPolicy,\n      signal: this.signal,\n    }\n  }\n\n  public get cookies() {\n    return this[INTERNALS].cookies\n  }\n\n  public get nextUrl() {\n    return this[INTERNALS].nextUrl\n  }\n\n  /**\n   * @deprecated\n   * `page` has been deprecated in favour of `URLPattern`.\n   * Read more: https://nextjs.org/docs/messages/middleware-request-page\n   */\n  public get page() {\n    throw new RemovedPageError()\n  }\n\n  /**\n   * @deprecated\n   * `ua` has been removed in favour of \\`userAgent\\` function.\n   * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n   */\n  public get ua() {\n    throw new RemovedUAError()\n  }\n\n  public get url() {\n    return this[INTERNALS].url\n  }\n}\n\nexport interface RequestInit extends globalThis.RequestInit {\n  nextConfig?: {\n    basePath?: string\n    i18n?: I18NConfig | null\n    trailingSlash?: boolean\n  }\n  signal?: AbortSignal\n  // see https://github.com/whatwg/fetch/pull/1457\n  duplex?: 'half'\n}\n","import type { BaseNextRequest } from '../../../base-http'\nimport type { NodeNextRequest } from '../../../base-http/node'\nimport type { WebNextRequest } from '../../../base-http/web'\nimport type { Writable } from 'node:stream'\n\nimport { getRequestMeta } from '../../../request-meta'\nimport { fromNodeOutgoingHttpHeaders } from '../../utils'\nimport { NextRequest } from '../request'\nimport { isNodeNextRequest, isWebNextRequest } from '../../../base-http/helpers'\n\nexport const ResponseAbortedName = 'ResponseAborted'\nexport class ResponseAborted extends Error {\n  public readonly name = ResponseAbortedName\n}\n\n/**\n * Creates an AbortController tied to the closing of a ServerResponse (or other\n * appropriate Writable).\n *\n * If the `close` event is fired before the `finish` event, then we'll send the\n * `abort` signal.\n */\nexport function createAbortController(response: Writable): AbortController {\n  const controller = new AbortController()\n\n  // If `finish` fires first, then `res.end()` has been called and the close is\n  // just us finishing the stream on our side. If `close` fires first, then we\n  // know the client disconnected before we finished.\n  response.once('close', () => {\n    if (response.writableFinished) return\n\n    controller.abort(new ResponseAborted())\n  })\n\n  return controller\n}\n\n/**\n * Creates an AbortSignal tied to the closing of a ServerResponse (or other\n * appropriate Writable).\n *\n * This cannot be done with the request (IncomingMessage or Readable) because\n * the `abort` event will not fire if to data has been fully read (because that\n * will \"close\" the readable stream and nothing fires after that).\n */\nexport function signalFromNodeResponse(response: Writable): AbortSignal {\n  const { errored, destroyed } = response\n  if (errored || destroyed) {\n    return AbortSignal.abort(errored ?? new ResponseAborted())\n  }\n\n  const { signal } = createAbortController(response)\n  return signal\n}\n\nexport class NextRequestAdapter {\n  public static fromBaseNextRequest(\n    request: BaseNextRequest,\n    signal: AbortSignal\n  ): NextRequest {\n    if (\n      // The type check here ensures that `req` is correctly typed, and the\n      // environment variable check provides dead code elimination.\n      process.env.NEXT_RUNTIME === 'edge' &&\n      isWebNextRequest(request)\n    ) {\n      return NextRequestAdapter.fromWebNextRequest(request)\n    } else if (\n      // The type check here ensures that `req` is correctly typed, and the\n      // environment variable check provides dead code elimination.\n      process.env.NEXT_RUNTIME !== 'edge' &&\n      isNodeNextRequest(request)\n    ) {\n      return NextRequestAdapter.fromNodeNextRequest(request, signal)\n    } else {\n      throw new Error('Invariant: Unsupported NextRequest type')\n    }\n  }\n\n  public static fromNodeNextRequest(\n    request: NodeNextRequest,\n    signal: AbortSignal\n  ): NextRequest {\n    // HEAD and GET requests can not have a body.\n    let body: BodyInit | null = null\n    if (request.method !== 'GET' && request.method !== 'HEAD' && request.body) {\n      // @ts-expect-error - this is handled by undici, when streams/web land use it instead\n      body = request.body\n    }\n\n    let url: URL\n    if (request.url.startsWith('http')) {\n      url = new URL(request.url)\n    } else {\n      // Grab the full URL from the request metadata.\n      const base = getRequestMeta(request, 'initURL')\n      if (!base || !base.startsWith('http')) {\n        // Because the URL construction relies on the fact that the URL provided\n        // is absolute, we need to provide a base URL. We can't use the request\n        // URL because it's relative, so we use a dummy URL instead.\n        url = new URL(request.url, 'http://n')\n      } else {\n        url = new URL(request.url, base)\n      }\n    }\n\n    return new NextRequest(url, {\n      method: request.method,\n      headers: fromNodeOutgoingHttpHeaders(request.headers),\n      duplex: 'half',\n      signal,\n      // geo\n      // ip\n      // nextConfig\n\n      // body can not be passed if request was aborted\n      // or we get a Request body was disturbed error\n      ...(signal.aborted\n        ? {}\n        : {\n            body,\n          }),\n    })\n  }\n\n  public static fromWebNextRequest(request: WebNextRequest): NextRequest {\n    // HEAD and GET requests can not have a body.\n    let body: ReadableStream | null = null\n    if (request.method !== 'GET' && request.method !== 'HEAD') {\n      body = request.body\n    }\n\n    return new NextRequest(request.url, {\n      method: request.method,\n      headers: fromNodeOutgoingHttpHeaders(request.headers),\n      duplex: 'half',\n      signal: request.request.signal,\n      // geo\n      // ip\n      // nextConfig\n\n      // body can not be passed if request was aborted\n      // or we get a Request body was disturbed error\n      ...(request.request.signal.aborted\n        ? {}\n        : {\n            body,\n          }),\n    })\n  }\n}\n","import type { AppPageModule } from './route-modules/app-page/module'\n\n// Combined load times for loading client components\nlet clientComponentLoadStart = 0\nlet clientComponentLoadTimes = 0\nlet clientComponentLoadCount = 0\n\nexport function wrapClientComponentLoader(\n  ComponentMod: AppPageModule\n): AppPageModule['__next_app__'] {\n  if (!('performance' in globalThis)) {\n    return ComponentMod.__next_app__\n  }\n\n  return {\n    require: (...args) => {\n      const startTime = performance.now()\n\n      if (clientComponentLoadStart === 0) {\n        clientComponentLoadStart = startTime\n      }\n\n      try {\n        clientComponentLoadCount += 1\n        return ComponentMod.__next_app__.require(...args)\n      } finally {\n        clientComponentLoadTimes += performance.now() - startTime\n      }\n    },\n    loadChunk: (...args) => {\n      const startTime = performance.now()\n      const result = ComponentMod.__next_app__.loadChunk(...args)\n      // Avoid wrapping `loadChunk`'s result in an extra promise in case something like React depends on its identity.\n      // We only need to know when it's settled.\n      result.finally(() => {\n        clientComponentLoadTimes += performance.now() - startTime\n      })\n      return result\n    },\n  }\n}\n\nexport function getClientComponentLoaderMetrics(\n  options: { reset?: boolean } = {}\n) {\n  const metrics =\n    clientComponentLoadStart === 0\n      ? undefined\n      : {\n          clientComponentLoadStart,\n          clientComponentLoadTimes,\n          clientComponentLoadCount,\n        }\n\n  if (options.reset) {\n    clientComponentLoadStart = 0\n    clientComponentLoadTimes = 0\n    clientComponentLoadCount = 0\n  }\n\n  return metrics\n}\n","import type { ServerResponse } from 'node:http'\n\nimport {\n  ResponseAbortedName,\n  createAbortController,\n} from './web/spec-extension/adapters/next-request'\nimport { DetachedPromise } from '../lib/detached-promise'\nimport { getTracer } from './lib/trace/tracer'\nimport { NextNodeServerSpan } from './lib/trace/constants'\nimport { getClientComponentLoaderMetrics } from './client-component-renderer-logger'\n\nexport function isAbortError(e: any): e is Error & { name: 'AbortError' } {\n  return e?.name === 'AbortError' || e?.name === ResponseAbortedName\n}\n\nfunction createWriterFromResponse(\n  res: ServerResponse,\n  waitUntilForEnd?: Promise<unknown>\n): WritableStream<Uint8Array> {\n  let started = false\n\n  // Create a promise that will resolve once the response has drained. See\n  // https://nodejs.org/api/stream.html#stream_event_drain\n  let drained = new DetachedPromise<void>()\n  function onDrain() {\n    drained.resolve()\n  }\n  res.on('drain', onDrain)\n\n  // If the finish event fires, it means we shouldn't block and wait for the\n  // drain event.\n  res.once('close', () => {\n    res.off('drain', onDrain)\n    drained.resolve()\n  })\n\n  // Create a promise that will resolve once the response has finished. See\n  // https://nodejs.org/api/http.html#event-finish_1\n  const finished = new DetachedPromise<void>()\n  res.once('finish', () => {\n    finished.resolve()\n  })\n\n  // Create a writable stream that will write to the response.\n  return new WritableStream<Uint8Array>({\n    write: async (chunk) => {\n      // You'd think we'd want to use `start` instead of placing this in `write`\n      // but this ensures that we don't actually flush the headers until we've\n      // started writing chunks.\n      if (!started) {\n        started = true\n\n        if (\n          'performance' in globalThis &&\n          process.env.NEXT_OTEL_PERFORMANCE_PREFIX\n        ) {\n          const metrics = getClientComponentLoaderMetrics()\n          if (metrics) {\n            performance.measure(\n              `${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`,\n              {\n                start: metrics.clientComponentLoadStart,\n                end:\n                  metrics.clientComponentLoadStart +\n                  metrics.clientComponentLoadTimes,\n              }\n            )\n          }\n        }\n\n        res.flushHeaders()\n        getTracer().trace(\n          NextNodeServerSpan.startResponse,\n          {\n            spanName: 'start response',\n          },\n          () => undefined\n        )\n      }\n\n      try {\n        const ok = res.write(chunk)\n\n        // Added by the `compression` middleware, this is a function that will\n        // flush the partially-compressed response to the client.\n        if ('flush' in res && typeof res.flush === 'function') {\n          res.flush()\n        }\n\n        // If the write returns false, it means there's some backpressure, so\n        // wait until it's streamed before continuing.\n        if (!ok) {\n          await drained.promise\n\n          // Reset the drained promise so that we can wait for the next drain event.\n          drained = new DetachedPromise<void>()\n        }\n      } catch (err) {\n        res.end()\n        throw new Error('failed to write chunk to response', { cause: err })\n      }\n    },\n    abort: (err) => {\n      if (res.writableFinished) return\n\n      res.destroy(err)\n    },\n    close: async () => {\n      // if a waitUntil promise was passed, wait for it to resolve before\n      // ending the response.\n      if (waitUntilForEnd) {\n        await waitUntilForEnd\n      }\n\n      if (res.writableFinished) return\n\n      res.end()\n      return finished.promise\n    },\n  })\n}\n\nexport async function pipeToNodeResponse(\n  readable: ReadableStream<Uint8Array>,\n  res: ServerResponse,\n  waitUntilForEnd?: Promise<unknown>\n) {\n  try {\n    // If the response has already errored, then just return now.\n    const { errored, destroyed } = res\n    if (errored || destroyed) return\n\n    // Create a new AbortController so that we can abort the readable if the\n    // client disconnects.\n    const controller = createAbortController(res)\n\n    const writer = createWriterFromResponse(res, waitUntilForEnd)\n\n    await readable.pipeTo(writer, { signal: controller.signal })\n  } catch (err: any) {\n    // If this isn't related to an abort error, re-throw it.\n    if (isAbortError(err)) return\n\n    throw new Error('failed to pipe response', { cause: err })\n  }\n}\n","import type { OutgoingHttpHeaders, ServerResponse } from 'http'\nimport type { CacheControl } from './lib/cache-control'\nimport type { FetchMetrics } from './base-http'\nimport type { PrefetchHints } from '../shared/lib/app-router-types'\n\nimport {\n  chainStreams,\n  streamFromBuffer,\n  streamFromString,\n  streamToString,\n} from './stream-utils/node-web-streams-helper'\nimport { isAbortError, pipeToNodeResponse } from './pipe-readable'\nimport type { RenderResumeDataCache } from './resume-data-cache/resume-data-cache'\nimport { InvariantError } from '../shared/lib/invariant-error'\nimport type {\n  HTML_CONTENT_TYPE_HEADER,\n  JSON_CONTENT_TYPE_HEADER,\n  TEXT_PLAIN_CONTENT_TYPE_HEADER,\n} from '../lib/constants'\nimport type { RSC_CONTENT_TYPE_HEADER } from '../client/components/app-router-headers'\n\ntype ContentTypeOption =\n  | typeof RSC_CONTENT_TYPE_HEADER // For App Page RSC responses\n  | typeof HTML_CONTENT_TYPE_HEADER // For App Page, Pages HTML responses\n  | typeof JSON_CONTENT_TYPE_HEADER // For API routes, Next.js data requests\n  | typeof TEXT_PLAIN_CONTENT_TYPE_HEADER // For simplified errors\n\nexport type AppPageRenderResultMetadata = {\n  flightData?: Buffer\n  cacheControl?: CacheControl\n  staticBailoutInfo?: {\n    stack?: string\n    description?: string\n  }\n\n  /**\n   * The postponed state if the render had postponed and needs to be resumed.\n   */\n  postponed?: string\n\n  /**\n   * The headers to set on the response that were added by the render.\n   */\n  headers?: OutgoingHttpHeaders\n  statusCode?: number\n  fetchTags?: string\n  fetchMetrics?: FetchMetrics\n\n  segmentData?: Map<string, Buffer>\n\n  /**\n   * Per-route prefetch hints computed at build time (e.g. segment inlining\n   * decisions based on gzip sizes). Written to prefetch-hints.json by the\n   * build pipeline.\n   */\n  prefetchHints?: PrefetchHints\n\n  /**\n   * In development, the resume data cache is warmed up before the render. This\n   * is attached to the metadata so that it can be used during the render. When\n   * prerendering, the filled resume data cache is also attached to the metadata\n   * so that it can be used when prerendering matching fallback shells.\n   */\n  renderResumeDataCache?: RenderResumeDataCache\n}\n\nexport type PagesRenderResultMetadata = {\n  pageData?: any\n  cacheControl?: CacheControl\n  assetQueryString?: string\n  mutableAssetQueryString?: string\n  isNotFound?: boolean\n  isRedirect?: boolean\n}\n\nexport type StaticRenderResultMetadata = {}\n\nexport type RenderResultMetadata = AppPageRenderResultMetadata &\n  PagesRenderResultMetadata &\n  StaticRenderResultMetadata\n\nexport type RenderResultResponse =\n  | ReadableStream<Uint8Array>[]\n  | ReadableStream<Uint8Array>\n  | string\n  | Buffer\n  | null\n\nexport type RenderResultOptions<\n  Metadata extends RenderResultMetadata = RenderResultMetadata,\n> = {\n  contentType: ContentTypeOption | null\n  waitUntil?: Promise<unknown>\n  metadata: Metadata\n}\n\nexport default class RenderResult<\n  Metadata extends RenderResultMetadata = RenderResultMetadata,\n> {\n  /**\n   * The detected content type for the response. This is used to set the\n   * `Content-Type` header.\n   */\n  public readonly contentType: ContentTypeOption | null\n\n  /**\n   * The metadata for the response. This is used to set the revalidation times\n   * and other metadata.\n   */\n  public readonly metadata: Readonly<Metadata>\n\n  /**\n   * The response itself. This can be a string, a stream, or null. If it's a\n   * string, then it's a static response. If it's a stream, then it's a\n   * dynamic response. If it's null, then the response was not found or was\n   * already sent.\n   */\n  private response: RenderResultResponse\n\n  /**\n   * A render result that represents an empty response. This is used to\n   * represent a response that was not found or was already sent.\n   */\n  public static readonly EMPTY = new RenderResult<StaticRenderResultMetadata>(\n    null,\n    { metadata: {}, contentType: null }\n  )\n\n  /**\n   * Creates a new RenderResult instance from a static response.\n   *\n   * @param value the static response value\n   * @param contentType the content type of the response\n   * @returns a new RenderResult instance\n   */\n  public static fromStatic(\n    value: string | Buffer,\n    contentType: ContentTypeOption\n  ) {\n    return new RenderResult<StaticRenderResultMetadata>(value, {\n      metadata: {},\n      contentType,\n    })\n  }\n\n  private readonly waitUntil?: Promise<unknown>\n\n  constructor(\n    response: RenderResultResponse,\n    { contentType, waitUntil, metadata }: RenderResultOptions<Metadata>\n  ) {\n    this.response = response\n    this.contentType = contentType\n    this.metadata = metadata\n    this.waitUntil = waitUntil\n  }\n\n  public assignMetadata(metadata: Metadata) {\n    Object.assign(this.metadata, metadata)\n  }\n\n  /**\n   * Returns true if the response is null. It can be null if the response was\n   * not found or was already sent.\n   */\n  public get isNull(): boolean {\n    return this.response === null\n  }\n\n  /**\n   * Returns false if the response is a string. It can be a string if the page\n   * was prerendered. If it's not, then it was generated dynamically.\n   */\n  public get isDynamic(): boolean {\n    return typeof this.response !== 'string'\n  }\n\n  /**\n   * Returns the response if it is a string. If the page was dynamic, this will\n   * return a promise if the `stream` option is true, or it will throw an error.\n   *\n   * @param stream Whether or not to return a promise if the response is dynamic\n   * @returns The response as a string\n   */\n  public toUnchunkedString(stream?: false): string\n  public toUnchunkedString(stream: true): Promise<string>\n  public toUnchunkedString(stream = false): Promise<string> | string {\n    if (this.response === null) {\n      // If the response is null, return an empty string. This behavior is\n      // intentional as we're now providing the `RenderResult.EMPTY` value.\n      return ''\n    }\n\n    if (typeof this.response !== 'string') {\n      if (!stream) {\n        throw new InvariantError(\n          'dynamic responses cannot be unchunked. This is a bug in Next.js'\n        )\n      }\n\n      return streamToString(this.readable)\n    }\n\n    return this.response\n  }\n\n  /**\n   * Returns a readable stream of the response.\n   */\n  private get readable(): ReadableStream<Uint8Array> {\n    if (this.response === null) {\n      // If the response is null, return an empty stream. This behavior is\n      // intentional as we're now providing the `RenderResult.EMPTY` value.\n      return new ReadableStream<Uint8Array>({\n        start(controller) {\n          controller.close()\n        },\n      })\n    }\n\n    if (typeof this.response === 'string') {\n      return streamFromString(this.response)\n    }\n\n    if (Buffer.isBuffer(this.response)) {\n      return streamFromBuffer(this.response)\n    }\n\n    // If the response is an array of streams, then chain them together.\n    if (Array.isArray(this.response)) {\n      return chainStreams(...this.response)\n    }\n\n    return this.response\n  }\n\n  /**\n   * Coerces the response to an array of streams. This will convert the response\n   * to an array of streams if it is not already one.\n   *\n   * @returns An array of streams\n   */\n  private coerce(): ReadableStream<Uint8Array>[] {\n    if (this.response === null) {\n      // If the response is null, return an empty stream. This behavior is\n      // intentional as we're now providing the `RenderResult.EMPTY` value.\n      return []\n    }\n\n    if (typeof this.response === 'string') {\n      return [streamFromString(this.response)]\n    } else if (Array.isArray(this.response)) {\n      return this.response\n    } else if (Buffer.isBuffer(this.response)) {\n      return [streamFromBuffer(this.response)]\n    } else {\n      return [this.response]\n    }\n  }\n\n  /**\n   * Pipes the response through a transform stream. This converts the response\n   * to a single readable stream (chaining if needed) and pipes it through the\n   * provided transform.\n   *\n   * @param transform The transform stream to pipe through\n   */\n  public pipeThrough(transform: TransformStream<Uint8Array, Uint8Array>): void {\n    this.response = this.readable.pipeThrough(transform)\n  }\n\n  /**\n   * Unshifts a new stream to the response. This will convert the response to an\n   * array of streams if it is not already one and will add the new stream to\n   * the start of the array. When this response is piped, all of the streams\n   * will be piped one after the other.\n   *\n   * @param readable The new stream to unshift\n   */\n  public unshift(readable: ReadableStream<Uint8Array>): void {\n    // Coerce the response to an array of streams.\n    this.response = this.coerce()\n\n    // Add the new stream to the start of the array.\n    this.response.unshift(readable)\n  }\n\n  /**\n   * Chains a new stream to the response. This will convert the response to an\n   * array of streams if it is not already one and will add the new stream to\n   * the end. When this response is piped, all of the streams will be piped\n   * one after the other.\n   *\n   * @param readable The new stream to chain\n   */\n  public push(readable: ReadableStream<Uint8Array>): void {\n    // Coerce the response to an array of streams.\n    this.response = this.coerce()\n\n    // Add the new stream to the end of the array.\n    this.response.push(readable)\n  }\n\n  /**\n   * Pipes the response to a writable stream. This will close/cancel the\n   * writable stream if an error is encountered. If this doesn't throw, then\n   * the writable stream will be closed or aborted.\n   *\n   * @param writable Writable stream to pipe the response to\n   */\n  public async pipeTo(writable: WritableStream<Uint8Array>): Promise<void> {\n    try {\n      await this.readable.pipeTo(writable, {\n        // We want to close the writable stream ourselves so that we can wait\n        // for the waitUntil promise to resolve before closing it. If an error\n        // is encountered, we'll abort the writable stream if we swallowed the\n        // error.\n        preventClose: true,\n      })\n\n      // If there is a waitUntil promise, wait for it to resolve before\n      // closing the writable stream.\n      if (this.waitUntil) await this.waitUntil\n\n      // Close the writable stream.\n      await writable.close()\n    } catch (err) {\n      // If this is an abort error, we should abort the writable stream (as we\n      // took ownership of it when we started piping). We don't need to re-throw\n      // because we handled the error.\n      if (isAbortError(err)) {\n        // Abort the writable stream if an error is encountered.\n        await writable.abort(err)\n\n        return\n      }\n\n      // We're not aborting the writer here as when this method throws it's not\n      // clear as to how so the caller should assume it's their responsibility\n      // to clean up the writer.\n      throw err\n    }\n  }\n\n  /**\n   * Pipes the response to a node response. This will close/cancel the node\n   * response if an error is encountered.\n   *\n   * @param res\n   */\n  public async pipeToNodeResponse(res: ServerResponse) {\n    await pipeToNodeResponse(this.readable, res, this.waitUntil)\n  }\n}\n","// This utility is based on https://github.com/zertosh/htmlescape\n// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE\n\nconst ESCAPE_LOOKUP: { [match: string]: string } = {\n  '&': '\\\\u0026',\n  '>': '\\\\u003e',\n  '<': '\\\\u003c',\n  '\\u2028': '\\\\u2028',\n  '\\u2029': '\\\\u2029',\n}\n\nexport const ESCAPE_REGEX = /[&><\\u2028\\u2029]/g\n\nexport function htmlEscapeJsonString(str: string): string {\n  return str.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match])\n}\n","import type { ActionManifest } from '../../build/webpack/plugins/flight-client-entry-plugin'\nimport type { ClientReferenceManifest } from '../../build/webpack/plugins/flight-manifest-plugin'\nimport type { DeepReadonly } from '../../shared/lib/deep-readonly'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { pathHasPrefix } from '../../shared/lib/router/utils/path-has-prefix'\nimport { removePathPrefix } from '../../shared/lib/router/utils/remove-path-prefix'\nimport { workAsyncStorage } from './work-async-storage.external'\n\nexport interface ServerModuleMap {\n  readonly [name: string]: {\n    readonly id: string | number\n    readonly name: string\n    readonly chunks: Readonly<Array<string>> // currently not used\n    readonly async?: boolean\n  }\n}\n\n// This is a global singleton that is, among other things, also used to\n// encode/decode bound args of server function closures. This can't be using a\n// AsyncLocalStorage as it might happen at the module level.\nconst MANIFESTS_SINGLETON = Symbol.for('next.server.manifests')\n\ninterface ManifestsSingleton {\n  readonly clientReferenceManifestsPerRoute: Map<\n    string,\n    DeepReadonly<ClientReferenceManifest>\n  >\n  readonly proxiedClientReferenceManifest: DeepReadonly<ClientReferenceManifest>\n  serverActionsManifest: DeepReadonly<ActionManifest>\n  serverModuleMap: ServerModuleMap\n}\n\ntype GlobalThisWithManifests = typeof globalThis & {\n  [MANIFESTS_SINGLETON]?: ManifestsSingleton\n}\n\ntype ClientReferenceManifestMappingProp =\n  | 'clientModules'\n  | 'rscModuleMapping'\n  | 'edgeRscModuleMapping'\n  | 'ssrModuleMapping'\n  | 'edgeSSRModuleMapping'\n\nconst globalThisWithManifests = globalThis as GlobalThisWithManifests\n\nfunction createProxiedClientReferenceManifest(\n  clientReferenceManifestsPerRoute: Map<\n    string,\n    DeepReadonly<ClientReferenceManifest>\n  >\n): DeepReadonly<ClientReferenceManifest> {\n  const createMappingProxy = (prop: ClientReferenceManifestMappingProp) => {\n    return new Proxy(\n      {},\n      {\n        get(_, id: string) {\n          const workStore = workAsyncStorage.getStore()\n\n          if (workStore) {\n            const currentManifest = clientReferenceManifestsPerRoute.get(\n              workStore.route\n            )\n\n            if (currentManifest?.[prop][id]) {\n              return currentManifest[prop][id]\n            }\n\n            // In development, we also check all other manifests to see if the\n            // module exists there. This is to support a scenario where React's\n            // I/O tracking (dev-only) creates a connection from one page to\n            // another through an emitted async I/O node that references client\n            // components from the other page, e.g. in owner props.\n            // TODO: Maybe we need to add a `debugBundlerConfig` option to React\n            // to avoid this workaround. The current workaround has the\n            // disadvantage that one might accidentally or intentionally share\n            // client references across pages (e.g. by storing them in a global\n            // variable), which would then only be caught in production.\n            if (process.env.NODE_ENV !== 'production') {\n              for (const [\n                route,\n                manifest,\n              ] of clientReferenceManifestsPerRoute) {\n                if (route === workStore.route) {\n                  continue\n                }\n\n                const entry = manifest[prop][id]\n\n                if (entry !== undefined) {\n                  return entry\n                }\n              }\n            }\n          } else {\n            // If there's no work store defined, we can assume that a client\n            // reference manifest is needed during module evaluation, e.g. to\n            // create a server function using a higher-order function. This\n            // might also use client components which need to be serialized by\n            // Flight, and therefore client references need to be resolvable. In\n            // that case we search all page manifests to find the module.\n            for (const manifest of clientReferenceManifestsPerRoute.values()) {\n              const entry = manifest[prop][id]\n\n              if (entry !== undefined) {\n                return entry\n              }\n            }\n          }\n\n          return undefined\n        },\n      }\n    )\n  }\n\n  const mappingProxies = new Map<\n    ClientReferenceManifestMappingProp,\n    ReturnType<typeof createMappingProxy>\n  >()\n\n  return new Proxy(\n    {},\n    {\n      get(_, prop) {\n        const workStore = workAsyncStorage.getStore()\n\n        switch (prop) {\n          case 'moduleLoading':\n          case 'entryCSSFiles':\n          case 'entryJSFiles': {\n            if (!workStore) {\n              throw new InvariantError(\n                `Cannot access \"${prop}\" without a work store.`\n              )\n            }\n\n            const currentManifest = clientReferenceManifestsPerRoute.get(\n              workStore.route\n            )\n\n            if (!currentManifest) {\n              throw new InvariantError(\n                `The client reference manifest for route \"${workStore.route}\" does not exist.`\n              )\n            }\n\n            return currentManifest[prop]\n          }\n          case 'clientModules':\n          case 'rscModuleMapping':\n          case 'edgeRscModuleMapping':\n          case 'ssrModuleMapping':\n          case 'edgeSSRModuleMapping': {\n            let proxy = mappingProxies.get(prop)\n\n            if (!proxy) {\n              proxy = createMappingProxy(prop)\n              mappingProxies.set(prop, proxy)\n            }\n\n            return proxy\n          }\n          default: {\n            throw new InvariantError(\n              `This is a proxied client reference manifest. The property \"${String(prop)}\" is not handled.`\n            )\n          }\n        }\n      },\n    }\n  ) as DeepReadonly<ClientReferenceManifest>\n}\n\n/**\n * This function creates a Flight-acceptable server module map proxy from our\n * Server Reference Manifest similar to our client module map. This is because\n * our manifest contains a lot of internal Next.js data that are relevant to the\n * runtime, workers, etc. that React doesn't need to know.\n */\nfunction createServerModuleMap(): ServerModuleMap {\n  return new Proxy(\n    {},\n    {\n      get: (_, id: string) => {\n        const workers =\n          getServerActionsManifest()[\n            process.env.NEXT_RUNTIME === 'edge' ? 'edge' : 'node'\n          ]?.[id]?.workers\n\n        if (!workers) {\n          return undefined\n        }\n\n        const workStore = workAsyncStorage.getStore()\n\n        let workerEntry:\n          | { moduleId: string | number; async: boolean }\n          | undefined\n\n        if (workStore) {\n          workerEntry = workers[normalizeWorkerPageName(workStore.page)]\n        } else {\n          // If there's no work store defined, we can assume that a server\n          // module map is needed during module evaluation, e.g. to create a\n          // server action using a higher-order function. Therefore it should be\n          // safe to return any entry from the manifest that matches the action\n          // ID. They all refer to the same module ID, which must also exist in\n          // the current page bundle. TODO: This is currently not guaranteed in\n          // Turbopack, and needs to be fixed.\n          workerEntry = Object.values(workers).at(0)\n        }\n\n        if (!workerEntry) {\n          return undefined\n        }\n\n        const { moduleId, async } = workerEntry\n\n        return { id: moduleId, name: id, chunks: [], async }\n      },\n    }\n  )\n}\n\n/**\n * The flight entry loader keys actions by bundlePath. bundlePath corresponds\n * with the relative path (including 'app') to the page entrypoint.\n */\nfunction normalizeWorkerPageName(pageName: string) {\n  if (pathHasPrefix(pageName, 'app')) {\n    return pageName\n  }\n\n  return 'app' + pageName\n}\n\n/**\n * Converts a bundlePath (relative path to the entrypoint) to a routable page\n * name.\n */\nfunction denormalizeWorkerPageName(bundlePath: string) {\n  return normalizeAppPath(removePathPrefix(bundlePath, 'app'))\n}\n\n/**\n * Checks if the requested action has a worker for the current page.\n * If not, it returns the first worker that has a handler for the action.\n */\nexport function selectWorkerForForwarding(\n  actionId: string,\n  pageName: string\n): string | undefined {\n  const serverActionsManifest = getServerActionsManifest()\n  const workers =\n    serverActionsManifest[\n      process.env.NEXT_RUNTIME === 'edge' ? 'edge' : 'node'\n    ][actionId]?.workers\n\n  // There are no workers to handle this action, nothing to forward to.\n  if (!workers) {\n    return\n  }\n\n  // If there is an entry for the current page, we don't need to forward.\n  if (workers[normalizeWorkerPageName(pageName)]) {\n    return\n  }\n\n  // Otherwise, grab the first worker that has a handler for this action id.\n  return denormalizeWorkerPageName(Object.keys(workers)[0])\n}\n\nexport function setManifestsSingleton({\n  page,\n  clientReferenceManifest,\n  serverActionsManifest: rawServerActionsManifest,\n}: {\n  page: string\n  clientReferenceManifest: DeepReadonly<ClientReferenceManifest>\n  serverActionsManifest: DeepReadonly<ActionManifest>\n}) {\n  const existingSingleton = globalThisWithManifests[MANIFESTS_SINGLETON]\n\n  const serverActionsManifest: DeepReadonly<ActionManifest> = {\n    encryptionKey: rawServerActionsManifest.encryptionKey,\n    // Use null-prototypes for the action objects to prevent prototype pollution\n    // from affecting action ID lookups.\n    node: Object.assign(Object.create(null), rawServerActionsManifest.node),\n    edge: Object.assign(Object.create(null), rawServerActionsManifest.edge),\n  }\n\n  if (existingSingleton) {\n    existingSingleton.clientReferenceManifestsPerRoute.set(\n      normalizeAppPath(page),\n      clientReferenceManifest\n    )\n\n    existingSingleton.serverActionsManifest = serverActionsManifest\n  } else {\n    const clientReferenceManifestsPerRoute = new Map<\n      string,\n      DeepReadonly<ClientReferenceManifest>\n    >([[normalizeAppPath(page), clientReferenceManifest]])\n\n    const proxiedClientReferenceManifest = createProxiedClientReferenceManifest(\n      clientReferenceManifestsPerRoute\n    )\n\n    globalThisWithManifests[MANIFESTS_SINGLETON] = {\n      clientReferenceManifestsPerRoute,\n      proxiedClientReferenceManifest,\n      serverActionsManifest,\n      serverModuleMap: createServerModuleMap(),\n    }\n  }\n}\n\nfunction getManifestsSingleton(): ManifestsSingleton {\n  const manifestSingleton = globalThisWithManifests[MANIFESTS_SINGLETON]\n\n  if (!manifestSingleton) {\n    throw new InvariantError('The manifests singleton was not initialized.')\n  }\n\n  return manifestSingleton\n}\n\nexport function getClientReferenceManifest(): DeepReadonly<ClientReferenceManifest> {\n  return getManifestsSingleton().proxiedClientReferenceManifest\n}\n\nexport function getServerActionsManifest(): DeepReadonly<ActionManifest> {\n  return getManifestsSingleton().serverActionsManifest\n}\n\nexport function getServerModuleMap() {\n  return getManifestsSingleton().serverModuleMap\n}\n","import type { BinaryStreamOf } from './app-render'\nimport type { Readable } from 'node:stream'\n\nimport { htmlEscapeJsonString } from '../htmlescape'\nimport { workUnitAsyncStorage } from './work-unit-async-storage.external'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { getClientReferenceManifest } from './manifests-singleton'\n\nconst isEdgeRuntime = process.env.NEXT_RUNTIME === 'edge'\n\nconst INLINE_FLIGHT_PAYLOAD_BOOTSTRAP = 0\nconst INLINE_FLIGHT_PAYLOAD_DATA = 1\nconst INLINE_FLIGHT_PAYLOAD_FORM_STATE = 2\nconst INLINE_FLIGHT_PAYLOAD_BINARY = 3\n\nconst flightResponses = new WeakMap<\n  Readable | BinaryStreamOf<any>,\n  Promise<any>\n>()\nconst encoder = new TextEncoder()\n\nconst findSourceMapURL =\n  process.env.NODE_ENV !== 'production'\n    ? (require('../lib/source-maps') as typeof import('../lib/source-maps'))\n        .findSourceMapURLDEV\n    : undefined\n\n/**\n * Render Flight stream.\n * This is only used for renderToHTML, the Flight response does not need additional wrappers.\n */\nexport function getFlightStream<T>(\n  flightStream: Readable | BinaryStreamOf<T>,\n  debugStream: Readable | ReadableStream<Uint8Array> | undefined,\n  debugEndTime: number | undefined,\n  nonce: string | undefined\n): Promise<T> {\n  const response = flightResponses.get(flightStream)\n\n  if (response) {\n    return response\n  }\n\n  const { moduleLoading, edgeSSRModuleMapping, ssrModuleMapping } =\n    getClientReferenceManifest()\n\n  let newResponse: Promise<T>\n  if (flightStream instanceof ReadableStream) {\n    // The types of flightStream and debugStream should match.\n    if (debugStream && !(debugStream instanceof ReadableStream)) {\n      throw new InvariantError('Expected debug stream to be a ReadableStream')\n    }\n\n    // react-server-dom-webpack/client.edge must not be hoisted for require cache clearing to work correctly\n    const { createFromReadableStream } =\n      // eslint-disable-next-line import/no-extraneous-dependencies\n      require('react-server-dom-webpack/client') as typeof import('react-server-dom-webpack/client')\n\n    newResponse = createFromReadableStream<T>(flightStream, {\n      findSourceMapURL,\n      serverConsumerManifest: {\n        moduleLoading,\n        moduleMap: isEdgeRuntime ? edgeSSRModuleMapping : ssrModuleMapping,\n        serverModuleMap: null,\n      },\n      nonce,\n      debugChannel: debugStream ? { readable: debugStream } : undefined,\n      endTime: debugEndTime,\n    })\n  } else {\n    if (process.env.NEXT_RUNTIME === 'edge') {\n      throw new InvariantError(\n        'getFlightStream should always receive a ReadableStream when using the edge runtime'\n      )\n    } else {\n      const { Readable } =\n        require('node:stream') as typeof import('node:stream')\n\n      // The types of flightStream and debugStream should match.\n      if (debugStream && !(debugStream instanceof Readable)) {\n        throw new InvariantError('Expected debug stream to be a Readable')\n      }\n\n      // react-server-dom-webpack/client.edge must not be hoisted for require cache clearing to work correctly\n      const { createFromNodeStream } =\n        // eslint-disable-next-line import/no-extraneous-dependencies\n        require('react-server-dom-webpack/client') as typeof import('react-server-dom-webpack/client')\n\n      newResponse = createFromNodeStream<T>(\n        flightStream,\n        {\n          moduleLoading,\n          moduleMap: isEdgeRuntime ? edgeSSRModuleMapping : ssrModuleMapping,\n          serverModuleMap: null,\n        },\n        {\n          findSourceMapURL,\n          nonce,\n          debugChannel: debugStream,\n          endTime: debugEndTime,\n        }\n      )\n    }\n  }\n\n  // Edge pages are never prerendered so they necessarily cannot have a workUnitStore type\n  // that requires the nextTick behavior. This is why it is safe to access a node only API here\n  if (process.env.NEXT_RUNTIME !== 'edge') {\n    const workUnitStore = workUnitAsyncStorage.getStore()\n\n    if (!workUnitStore) {\n      throw new InvariantError('Expected workUnitAsyncStorage to have a store.')\n    }\n\n    switch (workUnitStore.type) {\n      case 'prerender-client':\n      case 'validation-client':\n        const responseOnNextTick = new Promise<T>((resolve) => {\n          process.nextTick(() => {\n            resolve(newResponse)\n          })\n        })\n        flightResponses.set(flightStream, responseOnNextTick)\n        return responseOnNextTick\n      case 'prerender':\n      case 'prerender-runtime':\n      case 'prerender-ppr':\n      case 'prerender-legacy':\n      case 'request':\n      case 'cache':\n      case 'private-cache':\n      case 'unstable-cache':\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n\n  flightResponses.set(flightStream, newResponse)\n\n  return newResponse\n}\n\n/**\n * Creates a ReadableStream provides inline script tag chunks for writing hydration\n * data to the client outside the React render itself.\n *\n * @param flightStream The RSC render stream\n * @param nonce optionally a nonce used during this particular render\n * @param formState optionally the formState used with this particular render\n * @returns a ReadableStream without the complete property. This signifies a lazy ReadableStream\n */\nexport function createInlinedDataReadableStream(\n  flightStream: ReadableStream<Uint8Array>,\n  nonce: string | undefined,\n  formState: unknown | null\n): ReadableStream<Uint8Array> {\n  const startScriptTag = nonce\n    ? `<script nonce=${JSON.stringify(nonce)}>`\n    : '<script>'\n\n  const flightReader = flightStream.getReader()\n  const decoder = new TextDecoder('utf-8', { fatal: true })\n\n  const readable = new ReadableStream({\n    type: 'bytes',\n    start(controller) {\n      try {\n        writeInitialInstructions(controller, startScriptTag, formState)\n      } catch (error) {\n        // during encoding or enqueueing forward the error downstream\n        controller.error(error)\n      }\n    },\n    async pull(controller) {\n      try {\n        const { done, value } = await flightReader.read()\n\n        if (value) {\n          try {\n            const decodedString = decoder.decode(value, { stream: !done })\n\n            // The chunk cannot be decoded as valid UTF-8 string as it might\n            // have arbitrary binary data.\n            writeFlightDataInstruction(\n              controller,\n              startScriptTag,\n              decodedString\n            )\n          } catch {\n            // The chunk cannot be decoded as valid UTF-8 string.\n            writeFlightDataInstruction(controller, startScriptTag, value)\n          }\n        }\n\n        if (done) {\n          controller.close()\n        }\n      } catch (error) {\n        // There was a problem in the upstream reader or during decoding or enqueuing\n        // forward the error downstream\n        controller.error(error)\n      }\n    },\n  })\n\n  return readable\n}\n\nfunction writeInitialInstructions(\n  controller: ReadableStreamDefaultController,\n  scriptStart: string,\n  formState: unknown | null\n) {\n  let scriptContents = `(self.__next_f=self.__next_f||[]).push(${htmlEscapeJsonString(\n    JSON.stringify([INLINE_FLIGHT_PAYLOAD_BOOTSTRAP])\n  )})`\n\n  if (formState != null) {\n    scriptContents += `;self.__next_f.push(${htmlEscapeJsonString(\n      JSON.stringify([INLINE_FLIGHT_PAYLOAD_FORM_STATE, formState])\n    )})`\n  }\n\n  controller.enqueue(encoder.encode(`${scriptStart}${scriptContents}</script>`))\n}\n\nfunction writeFlightDataInstruction(\n  controller: ReadableStreamDefaultController,\n  scriptStart: string,\n  chunk: string | Uint8Array\n) {\n  let htmlInlinedData: string\n\n  if (typeof chunk === 'string') {\n    htmlInlinedData = htmlEscapeJsonString(\n      JSON.stringify([INLINE_FLIGHT_PAYLOAD_DATA, chunk])\n    )\n  } else {\n    // The chunk cannot be embedded as a UTF-8 string in the script tag.\n    // Instead let's inline it in base64.\n    // Credits to Devon Govett (devongovett) for the technique.\n    // https://github.com/devongovett/rsc-html-stream\n    const base64 =\n      typeof Buffer !== 'undefined'\n        ? Buffer.from(\n            chunk.buffer,\n            chunk.byteOffset,\n            chunk.byteLength\n          ).toString('base64')\n        : btoa(String.fromCodePoint(...chunk))\n    htmlInlinedData = htmlEscapeJsonString(\n      JSON.stringify([INLINE_FLIGHT_PAYLOAD_BINARY, base64])\n    )\n  }\n\n  controller.enqueue(\n    encoder.encode(\n      `${scriptStart}self.__next_f.push(${htmlInlinedData})</script>`\n    )\n  )\n}\n","import { InvariantError } from '../../shared/lib/invariant-error'\n\n// React's RSC prerender function will emit an incomplete flight stream when using `prerender`. If the connection\n// closes then whatever hanging chunks exist will be errored. This is because prerender (an experimental feature)\n// has not yet implemented a concept of resume. For now we will simulate a paused connection by wrapping the stream\n// in one that doesn't close even when the underlying is complete.\nexport class ReactServerResult {\n  private _stream: null | ReadableStream<Uint8Array>\n\n  constructor(stream: ReadableStream<Uint8Array>) {\n    this._stream = stream\n  }\n\n  tee() {\n    if (this._stream === null) {\n      throw new Error(\n        'Cannot tee a ReactServerResult that has already been consumed'\n      )\n    }\n    const tee = this._stream.tee()\n    this._stream = tee[0]\n    return tee[1]\n  }\n\n  consume() {\n    if (this._stream === null) {\n      throw new Error(\n        'Cannot consume a ReactServerResult that has already been consumed'\n      )\n    }\n    const stream = this._stream\n    this._stream = null\n    return stream\n  }\n}\n\nexport type ReactServerPrerenderResolveToType = {\n  prelude: ReadableStream<Uint8Array>\n}\n\nexport async function createReactServerPrerenderResult(\n  underlying: Promise<ReactServerPrerenderResolveToType>\n): Promise<ReactServerPrerenderResult> {\n  const chunks: Array<Uint8Array> = []\n  const { prelude } = await underlying\n  const reader = prelude.getReader()\n  while (true) {\n    const { done, value } = await reader.read()\n    if (done) {\n      return new ReactServerPrerenderResult(chunks)\n    } else {\n      chunks.push(value)\n    }\n  }\n}\n\nexport async function createReactServerPrerenderResultFromRender(\n  underlying: ReadableStream<Uint8Array>\n): Promise<ReactServerPrerenderResult> {\n  const chunks: Array<Uint8Array> = []\n  const reader = underlying.getReader()\n  while (true) {\n    const { done, value } = await reader.read()\n    if (done) {\n      break\n    } else {\n      chunks.push(value)\n    }\n  }\n  return new ReactServerPrerenderResult(chunks)\n}\nexport class ReactServerPrerenderResult {\n  private _chunks: null | Array<Uint8Array>\n\n  private assertChunks(expression: string): Array<Uint8Array> {\n    if (this._chunks === null) {\n      throw new InvariantError(\n        `Cannot \\`${expression}\\` on a ReactServerPrerenderResult that has already been consumed.`\n      )\n    }\n    return this._chunks\n  }\n\n  private consumeChunks(expression: string): Array<Uint8Array> {\n    const chunks = this.assertChunks(expression)\n    this.consume()\n    return chunks\n  }\n\n  consume(): void {\n    this._chunks = null\n  }\n\n  constructor(chunks: Array<Uint8Array>) {\n    this._chunks = chunks\n  }\n\n  asUnclosingStream(): ReadableStream<Uint8Array> {\n    const chunks = this.assertChunks('asUnclosingStream()')\n    return createUnclosingStream(chunks)\n  }\n\n  consumeAsUnclosingStream(): ReadableStream<Uint8Array> {\n    const chunks = this.consumeChunks('consumeAsUnclosingStream()')\n    return createUnclosingStream(chunks)\n  }\n\n  asStream(): ReadableStream<Uint8Array> {\n    const chunks = this.assertChunks('asStream()')\n    return createClosingStream(chunks)\n  }\n\n  consumeAsStream(): ReadableStream<Uint8Array> {\n    const chunks = this.consumeChunks('consumeAsStream()')\n    return createClosingStream(chunks)\n  }\n}\n\nfunction createUnclosingStream(\n  chunks: Array<Uint8Array>\n): ReadableStream<Uint8Array> {\n  let i = 0\n  return new ReadableStream({\n    async pull(controller) {\n      if (i < chunks.length) {\n        controller.enqueue(chunks[i++])\n      }\n      // we intentionally keep the stream open. The consumer will clear\n      // out chunks once finished and the remaining memory will be GC'd\n      // when this object goes out of scope\n    },\n  })\n}\n\nfunction createClosingStream(\n  chunks: Array<Uint8Array>\n): ReadableStream<Uint8Array> {\n  let i = 0\n  return new ReadableStream({\n    async pull(controller) {\n      if (i < chunks.length) {\n        controller.enqueue(chunks[i++])\n      } else {\n        controller.close()\n      }\n    },\n  })\n}\n\nexport async function processPrelude(\n  unprocessedPrelude: ReadableStream<Uint8Array>\n) {\n  const [prelude, peek] = unprocessedPrelude.tee()\n\n  const reader = peek.getReader()\n  const firstResult = await reader.read()\n  reader.cancel()\n\n  const preludeIsEmpty = firstResult.done === true\n\n  return { prelude, preludeIsEmpty }\n}\n","/**\n * Web stream operations for the rendering pipeline.\n * Loaded by stream-ops.ts (re-export in this PR, conditional switcher later).\n */\n\nimport type { PostponedState, PrerenderOptions } from 'react-dom/static'\nimport { resume, renderToReadableStream } from 'react-dom/server'\nimport { prerender } from 'react-dom/static'\n\nimport {\n  renderToInitialFizzStream,\n  streamToString as webStreamToString,\n  createRuntimePrefetchTransformStream,\n  continueFizzStream as webContinueFizzStream,\n} from '../stream-utils/node-web-streams-helper'\nimport { createInlinedDataReadableStream } from './use-flight-response'\n\n// ---------------------------------------------------------------------------\n// Shared types (web-only for now; will move to stream-ops.node.ts later)\n// ---------------------------------------------------------------------------\n\ntype FlightRenderToReadableStream = (\n  model: any,\n  webpackMap: any,\n  options?: any\n) => ReadableStream<Uint8Array>\n\nexport type AnyStream = ReadableStream<Uint8Array>\n\nexport type ContinueStreamSharedOptions = {\n  deploymentId: string | undefined\n  getServerInsertedHTML: () => Promise<string>\n  getServerInsertedMetadata: () => Promise<string>\n}\n\nexport type ContinueFizzStreamOptions = ContinueStreamSharedOptions & {\n  inlinedDataStream: AnyStream | undefined\n  isStaticGeneration: boolean\n  allReady?: Promise<void>\n  validateRootLayout?: boolean\n  suffix?: string\n}\n\nexport type ContinueStaticPrerenderOptions = ContinueStreamSharedOptions & {\n  inlinedDataStream: AnyStream\n}\n\nexport type ContinueDynamicHTMLResumeOptions = ContinueStreamSharedOptions & {\n  inlinedDataStream: AnyStream\n  delayDataUntilFirstHtmlChunk: boolean\n}\n\nexport type FlightComponentMod = {\n  renderToReadableStream: FlightRenderToReadableStream\n}\n\nexport type ServerPrerenderComponentMod = {\n  prerender: (...args: any[]) => Promise<any>\n}\n\nexport type FlightPayload = Parameters<FlightRenderToReadableStream>[0]\nexport type FlightClientModules = Parameters<FlightRenderToReadableStream>[1]\nexport type FlightRenderOptions = Parameters<FlightRenderToReadableStream>[2]\n\nexport type FizzStreamResult = {\n  stream: AnyStream\n  allReady: Promise<void>\n  abort?: (reason?: unknown) => void\n}\n\n// ---------------------------------------------------------------------------\n// Continue functions\n// ---------------------------------------------------------------------------\n\nexport {\n  continueStaticPrerender,\n  continueDynamicPrerender,\n  continueStaticFallbackPrerender,\n  continueDynamicHTMLResume,\n  streamToBuffer,\n  chainStreams,\n  createDocumentClosingStream,\n} from '../stream-utils/node-web-streams-helper'\n\nexport { processPrelude } from './app-render-prerender-utils'\n\n/**\n * Wrapper for continueFizzStream that accepts AnyStream.\n * The underlying implementation expects ReactDOMServerReadableStream but at\n * the stream-ops boundary we only expose AnyStream.\n */\nexport function continueFizzStream(\n  renderStream: AnyStream,\n  opts: ContinueFizzStreamOptions\n): Promise<ReadableStream<Uint8Array>> {\n  return webContinueFizzStream(renderStream as any, opts)\n}\n\n// Not available in web bundles\nexport const nodeReadableToWeb:\n  | ((readable: import('node:stream').Readable) => ReadableStream<Uint8Array>)\n  | undefined = undefined\n\n// ---------------------------------------------------------------------------\n// Composed helpers\n// ---------------------------------------------------------------------------\n\nexport function createInlinedDataStream(\n  source: AnyStream,\n  nonce: string | undefined,\n  formState: unknown | null\n): AnyStream {\n  return createInlinedDataReadableStream(\n    source as ReadableStream<Uint8Array>,\n    nonce,\n    formState\n  )\n}\n\nexport function createPendingStream(): AnyStream {\n  return new ReadableStream<Uint8Array>()\n}\n\nexport function createOnHeadersCallback(\n  appendHeader: (key: string, value: string) => void\n): NonNullable<PrerenderOptions['onHeaders']> {\n  return (headers: Headers) => {\n    headers.forEach((value, key) => {\n      appendHeader(key, value)\n    })\n  }\n}\n\nexport async function resumeAndAbort(\n  element: React.ReactElement,\n  postponed: PostponedState | null,\n  opts: Parameters<typeof resume>[2] & { nonce?: string }\n): Promise<AnyStream> {\n  return resume(\n    element,\n    postponed as PostponedState,\n    opts as Parameters<typeof resume>[2]\n  )\n}\n\nexport function renderToFlightStream(\n  ComponentMod: FlightComponentMod,\n  payload: FlightPayload,\n  clientModules: FlightClientModules,\n  opts: FlightRenderOptions\n): AnyStream {\n  return ComponentMod.renderToReadableStream(payload, clientModules, opts)\n}\n\nexport async function streamToString(stream: AnyStream): Promise<string> {\n  return webStreamToString(stream as ReadableStream<Uint8Array>)\n}\n\nexport async function renderToFizzStream(\n  element: React.ReactElement,\n  streamOptions: any\n): Promise<FizzStreamResult> {\n  const stream = await renderToInitialFizzStream({\n    ReactDOMServer: { renderToReadableStream },\n    element,\n    streamOptions,\n  })\n  return { stream, allReady: stream.allReady, abort: undefined }\n}\n\nexport async function resumeToFizzStream(\n  element: React.ReactElement,\n  postponedState: PostponedState,\n  streamOptions: any\n): Promise<FizzStreamResult> {\n  const stream = await resume(element, postponedState, streamOptions)\n  return { stream, allReady: stream.allReady, abort: undefined }\n}\n\nexport function getServerPrerender(\n  ComponentMod: ServerPrerenderComponentMod\n): (...args: any[]) => any {\n  return ComponentMod.prerender\n}\n\nexport const getClientPrerender: typeof import('react-dom/static').prerender =\n  prerender\n\nexport function pipeRuntimePrefetchTransform(\n  stream: AnyStream,\n  sentinel: number,\n  isPartial: boolean,\n  staleTime: number\n): AnyStream {\n  return (stream as ReadableStream<Uint8Array>).pipeThrough(\n    createRuntimePrefetchTransformStream(sentinel, isPartial, staleTime)\n  )\n}\n","import type { NextParsedUrlQuery } from './request-meta'\n\nimport { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'\n\nconst INTERNAL_QUERY_NAMES = [NEXT_RSC_UNION_QUERY] as const\n\nexport function stripInternalQueries(query: NextParsedUrlQuery) {\n  for (const name of INTERNAL_QUERY_NAMES) {\n    delete query[name]\n  }\n}\n\nexport function stripInternalSearchParams<T extends string | URL>(url: T): T {\n  const isStringUrl = typeof url === 'string'\n  const instance = isStringUrl ? new URL(url) : (url as URL)\n\n  instance.searchParams.delete(NEXT_RSC_UNION_QUERY)\n\n  return (isStringUrl ? instance.toString() : instance) as T\n}\n","import type { AppRenderContext } from '../../server/app-render/app-render'\nimport type { MetadataContext } from './types/resolvers'\n\nexport function createMetadataContext(\n  renderOpts: AppRenderContext['renderOpts']\n): MetadataContext {\n  return {\n    trailingSlash: renderOpts.trailingSlash,\n    isStaticMetadataRouteFile: false,\n  }\n}\n","import type { IncomingMessage } from 'http'\nimport type { ReadonlyRequestCookies } from '../web/spec-extension/adapters/request-cookies'\nimport type { ResponseCookies } from '../web/spec-extension/cookies'\nimport type { BaseNextRequest } from '../base-http'\nimport type { NextRequest } from '../web/spec-extension/request'\n\nimport {\n  COOKIE_NAME_PRERENDER_BYPASS,\n  checkIsOnDemandRevalidate,\n} from '../api-utils'\nimport type { __ApiPreviewProps } from '../api-utils'\n\nexport class DraftModeProvider {\n  /**\n   * @internal - this declaration is stripped via `tsc --stripInternal`\n   */\n  private _isEnabled: boolean\n\n  /**\n   * @internal - this declaration is stripped via `tsc --stripInternal`\n   */\n  private readonly _previewModeId: string | undefined\n\n  /**\n   * @internal - this declaration is stripped via `tsc --stripInternal`\n   */\n  private readonly _mutableCookies: ResponseCookies\n\n  constructor(\n    previewProps: __ApiPreviewProps | undefined,\n    req: IncomingMessage | BaseNextRequest<unknown> | NextRequest,\n    cookies: ReadonlyRequestCookies,\n    mutableCookies: ResponseCookies\n  ) {\n    // The logic for draftMode() is very similar to tryGetPreviewData()\n    // but Draft Mode does not have any data associated with it.\n    const isOnDemandRevalidate =\n      previewProps &&\n      checkIsOnDemandRevalidate(req, previewProps).isOnDemandRevalidate\n\n    const cookieValue = cookies.get(COOKIE_NAME_PRERENDER_BYPASS)?.value\n\n    this._isEnabled = Boolean(\n      !isOnDemandRevalidate &&\n        cookieValue &&\n        previewProps &&\n        (cookieValue === previewProps.previewModeId ||\n          // In dev mode, the cookie can be actual hash value preview id but the preview props can still be `development-id`.\n          (process.env.NODE_ENV !== 'production' &&\n            previewProps.previewModeId === 'development-id'))\n    )\n\n    this._previewModeId = previewProps?.previewModeId\n    this._mutableCookies = mutableCookies\n  }\n\n  get isEnabled() {\n    return this._isEnabled\n  }\n\n  enable() {\n    if (!this._previewModeId) {\n      throw new Error(\n        'Invariant: previewProps missing previewModeId this should never happen'\n      )\n    }\n\n    this._mutableCookies.set({\n      name: COOKIE_NAME_PRERENDER_BYPASS,\n      value: this._previewModeId,\n      httpOnly: true,\n      sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n      secure: process.env.NODE_ENV !== 'development',\n      path: '/',\n    })\n\n    this._isEnabled = true\n  }\n\n  disable() {\n    // To delete a cookie, set `expires` to a date in the past:\n    // https://tools.ietf.org/html/rfc6265#section-4.1.1\n    // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted.\n    this._mutableCookies.set({\n      name: COOKIE_NAME_PRERENDER_BYPASS,\n      value: '',\n      httpOnly: true,\n      sameSite: process.env.NODE_ENV !== 'development' ? 'none' : 'lax',\n      secure: process.env.NODE_ENV !== 'development',\n      path: '/',\n      expires: new Date(0),\n    })\n\n    this._isEnabled = false\n  }\n}\n","import type { BaseNextRequest, BaseNextResponse } from '../base-http'\nimport type { IncomingHttpHeaders } from 'http'\nimport type { RequestStore } from '../app-render/work-unit-async-storage.external'\nimport type { RenderOpts } from '../app-render/types'\nimport type { NextRequest } from '../web/spec-extension/request'\nimport type { __ApiPreviewProps } from '../api-utils'\n\nimport { FLIGHT_HEADERS } from '../../client/components/app-router-headers'\nimport {\n  HeadersAdapter,\n  type ReadonlyHeaders,\n} from '../web/spec-extension/adapters/headers'\nimport {\n  MutableRequestCookiesAdapter,\n  RequestCookiesAdapter,\n  responseCookiesToRequestCookies,\n  createCookiesWithMutableAccessCheck,\n  type ReadonlyRequestCookies,\n} from '../web/spec-extension/adapters/request-cookies'\nimport { ResponseCookies, RequestCookies } from '../web/spec-extension/cookies'\nimport { DraftModeProvider } from './draft-mode-provider'\nimport { splitCookiesString } from '../web/utils'\nimport type { ServerComponentsHmrCache } from '../response-cache'\nimport type { RenderResumeDataCache } from '../resume-data-cache/resume-data-cache'\nimport type { Params } from '../request/params'\nimport type { ImplicitTags } from '../lib/implicit-tags'\nimport type { OpaqueFallbackRouteParams } from '../request/fallback-params'\n\nfunction getHeaders(headers: Headers | IncomingHttpHeaders): ReadonlyHeaders {\n  const cleaned = HeadersAdapter.from(headers)\n  for (const header of FLIGHT_HEADERS) {\n    cleaned.delete(header)\n  }\n\n  return HeadersAdapter.seal(cleaned)\n}\n\nfunction getMutableCookies(\n  headers: Headers | IncomingHttpHeaders,\n  onUpdateCookies?: (cookies: string[]) => void\n): ResponseCookies {\n  const cookies = new RequestCookies(HeadersAdapter.from(headers))\n  return MutableRequestCookiesAdapter.wrap(cookies, onUpdateCookies)\n}\n\nexport type WrapperRenderOpts = Partial<Pick<RenderOpts, 'onUpdateCookies'>> & {\n  previewProps?: __ApiPreviewProps\n}\n\ntype RequestContext = RequestResponsePair & {\n  /**\n   * The URL of the request. This only specifies the pathname and the search\n   * part of the URL. This is only undefined when generating static paths (ie,\n   * there is no request in progress, nor do we know one).\n   */\n  url: {\n    /**\n     * The pathname of the requested URL.\n     */\n    pathname: string\n\n    /**\n     * The search part of the requested URL. If the request did not provide a\n     * search part, this will be an empty string.\n     */\n    search?: string\n  }\n  phase: RequestStore['phase']\n  renderOpts?: WrapperRenderOpts\n  isHmrRefresh?: boolean\n  serverComponentsHmrCache?: ServerComponentsHmrCache\n  implicitTags: ImplicitTags\n}\n\ntype RequestResponsePair =\n  | { req: BaseNextRequest; res: BaseNextResponse } // for an app page\n  | { req: NextRequest; res: undefined } // in an api route or middleware\n\n/**\n * If middleware set cookies in this request (indicated by `x-middleware-set-cookie`),\n * then merge those into the existing cookie object, so that when `cookies()` is accessed\n * it's able to read the newly set cookies.\n */\nfunction mergeMiddlewareCookies(\n  req: RequestContext['req'],\n  existingCookies: RequestCookies | ResponseCookies\n) {\n  if (\n    'x-middleware-set-cookie' in req.headers &&\n    typeof req.headers['x-middleware-set-cookie'] === 'string'\n  ) {\n    const setCookieValue = req.headers['x-middleware-set-cookie']\n    const responseHeaders = new Headers()\n\n    for (const cookie of splitCookiesString(setCookieValue)) {\n      responseHeaders.append('set-cookie', cookie)\n    }\n\n    const responseCookies = new ResponseCookies(responseHeaders)\n\n    // Transfer cookies from ResponseCookies to RequestCookies\n    for (const cookie of responseCookies.getAll()) {\n      existingCookies.set(cookie)\n    }\n  }\n}\n\nexport function createRequestStoreForRender(\n  req: RequestContext['req'],\n  res: RequestContext['res'],\n  url: RequestContext['url'],\n  rootParams: Params,\n  implicitTags: RequestContext['implicitTags'],\n  onUpdateCookies: RenderOpts['onUpdateCookies'],\n  previewProps: WrapperRenderOpts['previewProps'],\n  isHmrRefresh: RequestContext['isHmrRefresh'],\n  serverComponentsHmrCache: RequestContext['serverComponentsHmrCache'],\n  renderResumeDataCache: RenderResumeDataCache | null,\n  fallbackParams: OpaqueFallbackRouteParams | null\n): RequestStore {\n  return createRequestStoreImpl(\n    // Pages start in render phase by default\n    'render',\n    req,\n    res,\n    url,\n    rootParams,\n    implicitTags,\n    onUpdateCookies,\n    renderResumeDataCache,\n    previewProps,\n    isHmrRefresh,\n    serverComponentsHmrCache,\n    fallbackParams\n  )\n}\n\nexport function createRequestStoreForAPI(\n  req: RequestContext['req'],\n  url: RequestContext['url'],\n  implicitTags: RequestContext['implicitTags'],\n  onUpdateCookies: RenderOpts['onUpdateCookies'],\n  previewProps: WrapperRenderOpts['previewProps']\n): RequestStore {\n  return createRequestStoreImpl(\n    // API routes start in action phase by default\n    'action',\n    req,\n    undefined,\n    url,\n    {},\n    implicitTags,\n    onUpdateCookies,\n    null,\n    previewProps,\n    false,\n    undefined,\n    null\n  )\n}\n\nfunction createRequestStoreImpl(\n  phase: RequestStore['phase'],\n  req: RequestContext['req'],\n  res: RequestContext['res'],\n  url: RequestContext['url'],\n  rootParams: Params,\n  implicitTags: RequestContext['implicitTags'],\n  onUpdateCookies: RenderOpts['onUpdateCookies'],\n  renderResumeDataCache: RenderResumeDataCache | null,\n  previewProps: WrapperRenderOpts['previewProps'],\n  isHmrRefresh: RequestContext['isHmrRefresh'],\n  serverComponentsHmrCache: RequestContext['serverComponentsHmrCache'],\n  fallbackParams: OpaqueFallbackRouteParams | null | undefined\n): RequestStore {\n  function defaultOnUpdateCookies(cookies: string[]) {\n    if (res) {\n      res.setHeader('Set-Cookie', cookies)\n    }\n  }\n\n  const cache: {\n    headers?: ReadonlyHeaders\n    cookies?: ReadonlyRequestCookies\n    mutableCookies?: ResponseCookies\n    userspaceMutableCookies?: ResponseCookies\n    draftMode?: DraftModeProvider\n  } = {}\n\n  return {\n    type: 'request',\n    phase,\n    implicitTags,\n    // Rather than just using the whole `url` here, we pull the parts we want\n    // to ensure we don't use parts of the URL that we shouldn't. This also\n    // lets us avoid requiring an empty string for `search` in the type.\n    url: { pathname: url.pathname, search: url.search ?? '' },\n    rootParams,\n    get headers() {\n      if (!cache.headers) {\n        // Seal the headers object that'll freeze out any methods that could\n        // mutate the underlying data.\n        cache.headers = getHeaders(req.headers)\n      }\n\n      return cache.headers\n    },\n    get cookies() {\n      if (!cache.cookies) {\n        // if middleware is setting cookie(s), then include those in\n        // the initial cached cookies so they can be read in render\n        const requestCookies = new RequestCookies(\n          HeadersAdapter.from(req.headers)\n        )\n\n        mergeMiddlewareCookies(req, requestCookies)\n\n        // Seal the cookies object that'll freeze out any methods that could\n        // mutate the underlying data.\n        cache.cookies = RequestCookiesAdapter.seal(requestCookies)\n      }\n\n      return cache.cookies\n    },\n    set cookies(value: ReadonlyRequestCookies) {\n      cache.cookies = value\n    },\n    get mutableCookies() {\n      if (!cache.mutableCookies) {\n        const mutableCookies = getMutableCookies(\n          req.headers,\n          onUpdateCookies || (res ? defaultOnUpdateCookies : undefined)\n        )\n\n        mergeMiddlewareCookies(req, mutableCookies)\n\n        cache.mutableCookies = mutableCookies\n      }\n      return cache.mutableCookies\n    },\n    get userspaceMutableCookies() {\n      if (!cache.userspaceMutableCookies) {\n        const userspaceMutableCookies =\n          createCookiesWithMutableAccessCheck(this)\n        cache.userspaceMutableCookies = userspaceMutableCookies\n      }\n      return cache.userspaceMutableCookies\n    },\n    get draftMode() {\n      if (!cache.draftMode) {\n        cache.draftMode = new DraftModeProvider(\n          previewProps,\n          req,\n          this.cookies,\n          this.mutableCookies\n        )\n      }\n\n      return cache.draftMode\n    },\n    renderResumeDataCache: renderResumeDataCache ?? null,\n    isHmrRefresh,\n    serverComponentsHmrCache:\n      serverComponentsHmrCache ||\n      (globalThis as any).__serverComponentsHmrCache,\n    fallbackParams,\n  }\n}\n\nexport function synchronizeMutableCookies(store: RequestStore) {\n  // TODO: does this need to update headers as well?\n  store.cookies = RequestCookiesAdapter.seal(\n    responseCookiesToRequestCookies(store.mutableCookies)\n  )\n}\n","export type LazyResult<TValue> = PromiseLike<TValue> & { value?: TValue }\nexport type ResolvedLazyResult<TValue> = PromiseLike<TValue> & { value: TValue }\n\n/**\n * Calls the given function only when the returned promise-like object is\n * awaited. Afterwards, it provides the resolved value synchronously as `value`\n * property.\n */\nexport function createLazyResult<TValue>(\n  fn: () => Promise<TValue> | TValue\n): LazyResult<TValue> {\n  let pendingResult: Promise<TValue> | undefined\n\n  const result: LazyResult<TValue> = {\n    then(onfulfilled, onrejected) {\n      if (!pendingResult) {\n        pendingResult = Promise.resolve(fn())\n      }\n\n      pendingResult\n        .then((value) => {\n          result.value = value\n        })\n        .catch(() => {\n          // The externally awaited result will be rejected via `onrejected`. We\n          // don't need to handle it here. But we do want to avoid an unhandled\n          // rejection.\n        })\n\n      return pendingResult.then(onfulfilled, onrejected)\n    },\n  }\n\n  return result\n}\n\nexport function isResolvedLazyResult<TValue>(\n  result: LazyResult<TValue>\n): result is ResolvedLazyResult<TValue> {\n  return result.hasOwnProperty('value')\n}\n","import { NEXT_CACHE_IMPLICIT_TAG_ID } from '../../lib/constants'\nimport type { OpaqueFallbackRouteParams } from '../request/fallback-params'\nimport { getCacheHandlerEntries } from '../use-cache/handlers'\nimport { createLazyResult, type LazyResult } from './lazy-result'\n\nexport interface ImplicitTags {\n  /**\n   * For legacy usage, the implicit tags are passed to the incremental cache\n   * handler in `get` calls.\n   */\n  readonly tags: string[]\n\n  /**\n   * Modern cache handlers don't receive implicit tags. Instead, the implicit\n   * tags' expirations are stored in the work unit store, and used to compare\n   * with a cache entry's timestamp.\n   *\n   * Note: This map contains lazy results so that we can evaluate them when the\n   * first cache entry is read. It allows us to skip fetching the expiration\n   * values if no caches are read at all.\n   */\n  readonly expirationsByCacheKind: Map<string, LazyResult<number>>\n}\n\nconst getDerivedTags = (pathname: string): string[] => {\n  const derivedTags: string[] = [`/layout`]\n\n  // we automatically add the current path segments as tags\n  // for revalidatePath handling\n  if (pathname.startsWith('/')) {\n    const pathnameParts = pathname.split('/')\n\n    for (let i = 1; i < pathnameParts.length + 1; i++) {\n      let curPathname = pathnameParts.slice(0, i).join('/')\n\n      if (curPathname) {\n        // all derived tags other than the page are layout tags\n        if (!curPathname.endsWith('/page') && !curPathname.endsWith('/route')) {\n          curPathname = `${curPathname}${\n            !curPathname.endsWith('/') ? '/' : ''\n          }layout`\n        }\n        derivedTags.push(curPathname)\n      }\n    }\n  }\n  return derivedTags\n}\n\n/**\n * Creates a map with lazy results that fetch the expiration value for the given\n * tags and respective cache kind when they're awaited for the first time.\n */\nfunction createTagsExpirationsByCacheKind(\n  tags: string[]\n): Map<string, LazyResult<number>> {\n  const expirationsByCacheKind = new Map<string, LazyResult<number>>()\n  const cacheHandlers = getCacheHandlerEntries()\n\n  if (cacheHandlers) {\n    for (const [kind, cacheHandler] of cacheHandlers) {\n      if ('getExpiration' in cacheHandler) {\n        expirationsByCacheKind.set(\n          kind,\n          createLazyResult(async () => cacheHandler.getExpiration(tags))\n        )\n      }\n    }\n  }\n\n  return expirationsByCacheKind\n}\n\nexport async function getImplicitTags(\n  page: string,\n  pathname: string,\n  fallbackRouteParams: null | OpaqueFallbackRouteParams\n): Promise<ImplicitTags> {\n  const tags = new Set<string>()\n\n  // Add the derived tags from the page.\n  const derivedTags = getDerivedTags(page)\n  for (let tag of derivedTags) {\n    tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${tag}`\n    tags.add(tag)\n  }\n\n  // Add the tags from the pathname. If the route has unknown params, we don't\n  // want to add the pathname as a tag, as it will be invalid.\n  if (pathname && (!fallbackRouteParams || fallbackRouteParams.size === 0)) {\n    const tag = `${NEXT_CACHE_IMPLICIT_TAG_ID}${pathname}`\n    tags.add(tag)\n  }\n\n  if (tags.has(`${NEXT_CACHE_IMPLICIT_TAG_ID}/`)) {\n    tags.add(`${NEXT_CACHE_IMPLICIT_TAG_ID}/index`)\n  }\n\n  if (tags.has(`${NEXT_CACHE_IMPLICIT_TAG_ID}/index`)) {\n    tags.add(`${NEXT_CACHE_IMPLICIT_TAG_ID}/`)\n  }\n\n  const tagsArray = Array.from(tags)\n  return {\n    tags: tagsArray,\n    expirationsByCacheKind: createTagsExpirationsByCacheKind(tagsArray),\n  }\n}\n","import { RSC_CONTENT_TYPE_HEADER } from '../../client/components/app-router-headers'\nimport RenderResult, { type RenderResultMetadata } from '../render-result'\n\n/**\n * Flight Response is always set to RSC_CONTENT_TYPE_HEADER to ensure it does not get interpreted as HTML.\n */\nexport class FlightRenderResult extends RenderResult {\n  constructor(\n    response: string | ReadableStream<Uint8Array>,\n    metadata: RenderResultMetadata = {},\n    waitUntil?: Promise<unknown>\n  ) {\n    super(response, {\n      contentType: RSC_CONTENT_TYPE_HEADER,\n      metadata,\n      waitUntil,\n    })\n  }\n}\n","const invalidServerComponentReactHooks = [\n  'useDeferredValue',\n  'useEffect',\n  'useEffectEvent',\n  'useImperativeHandle',\n  'useInsertionEffect',\n  'useLayoutEffect',\n  'useReducer',\n  'useRef',\n  'useState',\n  'useSyncExternalStore',\n  'useTransition',\n  'experimental_useOptimistic',\n  'useOptimistic',\n]\n\nfunction setMessage(error: Error, message: string): void {\n  error.message = message\n  if (error.stack) {\n    const lines = error.stack.split('\\n')\n    lines[0] = message\n    error.stack = lines.join('\\n')\n  }\n}\n\n/**\n * Input:\n * Error: Something went wrong\n    at funcName (/path/to/file.js:10:5)\n    at anotherFunc (/path/to/file.js:15:10)\n \n * Output:\n    at funcName (/path/to/file.js:10:5)\n    at anotherFunc (/path/to/file.js:15:10) \n */\nexport function getStackWithoutErrorMessage(error: Error): string {\n  const stack = error.stack\n  if (!stack) return ''\n  return stack.replace(/^[^\\n]*\\n/, '')\n}\n\nexport function formatServerError(error: Error): void {\n  if (typeof error?.message !== 'string') return\n\n  if (\n    error.message.includes(\n      'Class extends value undefined is not a constructor or null'\n    )\n  ) {\n    const addedMessage =\n      'This might be caused by a React Class Component being rendered in a Server Component, React Class Components only works in Client Components. Read more: https://nextjs.org/docs/messages/class-component-in-server-component'\n\n    // If this error instance already has the message, don't add it again\n    if (error.message.includes(addedMessage)) return\n\n    setMessage(\n      error,\n      `${error.message}\n\n${addedMessage}`\n    )\n    return\n  }\n\n  if (error.message.includes('createContext is not a function')) {\n    setMessage(\n      error,\n      'createContext only works in Client Components. Add the \"use client\" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/context-in-server-component'\n    )\n    return\n  }\n\n  for (const clientHook of invalidServerComponentReactHooks) {\n    const regex = new RegExp(`\\\\b${clientHook}\\\\b.*is not a function`)\n    if (regex.test(error.message)) {\n      setMessage(\n        error,\n        `${clientHook} only works in Client Components. Add the \"use client\" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/react-client-hook-in-server-component`\n      )\n      return\n    }\n  }\n}\n","const ERROR_CODE_DELIMITER = '@'\n\n/**\n * Augments the digest field of errors thrown in React Server Components (RSC) with an error code.\n * Since RSC errors can only be serialized through the digest field, this provides a way to include\n * an additional error code that can be extracted client-side via `extractNextErrorCode`.\n *\n * The error code is appended to the digest string with a semicolon separator, allowing it to be\n * parsed out later while preserving the original digest value.\n */\nexport const createDigestWithErrorCode = (\n  thrownValue: unknown,\n  originalDigest: string\n): string => {\n  if (\n    typeof thrownValue === 'object' &&\n    thrownValue !== null &&\n    '__NEXT_ERROR_CODE' in thrownValue\n  ) {\n    return `${originalDigest}${ERROR_CODE_DELIMITER}${thrownValue.__NEXT_ERROR_CODE}`\n  }\n  return originalDigest\n}\n\nexport const extractNextErrorCode = (error: unknown): string | undefined => {\n  if (\n    typeof error === 'object' &&\n    error !== null &&\n    '__NEXT_ERROR_CODE' in error &&\n    typeof error.__NEXT_ERROR_CODE === 'string'\n  ) {\n    return error.__NEXT_ERROR_CODE\n  }\n\n  if (\n    typeof error === 'object' &&\n    error !== null &&\n    'digest' in error &&\n    typeof error.digest === 'string'\n  ) {\n    const segments = error.digest.split(ERROR_CODE_DELIMITER)\n    const errorCode = segments.find((segment) => segment.startsWith('E'))\n    return errorCode\n  }\n\n  return undefined\n}\n","// TODO: isWellKnownError -> isNextInternalError\n// isReactLargeShellError -> isWarning\nexport function isReactLargeShellError(\n  error: unknown\n): error is Error & { digest?: string } {\n  return (\n    typeof error === 'object' &&\n    error !== null &&\n    'message' in error &&\n    typeof error.message === 'string' &&\n    error.message.startsWith('This rendered a large document (>')\n  )\n}\n","import type { ErrorInfo } from 'react'\nimport stringHash from 'next/dist/compiled/string-hash'\n\nimport { formatServerError } from '../../lib/format-server-error'\nimport { SpanStatusCode, getTracer } from '../lib/trace/tracer'\n\nimport { isAbortError } from '../pipe-readable'\nimport { isBailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { isDynamicServerError } from '../../client/components/hooks-server-context'\nimport { isNextRouterError } from '../../client/components/is-next-router-error'\nimport { isPrerenderInterruptedError } from './dynamic-rendering'\nimport { getProperError } from '../../lib/is-error'\nimport { createDigestWithErrorCode } from '../../lib/error-telemetry-utils'\nimport { isReactLargeShellError } from './react-large-shell-error'\nimport { isInstantValidationError } from './instant-validation/instant-validation-error'\n\ndeclare global {\n  var __next_log_error__: undefined | ((err: unknown) => void)\n}\n\ntype RSCErrorHandler = (err: unknown) => string | undefined\ntype SSRErrorHandler = (\n  err: unknown,\n  errorInfo?: ErrorInfo\n) => string | undefined\n\nexport type DigestedError = Error & { digest: string; environmentName?: string }\n\n/**\n * Returns a digest for well-known Next.js errors, otherwise `undefined`. If a\n * digest is returned this also means that the error does not need to be\n * reported.\n */\nexport function getDigestForWellKnownError(error: unknown): string | undefined {\n  // If we're bailing out to CSR, we don't need to log the error.\n  if (isBailoutToCSRError(error)) return error.digest\n\n  // If this is a navigation error, we don't need to log the error.\n  if (isNextRouterError(error)) return error.digest\n\n  // If this error occurs, we know that we should be stopping the static\n  // render. This is only thrown in static generation when PPR is not enabled,\n  // which causes the whole page to be marked as dynamic. We don't need to\n  // tell the user about this error, as it's not actionable.\n  if (isDynamicServerError(error)) return error.digest\n\n  // If this is a prerender interrupted error, we don't need to log the error.\n  if (isPrerenderInterruptedError(error)) return error.digest\n\n  if (isInstantValidationError(error)) return error.digest\n\n  return undefined\n}\n\nexport function createReactServerErrorHandler(\n  shouldFormatError: boolean,\n  isBuildTimePrerendering: boolean,\n  reactServerErrors: Map<string, DigestedError>,\n  onReactServerRenderError: (err: DigestedError, silenceLog: boolean) => void,\n  spanToRecordOn?: any\n): RSCErrorHandler {\n  return (thrownValue: unknown) => {\n    if (typeof thrownValue === 'string') {\n      // TODO-APP: look at using webcrypto instead. Requires a promise to be awaited.\n      return stringHash(thrownValue).toString()\n    }\n\n    // If the response was closed, we don't need to log the error.\n    if (isAbortError(thrownValue)) return\n\n    const digest = getDigestForWellKnownError(thrownValue)\n\n    if (digest) {\n      return digest\n    }\n\n    if (isReactLargeShellError(thrownValue)) {\n      // TODO: Aggregate\n      console.error(thrownValue)\n      return undefined\n    }\n\n    let err = getProperError(thrownValue) as DigestedError\n    let silenceLog = false\n\n    // If the error already has a digest, respect the original digest,\n    // so it won't get re-generated into another new error.\n    if (err.digest) {\n      if (\n        process.env.NODE_ENV === 'production' &&\n        reactServerErrors.has(err.digest)\n      ) {\n        // This error is likely an obfuscated error from another react-server\n        // environment (e.g. 'use cache'). We recover the original error here\n        // for reporting purposes.\n        err = reactServerErrors.get(err.digest)!\n        // We don't log it again though, as it was already logged in the\n        // original environment.\n        silenceLog = true\n      } else {\n        // Either we're in development (where we want to keep the transported\n        // error with environmentName), or the error is not in reactServerErrors\n        // but has a digest from other means. Keep the error as-is.\n      }\n    } else {\n      err.digest = createDigestWithErrorCode(\n        err,\n        // TODO-APP: look at using webcrypto instead. Requires a promise to be awaited.\n        stringHash(err.message + (err.stack || '')).toString()\n      )\n    }\n\n    // @TODO by putting this here and not at the top it is possible that\n    // we don't error the build in places we actually expect to\n    if (!reactServerErrors.has(err.digest)) {\n      reactServerErrors.set(err.digest, err)\n    }\n\n    // Format server errors in development to add more helpful error messages\n    if (shouldFormatError) {\n      formatServerError(err)\n    }\n\n    // Don't log the suppressed error during export\n    if (\n      !(\n        isBuildTimePrerendering &&\n        err?.message?.includes(\n          'The specific message is omitted in production builds to avoid leaking sensitive details.'\n        )\n      )\n    ) {\n      // Record exception on the provided span if available, otherwise try active span.\n      const span = spanToRecordOn ?? getTracer().getActiveScopeSpan()\n      if (span) {\n        span.recordException(err)\n        span.setAttribute('error.type', err.name)\n        span.setStatus({\n          code: SpanStatusCode.ERROR,\n          message: err.message,\n        })\n      }\n\n      onReactServerRenderError(err, silenceLog)\n    }\n\n    return err.digest\n  }\n}\n\nexport function createHTMLErrorHandler(\n  shouldFormatError: boolean,\n  isBuildTimePrerendering: boolean,\n  reactServerErrors: Map<string, DigestedError>,\n  allCapturedErrors: Array<unknown>,\n  onHTMLRenderSSRError: (err: DigestedError, errorInfo?: ErrorInfo) => void,\n  spanToRecordOn?: any\n): SSRErrorHandler {\n  return (thrownValue: unknown, errorInfo?: ErrorInfo) => {\n    if (isReactLargeShellError(thrownValue)) {\n      // TODO: Aggregate\n      console.error(thrownValue)\n      return undefined\n    }\n\n    let isSSRError = true\n\n    allCapturedErrors.push(thrownValue)\n\n    // If the response was closed, we don't need to log the error.\n    if (isAbortError(thrownValue)) return\n\n    const digest = getDigestForWellKnownError(thrownValue)\n\n    if (digest) {\n      return digest\n    }\n\n    const err = getProperError(thrownValue) as DigestedError\n\n    // If the error already has a digest, respect the original digest,\n    // so it won't get re-generated into another new error.\n    if (err.digest) {\n      if (reactServerErrors.has(err.digest)) {\n        // This error is likely an obfuscated error from react-server.\n        // We recover the original error here.\n        thrownValue = reactServerErrors.get(err.digest)\n        isSSRError = false\n      } else {\n        // The error is not from react-server but has a digest\n        // from other means so we don't need to produce a new one\n      }\n    } else {\n      err.digest = createDigestWithErrorCode(\n        err,\n        stringHash(\n          err.message + (errorInfo?.componentStack || err.stack || '')\n        ).toString()\n      )\n    }\n\n    // Format server errors in development to add more helpful error messages\n    if (shouldFormatError) {\n      formatServerError(err)\n    }\n\n    // Don't log the suppressed error during export\n    if (\n      !(\n        isBuildTimePrerendering &&\n        err?.message?.includes(\n          'The specific message is omitted in production builds to avoid leaking sensitive details.'\n        )\n      )\n    ) {\n      // HTML errors contain RSC errors as well, filter them out before reporting\n      if (isSSRError) {\n        // Record exception on the provided span if available, otherwise try active span.\n        const span = spanToRecordOn ?? getTracer().getActiveScopeSpan()\n        if (span) {\n          span.recordException(err)\n          span.setAttribute('error.type', err.name)\n          span.setStatus({\n            code: SpanStatusCode.ERROR,\n            message: err.message,\n          })\n        }\n\n        onHTMLRenderSSRError(err, errorInfo)\n      }\n    }\n\n    return err.digest\n  }\n}\n\nexport function isUserLandError(err: any): boolean {\n  return (\n    !isAbortError(err) && !isBailoutToCSRError(err) && !isNextRouterError(err)\n  )\n}\n","import type {\n  DynamicParamTypes,\n  DynamicParamTypesShort,\n} from '../../shared/lib/app-router-types'\n\nexport const dynamicParamTypes: Record<\n  DynamicParamTypes,\n  DynamicParamTypesShort\n> = {\n  catchall: 'c',\n  'catchall-intercepted-(..)(..)': 'ci(..)(..)',\n  'catchall-intercepted-(.)': 'ci(.)',\n  'catchall-intercepted-(..)': 'ci(..)',\n  'catchall-intercepted-(...)': 'ci(...)',\n  'optional-catchall': 'oc',\n  dynamic: 'd',\n  'dynamic-intercepted-(..)(..)': 'di(..)(..)',\n  'dynamic-intercepted-(.)': 'di(.)',\n  'dynamic-intercepted-(..)': 'di(..)',\n  'dynamic-intercepted-(...)': 'di(...)',\n}\n","import type { LoadComponentsReturnType } from '../load-components'\nimport type { ServerRuntime, SizeLimit } from '../../types'\nimport type {\n  ExperimentalConfig,\n  NextConfigComplete,\n  PrefetchInliningConfig,\n} from '../../server/config-shared'\nimport type { NextFontManifest } from '../../build/webpack/plugins/next-font-manifest-plugin'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { AppPageModule } from '../route-modules/app-page/module'\nimport type { DeepReadonly } from '../../shared/lib/deep-readonly'\nimport type { ImageConfigComplete } from '../../shared/lib/image-config'\nimport type { __ApiPreviewProps } from '../api-utils'\n\nimport s from 'next/dist/compiled/superstruct'\nimport type { RequestLifecycleOpts } from '../base-server'\nimport type { InstrumentationOnRequestError } from '../instrumentation/types'\nimport type { NextRequestHint } from '../web/adapter'\nimport type { BaseNextRequest } from '../base-http'\nimport type { IncomingMessage } from 'http'\nimport type { RenderResumeDataCache } from '../resume-data-cache/resume-data-cache'\nimport type { ServerCacheStatus } from '../../next-devtools/dev-overlay/cache-indicator'\nimport type { PrefetchHints } from '../../shared/lib/app-router-types'\n\nconst dynamicParamTypesSchema = s.enums([\n  'c',\n  'ci(..)(..)',\n  'ci(.)',\n  'ci(..)',\n  'ci(...)',\n  'oc',\n  'd',\n  'di(..)(..)',\n  'di(.)',\n  'di(..)',\n  'di(...)',\n])\n\nconst segmentSchema = s.union([\n  s.string(),\n\n  s.tuple([\n    // Param name\n    s.string(),\n    // Param cache key (almost the same as the value, but arrays are\n    // concatenated into strings)\n    // TODO: We should change this to just be the value. Currently we convert\n    // it back to a value when passing to useParams. It only needs to be\n    // a string when converted to a a cache key, but that doesn't mean we\n    // need to store it as that representation.\n    s.string(),\n    // Dynamic param type\n    dynamicParamTypesSchema,\n    // Static siblings at the same URL level. Used by the client router to\n    // determine if a prefetch can be reused when navigating to a static\n    // sibling of a dynamic route. null means siblings are unknown.\n    s.nullable(s.array(s.string())),\n  ]),\n])\n\n// unfortunately the tuple is not understood well by Describe so we have to\n// use any here. This does not have any impact on the runtime type since the validation\n// does work correctly.\nexport const flightRouterStateSchema: s.Describe<any> = s.tuple([\n  segmentSchema,\n  s.record(\n    s.string(),\n    s.lazy(() => flightRouterStateSchema)\n  ),\n  s.optional(s.nullable(s.tuple([s.string(), s.string()]))),\n  s.optional(\n    s.nullable(\n      s.union([\n        s.literal('refetch'),\n        s.literal('inside-shared-layout'),\n        s.literal('metadata-only'),\n      ])\n    )\n  ),\n  s.optional(s.number()),\n])\n\nexport type ServerOnInstrumentationRequestError = (\n  error: unknown,\n  // The request could be middleware, node server or web server request,\n  // we normalized them into an aligned format to `onRequestError` API later.\n  request: NextRequestHint | BaseNextRequest | IncomingMessage,\n  errorContext: Parameters<InstrumentationOnRequestError>[2],\n  silenceLog: boolean\n) => void | Promise<void>\n\nexport interface RenderOptsPartial {\n  dir?: string\n  previewProps: __ApiPreviewProps | undefined\n  err?: Error | null\n  basePath: string\n  cacheComponents: boolean\n  trailingSlash: boolean\n  images: ImageConfigComplete\n  supportsDynamicResponse: boolean\n  runtime?: ServerRuntime\n  serverComponents?: boolean\n  enableTainting?: boolean\n  assetPrefix?: string\n  crossOrigin?: '' | 'anonymous' | 'use-credentials' | undefined\n  nextFontManifest?: DeepReadonly<NextFontManifest>\n  botType?: 'dom' | 'html' | undefined\n  serveStreamingMetadata?: boolean\n  incrementalCache?: import('../lib/incremental-cache').IncrementalCache\n  cacheLifeProfiles?: {\n    [profile: string]: import('../use-cache/cache-life').CacheLife\n  }\n  isOnDemandRevalidate?: boolean\n  isPossibleServerAction?: boolean\n  setCacheStatus?: (status: ServerCacheStatus, htmlRequestId: string) => void\n  setIsrStatus?: (key: string, value: boolean | undefined) => void\n  setReactDebugChannel?: (\n    debugChannel: { readable: ReadableStream<Uint8Array> },\n    htmlRequestId: string,\n    requestId: string\n  ) => void\n  sendErrorsToBrowser?: (\n    errorsRscStream: ReadableStream<Uint8Array>,\n    htmlRequestId: string\n  ) => void\n  isBuildTimePrerendering?: boolean\n  nextConfigOutput?: 'standalone' | 'export'\n  onInstrumentationRequestError?: ServerOnInstrumentationRequestError\n  isDraftMode?: boolean\n  onUpdateCookies?: (cookies: string[]) => void\n  loadConfig?: (\n    phase: string,\n    dir: string,\n    customConfig?: object | null,\n    rawConfig?: boolean,\n    silent?: boolean\n  ) => Promise<NextConfigComplete>\n  serverActions?: {\n    bodySizeLimit?: SizeLimit\n    allowedOrigins?: string[]\n  }\n  logServerFunctions?: boolean\n  params?: ParsedUrlQuery\n  isPrefetch?: boolean\n  htmlLimitedBots: string | undefined\n  experimental: {\n    /**\n     * When true, it indicates that the current page supports partial\n     * prerendering.\n     */\n    isRoutePPREnabled?: boolean\n    expireTime: number | undefined\n    staleTimes: ExperimentalConfig['staleTimes'] | undefined\n    clientTraceMetadata: string[] | undefined\n\n    /**\n     * The origins that are allowed to write the rewritten headers when\n     * performing a non-relative rewrite. When undefined, no non-relative\n     * rewrites will get the rewrite headers.\n     */\n    clientParamParsingOrigins: string[] | undefined\n    dynamicOnHover: boolean\n    optimisticRouting: boolean\n    inlineCss: boolean\n    prefetchInlining: PrefetchInliningConfig\n    authInterrupts: boolean\n    cachedNavigations: boolean\n\n    /**\n     * The maximum size (in bytes) of the postponed state body for PPR resume\n     * requests. Used to calculate decompression limits (5x this value).\n     */\n    maxPostponedStateSizeBytes: number | undefined\n  }\n  postponed?: string\n\n  /**\n   * Should wait for react stream allReady to resolve all suspense boundaries,\n   * in order to perform a full page render.\n   */\n  shouldWaitOnAllReady?: boolean\n\n  /**\n   * A prefilled resume data cache. This was either generated for this page\n   * during dev warmup, or when a page with defined params was previously\n   * prerendered, and now its matching optional fallback shell is prerendered.\n   */\n  renderResumeDataCache?: RenderResumeDataCache\n\n  /**\n   * When true, the page will be rendered using the static rendering to detect\n   * any dynamic API's that would have stopped the page from being fully\n   * statically generated.\n   */\n  isDebugDynamicAccesses?: boolean\n\n  /**\n  /**\n   * The maximum length of the headers that are emitted by React and added to\n   * the response.\n   */\n  reactMaxHeadersLength: number | undefined\n\n  /**\n   * Per-route prefetch hints from prefetch-hints.json.\n   * Loaded at server startup from the build output.\n   */\n  prefetchHints?: Record<string, PrefetchHints>\n\n  isStaticGeneration?: boolean\n\n  /**\n   * When true, the page is prerendered as a fallback shell, while allowing any\n   * dynamic accesses to result in an empty shell. This is the case when there\n   * are also routes prerendered with a more complete set of params.\n   * Prerendering those routes would catch any invalid dynamic accesses.\n   */\n  allowEmptyStaticShell?: boolean\n\n  /**\n   * When true, attempt to run build-time instant validation for this prerender.\n   * Only the first prerender per page sets this, since validation uses\n   * unstable_instant.samples and is independent of actual route params.\n   */\n  runInstantValidation?: boolean\n}\n\nexport type RenderOpts = LoadComponentsReturnType<AppPageModule> &\n  RenderOptsPartial &\n  RequestLifecycleOpts\n\nexport type PreloadCallbacks = (() => void)[]\n","import type { LoaderTree } from '../lib/app-dir-module'\nimport {\n  PrefetchHint,\n  type FlightRouterState,\n  type PrefetchHints,\n} from '../../shared/lib/app-router-types'\nimport type { GetDynamicParamFromSegment } from './app-render'\nimport { addSearchParamsIfPageSegment } from '../../shared/lib/segment'\nimport type { AppSegmentConfig } from '../../build/segment-config/app/app-segment-config'\n\nasync function createFlightRouterStateFromLoaderTreeImpl(\n  loaderTree: LoaderTree,\n  hintTree: PrefetchHints | null,\n  getDynamicParamFromSegment: GetDynamicParamFromSegment,\n  searchParams: any,\n  didFindRootLayout: boolean\n): Promise<FlightRouterState> {\n  const [segment, parallelRoutes, { layout, loading, page }] = loaderTree\n  const dynamicParam = getDynamicParamFromSegment(loaderTree)\n  const treeSegment = dynamicParam ? dynamicParam.treeSegment : segment\n\n  const segmentTree: FlightRouterState = [\n    addSearchParamsIfPageSegment(treeSegment, searchParams),\n    {},\n  ]\n\n  // Load the layout or page module to check for unstable_instant config\n  const mod = layout ? await layout[0]() : page ? await page[0]() : undefined\n  const instantConfig = mod\n    ? (mod as AppSegmentConfig).unstable_instant\n    : undefined\n  let prefetchHints = 0\n\n  // Union in the precomputed build-time hints (e.g. segment inlining\n  // decisions) if available. When hints are not available (e.g. dev mode or\n  // if prefetch-hints.json was not generated), we fall through and still\n  // compute the other hints below. In the future this should be a build\n  // error, but for now we gracefully degrade.\n  //\n  // TODO: Move more of the hints computation (IsRootLayout, instant config,\n  // loading boundary detection) into the build-time measurement step in\n  // collectPrefetchHints, so this function only needs to union the\n  // precomputed bitmask rather than re-derive hints on every render.\n  if (hintTree !== null) {\n    prefetchHints |= hintTree.hints\n  }\n\n  // Mark the first segment that has a layout as the \"root\" layout\n  if (!didFindRootLayout && typeof layout !== 'undefined') {\n    didFindRootLayout = true\n    prefetchHints |= PrefetchHint.IsRootLayout\n  }\n\n  if (instantConfig && typeof instantConfig === 'object') {\n    prefetchHints |= PrefetchHint.SubtreeHasInstant\n    if (instantConfig.prefetch === 'runtime') {\n      prefetchHints |= PrefetchHint.HasRuntimePrefetch\n    }\n  }\n\n  // Check if this segment has a loading boundary\n  if (loading) {\n    prefetchHints |= PrefetchHint.SegmentHasLoadingBoundary\n  }\n\n  const children: FlightRouterState[1] = {}\n  for (const parallelRouteKey in parallelRoutes) {\n    // Look up the child hint node by parallel route key, traversing the\n    // hint tree in parallel with the loader tree.\n    const childHintNode = hintTree?.slots?.[parallelRouteKey] ?? null\n\n    const child = await createFlightRouterStateFromLoaderTreeImpl(\n      parallelRoutes[parallelRouteKey],\n      childHintNode,\n      getDynamicParamFromSegment,\n      searchParams,\n      didFindRootLayout\n    )\n    // Propagate subtree flags from children\n    if (child[4] !== undefined) {\n      prefetchHints |=\n        child[4] &\n        (PrefetchHint.SubtreeHasInstant |\n          PrefetchHint.SubtreeHasLoadingBoundary)\n      // If a child has a loading boundary (either directly or in its subtree),\n      // propagate that as SubtreeHasLoadingBoundary to this segment.\n      if (\n        child[4] &\n        (PrefetchHint.SegmentHasLoadingBoundary |\n          PrefetchHint.SubtreeHasLoadingBoundary)\n      ) {\n        prefetchHints |= PrefetchHint.SubtreeHasLoadingBoundary\n      }\n    }\n    children[parallelRouteKey] = child\n  }\n  segmentTree[1] = children\n\n  if (prefetchHints !== 0) {\n    segmentTree[4] = prefetchHints\n  }\n\n  return segmentTree\n}\n\nexport async function createFlightRouterStateFromLoaderTree(\n  loaderTree: LoaderTree,\n  hintTree: PrefetchHints | null,\n  getDynamicParamFromSegment: GetDynamicParamFromSegment,\n  searchParams: any\n): Promise<FlightRouterState> {\n  const didFindRootLayout = false\n  return createFlightRouterStateFromLoaderTreeImpl(\n    loaderTree,\n    hintTree,\n    getDynamicParamFromSegment,\n    searchParams,\n    didFindRootLayout\n  )\n}\n\nexport async function createRouteTreePrefetch(\n  loaderTree: LoaderTree,\n  hintTree: PrefetchHints | null,\n  getDynamicParamFromSegment: GetDynamicParamFromSegment\n): Promise<FlightRouterState> {\n  // Search params should not be added to page segment's cache key during a\n  // route tree prefetch request, because they do not affect the structure of\n  // the route. The client cache has its own logic to handle search params.\n  const searchParams = {}\n  const didFindRootLayout = false\n  return createFlightRouterStateFromLoaderTreeImpl(\n    loaderTree,\n    hintTree,\n    getDynamicParamFromSegment,\n    searchParams,\n    didFindRootLayout\n  )\n}\n","export const ipcForbiddenHeaders = [\n  'accept-encoding',\n  'keepalive',\n  'keep-alive',\n  'content-encoding',\n  'transfer-encoding',\n  // https://github.com/nodejs/undici/issues/1470\n  'connection',\n  // marked as unsupported by undici: https://github.com/nodejs/undici/blob/c83b084879fa0bb8e0469d31ec61428ac68160d5/lib/core/request.js#L354\n  'expect',\n]\n\nexport const actionsForbiddenHeaders = [\n  ...ipcForbiddenHeaders,\n  'content-length',\n  'set-cookie',\n]\n\nexport const filterReqHeaders = (\n  headers: Record<string, undefined | string | number | string[]>,\n  forbiddenHeaders: string[]\n) => {\n  // Some browsers are not matching spec and sending Content-Length: 0. This causes issues in undici\n  // https://github.com/nodejs/undici/issues/2046\n  if (headers['content-length'] && headers['content-length'] === '0') {\n    delete headers['content-length']\n  }\n\n  for (const [key, value] of Object.entries(headers)) {\n    if (\n      forbiddenHeaders.includes(key) ||\n      !(Array.isArray(value) || typeof value === 'string')\n    ) {\n      delete headers[key]\n    }\n  }\n  return headers as Record<string, undefined | string | string[]>\n}\n\n// These are headers that are only used internally and should\n// not be honored from the external request\nconst INTERNAL_HEADERS = [\n  'x-middleware-rewrite',\n  'x-middleware-redirect',\n  'x-middleware-set-cookie',\n  'x-middleware-skip',\n  'x-middleware-override-headers',\n  'x-middleware-next',\n  'x-now-route-matches',\n  'x-matched-path',\n  'x-next-resume-state-length',\n]\n\nexport const filterInternalHeaders = (\n  headers: Record<string, undefined | string | string[]>\n) => {\n  for (const header in headers) {\n    if (INTERNAL_HEADERS.includes(header)) {\n      delete headers[header]\n    }\n  }\n}\n","import type { IncomingMessage } from 'http'\nimport type { BaseNextRequest } from '../base-http'\nimport type { NextRequest } from '../web/exports'\nimport { ACTION_HEADER } from '../../client/components/app-router-headers'\n\nexport function getServerActionRequestMetadata(\n  req: IncomingMessage | BaseNextRequest | NextRequest\n): {\n  actionId: string | null\n  isURLEncodedAction: boolean\n  isMultipartAction: boolean\n  isFetchAction: boolean\n  isPossibleServerAction: boolean\n} {\n  let actionId: string | null\n  let contentType: string | null\n\n  if (req.headers instanceof Headers) {\n    actionId = req.headers.get(ACTION_HEADER) ?? null\n    contentType = req.headers.get('content-type')\n  } else {\n    actionId = (req.headers[ACTION_HEADER] as string) ?? null\n    contentType = req.headers['content-type'] ?? null\n  }\n\n  // We don't actually support URL encoded actions, and the action handler will bail out if it sees one.\n  // But we still want it to flow through to the action handler, to prevent changes in behavior when a regular\n  // page component tries to handle a POST.\n  const isURLEncodedAction = Boolean(\n    req.method === 'POST' && contentType === 'application/x-www-form-urlencoded'\n  )\n  const isMultipartAction = Boolean(\n    req.method === 'POST' && contentType?.startsWith('multipart/form-data')\n  )\n  const isFetchAction = Boolean(\n    actionId !== undefined &&\n      typeof actionId === 'string' &&\n      req.method === 'POST'\n  )\n\n  const isPossibleServerAction = Boolean(\n    isFetchAction || isURLEncodedAction || isMultipartAction\n  )\n\n  return {\n    actionId,\n    isURLEncodedAction,\n    isMultipartAction,\n    isFetchAction,\n    isPossibleServerAction,\n  }\n}\n\nexport function getIsPossibleServerAction(\n  req: IncomingMessage | BaseNextRequest | NextRequest\n): boolean {\n  return getServerActionRequestMetadata(req).isPossibleServerAction\n}\n","import { bold, green, magenta, red, yellow, white } from '../../lib/picocolors'\nimport { LRUCache } from '../../server/lib/lru-cache'\n\nexport const prefixes = {\n  wait: white(bold('○')),\n  error: red(bold('⨯')),\n  warn: yellow(bold('⚠')),\n  ready: '▲', // no color\n  info: white(bold(' ')),\n  event: green(bold('✓')),\n  trace: magenta(bold('»')),\n} as const\n\nconst LOGGING_METHOD = {\n  log: 'log',\n  warn: 'warn',\n  error: 'error',\n} as const\n\nfunction prefixedLog(prefixType: keyof typeof prefixes, ...message: any[]) {\n  if ((message[0] === '' || message[0] === undefined) && message.length === 1) {\n    message.shift()\n  }\n\n  const consoleMethod: keyof typeof LOGGING_METHOD =\n    prefixType in LOGGING_METHOD\n      ? LOGGING_METHOD[prefixType as keyof typeof LOGGING_METHOD]\n      : 'log'\n\n  const prefix = prefixes[prefixType]\n  // If there's no message, don't print the prefix but a new line\n  if (message.length === 0) {\n    console[consoleMethod]('')\n  } else {\n    // Ensure if there's ANSI escape codes it's concatenated into one string.\n    // Chrome DevTool can only handle color if it's in one string.\n    if (message.length === 1 && typeof message[0] === 'string') {\n      console[consoleMethod](prefix + ' ' + message[0])\n    } else {\n      console[consoleMethod](prefix, ...message)\n    }\n  }\n}\n\nexport function bootstrap(message: string) {\n  console.log(message)\n}\n\nexport function wait(...message: any[]) {\n  prefixedLog('wait', ...message)\n}\n\nexport function error(...message: any[]) {\n  prefixedLog('error', ...message)\n}\n\nexport function warn(...message: any[]) {\n  prefixedLog('warn', ...message)\n}\n\nexport function ready(...message: any[]) {\n  prefixedLog('ready', ...message)\n}\n\nexport function info(...message: any[]) {\n  prefixedLog('info', ...message)\n}\n\nexport function event(...message: any[]) {\n  prefixedLog('event', ...message)\n}\n\nexport function trace(...message: any[]) {\n  prefixedLog('trace', ...message)\n}\n\nconst warnOnceCache = new LRUCache<string>(10_000, (value) => value.length)\nexport function warnOnce(...message: any[]) {\n  const key = message.join(' ')\n  if (!warnOnceCache.has(key)) {\n    warnOnceCache.set(key, key)\n    warn(...message)\n  }\n}\n\nconst errorOnceCache = new LRUCache<string>(10_000, (value) => value.length)\nexport function errorOnce(...message: any[]) {\n  const key = message.join(' ')\n  if (!errorOnceCache.has(key)) {\n    errorOnceCache.set(key, key)\n    error(...message)\n  }\n}\n","import type { LoaderTree } from '../lib/app-dir-module'\n\nexport const BUILTIN_PREFIX = '__next_builtin__'\n\nconst nextInternalPrefixRegex =\n  /^(.*[\\\\/])?next[\\\\/]dist[\\\\/]client[\\\\/]components[\\\\/]builtin[\\\\/]/\n\n/**\n * Normalize a file path to be relative to the project directory.\n * Handles Turbopack [project] prefix and monorepo setups.\n */\nexport function normalizeFilePath(\n  projectDir: string,\n  filePath: string | undefined\n): string {\n  // Turbopack project path is formed as: \"<project root>/<cwd>\".\n  // When project root is not the working directory, we can extract the relative project root path.\n  // This is mostly used for running Next.js inside a monorepo.\n  const cwd = process.env.NEXT_RUNTIME === 'edge' ? '' : process.cwd()\n  const relativeProjectRoot = projectDir.replace(cwd, '').replace(/^[\\\\/]/, '')\n\n  let relativePath = (filePath || '')\n    // remove turbopack [project] prefix\n    .replace(/^\\[project\\][\\\\/]?/, '')\n    // remove the project root from the path (absolute)\n    .replace(projectDir, '')\n    // remove cwd prefix (absolute)\n    .replace(cwd, '')\n    // normalize path separators and remove leading slash\n    .replace(/\\\\/g, '/')\n    .replace(/^\\//, '')\n\n  // remove relative project path prefix (e.g., \"test/e2e/app-dir/actions/\")\n  if (relativeProjectRoot && relativePath.startsWith(relativeProjectRoot)) {\n    relativePath = relativePath\n      .slice(relativeProjectRoot.length)\n      .replace(/^\\//, '')\n  }\n\n  // Handle case where filename is relative to a parent of projectDir\n  // (e.g., in tests where filename is \"test/tmp/next-test-XXX/app/page.js\"\n  // but projectDir is the test temp directory)\n  if (relativePath.includes('/')) {\n    const projectDirName = projectDir.split(/[\\\\/]/).pop() || ''\n    if (projectDirName) {\n      const projectDirWithSlash = projectDirName + '/'\n      const idx = relativePath.indexOf(projectDirWithSlash)\n      if (idx >= 0) {\n        relativePath = relativePath.slice(idx + projectDirWithSlash.length)\n      }\n    }\n  }\n\n  return relativePath\n}\n\nexport function normalizeConventionFilePath(\n  projectDir: string,\n  conventionPath: string | undefined\n) {\n  let relativePath = normalizeFilePath(projectDir, conventionPath)\n    // remove /(src/)?app/ dir prefix\n    .replace(/^(src\\/)?app\\//, '')\n\n  // If it's internal file only keep the filename, strip nextjs internal prefix\n  if (nextInternalPrefixRegex.test(relativePath)) {\n    relativePath = relativePath.replace(nextInternalPrefixRegex, '')\n    // Add a special prefix to let segment explorer know it's a built-in component\n    relativePath = `${BUILTIN_PREFIX}${relativePath}`\n  }\n\n  return relativePath\n}\n\n// if a filepath is a builtin file. e.g.\n// .../project/node_modules/next/dist/client/components/builtin/global-error.js -> true\n// .../project/app/global-error.js -> false\nexport const isNextjsBuiltinFilePath = (filePath: string) => {\n  return nextInternalPrefixRegex.test(filePath)\n}\n\nexport const BOUNDARY_SUFFIX = '@boundary'\nexport function normalizeBoundaryFilename(filename: string) {\n  return filename\n    .replace(new RegExp(`^${BUILTIN_PREFIX}`), '')\n    .replace(new RegExp(`${BOUNDARY_SUFFIX}$`), '')\n}\n\nexport const BOUNDARY_PREFIX = 'boundary:'\nexport function isBoundaryFile(fileType: string) {\n  return fileType.startsWith(BOUNDARY_PREFIX)\n}\n\n// if a filename is a builtin file.\n// __next_builtin__global-error.js -> true\n// page.js -> false\nexport function isBuiltinBoundaryFile(fileType: string) {\n  return fileType.startsWith(BUILTIN_PREFIX)\n}\n\nexport function getBoundaryOriginFileType(fileType: string) {\n  return fileType.replace(BOUNDARY_PREFIX, '')\n}\n\nexport function getConventionPathByType(\n  tree: LoaderTree,\n  dir: string,\n  conventionType:\n    | 'layout'\n    | 'template'\n    | 'page'\n    | 'not-found'\n    | 'error'\n    | 'loading'\n    | 'forbidden'\n    | 'unauthorized'\n    | 'defaultPage'\n    | 'global-error'\n) {\n  const modules = tree[2]\n  const conventionPath = modules[conventionType]\n    ? modules[conventionType][1]\n    : undefined\n  if (conventionPath) {\n    return normalizeConventionFilePath(dir, conventionPath)\n  }\n  return undefined\n}\n","import type { IncomingHttpHeaders, OutgoingHttpHeaders } from 'node:http'\nimport type { SizeLimit } from '../../types'\nimport type { RequestStore } from '../app-render/work-unit-async-storage.external'\nimport type { AppRenderContext, GenerateFlight } from './app-render'\nimport type { AppPageModule } from '../route-modules/app-page/module'\nimport type { BaseNextRequest, BaseNextResponse } from '../base-http'\n\nimport {\n  RSC_HEADER,\n  RSC_CONTENT_TYPE_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  ACTION_HEADER,\n  NEXT_ACTION_NOT_FOUND_HEADER,\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  NEXT_URL,\n  NEXT_ACTION_REVALIDATED_HEADER,\n} from '../../client/components/app-router-headers'\nimport {\n  getAccessFallbackHTTPStatus,\n  isHTTPAccessFallbackError,\n} from '../../client/components/http-access-fallback/http-access-fallback'\nimport {\n  getRedirectTypeFromError,\n  getURLFromRedirectError,\n} from '../../client/components/redirect'\nimport {\n  isRedirectError,\n  type RedirectType,\n} from '../../client/components/redirect-error'\nimport RenderResult, {\n  type AppPageRenderResultMetadata,\n} from '../render-result'\nimport type { WorkStore } from '../app-render/work-async-storage.external'\nimport { FlightRenderResult } from './flight-render-result'\nimport {\n  filterReqHeaders,\n  actionsForbiddenHeaders,\n} from '../lib/server-ipc/utils'\nimport { getModifiedCookieValues } from '../web/spec-extension/adapters/request-cookies'\n\nimport {\n  JSON_CONTENT_TYPE_HEADER,\n  NEXT_CACHE_REVALIDATED_TAGS_HEADER,\n  NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER,\n} from '../../lib/constants'\nimport { getServerActionRequestMetadata } from '../lib/server-action-request-meta'\nimport { isCsrfOriginAllowed } from './csrf-protection'\nimport { warn } from '../../build/output/log'\nimport { RequestCookies, ResponseCookies } from '../web/spec-extension/cookies'\nimport { HeadersAdapter } from '../web/spec-extension/adapters/headers'\nimport { fromNodeOutgoingHttpHeaders } from '../web/utils'\nimport {\n  selectWorkerForForwarding,\n  type ServerModuleMap,\n  getServerActionsManifest,\n  getServerModuleMap,\n} from './manifests-singleton'\nimport { isNodeNextRequest, isWebNextRequest } from '../base-http/helpers'\nimport { normalizeFilePath } from './segment-explorer-path'\nimport { extractInfoFromServerReferenceId } from '../../shared/lib/server-reference-info'\nimport type { ServerActionLogInfo } from '../dev/server-action-logger'\nimport { RedirectStatusCode } from '../../client/components/redirect-status-code'\nimport { synchronizeMutableCookies } from '../async-storage/request-store'\nimport type { TemporaryReferenceSet } from 'react-server-dom-webpack/server'\nimport { workUnitAsyncStorage } from '../app-render/work-unit-async-storage.external'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { executeRevalidates } from '../revalidation-utils'\nimport { addRequestMeta, getRequestMeta } from '../request-meta'\nimport { setCacheBustingSearchParam } from '../../client/components/router-reducer/set-cache-busting-search-param'\nimport {\n  ActionDidNotRevalidate,\n  ActionDidRevalidateStaticAndDynamic,\n} from '../../shared/lib/action-revalidation-kind'\n\nconst INLINE_ACTION_PREFIX = '$$RSC_SERVER_ACTION_'\n\n/**\n * Checks if the app has any server actions defined in any runtime.\n */\nfunction hasServerActions() {\n  const serverActionsManifest = getServerActionsManifest()\n\n  return (\n    Object.keys(serverActionsManifest.node).length > 0 ||\n    Object.keys(serverActionsManifest.edge).length > 0\n  )\n}\n\nfunction nodeHeadersToRecord(\n  headers: IncomingHttpHeaders | OutgoingHttpHeaders\n) {\n  const record: Record<string, string> = {}\n  for (const [key, value] of Object.entries(headers)) {\n    if (value !== undefined) {\n      record[key] = Array.isArray(value) ? value.join(', ') : `${value}`\n    }\n  }\n  return record\n}\n\nfunction getForwardedHeaders(\n  req: BaseNextRequest,\n  res: BaseNextResponse\n): Headers {\n  // Get request headers and cookies\n  const requestHeaders = req.headers\n  const requestCookies = new RequestCookies(HeadersAdapter.from(requestHeaders))\n\n  // Get response headers and cookies\n  const responseHeaders = res.getHeaders()\n  const responseCookies = new ResponseCookies(\n    fromNodeOutgoingHttpHeaders(responseHeaders)\n  )\n\n  // Merge request and response headers\n  const mergedHeaders = filterReqHeaders(\n    {\n      ...nodeHeadersToRecord(requestHeaders),\n      ...nodeHeadersToRecord(responseHeaders),\n    },\n    actionsForbiddenHeaders\n  ) as Record<string, string>\n\n  // Merge cookies into requestCookies, so responseCookies always take precedence\n  // and overwrite/delete those from requestCookies.\n  responseCookies.getAll().forEach((cookie) => {\n    if (typeof cookie.value === 'undefined') {\n      requestCookies.delete(cookie.name)\n    } else {\n      requestCookies.set(cookie)\n    }\n  })\n\n  // Update the 'cookie' header with the merged cookies\n  mergedHeaders['cookie'] = requestCookies.toString()\n\n  // Remove headers that should not be forwarded\n  delete mergedHeaders['transfer-encoding']\n\n  return new Headers(mergedHeaders)\n}\n\nfunction addRevalidationHeader(\n  res: BaseNextResponse,\n  {\n    workStore,\n    requestStore,\n  }: {\n    workStore: WorkStore\n    requestStore: RequestStore\n  }\n) {\n  // If a tag was revalidated, the client router needs to invalidate all the\n  // client router cache as they may be stale. And if a path was revalidated, the\n  // client needs to invalidate all subtrees below that path.\n\n  // TODO: Currently we don't send the specific tags or paths to the client,\n  // we just send a flag indicating that all the static data on the client\n  // should be invalidated. In the future, this will likely be a Bloom filter\n  // or bitmask of some kind.\n\n  // TODO-APP: Currently the prefetch cache doesn't have subtree information,\n  // so we need to invalidate the entire cache if a path was revalidated.\n  // TODO-APP: Currently paths are treated as tags, so the second element of the tuple\n  // is always empty.\n\n  // Only count tags without a profile (updateTag) as requiring client cache invalidation\n  // Tags with a profile (revalidateTag) use stale-while-revalidate and shouldn't\n  // trigger immediate client-side cache invalidation\n  const isTagRevalidated = workStore.pendingRevalidatedTags?.some(\n    (item) => item.profile === undefined\n  )\n    ? 1\n    : 0\n  const isCookieRevalidated = getModifiedCookieValues(\n    requestStore.mutableCookies\n  ).length\n    ? 1\n    : 0\n\n  // First check if a tag, cookie, or path was revalidated.\n  if (isTagRevalidated || isCookieRevalidated) {\n    res.setHeader(\n      NEXT_ACTION_REVALIDATED_HEADER,\n      JSON.stringify(ActionDidRevalidateStaticAndDynamic)\n    )\n  } else if (\n    // Check for refresh() actions. This will invalidate only the dynamic data.\n    workStore.pathWasRevalidated !== undefined &&\n    workStore.pathWasRevalidated !== ActionDidNotRevalidate\n  ) {\n    res.setHeader(\n      NEXT_ACTION_REVALIDATED_HEADER,\n      JSON.stringify(workStore.pathWasRevalidated)\n    )\n  }\n}\n\n/**\n * Forwards a server action request to a separate worker. Used when the requested action is not available in the current worker.\n */\nasync function createForwardedActionResponse(\n  req: BaseNextRequest,\n  res: BaseNextResponse,\n  host: Host,\n  workerPathname: string,\n  basePath: string\n) {\n  if (!host) {\n    throw new Error(\n      'Invariant: Missing `host` header from a forwarded Server Actions request.'\n    )\n  }\n\n  const forwardedHeaders = getForwardedHeaders(req, res)\n\n  // indicate that this action request was forwarded from another worker\n  // we use this to skip rendering the flight tree so that we don't update the UI\n  // with the response from the forwarded worker\n  forwardedHeaders.set('x-action-forwarded', '1')\n\n  const proto =\n    getRequestMeta(req, 'initProtocol')?.replace(/:+$/, '') || 'https'\n\n  // For standalone or the serverful mode, use the internal origin directly\n  // other than the host headers from the request.\n  const origin = process.env.__NEXT_PRIVATE_ORIGIN || `${proto}://${host.value}`\n\n  const fetchUrl = new URL(`${origin}${basePath}${workerPathname}`)\n\n  try {\n    let body: BodyInit | ReadableStream<Uint8Array> | undefined\n    if (\n      // The type check here ensures that `req` is correctly typed, and the\n      // environment variable check provides dead code elimination.\n      process.env.NEXT_RUNTIME === 'edge' &&\n      isWebNextRequest(req)\n    ) {\n      if (!req.body) {\n        throw new Error('Invariant: missing request body.')\n      }\n\n      body = req.body\n    } else if (\n      // The type check here ensures that `req` is correctly typed, and the\n      // environment variable check provides dead code elimination.\n      process.env.NEXT_RUNTIME !== 'edge' &&\n      isNodeNextRequest(req)\n    ) {\n      body = req.stream()\n    } else {\n      throw new Error('Invariant: Unknown request type.')\n    }\n\n    // Forward the request to the new worker\n    const response = await fetch(fetchUrl, {\n      method: 'POST',\n      body,\n      duplex: 'half',\n      headers: forwardedHeaders,\n      redirect: 'manual',\n      next: {\n        // @ts-ignore\n        internal: 1,\n      },\n    })\n\n    if (\n      response.headers.get('content-type')?.startsWith(RSC_CONTENT_TYPE_HEADER)\n    ) {\n      // copy the headers from the redirect response to the response we're sending\n      for (const [key, value] of response.headers) {\n        if (!actionsForbiddenHeaders.includes(key)) {\n          res.setHeader(key, value)\n        }\n      }\n\n      return new FlightRenderResult(response.body!)\n    } else {\n      // Since we aren't consuming the response body, we cancel it to avoid memory leaks\n      response.body?.cancel()\n    }\n  } catch (err) {\n    // we couldn't stream the forwarded response, so we'll just return an empty response\n    console.error(`failed to forward action response`, err)\n  }\n\n  return RenderResult.fromStatic('{}', JSON_CONTENT_TYPE_HEADER)\n}\n\n/**\n * Returns the parsed redirect URL if we deem that it is hosted by us.\n *\n * We handle both relative and absolute redirect URLs.\n *\n * In case the redirect URL is not relative to the application we return `null`.\n */\nfunction getAppRelativeRedirectUrl(\n  basePath: string,\n  host: Host,\n  redirectUrl: string,\n  currentPathname?: string\n): URL | null {\n  if (redirectUrl.startsWith('/')) {\n    // Absolute path - just add basePath\n    return new URL(`${basePath}${redirectUrl}`, 'http://n')\n  } else if (redirectUrl.startsWith('.')) {\n    // Relative path - resolve relative to current pathname\n    let base = currentPathname || '/'\n    // Ensure the base path ends with a slash so relative resolution works correctly\n    // e.g., \"./subpage\" from \"/subdir\" should resolve to \"/subdir/subpage\"\n    // not \"/subpage\"\n    if (!base.endsWith('/')) {\n      base = base + '/'\n    }\n    const resolved = new URL(redirectUrl, `http://n${base}`)\n    // Include basePath in the final URL\n    return new URL(\n      `${basePath}${resolved.pathname}${resolved.search}${resolved.hash}`,\n      'http://n'\n    )\n  }\n\n  const parsedRedirectUrl = new URL(redirectUrl)\n\n  if (host?.value !== parsedRedirectUrl.host) {\n    return null\n  }\n\n  // At this point the hosts are the same, just confirm we\n  // are routing to a path underneath the `basePath`\n  return parsedRedirectUrl.pathname.startsWith(basePath)\n    ? parsedRedirectUrl\n    : null\n}\n\nasync function createRedirectRenderResult(\n  req: BaseNextRequest,\n  res: BaseNextResponse,\n  originalHost: Host,\n  redirectUrl: string,\n  redirectType: RedirectType,\n  basePath: string,\n  workStore: WorkStore,\n  currentPathname?: string\n) {\n  res.setHeader('x-action-redirect', `${redirectUrl};${redirectType}`)\n\n  // If we're redirecting to another route of this Next.js application, we'll\n  // try to stream the response from the other worker path. When that works,\n  // we can save an extra roundtrip and avoid a full page reload.\n  // When the redirect URL starts with a `/` or is to the same host, under the\n  // `basePath` we treat it as an app-relative redirect;\n  const appRelativeRedirectUrl = getAppRelativeRedirectUrl(\n    basePath,\n    originalHost,\n    redirectUrl,\n    currentPathname\n  )\n\n  if (appRelativeRedirectUrl) {\n    if (!originalHost) {\n      throw new Error(\n        'Invariant: Missing `host` header from a forwarded Server Actions request.'\n      )\n    }\n\n    const forwardedHeaders = getForwardedHeaders(req, res)\n    forwardedHeaders.set(RSC_HEADER, '1')\n\n    const proto =\n      getRequestMeta(req, 'initProtocol')?.replace(/:+$/, '') || 'https'\n\n    // For standalone or the serverful mode, use the internal origin directly\n    // other than the host headers from the request.\n    const origin =\n      process.env.__NEXT_PRIVATE_ORIGIN || `${proto}://${originalHost.value}`\n\n    const fetchUrl = new URL(\n      `${origin}${appRelativeRedirectUrl.pathname}${appRelativeRedirectUrl.search}`\n    )\n\n    if (workStore.pendingRevalidatedTags) {\n      forwardedHeaders.set(\n        NEXT_CACHE_REVALIDATED_TAGS_HEADER,\n        workStore.pendingRevalidatedTags.map((item) => item.tag).join(',')\n      )\n      forwardedHeaders.set(\n        NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER,\n        workStore.incrementalCache?.prerenderManifest?.preview?.previewModeId ||\n          ''\n      )\n    }\n\n    // Ensures that when the path was revalidated we don't return a partial response on redirects\n    forwardedHeaders.delete(NEXT_ROUTER_STATE_TREE_HEADER)\n    // When an action follows a redirect, it's no longer handling an action: it's just a normal RSC request\n    // to the requested URL. We should remove the `next-action` header so that it's not treated as an action\n    forwardedHeaders.delete(ACTION_HEADER)\n\n    try {\n      setCacheBustingSearchParam(fetchUrl, {\n        [NEXT_ROUTER_PREFETCH_HEADER]: forwardedHeaders.get(\n          NEXT_ROUTER_PREFETCH_HEADER\n        )\n          ? ('1' as const)\n          : undefined,\n        [NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]:\n          forwardedHeaders.get(NEXT_ROUTER_SEGMENT_PREFETCH_HEADER) ??\n          undefined,\n        [NEXT_ROUTER_STATE_TREE_HEADER]:\n          forwardedHeaders.get(NEXT_ROUTER_STATE_TREE_HEADER) ?? undefined,\n        [NEXT_URL]: forwardedHeaders.get(NEXT_URL) ?? undefined,\n      })\n\n      const response = await fetch(fetchUrl, {\n        method: 'GET',\n        headers: forwardedHeaders,\n        next: {\n          // @ts-ignore\n          internal: 1,\n        },\n      })\n\n      if (\n        response.headers\n          .get('content-type')\n          ?.startsWith(RSC_CONTENT_TYPE_HEADER)\n      ) {\n        // copy the headers from the redirect response to the response we're sending\n        for (const [key, value] of response.headers) {\n          if (!actionsForbiddenHeaders.includes(key)) {\n            res.setHeader(key, value)\n          }\n        }\n\n        return new FlightRenderResult(response.body!)\n      } else {\n        // Since we aren't consuming the response body, we cancel it to avoid memory leaks\n        response.body?.cancel()\n      }\n    } catch (err) {\n      // we couldn't stream the redirect response, so we'll just do a normal redirect\n      console.error(`failed to get redirect response`, err)\n    }\n  }\n\n  return RenderResult.EMPTY\n}\n\n// Used to compare Host header and Origin header.\nconst enum HostType {\n  XForwardedHost = 'x-forwarded-host',\n  Host = 'host',\n}\ntype Host =\n  | {\n      type: HostType.XForwardedHost\n      value: string\n    }\n  | {\n      type: HostType.Host\n      value: string\n    }\n  | undefined\n\n/**\n * Ensures the value of the header can't create long logs.\n */\nfunction limitUntrustedHeaderValueForLogs(value: string) {\n  return value.length > 100 ? value.slice(0, 100) + '...' : value\n}\n\nexport function parseHostHeader(\n  headers: IncomingHttpHeaders,\n  originDomain?: string\n) {\n  const forwardedHostHeader = headers['x-forwarded-host']\n  const forwardedHostHeaderValue =\n    forwardedHostHeader && Array.isArray(forwardedHostHeader)\n      ? forwardedHostHeader[0]\n      : forwardedHostHeader?.split(',')?.[0]?.trim()\n  const hostHeader = headers['host']\n\n  if (originDomain) {\n    return forwardedHostHeaderValue === originDomain\n      ? {\n          type: HostType.XForwardedHost,\n          value: forwardedHostHeaderValue,\n        }\n      : hostHeader === originDomain\n        ? {\n            type: HostType.Host,\n            value: hostHeader,\n          }\n        : undefined\n  }\n\n  return forwardedHostHeaderValue\n    ? {\n        type: HostType.XForwardedHost,\n        value: forwardedHostHeaderValue,\n      }\n    : hostHeader\n      ? {\n          type: HostType.Host,\n          value: hostHeader,\n        }\n      : undefined\n}\n\ntype ServerActionsConfig = {\n  bodySizeLimit?: SizeLimit\n  allowedOrigins?: string[]\n}\n\ntype HandleActionResult =\n  | {\n      /** An MPA action threw notFound(), and we need to render the appropriate HTML */\n      type: 'not-found'\n    }\n  | {\n      type: 'done'\n      result: RenderResult | undefined\n      formState?: any\n    }\n  /** The request turned out not to be a server action. */\n  | null\n\nexport async function handleAction({\n  req,\n  res,\n  ComponentMod,\n  generateFlight,\n  workStore,\n  requestStore,\n  serverActions,\n  ctx,\n  metadata,\n}: {\n  req: BaseNextRequest\n  res: BaseNextResponse\n  ComponentMod: AppPageModule\n  generateFlight: GenerateFlight\n  workStore: WorkStore\n  requestStore: RequestStore\n  serverActions?: ServerActionsConfig\n  ctx: AppRenderContext\n  metadata: AppPageRenderResultMetadata\n}): Promise<HandleActionResult> {\n  const contentType = req.headers['content-type']\n  const { page } = ctx.renderOpts\n  const serverModuleMap = getServerModuleMap()\n\n  const {\n    actionId,\n    isMultipartAction,\n    isFetchAction,\n    isURLEncodedAction,\n    isPossibleServerAction,\n  } = getServerActionRequestMetadata(req)\n\n  const handleUnrecognizedFetchAction = (err: unknown): HandleActionResult => {\n    // If the deployment doesn't have skew protection, this is expected to occasionally happen,\n    // so we use a warning instead of an error.\n    console.warn(err)\n\n    // Return an empty response with a header that the client router will interpret.\n    // We don't need to waste time encoding a flight response, and using a blank body + header\n    // means that unrecognized actions can also be handled at the infra level\n    // (i.e. without needing to invoke a lambda)\n    res.setHeader(NEXT_ACTION_NOT_FOUND_HEADER, '1')\n    res.setHeader('content-type', 'text/plain')\n    res.statusCode = 404\n    return {\n      type: 'done',\n      result: RenderResult.fromStatic('Server action not found.', 'text/plain'),\n    }\n  }\n\n  // If it can't be a Server Action, skip handling.\n  // Note that this can be a false positive -- any multipart/urlencoded POST can get us here,\n  // But won't know if it's an MPA action or not until we call `decodeAction` below.\n  if (!isPossibleServerAction) {\n    return null\n  }\n\n  // We don't currently support URL encoded actions, so we bail out early.\n  // Depending on if it's a fetch action or an MPA, we return a different response.\n  if (isURLEncodedAction) {\n    if (isFetchAction) {\n      return {\n        type: 'not-found',\n      }\n    } else {\n      // This is an MPA action, so we return null\n      return null\n    }\n  }\n\n  // If the app has no server actions at all, we can 404 early.\n  if (!hasServerActions()) {\n    return handleUnrecognizedFetchAction(getActionNotFoundError(actionId))\n  }\n\n  if (workStore.isStaticGeneration) {\n    throw new Error(\n      \"Invariant: server actions can't be handled during static rendering\"\n    )\n  }\n\n  let temporaryReferences: TemporaryReferenceSet | undefined\n\n  // When running actions the default is no-store, you can still `cache: 'force-cache'`\n  workStore.fetchCache = 'default-no-store'\n\n  const originHeader = req.headers['origin']\n  const originHost =\n    typeof originHeader === 'string'\n      ? // 'null' is a valid origin e.g. from privacy-sensitive contexts like sandboxed iframes.\n        // However, these contexts can still send along credentials like cookies,\n        // so we need to check if they're allowed cross-origin requests.\n        originHeader === 'null'\n        ? 'null'\n        : new URL(originHeader).host\n      : undefined\n  const host = parseHostHeader(req.headers)\n\n  let warning: string | undefined = undefined\n\n  function warnBadServerActionRequest() {\n    if (warning) {\n      warn(warning)\n    }\n  }\n  // This is to prevent CSRF attacks. If `x-forwarded-host` is set, we need to\n  // ensure that the request is coming from the same host.\n  if (!originHost) {\n    // This is a handcrafted request without an origin or a request from an unsafe browser.\n    // We'll let this through but log a warning.\n    // We can't guard against unsafe browsers and handcrafted requests can't contain\n    // user credentials that haven't been shared willingly.\n    warning = 'Missing `origin` header from a forwarded Server Actions request.'\n  } else if (!host || originHost !== host.value) {\n    // If the customer sets a list of allowed origins, we'll allow the request.\n    // These are considered safe but might be different from forwarded host set\n    // by the infra (i.e. reverse proxies).\n    if (isCsrfOriginAllowed(originHost, serverActions?.allowedOrigins)) {\n      // Ignore it\n    } else {\n      if (host) {\n        // This seems to be an CSRF attack. We should not proceed the action.\n        console.error(\n          `\\`${\n            host.type\n          }\\` header with value \\`${limitUntrustedHeaderValueForLogs(\n            host.value\n          )}\\` does not match \\`origin\\` header with value \\`${limitUntrustedHeaderValueForLogs(\n            originHost\n          )}\\` from a forwarded Server Actions request. Aborting the action.`\n        )\n      } else {\n        // This is an attack. We should not proceed the action.\n        console.error(\n          `\\`x-forwarded-host\\` or \\`host\\` headers are not provided. One of these is needed to compare the \\`origin\\` header from a forwarded Server Actions request. Aborting the action.`\n        )\n      }\n\n      const error = new Error('Invalid Server Actions request.')\n\n      if (isFetchAction) {\n        res.statusCode = 500\n        metadata.statusCode = 500\n\n        const promise = Promise.reject(error)\n        try {\n          // we need to await the promise to trigger the rejection early\n          // so that it's already handled by the time we call\n          // the RSC runtime. Otherwise, it will throw an unhandled\n          // promise rejection error in the renderer.\n          await promise\n        } catch {\n          // swallow error, it's gonna be handled on the client\n        }\n\n        return {\n          type: 'done',\n          result: await generateFlight(req, ctx, requestStore, {\n            actionResult: promise,\n            // We didn't execute an action, so no revalidations could have\n            // occurred. We can skip rendering the page.\n            skipPageRendering: true,\n            temporaryReferences,\n          }),\n        }\n      }\n\n      throw error\n    }\n  }\n\n  // ensure we avoid caching server actions unexpectedly\n  res.setHeader(\n    'Cache-Control',\n    'no-cache, no-store, max-age=0, must-revalidate'\n  )\n\n  const { actionAsyncStorage } = ComponentMod\n\n  const actionWasForwarded = Boolean(req.headers['x-action-forwarded'])\n\n  if (actionId) {\n    const forwardedWorker = selectWorkerForForwarding(actionId, page)\n\n    // If forwardedWorker is truthy, it means there isn't a worker for the action\n    // in the current handler, so we forward the request to a worker that has the action.\n    if (forwardedWorker) {\n      return {\n        type: 'done',\n        result: await createForwardedActionResponse(\n          req,\n          res,\n          host,\n          forwardedWorker,\n          ctx.renderOpts.basePath\n        ),\n      }\n    }\n  }\n\n  try {\n    return await actionAsyncStorage.run(\n      { isAction: true },\n      async (): Promise<HandleActionResult> => {\n        // We only use these for fetch actions -- MPA actions handle them inside `decodeAction`.\n        let actionModId: string | number | undefined\n        let boundActionArguments: unknown[] = []\n\n        if (\n          // The type check here ensures that `req` is correctly typed, and the\n          // environment variable check provides dead code elimination.\n          process.env.NEXT_RUNTIME === 'edge' &&\n          isWebNextRequest(req)\n        ) {\n          if (!req.body) {\n            throw new Error('invariant: Missing request body.')\n          }\n\n          // TODO: add body limit\n\n          // Use react-server-dom-webpack/server\n          const {\n            createTemporaryReferenceSet,\n            decodeReply,\n            decodeAction,\n            decodeFormState,\n          } = ComponentMod\n\n          temporaryReferences = createTemporaryReferenceSet()\n\n          if (isMultipartAction) {\n            // TODO-APP: Add streaming support\n            const formData = await req.request.formData()\n            if (isFetchAction) {\n              // A fetch action with a multipart body.\n\n              try {\n                actionModId = getActionModIdOrError(actionId, serverModuleMap)\n              } catch (err) {\n                return handleUnrecognizedFetchAction(err)\n              }\n\n              boundActionArguments = await decodeReply(\n                formData,\n                serverModuleMap,\n                { temporaryReferences }\n              )\n            } else {\n              // Multipart POST, but not a fetch action.\n              // Potentially an MPA action, we have to try decoding it to check.\n              if (areAllActionIdsValid(formData, serverModuleMap) === false) {\n                // TODO: This can be from skew or manipulated input. We should handle this case\n                // more gracefully but this preserves the prior behavior where decodeAction would throw instead.\n                throw new Error(\n                  `Failed to find Server Action. This request might be from an older or newer deployment.\\nRead more: https://nextjs.org/docs/messages/failed-to-find-server-action`\n                )\n              }\n\n              const action = await decodeAction(formData, serverModuleMap)\n              if (typeof action === 'function') {\n                // an MPA action.\n\n                // Only warn if it's a server action, otherwise skip for other post requests\n                warnBadServerActionRequest()\n\n                const { actionResult } = await executeActionAndPrepareForRender(\n                  action as () => Promise<unknown>,\n                  [],\n                  workStore,\n                  requestStore,\n                  actionWasForwarded\n                )\n\n                const formState = await decodeFormState(\n                  actionResult,\n                  formData,\n                  serverModuleMap\n                )\n\n                // Skip the fetch path.\n                // We need to render a full HTML version of the page for the response, we'll handle that in app-render.\n                return {\n                  type: 'done',\n                  result: undefined,\n                  formState,\n                }\n              } else {\n                // We couldn't decode an action, so this POST request turned out not to be a server action request.\n                return null\n              }\n            }\n          } else {\n            // POST with non-multipart body.\n\n            // If it's not multipart AND not a fetch action,\n            // then it can't be an action request.\n            if (!isFetchAction) {\n              return null\n            }\n\n            try {\n              actionModId = getActionModIdOrError(actionId, serverModuleMap)\n            } catch (err) {\n              return handleUnrecognizedFetchAction(err)\n            }\n\n            // A fetch action with a non-multipart body.\n            // In practice, this happens if `encodeReply` returned a string instead of FormData,\n            // which can happen for very simple JSON-like values that don't need multiple flight rows.\n\n            const chunks: Buffer[] = []\n            const reader = req.body.getReader()\n            while (true) {\n              const { done, value } = await reader.read()\n              if (done) {\n                break\n              }\n\n              chunks.push(value)\n            }\n\n            const actionData = Buffer.concat(chunks).toString('utf-8')\n\n            boundActionArguments = await decodeReply(\n              actionData,\n              serverModuleMap,\n              { temporaryReferences }\n            )\n          }\n        } else if (\n          // The type check here ensures that `req` is correctly typed, and the\n          // environment variable check provides dead code elimination.\n          process.env.NEXT_RUNTIME !== 'edge' &&\n          isNodeNextRequest(req)\n        ) {\n          // Use react-server-dom-webpack/server.node which supports streaming\n          const {\n            createTemporaryReferenceSet,\n            decodeReply,\n            decodeReplyFromBusboy,\n            decodeAction,\n            decodeFormState,\n          } = require(\n            `./react-server.node`\n          ) as typeof import('./react-server.node')\n\n          temporaryReferences = createTemporaryReferenceSet()\n\n          const { PassThrough, Readable, Transform } =\n            require('node:stream') as typeof import('node:stream')\n          const { pipeline } =\n            require('node:stream/promises') as typeof import('node:stream/promises')\n\n          // If actionBody was stashed in request meta (from parsing the postponed\n          // state prefix in minimal mode), use it instead of req.body\n          const actionBodyFromMeta = getRequestMeta(req, 'actionBody')\n          const body: import('node:stream').Readable = actionBodyFromMeta\n            ? Readable.from(actionBodyFromMeta)\n            : req.body\n\n          const defaultBodySizeLimit = '1 MB'\n          const bodySizeLimit =\n            serverActions?.bodySizeLimit ?? defaultBodySizeLimit\n          const bodySizeLimitBytes =\n            bodySizeLimit !== defaultBodySizeLimit\n              ? (\n                  require('next/dist/compiled/bytes') as typeof import('next/dist/compiled/bytes')\n                ).parse(bodySizeLimit)\n              : 1024 * 1024 // 1 MB\n\n          let size = 0\n          const sizeLimitTransform = new Transform({\n            transform(chunk, encoding, callback) {\n              size += Buffer.byteLength(chunk, encoding)\n              if (size > bodySizeLimitBytes) {\n                const { ApiError } =\n                  require('../api-utils') as typeof import('../api-utils')\n\n                callback(\n                  new ApiError(\n                    413,\n                    `Body exceeded ${bodySizeLimit} limit.\\n` +\n                      `To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit`\n                  )\n                )\n                return\n              }\n\n              callback(null, chunk)\n            },\n          })\n\n          if (isMultipartAction) {\n            if (isFetchAction) {\n              // A fetch action with a multipart body.\n\n              try {\n                actionModId = getActionModIdOrError(actionId, serverModuleMap)\n              } catch (err) {\n                return handleUnrecognizedFetchAction(err)\n              }\n\n              const busboy = (\n                require('next/dist/compiled/busboy') as typeof import('next/dist/compiled/busboy')\n              )({\n                defParamCharset: 'utf8',\n                headers: req.headers,\n                limits: { fieldSize: bodySizeLimitBytes },\n              })\n\n              const abortController = new AbortController()\n              try {\n                ;[, boundActionArguments] = await Promise.all([\n                  pipeline(body, sizeLimitTransform, busboy, {\n                    signal: abortController.signal,\n                  }),\n                  decodeReplyFromBusboy(busboy, serverModuleMap, {\n                    temporaryReferences,\n                  }),\n                ])\n              } catch (err) {\n                abortController.abort()\n                throw err\n              }\n            } else {\n              // Multipart POST, but not a fetch action.\n              // Potentially an MPA action, we have to try decoding it to check.\n\n              const sizeLimitedBody = new PassThrough()\n\n              // React doesn't yet publish a busboy version of decodeAction\n              // so we polyfill the parsing of FormData.\n              const fakeRequest = new Request('http://localhost', {\n                method: 'POST',\n                // @ts-expect-error\n                headers: { 'Content-Type': contentType },\n                body: Readable.toWeb(\n                  sizeLimitedBody\n                ) as ReadableStream<Uint8Array>,\n                duplex: 'half',\n              })\n\n              let formData: FormData\n              const abortController = new AbortController()\n              try {\n                ;[, formData] = await Promise.all([\n                  pipeline(body, sizeLimitTransform, sizeLimitedBody, {\n                    signal: abortController.signal,\n                  }),\n                  fakeRequest.formData(),\n                ])\n              } catch (err) {\n                abortController.abort()\n                throw err\n              }\n\n              if (areAllActionIdsValid(formData, serverModuleMap) === false) {\n                // TODO: This can be from skew or manipulated input. We should handle this case\n                // more gracefully but this preserves the prior behavior where decodeAction would throw instead.\n                throw new Error(\n                  `Failed to find Server Action. This request might be from an older or newer deployment.\\nRead more: https://nextjs.org/docs/messages/failed-to-find-server-action`\n                )\n              }\n\n              // TODO: Refactor so it is harder to accidentally decode an action before you have validated that the\n              // action referred to is available.\n              const action = await decodeAction(formData, serverModuleMap)\n              if (typeof action === 'function') {\n                // an MPA action.\n\n                // Only warn if it's a server action, otherwise skip for other post requests\n                warnBadServerActionRequest()\n\n                const { actionResult } = await executeActionAndPrepareForRender(\n                  action as () => Promise<unknown>,\n                  [],\n                  workStore,\n                  requestStore,\n                  actionWasForwarded\n                )\n\n                const formState = await decodeFormState(\n                  actionResult,\n                  formData,\n                  serverModuleMap\n                )\n\n                // Skip the fetch path.\n                // We need to render a full HTML version of the page for the response, we'll handle that in app-render.\n                return {\n                  type: 'done',\n                  result: undefined,\n                  formState,\n                }\n              } else {\n                // We couldn't decode an action, so this POST request turned out not to be a server action request.\n                return null\n              }\n            }\n          } else {\n            // POST with non-multipart body.\n\n            // If it's not multipart AND not a fetch action,\n            // then it can't be an action request.\n            if (!isFetchAction) {\n              return null\n            }\n\n            try {\n              actionModId = getActionModIdOrError(actionId, serverModuleMap)\n            } catch (err) {\n              return handleUnrecognizedFetchAction(err)\n            }\n\n            // A fetch action with a non-multipart body.\n            // In practice, this happens if `encodeReply` returned a string instead of FormData,\n            // which can happen for very simple JSON-like values that don't need multiple flight rows.\n\n            const sizeLimitedBody = new PassThrough()\n\n            const chunks: Buffer[] = []\n            await Promise.all([\n              pipeline(body, sizeLimitTransform, sizeLimitedBody),\n              (async () => {\n                for await (const chunk of sizeLimitedBody) {\n                  chunks.push(Buffer.from(chunk))\n                }\n              })(),\n            ])\n\n            const actionData = Buffer.concat(chunks).toString('utf-8')\n\n            boundActionArguments = await decodeReply(\n              actionData,\n              serverModuleMap,\n              { temporaryReferences }\n            )\n          }\n        } else {\n          throw new Error('Invariant: Unknown request type.')\n        }\n\n        // actions.js\n        // app/page.js\n        //   action worker1\n        //     appRender1\n\n        // app/foo/page.js\n        //   action worker2\n        //     appRender\n\n        // / -> fire action -> POST / -> appRender1 -> modId for the action file\n        // /foo -> fire action -> POST /foo -> appRender2 -> modId for the action file\n\n        const actionMod = (await ComponentMod.__next_app__.require(\n          actionModId\n        )) as Record<string, (...args: unknown[]) => Promise<unknown>>\n        const actionHandler =\n          actionMod[\n            // `actionId` must exist if we got here, as otherwise we would have thrown an error above\n            actionId!\n          ]\n\n        // Log server action call in development when enabled\n        let logInfo: ServerActionLogInfo | null = null\n        const { type: actionType } = extractInfoFromServerReferenceId(actionId!)\n        if (\n          process.env.NODE_ENV === 'development' &&\n          ctx.renderOpts.logServerFunctions &&\n          // TODO: For now, skip logging for 'use cache' Server Functions as the\n          // output needs more work, or a different approach entirely.\n          actionType !== 'use-cache'\n        ) {\n          const serverActionsManifest = getServerActionsManifest()\n          const runtime = process.env.NEXT_RUNTIME === 'edge' ? 'edge' : 'node'\n          const actionInfo = serverActionsManifest[runtime]?.[actionId!]\n\n          if (actionInfo) {\n            const isInlineAction =\n              actionInfo.exportedName?.startsWith(INLINE_ACTION_PREFIX)\n\n            const projectDir =\n              ctx.renderOpts.dir ||\n              (process.env.NEXT_RUNTIME === 'edge' ? '' : process.cwd())\n            const location = normalizeFilePath(projectDir, actionInfo.filename)\n\n            // Format function name for display\n            let functionName: string\n            if (isInlineAction) {\n              functionName = '<inline action>'\n            } else if (actionInfo.exportedName === 'default') {\n              functionName = 'default'\n            } else {\n              functionName = actionInfo.exportedName || '<action>'\n            }\n\n            logInfo = { functionName, args: boundActionArguments, location }\n          }\n        }\n\n        const startTime = performance.now()\n        const { actionResult, skipPageRendering } =\n          await executeActionAndPrepareForRender(\n            actionHandler,\n            boundActionArguments,\n            workStore,\n            requestStore,\n            actionWasForwarded\n          ).finally(() => {\n            addRevalidationHeader(res, { workStore, requestStore })\n            if (logInfo) {\n              // Store server action log info to be logged after the request log\n              const duration = Math.round(performance.now() - startTime)\n              addRequestMeta(req, 'devServerActionLog', {\n                functionName: logInfo.functionName,\n                args: logInfo.args,\n                location: logInfo.location,\n                duration,\n              })\n            }\n          })\n\n        // For form actions, we need to continue rendering the page.\n        if (isFetchAction) {\n          // If we skip page rendering, we need to ensure pending revalidates\n          // are awaited before closing the response. Otherwise, this will be\n          // done after rendering the page.\n          const maybeRevalidatesPromise = skipPageRendering\n            ? executeRevalidates(workStore)\n            : false\n\n          return {\n            type: 'done',\n            result: await generateFlight(req, ctx, requestStore, {\n              actionResult: Promise.resolve(actionResult),\n              skipPageRendering,\n              temporaryReferences,\n              waitUntil:\n                maybeRevalidatesPromise === false\n                  ? undefined\n                  : maybeRevalidatesPromise,\n            }),\n          }\n        } else {\n          // TODO: this shouldn't be reachable, because all non-fetch codepaths return early.\n          // this will be handled in a follow-up refactor PR.\n          return null\n        }\n      }\n    )\n  } catch (err) {\n    if (isRedirectError(err)) {\n      const redirectUrl = getURLFromRedirectError(err)\n      const redirectType = getRedirectTypeFromError(err)\n\n      // if it's a fetch action, we'll set the status code for logging/debugging purposes\n      // but we won't set a Location header, as the redirect will be handled by the client router\n      res.statusCode = RedirectStatusCode.SeeOther\n      metadata.statusCode = RedirectStatusCode.SeeOther\n\n      if (isFetchAction) {\n        return {\n          type: 'done',\n          result: await createRedirectRenderResult(\n            req,\n            res,\n            host,\n            redirectUrl,\n            redirectType,\n            ctx.renderOpts.basePath,\n            workStore,\n            requestStore.url.pathname\n          ),\n        }\n      }\n\n      // For an MPA action, the redirect doesn't need a body, just a Location header.\n      res.setHeader('Location', redirectUrl)\n      return {\n        type: 'done',\n        result: RenderResult.EMPTY,\n      }\n    } else if (isHTTPAccessFallbackError(err)) {\n      res.statusCode = getAccessFallbackHTTPStatus(err)\n      metadata.statusCode = res.statusCode\n\n      if (isFetchAction) {\n        const promise = Promise.reject(err)\n        try {\n          // we need to await the promise to trigger the rejection early\n          // so that it's already handled by the time we call\n          // the RSC runtime. Otherwise, it will throw an unhandled\n          // promise rejection error in the renderer.\n          await promise\n        } catch {\n          // swallow error, it's gonna be handled on the client\n        }\n        return {\n          type: 'done',\n          result: await generateFlight(req, ctx, requestStore, {\n            skipPageRendering: false,\n            actionResult: promise,\n            temporaryReferences,\n          }),\n        }\n      }\n\n      // For an MPA action, we need to render a HTML response. We'll handle that in app-render.\n      return {\n        type: 'not-found',\n      }\n    }\n\n    // An error that didn't come from `redirect()` or `notFound()`, likely thrown from user code\n    // (but it could also be a bug in our code!)\n\n    if (isFetchAction) {\n      // TODO: consider checking if the error is an `ApiError` and change status code\n      // so that we can respond with a 413 to requests that break the body size limit\n      // (but if we do that, we also need to make sure that whatever handles the non-fetch error path below does the same)\n      res.statusCode = 500\n      metadata.statusCode = 500\n      const promise = Promise.reject(err)\n      try {\n        // we need to await the promise to trigger the rejection early\n        // so that it's already handled by the time we call\n        // the RSC runtime. Otherwise, it will throw an unhandled\n        // promise rejection error in the renderer.\n        await promise\n      } catch {\n        // swallow error, it's gonna be handled on the client\n      }\n\n      return {\n        type: 'done',\n        result: await generateFlight(req, ctx, requestStore, {\n          actionResult: promise,\n          // If the page was not revalidated, or if the action was forwarded\n          // from another worker, we can skip rendering the page.\n          skipPageRendering:\n            workStore.pathWasRevalidated === undefined ||\n            workStore.pathWasRevalidated === ActionDidNotRevalidate ||\n            actionWasForwarded,\n          temporaryReferences,\n        }),\n      }\n    }\n\n    // For an MPA action, we need to render a HTML response. We'll rethrow the error and let it be handled above.\n    throw err\n  }\n}\n\n/**\n * Limit on the number of arguments passed to a server action. This prevents\n * stack overflow during `action.apply()` from malicious requests.\n */\nconst SERVER_ACTION_ARGS_LIMIT = 1000\n\nasync function executeActionAndPrepareForRender<\n  TFn extends (...args: any[]) => Promise<any>,\n>(\n  action: TFn,\n  args: Parameters<TFn>,\n  workStore: WorkStore,\n  requestStore: RequestStore,\n  actionWasForwarded: boolean\n): Promise<{\n  actionResult: Awaited<ReturnType<TFn>>\n  skipPageRendering: boolean\n}> {\n  requestStore.phase = 'action'\n  let skipPageRendering = actionWasForwarded\n\n  if (args.length > SERVER_ACTION_ARGS_LIMIT) {\n    throw new Error(\n      `Server Action arguments list is too long (${args.length}). Maximum allowed is ${SERVER_ACTION_ARGS_LIMIT}.`\n    )\n  }\n\n  try {\n    const actionResult = await workUnitAsyncStorage.run(requestStore, () =>\n      action.apply(null, args)\n    )\n\n    // If the page was not revalidated, or if the action was forwarded from\n    // another worker, we can skip rendering the page.\n    skipPageRendering ||=\n      workStore.pathWasRevalidated === undefined ||\n      workStore.pathWasRevalidated === ActionDidNotRevalidate\n\n    return { actionResult, skipPageRendering }\n  } finally {\n    if (!skipPageRendering) {\n      requestStore.phase = 'render'\n\n      // When we switch to the render phase, cookies() will return\n      // `workUnitStore.cookies` instead of\n      // `workUnitStore.userspaceMutableCookies`. We want the render to see any\n      // cookie writes that we performed during the action, so we need to update\n      // the immutable cookies to reflect the changes.\n      synchronizeMutableCookies(requestStore)\n\n      // The server action might have toggled draft mode, so we need to reflect\n      // that in the work store to be up-to-date for subsequent rendering.\n      workStore.isDraftMode = requestStore.draftMode.isEnabled\n\n      // If the action called revalidateTag/revalidatePath, then that might\n      // affect data used by the subsequent render, so we need to make sure all\n      // revalidations are applied before that.\n      await executeRevalidates(workStore)\n    }\n  }\n}\n\n/**\n * Attempts to find the module ID for the action from the module map. When this fails, it could be a deployment skew where\n * the action came from a different deployment. It could also simply be an invalid POST request that is not a server action.\n * In either case, we'll throw an error to be handled by the caller.\n */\nfunction getActionModIdOrError(\n  actionId: string | null,\n  serverModuleMap: ServerModuleMap\n): string | number {\n  // if we're missing the action ID header, we can't do any further processing\n  if (!actionId) {\n    throw new InvariantError(\"Missing 'next-action' header.\")\n  }\n\n  const actionModId = serverModuleMap[actionId]?.id\n\n  if (!actionModId) {\n    throw getActionNotFoundError(actionId)\n  }\n\n  return actionModId\n}\n\nfunction getActionNotFoundError(actionId: string | null): Error {\n  return new Error(\n    `Failed to find Server Action${actionId ? ` \"${actionId}\"` : ''}. This request might be from an older or newer deployment.\\nRead more: https://nextjs.org/docs/messages/failed-to-find-server-action`\n  )\n}\n\nconst $ACTION_ = '$ACTION_'\nconst $ACTION_REF_ = '$ACTION_REF_'\nconst $ACTION_ID_ = '$ACTION_ID_'\nconst ACTION_ID_EXPECTED_LENGTH = 42\n\n/**\n * This function mirrors logic inside React's decodeAction and should be kept in sync with that.\n * It pre-parses the FormData to ensure that any action IDs referred to are actual action IDs for\n * this Next.js application.\n */\nfunction areAllActionIdsValid(\n  mpaFormData: FormData,\n  serverModuleMap: ServerModuleMap\n): boolean {\n  let hasAtLeastOneAction = false\n  // Before we attempt to decode the payload for a possible MPA action, assert that all\n  // action IDs are valid IDs. If not we should disregard the payload\n  for (let key of mpaFormData.keys()) {\n    if (!key.startsWith($ACTION_)) {\n      // not a relevant field\n      continue\n    }\n\n    if (key.startsWith($ACTION_ID_)) {\n      // No Bound args case\n      if (isInvalidActionIdFieldName(key, serverModuleMap)) {\n        return false\n      }\n\n      hasAtLeastOneAction = true\n    } else if (key.startsWith($ACTION_REF_)) {\n      // Bound args case\n      const actionDescriptorField =\n        $ACTION_ + key.slice($ACTION_REF_.length) + ':0'\n      const actionFields = mpaFormData.getAll(actionDescriptorField)\n      if (actionFields.length !== 1) {\n        return false\n      }\n      const actionField = actionFields[0]\n      if (typeof actionField !== 'string') {\n        return false\n      }\n\n      if (isInvalidStringActionDescriptor(actionField, serverModuleMap)) {\n        return false\n      }\n      hasAtLeastOneAction = true\n    }\n  }\n  return hasAtLeastOneAction\n}\n\nconst ACTION_DESCRIPTOR_ID_PREFIX = '{\"id\":\"'\nfunction isInvalidStringActionDescriptor(\n  actionDescriptor: string,\n  serverModuleMap: ServerModuleMap\n): unknown {\n  if (actionDescriptor.startsWith(ACTION_DESCRIPTOR_ID_PREFIX) === false) {\n    return true\n  }\n\n  const from = ACTION_DESCRIPTOR_ID_PREFIX.length\n  const to = from + ACTION_ID_EXPECTED_LENGTH\n\n  // We expect actionDescriptor to be '{\"id\":\"<actionId>\",...}'\n  const actionId = actionDescriptor.slice(from, to)\n  if (\n    actionId.length !== ACTION_ID_EXPECTED_LENGTH ||\n    actionDescriptor[to] !== '\"'\n  ) {\n    return true\n  }\n\n  const entry = serverModuleMap[actionId]\n\n  if (entry == null) {\n    return true\n  }\n\n  return false\n}\n\nfunction isInvalidActionIdFieldName(\n  actionIdFieldName: string,\n  serverModuleMap: ServerModuleMap\n): boolean {\n  // The field name must always start with $ACTION_ID_ but since it is\n  // the id is extracted from the key of the field we have already validated\n  // this before entering this function\n  if (\n    actionIdFieldName.length !==\n    $ACTION_ID_.length + ACTION_ID_EXPECTED_LENGTH\n  ) {\n    // this field name has too few or too many characters\n    return true\n  }\n\n  const actionId = actionIdFieldName.slice($ACTION_ID_.length)\n  const entry = serverModuleMap[actionId]\n\n  if (entry == null) {\n    return true\n  }\n\n  return false\n}\n","// micromatch is only available at node runtime, so it cannot be used here since the code path that calls this function\n// can be run from edge. This is a simple implementation that safely achieves the required functionality.\n// the goal is to match the functionality for remotePatterns as defined here -\n// https://nextjs.org/docs/app/api-reference/components/image#remotepatterns\n// TODO - retrofit micromatch to work in edge and use that instead\nfunction matchWildcardDomain(domain: string, pattern: string) {\n  // DNS names are case-insensitive per RFC 1035\n  // Use ASCII-only toLowerCase to avoid unicode issues\n  const normalizedDomain = domain.replace(/[A-Z]/g, (c) => c.toLowerCase())\n  const normalizedPattern = pattern.replace(/[A-Z]/g, (c) => c.toLowerCase())\n\n  const domainParts = normalizedDomain.split('.')\n  const patternParts = normalizedPattern.split('.')\n\n  if (patternParts.length < 1) {\n    // pattern is empty and therefore invalid to match against\n    return false\n  }\n\n  if (domainParts.length < patternParts.length) {\n    // domain has too few segments and thus cannot match\n    return false\n  }\n\n  // Prevent wildcards from matching entire domains (e.g. '**' or '*.com')\n  // This ensures wildcards can only match subdomains, not the main domain\n  if (\n    patternParts.length === 1 &&\n    (patternParts[0] === '*' || patternParts[0] === '**')\n  ) {\n    return false\n  }\n\n  while (patternParts.length) {\n    const patternPart = patternParts.pop()\n    const domainPart = domainParts.pop()\n\n    switch (patternPart) {\n      case '': {\n        // invalid pattern. pattern segments must be non empty\n        return false\n      }\n      case '*': {\n        // wildcard matches anything so we continue if the domain part is non-empty\n        if (domainPart) {\n          continue\n        } else {\n          return false\n        }\n      }\n      case '**': {\n        // if this is not the last item in the pattern the pattern is invalid\n        if (patternParts.length > 0) {\n          return false\n        }\n        // recursive wildcard matches anything so we terminate here if the domain part is non empty\n        return domainPart !== undefined\n      }\n      case undefined:\n      default: {\n        if (domainPart !== patternPart) {\n          return false\n        }\n      }\n    }\n  }\n\n  // We exhausted the pattern. If we also exhausted the domain we have a match\n  return domainParts.length === 0\n}\n\nexport const isCsrfOriginAllowed = (\n  originDomain: string,\n  allowedOrigins: string[] = []\n): boolean => {\n  // DNS names are case-insensitive per RFC 1035\n  // Use ASCII-only toLowerCase to avoid unicode issues\n  const normalizedOrigin = originDomain.replace(/[A-Z]/g, (c) =>\n    c.toLowerCase()\n  )\n\n  return allowedOrigins.some((allowedOrigin) => {\n    if (!allowedOrigin) return false\n\n    const normalizedAllowed = allowedOrigin.replace(/[A-Z]/g, (c) =>\n      c.toLowerCase()\n    )\n\n    return (\n      normalizedAllowed === normalizedOrigin ||\n      matchWildcardDomain(originDomain, allowedOrigin)\n    )\n  })\n}\n","'use client'\n\nimport React, { useContext } from 'react'\n\nexport type ServerInsertedHTMLHook = (callbacks: () => React.ReactNode) => void\n\n// Use `React.createContext` to avoid errors from the RSC checks because\n// it can't be imported directly in Server Components:\n//\n//   import { createContext } from 'react'\n//\n// More info: https://github.com/vercel/next.js/pull/40686\nexport const ServerInsertedHTMLContext =\n  React.createContext<ServerInsertedHTMLHook | null>(null as any)\n\nexport function useServerInsertedHTML(callback: () => React.ReactNode): void {\n  const addInsertedServerHTMLCallback = useContext(ServerInsertedHTMLContext)\n  // Should have no effects on client where there's no flush effects provider\n  if (addInsertedServerHTMLCallback) {\n    addInsertedServerHTMLCallback(callback)\n  }\n}\n","/* eslint-disable @next/internal/no-ambiguous-jsx -- whole module is used in React Client */\n// Provider for the `useServerInsertedHTML` API to register callbacks to insert\n// elements into the HTML stream.\n\nimport type { JSX, ReactNode } from 'react'\nimport * as ReactClient from 'react'\nimport { ServerInsertedHTMLContext } from '../../shared/lib/server-inserted-html.shared-runtime'\n\nexport function createServerInsertedHTML() {\n  const serverInsertedHTMLCallbacks: (() => ReactNode)[] = []\n  const addInsertedHtml = (handler: () => ReactNode) => {\n    serverInsertedHTMLCallbacks.push(handler)\n  }\n\n  return {\n    ServerInsertedHTMLProvider({ children }: { children: JSX.Element }) {\n      return (\n        <ServerInsertedHTMLContext.Provider value={addInsertedHtml}>\n          {children}\n        </ServerInsertedHTMLContext.Provider>\n      )\n    },\n    renderServerInsertedHTML() {\n      return serverInsertedHTMLCallbacks.map((callback, index) => (\n        <ReactClient.Fragment key={'__next_server_inserted__' + index}>\n          {callback()}\n        </ReactClient.Fragment>\n      ))\n    },\n  }\n}\n","export function encodeURIPath(file: string) {\n  return file\n    .split('/')\n    .map((p) => encodeURIComponent(p))\n    .join('/')\n}\n","import { encodeURIPath } from '../../shared/lib/encode-uri-path'\nimport type { BuildManifest } from '../get-page-files'\n\nimport ReactDOM from 'react-dom'\n\nexport function getRequiredScripts(\n  buildManifest: BuildManifest,\n  assetPrefix: string,\n  crossOrigin: undefined | '' | 'anonymous' | 'use-credentials',\n  SRIManifest: undefined | Record<string, string>,\n  qs: string,\n  nonce: string | undefined,\n  pagePath: string\n): [\n  () => void,\n  { src: string; integrity?: string; crossOrigin?: string | undefined },\n] {\n  let preinitScripts: () => void\n  let preinitScriptCommands: string[] = []\n  const bootstrapScript: {\n    src: string\n    integrity?: string\n    crossOrigin?: string | undefined\n  } = {\n    src: '',\n    crossOrigin,\n  }\n\n  const files = (\n    buildManifest.rootMainFilesTree?.[pagePath] || buildManifest.rootMainFiles\n  ).map(encodeURIPath)\n  if (files.length === 0) {\n    throw new Error(\n      'Invariant: missing bootstrap script. This is a bug in Next.js'\n    )\n  }\n  if (SRIManifest) {\n    bootstrapScript.src = `${assetPrefix}/_next/` + files[0] + qs\n    bootstrapScript.integrity = SRIManifest[files[0]]\n\n    for (let i = 1; i < files.length; i++) {\n      const src = `${assetPrefix}/_next/` + files[i] + qs\n      const integrity = SRIManifest[files[i]]\n      preinitScriptCommands.push(src, integrity)\n    }\n    preinitScripts = () => {\n      // preinitScriptCommands is a double indexed array of src/integrity pairs\n      for (let i = 0; i < preinitScriptCommands.length; i += 2) {\n        ReactDOM.preinit(preinitScriptCommands[i], {\n          as: 'script',\n          integrity: preinitScriptCommands[i + 1],\n          crossOrigin,\n          nonce,\n        })\n      }\n    }\n  } else {\n    bootstrapScript.src = `${assetPrefix}/_next/` + files[0] + qs\n\n    for (let i = 1; i < files.length; i++) {\n      const src = `${assetPrefix}/_next/` + files[i] + qs\n      preinitScriptCommands.push(src)\n    }\n    preinitScripts = () => {\n      // preinitScriptCommands is a singled indexed array of src values\n      for (let i = 0; i < preinitScriptCommands.length; i++) {\n        ReactDOM.preinit(preinitScriptCommands[i], {\n          as: 'script',\n          nonce,\n          crossOrigin,\n        })\n      }\n    }\n  }\n\n  return [preinitScripts, bootstrapScript]\n}\n","/* eslint-disable @next/internal/no-ambiguous-jsx -- whole module is used in React Client */\nimport React, { type JSX } from 'react'\nimport { isHTTPAccessFallbackError } from '../../client/components/http-access-fallback/http-access-fallback'\nimport {\n  getURLFromRedirectError,\n  getRedirectStatusCodeFromError,\n} from '../../client/components/redirect'\nimport { isRedirectError } from '../../client/components/redirect-error'\nimport { renderToReadableStream } from 'react-dom/server'\nimport { streamToString } from '../stream-utils/node-web-streams-helper'\nimport { RedirectStatusCode } from '../../client/components/redirect-status-code'\nimport { addPathPrefix } from '../../shared/lib/router/utils/add-path-prefix'\nimport type { ClientTraceDataEntry } from '../lib/trace/tracer'\n\nexport function makeGetServerInsertedHTML({\n  polyfills,\n  renderServerInsertedHTML,\n  serverCapturedErrors,\n  tracingMetadata,\n  basePath,\n}: {\n  polyfills: JSX.IntrinsicElements['script'][]\n  renderServerInsertedHTML: () => React.ReactNode\n  tracingMetadata: ClientTraceDataEntry[] | undefined\n  serverCapturedErrors: Array<unknown>\n  basePath: string\n}) {\n  let flushedErrorMetaTagsUntilIndex = 0\n\n  // These only need to be rendered once, they'll be set to empty arrays once flushed.\n  let polyfillTags = polyfills.map((polyfill) => {\n    return <script key={polyfill.src} {...polyfill} />\n  })\n  let traceMetaTags = (tracingMetadata || []).map(({ key, value }, index) => (\n    <meta key={`next-trace-data-${index}`} name={key} content={value} />\n  ))\n\n  return async function getServerInsertedHTML() {\n    // Loop through all the errors that have been captured but not yet\n    // flushed.\n    const errorMetaTags = []\n    while (flushedErrorMetaTagsUntilIndex < serverCapturedErrors.length) {\n      const error = serverCapturedErrors[flushedErrorMetaTagsUntilIndex]\n      flushedErrorMetaTagsUntilIndex++\n\n      if (isHTTPAccessFallbackError(error)) {\n        errorMetaTags.push(\n          <meta name=\"robots\" content=\"noindex\" key={error.digest} />,\n          process.env.NODE_ENV === 'development' ? (\n            <meta name=\"next-error\" content=\"not-found\" key=\"next-error\" />\n          ) : null\n        )\n      } else if (isRedirectError(error)) {\n        const redirectUrl = addPathPrefix(\n          getURLFromRedirectError(error),\n          basePath\n        )\n        const statusCode = getRedirectStatusCodeFromError(error)\n        const isPermanent =\n          statusCode === RedirectStatusCode.PermanentRedirect ? true : false\n        if (redirectUrl) {\n          errorMetaTags.push(\n            <meta\n              id=\"__next-page-redirect\"\n              httpEquiv=\"refresh\"\n              content={`${isPermanent ? 0 : 1};url=${redirectUrl}`}\n              key={error.digest}\n            />\n          )\n        }\n      }\n    }\n\n    const serverInsertedHTML = renderServerInsertedHTML()\n\n    // Skip React rendering if we know the content is empty.\n    if (\n      polyfillTags.length === 0 &&\n      traceMetaTags.length === 0 &&\n      errorMetaTags.length === 0 &&\n      Array.isArray(serverInsertedHTML) &&\n      serverInsertedHTML.length === 0\n    ) {\n      return ''\n    }\n\n    const stream = await renderToReadableStream(\n      <>\n        {polyfillTags}\n        {serverInsertedHTML}\n        {traceMetaTags}\n        {errorMetaTags}\n      </>,\n      {\n        // Larger chunk because this isn't sent over the network.\n        // Let's set it to 1MB.\n        progressiveChunkSize: 1024 * 1024,\n      }\n    )\n\n    // The polyfills and trace metadata have been flushed, so they don't need to be rendered again\n    polyfillTags = []\n    traceMetaTags = []\n\n    // There's no need to wait for the stream to be ready\n    // e.g. calling `await stream.allReady` because `streamToString` will\n    // wait and decode the stream progressively with better parallelism.\n    return streamToString(stream)\n  }\n}\n","import type { CssResource } from '../../build/webpack/plugins/flight-manifest-plugin'\nimport { getClientReferenceManifest } from './manifests-singleton'\n\n/**\n * Get external stylesheet link hrefs based on server CSS manifest.\n */\nexport function getLinkAndScriptTags(\n  filePath: string,\n  injectedCSS: Set<string>,\n  injectedScripts: Set<string>,\n  collectNewImports?: boolean\n): { styles: CssResource[]; scripts: string[] } {\n  const filePathWithoutExt = filePath.replace(/\\.[^.]+$/, '')\n  const cssChunks = new Set<CssResource>()\n  const jsChunks = new Set<string>()\n  const { entryCSSFiles, entryJSFiles } = getClientReferenceManifest()\n  const cssFiles = entryCSSFiles[filePathWithoutExt]\n  const jsFiles = entryJSFiles?.[filePathWithoutExt]\n\n  if (cssFiles) {\n    for (const css of cssFiles) {\n      if (!injectedCSS.has(css.path)) {\n        if (collectNewImports) {\n          injectedCSS.add(css.path)\n        }\n        cssChunks.add(css)\n      }\n    }\n  }\n\n  if (jsFiles) {\n    for (const file of jsFiles) {\n      if (!injectedScripts.has(file)) {\n        if (collectNewImports) {\n          injectedScripts.add(file)\n        }\n        jsChunks.add(file)\n      }\n    }\n  }\n\n  return { styles: [...cssChunks], scripts: [...jsChunks] }\n}\n","import type { NextFontManifest } from '../../build/webpack/plugins/next-font-manifest-plugin'\nimport type { DeepReadonly } from '../../shared/lib/deep-readonly'\n\n/**\n * Get hrefs for fonts to preload\n * Returns null if there are no fonts at all.\n * Returns string[] if there are fonts to preload (font paths)\n * Returns empty string[] if there are fonts but none to preload and no other fonts have been preloaded\n * Returns null if there are fonts but none to preload and at least some were previously preloaded\n */\nexport function getPreloadableFonts(\n  nextFontManifest: DeepReadonly<NextFontManifest> | undefined,\n  filePath: string | undefined,\n  injectedFontPreloadTags: Set<string>\n): string[] | null {\n  if (!nextFontManifest || !filePath) {\n    return null\n  }\n  const filepathWithoutExtension = filePath.replace(/\\.[^.]+$/, '')\n  const fontFiles = new Set<string>()\n  let foundFontUsage = false\n\n  const preloadedFontFiles = nextFontManifest.app[filepathWithoutExtension]\n  if (preloadedFontFiles) {\n    foundFontUsage = true\n    for (const fontFile of preloadedFontFiles) {\n      if (!injectedFontPreloadTags.has(fontFile)) {\n        fontFiles.add(fontFile)\n        injectedFontPreloadTags.add(fontFile)\n      }\n    }\n  }\n\n  if (fontFiles.size) {\n    return [...fontFiles].sort()\n  } else if (foundFontUsage && injectedFontPreloadTags.size === 0) {\n    return []\n  } else {\n    return null\n  }\n}\n","import type { LoaderTree } from '../lib/app-dir-module'\n\nexport function hasLoadingComponentInTree(tree: LoaderTree): boolean {\n  const [, parallelRoutes, { loading }] = tree\n\n  if (loading) {\n    return true\n  }\n\n  return Object.values(parallelRoutes).some((parallelRoute) =>\n    hasLoadingComponentInTree(parallelRoute)\n  ) as boolean\n}\n","import {\n  extractInfoFromServerReferenceId,\n  type ServerReferenceInfo,\n} from '../shared/lib/server-reference-info'\n\n// Only contains the properties we're interested in.\nexport interface ServerReference {\n  $$typeof: Symbol\n  $$id: string\n}\n\nexport type ServerFunction = ServerReference &\n  ((...args: unknown[]) => Promise<unknown>)\n\nexport function isServerReference<T>(\n  value: T & Partial<ServerReference>\n): value is T & ServerFunction {\n  return value.$$typeof === Symbol.for('react.server.reference')\n}\n\nexport function isUseCacheFunction<T>(\n  value: T & Partial<ServerReference>\n): value is T & ServerFunction {\n  if (!isServerReference(value)) {\n    return false\n  }\n\n  const { type } = extractInfoFromServerReferenceId(value.$$id)\n\n  return type === 'use-cache'\n}\n\nexport function getUseCacheFunctionInfo<T>(\n  value: T & Partial<ServerReference>\n): ServerReferenceInfo | null {\n  if (!isServerReference(value)) {\n    return null\n  }\n\n  const info = extractInfoFromServerReferenceId(value.$$id)\n\n  return info.type === 'use-cache' ? info : null\n}\n\nexport function isClientReference(mod: any): boolean {\n  const defaultExport = mod?.default || mod\n  return defaultExport?.$$typeof === Symbol.for('react.client.reference')\n}\n","import type { AppDirModules } from '../../build/webpack/loaders/next-app-loader'\nimport { DEFAULT_SEGMENT_KEY } from '../../shared/lib/segment'\n\n/**\n * LoaderTree is generated in next-app-loader.\n */\nexport type LoaderTree = [\n  segment: string,\n  parallelRoutes: { [parallelRouterKey: string]: LoaderTree },\n  modules: AppDirModules,\n  /**\n   * At build time, for each dynamic segment, we compute the list of static\n   * sibling segments that exist at the same URL path level. This is used by\n   * the client router to determine if a prefetch can be reused.\n   *\n   * For example, given the following file structure:\n   *   /app/(group1)/products/sale/page.tsx -> /products/sale\n   *   /app/(group2)/products/[id]/page.tsx -> /products/[id]\n   *\n   * The [id] segment would have staticSiblings: ['sale']\n   *\n   * This accounts for route groups, which may place sibling routes in\n   * different parts of the file system tree but at the same URL level.\n   *\n   * A value of `null` means the static siblings are unknown (e.g., in webpack\n   * dev mode where routes are compiled on-demand).\n   */\n  staticSiblings: readonly string[] | null,\n]\n\nexport async function getLayoutOrPageModule(loaderTree: LoaderTree) {\n  const { layout, page, defaultPage } = loaderTree[2]\n  const isLayout = typeof layout !== 'undefined'\n  const isPage = typeof page !== 'undefined'\n  const isDefaultPage =\n    typeof defaultPage !== 'undefined' && loaderTree[0] === DEFAULT_SEGMENT_KEY\n\n  let mod = undefined\n  let modType: 'layout' | 'page' | undefined = undefined\n  let filePath = undefined\n\n  if (isLayout) {\n    mod = await layout[0]()\n    modType = 'layout'\n    filePath = layout[1]\n  } else if (isPage) {\n    mod = await page[0]()\n    modType = 'page'\n    filePath = page[1]\n  } else if (isDefaultPage) {\n    mod = await defaultPage[0]()\n    modType = 'page'\n    filePath = defaultPage[1]\n  }\n\n  return { mod, modType, filePath }\n}\n\nexport async function getComponentTypeModule(\n  loaderTree: LoaderTree,\n  moduleType: 'layout' | 'not-found' | 'forbidden' | 'unauthorized'\n) {\n  const { [moduleType]: module } = loaderTree[2]\n  if (typeof module !== 'undefined') {\n    return await module[0]()\n  }\n  return undefined\n}\n","/**\n * Interop between \"export default\" and \"module.exports\".\n */\nexport function interopDefault(mod: any) {\n  return mod.default || mod\n}\n","import { DEFAULT_SEGMENT_KEY } from '../../segment'\nimport type { LoaderTree } from '../../../../server/lib/app-dir-module'\n\nexport function parseLoaderTree(tree: LoaderTree) {\n  const [segment, parallelRoutes, modules, staticSiblings] = tree\n  const { layout, template } = modules\n  let { page } = modules\n  // a __DEFAULT__ segment means that this route didn't match any of the\n  // segments in the route, so we should use the default page\n  page = segment === DEFAULT_SEGMENT_KEY ? modules.defaultPage : page\n\n  const conventionPath = layout?.[1] || template?.[1] || page?.[1]\n\n  return {\n    page,\n    segment,\n    modules,\n    /* it can be either layout / template / page */\n    conventionPath,\n    parallelRoutes,\n    staticSiblings,\n  }\n}\n","import type { AppRenderContext } from './app-render'\n\nconst isDev = process.env.NODE_ENV === 'development'\nconst isTurbopack = !!process.env.TURBOPACK\n\nexport function getAssetQueryString(\n  ctx: AppRenderContext,\n  addTimestamp: boolean\n) {\n  let qs = ''\n\n  // In development we add the request timestamp to allow react to\n  // reload assets when a new RSC response is received.\n  // Turbopack handles HMR of assets itself and react doesn't need to reload them\n  // so this approach is not needed for Turbopack.\n  const shouldAddVersion = isDev && !isTurbopack && addTimestamp\n  if (shouldAddVersion) {\n    qs += `?v=${ctx.requestTimestamp}`\n  }\n\n  if (ctx.sharedContext.clientAssetToken) {\n    qs += `${shouldAddVersion ? '&' : '?'}dpl=${ctx.sharedContext.clientAssetToken}`\n  }\n  return qs\n}\n","import type { CssResource } from '../../build/webpack/plugins/flight-manifest-plugin'\nimport { encodeURIPath } from '../../shared/lib/encode-uri-path'\nimport type { AppRenderContext } from './app-render'\nimport { getAssetQueryString } from './get-asset-query-string'\nimport type { PreloadCallbacks } from './types'\n\n/**\n * Abstracts the rendering of CSS files based on whether they are inlined or not.\n * For inlined CSS, renders a <style> tag with the CSS content directly embedded.\n * For external CSS files, renders a <link> tag pointing to the CSS file.\n */\nexport function renderCssResource(\n  entryCssFiles: CssResource[],\n  ctx: AppRenderContext,\n  preloadCallbacks?: PreloadCallbacks\n) {\n  const {\n    componentMod: { createElement },\n  } = ctx\n  return entryCssFiles.map((entryCssFile, index) => {\n    // `Precedence` is an opt-in signal for React to handle resource\n    // loading and deduplication, etc. It's also used as the key to sort\n    // resources so they will be injected in the correct order.\n    // During HMR, it's critical to use different `precedence` values\n    // for different stylesheets, so their order will be kept.\n    // https://github.com/facebook/react/pull/25060\n    const precedence =\n      process.env.NODE_ENV === 'development'\n        ? 'next_' + entryCssFile.path\n        : 'next'\n\n    // In dev, Safari and Firefox will cache the resource during HMR:\n    // - https://github.com/vercel/next.js/issues/5860\n    // - https://bugs.webkit.org/show_bug.cgi?id=187726\n    // Because of this, we add a `?v=` query to bypass the cache during\n    // development. We need to also make sure that the number is always\n    // increasing.\n    const fullHref = `${ctx.assetPrefix}/_next/${encodeURIPath(\n      entryCssFile.path\n    )}${getAssetQueryString(ctx, true)}`\n\n    if (entryCssFile.inlined && !ctx.parsedRequestHeaders.isRSCRequest) {\n      return createElement(\n        'style',\n        {\n          key: index,\n          nonce: ctx.nonce,\n          precedence: precedence,\n          href: fullHref,\n        },\n        entryCssFile.content\n      )\n    }\n\n    preloadCallbacks?.push(() => {\n      ctx.componentMod.preloadStyle(\n        fullHref,\n        ctx.renderOpts.crossOrigin,\n        ctx.nonce\n      )\n    })\n\n    return createElement('link', {\n      key: index,\n      rel: 'stylesheet',\n      href: fullHref,\n      precedence: precedence,\n      crossOrigin: ctx.renderOpts.crossOrigin,\n      nonce: ctx.nonce,\n    })\n  })\n}\n","import { interopDefault } from './interop-default'\nimport { getLinkAndScriptTags } from './get-css-inlined-link-tags'\nimport type { AppRenderContext } from './app-render'\nimport { getAssetQueryString } from './get-asset-query-string'\nimport { encodeURIPath } from '../../shared/lib/encode-uri-path'\nimport { renderCssResource } from './render-css-resource'\n\nexport async function createComponentStylesAndScripts({\n  filePath,\n  getComponent,\n  injectedCSS,\n  injectedJS,\n  ctx,\n}: {\n  filePath: string\n  getComponent: () => any\n  injectedCSS: Set<string>\n  injectedJS: Set<string>\n  ctx: AppRenderContext\n}): Promise<[React.ComponentType<any>, React.ReactNode, React.ReactNode]> {\n  const {\n    componentMod: { createElement },\n  } = ctx\n  const { styles: entryCssFiles, scripts: jsHrefs } = getLinkAndScriptTags(\n    filePath,\n    injectedCSS,\n    injectedJS\n  )\n\n  const styles = renderCssResource(entryCssFiles, ctx)\n\n  const scripts = jsHrefs\n    ? jsHrefs.map((href, index) =>\n        createElement('script', {\n          src: `${ctx.assetPrefix}/_next/${encodeURIPath(href)}${getAssetQueryString(ctx, true)}`,\n          async: true,\n          key: `script-${index}`,\n        })\n      )\n    : null\n\n  const Comp = interopDefault(await getComponent())\n\n  return [Comp, styles, scripts]\n}\n","const noop = () => {}\n\nlet registry: FinalizationRegistry<WeakRef<ReadableStream>> | undefined\n\nif (globalThis.FinalizationRegistry) {\n  registry = new FinalizationRegistry((weakRef: WeakRef<ReadableStream>) => {\n    const stream = weakRef.deref()\n    if (stream && !stream.locked) {\n      stream.cancel('Response object has been garbage collected').then(noop)\n    }\n  })\n}\n\n/**\n * Clones a response by teeing the body so we can return two independent\n * ReadableStreams from it. This avoids the bug in the undici library around\n * response cloning.\n *\n * After cloning, the original response's body will be consumed and closed.\n *\n * @see https://github.com/vercel/next.js/pull/73274\n *\n * @param original - The original response to clone.\n * @returns A tuple containing two independent clones of the original response.\n */\nexport function cloneResponse(original: Response): [Response, Response] {\n  // If the response has no body, then we can just return the original response\n  // twice because it's immutable.\n  if (!original.body) {\n    return [original, original]\n  }\n\n  const [body1, body2] = original.body.tee()\n\n  const cloned1 = new Response(body1, {\n    status: original.status,\n    statusText: original.statusText,\n    headers: original.headers,\n  })\n\n  Object.defineProperty(cloned1, 'url', {\n    value: original.url,\n    // How the original response.url behaves\n    configurable: true,\n    enumerable: true,\n    writable: false,\n  })\n\n  const cloned2 = new Response(body2, {\n    status: original.status,\n    statusText: original.statusText,\n    headers: original.headers,\n  })\n\n  Object.defineProperty(cloned2, 'url', {\n    value: original.url,\n    // How the original response.url behaves\n    configurable: true,\n    enumerable: true,\n    writable: false,\n  })\n\n  // The Fetch Standard allows users to skip consuming the response body by\n  // relying on garbage collection to release connection resources.\n  // https://github.com/nodejs/undici?tab=readme-ov-file#garbage-collection\n  //\n  // To cancel the stream you then need to cancel both resulting branches.\n  // Teeing a stream will generally lock it for the duration, preventing other\n  // readers from locking it.\n  // https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/tee\n  if (registry) {\n    if (cloned1.body) {\n      registry.register(cloned1, new WeakRef(cloned1.body))\n    }\n\n    if (cloned2.body) {\n      registry.register(cloned2, new WeakRef(cloned2.body))\n    }\n  }\n\n  return [cloned1, cloned2]\n}\n","import type { SchedulerFn } from './scheduler'\n\nimport { DetachedPromise } from './detached-promise'\n\ntype CacheKeyFn<K, C extends string | number | null> = (\n  key: K\n) => PromiseLike<C> | C\n\ntype BatcherOptions<K, C extends string | number | null> = {\n  cacheKeyFn?: CacheKeyFn<K, C>\n  schedulerFn?: SchedulerFn<void>\n}\n\ntype WorkFnContext<V, K> = {\n  resolve: (value: V | PromiseLike<V>) => void\n  key: K\n}\n\ntype WorkFn<V, K> = (context: WorkFnContext<V, K>) => Promise<V>\n\n/**\n * A wrapper for a function that will only allow one call to the function to\n * execute at a time.\n */\nexport class Batcher<K, V, C extends string | number | null> {\n  private readonly pending = new Map<C, Promise<V>>()\n\n  protected constructor(\n    private readonly cacheKeyFn?: CacheKeyFn<K, C>,\n    /**\n     * A function that will be called to schedule the wrapped function to be\n     * executed. This defaults to a function that will execute the function\n     * immediately.\n     */\n    private readonly schedulerFn: SchedulerFn<void> = (fn) => fn()\n  ) {}\n\n  /**\n   * Creates a new instance of PendingWrapper. If the key extends a string or\n   * number, the key will be used as the cache key. If the key is an object, a\n   * cache key function must be provided.\n   */\n  public static create<K extends string | number | null, V>(\n    options?: BatcherOptions<K, K>\n  ): Batcher<K, V, K>\n  public static create<K, V, C extends string | number | null>(\n    options: BatcherOptions<K, C> &\n      Required<Pick<BatcherOptions<K, C>, 'cacheKeyFn'>>\n  ): Batcher<K, V, C>\n  public static create<K, V, C extends string | number | null>(\n    options?: BatcherOptions<K, C>\n  ): Batcher<K, V, C> {\n    return new Batcher<K, V, C>(options?.cacheKeyFn, options?.schedulerFn)\n  }\n\n  /**\n   * Wraps a function in a promise that will be resolved or rejected only once\n   * for a given key. This will allow multiple calls to the function to be\n   * made, but only one will be executed at a time. The result of the first\n   * call will be returned to all callers.\n   *\n   * @param key the key to use for the cache\n   * @param fn the function to wrap\n   * @returns a promise that resolves to the result of the function\n   */\n  public async batch(key: K, fn: WorkFn<V, K>): Promise<V> {\n    const cacheKey = (this.cacheKeyFn ? await this.cacheKeyFn(key) : key) as C\n    if (cacheKey === null) {\n      return fn({ resolve: (value) => Promise.resolve(value), key })\n    }\n\n    const pending = this.pending.get(cacheKey)\n    if (pending) return pending\n\n    const { promise, resolve, reject } = new DetachedPromise<V>()\n    this.pending.set(cacheKey, promise)\n\n    this.schedulerFn(async () => {\n      try {\n        const result = await fn({ resolve, key })\n\n        // Resolving a promise multiple times is a no-op, so we can safely\n        // resolve all pending promises with the same result.\n        resolve(result)\n      } catch (err) {\n        reject(err)\n      } finally {\n        this.pending.delete(cacheKey)\n      }\n    })\n\n    return promise\n  }\n}\n","import {\n  CachedRouteKind,\n  IncrementalCacheKind,\n  type CachedAppPageValue,\n  type CachedPageValue,\n  type IncrementalResponseCacheEntry,\n  type ResponseCacheEntry,\n} from './types'\n\nimport RenderResult from '../render-result'\nimport { RouteKind } from '../route-kind'\nimport { HTML_CONTENT_TYPE_HEADER } from '../../lib/constants'\n\nexport async function fromResponseCacheEntry(\n  cacheEntry: ResponseCacheEntry\n): Promise<IncrementalResponseCacheEntry> {\n  return {\n    ...cacheEntry,\n    value:\n      cacheEntry.value?.kind === CachedRouteKind.PAGES\n        ? {\n            kind: CachedRouteKind.PAGES,\n            html: await cacheEntry.value.html.toUnchunkedString(true),\n            pageData: cacheEntry.value.pageData,\n            headers: cacheEntry.value.headers,\n            status: cacheEntry.value.status,\n          }\n        : cacheEntry.value?.kind === CachedRouteKind.APP_PAGE\n          ? {\n              kind: CachedRouteKind.APP_PAGE,\n              html: await cacheEntry.value.html.toUnchunkedString(true),\n              postponed: cacheEntry.value.postponed,\n              rscData: cacheEntry.value.rscData,\n              headers: cacheEntry.value.headers,\n              status: cacheEntry.value.status,\n              segmentData: cacheEntry.value.segmentData,\n            }\n          : cacheEntry.value,\n  }\n}\n\nexport async function toResponseCacheEntry(\n  response: IncrementalResponseCacheEntry | null\n): Promise<ResponseCacheEntry | null> {\n  if (!response) return null\n\n  return {\n    isMiss: response.isMiss,\n    isStale: response.isStale,\n    cacheControl: response.cacheControl,\n    isFallback: response.isFallback,\n    value:\n      response.value?.kind === CachedRouteKind.PAGES\n        ? ({\n            kind: CachedRouteKind.PAGES,\n            html: RenderResult.fromStatic(\n              response.value.html,\n              HTML_CONTENT_TYPE_HEADER\n            ),\n            pageData: response.value.pageData,\n            headers: response.value.headers,\n            status: response.value.status,\n          } satisfies CachedPageValue)\n        : response.value?.kind === CachedRouteKind.APP_PAGE\n          ? ({\n              kind: CachedRouteKind.APP_PAGE,\n              html: RenderResult.fromStatic(\n                response.value.html,\n                HTML_CONTENT_TYPE_HEADER\n              ),\n              rscData: response.value.rscData,\n              headers: response.value.headers,\n              status: response.value.status,\n              postponed: response.value.postponed,\n              segmentData: response.value.segmentData,\n            } satisfies CachedAppPageValue)\n          : response.value,\n  }\n}\n\nexport function routeKindToIncrementalCacheKind(\n  routeKind: RouteKind\n): Exclude<IncrementalCacheKind, IncrementalCacheKind.FETCH> {\n  switch (routeKind) {\n    case RouteKind.PAGES:\n      return IncrementalCacheKind.PAGES\n    case RouteKind.APP_PAGE:\n      return IncrementalCacheKind.APP_PAGE\n    case RouteKind.IMAGE:\n      return IncrementalCacheKind.IMAGE\n    case RouteKind.APP_ROUTE:\n      return IncrementalCacheKind.APP_ROUTE\n    case RouteKind.PAGES_API:\n      // Pages Router API routes are not cached in the incremental cache.\n      throw new Error(`Unexpected route kind ${routeKind}`)\n    default:\n      return routeKind satisfies never\n  }\n}\n","import type {\n  ResponseCacheEntry,\n  ResponseGenerator,\n  ResponseCacheBase,\n  IncrementalResponseCacheEntry,\n  IncrementalResponseCache,\n} from './types'\n\nimport { Batcher } from '../../lib/batcher'\nimport { LRUCache } from '../lib/lru-cache'\nimport { warnOnce } from '../../build/output/log'\nimport { scheduleOnNextTick } from '../../lib/scheduler'\nimport {\n  fromResponseCacheEntry,\n  routeKindToIncrementalCacheKind,\n  toResponseCacheEntry,\n} from './utils'\nimport type { RouteKind } from '../route-kind'\n\n/**\n * Parses an environment variable as a positive integer, returning the fallback\n * if the value is missing, not a number, or not positive.\n */\nfunction parsePositiveInt(\n  envValue: string | undefined,\n  fallback: number\n): number {\n  if (!envValue) return fallback\n  const parsed = parseInt(envValue, 10)\n  return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback\n}\n\n/**\n * Default TTL (in milliseconds) for minimal mode response cache entries.\n * Used for cache hit validation as a fallback for providers that don't\n * send the x-invocation-id header yet.\n *\n * 10 seconds chosen because:\n * - Long enough to dedupe rapid successive requests (e.g., page + data)\n * - Short enough to not serve stale data across unrelated requests\n *\n * Can be configured via `NEXT_PRIVATE_RESPONSE_CACHE_TTL` environment variable.\n */\nconst DEFAULT_TTL_MS = parsePositiveInt(\n  process.env.NEXT_PRIVATE_RESPONSE_CACHE_TTL,\n  10_000\n)\n\n/**\n * Default maximum number of entries in the response cache.\n * Can be configured via `NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE` environment variable.\n */\nconst DEFAULT_MAX_SIZE = parsePositiveInt(\n  process.env.NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE,\n  150\n)\n\n/**\n * Separator used in compound cache keys to join pathname and invocationID.\n * Using null byte (\\0) since it cannot appear in valid URL paths or UUIDs.\n */\nconst KEY_SEPARATOR = '\\0'\n\n/**\n * Sentinel value used for TTL-based cache entries (when invocationID is undefined).\n * Chosen to be a clearly reserved marker for internal cache keys.\n */\nconst TTL_SENTINEL = '__ttl_sentinel__'\n\n/**\n * Entry stored in the LRU cache.\n */\ntype CacheEntry = {\n  entry: IncrementalResponseCacheEntry | null\n  /**\n   * TTL expiration timestamp in milliseconds. Used as a fallback for\n   * cache hit validation when providers don't send x-invocation-id.\n   * Memory pressure is managed by LRU eviction rather than timers.\n   */\n  expiresAt: number\n}\n\n/**\n * Creates a compound cache key from pathname and invocationID.\n */\nfunction createCacheKey(\n  pathname: string,\n  invocationID: string | undefined\n): string {\n  return `${pathname}${KEY_SEPARATOR}${invocationID ?? TTL_SENTINEL}`\n}\n\n/**\n * Extracts the invocationID from a compound cache key.\n * Returns undefined if the key used TTL_SENTINEL.\n */\nfunction extractInvocationID(compoundKey: string): string | undefined {\n  const separatorIndex = compoundKey.lastIndexOf(KEY_SEPARATOR)\n  if (separatorIndex === -1) return undefined\n\n  const invocationID = compoundKey.slice(separatorIndex + 1)\n  return invocationID === TTL_SENTINEL ? undefined : invocationID\n}\n\nexport * from './types'\n\nexport default class ResponseCache implements ResponseCacheBase {\n  private readonly getBatcher = Batcher.create<\n    { key: string; isOnDemandRevalidate: boolean },\n    IncrementalResponseCacheEntry | null,\n    string\n  >({\n    // Ensure on-demand revalidate doesn't block normal requests, it should be\n    // safe to run an on-demand revalidate for the same key as a normal request.\n    cacheKeyFn: ({ key, isOnDemandRevalidate }) =>\n      `${key}-${isOnDemandRevalidate ? '1' : '0'}`,\n    // We wait to do any async work until after we've added our promise to\n    // `pendingResponses` to ensure that any any other calls will reuse the\n    // same promise until we've fully finished our work.\n    schedulerFn: scheduleOnNextTick,\n  })\n\n  private readonly revalidateBatcher = Batcher.create<\n    string,\n    IncrementalResponseCacheEntry | null\n  >({\n    // We wait to do any async work until after we've added our promise to\n    // `pendingResponses` to ensure that any any other calls will reuse the\n    // same promise until we've fully finished our work.\n    schedulerFn: scheduleOnNextTick,\n  })\n\n  /**\n   * LRU cache for minimal mode using compound keys (pathname + invocationID).\n   * This allows multiple invocations to cache the same pathname without\n   * overwriting each other's entries.\n   */\n  private readonly cache: LRUCache<CacheEntry>\n\n  /**\n   * Set of invocation IDs that have had cache entries evicted.\n   * Used to detect when the cache size may be too small.\n   * Bounded to prevent memory growth.\n   */\n  private readonly evictedInvocationIDs: Set<string> = new Set()\n\n  /**\n   * The configured max size, stored for logging.\n   */\n  private readonly maxSize: number\n\n  /**\n   * The configured TTL for cache entries in milliseconds.\n   */\n  private readonly ttl: number\n\n  // we don't use minimal_mode name here as this.minimal_mode is\n  // statically replace for server runtimes but we need it to\n  // be dynamic here\n  private minimal_mode?: boolean\n\n  constructor(\n    minimal_mode: boolean,\n    maxSize: number = DEFAULT_MAX_SIZE,\n    ttl: number = DEFAULT_TTL_MS\n  ) {\n    this.minimal_mode = minimal_mode\n    this.maxSize = maxSize\n    this.ttl = ttl\n\n    // Create the LRU cache with eviction tracking\n    this.cache = new LRUCache(maxSize, undefined, (compoundKey) => {\n      const invocationID = extractInvocationID(compoundKey)\n      if (invocationID) {\n        // Bound to 100 entries to prevent unbounded memory growth.\n        // FIFO eviction is acceptable here because:\n        // 1. Invocations are short-lived (single request lifecycle), so older\n        //    invocations are unlikely to still be active after 100 newer ones\n        // 2. This warning mechanism is best-effort for developer guidance—\n        //    missing occasional eviction warnings doesn't affect correctness\n        // 3. If a long-running invocation is somehow evicted and then has\n        //    another cache entry evicted, it will simply be re-added\n        if (this.evictedInvocationIDs.size >= 100) {\n          const first = this.evictedInvocationIDs.values().next().value\n          if (first) this.evictedInvocationIDs.delete(first)\n        }\n        this.evictedInvocationIDs.add(invocationID)\n      }\n    })\n  }\n\n  /**\n   * Gets the response cache entry for the given key.\n   *\n   * @param key - The key to get the response cache entry for.\n   * @param responseGenerator - The response generator to use to generate the response cache entry.\n   * @param context - The context for the get request.\n   * @returns The response cache entry.\n   */\n  public async get(\n    key: string | null,\n    responseGenerator: ResponseGenerator,\n    context: {\n      routeKind: RouteKind\n      isOnDemandRevalidate?: boolean\n      isPrefetch?: boolean\n      incrementalCache: IncrementalResponseCache\n      isRoutePPREnabled?: boolean\n      isFallback?: boolean\n      waitUntil?: (prom: Promise<any>) => void\n\n      /**\n       * The invocation ID from the infrastructure. Used to scope the\n       * in-memory cache to a single revalidation request in minimal mode.\n       */\n      invocationID?: string\n    }\n  ): Promise<ResponseCacheEntry | null> {\n    // If there is no key for the cache, we can't possibly look this up in the\n    // cache so just return the result of the response generator.\n    if (!key) {\n      return responseGenerator({\n        hasResolved: false,\n        previousCacheEntry: null,\n      })\n    }\n\n    // Check minimal mode cache before doing any other work.\n    if (this.minimal_mode) {\n      const cacheKey = createCacheKey(key, context.invocationID)\n      const cachedItem = this.cache.get(cacheKey)\n\n      if (cachedItem) {\n        // With invocationID: exact match found - always a hit\n        // With TTL mode: must check expiration\n        if (context.invocationID !== undefined) {\n          return toResponseCacheEntry(cachedItem.entry)\n        }\n\n        // TTL mode: check expiration\n        const now = Date.now()\n        if (cachedItem.expiresAt > now) {\n          return toResponseCacheEntry(cachedItem.entry)\n        }\n\n        // TTL expired - clean up\n        this.cache.remove(cacheKey)\n      }\n\n      // Warn if this invocation had entries evicted - indicates cache may be too small.\n      if (\n        context.invocationID &&\n        this.evictedInvocationIDs.has(context.invocationID)\n      ) {\n        warnOnce(\n          `Response cache entry was evicted for invocation ${context.invocationID}. ` +\n            `Consider increasing NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE (current: ${this.maxSize}).`\n        )\n      }\n    }\n\n    const {\n      incrementalCache,\n      isOnDemandRevalidate = false,\n      isFallback = false,\n      isRoutePPREnabled = false,\n      isPrefetch = false,\n      waitUntil,\n      routeKind,\n      invocationID,\n    } = context\n\n    const response = await this.getBatcher.batch(\n      { key, isOnDemandRevalidate },\n      ({ resolve }) => {\n        const promise = this.handleGet(\n          key,\n          responseGenerator,\n          {\n            incrementalCache,\n            isOnDemandRevalidate,\n            isFallback,\n            isRoutePPREnabled,\n            isPrefetch,\n            routeKind,\n            invocationID,\n          },\n          resolve\n        )\n\n        // We need to ensure background revalidates are passed to waitUntil.\n        if (waitUntil) waitUntil(promise)\n\n        return promise\n      }\n    )\n\n    return toResponseCacheEntry(response)\n  }\n\n  /**\n   * Handles the get request for the response cache.\n   *\n   * @param key - The key to get the response cache entry for.\n   * @param responseGenerator - The response generator to use to generate the response cache entry.\n   * @param context - The context for the get request.\n   * @param resolve - The resolve function to use to resolve the response cache entry.\n   * @returns The response cache entry.\n   */\n  private async handleGet(\n    key: string,\n    responseGenerator: ResponseGenerator,\n    context: {\n      incrementalCache: IncrementalResponseCache\n      isOnDemandRevalidate: boolean\n      isFallback: boolean\n      isRoutePPREnabled: boolean\n      isPrefetch: boolean\n      routeKind: RouteKind\n      invocationID: string | undefined\n    },\n    resolve: (value: IncrementalResponseCacheEntry | null) => void\n  ): Promise<IncrementalResponseCacheEntry | null> {\n    let previousIncrementalCacheEntry: IncrementalResponseCacheEntry | null =\n      null\n    let resolved = false\n\n    try {\n      // Get the previous cache entry if not in minimal mode\n      previousIncrementalCacheEntry = !this.minimal_mode\n        ? await context.incrementalCache.get(key, {\n            kind: routeKindToIncrementalCacheKind(context.routeKind),\n            isRoutePPREnabled: context.isRoutePPREnabled,\n            isFallback: context.isFallback,\n          })\n        : null\n\n      if (previousIncrementalCacheEntry && !context.isOnDemandRevalidate) {\n        resolve(previousIncrementalCacheEntry)\n        resolved = true\n\n        if (!previousIncrementalCacheEntry.isStale || context.isPrefetch) {\n          // The cached value is still valid, so we don't need to update it yet.\n          return previousIncrementalCacheEntry\n        }\n      }\n\n      // Revalidate the cache entry\n      const incrementalResponseCacheEntry = await this.revalidate(\n        key,\n        context.incrementalCache,\n        context.isRoutePPREnabled,\n        context.isFallback,\n        responseGenerator,\n        previousIncrementalCacheEntry,\n        previousIncrementalCacheEntry !== null && !context.isOnDemandRevalidate,\n        undefined,\n        context.invocationID\n      )\n\n      // Handle null response\n      if (!incrementalResponseCacheEntry) {\n        // Remove the cache item if it was set so we don't use it again.\n        if (this.minimal_mode) {\n          const cacheKey = createCacheKey(key, context.invocationID)\n          this.cache.remove(cacheKey)\n        }\n        return null\n      }\n\n      // Resolve for on-demand revalidation or if not already resolved\n      if (context.isOnDemandRevalidate && !resolved) {\n        return incrementalResponseCacheEntry\n      }\n\n      return incrementalResponseCacheEntry\n    } catch (err) {\n      // If we've already resolved the cache entry, we can't reject as we\n      // already resolved the cache entry so log the error here.\n      if (resolved) {\n        console.error(err)\n        return null\n      }\n\n      throw err\n    }\n  }\n\n  /**\n   * Revalidates the cache entry for the given key.\n   *\n   * @param key - The key to revalidate the cache entry for.\n   * @param incrementalCache - The incremental cache to use to revalidate the cache entry.\n   * @param isRoutePPREnabled - Whether the route is PPR enabled.\n   * @param isFallback - Whether the route is a fallback.\n   * @param responseGenerator - The response generator to use to generate the response cache entry.\n   * @param previousIncrementalCacheEntry - The previous cache entry to use to revalidate the cache entry.\n   * @param hasResolved - Whether the response has been resolved.\n   * @param waitUntil - Optional function to register background work.\n   * @param invocationID - The invocation ID for cache key scoping.\n   * @returns The revalidated cache entry.\n   */\n  public async revalidate(\n    key: string,\n    incrementalCache: IncrementalResponseCache,\n    isRoutePPREnabled: boolean,\n    isFallback: boolean,\n    responseGenerator: ResponseGenerator,\n    previousIncrementalCacheEntry: IncrementalResponseCacheEntry | null,\n    hasResolved: boolean,\n    waitUntil?: (prom: Promise<any>) => void,\n    invocationID?: string\n  ) {\n    return this.revalidateBatcher.batch(key, () => {\n      const promise = this.handleRevalidate(\n        key,\n        incrementalCache,\n        isRoutePPREnabled,\n        isFallback,\n        responseGenerator,\n        previousIncrementalCacheEntry,\n        hasResolved,\n        invocationID\n      )\n\n      // We need to ensure background revalidates are passed to waitUntil.\n      if (waitUntil) waitUntil(promise)\n\n      return promise\n    })\n  }\n\n  private async handleRevalidate(\n    key: string,\n    incrementalCache: IncrementalResponseCache,\n    isRoutePPREnabled: boolean,\n    isFallback: boolean,\n    responseGenerator: ResponseGenerator,\n    previousIncrementalCacheEntry: IncrementalResponseCacheEntry | null,\n    hasResolved: boolean,\n    invocationID: string | undefined\n  ) {\n    try {\n      // Generate the response cache entry using the response generator.\n      const responseCacheEntry = await responseGenerator({\n        hasResolved,\n        previousCacheEntry: previousIncrementalCacheEntry,\n        isRevalidating: true,\n      })\n      if (!responseCacheEntry) {\n        return null\n      }\n\n      // Convert the response cache entry to an incremental response cache entry.\n      const incrementalResponseCacheEntry = await fromResponseCacheEntry({\n        ...responseCacheEntry,\n        isMiss: !previousIncrementalCacheEntry,\n      })\n\n      // We want to persist the result only if it has a cache control value\n      // defined.\n      if (incrementalResponseCacheEntry.cacheControl) {\n        if (this.minimal_mode) {\n          // Set TTL expiration for cache hit validation. Entries are validated\n          // by invocationID when available, with TTL as a fallback for providers\n          // that don't send x-invocation-id. Memory is managed by LRU eviction.\n          const cacheKey = createCacheKey(key, invocationID)\n          this.cache.set(cacheKey, {\n            entry: incrementalResponseCacheEntry,\n            expiresAt: Date.now() + this.ttl,\n          })\n        } else {\n          await incrementalCache.set(key, incrementalResponseCacheEntry.value, {\n            cacheControl: incrementalResponseCacheEntry.cacheControl,\n            isRoutePPREnabled,\n            isFallback,\n          })\n        }\n      }\n\n      return incrementalResponseCacheEntry\n    } catch (err) {\n      // When a path is erroring we automatically re-set the existing cache\n      // with new revalidate and expire times to prevent non-stop retrying.\n      if (previousIncrementalCacheEntry?.cacheControl) {\n        const revalidate = Math.min(\n          Math.max(\n            previousIncrementalCacheEntry.cacheControl.revalidate || 3,\n            3\n          ),\n          30\n        )\n        const expire =\n          previousIncrementalCacheEntry.cacheControl.expire === undefined\n            ? undefined\n            : Math.max(\n                revalidate + 3,\n                previousIncrementalCacheEntry.cacheControl.expire\n              )\n\n        await incrementalCache.set(key, previousIncrementalCacheEntry.value, {\n          cacheControl: { revalidate: revalidate, expire: expire },\n          isRoutePPREnabled,\n          isFallback,\n        })\n      }\n\n      // We haven't resolved yet, so let's throw to indicate an error.\n      throw err\n    }\n  }\n}\n","import type {\n  WorkAsyncStorage,\n  WorkStore,\n} from '../app-render/work-async-storage.external'\n\nimport { AppRenderSpan, NextNodeServerSpan } from './trace/constants'\nimport { getTracer, SpanKind } from './trace/tracer'\nimport {\n  CACHE_ONE_YEAR_SECONDS,\n  INFINITE_CACHE,\n  NEXT_CACHE_TAG_MAX_ITEMS,\n  NEXT_CACHE_TAG_MAX_LENGTH,\n} from '../../lib/constants'\nimport { markCurrentScopeAsDynamic } from '../app-render/dynamic-rendering'\nimport { makeHangingPromise } from '../dynamic-rendering-utils'\nimport type { FetchMetric } from '../base-http'\nimport { createDedupeFetch } from './dedupe-fetch'\nimport {\n  getCacheSignal,\n  type RevalidateStore,\n  type WorkUnitAsyncStorage,\n} from '../app-render/work-unit-async-storage.external'\nimport {\n  CachedRouteKind,\n  IncrementalCacheKind,\n  type CachedFetchData,\n  type ServerComponentsHmrCache,\n  type SetIncrementalFetchCacheContext,\n} from '../response-cache'\nimport { cloneResponse } from './clone-response'\nimport type { IncrementalCache } from './incremental-cache'\nimport { RenderStage } from '../app-render/staged-rendering'\n\nconst isEdgeRuntime = process.env.NEXT_RUNTIME === 'edge'\n\ntype Fetcher = typeof fetch\n\ntype PatchedFetcher = Fetcher & {\n  readonly __nextPatched: true\n  readonly __nextGetStaticStore: () => WorkAsyncStorage\n  readonly _nextOriginalFetch: Fetcher\n}\n\nexport const NEXT_PATCH_SYMBOL = Symbol.for('next-patch')\n\nfunction isFetchPatched() {\n  return (globalThis as Record<symbol, unknown>)[NEXT_PATCH_SYMBOL] === true\n}\n\nexport function validateRevalidate(\n  revalidateVal: unknown,\n  route: string\n): undefined | number {\n  try {\n    let normalizedRevalidate: number | undefined = undefined\n\n    if (revalidateVal === false) {\n      normalizedRevalidate = INFINITE_CACHE\n    } else if (\n      typeof revalidateVal === 'number' &&\n      !isNaN(revalidateVal) &&\n      revalidateVal > -1\n    ) {\n      normalizedRevalidate = revalidateVal\n    } else if (typeof revalidateVal !== 'undefined') {\n      throw new Error(\n        `Invalid revalidate value \"${revalidateVal}\" on \"${route}\", must be a non-negative number or false`\n      )\n    }\n    return normalizedRevalidate\n  } catch (err: any) {\n    // handle client component error from attempting to check revalidate value\n    if (err instanceof Error && err.message.includes('Invalid revalidate')) {\n      throw err\n    }\n    return undefined\n  }\n}\n\nexport function validateTags(tags: any[], description: string) {\n  const validTags: string[] = []\n  const invalidTags: Array<{\n    tag: any\n    reason: string\n  }> = []\n\n  for (let i = 0; i < tags.length; i++) {\n    const tag = tags[i]\n\n    if (typeof tag !== 'string') {\n      invalidTags.push({ tag, reason: 'invalid type, must be a string' })\n    } else if (tag.length > NEXT_CACHE_TAG_MAX_LENGTH) {\n      invalidTags.push({\n        tag,\n        reason: `exceeded max length of ${NEXT_CACHE_TAG_MAX_LENGTH}`,\n      })\n    } else {\n      validTags.push(tag)\n    }\n\n    if (validTags.length > NEXT_CACHE_TAG_MAX_ITEMS) {\n      console.warn(\n        `Warning: exceeded max tag count for ${description}, dropped tags:`,\n        tags.slice(i).join(', ')\n      )\n      break\n    }\n  }\n\n  if (invalidTags.length > 0) {\n    console.warn(`Warning: invalid tags passed to ${description}: `)\n\n    for (const { tag, reason } of invalidTags) {\n      console.log(`tag: \"${tag}\" ${reason}`)\n    }\n  }\n  return validTags\n}\n\nfunction trackFetchMetric(\n  workStore: WorkStore,\n  ctx: Omit<FetchMetric, 'end' | 'idx'>\n) {\n  if (!workStore.shouldTrackFetchMetrics) {\n    return\n  }\n\n  workStore.fetchMetrics ??= []\n\n  workStore.fetchMetrics.push({\n    ...ctx,\n    end: performance.timeOrigin + performance.now(),\n    idx: workStore.nextFetchId || 0,\n  })\n}\n\nasync function createCachedPrerenderResponse(\n  res: Response,\n  cacheKey: string,\n  incrementalCacheContext: SetIncrementalFetchCacheContext | undefined,\n  incrementalCache: IncrementalCache,\n  revalidate: number,\n  handleUnlock: () => Promise<void> | void\n): Promise<Response> {\n  // We are prerendering at build time or revalidate time with cacheComponents so we\n  // need to buffer the response so we can guarantee it can be read in a\n  // microtask.\n  const bodyBuffer = await res.arrayBuffer()\n\n  const fetchedData = {\n    headers: Object.fromEntries(res.headers.entries()),\n    body: Buffer.from(bodyBuffer).toString('base64'),\n    status: res.status,\n    url: res.url,\n  }\n\n  // We can skip setting the serverComponentsHmrCache because we aren't in dev\n  // mode.\n\n  if (incrementalCacheContext) {\n    await incrementalCache.set(\n      cacheKey,\n      { kind: CachedRouteKind.FETCH, data: fetchedData, revalidate },\n      incrementalCacheContext\n    )\n  }\n\n  await handleUnlock()\n\n  // We return a new Response to the caller.\n  return new Response(bodyBuffer, {\n    headers: res.headers,\n    status: res.status,\n    statusText: res.statusText,\n  })\n}\n\nasync function createCachedDynamicResponse(\n  workStore: WorkStore,\n  res: Response,\n  cacheKey: string,\n  incrementalCacheContext: SetIncrementalFetchCacheContext | undefined,\n  incrementalCache: IncrementalCache,\n  serverComponentsHmrCache: ServerComponentsHmrCache | undefined,\n  revalidate: number,\n  input: RequestInfo | URL,\n  handleUnlock: () => Promise<void> | void,\n  signal: AbortSignal | null\n): Promise<Response> {\n  // We're cloning the response using this utility because there exists a bug in\n  // the undici library around response cloning. See the following pull request\n  // for more details: https://github.com/vercel/next.js/pull/73274\n  const [cloned1, cloned2] = cloneResponse(res)\n\n  // We are dynamically rendering including dev mode. We want to return the\n  // response to the caller as soon as possible because it might stream over a\n  // very long time.\n  const cacheSetPromise = cloned1\n    .arrayBuffer()\n    .then(async (arrayBuffer) => {\n      const bodyBuffer = Buffer.from(arrayBuffer)\n\n      const fetchedData = {\n        headers: Object.fromEntries(cloned1.headers.entries()),\n        body: bodyBuffer.toString('base64'),\n        status: cloned1.status,\n        url: cloned1.url,\n      }\n\n      serverComponentsHmrCache?.set(cacheKey, fetchedData)\n\n      if (incrementalCacheContext) {\n        await incrementalCache.set(\n          cacheKey,\n          { kind: CachedRouteKind.FETCH, data: fetchedData, revalidate },\n          incrementalCacheContext\n        )\n      }\n    })\n    .catch((error) => {\n      // Don't warn if the request was aborted intentionally.\n      if (!signal?.aborted) {\n        console.warn(`Failed to set fetch cache`, input, error)\n      }\n    })\n    .finally(handleUnlock)\n\n  const pendingRevalidateKey = `cache-set-${cacheKey}`\n  const pendingRevalidates = (workStore.pendingRevalidates ??= {})\n\n  let pendingRevalidatePromise = Promise.resolve()\n  if (pendingRevalidateKey in pendingRevalidates) {\n    // There is already a pending revalidate entry that we need to await to\n    // avoid race conditions.\n    pendingRevalidatePromise = pendingRevalidates[pendingRevalidateKey]\n  }\n\n  pendingRevalidates[pendingRevalidateKey] = pendingRevalidatePromise\n    .then(() => cacheSetPromise)\n    .finally(() => {\n      // If the pending revalidate is not present in the store, then we have\n      // nothing to delete.\n      if (!pendingRevalidates?.[pendingRevalidateKey]) {\n        return\n      }\n\n      delete pendingRevalidates[pendingRevalidateKey]\n    })\n\n  return cloned2\n}\n\ninterface PatchableModule {\n  workAsyncStorage: WorkAsyncStorage\n  workUnitAsyncStorage: WorkUnitAsyncStorage\n}\n\nexport function createPatchedFetcher(\n  originFetch: Fetcher,\n  { workAsyncStorage, workUnitAsyncStorage }: PatchableModule\n): PatchedFetcher {\n  // Create the patched fetch function.\n  const patched = async function fetch(\n    input: RequestInfo | URL,\n    init: RequestInit | undefined\n  ): Promise<Response> {\n    let url: URL | undefined\n    try {\n      url = new URL(input instanceof Request ? input.url : input)\n      url.username = ''\n      url.password = ''\n    } catch {\n      // Error caused by malformed URL should be handled by native fetch\n      url = undefined\n    }\n    const fetchUrl = url?.href ?? ''\n    const method = init?.method?.toUpperCase() || 'GET'\n\n    // Do create a new span trace for internal fetches in the\n    // non-verbose mode.\n    const isInternal = (init?.next as any)?.internal === true\n    const hideSpan = process.env.NEXT_OTEL_FETCH_DISABLED === '1'\n    // We don't track fetch metrics for internal fetches\n    // so it's not critical that we have a start time, as it won't be recorded.\n    // This is to workaround a flaky issue where performance APIs might\n    // not be available and will require follow-up investigation.\n    const fetchStart: number | undefined = isInternal\n      ? undefined\n      : performance.timeOrigin + performance.now()\n\n    const workStore = workAsyncStorage.getStore()\n    const workUnitStore = workUnitAsyncStorage.getStore()\n\n    let cacheSignal = workUnitStore ? getCacheSignal(workUnitStore) : null\n    if (cacheSignal) {\n      cacheSignal.beginRead()\n    }\n\n    const result = getTracer().trace(\n      isInternal ? NextNodeServerSpan.internalFetch : AppRenderSpan.fetch,\n      {\n        hideSpan,\n        kind: SpanKind.CLIENT,\n        spanName: ['fetch', method, fetchUrl].filter(Boolean).join(' '),\n        attributes: {\n          'http.url': fetchUrl,\n          'http.method': method,\n          'net.peer.name': url?.hostname,\n          'net.peer.port': url?.port || undefined,\n        },\n      },\n      async () => {\n        // If this is an internal fetch, we should not do any special treatment.\n        if (isInternal) {\n          return originFetch(input, init)\n        }\n\n        // If the workStore is not available, we can't do any\n        // special treatment of fetch, therefore fallback to the original\n        // fetch implementation.\n        if (!workStore) {\n          return originFetch(input, init)\n        }\n\n        // We should also fallback to the original fetch implementation if we\n        // are in draft mode, it does not constitute a static generation.\n        if (workStore.isDraftMode) {\n          return originFetch(input, init)\n        }\n\n        const isRequestInput =\n          input &&\n          typeof input === 'object' &&\n          typeof (input as Request).method === 'string'\n\n        const getRequestMeta = (field: string) => {\n          // If request input is present but init is not, retrieve from input first.\n          const value = (init as any)?.[field]\n          return value || (isRequestInput ? (input as any)[field] : null)\n        }\n\n        let finalRevalidate: number | undefined = undefined\n        const getNextField = (field: 'revalidate' | 'tags') => {\n          return typeof init?.next?.[field] !== 'undefined'\n            ? init?.next?.[field]\n            : isRequestInput\n              ? (input as any).next?.[field]\n              : undefined\n        }\n        // RequestInit doesn't keep extra fields e.g. next so it's\n        // only available if init is used separate\n        const originalFetchRevalidate = getNextField('revalidate')\n        let currentFetchRevalidate = originalFetchRevalidate\n        const tags: string[] = validateTags(\n          getNextField('tags') || [],\n          `fetch ${input.toString()}`\n        )\n\n        let revalidateStore: RevalidateStore | undefined\n\n        if (workUnitStore) {\n          switch (workUnitStore.type) {\n            case 'prerender':\n            case 'prerender-runtime':\n            // TODO: Stop accumulating tags in client prerender. (fallthrough)\n            case 'prerender-client':\n            case 'validation-client':\n            case 'prerender-ppr':\n            case 'prerender-legacy':\n            case 'cache':\n            case 'private-cache':\n              revalidateStore = workUnitStore\n              break\n            case 'request':\n            case 'unstable-cache':\n            case 'generate-static-params':\n              break\n            default:\n              workUnitStore satisfies never\n          }\n        }\n\n        if (revalidateStore) {\n          if (Array.isArray(tags)) {\n            // Collect tags onto parent caches or parent prerenders.\n            const collectedTags =\n              revalidateStore.tags ?? (revalidateStore.tags = [])\n            for (const tag of tags) {\n              if (!collectedTags.includes(tag)) {\n                collectedTags.push(tag)\n              }\n            }\n          }\n        }\n\n        const implicitTags = workUnitStore?.implicitTags\n\n        let pageFetchCacheMode = workStore.fetchCache\n\n        if (workUnitStore) {\n          switch (workUnitStore.type) {\n            case 'unstable-cache':\n              // Inside unstable-cache we treat it the same as force-no-store on\n              // the page.\n              pageFetchCacheMode = 'force-no-store'\n              break\n            case 'prerender':\n            case 'prerender-client':\n            case 'validation-client':\n            case 'prerender-runtime':\n            case 'prerender-ppr':\n            case 'prerender-legacy':\n            case 'request':\n            case 'cache':\n            case 'private-cache':\n            case 'generate-static-params':\n              break\n            default:\n              workUnitStore satisfies never\n          }\n        }\n\n        const isUsingNoStore = !!workStore.isUnstableNoStore\n\n        let currentFetchCacheConfig = getRequestMeta('cache')\n        let cacheReason = ''\n        let cacheWarning: string | undefined\n\n        if (\n          typeof currentFetchCacheConfig === 'string' &&\n          typeof currentFetchRevalidate !== 'undefined'\n        ) {\n          // If the revalidate value conflicts with the cache value, we should warn the user and unset the conflicting values.\n          const isConflictingRevalidate =\n            // revalidate: 0 and cache: force-cache\n            (currentFetchCacheConfig === 'force-cache' &&\n              currentFetchRevalidate === 0) ||\n            // revalidate: >0 or revalidate: false and cache: no-store\n            (currentFetchCacheConfig === 'no-store' &&\n              (currentFetchRevalidate > 0 || currentFetchRevalidate === false))\n\n          if (isConflictingRevalidate) {\n            cacheWarning = `Specified \"cache: ${currentFetchCacheConfig}\" and \"revalidate: ${currentFetchRevalidate}\", only one should be specified.`\n            currentFetchCacheConfig = undefined\n            currentFetchRevalidate = undefined\n          }\n        }\n\n        const hasExplicitFetchCacheOptOut =\n          // fetch config itself signals not to cache\n          currentFetchCacheConfig === 'no-cache' ||\n          currentFetchCacheConfig === 'no-store' ||\n          // the fetch isn't explicitly caching and the segment level cache config signals not to cache\n          // note: `pageFetchCacheMode` is also set by being in an unstable_cache context.\n          pageFetchCacheMode === 'force-no-store' ||\n          pageFetchCacheMode === 'only-no-store'\n\n        // If no explicit fetch cache mode is set, but dynamic = `force-dynamic` is set,\n        // we shouldn't consider caching the fetch. This is because the `dynamic` cache\n        // is considered a \"top-level\" cache mode, whereas something like `fetchCache` is more\n        // fine-grained. Top-level modes are responsible for setting reasonable defaults for the\n        // other configurations.\n        const noFetchConfigAndForceDynamic =\n          !pageFetchCacheMode &&\n          !currentFetchCacheConfig &&\n          !currentFetchRevalidate &&\n          workStore.forceDynamic\n\n        if (\n          // force-cache was specified without a revalidate value. We set the revalidate value to false\n          // which will signal the cache to not revalidate\n          currentFetchCacheConfig === 'force-cache' &&\n          typeof currentFetchRevalidate === 'undefined'\n        ) {\n          currentFetchRevalidate = false\n        } else if (\n          hasExplicitFetchCacheOptOut ||\n          noFetchConfigAndForceDynamic\n        ) {\n          currentFetchRevalidate = 0\n        }\n\n        if (\n          currentFetchCacheConfig === 'no-cache' ||\n          currentFetchCacheConfig === 'no-store'\n        ) {\n          cacheReason = `cache: ${currentFetchCacheConfig}`\n        }\n\n        finalRevalidate = validateRevalidate(\n          currentFetchRevalidate,\n          workStore.route\n        )\n\n        const _headers = getRequestMeta('headers')\n        const initHeaders: Headers =\n          typeof _headers?.get === 'function'\n            ? _headers\n            : new Headers(_headers || {})\n\n        const hasUnCacheableHeader =\n          initHeaders.get('authorization') || initHeaders.get('cookie')\n\n        const isUnCacheableMethod = !['get', 'head'].includes(\n          getRequestMeta('method')?.toLowerCase() || 'get'\n        )\n\n        /**\n         * We automatically disable fetch caching under the following conditions:\n         * - Fetch cache configs are not set. Specifically:\n         *    - A page fetch cache mode is not set (export const fetchCache=...)\n         *    - A fetch cache mode is not set in the fetch call (fetch(url, { cache: ... }))\n         *      or the fetch cache mode is set to 'default'\n         *    - A fetch revalidate value is not set in the fetch call (fetch(url, { revalidate: ... }))\n         * - OR the fetch comes after a configuration that triggered dynamic rendering (e.g., reading cookies())\n         *   and the fetch was considered uncacheable (e.g., POST method or has authorization headers)\n         */\n        const hasNoExplicitCacheConfig =\n          // eslint-disable-next-line eqeqeq\n          pageFetchCacheMode == undefined &&\n          // eslint-disable-next-line eqeqeq\n          (currentFetchCacheConfig == undefined ||\n            // when considering whether to opt into the default \"no-cache\" fetch semantics,\n            // a \"default\" cache config should be treated the same as no cache config\n            currentFetchCacheConfig === 'default') &&\n          // eslint-disable-next-line eqeqeq\n          currentFetchRevalidate == undefined\n\n        let autoNoCache = Boolean(\n          (hasUnCacheableHeader || isUnCacheableMethod) &&\n            revalidateStore?.revalidate === 0\n        )\n\n        let isImplicitBuildTimeCache = false\n\n        if (!autoNoCache && hasNoExplicitCacheConfig) {\n          // We don't enable automatic no-cache behavior during build-time\n          // prerendering so that we can still leverage the fetch cache between\n          // export workers.\n          if (workStore.isBuildTimePrerendering) {\n            isImplicitBuildTimeCache = true\n          } else {\n            autoNoCache = true\n          }\n        }\n\n        // If we have no cache config, and we're in Dynamic I/O prerendering,\n        // it'll be a dynamic call. We don't have to issue that dynamic call.\n        if (hasNoExplicitCacheConfig && workUnitStore !== undefined) {\n          switch (workUnitStore.type) {\n            case 'prerender':\n            case 'prerender-runtime':\n            // While we don't want to do caching in the client scope we know the\n            // fetch will be dynamic for cacheComponents so we may as well avoid the\n            // call here. (fallthrough)\n            case 'prerender-client':\n              if (cacheSignal) {\n                cacheSignal.endRead()\n                cacheSignal = null\n              }\n\n              return makeHangingPromise<Response>(\n                workUnitStore.renderSignal,\n                workStore.route,\n                'fetch()'\n              )\n            case 'validation-client':\n              break\n            case 'request':\n              if (\n                process.env.NODE_ENV === 'development' &&\n                workUnitStore.stagedRendering\n              ) {\n                if (cacheSignal) {\n                  cacheSignal.endRead()\n                  cacheSignal = null\n                }\n                await workUnitStore.stagedRendering.waitForStage(\n                  RenderStage.Dynamic\n                )\n              }\n              break\n            case 'prerender-ppr':\n            case 'prerender-legacy':\n            case 'cache':\n            case 'private-cache':\n            case 'unstable-cache':\n            case 'generate-static-params':\n              break\n            default:\n              workUnitStore satisfies never\n          }\n        }\n\n        switch (pageFetchCacheMode) {\n          case 'force-no-store': {\n            cacheReason = 'fetchCache = force-no-store'\n            break\n          }\n          case 'only-no-store': {\n            if (\n              currentFetchCacheConfig === 'force-cache' ||\n              (typeof finalRevalidate !== 'undefined' && finalRevalidate > 0)\n            ) {\n              throw new Error(\n                `cache: 'force-cache' used on fetch for ${fetchUrl} with 'export const fetchCache = 'only-no-store'`\n              )\n            }\n            cacheReason = 'fetchCache = only-no-store'\n            break\n          }\n          case 'only-cache': {\n            if (currentFetchCacheConfig === 'no-store') {\n              throw new Error(\n                `cache: 'no-store' used on fetch for ${fetchUrl} with 'export const fetchCache = 'only-cache'`\n              )\n            }\n            break\n          }\n          case 'force-cache': {\n            if (\n              typeof currentFetchRevalidate === 'undefined' ||\n              currentFetchRevalidate === 0\n            ) {\n              cacheReason = 'fetchCache = force-cache'\n              finalRevalidate = INFINITE_CACHE\n            }\n            break\n          }\n          case 'default-cache':\n          case 'default-no-store':\n          case 'auto':\n          case undefined:\n            // sometimes we won't match the above cases. the reason we don't move\n            // everything to this switch is the use of autoNoCache which is not a fetchCacheMode\n            // I suspect this could be unified with fetchCacheMode however in which case we could\n            // simplify the switch case and ensure we have an exhaustive switch handling all modes\n            break\n          default:\n            pageFetchCacheMode satisfies never\n        }\n\n        if (typeof finalRevalidate === 'undefined') {\n          if (pageFetchCacheMode === 'default-cache' && !isUsingNoStore) {\n            finalRevalidate = INFINITE_CACHE\n            cacheReason = 'fetchCache = default-cache'\n          } else if (pageFetchCacheMode === 'default-no-store') {\n            finalRevalidate = 0\n            cacheReason = 'fetchCache = default-no-store'\n          } else if (isUsingNoStore) {\n            finalRevalidate = 0\n            cacheReason = 'noStore call'\n          } else if (autoNoCache) {\n            finalRevalidate = 0\n            cacheReason = 'auto no cache'\n          } else {\n            // TODO: should we consider this case an invariant?\n            cacheReason = 'auto cache'\n            finalRevalidate = revalidateStore\n              ? revalidateStore.revalidate\n              : INFINITE_CACHE\n          }\n        } else if (!cacheReason) {\n          cacheReason = `revalidate: ${finalRevalidate}`\n        }\n\n        if (\n          // when force static is configured we don't bail from\n          // `revalidate: 0` values\n          !(workStore.forceStatic && finalRevalidate === 0) &&\n          // we don't consider autoNoCache to switch to dynamic for ISR\n          !autoNoCache &&\n          // If the revalidate value isn't currently set or the value is less\n          // than the current revalidate value, we should update the revalidate\n          // value.\n          revalidateStore &&\n          finalRevalidate < revalidateStore.revalidate\n        ) {\n          // If we were setting the revalidate value to 0, we should try to\n          // postpone instead first.\n          if (finalRevalidate === 0) {\n            if (workUnitStore) {\n              switch (workUnitStore.type) {\n                case 'prerender':\n                case 'prerender-client':\n                case 'prerender-runtime':\n                // If we're in an instant validation, a dynamic fetch won't\n                // have time to resolve during the validation prerender anyway,\n                // so we leave it hanging. This can cause false negatives in shared parents,\n                // but we accept that for now, because client data fetching is non-idiomatic.\n                // eslint-disable-next-line no-fallthrough\n                case 'validation-client':\n                  if (cacheSignal) {\n                    cacheSignal.endRead()\n                    cacheSignal = null\n                  }\n                  return makeHangingPromise<Response>(\n                    workUnitStore.renderSignal,\n                    workStore.route,\n                    'fetch()'\n                  )\n                case 'request':\n                  if (\n                    process.env.NODE_ENV === 'development' &&\n                    workUnitStore.stagedRendering\n                  ) {\n                    if (cacheSignal) {\n                      cacheSignal.endRead()\n                      cacheSignal = null\n                    }\n                    await workUnitStore.stagedRendering.waitForStage(\n                      RenderStage.Dynamic\n                    )\n                  }\n                  break\n                case 'prerender-ppr':\n                case 'prerender-legacy':\n                case 'cache':\n                case 'private-cache':\n                case 'unstable-cache':\n                case 'generate-static-params':\n                  break\n                default:\n                  workUnitStore satisfies never\n              }\n            }\n\n            markCurrentScopeAsDynamic(\n              workStore,\n              workUnitStore,\n              `revalidate: 0 fetch ${input} ${workStore.route}`\n            )\n          }\n\n          // We only want to set the revalidate store's revalidate time if it\n          // was explicitly set for the fetch call, i.e.\n          // originalFetchRevalidate.\n          if (revalidateStore && originalFetchRevalidate === finalRevalidate) {\n            revalidateStore.revalidate = finalRevalidate\n          }\n        }\n\n        const isCacheableRevalidate =\n          typeof finalRevalidate === 'number' && finalRevalidate > 0\n\n        let cacheKey: string | undefined\n        const { incrementalCache } = workStore\n        let isHmrRefresh = false\n        let serverComponentsHmrCache: ServerComponentsHmrCache | undefined\n\n        if (workUnitStore) {\n          switch (workUnitStore.type) {\n            case 'request':\n            case 'cache':\n            case 'private-cache':\n              isHmrRefresh = workUnitStore.isHmrRefresh ?? false\n              serverComponentsHmrCache = workUnitStore.serverComponentsHmrCache\n              break\n            case 'prerender':\n            case 'prerender-client':\n            case 'validation-client':\n            case 'prerender-runtime':\n            case 'prerender-ppr':\n            case 'prerender-legacy':\n            case 'unstable-cache':\n            case 'generate-static-params':\n              break\n            default:\n              workUnitStore satisfies never\n          }\n        }\n\n        if (\n          incrementalCache &&\n          (isCacheableRevalidate || serverComponentsHmrCache)\n        ) {\n          try {\n            cacheKey = await incrementalCache.generateCacheKey(\n              fetchUrl,\n              isRequestInput ? (input as RequestInit) : init\n            )\n          } catch (err) {\n            console.error(`Failed to generate cache key for`, input)\n          }\n        }\n\n        const fetchIdx = workStore.nextFetchId ?? 1\n        workStore.nextFetchId = fetchIdx + 1\n\n        let handleUnlock: () => Promise<void> | void = () => {}\n\n        const doOriginalFetch = async (\n          isStale?: boolean,\n          cacheReasonOverride?: string\n        ) => {\n          const requestInputFields = [\n            'cache',\n            'credentials',\n            'headers',\n            'integrity',\n            'keepalive',\n            'method',\n            'mode',\n            'redirect',\n            'referrer',\n            'referrerPolicy',\n            'window',\n            'duplex',\n\n            // don't pass through signal when revalidating\n            ...(isStale ? [] : ['signal']),\n          ]\n\n          if (isRequestInput) {\n            const reqInput: Request = input as any\n            const reqOptions: RequestInit = {\n              body: (reqInput as any)._ogBody || reqInput.body,\n            }\n\n            for (const field of requestInputFields) {\n              // @ts-expect-error custom fields\n              reqOptions[field] = reqInput[field]\n            }\n            input = new Request(reqInput.url, reqOptions)\n          } else if (init) {\n            const { _ogBody, body, signal, ...otherInput } =\n              init as RequestInit & { _ogBody?: any }\n            init = {\n              ...otherInput,\n              body: _ogBody || body,\n              signal: isStale ? undefined : signal,\n            }\n          }\n\n          // add metadata to init without editing the original\n          const clonedInit = {\n            ...init,\n            next: { ...init?.next, fetchType: 'origin', fetchIdx },\n          }\n\n          return originFetch(input, clonedInit)\n            .then(async (res) => {\n              if (!isStale && fetchStart) {\n                trackFetchMetric(workStore, {\n                  start: fetchStart,\n                  url: fetchUrl,\n                  cacheReason: cacheReasonOverride || cacheReason,\n                  cacheStatus:\n                    finalRevalidate === 0 || cacheReasonOverride\n                      ? 'skip'\n                      : 'miss',\n                  cacheWarning,\n                  status: res.status,\n                  method: clonedInit.method || 'GET',\n                })\n              }\n              if (\n                res.status === 200 &&\n                incrementalCache &&\n                cacheKey &&\n                (isCacheableRevalidate || serverComponentsHmrCache)\n              ) {\n                const normalizedRevalidate =\n                  finalRevalidate >= INFINITE_CACHE\n                    ? CACHE_ONE_YEAR_SECONDS\n                    : finalRevalidate\n\n                const incrementalCacheConfig:\n                  | SetIncrementalFetchCacheContext\n                  | undefined = isCacheableRevalidate\n                  ? {\n                      fetchCache: true,\n                      fetchUrl,\n                      fetchIdx,\n                      tags,\n                      isImplicitBuildTimeCache,\n                    }\n                  : undefined\n\n                switch (workUnitStore?.type) {\n                  case 'prerender':\n                  case 'prerender-client':\n                  case 'validation-client':\n                  case 'prerender-runtime':\n                    return createCachedPrerenderResponse(\n                      res,\n                      cacheKey,\n                      incrementalCacheConfig,\n                      incrementalCache,\n                      normalizedRevalidate,\n                      handleUnlock\n                    )\n                  case 'request':\n                    if (\n                      process.env.NODE_ENV === 'development' &&\n                      workUnitStore.stagedRendering &&\n                      workUnitStore.cacheSignal &&\n                      isCacheableRevalidate\n                    ) {\n                      // We're filling caches for a staged render with an\n                      // explicit cache config, so we need to wait for the\n                      // response to finish instead of streaming. For HMR-only\n                      // caching (no explicit revalidate), we fall through to\n                      // createCachedDynamicResponse which handles streaming\n                      // and abort gracefully.\n                      return createCachedPrerenderResponse(\n                        res,\n                        cacheKey,\n                        incrementalCacheConfig,\n                        incrementalCache,\n                        normalizedRevalidate,\n                        handleUnlock\n                      )\n                    }\n                  // fallthrough\n                  case 'prerender-ppr':\n                  case 'prerender-legacy':\n                  case 'cache':\n                  case 'private-cache':\n                  case 'unstable-cache':\n                  case 'generate-static-params':\n                  case undefined:\n                    return createCachedDynamicResponse(\n                      workStore,\n                      res,\n                      cacheKey,\n                      incrementalCacheConfig,\n                      incrementalCache,\n                      serverComponentsHmrCache,\n                      normalizedRevalidate,\n                      input,\n                      handleUnlock,\n                      getRequestMeta('signal')\n                    )\n                  default:\n                    workUnitStore satisfies never\n                }\n              }\n\n              // we had response that we determined shouldn't be cached so we return it\n              // and don't cache it. This also needs to unlock the cache lock we acquired.\n              await handleUnlock()\n\n              return res\n            })\n            .catch((error) => {\n              handleUnlock()\n              throw error\n            })\n        }\n\n        let cacheReasonOverride\n        let isForegroundRevalidate = false\n        let isHmrRefreshCache = false\n\n        if (cacheKey && incrementalCache) {\n          let cachedFetchData: CachedFetchData | undefined\n\n          if (isHmrRefresh && serverComponentsHmrCache) {\n            cachedFetchData = serverComponentsHmrCache.get(cacheKey)\n            isHmrRefreshCache = true\n          }\n\n          if (isCacheableRevalidate && !cachedFetchData) {\n            handleUnlock = await incrementalCache.lock(cacheKey)\n            const entry = workStore.isOnDemandRevalidate\n              ? null\n              : await incrementalCache.get(cacheKey, {\n                  kind: IncrementalCacheKind.FETCH,\n                  revalidate: finalRevalidate,\n                  fetchUrl,\n                  fetchIdx,\n                  tags,\n                  softTags: implicitTags?.tags,\n                })\n\n            if (hasNoExplicitCacheConfig && workUnitStore) {\n              switch (workUnitStore.type) {\n                case 'prerender':\n                case 'prerender-client':\n                case 'validation-client':\n                case 'prerender-runtime':\n                  // We sometimes use the cache to dedupe fetches that do not\n                  // specify a cache configuration. In these cases we want to\n                  // make sure we still exclude them from prerenders if\n                  // cacheComponents is on so we introduce an artificial task boundary\n                  // here.\n                  await getTimeoutBoundary()\n                  break\n                case 'request':\n                  if (\n                    process.env.NODE_ENV === 'development' &&\n                    workUnitStore.stagedRendering\n                  ) {\n                    await workUnitStore.stagedRendering.waitForStage(\n                      RenderStage.Dynamic\n                    )\n                  }\n                  break\n                case 'prerender-ppr':\n                case 'prerender-legacy':\n                case 'cache':\n                case 'private-cache':\n                case 'unstable-cache':\n                case 'generate-static-params':\n                  break\n                default:\n                  workUnitStore satisfies never\n              }\n            }\n\n            if (entry) {\n              await handleUnlock()\n            } else {\n              // in dev, incremental cache response will be null in case the browser adds `cache-control: no-cache` in the request headers\n              // TODO: it seems like we also hit this after revalidates in dev?\n              cacheReasonOverride = 'cache-control: no-cache (hard refresh)'\n            }\n\n            if (entry?.value && entry.value.kind === CachedRouteKind.FETCH) {\n              // when stale and is revalidating we wait for fresh data\n              // so the revalidated entry has the updated data\n              if (workStore.isStaticGeneration && entry.isStale) {\n                isForegroundRevalidate = true\n              } else {\n                if (entry.isStale) {\n                  workStore.pendingRevalidates ??= {}\n                  if (!workStore.pendingRevalidates[cacheKey]) {\n                    const pendingRevalidate = doOriginalFetch(true)\n                      .then(async (response) => ({\n                        body: await response.arrayBuffer(),\n                        headers: response.headers,\n                        status: response.status,\n                        statusText: response.statusText,\n                      }))\n                      .finally(() => {\n                        workStore.pendingRevalidates ??= {}\n                        delete workStore.pendingRevalidates[cacheKey || '']\n                      })\n\n                    // Attach the empty catch here so we don't get a \"unhandled\n                    // promise rejection\" warning.\n                    pendingRevalidate.catch(console.error)\n\n                    workStore.pendingRevalidates[cacheKey] = pendingRevalidate\n                  }\n                }\n\n                cachedFetchData = entry.value.data\n              }\n            }\n          }\n\n          if (cachedFetchData) {\n            if (fetchStart) {\n              trackFetchMetric(workStore, {\n                start: fetchStart,\n                url: fetchUrl,\n                cacheReason,\n                cacheStatus: isHmrRefreshCache ? 'hmr' : 'hit',\n                cacheWarning,\n                status: cachedFetchData.status || 200,\n                method: init?.method || 'GET',\n              })\n            }\n\n            const response = new Response(\n              Buffer.from(cachedFetchData.body, 'base64'),\n              {\n                headers: cachedFetchData.headers,\n                status: cachedFetchData.status,\n              }\n            )\n\n            Object.defineProperty(response, 'url', {\n              value: cachedFetchData.url,\n            })\n\n            return response\n          }\n        }\n\n        if (\n          (workStore.isStaticGeneration ||\n            (process.env.NODE_ENV === 'development' &&\n              process.env.__NEXT_CACHE_COMPONENTS &&\n              workUnitStore &&\n              // eslint-disable-next-line no-restricted-syntax\n              workUnitStore.type === 'request' &&\n              workUnitStore.stagedRendering)) &&\n          init &&\n          typeof init === 'object'\n        ) {\n          const { cache } = init\n\n          // Delete `cache` property as Cloudflare Workers will throw an error\n          if (isEdgeRuntime) delete init.cache\n\n          if (cache === 'no-store') {\n            // If enabled, we should bail out of static generation.\n            if (workUnitStore) {\n              switch (workUnitStore.type) {\n                case 'prerender':\n                case 'prerender-client':\n                case 'prerender-runtime':\n                case 'validation-client':\n                  if (cacheSignal) {\n                    cacheSignal.endRead()\n                    cacheSignal = null\n                  }\n                  return makeHangingPromise<Response>(\n                    workUnitStore.renderSignal,\n                    workStore.route,\n                    'fetch()'\n                  )\n                case 'request':\n                  if (\n                    process.env.NODE_ENV === 'development' &&\n                    workUnitStore.stagedRendering\n                  ) {\n                    if (cacheSignal) {\n                      cacheSignal.endRead()\n                      cacheSignal = null\n                    }\n                    await workUnitStore.stagedRendering.waitForStage(\n                      RenderStage.Dynamic\n                    )\n                  }\n                  break\n                case 'prerender-ppr':\n                case 'prerender-legacy':\n                case 'cache':\n                case 'private-cache':\n                case 'unstable-cache':\n                case 'generate-static-params':\n                  break\n                default:\n                  workUnitStore satisfies never\n              }\n            }\n            markCurrentScopeAsDynamic(\n              workStore,\n              workUnitStore,\n              `no-store fetch ${input} ${workStore.route}`\n            )\n          }\n\n          const hasNextConfig = 'next' in init\n          const { next = {} } = init\n          if (\n            typeof next.revalidate === 'number' &&\n            revalidateStore &&\n            next.revalidate < revalidateStore.revalidate\n          ) {\n            if (next.revalidate === 0) {\n              // If enabled, we should bail out of static generation.\n              if (workUnitStore) {\n                switch (workUnitStore.type) {\n                  case 'prerender':\n                  case 'prerender-client':\n                  case 'prerender-runtime':\n                  case 'validation-client':\n                    return makeHangingPromise<Response>(\n                      workUnitStore.renderSignal,\n                      workStore.route,\n                      'fetch()'\n                    )\n                  case 'request':\n                    if (\n                      process.env.NODE_ENV === 'development' &&\n                      workUnitStore.stagedRendering\n                    ) {\n                      await workUnitStore.stagedRendering.waitForStage(\n                        RenderStage.Dynamic\n                      )\n                    }\n                    break\n                  case 'cache':\n                  case 'private-cache':\n                  case 'unstable-cache':\n                  case 'prerender-legacy':\n                  case 'prerender-ppr':\n                  case 'generate-static-params':\n                    break\n                  default:\n                    workUnitStore satisfies never\n                }\n              }\n              markCurrentScopeAsDynamic(\n                workStore,\n                workUnitStore,\n                `revalidate: 0 fetch ${input} ${workStore.route}`\n              )\n            }\n\n            if (!workStore.forceStatic || next.revalidate !== 0) {\n              revalidateStore.revalidate = next.revalidate\n            }\n          }\n          if (hasNextConfig) delete init.next\n        }\n\n        // if we are revalidating the whole page via time or on-demand and\n        // the fetch cache entry is stale we should still de-dupe the\n        // origin hit if it's a cache-able entry\n        if (cacheKey && isForegroundRevalidate) {\n          const pendingRevalidateKey = cacheKey\n          workStore.pendingRevalidates ??= {}\n          let pendingRevalidate =\n            workStore.pendingRevalidates[pendingRevalidateKey]\n\n          if (pendingRevalidate) {\n            const revalidatedResult: {\n              body: ArrayBuffer\n              headers: Headers\n              status: number\n              statusText: string\n            } = await pendingRevalidate\n            return new Response(revalidatedResult.body, {\n              headers: revalidatedResult.headers,\n              status: revalidatedResult.status,\n              statusText: revalidatedResult.statusText,\n            })\n          }\n\n          // We used to just resolve the Response and clone it however for\n          // static generation with cacheComponents we need the response to be able to\n          // be resolved in a microtask and cloning the response will never have\n          // a body that can resolve in a microtask in node (as observed through\n          // experimentation) So instead we await the body and then when it is\n          // available we construct manually cloned Response objects with the\n          // body as an ArrayBuffer. This will be resolvable in a microtask\n          // making it compatible with cacheComponents.\n          const pendingResponse = doOriginalFetch(true, cacheReasonOverride)\n            // We're cloning the response using this utility because there\n            // exists a bug in the undici library around response cloning.\n            // See the following pull request for more details:\n            // https://github.com/vercel/next.js/pull/73274\n            .then(cloneResponse)\n\n          pendingRevalidate = pendingResponse\n            .then(async (responses) => {\n              const response = responses[0]\n              return {\n                body: await response.arrayBuffer(),\n                headers: response.headers,\n                status: response.status,\n                statusText: response.statusText,\n              }\n            })\n            .finally(() => {\n              // If the pending revalidate is not present in the store, then\n              // we have nothing to delete.\n              if (!workStore.pendingRevalidates?.[pendingRevalidateKey]) {\n                return\n              }\n\n              delete workStore.pendingRevalidates[pendingRevalidateKey]\n            })\n\n          // Attach the empty catch here so we don't get a \"unhandled promise\n          // rejection\" warning\n          pendingRevalidate.catch(() => {})\n\n          workStore.pendingRevalidates[pendingRevalidateKey] = pendingRevalidate\n\n          return pendingResponse.then((responses) => responses[1])\n        } else {\n          return doOriginalFetch(false, cacheReasonOverride)\n        }\n      }\n    )\n\n    if (cacheSignal) {\n      try {\n        return await result\n      } finally {\n        if (cacheSignal) {\n          cacheSignal.endRead()\n        }\n      }\n    }\n    return result\n  }\n\n  // Attach the necessary properties to the patched fetch function.\n  // We don't use this to determine if the fetch function has been patched,\n  // but for external consumers to determine if the fetch function has been\n  // patched.\n  patched.__nextPatched = true as const\n  patched.__nextGetStaticStore = () => workAsyncStorage\n  patched._nextOriginalFetch = originFetch\n  ;(globalThis as Record<symbol, unknown>)[NEXT_PATCH_SYMBOL] = true\n\n  // Assign the function name also as a name property, so that it's preserved\n  // even when mangling is enabled.\n  Object.defineProperty(patched, 'name', { value: 'fetch', writable: false })\n\n  return patched\n}\n\n// we patch fetch to collect cache information used for\n// determining if a page is static or not\nexport function patchFetch(options: PatchableModule) {\n  // If we've already patched fetch, we should not patch it again.\n  if (isFetchPatched()) return\n\n  // Grab the original fetch function. We'll attach this so we can use it in\n  // the patched fetch function.\n  const original = createDedupeFetch(globalThis.fetch)\n\n  // Set the global fetch to the patched fetch.\n  globalThis.fetch = createPatchedFetcher(original, options)\n}\n\nlet currentTimeoutBoundary: null | Promise<void> = null\nfunction getTimeoutBoundary() {\n  if (!currentTimeoutBoundary) {\n    currentTimeoutBoundary = new Promise((r) => {\n      setTimeout(() => {\n        currentTimeoutBoundary = null\n        r()\n      }, 0)\n    })\n  }\n  return currentTimeoutBoundary\n}\n","import type { Params } from '../request/params'\nimport type { SearchParams } from '../request/search-params'\nimport { workUnitAsyncStorage } from './work-unit-async-storage.external'\nimport type {\n  VaryParamsThenable,\n  VaryParams,\n} from '../../shared/lib/segment-cache/vary-params-decoding'\n\n/**\n * Accumulates vary params for a single segment (or for metadata/rootParams).\n *\n * VaryParamsAccumulator is also a thenable that can be serialized by React\n * Flight. The accumulator starts as 'pending' and accumulates param accesses\n * during render. Call `finishTrackingVaryParams()` after rendering to resolve\n * all accumulators.\n *\n * The `status` and `value` fields follow the React Flight thenable protocol:\n * when `status === 'fulfilled'`, Flight can read `value` synchronously without\n * scheduling a microtask via `.then()`.\n */\nexport type VaryParamsAccumulator = {\n  // Mutable during render - accumulates param access\n  varyParams: VaryParams\n\n  // React thenable protocol fields\n  status: 'pending' | 'fulfilled'\n  value: VaryParams\n  then(\n    onfulfilled?: ((value: Set<string>) => unknown) | null,\n    onrejected?: ((reason: unknown) => unknown) | null\n  ): void\n\n  // Internal - callbacks waiting for resolution\n  resolvers: Array<(value: Set<string>) => void>\n}\n\n/**\n * A mutable data structure for accumulating per-segment vary params for an\n * entire server response. It's only used during prerenders. It describes\n * metadata about the response itself.\n */\nexport type ResponseVaryParamsAccumulator = {\n  /** Vary params accumulator for metadata/viewport (the \"head\" segment) */\n  head: VaryParamsAccumulator\n  /** Vary params accumulator for root params access */\n  rootParams: VaryParamsAccumulator\n  /** Vary params accumulators for each route segment */\n  segments: Set<VaryParamsAccumulator>\n}\n\nfunction createSegmentVaryParamsAccumulator(): VaryParamsAccumulator {\n  const accumulator: VaryParamsAccumulator = {\n    varyParams: new Set(),\n    status: 'pending',\n    value: new Set(),\n    then(onfulfilled: ((value: Set<string>) => unknown) | null | undefined) {\n      if (onfulfilled) {\n        if (accumulator.status === 'pending') {\n          accumulator.resolvers.push(onfulfilled)\n        } else {\n          onfulfilled(accumulator.value)\n        }\n      }\n    },\n    resolvers: [],\n  }\n  return accumulator\n}\n\n/**\n * A singleton accumulator that's already resolved to an empty Set. Use this for\n * segments where we know upfront that no params will be accessed, such as\n * client components or segments without user code.\n *\n * Benefits:\n * - No need to accumulate or resolve later\n * - Resilient: resolves correctly even if other tracking fails\n * - Memory efficient: reuses the same object\n */\nconst emptySet: VaryParams = new Set()\nexport const emptyVaryParamsAccumulator: VaryParamsAccumulator = {\n  varyParams: emptySet,\n  status: 'fulfilled',\n  value: emptySet,\n  then(onfulfilled: ((value: Set<string>) => unknown) | null | undefined) {\n    if (onfulfilled) {\n      onfulfilled(emptySet)\n    }\n  },\n  resolvers: [],\n}\n\nexport function createResponseVaryParamsAccumulator(): ResponseVaryParamsAccumulator {\n  // Create the head and rootParams accumulators as top-level fields.\n  // Segment accumulators are added to the segments set as they are created.\n  const head = createSegmentVaryParamsAccumulator()\n  const rootParams = createSegmentVaryParamsAccumulator()\n  const segments = new Set<VaryParamsAccumulator>()\n\n  return {\n    head,\n    rootParams,\n    segments,\n  }\n}\n\n/**\n * Allocates a new VaryParamsAccumulator and adds it to the response accumulator\n * associated with the current WorkUnitStore.\n *\n * Returns a thenable that resolves to the segment's vary params once rendering\n * is complete. The thenable can be passed directly to React Flight for\n * serialization.\n */\nexport function createVaryParamsAccumulator(): VaryParamsAccumulator | null {\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'prerender':\n      case 'prerender-runtime': {\n        const responseAccumulator = workUnitStore.varyParamsAccumulator\n        if (responseAccumulator !== null) {\n          const accumulator = createSegmentVaryParamsAccumulator()\n          responseAccumulator.segments.add(accumulator)\n          return accumulator\n        }\n        return null\n      }\n      case 'prerender-ppr':\n      case 'prerender-legacy':\n      case 'request':\n      case 'cache':\n      case 'private-cache':\n      case 'prerender-client':\n      case 'validation-client':\n      case 'unstable-cache':\n      case 'generate-static-params':\n        break\n      default:\n        workUnitStore satisfies never\n    }\n  }\n  return null\n}\n\nexport function getMetadataVaryParamsAccumulator(): VaryParamsAccumulator | null {\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'prerender':\n      case 'prerender-runtime': {\n        const responseAccumulator = workUnitStore.varyParamsAccumulator\n        if (responseAccumulator !== null) {\n          return responseAccumulator.head\n        }\n        return null\n      }\n      case 'prerender-ppr':\n      case 'prerender-legacy':\n      case 'request':\n      case 'cache':\n      case 'private-cache':\n      case 'prerender-client':\n      case 'validation-client':\n      case 'unstable-cache':\n      case 'generate-static-params':\n        return null\n      default:\n        workUnitStore satisfies never\n    }\n  }\n  return null\n}\n\nexport function getVaryParamsThenable(\n  accumulator: VaryParamsAccumulator\n): VaryParamsThenable | null {\n  return accumulator as unknown as VaryParamsThenable | null\n}\n\nexport function getMetadataVaryParamsThenable(): VaryParamsThenable | null {\n  const accumulator = getMetadataVaryParamsAccumulator()\n  if (accumulator !== null) {\n    return getVaryParamsThenable(accumulator)\n  }\n  return null\n}\n\n// The metadata and viewport are always delivered in a single payload, so they\n// don't need to be tracked separately. This may change in the future, but for\n// now this is just an alias.\nexport const getViewportVaryParamsAccumulator = getMetadataVaryParamsAccumulator\n\nexport function getRootParamsVaryParamsAccumulator(): VaryParamsAccumulator | null {\n  const workUnitStore = workUnitAsyncStorage.getStore()\n  if (workUnitStore) {\n    switch (workUnitStore.type) {\n      case 'prerender':\n      case 'prerender-runtime': {\n        const responseAccumulator = workUnitStore.varyParamsAccumulator\n        if (responseAccumulator !== null) {\n          return responseAccumulator.rootParams\n        }\n        return null\n      }\n      case 'prerender-ppr':\n      case 'prerender-legacy':\n      case 'request':\n      case 'cache':\n      case 'private-cache':\n      case 'prerender-client':\n      case 'validation-client':\n      case 'unstable-cache':\n      case 'generate-static-params':\n        return null\n      default:\n        workUnitStore satisfies never\n    }\n  }\n  return null\n}\n\n/**\n * Records that a param was accessed. Adds the param name to the accumulator's\n * varyParams set.\n */\nexport function accumulateVaryParam(\n  accumulator: VaryParamsAccumulator,\n  paramName: string\n): void {\n  accumulator.varyParams.add(paramName)\n}\n\n/**\n * Records a root param access.\n */\nexport function accumulateRootVaryParam(paramName: string): void {\n  const rootParamsAccumulator = getRootParamsVaryParamsAccumulator()\n  if (rootParamsAccumulator !== null) {\n    accumulateVaryParam(rootParamsAccumulator, paramName)\n  }\n}\n\nexport function createVaryingParams(\n  accumulator: VaryParamsAccumulator,\n  originalParamsObject: Params,\n  optionalCatchAllParamName: string | null\n): Params {\n  if (optionalCatchAllParamName !== null) {\n    // When there's an optional catch-all param with no value (e.g.,\n    // [[...slug]] at /), the param doesn't exist as a property on the params\n    // object. Use a Proxy to track all param access — both existing params\n    // and the missing optional param — including enumeration patterns like\n    // Object.keys(), spread, for...in, and `in` checks.\n    return new Proxy(originalParamsObject, {\n      get(target, prop, receiver) {\n        if (typeof prop === 'string') {\n          if (\n            prop === optionalCatchAllParamName ||\n            Object.prototype.hasOwnProperty.call(target, prop)\n          ) {\n            accumulateVaryParam(accumulator, prop)\n          }\n        }\n        return Reflect.get(target, prop, receiver)\n      },\n      has(target, prop) {\n        if (prop === optionalCatchAllParamName) {\n          accumulateVaryParam(accumulator, optionalCatchAllParamName)\n        }\n        return Reflect.has(target, prop)\n      },\n      ownKeys(target) {\n        // Enumerating the params object means the user's code may depend on\n        // which params are present, so conservatively track the optional\n        // param as accessed.\n        accumulateVaryParam(accumulator, optionalCatchAllParamName)\n        return Reflect.ownKeys(target)\n      },\n    })\n  }\n\n  // When there's no optional catch-all, all params exist as properties on the\n  // object, so we can use defineProperty getters instead of a Proxy. This is\n  // faster because the engine can optimize property access on regular objects\n  // more aggressively than Proxy trap calls.\n  const underlyingParamsWithVarying: Params = {}\n  for (const paramName in originalParamsObject) {\n    Object.defineProperty(underlyingParamsWithVarying, paramName, {\n      get() {\n        accumulateVaryParam(accumulator, paramName)\n        return originalParamsObject[paramName]\n      },\n      enumerable: true,\n    })\n  }\n  return underlyingParamsWithVarying\n}\n\nexport function createVaryingSearchParams(\n  accumulator: VaryParamsAccumulator,\n  originalSearchParamsObject: SearchParams\n): SearchParams {\n  const underlyingSearchParamsWithVarying: SearchParams = {}\n  for (const searchParamName in originalSearchParamsObject) {\n    Object.defineProperty(underlyingSearchParamsWithVarying, searchParamName, {\n      get() {\n        // TODO: Unlike path params, we don't vary track each search param\n        // individually. The entire search string is treated as a single param.\n        // This may change in the future.\n        accumulateVaryParam(accumulator, '?')\n        return originalSearchParamsObject[searchParamName]\n      },\n      enumerable: true,\n    })\n  }\n  return underlyingSearchParamsWithVarying\n}\n\n/**\n * Resolves all segment accumulators in a ResponseVaryParamsAccumulator with\n * their final vary params. Call this after rendering is complete.\n *\n * Each segment's thenable is resolved with its vary params merged with the\n * root params. If we can't track vary params (e.g., legacy prerender), simply\n * don't call this function - the client treats unresolved thenables as\n * \"unknown\" vary params.\n */\nexport async function finishAccumulatingVaryParams(\n  responseAccumulator: ResponseVaryParamsAccumulator\n): Promise<void> {\n  const rootVaryParams = responseAccumulator.rootParams.varyParams\n\n  // Resolve head\n  finishSegmentAccumulator(responseAccumulator.head, rootVaryParams)\n\n  // Resolve each segment\n  for (const segmentAccumulator of responseAccumulator.segments) {\n    finishSegmentAccumulator(segmentAccumulator, rootVaryParams)\n  }\n\n  // Now that the thenables are resolved, Flight should be able to flush the\n  // vary params into the response stream. This work gets scheduled internally\n  // by Flight using a microtask as soon as we notify the thenable listeners.\n  //\n  // We need to ensure that Flight's pending queues are emptied before this\n  // function returns; the caller will abort the prerender immediately after.\n  // We can't use a macrotask, because that would allow dynamic IO to sneak\n  // into the response. So we use microtasks instead.\n  //\n  // The exact number of awaits here isn't important (indeed, one seems to be\n  // sufficient, at the time of writing), as long as we wait enough ticks for\n  // Flight to finish writing the response.\n  //\n  // Anything that remains in Flight's internal queue after these awaits must\n  // be actual dynamic IO, not caused by pending vary params tasks. In other\n  // words, failing to do this would cause us to treat a fully static prerender\n  // as if it were partially dynamic.\n  await Promise.resolve()\n  await Promise.resolve()\n  await Promise.resolve()\n}\n\nfunction finishSegmentAccumulator(\n  accumulator: VaryParamsAccumulator,\n  rootVaryParams: VaryParams\n): void {\n  if (accumulator.status !== 'pending') {\n    return\n  }\n  const merged = new Set<string>(accumulator.varyParams)\n  for (const param of rootVaryParams) {\n    merged.add(param)\n  }\n  accumulator.value = merged\n  accumulator.status = 'fulfilled'\n  for (const resolver of accumulator.resolvers) {\n    resolver(merged)\n  }\n  accumulator.resolvers = []\n}\n","import type { ComponentType } from 'react'\nimport type {\n  CacheNodeSeedData,\n  LoadingModuleData,\n} from '../../shared/lib/app-router-types'\nimport type { PreloadCallbacks } from './types'\nimport {\n  isClientReference,\n  isUseCacheFunction,\n} from '../../lib/client-and-server-references'\nimport { getLayoutOrPageModule } from '../lib/app-dir-module'\nimport type { LoaderTree } from '../lib/app-dir-module'\nimport { interopDefault } from './interop-default'\nimport { parseLoaderTree } from '../../shared/lib/router/utils/parse-loader-tree'\nimport type { AppRenderContext, GetDynamicParamFromSegment } from './app-render'\nimport { createComponentStylesAndScripts } from './create-component-styles-and-scripts'\nimport { getLayerAssets } from './get-layer-assets'\nimport { hasLoadingComponentInTree } from './has-loading-component-in-tree'\nimport { validateRevalidate } from '../lib/patch-fetch'\nimport { PARALLEL_ROUTE_DEFAULT_PATH } from '../../client/components/builtin/default'\nimport { getTracer } from '../lib/trace/tracer'\nimport { NextNodeServerSpan } from '../lib/trace/constants'\nimport { StaticGenBailoutError } from '../../client/components/static-generation-bailout'\nimport type { Params } from '../request/params'\nimport { workUnitAsyncStorage } from './work-unit-async-storage.external'\nimport {\n  createVaryParamsAccumulator,\n  emptyVaryParamsAccumulator,\n  getVaryParamsThenable,\n  type VaryParamsAccumulator,\n} from './vary-params'\nimport type {\n  UseCacheLayoutProps,\n  UseCachePageProps,\n} from '../use-cache/use-cache-wrapper'\nimport { DEFAULT_SEGMENT_KEY } from '../../shared/lib/segment'\nimport {\n  BOUNDARY_PREFIX,\n  BOUNDARY_SUFFIX,\n  BUILTIN_PREFIX,\n  getConventionPathByType,\n  isNextjsBuiltinFilePath,\n} from './segment-explorer-path'\nimport type { AppSegmentConfig } from '../../build/segment-config/app/app-segment-config'\nimport { RenderStage, type StagedRenderingController } from './staged-rendering'\n\n/**\n * Use the provided loader tree to create the React Component tree.\n */\n// TODO convert these arguments to non-object form. the entrypoint doesn't need most of them\nexport function createComponentTree(props: {\n  loaderTree: LoaderTree\n  parentParams: Params\n  parentOptionalCatchAllParamName: string | null\n  parentRuntimePrefetchable: false\n  rootLayoutIncluded: boolean\n  injectedCSS: Set<string>\n  injectedJS: Set<string>\n  injectedFontPreloadTags: Set<string>\n  ctx: AppRenderContext\n  missingSlots?: Set<string>\n  preloadCallbacks: PreloadCallbacks\n  authInterrupts: boolean\n  MetadataOutlet: ComponentType\n}): Promise<CacheNodeSeedData> {\n  return getTracer().trace(\n    NextNodeServerSpan.createComponentTree,\n    {\n      spanName: 'build component tree',\n    },\n    () => createComponentTreeInternal(props, true)\n  )\n}\n\nfunction errorMissingDefaultExport(\n  pagePath: string,\n  convention: string\n): never {\n  const normalizedPagePath = pagePath === '/' ? '' : pagePath\n  throw new Error(\n    `The default export is not a React Component in \"${normalizedPagePath}/${convention}\"`\n  )\n}\n\nconst cacheNodeKey = 'c'\n\nasync function createComponentTreeInternal(\n  {\n    loaderTree: tree,\n    parentParams,\n    parentOptionalCatchAllParamName,\n    parentRuntimePrefetchable,\n    rootLayoutIncluded,\n    injectedCSS,\n    injectedJS,\n    injectedFontPreloadTags,\n    ctx,\n    missingSlots,\n    preloadCallbacks,\n    authInterrupts,\n    MetadataOutlet,\n  }: {\n    loaderTree: LoaderTree\n    parentParams: Params\n    parentOptionalCatchAllParamName: string | null\n    parentRuntimePrefetchable: boolean\n    rootLayoutIncluded: boolean\n    injectedCSS: Set<string>\n    injectedJS: Set<string>\n    injectedFontPreloadTags: Set<string>\n    ctx: AppRenderContext\n    missingSlots?: Set<string>\n    preloadCallbacks: PreloadCallbacks\n    authInterrupts: boolean\n    MetadataOutlet: ComponentType | null\n  },\n  isRoot: boolean\n): Promise<CacheNodeSeedData> {\n  const {\n    renderOpts: { nextConfigOutput, experimental, cacheComponents },\n    workStore,\n    componentMod: {\n      createElement,\n      Fragment,\n      SegmentViewNode,\n      HTTPAccessFallbackBoundary,\n      LayoutRouter,\n      RenderFromTemplateContext,\n      ClientPageRoot,\n      ClientSegmentRoot,\n      createServerSearchParamsForServerPage,\n      createPrerenderSearchParamsForClientPage,\n      createServerParamsForServerSegment,\n      createPrerenderParamsForClientSegment,\n      serverHooks: { DynamicServerError },\n      Postpone,\n    },\n    pagePath,\n    getDynamicParamFromSegment,\n    isPrefetch,\n    query,\n  } = ctx\n\n  const { page, conventionPath, segment, modules, parallelRoutes } =\n    parseLoaderTree(tree)\n\n  const {\n    layout,\n    template,\n    error,\n    loading,\n    'not-found': notFound,\n    forbidden,\n    unauthorized,\n  } = modules\n\n  const injectedCSSWithCurrentLayout = new Set(injectedCSS)\n  const injectedJSWithCurrentLayout = new Set(injectedJS)\n  const injectedFontPreloadTagsWithCurrentLayout = new Set(\n    injectedFontPreloadTags\n  )\n\n  const layerAssets = getLayerAssets({\n    preloadCallbacks,\n    ctx,\n    layoutOrPagePath: conventionPath,\n    injectedCSS: injectedCSSWithCurrentLayout,\n    injectedJS: injectedJSWithCurrentLayout,\n    injectedFontPreloadTags: injectedFontPreloadTagsWithCurrentLayout,\n  })\n\n  const [Template, templateStyles, templateScripts] = template\n    ? await createComponentStylesAndScripts({\n        ctx,\n        filePath: template[1],\n        getComponent: template[0],\n        injectedCSS: injectedCSSWithCurrentLayout,\n        injectedJS: injectedJSWithCurrentLayout,\n      })\n    : [Fragment]\n\n  const [ErrorComponent, errorStyles, errorScripts] = error\n    ? await createComponentStylesAndScripts({\n        ctx,\n        filePath: error[1],\n        getComponent: error[0],\n        injectedCSS: injectedCSSWithCurrentLayout,\n        injectedJS: injectedJSWithCurrentLayout,\n      })\n    : []\n\n  const [Loading, loadingStyles, loadingScripts] = loading\n    ? await createComponentStylesAndScripts({\n        ctx,\n        filePath: loading[1],\n        getComponent: loading[0],\n        injectedCSS: injectedCSSWithCurrentLayout,\n        injectedJS: injectedJSWithCurrentLayout,\n      })\n    : []\n\n  const isLayout = typeof layout !== 'undefined'\n  const isPage = typeof page !== 'undefined'\n  const { mod: layoutOrPageMod, modType } = await getTracer().trace(\n    NextNodeServerSpan.getLayoutOrPageModule,\n    {\n      hideSpan: !(isLayout || isPage),\n      spanName: 'resolve segment modules',\n      attributes: {\n        'next.segment': segment,\n      },\n    },\n    () => getLayoutOrPageModule(tree)\n  )\n\n  /**\n   * Checks if the current segment is a root layout.\n   */\n  const rootLayoutAtThisLevel = isLayout && !rootLayoutIncluded\n  /**\n   * Checks if the current segment or any level above it has a root layout.\n   */\n  const rootLayoutIncludedAtThisLevelOrAbove =\n    rootLayoutIncluded || rootLayoutAtThisLevel\n\n  const [NotFound, notFoundStyles] = notFound\n    ? await createComponentStylesAndScripts({\n        ctx,\n        filePath: notFound[1],\n        getComponent: notFound[0],\n        injectedCSS: injectedCSSWithCurrentLayout,\n        injectedJS: injectedJSWithCurrentLayout,\n      })\n    : []\n\n  const instantConfig = layoutOrPageMod\n    ? (layoutOrPageMod as AppSegmentConfig).unstable_instant\n    : undefined\n  const hasRuntimePrefetch =\n    instantConfig && typeof instantConfig === 'object'\n      ? instantConfig.prefetch === 'runtime'\n      : false\n  const isRuntimePrefetchable = hasRuntimePrefetch || parentRuntimePrefetchable\n\n  const [Forbidden, forbiddenStyles] =\n    authInterrupts && forbidden\n      ? await createComponentStylesAndScripts({\n          ctx,\n          filePath: forbidden[1],\n          getComponent: forbidden[0],\n          injectedCSS: injectedCSSWithCurrentLayout,\n          injectedJS: injectedJSWithCurrentLayout,\n        })\n      : []\n\n  const [Unauthorized, unauthorizedStyles] =\n    authInterrupts && unauthorized\n      ? await createComponentStylesAndScripts({\n          ctx,\n          filePath: unauthorized[1],\n          getComponent: unauthorized[0],\n          injectedCSS: injectedCSSWithCurrentLayout,\n          injectedJS: injectedJSWithCurrentLayout,\n        })\n      : []\n\n  let dynamic = layoutOrPageMod?.dynamic\n\n  if (nextConfigOutput === 'export') {\n    if (!dynamic || dynamic === 'auto') {\n      dynamic = 'error'\n    } else if (dynamic === 'force-dynamic') {\n      // force-dynamic is always incompatible with 'export'. We must interrupt the build\n      throw new StaticGenBailoutError(\n        `Page with \\`dynamic = \"force-dynamic\"\\` couldn't be exported. \\`output: \"export\"\\` requires all pages be renderable statically because there is no runtime server to dynamically render routes in this output format. Learn more: https://nextjs.org/docs/app/building-your-application/deploying/static-exports`\n      )\n    }\n  }\n\n  if (typeof dynamic === 'string') {\n    // the nested most config wins so we only force-static\n    // if it's configured above any parent that configured\n    // otherwise\n    if (dynamic === 'error') {\n      workStore.dynamicShouldError = true\n    } else if (dynamic === 'force-dynamic') {\n      workStore.forceDynamic = true\n\n      // TODO: (PPR) remove this bailout once PPR is the default\n      if (workStore.isStaticGeneration && !experimental.isRoutePPREnabled) {\n        // If the postpone API isn't available, we can't postpone the render and\n        // therefore we can't use the dynamic API.\n        const err = new DynamicServerError(\n          `Page with \\`dynamic = \"force-dynamic\"\\` won't be rendered statically.`\n        )\n        workStore.dynamicUsageDescription = err.message\n        workStore.dynamicUsageStack = err.stack\n        throw err\n      }\n    } else {\n      workStore.dynamicShouldError = false\n      workStore.forceStatic = dynamic === 'force-static'\n    }\n  }\n\n  if (typeof layoutOrPageMod?.fetchCache === 'string') {\n    workStore.fetchCache = layoutOrPageMod?.fetchCache\n  }\n\n  if (typeof layoutOrPageMod?.revalidate !== 'undefined') {\n    validateRevalidate(layoutOrPageMod?.revalidate, workStore.route)\n  }\n\n  if (typeof layoutOrPageMod?.revalidate === 'number') {\n    const defaultRevalidate = layoutOrPageMod.revalidate as number\n\n    const workUnitStore = workUnitAsyncStorage.getStore()\n\n    if (workUnitStore) {\n      switch (workUnitStore.type) {\n        case 'prerender':\n        case 'prerender-runtime':\n        case 'prerender-legacy':\n        case 'prerender-ppr':\n          if (workUnitStore.revalidate > defaultRevalidate) {\n            workUnitStore.revalidate = defaultRevalidate\n          }\n          break\n        case 'request':\n          // A request store doesn't have a revalidate property.\n          break\n        // createComponentTree is not called for these stores:\n        case 'cache':\n        case 'private-cache':\n        case 'prerender-client':\n        case 'validation-client':\n        case 'unstable-cache':\n        case 'generate-static-params':\n          break\n        default:\n          workUnitStore satisfies never\n      }\n    }\n\n    if (\n      !workStore.forceStatic &&\n      workStore.isStaticGeneration &&\n      defaultRevalidate === 0 &&\n      // If the postpone API isn't available, we can't postpone the render and\n      // therefore we can't use the dynamic API.\n      !experimental.isRoutePPREnabled\n    ) {\n      const dynamicUsageDescription = `revalidate: 0 configured ${segment}`\n      workStore.dynamicUsageDescription = dynamicUsageDescription\n\n      throw new DynamicServerError(dynamicUsageDescription)\n    }\n  }\n\n  // Read unstable_dynamicStaleTime from page modules (not layouts) and track it on\n  // the store's stale field. This affects the segment cache stale time via\n  // the StaleTimeIterable.\n  if (\n    isPage &&\n    typeof layoutOrPageMod?.unstable_dynamicStaleTime === 'number'\n  ) {\n    const pageStaleTime = layoutOrPageMod.unstable_dynamicStaleTime\n    const workUnitStore = workUnitAsyncStorage.getStore()\n\n    if (workUnitStore) {\n      switch (workUnitStore.type) {\n        case 'prerender':\n        case 'prerender-runtime':\n        case 'prerender-legacy':\n        case 'prerender-ppr':\n          if (workUnitStore.stale > pageStaleTime) {\n            workUnitStore.stale = pageStaleTime\n          }\n          break\n        case 'request':\n          if (\n            workUnitStore.stale === undefined ||\n            workUnitStore.stale > pageStaleTime\n          ) {\n            workUnitStore.stale = pageStaleTime\n          }\n          break\n        // createComponentTree is not called for these stores:\n        case 'cache':\n        case 'private-cache':\n        case 'prerender-client':\n        case 'validation-client':\n        case 'unstable-cache':\n        case 'generate-static-params':\n          break\n        default:\n          workUnitStore satisfies never\n      }\n    }\n  }\n\n  const isStaticGeneration = workStore.isStaticGeneration\n\n  // Assume the segment we're rendering contains only partial data if PPR is\n  // enabled and this is a statically generated response. This is used by the\n  // client Segment Cache after a prefetch to determine if it can skip the\n  // second request to fill in the dynamic data.\n  //\n  // It's OK for this to be `true` when the data is actually fully static, but\n  // it's not OK for this to be `false` when the data possibly contains holes.\n  // Although the value here is overly pessimistic, for prefetches, it will be\n  // replaced by a more specific value when the data is later processed into\n  // per-segment responses (see collect-segment-data.tsx)\n  //\n  // For dynamic requests, this must always be `false` because dynamic responses\n  // are never partial.\n  const isPossiblyPartialResponse =\n    isStaticGeneration && experimental.isRoutePPREnabled === true\n\n  const LayoutOrPage: ComponentType<any> | undefined = layoutOrPageMod\n    ? interopDefault(layoutOrPageMod)\n    : undefined\n\n  /**\n   * The React Component to render.\n   */\n  let MaybeComponent = LayoutOrPage\n\n  if (process.env.NODE_ENV === 'development' || isStaticGeneration) {\n    const { isValidElementType } =\n      require('next/dist/compiled/react-is') as typeof import('next/dist/compiled/react-is')\n    if (\n      typeof MaybeComponent !== 'undefined' &&\n      !isValidElementType(MaybeComponent)\n    ) {\n      errorMissingDefaultExport(pagePath, modType ?? 'page')\n    }\n\n    if (\n      typeof ErrorComponent !== 'undefined' &&\n      !isValidElementType(ErrorComponent)\n    ) {\n      errorMissingDefaultExport(pagePath, 'error')\n    }\n\n    if (typeof Loading !== 'undefined' && !isValidElementType(Loading)) {\n      errorMissingDefaultExport(pagePath, 'loading')\n    }\n\n    if (typeof NotFound !== 'undefined' && !isValidElementType(NotFound)) {\n      errorMissingDefaultExport(pagePath, 'not-found')\n    }\n\n    if (typeof Forbidden !== 'undefined' && !isValidElementType(Forbidden)) {\n      errorMissingDefaultExport(pagePath, 'forbidden')\n    }\n\n    if (\n      typeof Unauthorized !== 'undefined' &&\n      !isValidElementType(Unauthorized)\n    ) {\n      errorMissingDefaultExport(pagePath, 'unauthorized')\n    }\n  }\n\n  // Handle dynamic segment params.\n  const segmentParam = getDynamicParamFromSegment(tree)\n\n  // Create object holding the parent params and current params\n  let currentParams: Params = parentParams\n  if (segmentParam && segmentParam.value !== null) {\n    currentParams = {\n      ...parentParams,\n      [segmentParam.param]: segmentParam.value,\n    }\n  }\n\n  // Track optional catch-all params with no value (e.g., [[...slug]] at /).\n  // These params won't exist as properties on the params object, so vary\n  // params tracking needs to use a Proxy to detect access. We propagate this\n  // through the tree so that child segments (like __PAGE__) also know about\n  // the missing param. In practice, this only gets passed down one level —\n  // from the optional catch-all layout segment to the page segment — so it's\n  // always very close to the leaf of the tree.\n  const optionalCatchAllParamName: string | null =\n    segmentParam?.type === 'oc' && segmentParam.value === null\n      ? segmentParam.param\n      : parentOptionalCatchAllParamName\n\n  // Resolve the segment param\n  const isSegmentViewEnabled = !!process.env.__NEXT_DEV_SERVER\n  const dir =\n    (process.env.NEXT_RUNTIME === 'edge'\n      ? process.env.__NEXT_EDGE_PROJECT_DIR\n      : ctx.renderOpts.dir) || ''\n\n  const [notFoundElement, notFoundFilePath] =\n    await createBoundaryConventionElement({\n      ctx,\n      conventionName: 'not-found',\n      Component: NotFound,\n      styles: notFoundStyles,\n      tree,\n    })\n\n  const [forbiddenElement] = await createBoundaryConventionElement({\n    ctx,\n    conventionName: 'forbidden',\n    Component: Forbidden,\n    styles: forbiddenStyles,\n    tree,\n  })\n\n  const [unauthorizedElement] = await createBoundaryConventionElement({\n    ctx,\n    conventionName: 'unauthorized',\n    Component: Unauthorized,\n    styles: unauthorizedStyles,\n    tree,\n  })\n\n  // TODO: Combine this `map` traversal with the loop below that turns the array\n  // into an object.\n  const parallelRouteMap = await Promise.all(\n    Object.keys(parallelRoutes).map(\n      async (\n        parallelRouteKey\n      ): Promise<[string, React.ReactNode, CacheNodeSeedData | null]> => {\n        const isChildrenRouteKey = parallelRouteKey === 'children'\n        const parallelRoute = parallelRoutes[parallelRouteKey]\n\n        const notFoundComponent = isChildrenRouteKey\n          ? notFoundElement\n          : undefined\n\n        const forbiddenComponent = isChildrenRouteKey\n          ? forbiddenElement\n          : undefined\n\n        const unauthorizedComponent = isChildrenRouteKey\n          ? unauthorizedElement\n          : undefined\n\n        // if we're prefetching and that there's a Loading component, we bail out\n        // otherwise we keep rendering for the prefetch.\n        // We also want to bail out if there's no Loading component in the tree.\n        let childCacheNodeSeedData: CacheNodeSeedData | null = null\n\n        if (\n          // Before PPR, the way instant navigations work in Next.js is we\n          // prefetch everything up to the first route segment that defines a\n          // loading.tsx boundary. (We do the same if there's no loading\n          // boundary in the entire tree, because we don't want to prefetch too\n          // much) The rest of the tree is deferred until the actual navigation.\n          // It does not take into account whether the data is dynamic — even if\n          // the tree is completely static, it will still defer everything\n          // inside the loading boundary.\n          //\n          // This behavior predates PPR and is only relevant if the\n          // PPR flag is not enabled.\n          isPrefetch &&\n          (Loading || !hasLoadingComponentInTree(parallelRoute)) &&\n          // The approach with PPR is different — loading.tsx behaves like a\n          // regular Suspense boundary and has no special behavior.\n          //\n          // With PPR, we prefetch as deeply as possible, and only defer when\n          // dynamic data is accessed. If so, we only defer the nearest parent\n          // Suspense boundary of the dynamic data access, regardless of whether\n          // the boundary is defined by loading.tsx or a normal <Suspense>\n          // component in userspace.\n          //\n          // NOTE: In practice this usually means we'll end up prefetching more\n          // than we were before PPR, which may or may not be considered a\n          // performance regression by some apps. The plan is to address this\n          // before General Availability of PPR by introducing granular\n          // per-segment fetching, so we can reuse as much of the tree as\n          // possible during both prefetches and dynamic navigations. But during\n          // the beta period, we should be clear about this trade off in our\n          // communications.\n          !experimental.isRoutePPREnabled\n        ) {\n          // Don't prefetch this child. This will trigger a lazy fetch by the\n          // client router.\n        } else {\n          // Create the child component\n\n          if (process.env.NODE_ENV === 'development' && missingSlots) {\n            // When we detect the default fallback (which triggers a 404), we collect the missing slots\n            // to provide more helpful debug information during development mode.\n            const parsedTree = parseLoaderTree(parallelRoute)\n            if (\n              parsedTree.conventionPath?.endsWith(PARALLEL_ROUTE_DEFAULT_PATH)\n            ) {\n              missingSlots.add(parallelRouteKey)\n            }\n          }\n\n          const seedData = await createComponentTreeInternal(\n            {\n              loaderTree: parallelRoute,\n              parentParams: currentParams,\n              parentOptionalCatchAllParamName: optionalCatchAllParamName,\n              parentRuntimePrefetchable: isRuntimePrefetchable,\n              rootLayoutIncluded: rootLayoutIncludedAtThisLevelOrAbove,\n              injectedCSS: injectedCSSWithCurrentLayout,\n              injectedJS: injectedJSWithCurrentLayout,\n              injectedFontPreloadTags: injectedFontPreloadTagsWithCurrentLayout,\n              ctx,\n              missingSlots,\n              preloadCallbacks,\n              authInterrupts,\n              // `StreamingMetadataOutlet` is used to conditionally throw. In the case of parallel routes we will have more than one page\n              // but we only want to throw on the first one.\n              MetadataOutlet: isChildrenRouteKey ? MetadataOutlet : null,\n            },\n            false\n          )\n\n          childCacheNodeSeedData = seedData\n        }\n\n        const templateNode = createElement(\n          Template,\n          null,\n          createElement(RenderFromTemplateContext, null)\n        )\n\n        const templateFilePath = getConventionPathByType(tree, dir, 'template')\n        const errorFilePath = getConventionPathByType(tree, dir, 'error')\n        const loadingFilePath = getConventionPathByType(tree, dir, 'loading')\n        const globalErrorFilePath = isRoot\n          ? getConventionPathByType(tree, dir, 'global-error')\n          : undefined\n\n        const wrappedErrorStyles =\n          isSegmentViewEnabled && errorFilePath\n            ? createElement(\n                SegmentViewNode,\n                {\n                  type: 'error',\n                  pagePath: errorFilePath,\n                },\n                errorStyles\n              )\n            : errorStyles\n\n        // Add a suffix to avoid conflict with the segment view node representing rendered file.\n        // existence: not-found.tsx@boundary\n        // rendered: not-found.tsx\n        const fileNameSuffix = BOUNDARY_SUFFIX\n        const segmentViewBoundaries = isSegmentViewEnabled\n          ? createElement(\n              Fragment,\n              null,\n              notFoundFilePath &&\n                createElement(SegmentViewNode, {\n                  type: `${BOUNDARY_PREFIX}not-found`,\n                  pagePath: notFoundFilePath + fileNameSuffix,\n                }),\n              loadingFilePath &&\n                createElement(SegmentViewNode, {\n                  type: `${BOUNDARY_PREFIX}loading`,\n                  pagePath: loadingFilePath + fileNameSuffix,\n                }),\n              errorFilePath &&\n                createElement(SegmentViewNode, {\n                  type: `${BOUNDARY_PREFIX}error`,\n                  pagePath: errorFilePath + fileNameSuffix,\n                }),\n              globalErrorFilePath &&\n                createElement(SegmentViewNode, {\n                  type: `${BOUNDARY_PREFIX}global-error`,\n                  pagePath: isNextjsBuiltinFilePath(globalErrorFilePath)\n                    ? `${BUILTIN_PREFIX}global-error.js${fileNameSuffix}`\n                    : globalErrorFilePath,\n                })\n            )\n          : null\n\n        return [\n          parallelRouteKey,\n          createElement(LayoutRouter, {\n            parallelRouterKey: parallelRouteKey,\n            error: ErrorComponent,\n            errorStyles: wrappedErrorStyles,\n            errorScripts: errorScripts,\n            template:\n              isSegmentViewEnabled && templateFilePath\n                ? createElement(\n                    SegmentViewNode,\n                    {\n                      type: 'template',\n                      pagePath: templateFilePath,\n                    },\n                    templateNode\n                  )\n                : templateNode,\n            templateStyles: templateStyles,\n            templateScripts: templateScripts,\n            notFound: notFoundComponent,\n            forbidden: forbiddenComponent,\n            unauthorized: unauthorizedComponent,\n            ...(isSegmentViewEnabled && {\n              segmentViewBoundaries,\n            }),\n          }),\n          childCacheNodeSeedData,\n        ]\n      }\n    )\n  )\n\n  // Convert the parallel route map into an object after all promises have been resolved.\n  let parallelRouteProps: { [key: string]: React.ReactNode } = {}\n  let parallelRouteCacheNodeSeedData: {\n    [key: string]: CacheNodeSeedData | null\n  } = {}\n  for (const parallelRoute of parallelRouteMap) {\n    const [parallelRouteKey, parallelRouteProp, flightData] = parallelRoute\n    parallelRouteProps[parallelRouteKey] = parallelRouteProp\n    parallelRouteCacheNodeSeedData[parallelRouteKey] = flightData\n  }\n\n  let loadingElement = Loading\n    ? createElement(Loading, {\n        key: 'l',\n      })\n    : null\n  const loadingFilePath = getConventionPathByType(tree, dir, 'loading')\n  if (isSegmentViewEnabled && loadingElement) {\n    if (loadingFilePath) {\n      loadingElement = createElement(\n        SegmentViewNode,\n        {\n          key: cacheNodeKey + '-loading',\n          type: 'loading',\n          pagePath: loadingFilePath,\n        },\n        loadingElement\n      )\n    }\n  }\n\n  const loadingData: LoadingModuleData = loadingElement\n    ? [loadingElement, loadingStyles, loadingScripts]\n    : null\n\n  // When the segment does not have a layout or page we still have to add the layout router to ensure the path holds the loading component\n  if (!MaybeComponent) {\n    return createSeedData(\n      ctx,\n      createElement(\n        Fragment,\n        {\n          key: cacheNodeKey,\n        },\n        layerAssets,\n        parallelRouteProps.children\n      ),\n      parallelRouteCacheNodeSeedData,\n      loadingData,\n      isPossiblyPartialResponse,\n      isRuntimePrefetchable,\n\n      // No user-provided component, so no params will be accessed. Use the\n      // pre-resolved empty tracker.\n      emptyVaryParamsAccumulator\n    )\n  }\n\n  const Component = MaybeComponent\n  // If force-dynamic is used and the current render supports postponing, we\n  // replace it with a node that will postpone the render. This ensures that the\n  // postpone is invoked during the react render phase and not during the next\n  // render phase.\n  // @TODO this does not actually do what it seems like it would or should do. The idea is that\n  // if we are rendering in a force-dynamic mode and we can postpone we should only make the segments\n  // that ask for force-dynamic to be dynamic, allowing other segments to still prerender. However\n  // because this comes after the children traversal and the static generation store is mutated every segment\n  // along the parent path of a force-dynamic segment will hit this condition effectively making the entire\n  // render force-dynamic. We should refactor this function so that we can correctly track which segments\n  // need to be dynamic\n  if (\n    workStore.isStaticGeneration &&\n    workStore.forceDynamic &&\n    experimental.isRoutePPREnabled\n  ) {\n    return createSeedData(\n      ctx,\n      createElement(\n        Fragment,\n        {\n          key: cacheNodeKey,\n        },\n        createElement(Postpone, {\n          reason: 'dynamic = \"force-dynamic\" was used',\n          route: workStore.route,\n        }),\n        layerAssets\n      ),\n      parallelRouteCacheNodeSeedData,\n      loadingData,\n      true,\n      isRuntimePrefetchable,\n\n      // force-dynamic postpones without rendering the component, so no params\n      // are accessed. The vary params are empty.\n      emptyVaryParamsAccumulator\n    )\n  }\n\n  const isClientComponent = isClientReference(layoutOrPageMod)\n\n  const varyParamsAccumulator =\n    isClientComponent && cacheComponents\n      ? // Client components with Cache Components enabled don't receive params\n        // from the server, so they have an empty vary params set.\n        emptyVaryParamsAccumulator\n      : createVaryParamsAccumulator()\n\n  if (\n    process.env.NODE_ENV === 'development' &&\n    'params' in parallelRouteProps\n  ) {\n    // @TODO consider making this an error and running the check in build as well\n    console.error(\n      `\"params\" is a reserved prop in Layouts and Pages and cannot be used as the name of a parallel route in ${segment}`\n    )\n  }\n\n  if (isPage) {\n    const PageComponent = Component\n\n    // Assign searchParams to props if this is a page\n    let pageElement: React.ReactNode\n    if (isClientComponent) {\n      if (cacheComponents) {\n        // Params are omitted when Cache Components is enabled\n        pageElement = createElement(ClientPageRoot, {\n          Component: PageComponent,\n          serverProvidedParams: null,\n        })\n      } else if (isStaticGeneration) {\n        const promiseOfParams =\n          createPrerenderParamsForClientSegment(currentParams)\n        const promiseOfSearchParams = createPrerenderSearchParamsForClientPage()\n        pageElement = createElement(ClientPageRoot, {\n          Component: PageComponent,\n          serverProvidedParams: {\n            searchParams: query,\n            params: currentParams,\n            promises: [promiseOfSearchParams, promiseOfParams],\n          },\n        })\n      } else {\n        pageElement = createElement(ClientPageRoot, {\n          Component: PageComponent,\n          serverProvidedParams: {\n            searchParams: query,\n            params: currentParams,\n            promises: null,\n          },\n        })\n      }\n    } else {\n      // If we are passing params to a server component Page we need to track\n      // their usage in case the current render mode tracks dynamic API usage.\n      const params = createServerParamsForServerSegment(\n        currentParams,\n        optionalCatchAllParamName,\n        varyParamsAccumulator,\n        isRuntimePrefetchable\n      )\n\n      // If we are passing searchParams to a server component Page we need to\n      // track their usage in case the current render mode tracks dynamic API\n      // usage.\n      let searchParams = createServerSearchParamsForServerPage(\n        query,\n        varyParamsAccumulator,\n        isRuntimePrefetchable\n      )\n\n      if (isUseCacheFunction(PageComponent)) {\n        const UseCachePageComponent: ComponentType<UseCachePageProps> =\n          PageComponent\n\n        pageElement = createElement(UseCachePageComponent, {\n          params: params,\n          searchParams: searchParams,\n          $$isPage: true,\n        })\n      } else {\n        pageElement = createElement(PageComponent, {\n          params: params,\n          searchParams: searchParams,\n        })\n      }\n    }\n\n    const isDefaultSegment = segment === DEFAULT_SEGMENT_KEY\n    const pageFilePath =\n      getConventionPathByType(tree, dir, 'page') ??\n      getConventionPathByType(tree, dir, 'defaultPage')\n    const segmentType = isDefaultSegment ? 'default' : 'page'\n    const wrappedPageElement =\n      isSegmentViewEnabled && pageFilePath\n        ? createElement(\n            SegmentViewNode,\n            {\n              key: cacheNodeKey + '-' + segmentType,\n              type: segmentType,\n              pagePath: pageFilePath,\n            },\n            pageElement\n          )\n        : pageElement\n\n    return createSeedData(\n      ctx,\n      createElement(\n        Fragment,\n        {\n          key: cacheNodeKey,\n        },\n        wrappedPageElement,\n        layerAssets,\n        MetadataOutlet ? createElement(MetadataOutlet, null) : null\n      ),\n      parallelRouteCacheNodeSeedData,\n      loadingData,\n      isPossiblyPartialResponse,\n      isRuntimePrefetchable,\n\n      varyParamsAccumulator\n    )\n  } else {\n    const SegmentComponent = Component\n    const isRootLayoutWithChildrenSlotAndAtLeastOneMoreSlot =\n      rootLayoutAtThisLevel &&\n      'children' in parallelRoutes &&\n      Object.keys(parallelRoutes).length > 1\n\n    let segmentNode: React.ReactNode\n\n    if (isClientComponent) {\n      let clientSegment: React.ReactNode\n      if (cacheComponents) {\n        // Params are omitted when Cache Components is enabled\n        clientSegment = createElement(ClientSegmentRoot, {\n          Component: SegmentComponent,\n          slots: parallelRouteProps,\n          serverProvidedParams: null,\n        })\n      } else if (isStaticGeneration) {\n        const promiseOfParams =\n          createPrerenderParamsForClientSegment(currentParams)\n\n        clientSegment = createElement(ClientSegmentRoot, {\n          Component: SegmentComponent,\n          slots: parallelRouteProps,\n          serverProvidedParams: {\n            params: currentParams,\n            promises: [promiseOfParams],\n          },\n        })\n      } else {\n        clientSegment = createElement(ClientSegmentRoot, {\n          Component: SegmentComponent,\n          slots: parallelRouteProps,\n          serverProvidedParams: {\n            params: currentParams,\n            promises: null,\n          },\n        })\n      }\n\n      if (isRootLayoutWithChildrenSlotAndAtLeastOneMoreSlot) {\n        let notfoundClientSegment: React.ReactNode\n        let forbiddenClientSegment: React.ReactNode\n        let unauthorizedClientSegment: React.ReactNode\n        // TODO-APP: This is a hack to support unmatched parallel routes, which will throw `notFound()`.\n        // This ensures that a `HTTPAccessFallbackBoundary` is available for when that happens,\n        // but it's not ideal, as it needlessly invokes the `NotFound` component and renders the `RootLayout` twice.\n        // We should instead look into handling the fallback behavior differently in development mode so that it doesn't\n        // rely on the `NotFound` behavior.\n        notfoundClientSegment = createErrorBoundaryClientSegmentRoot({\n          ctx,\n          ErrorBoundaryComponent: NotFound,\n          errorElement: notFoundElement,\n          ClientSegmentRoot,\n          layerAssets,\n          SegmentComponent,\n          currentParams,\n        })\n        forbiddenClientSegment = createErrorBoundaryClientSegmentRoot({\n          ctx,\n          ErrorBoundaryComponent: Forbidden,\n          errorElement: forbiddenElement,\n          ClientSegmentRoot,\n          layerAssets,\n          SegmentComponent,\n          currentParams,\n        })\n        unauthorizedClientSegment = createErrorBoundaryClientSegmentRoot({\n          ctx,\n          ErrorBoundaryComponent: Unauthorized,\n          errorElement: unauthorizedElement,\n          ClientSegmentRoot,\n          layerAssets,\n          SegmentComponent,\n          currentParams,\n        })\n        if (\n          notfoundClientSegment ||\n          forbiddenClientSegment ||\n          unauthorizedClientSegment\n        ) {\n          segmentNode = createElement(\n            HTTPAccessFallbackBoundary,\n            {\n              key: cacheNodeKey,\n              notFound: notfoundClientSegment,\n              forbidden: forbiddenClientSegment,\n              unauthorized: unauthorizedClientSegment,\n            },\n            layerAssets,\n            clientSegment\n          )\n        } else {\n          segmentNode = createElement(\n            Fragment,\n            {\n              key: cacheNodeKey,\n            },\n            layerAssets,\n            clientSegment\n          )\n        }\n      } else {\n        segmentNode = createElement(\n          Fragment,\n          {\n            key: cacheNodeKey,\n          },\n          layerAssets,\n          clientSegment\n        )\n      }\n    } else {\n      const params = createServerParamsForServerSegment(\n        currentParams,\n        optionalCatchAllParamName,\n        varyParamsAccumulator,\n        isRuntimePrefetchable\n      )\n\n      let serverSegment: React.ReactNode\n\n      if (isUseCacheFunction(SegmentComponent)) {\n        const UseCacheLayoutComponent: ComponentType<UseCacheLayoutProps> =\n          SegmentComponent\n\n        serverSegment = createElement(\n          UseCacheLayoutComponent,\n          {\n            ...parallelRouteProps,\n            params: params,\n            $$isLayout: true,\n          },\n          // Force static children here so that they're validated.\n          // See https://github.com/facebook/react/pull/34846\n          parallelRouteProps.children\n        )\n      } else {\n        serverSegment = createElement(\n          SegmentComponent,\n          {\n            ...parallelRouteProps,\n            params: params,\n          },\n          // Force static children here so that they're validated.\n          // See https://github.com/facebook/react/pull/34846\n          parallelRouteProps.children\n        )\n      }\n\n      if (isRootLayoutWithChildrenSlotAndAtLeastOneMoreSlot) {\n        // TODO-APP: This is a hack to support unmatched parallel routes, which will throw `notFound()`.\n        // This ensures that a `HTTPAccessFallbackBoundary` is available for when that happens,\n        // but it's not ideal, as it needlessly invokes the `NotFound` component and renders the `RootLayout` twice.\n        // We should instead look into handling the fallback behavior differently in development mode so that it doesn't\n        // rely on the `NotFound` behavior.\n        segmentNode = createElement(\n          HTTPAccessFallbackBoundary,\n          {\n            key: cacheNodeKey,\n            notFound: notFoundElement\n              ? createElement(\n                  Fragment,\n                  null,\n                  layerAssets,\n                  createElement(\n                    SegmentComponent,\n                    {\n                      params: params,\n                    },\n                    notFoundStyles,\n                    notFoundElement\n                  )\n                )\n              : undefined,\n          },\n          layerAssets,\n          serverSegment\n        )\n      } else {\n        segmentNode = createElement(\n          Fragment,\n          {\n            key: cacheNodeKey,\n          },\n          layerAssets,\n          serverSegment\n        )\n      }\n    }\n\n    const layoutFilePath = getConventionPathByType(tree, dir, 'layout')\n    const wrappedSegmentNode =\n      isSegmentViewEnabled && layoutFilePath\n        ? createElement(\n            SegmentViewNode,\n            {\n              key: 'layout',\n              type: 'layout',\n              pagePath: layoutFilePath,\n            },\n            segmentNode\n          )\n        : segmentNode\n\n    // For layouts we just render the component\n    return createSeedData(\n      ctx,\n      wrappedSegmentNode,\n      parallelRouteCacheNodeSeedData,\n      loadingData,\n      isPossiblyPartialResponse,\n      isRuntimePrefetchable,\n\n      varyParamsAccumulator\n    )\n  }\n}\n\nfunction createErrorBoundaryClientSegmentRoot({\n  ctx,\n  ErrorBoundaryComponent,\n  errorElement,\n  ClientSegmentRoot,\n  layerAssets,\n  SegmentComponent,\n  currentParams,\n}: {\n  ctx: AppRenderContext\n  ErrorBoundaryComponent: ComponentType<any> | undefined\n  errorElement: React.ReactNode\n  ClientSegmentRoot: ComponentType<any>\n  layerAssets: React.ReactNode\n  SegmentComponent: ComponentType<any>\n  currentParams: Params\n}) {\n  const {\n    componentMod: { createElement, Fragment },\n  } = ctx\n  if (ErrorBoundaryComponent) {\n    const notFoundParallelRouteProps = {\n      children: errorElement,\n    }\n    return createElement(\n      Fragment,\n      null,\n      layerAssets,\n      createElement(ClientSegmentRoot, {\n        Component: SegmentComponent,\n        slots: notFoundParallelRouteProps,\n        params: currentParams,\n      })\n    )\n  }\n  return null\n}\n\nexport function getRootParams(\n  loaderTree: LoaderTree,\n  getDynamicParamFromSegment: GetDynamicParamFromSegment\n): Params {\n  return getRootParamsImpl({}, loaderTree, getDynamicParamFromSegment)\n}\n\nfunction getRootParamsImpl(\n  parentParams: Params,\n  loaderTree: LoaderTree,\n  getDynamicParamFromSegment: GetDynamicParamFromSegment\n): Params {\n  const {\n    modules: { layout },\n    parallelRoutes,\n  } = parseLoaderTree(loaderTree)\n\n  const segmentParam = getDynamicParamFromSegment(loaderTree)\n\n  let currentParams: Params = parentParams\n  if (segmentParam && segmentParam.value !== null) {\n    currentParams = {\n      ...parentParams,\n      [segmentParam.param]: segmentParam.value,\n    }\n  }\n\n  const isRootLayout = typeof layout !== 'undefined'\n\n  if (isRootLayout) {\n    return currentParams\n  } else if (!parallelRoutes.children) {\n    // This should really be an error but there are bugs in Turbopack that cause\n    // the _not-found LoaderTree to not have any layouts. For rootParams sake\n    // this is somewhat irrelevant when you are not customizing the 404 page.\n    // If you are customizing 404\n    // TODO update rootParams to make all params optional if `/app/not-found.tsx` is defined\n    return currentParams\n  } else {\n    return getRootParamsImpl(\n      currentParams,\n      // We stop looking for root params as soon as we hit the first layout\n      // and it is not possible to use parallel route children above the root layout\n      // so every parallelRoutes object that this function can visit will necessarily\n      // have a single `children` prop and no others.\n      parallelRoutes.children,\n      getDynamicParamFromSegment\n    )\n  }\n}\n\nasync function createBoundaryConventionElement({\n  ctx,\n  conventionName,\n  Component,\n  styles,\n  tree,\n}: {\n  ctx: AppRenderContext\n  conventionName:\n    | 'not-found'\n    | 'error'\n    | 'loading'\n    | 'forbidden'\n    | 'unauthorized'\n  Component: ComponentType<any> | undefined\n  styles: React.ReactNode | undefined\n  tree: LoaderTree\n}) {\n  const {\n    componentMod: { createElement, Fragment },\n  } = ctx\n  const isSegmentViewEnabled = !!process.env.__NEXT_DEV_SERVER\n  const dir =\n    (process.env.NEXT_RUNTIME === 'edge'\n      ? process.env.__NEXT_EDGE_PROJECT_DIR\n      : ctx.renderOpts.dir) || ''\n  const { SegmentViewNode } = ctx.componentMod\n  const element = Component\n    ? createElement(Fragment, null, createElement(Component, null), styles)\n    : undefined\n\n  const pagePath = getConventionPathByType(tree, dir, conventionName)\n\n  const wrappedElement =\n    isSegmentViewEnabled && element\n      ? createElement(\n          SegmentViewNode,\n          {\n            key: cacheNodeKey + '-' + conventionName,\n            type: conventionName,\n            // TODO: Discovered when moving to `createElement`.\n            // `SegmentViewNode` doesn't support undefined `pagePath`\n            pagePath: pagePath!,\n          },\n          element\n        )\n      : element\n\n  return [wrappedElement, pagePath] as const\n}\n\nfunction createSeedData(\n  ctx: AppRenderContext,\n  rsc: React.ReactNode,\n  parallelRoutes: Record<string, CacheNodeSeedData | null>,\n  loading: LoadingModuleData | null,\n  isPossiblyPartialResponse: boolean,\n  isRuntimePrefetchable: boolean,\n  varyParamsAccumulator: VaryParamsAccumulator | null\n): CacheNodeSeedData {\n  const createElement = ctx.componentMod.createElement\n\n  // When this segment is NOT runtime-prefetchable, delay it until the Static\n  // stage by wrapping the node in a promise. This allows runtime-prefetchable\n  // segments (the lower tree) to render first during EarlyStatic, so their\n  // runtime data resolves in EarlyRuntime where sync IO can be checked.\n  // React will suspend on the thenable and resume when the stage advances.\n  if (!isRuntimePrefetchable) {\n    const workUnitStore = workUnitAsyncStorage.getStore()\n    if (workUnitStore) {\n      let stagedRendering: StagedRenderingController | null | undefined\n      switch (workUnitStore.type) {\n        case 'request':\n        case 'prerender-runtime':\n          stagedRendering = workUnitStore.stagedRendering\n          if (stagedRendering) {\n            const deferredRsc = rsc\n            rsc = stagedRendering\n              .waitForStage(RenderStage.Static)\n              .then(() => deferredRsc)\n          }\n          break\n        case 'prerender':\n        case 'prerender-client':\n        case 'validation-client':\n        case 'prerender-ppr':\n        case 'prerender-legacy':\n        case 'cache':\n        case 'private-cache':\n        case 'unstable-cache':\n        case 'generate-static-params':\n          break\n        default:\n          workUnitStore satisfies never\n      }\n    }\n  }\n\n  if (loading !== null) {\n    // If a loading.tsx boundary is present, wrap the component data in an\n    // additional context provider to pass the loading data to the next\n    // set of children.\n    // NOTE: The reason this is a separate wrapper from LayoutRouter is because\n    // not all segments render a LayoutRouter component, e.g. the root segment.\n    const LoadingBoundaryProvider = ctx.componentMod.LoadingBoundaryProvider\n    rsc = createElement(LoadingBoundaryProvider, {\n      loading: loading,\n      children: rsc,\n    })\n  }\n  return [\n    rsc,\n    parallelRoutes,\n    null,\n    isPossiblyPartialResponse,\n    varyParamsAccumulator ? getVaryParamsThenable(varyParamsAccumulator) : null,\n  ]\n}\n","import { getLinkAndScriptTags } from './get-css-inlined-link-tags'\nimport { getPreloadableFonts } from './get-preloadable-fonts'\nimport type { AppRenderContext } from './app-render'\nimport { getAssetQueryString } from './get-asset-query-string'\nimport { encodeURIPath } from '../../shared/lib/encode-uri-path'\nimport type { PreloadCallbacks } from './types'\nimport { renderCssResource } from './render-css-resource'\n\nexport function getLayerAssets({\n  ctx,\n  layoutOrPagePath,\n  injectedCSS: injectedCSSWithCurrentLayout,\n  injectedJS: injectedJSWithCurrentLayout,\n  injectedFontPreloadTags: injectedFontPreloadTagsWithCurrentLayout,\n  preloadCallbacks,\n}: {\n  layoutOrPagePath: string | undefined\n  injectedCSS: Set<string>\n  injectedJS: Set<string>\n  injectedFontPreloadTags: Set<string>\n  ctx: AppRenderContext\n  preloadCallbacks: PreloadCallbacks\n}): React.ReactNode {\n  const {\n    componentMod: { createElement },\n  } = ctx\n  const { styles: styleTags, scripts: scriptTags } = layoutOrPagePath\n    ? getLinkAndScriptTags(\n        layoutOrPagePath,\n        injectedCSSWithCurrentLayout,\n        injectedJSWithCurrentLayout,\n        true\n      )\n    : { styles: [], scripts: [] }\n\n  const preloadedFontFiles = layoutOrPagePath\n    ? getPreloadableFonts(\n        ctx.renderOpts.nextFontManifest,\n        layoutOrPagePath,\n        injectedFontPreloadTagsWithCurrentLayout\n      )\n    : null\n\n  if (preloadedFontFiles) {\n    if (preloadedFontFiles.length) {\n      for (let i = 0; i < preloadedFontFiles.length; i++) {\n        const fontFilename = preloadedFontFiles[i]\n        const ext = /\\.(woff|woff2|eot|ttf|otf)$/.exec(fontFilename)![1]\n        const type = `font/${ext}`\n        const href = `${ctx.assetPrefix}/_next/${encodeURIPath(fontFilename)}${getAssetQueryString(ctx, true)}`\n\n        preloadCallbacks.push(() => {\n          ctx.componentMod.preloadFont(\n            href,\n            type,\n            ctx.renderOpts.crossOrigin,\n            ctx.nonce\n          )\n        })\n      }\n    } else {\n      try {\n        let url = new URL(ctx.assetPrefix)\n        preloadCallbacks.push(() => {\n          ctx.componentMod.preconnect(url.origin, 'anonymous', ctx.nonce)\n        })\n      } catch (error) {\n        // assetPrefix must not be a fully qualified domain name. We assume\n        // we should preconnect to same origin instead\n        preloadCallbacks.push(() => {\n          ctx.componentMod.preconnect('/', 'anonymous', ctx.nonce)\n        })\n      }\n    }\n  }\n\n  const styles = renderCssResource(styleTags, ctx, preloadCallbacks)\n\n  const scripts = scriptTags\n    ? scriptTags.map((href, index) => {\n        const fullSrc = `${ctx.assetPrefix}/_next/${encodeURIPath(\n          href\n        )}${getAssetQueryString(ctx, true)}`\n\n        return createElement('script', {\n          src: fullSrc,\n          async: true,\n          key: `script-${index}`,\n          nonce: ctx.nonce,\n        })\n      })\n    : []\n\n  return styles.length || scripts.length ? [...styles, ...scripts] : null\n}\n","import { notFound } from '../not-found'\n\nexport const PARALLEL_ROUTE_DEFAULT_PATH =\n  'next/dist/client/components/builtin/default.js'\n\nexport default function ParallelRouteDefault() {\n  notFound()\n}\n","import type {\n  FlightDataPath,\n  FlightDataSegment,\n  FlightRouterState,\n  PrefetchHints,\n  Segment,\n  HeadData,\n} from '../../shared/lib/app-router-types'\nimport type { PreloadCallbacks } from './types'\nimport { matchSegment } from '../../client/components/match-segments'\nimport type { LoaderTree } from '../lib/app-dir-module'\nimport { getLinkAndScriptTags } from './get-css-inlined-link-tags'\nimport { getPreloadableFonts } from './get-preloadable-fonts'\nimport {\n  createFlightRouterStateFromLoaderTree,\n  createRouteTreePrefetch,\n} from './create-flight-router-state-from-loader-tree'\nimport type { AppRenderContext } from './app-render'\nimport { hasLoadingComponentInTree } from './has-loading-component-in-tree'\nimport { addSearchParamsIfPageSegment } from '../../shared/lib/segment'\nimport { createComponentTree } from './create-component-tree'\nimport { getSegmentParam } from '../../shared/lib/router/utils/get-segment-param'\n\n/**\n * Use router state to decide at what common layout to render the page.\n * This can either be the common layout between two pages or a specific place to start rendering from using the \"refetch\" marker in the tree.\n */\nexport async function walkTreeWithFlightRouterState({\n  loaderTreeToFilter,\n  parentParams,\n  flightRouterState,\n  parentIsInsideSharedLayout,\n  rscHead,\n  injectedCSS,\n  injectedJS,\n  injectedFontPreloadTags,\n  rootLayoutIncluded,\n  ctx,\n  preloadCallbacks,\n  MetadataOutlet,\n  hintTree,\n}: {\n  loaderTreeToFilter: LoaderTree\n  parentParams: { [key: string]: string | string[] }\n  flightRouterState?: FlightRouterState\n  rscHead: HeadData\n  parentIsInsideSharedLayout?: boolean\n  injectedCSS: Set<string>\n  injectedJS: Set<string>\n  injectedFontPreloadTags: Set<string>\n  rootLayoutIncluded: boolean\n  ctx: AppRenderContext\n  preloadCallbacks: PreloadCallbacks\n  MetadataOutlet: React.ComponentType\n  hintTree: PrefetchHints | null\n}): Promise<FlightDataPath[]> {\n  const {\n    renderOpts: { nextFontManifest, experimental },\n    query,\n    isPrefetch,\n    getDynamicParamFromSegment,\n    parsedRequestHeaders,\n  } = ctx\n\n  const [segment, parallelRoutes, modules] = loaderTreeToFilter\n\n  const parallelRoutesKeys = Object.keys(parallelRoutes)\n\n  const { layout } = modules\n  const isLayout = typeof layout !== 'undefined'\n\n  /**\n   * Checks if the current segment is a root layout.\n   */\n  const rootLayoutAtThisLevel = isLayout && !rootLayoutIncluded\n  /**\n   * Checks if the current segment or any level above it has a root layout.\n   */\n  const rootLayoutIncludedAtThisLevelOrAbove =\n    rootLayoutIncluded || rootLayoutAtThisLevel\n\n  // Because this function walks to a deeper point in the tree to start rendering we have to track the dynamic parameters up to the point where rendering starts\n  const segmentParam = getDynamicParamFromSegment(loaderTreeToFilter)\n  const currentParams =\n    // Handle null case where dynamic param is optional\n    segmentParam && segmentParam.value !== null\n      ? {\n          ...parentParams,\n          [segmentParam.param]: segmentParam.value,\n        }\n      : parentParams\n  const actualSegment: Segment = addSearchParamsIfPageSegment(\n    segmentParam ? segmentParam.treeSegment : segment,\n    query\n  )\n\n  /**\n   * Decide if the current segment is where rendering has to start.\n   */\n  const renderComponentsOnThisLevel =\n    // No further router state available\n    !flightRouterState ||\n    // Segment in router state does not match current segment\n    !matchSegment(actualSegment, flightRouterState[0]) ||\n    // Explicit refresh\n    flightRouterState[3] === 'refetch'\n\n  // Pre-PPR, the `loading` component signals to the router how deep to render the component tree\n  // to ensure prefetches are quick and inexpensive. If there's no `loading` component anywhere in the tree being rendered,\n  // the prefetch will be short-circuited to avoid requesting a potentially very expensive subtree. If there's a `loading`\n  // somewhere in the tree, we'll recursively render the component tree up until we encounter that loading component, and then stop.\n\n  // Check if we're inside the \"new\" part of the navigation — inside the\n  // shared layout. In the case of a prefetch, this can be true even if the\n  // segment matches, because the client might send a matching segment to\n  // indicate that it already has the data in its cache. But in order to find\n  // the correct loading boundary, we still need to track where the shared\n  // layout begins.\n  //\n  // TODO: We should rethink the protocol for dynamic requests. It might not\n  // make sense for the client to send a FlightRouterState, since that type is\n  // overloaded with other concerns.\n  const isInsideSharedLayout =\n    renderComponentsOnThisLevel ||\n    parentIsInsideSharedLayout ||\n    flightRouterState[3] === 'inside-shared-layout'\n\n  if (\n    isInsideSharedLayout &&\n    !experimental.isRoutePPREnabled &&\n    // If PPR is disabled, and this is a request for the route tree, then we\n    // never render any components. Only send the router state.\n    (parsedRequestHeaders.isRouteTreePrefetchRequest ||\n      // Otherwise, check for the presence of a `loading` component.\n      (isPrefetch &&\n        !Boolean(modules.loading) &&\n        !hasLoadingComponentInTree(loaderTreeToFilter)))\n  ) {\n    // Send only the router state.\n    // TODO: Even for a dynamic route, we should cache these responses,\n    // because they do not contain any render data (neither segment data nor\n    // the head). They can be made even more cacheable once we move the route\n    // params into a separate data structure.\n    const overriddenSegment =\n      flightRouterState &&\n      // TODO: Why does canSegmentBeOverridden exist? Why don't we always just\n      // use `actualSegment`? Is it to avoid overwriting some state that's\n      // tracked by the client? Dig deeper to see if we can simplify this.\n      canSegmentBeOverridden(actualSegment, flightRouterState[0])\n        ? flightRouterState[0]\n        : actualSegment\n\n    const routerState = parsedRequestHeaders.isRouteTreePrefetchRequest\n      ? // Route tree prefetch requests contain some extra information\n        await createRouteTreePrefetch(\n          loaderTreeToFilter,\n          hintTree,\n          getDynamicParamFromSegment\n        )\n      : await createFlightRouterStateFromLoaderTree(\n          loaderTreeToFilter,\n          hintTree,\n          getDynamicParamFromSegment,\n          query\n        )\n\n    return [\n      [\n        overriddenSegment,\n        routerState,\n        null,\n        [null, null],\n        true,\n      ] satisfies FlightDataSegment,\n    ]\n  }\n\n  // Similar to the previous branch. This flag is sent by the client to request\n  // only the metadata for a page. No segment data.\n  if (flightRouterState && flightRouterState[3] === 'metadata-only') {\n    const overriddenSegment =\n      flightRouterState &&\n      canSegmentBeOverridden(actualSegment, flightRouterState[0])\n        ? flightRouterState[0]\n        : actualSegment\n    const routerState = parsedRequestHeaders.isRouteTreePrefetchRequest\n      ? await createRouteTreePrefetch(\n          loaderTreeToFilter,\n          hintTree,\n          getDynamicParamFromSegment\n        )\n      : await createFlightRouterStateFromLoaderTree(\n          loaderTreeToFilter,\n          hintTree,\n          getDynamicParamFromSegment,\n          query\n        )\n    return [\n      [\n        overriddenSegment,\n        routerState,\n        null,\n        rscHead,\n        false,\n      ] satisfies FlightDataSegment,\n    ]\n  }\n\n  if (renderComponentsOnThisLevel) {\n    const overriddenSegment =\n      flightRouterState &&\n      // TODO: Why does canSegmentBeOverridden exist? Why don't we always just\n      // use `actualSegment`? Is it to avoid overwriting some state that's\n      // tracked by the client? Dig deeper to see if we can simplify this.\n      canSegmentBeOverridden(actualSegment, flightRouterState[0])\n        ? flightRouterState[0]\n        : actualSegment\n\n    const routerState = await createFlightRouterStateFromLoaderTree(\n      // Create router state using the slice of the loaderTree\n      loaderTreeToFilter,\n      hintTree,\n      getDynamicParamFromSegment,\n      query\n    )\n\n    // Create component tree using the slice of the loaderTree\n    const seedData = await createComponentTree(\n      // This ensures flightRouterPath is valid and filters down the tree\n      {\n        ctx,\n        loaderTree: loaderTreeToFilter,\n        parentParams: currentParams,\n        parentOptionalCatchAllParamName: null,\n        parentRuntimePrefetchable: false,\n        injectedCSS,\n        injectedJS,\n        injectedFontPreloadTags,\n        // This is intentionally not \"rootLayoutIncludedAtThisLevelOrAbove\" as createComponentTree starts at the current level and does a check for \"rootLayoutAtThisLevel\" too.\n        rootLayoutIncluded,\n        preloadCallbacks,\n        authInterrupts: experimental.authInterrupts,\n        MetadataOutlet,\n      }\n    )\n\n    return [\n      [\n        overriddenSegment,\n        routerState,\n        seedData,\n        rscHead,\n        false,\n      ] satisfies FlightDataSegment,\n    ]\n  }\n\n  // If we are not rendering on this level we need to check if the current\n  // segment has a layout. If so, we need to track all the used CSS to make\n  // the result consistent.\n  const layoutPath = layout?.[1]\n  const injectedCSSWithCurrentLayout = new Set(injectedCSS)\n  const injectedJSWithCurrentLayout = new Set(injectedJS)\n  const injectedFontPreloadTagsWithCurrentLayout = new Set(\n    injectedFontPreloadTags\n  )\n  if (layoutPath) {\n    getLinkAndScriptTags(\n      layoutPath,\n      injectedCSSWithCurrentLayout,\n      injectedJSWithCurrentLayout,\n      true\n    )\n    getPreloadableFonts(\n      nextFontManifest,\n      layoutPath,\n      injectedFontPreloadTagsWithCurrentLayout\n    )\n  }\n\n  const paths: FlightDataPath[] = []\n\n  // Walk through all parallel routes.\n  for (const parallelRouteKey of parallelRoutesKeys) {\n    const parallelRoute = parallelRoutes[parallelRouteKey]\n\n    const subPaths = await walkTreeWithFlightRouterState({\n      ctx,\n      loaderTreeToFilter: parallelRoute,\n      parentParams: currentParams,\n      flightRouterState:\n        flightRouterState && flightRouterState[1][parallelRouteKey],\n      parentIsInsideSharedLayout: isInsideSharedLayout,\n      rscHead,\n      injectedCSS: injectedCSSWithCurrentLayout,\n      injectedJS: injectedJSWithCurrentLayout,\n      injectedFontPreloadTags: injectedFontPreloadTagsWithCurrentLayout,\n      rootLayoutIncluded: rootLayoutIncludedAtThisLevelOrAbove,\n      preloadCallbacks,\n      MetadataOutlet,\n      hintTree: hintTree?.slots?.[parallelRouteKey] ?? null,\n    })\n\n    for (const subPath of subPaths) {\n      paths.push([actualSegment, parallelRouteKey, ...subPath])\n    }\n  }\n\n  return paths\n}\n\n/**\n * A simplified version of `walkTreeWithFlightRouterState` that doesn't skip any layouts\n * but returns a result of the same shape.\n * Intended to be used for instant validation, where we need the complete tree.\n */\nexport async function createFullTreeFlightDataForNavigation({\n  loaderTree,\n  rscHead,\n  injectedCSS,\n  injectedJS,\n  injectedFontPreloadTags,\n  ctx,\n  preloadCallbacks,\n  MetadataOutlet,\n}: {\n  loaderTree: LoaderTree\n  flightRouterState?: FlightRouterState\n  rscHead: HeadData\n  injectedCSS: Set<string>\n  injectedJS: Set<string>\n  injectedFontPreloadTags: Set<string>\n  ctx: AppRenderContext\n  preloadCallbacks: PreloadCallbacks\n  MetadataOutlet: React.ComponentType\n}): Promise<[rootSegment: FlightDataPath]> {\n  const {\n    renderOpts: { experimental },\n    query,\n    getDynamicParamFromSegment,\n    pagePath,\n  } = ctx\n\n  const hintTreeForInitialRender =\n    ctx.renderOpts.prefetchHints?.[pagePath] ?? null\n\n  const routerState = await createFlightRouterStateFromLoaderTree(\n    loaderTree,\n    hintTreeForInitialRender,\n    getDynamicParamFromSegment,\n    query\n  )\n  const rootSegment = routerState[0]\n\n  const seedData = await createComponentTree({\n    ctx,\n    loaderTree,\n    parentParams: {},\n    parentOptionalCatchAllParamName: null,\n    parentRuntimePrefetchable: false,\n    injectedCSS,\n    injectedJS,\n    injectedFontPreloadTags,\n    rootLayoutIncluded: false,\n    preloadCallbacks,\n    authInterrupts: experimental.authInterrupts,\n    MetadataOutlet,\n  })\n\n  return [\n    [\n      // TODO: app-render slices this Segment off.\n      // why is that valid, and why are we including it in the first place?\n      rootSegment,\n      routerState,\n      seedData,\n      rscHead,\n      false,\n    ] satisfies FlightDataSegment,\n  ]\n}\n\n/*\n * This function is used to determine if an existing segment can be overridden\n * by the incoming segment.\n */\nconst canSegmentBeOverridden = (\n  existingSegment: Segment,\n  segment: Segment\n): boolean => {\n  if (Array.isArray(existingSegment) || !Array.isArray(segment)) {\n    return false\n  }\n\n  return getSegmentParam(existingSegment)?.paramName === segment[0]\n}\n","import { InvariantError } from '../../invariant-error'\nimport { getSegmentParam, type SegmentParam } from '../utils/get-segment-param'\nimport {\n  INTERCEPTION_ROUTE_MARKERS,\n  type InterceptionMarker,\n} from '../utils/interception-routes'\n\nexport type RouteGroupAppRouteSegment = {\n  type: 'route-group'\n  name: string\n\n  /**\n   * If present, this segment has an interception marker prefixing it.\n   */\n  interceptionMarker?: InterceptionMarker\n}\n\nexport type ParallelRouteAppRouteSegment = {\n  type: 'parallel-route'\n  name: string\n\n  /**\n   * If present, this segment has an interception marker prefixing it.\n   */\n  interceptionMarker?: InterceptionMarker\n}\n\nexport type StaticAppRouteSegment = {\n  type: 'static'\n  name: string\n\n  /**\n   * If present, this segment has an interception marker prefixing it.\n   */\n  interceptionMarker?: InterceptionMarker\n}\n\nexport type DynamicAppRouteSegment = {\n  type: 'dynamic'\n  name: string\n  param: SegmentParam\n\n  /**\n   * If present, this segment has an interception marker prefixing it.\n   */\n  interceptionMarker?: InterceptionMarker\n}\n\n/**\n * Represents a single segment in a route path.\n * Can be either static (e.g., \"blog\") or dynamic (e.g., \"[slug]\").\n */\nexport type AppRouteSegment =\n  | StaticAppRouteSegment\n  | DynamicAppRouteSegment\n  | RouteGroupAppRouteSegment\n  | ParallelRouteAppRouteSegment\n\nexport type NormalizedAppRouteSegment =\n  | StaticAppRouteSegment\n  | DynamicAppRouteSegment\n\nexport function parseAppRouteSegment(segment: string): AppRouteSegment | null {\n  if (segment === '') {\n    return null\n  }\n\n  // Check if the segment starts with an interception marker\n  const interceptionMarker = INTERCEPTION_ROUTE_MARKERS.find((m) =>\n    segment.startsWith(m)\n  )\n\n  const param = getSegmentParam(segment)\n  if (param) {\n    return {\n      type: 'dynamic',\n      name: segment,\n      param,\n      interceptionMarker,\n    }\n  } else if (segment.startsWith('(') && segment.endsWith(')')) {\n    return {\n      type: 'route-group',\n      name: segment,\n      interceptionMarker,\n    }\n  } else if (segment.startsWith('@')) {\n    return {\n      type: 'parallel-route',\n      name: segment,\n      interceptionMarker,\n    }\n  } else {\n    return {\n      type: 'static',\n      name: segment,\n      interceptionMarker,\n    }\n  }\n}\n\nexport type AppRoute = {\n  normalized: boolean\n  pathname: string\n  segments: AppRouteSegment[]\n  dynamicSegments: DynamicAppRouteSegment[]\n  interceptionMarker: InterceptionMarker | undefined\n  interceptingRoute: AppRoute | undefined\n  interceptedRoute: AppRoute | undefined\n}\n\nexport type NormalizedAppRoute = Omit<AppRoute, 'normalized' | 'segments'> & {\n  normalized: true\n  segments: NormalizedAppRouteSegment[]\n}\n\nexport function isNormalizedAppRoute(\n  route: InterceptionAppRoute\n): route is NormalizedInterceptionAppRoute\nexport function isNormalizedAppRoute(\n  route: AppRoute | InterceptionAppRoute\n): route is NormalizedAppRoute {\n  return route.normalized\n}\n\nexport type InterceptionAppRoute = Omit<\n  AppRoute,\n  'interceptionMarker' | 'interceptingRoute' | 'interceptedRoute'\n> & {\n  interceptionMarker: InterceptionMarker\n  interceptingRoute: AppRoute\n  interceptedRoute: AppRoute\n}\n\nexport type NormalizedInterceptionAppRoute = Omit<\n  InterceptionAppRoute,\n  | 'normalized'\n  | 'segments'\n  | 'interceptionMarker'\n  | 'interceptingRoute'\n  | 'interceptedRoute'\n> & {\n  normalized: true\n  segments: NormalizedAppRouteSegment[]\n  interceptionMarker: InterceptionMarker\n  interceptingRoute: NormalizedAppRoute\n  interceptedRoute: NormalizedAppRoute\n}\n\nexport function isInterceptionAppRoute(\n  route: NormalizedAppRoute\n): route is NormalizedInterceptionAppRoute\nexport function isInterceptionAppRoute(\n  route: AppRoute\n): route is InterceptionAppRoute {\n  return (\n    route.interceptionMarker !== undefined &&\n    route.interceptingRoute !== undefined &&\n    route.interceptedRoute !== undefined\n  )\n}\n\nexport function parseAppRoute(\n  pathname: string,\n  normalized: true\n): NormalizedAppRoute\nexport function parseAppRoute(pathname: string, normalized: false): AppRoute\nexport function parseAppRoute(\n  pathname: string,\n  normalized: boolean\n): AppRoute | NormalizedAppRoute {\n  const pathnameSegments = pathname.split('/').filter(Boolean)\n\n  // Build segments array with static and dynamic segments\n  const segments: AppRouteSegment[] = []\n\n  // Parse if this is an interception route.\n  let interceptionMarker: InterceptionMarker | undefined\n  let interceptingRoute: AppRoute | NormalizedAppRoute | undefined\n  let interceptedRoute: AppRoute | NormalizedAppRoute | undefined\n\n  for (const segment of pathnameSegments) {\n    // Parse the segment into an AppSegment.\n    const appSegment = parseAppRouteSegment(segment)\n    if (!appSegment) {\n      continue\n    }\n\n    if (\n      normalized &&\n      (appSegment.type === 'route-group' ||\n        appSegment.type === 'parallel-route')\n    ) {\n      throw new InvariantError(\n        `${pathname} is being parsed as a normalized route, but it has a route group or parallel route segment.`\n      )\n    }\n\n    segments.push(appSegment)\n\n    if (appSegment.interceptionMarker) {\n      const parts = pathname.split(appSegment.interceptionMarker)\n      if (parts.length !== 2) {\n        throw new Error(`Invalid interception route: ${pathname}`)\n      }\n\n      interceptingRoute = normalized\n        ? parseAppRoute(parts[0], true)\n        : parseAppRoute(parts[0], false)\n      interceptedRoute = normalized\n        ? parseAppRoute(parts[1], true)\n        : parseAppRoute(parts[1], false)\n      interceptionMarker = appSegment.interceptionMarker\n    }\n  }\n\n  const dynamicSegments = segments.filter(\n    (segment) => segment.type === 'dynamic'\n  )\n\n  return {\n    normalized,\n    pathname,\n    segments,\n    dynamicSegments,\n    interceptionMarker,\n    interceptingRoute,\n    interceptedRoute,\n  }\n}\n","import type { DynamicParamTypes } from '../../app-router-types'\n\nexport function interceptionPrefixFromParamType(\n  paramType: DynamicParamTypes\n): string | null {\n  switch (paramType) {\n    case 'catchall-intercepted-(..)(..)':\n    case 'dynamic-intercepted-(..)(..)':\n      return '(..)(..)'\n    case 'catchall-intercepted-(.)':\n    case 'dynamic-intercepted-(.)':\n      return '(.)'\n    case 'catchall-intercepted-(..)':\n    case 'dynamic-intercepted-(..)':\n      return '(..)'\n    case 'catchall-intercepted-(...)':\n    case 'dynamic-intercepted-(...)':\n      return '(...)'\n    case 'catchall':\n    case 'dynamic':\n    case 'optional-catchall':\n    default:\n      return null\n  }\n}\n","import type { Params } from '../../../../server/request/params'\nimport type { DynamicParamTypes } from '../../app-router-types'\nimport { InvariantError } from '../../invariant-error'\nimport type {\n  NormalizedAppRoute,\n  NormalizedAppRouteSegment,\n} from '../routes/app'\nimport { interceptionPrefixFromParamType } from './interception-prefix-from-param-type'\n\n/**\n * Extracts the param value from a path segment, handling interception markers\n * based on the expected param type.\n *\n * @param pathSegment - The path segment to extract the value from\n * @param params - The current params object for resolving dynamic param references\n * @param paramType - The expected param type which may include interception marker info\n * @returns The extracted param value\n */\nfunction getParamValueFromSegment(\n  pathSegment: NormalizedAppRouteSegment,\n  params: Params,\n  paramType: DynamicParamTypes\n): string {\n  // If the segment is dynamic, resolve it from the params object\n  if (pathSegment.type === 'dynamic') {\n    return params[pathSegment.param.paramName] as string\n  }\n\n  // If the paramType indicates this is an intercepted param, strip the marker\n  // that matches the interception marker in the param type\n  const interceptionPrefix = interceptionPrefixFromParamType(paramType)\n  if (interceptionPrefix === pathSegment.interceptionMarker) {\n    return pathSegment.name.replace(pathSegment.interceptionMarker, '')\n  }\n\n  // For static segments, use the name\n  return pathSegment.name\n}\n\n/**\n * Resolves a route parameter value from the route segments at the given depth.\n * This shared logic is used by both extractPathnameRouteParamSegmentsFromLoaderTree\n * and resolveRouteParamsFromTree.\n *\n * @param paramName - The parameter name to resolve\n * @param paramType - The parameter type (dynamic, catchall, etc.)\n * @param depth - The current depth in the route tree\n * @param route - The normalized route containing segments\n * @param params - The current params object (used to resolve embedded param references)\n * @param options - Configuration options\n * @returns The resolved parameter value, or undefined if it cannot be resolved\n */\nexport function resolveParamValue(\n  paramName: string,\n  paramType: DynamicParamTypes,\n  depth: number,\n  route: NormalizedAppRoute,\n  params: Params\n): string | string[] | undefined {\n  switch (paramType) {\n    case 'catchall':\n    case 'optional-catchall':\n    case 'catchall-intercepted-(..)(..)':\n    case 'catchall-intercepted-(.)':\n    case 'catchall-intercepted-(..)':\n    case 'catchall-intercepted-(...)':\n      // For catchall routes, derive from pathname using depth to determine\n      // which segments to use\n      const processedSegments: string[] = []\n\n      // Process segments to handle any embedded dynamic params\n      for (let index = depth; index < route.segments.length; index++) {\n        const pathSegment = route.segments[index]\n\n        if (pathSegment.type === 'static') {\n          let value = pathSegment.name\n\n          // For intercepted catch-all params, strip the marker from the first segment\n          const interceptionPrefix = interceptionPrefixFromParamType(paramType)\n          if (\n            interceptionPrefix &&\n            index === depth &&\n            interceptionPrefix === pathSegment.interceptionMarker\n          ) {\n            // Strip the interception marker from the value\n            value = value.replace(pathSegment.interceptionMarker, '')\n          }\n\n          processedSegments.push(value)\n        } else {\n          // If the segment is a param placeholder, check if we have its value\n          if (!params.hasOwnProperty(pathSegment.param.paramName)) {\n            // If the segment is an optional catchall, we can break out of the\n            // loop because it's optional!\n            if (pathSegment.param.paramType === 'optional-catchall') {\n              break\n            }\n\n            // Unknown param placeholder in pathname - can't derive full value\n            return undefined\n          }\n\n          // If the segment matches a param, use the param value\n          // We don't encode values here as that's handled during retrieval.\n          const paramValue = params[pathSegment.param.paramName]\n          if (Array.isArray(paramValue)) {\n            processedSegments.push(...paramValue)\n          } else {\n            processedSegments.push(paramValue as string)\n          }\n        }\n      }\n\n      if (processedSegments.length > 0) {\n        return processedSegments\n      } else if (paramType === 'optional-catchall') {\n        return undefined\n      } else {\n        // We shouldn't be able to match a catchall segment without any path\n        // segments if it's not an optional catchall\n        throw new InvariantError(\n          `Unexpected empty path segments match for a route \"${route.pathname}\" with param \"${paramName}\" of type \"${paramType}\"`\n        )\n      }\n    case 'dynamic':\n    case 'dynamic-intercepted-(..)(..)':\n    case 'dynamic-intercepted-(.)':\n    case 'dynamic-intercepted-(..)':\n    case 'dynamic-intercepted-(...)':\n      // For regular dynamic parameters, take the segment at this depth\n      if (depth < route.segments.length) {\n        const pathSegment = route.segments[depth]\n\n        // Check if the segment at this depth is a placeholder for an unknown param\n        if (\n          pathSegment.type === 'dynamic' &&\n          !params.hasOwnProperty(pathSegment.param.paramName)\n        ) {\n          // The segment is a placeholder like [category] and we don't have the value\n          return undefined\n        }\n\n        // If the segment matches a param, use the param value from params object\n        // Otherwise it's a static segment, just use it directly\n        // We don't encode values here as that's handled during retrieval\n        return getParamValueFromSegment(pathSegment, params, paramType)\n      }\n\n      return undefined\n\n    default:\n      paramType satisfies never\n  }\n}\n","import type { DynamicParam } from '../../../../server/app-render/app-render'\nimport type { LoaderTree } from '../../../../server/lib/app-dir-module'\nimport type { OpaqueFallbackRouteParams } from '../../../../server/request/fallback-params'\nimport type { Params } from '../../../../server/request/params'\nimport type { DynamicParamTypesShort } from '../../app-router-types'\nimport { InvariantError } from '../../invariant-error'\nimport { parseLoaderTree } from './parse-loader-tree'\nimport { parseAppRoute, parseAppRouteSegment } from '../routes/app'\nimport { resolveParamValue } from './resolve-param-value'\n\n/**\n * Gets the value of a param from the params object. This correctly handles the\n * case where the param is a fallback route param and encodes the resulting\n * value.\n *\n * @param interpolatedParams - The params object.\n * @param segmentKey - The key of the segment.\n * @param fallbackRouteParams - The fallback route params.\n * @returns The value of the param.\n */\nfunction getParamValue(\n  interpolatedParams: Params,\n  segmentKey: string,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null\n) {\n  let value = interpolatedParams[segmentKey]\n\n  if (fallbackRouteParams?.has(segmentKey)) {\n    // We know that the fallback route params has the segment key because we\n    // checked that above.\n    const [searchValue] = fallbackRouteParams.get(segmentKey)!\n    value = searchValue\n  } else if (Array.isArray(value)) {\n    value = value.map((i) => encodeURIComponent(i))\n  } else if (typeof value === 'string') {\n    value = encodeURIComponent(value)\n  }\n\n  return value\n}\n\nexport function interpolateParallelRouteParams(\n  loaderTree: LoaderTree,\n  params: Params,\n  pagePath: string,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null\n): Params {\n  const interpolated = structuredClone(params)\n\n  // Stack-based traversal with depth tracking\n  const stack: Array<{ tree: LoaderTree; depth: number }> = [\n    { tree: loaderTree, depth: 0 },\n  ]\n\n  // Parse the route from the provided page path.\n  const route = parseAppRoute(pagePath, true)\n\n  while (stack.length > 0) {\n    const { tree, depth } = stack.pop()!\n    const { segment, parallelRoutes } = parseLoaderTree(tree)\n\n    const appSegment = parseAppRouteSegment(segment)\n\n    if (\n      appSegment?.type === 'dynamic' &&\n      !interpolated.hasOwnProperty(appSegment.param.paramName) &&\n      // If the param is in the fallback route params, we don't need to\n      // interpolate it because it's already marked as being unknown.\n      !fallbackRouteParams?.has(appSegment.param.paramName)\n    ) {\n      const { paramName, paramType } = appSegment.param\n\n      const paramValue = resolveParamValue(\n        paramName,\n        paramType,\n        depth,\n        route,\n        interpolated\n      )\n\n      if (paramValue !== undefined) {\n        interpolated[paramName] = paramValue\n      } else if (paramType !== 'optional-catchall') {\n        throw new InvariantError(\n          `Could not resolve param value for segment: ${paramName}`\n        )\n      }\n    }\n\n    // Calculate next depth - increment if this is not a route group and not empty\n    let nextDepth = depth\n    if (\n      appSegment &&\n      appSegment.type !== 'route-group' &&\n      appSegment.type !== 'parallel-route'\n    ) {\n      nextDepth++\n    }\n\n    // Add all parallel routes to the stack for processing\n    for (const parallelRoute of Object.values(parallelRoutes)) {\n      stack.push({ tree: parallelRoute, depth: nextDepth })\n    }\n  }\n\n  return interpolated\n}\n\n/**\n *\n * Shared logic on client and server for creating a dynamic param value.\n *\n * This code needs to be shared with the client so it can extract dynamic route\n * params from the URL without a server request.\n *\n * Because everything in this module is sent to the client, we should aim to\n * keep this code as simple as possible. The special case handling for catchall\n * and optional is, alas, unfortunate.\n */\nexport function getDynamicParam(\n  interpolatedParams: Params,\n  segmentKey: string,\n  dynamicParamType: DynamicParamTypesShort,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  staticSiblings: readonly string[] | null\n): DynamicParam {\n  let value: string | string[] | undefined = getParamValue(\n    interpolatedParams,\n    segmentKey,\n    fallbackRouteParams\n  )\n\n  // handle the case where an optional catchall does not have a value,\n  // e.g. `/dashboard/[[...slug]]` when requesting `/dashboard`\n  if (!value || value.length === 0) {\n    if (dynamicParamType === 'oc') {\n      return {\n        param: segmentKey,\n        value: null,\n        type: dynamicParamType,\n        treeSegment: [segmentKey, '', dynamicParamType, staticSiblings],\n      }\n    }\n\n    throw new InvariantError(\n      `Missing value for segment key: \"${segmentKey}\" with dynamic param type: ${dynamicParamType}`\n    )\n  }\n\n  const paramCacheKey = Array.isArray(value) ? value.join('/') : value\n\n  return {\n    param: segmentKey,\n    // The value that is passed to user code.\n    value,\n    // The value that is rendered in the router tree.\n    // TODO: If the number of static siblings exceeds some threshold (e.g.,\n    // dozens or hundreds), consider sending a Bloom filter instead of the full\n    // array to reduce payload size. The client would then use the Bloom filter\n    // to check membership with a small false positive rate.\n    treeSegment: [segmentKey, paramCacheKey, dynamicParamType, staticSiblings],\n    type: dynamicParamType,\n  }\n}\n\n/**\n * Regular expression pattern used to match route parameters.\n * Matches both single parameters and parameter groups.\n * Examples:\n *   - `[[...slug]]` matches parameter group with key 'slug', repeat: true, optional: true\n *   - `[...slug]` matches parameter group with key 'slug', repeat: true, optional: false\n *   - `[[foo]]` matches parameter with key 'foo', repeat: false, optional: true\n *   - `[bar]` matches parameter with key 'bar', repeat: false, optional: false\n */\nexport const PARAMETER_PATTERN = /^([^[]*)\\[((?:\\[[^\\]]*\\])|[^\\]]+)\\](.*)$/\n\n/**\n * Parses a given parameter from a route to a data structure that can be used\n * to generate the parametrized route.\n * Examples:\n *   - `[[...slug]]` -> `{ key: 'slug', repeat: true, optional: true }`\n *   - `[...slug]` -> `{ key: 'slug', repeat: true, optional: false }`\n *   - `[[foo]]` -> `{ key: 'foo', repeat: false, optional: true }`\n *   - `[bar]` -> `{ key: 'bar', repeat: false, optional: false }`\n *   - `fizz` -> `{ key: 'fizz', repeat: false, optional: false }`\n * @param param - The parameter to parse.\n * @returns The parsed parameter as a data structure.\n */\nexport function parseParameter(param: string) {\n  const match = param.match(PARAMETER_PATTERN)\n\n  if (!match) {\n    return parseMatchedParameter(param)\n  }\n\n  return parseMatchedParameter(match[2])\n}\n\n/**\n * Parses a matched parameter from the PARAMETER_PATTERN regex to a data structure that can be used\n * to generate the parametrized route.\n * Examples:\n *   - `[...slug]` -> `{ key: 'slug', repeat: true, optional: true }`\n *   - `...slug` -> `{ key: 'slug', repeat: true, optional: false }`\n *   - `[foo]` -> `{ key: 'foo', repeat: false, optional: true }`\n *   - `bar` -> `{ key: 'bar', repeat: false, optional: false }`\n * @param param - The matched parameter to parse.\n * @returns The parsed parameter as a data structure.\n */\nexport function parseMatchedParameter(param: string) {\n  const optional = param.startsWith('[') && param.endsWith(']')\n  if (optional) {\n    param = param.slice(1, -1)\n  }\n  const repeat = param.startsWith('...')\n  if (repeat) {\n    param = param.slice(3)\n  }\n  return { key: param, repeat, optional }\n}\n","import {\n  arrayBufferToString,\n  stringToUint8Array,\n} from '../app-render/encryption-utils'\nimport type { CachedFetchValue } from '../response-cache/types'\nimport { DYNAMIC_EXPIRE } from '../use-cache/constants'\nimport type { CollectedCacheResult } from '../use-cache/use-cache-wrapper'\n\n/**\n * A generic cache store type that provides a subset of Map functionality\n */\ntype CacheStore<T> = Pick<\n  Map<string, T>,\n  'entries' | 'keys' | 'size' | 'get' | 'set' | typeof Symbol.iterator\n>\n\n/**\n * A cache store specifically for fetch cache values\n */\nexport type FetchCacheStore = CacheStore<CachedFetchValue>\n\n/**\n * A cache store for encrypted bound args of inline server functions.\n */\nexport type EncryptedBoundArgsCacheStore = CacheStore<string>\n\n/**\n * An in-memory-only cache store for decrypted bound args of inline server\n * functions.\n */\nexport type DecryptedBoundArgsCacheStore = CacheStore<string>\n\n/**\n * Serialized format for \"use cache\" entries\n */\nexport interface UseCacheCacheStoreSerialized {\n  entry: {\n    value: string\n    tags: string[]\n    stale: number\n    timestamp: number\n    expire: number\n    revalidate: number\n  }\n  hasExplicitRevalidate: boolean | undefined\n  hasExplicitExpire: boolean | undefined\n  readRootParamNames: string[] | undefined\n}\n\n/**\n * A cache store specifically for \"use cache\" values that stores promises of\n * collected cache results (entry + metadata).\n */\nexport type UseCacheCacheStore = CacheStore<Promise<CollectedCacheResult>>\n\n/**\n * Parses serialized cache entries into a UseCacheCacheStore\n * @param entries - The serialized entries to parse\n * @returns A new UseCacheCacheStore containing the parsed entries\n */\nexport function parseUseCacheCacheStore(\n  entries: Iterable<[string, UseCacheCacheStoreSerialized]>\n): UseCacheCacheStore {\n  const store = new Map<string, Promise<CollectedCacheResult>>()\n\n  for (const [\n    key,\n    { entry, hasExplicitRevalidate, hasExplicitExpire, readRootParamNames },\n  ] of entries) {\n    store.set(\n      key,\n      Promise.resolve({\n        entry: {\n          // Create a ReadableStream from the Uint8Array\n          value: new ReadableStream<Uint8Array>({\n            start(controller) {\n              // Enqueue the Uint8Array to the stream\n              controller.enqueue(stringToUint8Array(atob(entry.value)))\n\n              // Close the stream\n              controller.close()\n            },\n          }),\n          tags: entry.tags,\n          stale: entry.stale,\n          timestamp: entry.timestamp,\n          expire: entry.expire,\n          revalidate: entry.revalidate,\n        },\n        hasExplicitRevalidate,\n        hasExplicitExpire,\n        readRootParamNames: readRootParamNames\n          ? new Set(readRootParamNames)\n          : undefined,\n      })\n    )\n  }\n\n  return store\n}\n\n/**\n * Serializes UseCacheCacheStore entries into an array of key-value pairs\n * @param entries - The store entries to stringify\n * @returns A promise that resolves to an array of key-value pairs with serialized values\n */\nexport async function serializeUseCacheCacheStore(\n  entries: IterableIterator<[string, Promise<CollectedCacheResult>]>,\n  isCacheComponentsEnabled: boolean\n): Promise<Array<[string, UseCacheCacheStoreSerialized] | null>> {\n  return Promise.all(\n    Array.from(entries).map(([key, value]) => {\n      return value\n        .then(\n          async ({\n            entry,\n            hasExplicitRevalidate,\n            hasExplicitExpire,\n            readRootParamNames,\n          }) => {\n            if (\n              isCacheComponentsEnabled &&\n              (entry.revalidate === 0 || entry.expire < DYNAMIC_EXPIRE)\n            ) {\n              // The entry was omitted from the prerender result, and subsequently\n              // does not need to be included in the serialized RDC.\n              return null\n            }\n\n            const [left, right] = entry.value.tee()\n            entry.value = right\n\n            let binaryString: string = ''\n\n            // We want to encode the value as a string, but we aren't sure if the\n            // value is a a stream of UTF-8 bytes or not, so let's just encode it\n            // as a string using base64.\n            for await (const chunk of left) {\n              binaryString += arrayBufferToString(chunk)\n            }\n\n            return [\n              key,\n              {\n                entry: {\n                  // Encode the value as a base64 string.\n                  value: btoa(binaryString),\n                  tags: entry.tags,\n                  stale: entry.stale,\n                  timestamp: entry.timestamp,\n                  expire: entry.expire,\n                  revalidate: entry.revalidate,\n                },\n                hasExplicitRevalidate,\n                hasExplicitExpire,\n                readRootParamNames: readRootParamNames\n                  ? [...readRootParamNames]\n                  : undefined,\n              },\n            ] satisfies [string, UseCacheCacheStoreSerialized]\n          }\n        )\n        .catch(() => {\n          // Any failed cache writes should be ignored as to not discard the\n          // entire cache.\n          return null\n        })\n    })\n  )\n}\n","export const DYNAMIC_EXPIRE = 300 // 5 minutes\nexport const RUNTIME_PREFETCH_DYNAMIC_STALE = 30 // 30 seconds\n","import { InvariantError } from '../../shared/lib/invariant-error'\nimport { getServerActionsManifest } from './manifests-singleton'\n\nlet __next_loaded_action_key: CryptoKey\n\nexport function arrayBufferToString(\n  buffer: ArrayBuffer | Uint8Array<ArrayBufferLike>\n) {\n  const bytes = new Uint8Array(buffer)\n  const len = bytes.byteLength\n\n  // @anonrig: V8 has a limit of 65535 arguments in a function.\n  // For len < 65535, this is faster.\n  // https://github.com/vercel/next.js/pull/56377#pullrequestreview-1656181623\n  if (len < 65535) {\n    return String.fromCharCode.apply(null, bytes as unknown as number[])\n  }\n\n  let binary = ''\n  for (let i = 0; i < len; i++) {\n    binary += String.fromCharCode(bytes[i])\n  }\n  return binary\n}\n\nexport function stringToUint8Array(binary: string) {\n  const len = binary.length\n  const arr = new Uint8Array(len)\n\n  for (let i = 0; i < len; i++) {\n    arr[i] = binary.charCodeAt(i)\n  }\n\n  return arr\n}\n\nexport function encrypt(\n  key: CryptoKey,\n  iv: Uint8Array<ArrayBuffer>,\n  data: Uint8Array<ArrayBuffer>\n) {\n  return crypto.subtle.encrypt(\n    {\n      name: 'AES-GCM',\n      iv,\n    },\n    key,\n    data\n  )\n}\n\nexport function decrypt(\n  key: CryptoKey,\n  iv: Uint8Array<ArrayBuffer>,\n  data: Uint8Array<ArrayBuffer>\n) {\n  return crypto.subtle.decrypt(\n    {\n      name: 'AES-GCM',\n      iv,\n    },\n    key,\n    data\n  )\n}\n\nexport async function getActionEncryptionKey() {\n  if (__next_loaded_action_key) {\n    return __next_loaded_action_key\n  }\n\n  const serverActionsManifest = getServerActionsManifest()\n\n  const rawKey =\n    process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY ||\n    serverActionsManifest.encryptionKey\n\n  if (rawKey === undefined) {\n    throw new InvariantError('Missing encryption key for Server Actions')\n  }\n\n  __next_loaded_action_key = await crypto.subtle.importKey(\n    'raw',\n    stringToUint8Array(atob(rawKey)),\n    'AES-GCM',\n    true,\n    ['encrypt', 'decrypt']\n  )\n\n  return __next_loaded_action_key\n}\n","import { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n  type UseCacheCacheStore,\n  type FetchCacheStore,\n  type EncryptedBoundArgsCacheStore,\n  serializeUseCacheCacheStore,\n  parseUseCacheCacheStore,\n  type DecryptedBoundArgsCacheStore,\n  type UseCacheCacheStoreSerialized,\n} from './cache-store'\n\n/**\n * An immutable version of the resume data cache used during rendering.\n * This cache is read-only and cannot be modified once created.\n */\nexport interface RenderResumeDataCache {\n  /**\n   * A read-only Map store for values cached by the 'use cache' React hook.\n   * The 'set' operation is omitted to enforce immutability.\n   */\n  readonly cache: Omit<UseCacheCacheStore, 'set'>\n\n  /**\n   * A read-only Map store for cached fetch responses.\n   * The 'set' operation is omitted to enforce immutability.\n   */\n  readonly fetch: Omit<FetchCacheStore, 'set'>\n\n  /**\n   * A read-only Map store for encrypted bound args of inline server functions.\n   * The 'set' operation is omitted to enforce immutability.\n   */\n  readonly encryptedBoundArgs: Omit<EncryptedBoundArgsCacheStore, 'set'>\n\n  /**\n   * A read-only Map store for decrypted bound args of inline server functions.\n   * This is only intended for in-memory usage during pre-rendering, and must\n   * not be persisted in the resume store. The 'set' operation is omitted to\n   * enforce immutability.\n   */\n  readonly decryptedBoundArgs: Omit<DecryptedBoundArgsCacheStore, 'set'>\n}\n\n/**\n * A mutable version of the resume data cache used during pre-rendering.\n * This cache allows both reading and writing of cached values.\n */\nexport interface PrerenderResumeDataCache {\n  /**\n   * A mutable Map store for values cached by the 'use cache' React hook.\n   * Supports both 'get' and 'set' operations to build the cache during\n   * pre-rendering.\n   */\n  readonly cache: UseCacheCacheStore\n\n  /**\n   * A mutable Map store for cached fetch responses.\n   * Supports both 'get' and 'set' operations to build the cache during\n   * pre-rendering.\n   */\n  readonly fetch: FetchCacheStore\n\n  /**\n   * A mutable Map store for encrypted bound args of inline server functions.\n   * Supports both 'get' and 'set' operations to build the cache during\n   * pre-rendering.\n   */\n  readonly encryptedBoundArgs: EncryptedBoundArgsCacheStore\n\n  /**\n   * A mutable Map store for decrypted bound args of inline server functions.\n   * This is only intended for in-memory usage during pre-rendering, and must\n   * not be persisted in the resume store. Supports both 'get' and 'set'\n   * operations to build the cache during pre-rendering.\n   */\n  readonly decryptedBoundArgs: DecryptedBoundArgsCacheStore\n}\n\ntype ResumeStoreSerialized = {\n  store: {\n    cache: {\n      [key: string]: any\n    }\n    fetch: {\n      [key: string]: any\n    }\n    encryptedBoundArgs: {\n      [key: string]: string\n    }\n  }\n}\n\n/**\n * Serializes a resume data cache into a JSON string for storage or\n * transmission. Handles 'use cache' values, fetch responses, and encrypted\n * bound args for inline server functions.\n *\n * @param resumeDataCache - The immutable cache to serialize\n * @returns A Promise that resolves to the serialized cache as a JSON string, or\n * 'null' if empty\n */\nexport async function stringifyResumeDataCache(\n  resumeDataCache: RenderResumeDataCache | PrerenderResumeDataCache,\n  isCacheComponentsEnabled: boolean\n): Promise<string> {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    throw new InvariantError(\n      '`stringifyResumeDataCache` should not be called in edge runtime.'\n    )\n  } else {\n    if (resumeDataCache.fetch.size === 0 && resumeDataCache.cache.size === 0) {\n      return 'null'\n    }\n\n    const json: ResumeStoreSerialized = {\n      store: {\n        fetch: Object.fromEntries(Array.from(resumeDataCache.fetch.entries())),\n        cache: Object.fromEntries(\n          (\n            await serializeUseCacheCacheStore(\n              resumeDataCache.cache.entries(),\n              isCacheComponentsEnabled\n            )\n          ).filter(\n            (entry): entry is [string, UseCacheCacheStoreSerialized] =>\n              entry !== null\n          )\n        ),\n        encryptedBoundArgs: Object.fromEntries(\n          Array.from(resumeDataCache.encryptedBoundArgs.entries())\n        ),\n      },\n    }\n\n    // Compress the JSON string using zlib. As the data we already want to\n    // decompress is in memory, we use the synchronous deflateSync function.\n    const { deflateSync } = require('node:zlib') as typeof import('node:zlib')\n\n    return deflateSync(JSON.stringify(json)).toString('base64')\n  }\n}\n\n/**\n * Creates a new empty mutable resume data cache for pre-rendering.\n * Initializes fresh Map instances for both the 'use cache' and fetch caches.\n * Used at the start of pre-rendering to begin collecting cached values.\n *\n * @returns A new empty PrerenderResumeDataCache instance\n */\nexport function createPrerenderResumeDataCache(\n  source?: PrerenderResumeDataCache | RenderResumeDataCache\n): PrerenderResumeDataCache {\n  if (source) {\n    return {\n      cache: new Map(source.cache),\n      fetch: new Map(source.fetch),\n      encryptedBoundArgs: new Map(source.encryptedBoundArgs),\n      decryptedBoundArgs: new Map(source.decryptedBoundArgs),\n    }\n  } else {\n    return {\n      cache: new Map(),\n      fetch: new Map(),\n      encryptedBoundArgs: new Map(),\n      decryptedBoundArgs: new Map(),\n    }\n  }\n}\n\n/**\n * Creates an immutable render resume data cache from either:\n * 1. An existing prerender cache instance\n * 2. A serialized cache string\n *\n * @param renderResumeDataCache - A RenderResumeDataCache instance to be used directly\n * @param prerenderResumeDataCache - A PrerenderResumeDataCache instance to convert to immutable\n * @param persistedCache - A serialized cache string to parse\n * @param maxPostponedStateSizeBytes - The max compressed size limit in bytes (used to calculate 5x decompression limit)\n * @returns An immutable RenderResumeDataCache instance\n */\nexport function createRenderResumeDataCache(\n  renderResumeDataCache: RenderResumeDataCache\n): RenderResumeDataCache\nexport function createRenderResumeDataCache(\n  prerenderResumeDataCache: PrerenderResumeDataCache\n): RenderResumeDataCache\nexport function createRenderResumeDataCache(\n  persistedCache: string,\n  maxPostponedStateSizeBytes: number | undefined\n): RenderResumeDataCache\nexport function createRenderResumeDataCache(\n  resumeDataCacheOrPersistedCache:\n    | RenderResumeDataCache\n    | PrerenderResumeDataCache\n    | string,\n  maxPostponedStateSizeBytes?: number | undefined\n): RenderResumeDataCache {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    throw new InvariantError(\n      '`createRenderResumeDataCache` should not be called in edge runtime.'\n    )\n  } else {\n    if (typeof resumeDataCacheOrPersistedCache !== 'string') {\n      // If the cache is already a prerender or render cache, we can return it\n      // directly. For the former, we're just performing a type change.\n      return resumeDataCacheOrPersistedCache\n    }\n\n    if (resumeDataCacheOrPersistedCache === 'null') {\n      return {\n        cache: new Map(),\n        fetch: new Map(),\n        encryptedBoundArgs: new Map(),\n        decryptedBoundArgs: new Map(),\n      }\n    }\n\n    // This should be a compressed string. Let's decompress it using zlib.\n    // As the data we already want to decompress is in memory, we use the\n    // synchronous inflateSync function.\n    const { inflateSync } = require('node:zlib') as typeof import('node:zlib')\n\n    // Limit decompressed size to prevent zipbomb attacks. This is 5x the\n    // configured maxPostponedStateSize, allowing reasonable compression\n    // ratios while preventing extreme decompression bombs.\n    // Default is 500MB (5x the default 100MB compressed limit).\n    const maxDecompressedSize = maxPostponedStateSizeBytes\n      ? maxPostponedStateSizeBytes * 5\n      : 500 * 1024 * 1024\n\n    let json: ResumeStoreSerialized\n    try {\n      json = JSON.parse(\n        inflateSync(Buffer.from(resumeDataCacheOrPersistedCache, 'base64'), {\n          maxOutputLength: maxDecompressedSize,\n        }).toString('utf-8')\n      )\n    } catch (err: unknown) {\n      if (\n        err instanceof RangeError &&\n        (err as NodeJS.ErrnoException).code === 'ERR_BUFFER_TOO_LARGE'\n      ) {\n        throw new Error(\n          `Decompressed resume data cache exceeded ${maxDecompressedSize} byte limit`\n        )\n      }\n      throw err\n    }\n\n    return {\n      cache: parseUseCacheCacheStore(Object.entries(json.store.cache)),\n      fetch: new Map(Object.entries(json.store.fetch)),\n      encryptedBoundArgs: new Map(\n        Object.entries(json.store.encryptedBoundArgs)\n      ),\n      decryptedBoundArgs: new Map(),\n    }\n  }\n}\n","import { useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\nimport type { FlightRouterState } from '../../shared/lib/app-router-types'\n\nconst ANNOUNCER_TYPE = 'next-route-announcer'\nconst ANNOUNCER_ID = '__next-route-announcer__'\n\nfunction getAnnouncerNode() {\n  const existingAnnouncer = document.getElementsByName(ANNOUNCER_TYPE)[0]\n  if (existingAnnouncer?.shadowRoot?.childNodes[0]) {\n    return existingAnnouncer.shadowRoot.childNodes[0] as HTMLElement\n  } else {\n    const container = document.createElement(ANNOUNCER_TYPE)\n    container.style.cssText = 'position:absolute'\n    const announcer = document.createElement('div')\n    announcer.ariaLive = 'assertive'\n    announcer.id = ANNOUNCER_ID\n    announcer.role = 'alert'\n    announcer.style.cssText =\n      'position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal'\n\n    // Use shadow DOM here to avoid any potential CSS bleed\n    const shadow = container.attachShadow({ mode: 'open' })\n    shadow.appendChild(announcer)\n    document.body.appendChild(container)\n    return announcer\n  }\n}\n\nexport function AppRouterAnnouncer({ tree }: { tree: FlightRouterState }) {\n  const [portalNode, setPortalNode] = useState<HTMLElement | null>(null)\n\n  useEffect(() => {\n    const announcer = getAnnouncerNode()\n    setPortalNode(announcer)\n    return () => {\n      const container = document.getElementsByTagName(ANNOUNCER_TYPE)[0]\n      if (container?.isConnected) {\n        document.body.removeChild(container)\n      }\n    }\n  }, [])\n\n  const [routeAnnouncement, setRouteAnnouncement] = useState('')\n  const previousTitle = useRef<string | undefined>(undefined)\n\n  useEffect(() => {\n    let currentTitle = ''\n    if (document.title) {\n      currentTitle = document.title\n    } else {\n      const pageHeader = document.querySelector('h1')\n      if (pageHeader) {\n        currentTitle = pageHeader.innerText || pageHeader.textContent || ''\n      }\n    }\n\n    // Only announce the title change, but not for the first load because screen\n    // readers do that automatically.\n    if (\n      previousTitle.current !== undefined &&\n      previousTitle.current !== currentTitle\n    ) {\n      setRouteAnnouncement(currentTitle)\n    }\n    previousTitle.current = currentTitle\n  }, [tree])\n\n  return portalNode ? createPortal(routeAnnouncement, portalNode) : null\n}\n","import {\n  HTTP_ERROR_FALLBACK_ERROR_CODE,\n  type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\n\n// TODO: Add `forbidden` docs\n/**\n * @experimental\n * This function allows you to render the [forbidden.js file](https://nextjs.org/docs/app/api-reference/file-conventions/forbidden)\n * within a route segment as well as inject a tag.\n *\n * `forbidden()` can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n * Read more: [Next.js Docs: `forbidden`](https://nextjs.org/docs/app/api-reference/functions/forbidden)\n */\n\nconst DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};403`\n\nexport function forbidden(): never {\n  if (!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS) {\n    throw new Error(\n      `\\`forbidden()\\` is experimental and only allowed to be enabled when \\`experimental.authInterrupts\\` is enabled.`\n    )\n  }\n\n  const error = new Error(DIGEST) as HTTPAccessFallbackError\n  ;(error as HTTPAccessFallbackError).digest = DIGEST\n  throw error\n}\n","import {\n  HTTP_ERROR_FALLBACK_ERROR_CODE,\n  type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\n\n// TODO: Add `unauthorized` docs\n/**\n * @experimental\n * This function allows you to render the [unauthorized.js file](https://nextjs.org/docs/app/api-reference/file-conventions/unauthorized)\n * within a route segment as well as inject a tag.\n *\n * `unauthorized()` can be used in\n * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components),\n * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and\n * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations).\n *\n *\n * Read more: [Next.js Docs: `unauthorized`](https://nextjs.org/docs/app/api-reference/functions/unauthorized)\n */\n\nconst DIGEST = `${HTTP_ERROR_FALLBACK_ERROR_CODE};401`\n\nexport function unauthorized(): never {\n  if (!process.env.__NEXT_EXPERIMENTAL_AUTH_INTERRUPTS) {\n    throw new Error(\n      `\\`unauthorized()\\` is experimental and only allowed to be used when \\`experimental.authInterrupts\\` is enabled.`\n    )\n  }\n\n  const error = new Error(DIGEST) as HTTPAccessFallbackError\n  ;(error as HTTPAccessFallbackError).digest = DIGEST\n  throw error\n}\n","/**\n * This function should be used to rethrow internal Next.js errors so that they can be handled by the framework.\n * When wrapping an API that uses errors to interrupt control flow, you should use this function before you do any error handling.\n * This function will rethrow the error if it is a Next.js error so it can be handled, otherwise it will do nothing.\n *\n * Read more: [Next.js Docs: `unstable_rethrow`](https://nextjs.org/docs/app/api-reference/functions/unstable_rethrow)\n */\nexport const unstable_rethrow =\n  typeof window === 'undefined'\n    ? (\n        require('./unstable-rethrow.server') as typeof import('./unstable-rethrow.server')\n      ).unstable_rethrow\n    : (\n        require('./unstable-rethrow.browser') as typeof import('./unstable-rethrow.browser')\n      ).unstable_rethrow\n","import type { Params } from '../../server/request/params'\n\nimport React, { useContext, useMemo, use } from 'react'\nimport {\n  AppRouterContext,\n  LayoutRouterContext,\n  type AppRouterInstance,\n} from '../../shared/lib/app-router-context.shared-runtime'\nimport {\n  SearchParamsContext,\n  PathnameContext,\n  PathParamsContext,\n  NavigationPromisesContext,\n  ReadonlyURLSearchParams,\n} from '../../shared/lib/hooks-client-context.shared-runtime'\nimport {\n  computeSelectedLayoutSegment,\n  getSelectedLayoutSegmentPath,\n} from '../../shared/lib/segment'\n\nconst useDynamicRouteParams =\n  typeof window === 'undefined'\n    ? (\n        require('../../server/app-render/dynamic-rendering') as typeof import('../../server/app-render/dynamic-rendering')\n      ).useDynamicRouteParams\n    : undefined\n\nconst useDynamicSearchParams =\n  typeof window === 'undefined'\n    ? (\n        require('../../server/app-render/dynamic-rendering') as typeof import('../../server/app-render/dynamic-rendering')\n      ).useDynamicSearchParams\n    : undefined\n\nconst {\n  instrumentParamsForClientValidation,\n  instrumentSearchParamsForClientValidation,\n  expectCompleteParamsInClientValidation,\n} =\n  typeof window === 'undefined' && process.env.__NEXT_CACHE_COMPONENTS\n    ? (require('../../server/app-render/instant-validation/instant-samples-client') as typeof import('../../server/app-render/instant-validation/instant-samples-client'))\n    : {}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you *read* the current URL's search parameters.\n *\n * Learn more about [`URLSearchParams` on MDN](https://developer.mozilla.org/docs/Web/API/URLSearchParams)\n *\n * @example\n * ```ts\n * \"use client\"\n * import { useSearchParams } from 'next/navigation'\n *\n * export default function Page() {\n *   const searchParams = useSearchParams()\n *   searchParams.get('foo') // returns 'bar' when ?foo=bar\n *   // ...\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useSearchParams`](https://nextjs.org/docs/app/api-reference/functions/use-search-params)\n */\n// Client components API\nexport function useSearchParams(): ReadonlyURLSearchParams {\n  useDynamicSearchParams?.('useSearchParams()')\n\n  const searchParams = useContext(SearchParamsContext)\n\n  // In the case where this is `null`, the compat types added in\n  // `next-env.d.ts` will add a new overload that changes the return type to\n  // include `null`.\n  const readonlySearchParams = useMemo((): ReadonlyURLSearchParams => {\n    if (!searchParams) {\n      // When the router is not ready in pages, we won't have the search params\n      // available.\n      return null!\n    }\n\n    return new ReadonlyURLSearchParams(searchParams)\n  }, [searchParams])\n\n  // During build-time instant validation, wrap with an proxy\n  // so that accessing undeclared search params throws an error.\n  if (\n    typeof window === 'undefined' &&\n    process.env.__NEXT_CACHE_COMPONENTS &&\n    readonlySearchParams\n  ) {\n    return instrumentSearchParamsForClientValidation!(readonlySearchParams)\n  }\n\n  // Instrument with Suspense DevTools (dev-only)\n  if (process.env.NODE_ENV !== 'production' && 'use' in React) {\n    const navigationPromises = use(NavigationPromisesContext)\n    if (navigationPromises) {\n      return use(navigationPromises.searchParams)\n    }\n  }\n\n  return readonlySearchParams\n}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you read the current URL's pathname.\n *\n * @example\n * ```ts\n * \"use client\"\n * import { usePathname } from 'next/navigation'\n *\n * export default function Page() {\n *  const pathname = usePathname() // returns \"/dashboard\" on /dashboard?foo=bar\n *  // ...\n * }\n * ```\n *\n * Read more: [Next.js Docs: `usePathname`](https://nextjs.org/docs/app/api-reference/functions/use-pathname)\n */\n// Client components API\nexport function usePathname(): string {\n  useDynamicRouteParams?.('usePathname()')\n\n  // In the case where this is `null`, the compat types added in `next-env.d.ts`\n  // will add a new overload that changes the return type to include `null`.\n  const pathname = useContext(PathnameContext) as string\n\n  // During build-time instant validation, error if fallback params exist\n  // because usePathname() can't return a sensible value without all params.\n  if (\n    typeof window === 'undefined' &&\n    process.env.__NEXT_CACHE_COMPONENTS &&\n    pathname\n  ) {\n    expectCompleteParamsInClientValidation!('usePathname()')\n    return pathname\n  }\n\n  // Instrument with Suspense DevTools (dev-only)\n  if (process.env.NODE_ENV !== 'production' && 'use' in React) {\n    const navigationPromises = use(NavigationPromisesContext)\n    if (navigationPromises) {\n      return use(navigationPromises.pathname)\n    }\n  }\n\n  return pathname\n}\n\n// Client components API\nexport {\n  ServerInsertedHTMLContext,\n  useServerInsertedHTML,\n} from '../../shared/lib/server-inserted-html.shared-runtime'\n\n/**\n *\n * This hook allows you to programmatically change routes inside [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components).\n *\n * @example\n * ```ts\n * \"use client\"\n * import { useRouter } from 'next/navigation'\n *\n * export default function Page() {\n *  const router = useRouter()\n *  // ...\n *  router.push('/dashboard') // Navigate to /dashboard\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useRouter`](https://nextjs.org/docs/app/api-reference/functions/use-router)\n */\n// Client components API\nexport function useRouter(): AppRouterInstance {\n  const router = useContext(AppRouterContext)\n  if (router === null) {\n    throw new Error('invariant expected app router to be mounted')\n  }\n\n  return router\n}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you read a route's dynamic params filled in by the current URL.\n *\n * @example\n * ```ts\n * \"use client\"\n * import { useParams } from 'next/navigation'\n *\n * export default function Page() {\n *   // on /dashboard/[team] where pathname is /dashboard/nextjs\n *   const { team } = useParams() // team === \"nextjs\"\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useParams`](https://nextjs.org/docs/app/api-reference/functions/use-params)\n */\n// Client components API\nexport function useParams<T extends Params = Params>(): T {\n  useDynamicRouteParams?.('useParams()')\n\n  const params = useContext(PathParamsContext) as T\n\n  // During build-time instant validation, wrap with a proxy\n  // so that accessing undeclared params throws an error.\n  if (\n    typeof window === 'undefined' &&\n    process.env.__NEXT_CACHE_COMPONENTS &&\n    params\n  ) {\n    return instrumentParamsForClientValidation!(params)\n  }\n\n  // Instrument with Suspense DevTools (dev-only)\n  if (process.env.NODE_ENV !== 'production' && 'use' in React) {\n    const navigationPromises = use(NavigationPromisesContext)\n    if (navigationPromises) {\n      return use(navigationPromises.params) as T\n    }\n  }\n\n  return params\n}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you read the active route segments **below** the Layout it is called from.\n *\n * @example\n * ```ts\n * 'use client'\n *\n * import { useSelectedLayoutSegments } from 'next/navigation'\n *\n * export default function ExampleClientComponent() {\n *   const segments = useSelectedLayoutSegments()\n *\n *   return (\n *     <ul>\n *       {segments.map((segment, index) => (\n *         <li key={index}>{segment}</li>\n *       ))}\n *     </ul>\n *   )\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useSelectedLayoutSegments`](https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segments)\n */\n// Client components API\nexport function useSelectedLayoutSegments(\n  parallelRouteKey: string = 'children'\n): string[] {\n  useDynamicRouteParams?.('useSelectedLayoutSegments()')\n\n  const context = useContext(LayoutRouterContext)\n  // @ts-expect-error This only happens in `pages`. Type is overwritten in navigation.d.ts\n  if (!context) return null\n\n  // During build-time instant validation, error if fallback params exist\n  // because useSelectedLayoutSegments() can't return a sensible value without all params.\n  if (\n    typeof window === 'undefined' &&\n    process.env.__NEXT_CACHE_COMPONENTS &&\n    context\n  ) {\n    expectCompleteParamsInClientValidation!('useSelectedLayoutSegments()')\n  }\n\n  // Instrument with Suspense DevTools (dev-only)\n  if (process.env.NODE_ENV !== 'production' && 'use' in React) {\n    const navigationPromises = use(NavigationPromisesContext)\n    if (navigationPromises) {\n      const promise =\n        navigationPromises.selectedLayoutSegmentsPromises?.get(parallelRouteKey)\n      if (promise) {\n        // We should always have a promise here, but if we don't, it's not worth erroring over.\n        // We just won't be able to instrument it, but can still provide the value.\n        return use(promise)\n      }\n    }\n  }\n\n  return getSelectedLayoutSegmentPath(context.parentTree, parallelRouteKey)\n}\n\n/**\n * A [Client Component](https://nextjs.org/docs/app/building-your-application/rendering/client-components) hook\n * that lets you read the active route segment **one level below** the Layout it is called from.\n *\n * @example\n * ```ts\n * 'use client'\n * import { useSelectedLayoutSegment } from 'next/navigation'\n *\n * export default function ExampleClientComponent() {\n *   const segment = useSelectedLayoutSegment()\n *\n *   return <p>Active segment: {segment}</p>\n * }\n * ```\n *\n * Read more: [Next.js Docs: `useSelectedLayoutSegment`](https://nextjs.org/docs/app/api-reference/functions/use-selected-layout-segment)\n */\n// Client components API\nexport function useSelectedLayoutSegment(\n  parallelRouteKey: string = 'children'\n): string | null {\n  useDynamicRouteParams?.('useSelectedLayoutSegment()')\n  const navigationPromises = useContext(NavigationPromisesContext)\n  const selectedLayoutSegments = useSelectedLayoutSegments(parallelRouteKey)\n\n  // During build-time instant validation, error if fallback params exist\n  // because useSelectedLayoutSegment() can't return a sensible value without all params.\n  if (typeof window === 'undefined' && process.env.__NEXT_CACHE_COMPONENTS) {\n    expectCompleteParamsInClientValidation!('useSelectedLayoutSegment()')\n  }\n\n  // Instrument with Suspense DevTools (dev-only)\n  if (\n    process.env.NODE_ENV !== 'production' &&\n    navigationPromises &&\n    'use' in React\n  ) {\n    const promise =\n      navigationPromises.selectedLayoutSegmentPromises?.get(parallelRouteKey)\n    if (promise) {\n      // We should always have a promise here, but if we don't, it's not worth erroring over.\n      // We just won't be able to instrument it, but can still provide the value.\n      return use(promise)\n    }\n  }\n\n  return computeSelectedLayoutSegment(selectedLayoutSegments, parallelRouteKey)\n}\n\nexport { unstable_isUnrecognizedActionError } from './unrecognized-action-error'\n\n// Shared components APIs\nexport {\n  // We need the same class that was used to instantiate the context value\n  // Otherwise instanceof checks will fail in usercode\n  ReadonlyURLSearchParams,\n}\nexport {\n  notFound,\n  forbidden,\n  unauthorized,\n  redirect,\n  permanentRedirect,\n  RedirectType,\n  unstable_rethrow,\n} from './navigation.react-server'\n","'use client'\nimport React, { useEffect } from 'react'\nimport type { AppRouterInstance } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useRouter } from './navigation'\nimport { getRedirectTypeFromError, getURLFromRedirectError } from './redirect'\nimport { type RedirectType, isRedirectError } from './redirect-error'\n\ninterface RedirectBoundaryProps {\n  router: AppRouterInstance\n  children: React.ReactNode\n}\n\nfunction HandleRedirect({\n  redirect,\n  reset,\n  redirectType,\n}: {\n  redirect: string\n  redirectType: RedirectType\n  reset: () => void\n}) {\n  const router = useRouter()\n\n  useEffect(() => {\n    React.startTransition(() => {\n      if (redirectType === 'push') {\n        router.push(redirect, {})\n      } else {\n        router.replace(redirect, {})\n      }\n      reset()\n    })\n  }, [redirect, redirectType, reset, router])\n\n  return null\n}\n\nexport class RedirectErrorBoundary extends React.Component<\n  RedirectBoundaryProps,\n  { redirect: string | null; redirectType: RedirectType | null }\n> {\n  constructor(props: RedirectBoundaryProps) {\n    super(props)\n    this.state = { redirect: null, redirectType: null }\n  }\n\n  static getDerivedStateFromError(error: any) {\n    if (isRedirectError(error)) {\n      const url = getURLFromRedirectError(error)\n      const redirectType = getRedirectTypeFromError(error)\n      if ('handled' in error) {\n        // The redirect was already handled. We'll still catch the redirect error\n        // so that we can remount the subtree, but we don't actually need to trigger the\n        // router.push.\n        return { redirect: null, redirectType: null }\n      }\n\n      return { redirect: url, redirectType }\n    }\n    // Re-throw if error is not for redirect\n    throw error\n  }\n\n  // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version.\n  render(): React.ReactNode {\n    const { redirect, redirectType } = this.state\n    if (redirect !== null && redirectType !== null) {\n      return (\n        <HandleRedirect\n          redirect={redirect}\n          redirectType={redirectType}\n          reset={() => this.setState({ redirect: null })}\n        />\n      )\n    }\n\n    return this.props.children\n  }\n}\n\nexport function RedirectBoundary({ children }: { children: React.ReactNode }) {\n  const router = useRouter()\n  return (\n    <RedirectErrorBoundary router={router}>{children}</RedirectErrorBoundary>\n  )\n}\n","import type { Segment } from '../../../shared/lib/app-router-types'\nimport { PAGE_SEGMENT_KEY } from '../../../shared/lib/segment'\n\nexport function createRouterCacheKey(\n  segment: Segment,\n  withoutSearchParameters: boolean = false\n) {\n  // if the segment is an array, it means it's a dynamic segment\n  // for example, ['lang', 'en', 'd']. We need to convert it to a string to store it as a cache node key.\n  if (Array.isArray(segment)) {\n    return `${segment[0]}|${segment[1]}|${segment[2]}`\n  }\n\n  // Page segments might have search parameters, ie __PAGE__?foo=bar\n  // When `withoutSearchParameters` is true, we only want to return the page segment\n  if (withoutSearchParameters && segment.startsWith(PAGE_SEGMENT_KEY)) {\n    return PAGE_SEGMENT_KEY\n  }\n\n  return segment\n}\n","/**\n * Create a \"Thenable\" that does not resolve. This is used to suspend indefinitely when data is not available yet.\n */\nexport const unresolvedThenable = {\n  then: () => {},\n} as PromiseLike<void>\n","'use client'\n\nimport { Component, createRef, type ReactNode } from 'react'\n\ninterface ErrorBoundaryProps {\n  children: ReactNode\n}\n\ninterface ErrorBoundaryState {\n  hasError: boolean\n}\n\nfunction getDomNodeAttributes(node: HTMLElement): Record<string, string> {\n  const result: Record<string, string> = {}\n  for (let i = 0; i < node.attributes.length; i++) {\n    const attr = node.attributes[i]\n    result[attr.name] = attr.value\n  }\n  return result\n}\n\nexport class GracefulDegradeBoundary extends Component<\n  ErrorBoundaryProps,\n  ErrorBoundaryState\n> {\n  private rootHtml: string\n  private htmlAttributes: Record<string, string>\n  private htmlRef: React.RefObject<HTMLHtmlElement | null>\n\n  constructor(props: ErrorBoundaryProps) {\n    super(props)\n    this.state = { hasError: false }\n    this.rootHtml = ''\n    this.htmlAttributes = {}\n    this.htmlRef = createRef<HTMLHtmlElement>()\n  }\n\n  static getDerivedStateFromError(_: unknown): ErrorBoundaryState {\n    return { hasError: true }\n  }\n\n  componentDidMount() {\n    const htmlNode = this.htmlRef.current\n    if (this.state.hasError && htmlNode) {\n      // Reapply the cached HTML attributes to the root element\n      Object.entries(this.htmlAttributes).forEach(([key, value]) => {\n        htmlNode.setAttribute(key, value)\n      })\n    }\n  }\n\n  render() {\n    const { hasError } = this.state\n    // Cache the root HTML content on the first render\n    if (typeof window !== 'undefined' && !this.rootHtml) {\n      this.rootHtml = document.documentElement.innerHTML\n      this.htmlAttributes = getDomNodeAttributes(document.documentElement)\n    }\n\n    if (hasError) {\n      // Render the current HTML content without hydration\n      return (\n        <html\n          ref={this.htmlRef}\n          suppressHydrationWarning\n          dangerouslySetInnerHTML={{\n            __html: this.rootHtml,\n          }}\n        />\n      )\n    }\n\n    return this.props.children\n  }\n}\n\nexport default GracefulDegradeBoundary\n","'use client'\n\nimport React, { type JSX } from 'react'\nimport GracefulDegradeBoundary from './graceful-degrade-boundary'\nimport { ErrorBoundary, type ErrorBoundaryProps } from '../error-boundary'\nimport { isBot } from '../../../shared/lib/router/utils/is-bot'\n\nconst isBotUserAgent =\n  typeof window !== 'undefined' && isBot(window.navigator.userAgent)\n\nexport default function RootErrorBoundary({\n  children,\n  errorComponent,\n  errorStyles,\n  errorScripts,\n}: ErrorBoundaryProps & { children: React.ReactNode }): JSX.Element {\n  if (isBotUserAgent) {\n    // Preserve existing DOM/HTML for bots to avoid replacing content with an error UI\n    // and to keep the original SSR output intact.\n    return <GracefulDegradeBoundary>{children}</GracefulDegradeBoundary>\n  }\n\n  return (\n    <ErrorBoundary\n      errorComponent={errorComponent}\n      errorStyles={errorStyles}\n      errorScripts={errorScripts}\n    >\n      {children}\n    </ErrorBoundary>\n  )\n}\n","'use client'\n\nimport type { ReactNode } from 'react'\nimport {\n  METADATA_BOUNDARY_NAME,\n  VIEWPORT_BOUNDARY_NAME,\n  OUTLET_BOUNDARY_NAME,\n  ROOT_LAYOUT_BOUNDARY_NAME,\n} from './boundary-constants'\n\n// We use a namespace object to allow us to recover the name of the function\n// at runtime even when production bundling/minification is used.\nconst NameSpace = {\n  [METADATA_BOUNDARY_NAME]: function ({ children }: { children: ReactNode }) {\n    return children\n  },\n  [VIEWPORT_BOUNDARY_NAME]: function ({ children }: { children: ReactNode }) {\n    return children\n  },\n  [OUTLET_BOUNDARY_NAME]: function ({ children }: { children: ReactNode }) {\n    return children\n  },\n  [ROOT_LAYOUT_BOUNDARY_NAME]: function ({\n    children,\n  }: {\n    children: ReactNode\n  }) {\n    return children\n  },\n}\n\nexport const MetadataBoundary =\n  // We use slice(0) to trick the bundler into not inlining/minifying the function\n  // so it retains the name inferred from the namespace object\n  NameSpace[METADATA_BOUNDARY_NAME.slice(0) as typeof METADATA_BOUNDARY_NAME]\n\nexport const ViewportBoundary =\n  // We use slice(0) to trick the bundler into not inlining/minifying the function\n  // so it retains the name inferred from the namespace object\n  NameSpace[VIEWPORT_BOUNDARY_NAME.slice(0) as typeof VIEWPORT_BOUNDARY_NAME]\n\nexport const OutletBoundary =\n  // We use slice(0) to trick the bundler into not inlining/minifying the function\n  // so it retains the name inferred from the namespace object\n  NameSpace[OUTLET_BOUNDARY_NAME.slice(0) as typeof OUTLET_BOUNDARY_NAME]\n\nexport const RootLayoutBoundary =\n  // We use slice(0) to trick the bundler into not inlining/minifying the function\n  // so it retains the name inferred from the namespace object\n  NameSpace[\n    ROOT_LAYOUT_BOUNDARY_NAME.slice(0) as typeof ROOT_LAYOUT_BOUNDARY_NAME\n  ]\n","import type {\n  FlightRouterState,\n  CacheNode,\n} from '../../../../shared/lib/app-router-types'\nimport { DEFAULT_SEGMENT_KEY } from '../../../../shared/lib/segment'\nimport { createRouterCacheKey } from '../create-router-cache-key'\n\nexport function findHeadInCache(\n  cache: CacheNode,\n  parallelRoutes: FlightRouterState[1]\n): [CacheNode, string, string] | null {\n  return findHeadInCacheImpl(cache, parallelRoutes, '', '')\n}\n\nfunction findHeadInCacheImpl(\n  cache: CacheNode,\n  parallelRoutes: FlightRouterState[1],\n  keyPrefix: string,\n  keyPrefixWithoutSearchParams: string\n): [CacheNode, string, string] | null {\n  const isLastItem = Object.keys(parallelRoutes).length === 0\n  if (isLastItem) {\n    // Returns the entire Cache Node of the segment whose head we will render.\n    return [cache, keyPrefix, keyPrefixWithoutSearchParams]\n  }\n\n  // First try the 'children' parallel route if it exists\n  // when starting from the \"root\", this corresponds with the main page component\n  const parallelRoutesKeys = Object.keys(parallelRoutes).filter(\n    (key) => key !== 'children'\n  )\n\n  // if we are at the root, we need to check the children slot first\n  if ('children' in parallelRoutes) {\n    parallelRoutesKeys.unshift('children')\n  }\n\n  const slots = cache.slots\n  if (slots !== null) {\n    for (const key of parallelRoutesKeys) {\n      const [segment, childParallelRoutes] = parallelRoutes[key]\n      // If the parallel is not matched and using the default segment,\n      // skip searching the head from it.\n      if (segment === DEFAULT_SEGMENT_KEY) {\n        continue\n      }\n\n      const childCacheNode = slots[key]\n      if (!childCacheNode) {\n        continue\n      }\n\n      const cacheKey = createRouterCacheKey(segment)\n      const cacheKeyWithoutSearchParams = createRouterCacheKey(segment, true)\n\n      const item = findHeadInCacheImpl(\n        childCacheNode,\n        childParallelRoutes,\n        keyPrefix + '/' + cacheKey,\n        keyPrefix + '/' + cacheKeyWithoutSearchParams\n      )\n\n      if (item) {\n        return item\n      }\n    }\n  }\n\n  return null\n}\n","import type { InitialRSCPayload } from '../../../shared/lib/app-router-types'\n\nimport { createHrefFromUrl } from './create-href-from-url'\nimport { extractPathFromFlightRouterState } from './compute-changed-path'\n\nimport type { AppRouterState } from './router-reducer-types'\nimport { getFlightDataPartsFromPath } from '../../flight-data-helpers'\nimport { createInitialCacheNodeForHydration } from './ppr-navigations'\nimport {\n  convertRootFlightRouterStateToRouteTree,\n  getStaleAt,\n  processRuntimePrefetchStream,\n  writeDynamicRenderResponseIntoCache,\n  writeStaticStageResponseIntoCache,\n} from '../segment-cache/cache'\nimport { FetchStrategy } from '../segment-cache/types'\nimport {\n  UnknownDynamicStaleTime,\n  computeDynamicStaleAt,\n} from '../segment-cache/bfcache'\nimport { decodeStaticStage } from './fetch-server-response'\nimport { discoverKnownRoute } from '../segment-cache/optimistic-routes'\nimport type { NormalizedSearch } from '../segment-cache/cache-key'\n\nexport interface InitialRouterStateParameters {\n  navigatedAt: number\n  initialRSCPayload: InitialRSCPayload\n  initialFlightStreamForCache?: ReadableStream<Uint8Array> | null\n  location: Location | null\n}\n\nexport function createInitialRouterState({\n  navigatedAt,\n  initialRSCPayload,\n  initialFlightStreamForCache,\n  location,\n}: InitialRouterStateParameters): AppRouterState {\n  const {\n    c: initialCanonicalUrlParts,\n    f: initialFlightData,\n    q: initialRenderedSearch,\n    i: initialCouldBeIntercepted,\n    S: initialSupportsPerSegmentPrefetching,\n    s: initialStaleTime,\n    l: initialStaticStageByteLength,\n    h: initialHeadVaryParams,\n    p: initialRuntimePrefetchStream,\n    d: initialDynamicStaleTimeSeconds,\n  } = initialRSCPayload\n\n  // When initialized on the server, the canonical URL is provided as an array of parts.\n  // This is to ensure that when the RSC payload streamed to the client, crawlers don't interpret it\n  // as a URL that should be crawled.\n  const initialCanonicalUrl = initialCanonicalUrlParts.join('/')\n\n  const normalizedFlightData = getFlightDataPartsFromPath(initialFlightData[0])\n  const {\n    tree: initialTree,\n    seedData: initialSeedData,\n    head: initialHead,\n  } = normalizedFlightData\n  // For the SSR render, seed data should always be available (we only send back a `null` response\n  // in the case of a `loading` segment, pre-PPR.)\n\n  const canonicalUrl =\n    // location.href is read as the initial value for canonicalUrl in the browser\n    // This is safe to do as canonicalUrl can't be rendered, it's only used to control the history updates in the useEffect further down in this file.\n    location\n      ? // window.location does not have the same type as URL but has all the fields createHrefFromUrl needs.\n        createHrefFromUrl(location)\n      : initialCanonicalUrl\n\n  // Convert the initial FlightRouterState into the RouteTree type.\n  // NOTE: The metadataVaryPath isn't used for anything currently because the\n  // head is embedded into the CacheNode tree, but eventually we'll lift it out\n  // and store it on the top-level state object.\n  //\n  // TODO: For statically-generated-at-build-time HTML pages, the\n  // FlightRouterState baked into the initial RSC payload won't have the\n  // correct segment inlining hints (ParentInlinedIntoSelf, InlinedIntoChild)\n  // because those are computed after the pre-render. The client will need to\n  // fetch the correct hints from the route tree prefetch (/_tree) response\n  // before acting on inlining decisions.\n  const acc = { metadataVaryPath: null }\n  const initialRouteTree = convertRootFlightRouterStateToRouteTree(\n    initialTree,\n    initialRenderedSearch as NormalizedSearch,\n    acc\n  )\n  const metadataVaryPath = acc.metadataVaryPath\n  const initialTask = createInitialCacheNodeForHydration(\n    navigatedAt,\n    initialRouteTree,\n    initialSeedData,\n    initialHead,\n    computeDynamicStaleAt(\n      navigatedAt,\n      initialDynamicStaleTimeSeconds ?? UnknownDynamicStaleTime\n    )\n  )\n\n  // The following only applies in the browser (location !== null) since neither\n  // route learning nor segment cache state persists from SSR to client.\n  if (location !== null && metadataVaryPath !== null) {\n    // Learn the route pattern so we can predict it for future navigations.\n    discoverKnownRoute(\n      Date.now(),\n      location.pathname,\n      null, // nextUrl — initial render is never an interception\n      null, // No pending entry\n      initialRouteTree,\n      metadataVaryPath,\n      initialCouldBeIntercepted,\n      canonicalUrl,\n      initialSupportsPerSegmentPrefetching,\n      false // hasDynamicRewrite\n    )\n\n    // Write the initial seed data into the segment cache so subsequent\n    // navigations to the initial page can serve cached segments instantly.\n    if (initialSeedData !== null && initialStaleTime !== undefined) {\n      if (\n        initialStaticStageByteLength !== undefined &&\n        initialFlightStreamForCache != null\n      ) {\n        // Partially static page — truncate the cloned Flight stream at the\n        // static stage byte boundary, decode, and cache the static subset.\n        decodeStaticStage<InitialRSCPayload>(\n          initialFlightStreamForCache,\n          initialStaticStageByteLength,\n          undefined\n        )\n          .then(async (staticStageResponse) => {\n            const now = Date.now()\n            const staleAt = await getStaleAt(now, staticStageResponse.s)\n\n            writeStaticStageResponseIntoCache(\n              now,\n              staticStageResponse.f,\n              undefined, // no build ID mismatch check for initial HTML\n              staticStageResponse.h,\n              staleAt,\n              initialTree,\n              initialRenderedSearch,\n              true // isResponsePartial\n            )\n          })\n          .catch(() => {\n            // The static stage processing failed. Not fatal — the page\n            // rendered normally, we just won't write into the cache.\n          })\n      } else {\n        // Fully static page — cache the entire decoded seed data as-is. We're\n        // not using the initial response here (which would allow us to combine\n        // the two branches) to avoid unnecessary decoding of the Flight data,\n        // since we can just take the seed data that we already decoded during\n        // hydration and write it into the cache directly.\n        const now = Date.now()\n\n        getStaleAt(now, initialStaleTime)\n          .then((staleAt) => {\n            writeStaticStageResponseIntoCache(\n              now,\n              initialFlightData,\n              undefined, // buildId — not applicable for initial HTML\n              initialHeadVaryParams,\n              staleAt,\n              initialTree,\n              initialRenderedSearch,\n              false // isResponsePartial\n            )\n          })\n          .catch(() => {\n            // The static stage processing failed. Not fatal — the page\n            // rendered normally, we just won't write into the cache.\n          })\n\n        // Cancel the stream clone — fully static path doesn't need it.\n        initialFlightStreamForCache?.cancel()\n      }\n    } else {\n      // No caching — cancel the unused stream clone.\n      initialFlightStreamForCache?.cancel()\n    }\n\n    // If the initial RSC payload includes an embedded runtime prefetch stream,\n    // decode it and write the runtime data into the segment cache. This allows\n    // subsequent navigations to serve runtime-prefetchable content from cache\n    // without a separate prefetch request.\n    if (initialRuntimePrefetchStream != null) {\n      processRuntimePrefetchStream(\n        Date.now(),\n        initialRuntimePrefetchStream,\n        initialTree,\n        initialRenderedSearch\n      )\n        .then((processed) => {\n          if (processed !== null) {\n            writeDynamicRenderResponseIntoCache(\n              Date.now(),\n              FetchStrategy.PPRRuntime,\n              processed.flightDatas,\n              processed.buildId,\n              processed.isResponsePartial,\n              processed.headVaryParams,\n              processed.staleAt,\n              processed.navigationSeed,\n              null\n            )\n          }\n        })\n        .catch(() => {\n          // Runtime prefetch cache write failed. Not fatal — the page rendered\n          // normally, we just won't cache runtime data.\n        })\n    }\n  }\n\n  // NOTE: We intentionally don't check if any data needs to be fetched from the\n  // server. We assume the initial hydration payload is sufficient to render\n  // the page.\n  //\n  // The completeness of the initial data is an important property that we rely\n  // on as a last-ditch mechanism for recovering the app; we must always be able\n  // to reload a fresh HTML document to get to a consistent state.\n  //\n  // In the future, there may be cases where the server intentionally sends\n  // partial data and expects the client to fill in the rest, in which case this\n  // logic may change. (There already is a similar case where the server sends\n  // _no_ hydration data in the HTML document at all, and the client fetches it\n  // separately, but that's different because we still end up hydrating with a\n  // complete tree.)\n\n  const initialState = {\n    tree: initialTask.route,\n    cache: initialTask.node,\n    pushRef: {\n      pendingPush: false,\n      mpaNavigation: false,\n      // First render needs to preserve the previous window.history.state\n      // to avoid it being overwritten on navigation back/forward with MPA Navigation.\n      preserveCustomHistoryState: true,\n    },\n    focusAndScrollRef: {\n      scrollRef: null,\n      forceScroll: false,\n      onlyHashChange: false,\n      hashFragment: null,\n    },\n    canonicalUrl,\n    renderedSearch: initialRenderedSearch,\n    // the || operator is intentional, the pathname can be an empty string\n    nextUrl:\n      (extractPathFromFlightRouterState(initialTree) || location?.pathname) ??\n      null,\n    previousNextUrl: null,\n    debugInfo: null,\n  }\n\n  return initialState\n}\n","import { InvariantError } from '../../shared/lib/invariant-error'\nimport { unpatchedSetImmediate } from '../node-environment-extensions/fast-set-immediate.external'\n\n/*\n==========================\n| Background             |\n==========================\n\nNode.js does not guarantee that two timers scheduled back to back will run\non the same iteration of the event loop:\n\n```ts\nsetTimeout(one, 0)\nsetTimeout(two, 0)\n```\n\nInternally, each timer is assigned a `_idleStart` property that holds\nan internal libuv timestamp in millisecond resolution.\nThis will be used to determine if the timer is already \"expired\" and should be executed.\nHowever, even in sync code, it's possible for two timers to get different `_idleStart` values.\nThis can cause one of the timers to be executed, and the other to be delayed until the next timer phase.\n\nThe delaying happens [here](https://github.com/nodejs/node/blob/c208ffc66bb9418ff026c4e3fa82e5b4387bd147/lib/internal/timers.js#L556-L564).\nand can be debugged by running node with `NODE_DEBUG=timer`.\n\nThe easiest way to observe it is to run this program in a loop until it exits with status 1:\n\n```\n// test.js\n\nlet immediateRan = false\nconst t1 = setTimeout(() => {\n  console.log('timeout 1')\n  setImmediate(() => {\n    console.log('immediate 1')\n    immediateRan = true\n  })\n})\n\nconst t2 = setTimeout(() => {\n  console.log('timeout 2')\n  if (immediateRan) {\n    console.log('immediate ran before the second timeout!')\n    console.log(\n      `t1._idleStart: ${t1._idleStart}, t2_idleStart: ${t2._idleStart}`\n    );\n    process.exit(1)\n  }\n})\n```\n\n```bash\n#!/usr/bin/env bash\n\ni=1;\nwhile true; do\n  output=\"$(NODE_DEBUG=timer node test.js 2>&1)\";\n  if [ \"$?\" -eq 1 ]; then\n    echo \"failed after $i iterations\";\n    echo \"$output\";\n    break;\n  fi;\n  i=$((i+1));\ndone\n```\n\nIf `t2` is deferred to the next iteration of the event loop,\nthen the immediate scheduled from inside `t1` will run first.\nWhen this occurs, `_idleStart` is reliably different between `t1` and `t2`.\n\n==========================\n| Solution               |\n==========================\n\nWe can guarantee that multiple timers (with the same delay, usually `0`)\nrun together without any delays by making sure that their `_idleStart`s are the same,\nbecause that's what's used to determine if a timer should be deferred or not.\nLuckily, this property is currently exposed to userland and mutable,\nso we can patch it.\n\nAnother related trick we could potentially apply is making\na timer immediately be considered expired by doing  `timer._idleStart -= 2`.\n(the value must be more than `1`, the delay that actually gets set for `setTimeout(cb, 0)`).\nThis makes node view this timer as \"a 1ms timer scheduled 2ms ago\",\nmeaning that it should definitely run in the next timer phase.\nHowever, I'm not confident we know all the side effects of doing this,\nso for now, simply ensuring coordination is enough.\n*/\n\nlet shouldAttemptPatching = true\n\nfunction warnAboutTimers() {\n  console.warn(\n    \"Next.js cannot guarantee that Cache Components will run as expected due to the current runtime's implementation of `setTimeout()`.\\nPlease report a github issue here: https://github.com/vercel/next.js/issues/new/\"\n  )\n}\n\n/**\n * Allows scheduling multiple timers (equivalent to `setTimeout(cb, delayMs)`)\n * that are guaranteed to run in the same iteration of the event loop.\n *\n * @param delayMs - the delay to pass to `setTimeout`. (default: 0)\n *\n * */\nexport function createAtomicTimerGroup(delayMs = 0) {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    throw new InvariantError(\n      'createAtomicTimerGroup cannot be called in the edge runtime'\n    )\n  } else {\n    let isFirstCallback = true\n    let firstTimerIdleStart: number | null = null\n    let didFirstTimerRun = false\n\n    // As a sanity check, we schedule an immediate from the first timeout\n    // to check if the execution was interrupted (i.e. if it ran between the timeouts).\n    // Note that we're deliberately bypassing the \"fast setImmediate\" patch here --\n    // otherwise, this check would always fail, because the immediate\n    // would always run before the second timeout.\n    let didImmediateRun = false\n    function runFirstCallback(callback: () => void) {\n      didFirstTimerRun = true\n      if (shouldAttemptPatching) {\n        unpatchedSetImmediate(() => {\n          didImmediateRun = true\n        })\n      }\n      return callback()\n    }\n\n    function runSubsequentCallback(callback: () => void) {\n      if (shouldAttemptPatching) {\n        if (didImmediateRun) {\n          // If the immediate managed to run between the timers, then we're not\n          // able to provide the guarantees that we're supposed to\n          shouldAttemptPatching = false\n          warnAboutTimers()\n        }\n      }\n      return callback()\n    }\n\n    return function scheduleTimeout(callback: () => void) {\n      if (didFirstTimerRun) {\n        throw new InvariantError(\n          'Cannot schedule more timers into a group that already executed'\n        )\n      }\n\n      const timer = setTimeout(\n        isFirstCallback ? runFirstCallback : runSubsequentCallback,\n        delayMs,\n        callback\n      )\n      isFirstCallback = false\n\n      if (!shouldAttemptPatching) {\n        // We already tried patching some timers, and it didn't work.\n        // No point trying again.\n        return timer\n      }\n\n      // NodeJS timers have a `_idleStart` property, but it doesn't exist e.g. in Bun.\n      // If it's not present, we'll warn and try to continue.\n      try {\n        if ('_idleStart' in timer && typeof timer._idleStart === 'number') {\n          // If this is the first timer that was scheduled, save its `_idleStart`.\n          // We'll copy it onto subsequent timers to guarantee that they'll all be\n          // considered expired in the same iteration of the event loop\n          // and thus will all be executed in the same timer phase.\n          if (firstTimerIdleStart === null) {\n            firstTimerIdleStart = timer._idleStart\n          } else {\n            timer._idleStart = firstTimerIdleStart\n          }\n        } else {\n          shouldAttemptPatching = false\n          warnAboutTimers()\n        }\n      } catch (err) {\n        // This should never fail in current Node, but it might start failing in the future.\n        // We might be okay even without tweaking the timers, so warn and try to continue.\n        console.error(\n          new InvariantError(\n            'An unexpected error occurred while adjusting `_idleStart` on an atomic timer',\n            { cause: err }\n          )\n        )\n        shouldAttemptPatching = false\n        warnAboutTimers()\n      }\n\n      return timer\n    }\n  }\n}\n","import { InvariantError } from '../../shared/lib/invariant-error'\nimport { createAtomicTimerGroup } from './app-render-scheduling'\nimport {\n  DANGEROUSLY_runPendingImmediatesAfterCurrentTask,\n  expectNoPendingImmediates,\n} from '../node-environment-extensions/fast-set-immediate.external'\nimport { isThenable } from '../../shared/lib/is-thenable'\n\nfunction noop() {}\n\n/**\n * This is a utility function to make scheduling sequential tasks that run back to back easier.\n * We schedule on the same queue (setTimeout) at the same time to ensure no other events can sneak in between.\n *\n * The first function runs in the first task. Each subsequent function runs in its own task.\n * The returned promise resolves after the last task completes.\n */\nexport function runInSequentialTasks<R>(\n  first: () => R,\n  ...rest: Array<() => void>\n): Promise<Awaited<R>> {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    throw new InvariantError(\n      '`runInSequentialTasks` should not be called in edge runtime.'\n    )\n  } else {\n    return new Promise((resolve, reject) => {\n      const scheduleTimeout = createAtomicTimerGroup()\n      const ids: ReturnType<typeof scheduleTimeout>[] = []\n\n      let result: R\n      ids.push(\n        scheduleTimeout(() => {\n          try {\n            DANGEROUSLY_runPendingImmediatesAfterCurrentTask()\n            result = first()\n            // If the first function returns a thenable, suppress unhandled\n            // rejections. A later task in the sequence (e.g. an abort) may\n            // cause the promise to reject, and we don't want that to surface\n            // as an unhandled rejection — the caller will observe the\n            // rejection when they await the returned promise.\n            if (isThenable(result)) {\n              result.then(noop, noop)\n            }\n          } catch (err) {\n            for (let i = 1; i < ids.length; i++) {\n              clearTimeout(ids[i])\n            }\n            reject(err)\n          }\n        })\n      )\n\n      for (let i = 0; i < rest.length; i++) {\n        const fn = rest[i]\n        let index = ids.length\n\n        ids.push(\n          scheduleTimeout(() => {\n            try {\n              DANGEROUSLY_runPendingImmediatesAfterCurrentTask()\n              fn()\n            } catch (err) {\n              // clear remaining timeouts\n              while (++index < ids.length) {\n                clearTimeout(ids[index])\n              }\n              reject(err)\n            }\n          })\n        )\n      }\n\n      // We wait a task before resolving\n      ids.push(\n        scheduleTimeout(() => {\n          try {\n            expectNoPendingImmediates()\n            resolve(result as Awaited<R>)\n          } catch (err) {\n            reject(err)\n          }\n        })\n      )\n    })\n  }\n}\n","/**\n * This class is used to detect when all cache reads for a given render are settled.\n * We do this to allow for cache warming the prerender without having to continue rendering\n * the remainder of the page. This feature is really only useful when the cacheComponents flag is on\n * and should only be used in codepaths gated with this feature.\n */\n\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nexport class CacheSignal {\n  private count = 0\n  private earlyListeners: Array<() => void> = []\n  private listeners: Array<() => void> = []\n  private tickPending = false\n  private pendingTimeoutCleanup: (() => void) | null = null\n\n  private subscribedSignals: Set<CacheSignal> | null = null\n\n  constructor() {\n    if (process.env.NEXT_RUNTIME === 'edge') {\n      // we rely on `process.nextTick`, which is not supported in edge\n      throw new InvariantError(\n        'CacheSignal cannot be used in the edge runtime, because `cacheComponents` does not support it.'\n      )\n    }\n  }\n\n  private noMorePendingCaches() {\n    if (!this.tickPending) {\n      this.tickPending = true\n      queueMicrotask(() =>\n        process.nextTick(() => {\n          this.tickPending = false\n          if (this.count === 0) {\n            for (let i = 0; i < this.earlyListeners.length; i++) {\n              this.earlyListeners[i]()\n            }\n            this.earlyListeners.length = 0\n          }\n        })\n      )\n    }\n\n    // After a cache resolves, React will schedule new rendering work:\n    // - in a microtask (when prerendering)\n    // - in setImmediate (when rendering)\n    // To cover both of these, we have to make sure that we let immediates execute at least once after each cache resolved.\n    // We don't know when the pending timeout was scheduled (and if it's about to resolve),\n    // so by scheduling a new one, we can be sure that we'll go around the event loop at least once.\n    if (this.pendingTimeoutCleanup) {\n      // We cancel the timeout in beginRead, so this shouldn't ever be active here,\n      // but we still cancel it defensively.\n      this.pendingTimeoutCleanup()\n    }\n    this.pendingTimeoutCleanup = scheduleImmediateAndTimeoutWithCleanup(\n      this.invokeListenersIfNoPendingReads\n    )\n  }\n\n  private invokeListenersIfNoPendingReads = () => {\n    this.pendingTimeoutCleanup = null\n    if (this.count === 0) {\n      for (let i = 0; i < this.listeners.length; i++) {\n        this.listeners[i]()\n      }\n      this.listeners.length = 0\n    }\n  }\n\n  /**\n   * This promise waits until there are no more in progress cache reads but no later.\n   * This allows for adding more cache reads after to delay cacheReady.\n   */\n  inputReady() {\n    return new Promise<void>((resolve) => {\n      this.earlyListeners.push(resolve)\n      if (this.count === 0) {\n        this.noMorePendingCaches()\n      }\n    })\n  }\n\n  /**\n   * If there are inflight cache reads this Promise can resolve in a microtask however\n   * if there are no inflight cache reads then we wait at least one task to allow initial\n   * cache reads to be initiated.\n   */\n  cacheReady() {\n    return new Promise<void>((resolve) => {\n      this.listeners.push(resolve)\n      if (this.count === 0) {\n        this.noMorePendingCaches()\n      }\n    })\n  }\n\n  beginRead() {\n    this.count++\n\n    // There's a new pending cache, so if there's a `noMorePendingCaches` timeout running,\n    // we should cancel it.\n    if (this.pendingTimeoutCleanup) {\n      this.pendingTimeoutCleanup()\n      this.pendingTimeoutCleanup = null\n    }\n\n    if (this.subscribedSignals !== null) {\n      for (const subscriber of this.subscribedSignals) {\n        subscriber.beginRead()\n      }\n    }\n  }\n\n  endRead() {\n    if (this.count === 0) {\n      throw new InvariantError(\n        'CacheSignal got more endRead() calls than beginRead() calls'\n      )\n    }\n\n    // If this is the last read we need to wait a task before we can claim the cache is settled.\n    // The cache read will likely ping a Server Component which can read from the cache again and this\n    // will play out in a microtask so we need to only resolve pending listeners if we're still at 0\n    // after at least one task.\n    // We only want one task scheduled at a time so when we hit count 1 we don't decrement the counter immediately.\n    // If intervening reads happen before the scheduled task runs they will never observe count 1 preventing reentrency\n    this.count--\n    if (this.count === 0) {\n      this.noMorePendingCaches()\n    }\n\n    if (this.subscribedSignals !== null) {\n      for (const subscriber of this.subscribedSignals) {\n        subscriber.endRead()\n      }\n    }\n  }\n\n  hasPendingReads(): boolean {\n    return this.count > 0\n  }\n\n  trackRead<T>(promise: Promise<T>) {\n    this.beginRead()\n    // `promise.finally()` still rejects, so don't use it here to avoid unhandled rejections\n    const onFinally = this.endRead.bind(this)\n    promise.then(onFinally, onFinally)\n    return promise\n  }\n\n  subscribeToReads(subscriber: CacheSignal): () => void {\n    if (subscriber === this) {\n      throw new InvariantError('A CacheSignal cannot subscribe to itself')\n    }\n    if (this.subscribedSignals === null) {\n      this.subscribedSignals = new Set()\n    }\n    this.subscribedSignals.add(subscriber)\n\n    // we'll notify the subscriber of each endRead() on this signal,\n    // so we need to give it a corresponding beginRead() for each read we have in flight now.\n    for (let i = 0; i < this.count; i++) {\n      subscriber.beginRead()\n    }\n\n    return this.unsubscribeFromReads.bind(this, subscriber)\n  }\n\n  unsubscribeFromReads(subscriber: CacheSignal) {\n    if (!this.subscribedSignals) {\n      return\n    }\n    this.subscribedSignals.delete(subscriber)\n\n    // we don't need to set the set back to `null` if it's empty --\n    // if other signals are subscribing to this one, it'll likely get more subscriptions later,\n    // so we'd have to allocate a fresh set again when that happens.\n  }\n}\n\nfunction scheduleImmediateAndTimeoutWithCleanup(cb: () => void): () => void {\n  // If we decide to clean up the timeout, we want to remove\n  // either the immediate or the timeout, whichever is still pending.\n  let clearPending: () => void\n\n  const immediate = setImmediate(() => {\n    const timeout = setTimeout(cb, 0)\n    clearPending = clearTimeout.bind(null, timeout)\n  })\n  clearPending = clearImmediate.bind(null, immediate)\n\n  return () => clearPending()\n}\n","import type { ClientTraceDataEntry } from './tracer'\n\n/**\n * Takes OpenTelemetry client trace data and the `clientTraceMetadata` option configured in the Next.js config (currently\n * experimental) and returns a filtered/allowed list of client trace data entries.\n */\nexport function getTracedMetadata(\n  traceData: ClientTraceDataEntry[],\n  clientTraceMetadata: string[] | undefined\n): ClientTraceDataEntry[] | undefined {\n  if (!clientTraceMetadata) return undefined\n  return traceData.filter(({ key }) => clientTraceMetadata.includes(key))\n}\n","import type { ExperimentalConfig } from '../config-shared'\nimport { INFINITE_CACHE } from '../../lib/constants'\n\n/**\n * An AsyncIterable<number> that yields staleTime values. Each call to\n * `update()` yields the new value. When `close()` is called, the iteration\n * ends.\n *\n * This is included in the RSC payload so Flight serializes each yielded value\n * into the stream immediately. If the prerender is aborted by sync IO, the last\n * yielded value is already in the stream, allowing the prerender to be aborted\n * synchronously.\n */\nexport class StaleTimeIterable {\n  private _resolve: ((result: IteratorResult<number>) => void) | null = null\n  private _done = false\n  private _buffer: number[] = []\n\n  /** The last value passed to `update()`. */\n  public currentValue: number = 0\n\n  update(value: number): void {\n    if (this._done) return\n    this.currentValue = value\n    if (this._resolve) {\n      this._resolve({ value, done: false })\n      this._resolve = null\n    } else {\n      this._buffer.push(value)\n    }\n  }\n\n  close(): void {\n    if (this._done) return\n    this._done = true\n    if (this._resolve) {\n      this._resolve({ value: undefined, done: true })\n      this._resolve = null\n    }\n  }\n\n  [Symbol.asyncIterator](): AsyncIterator<number> {\n    return {\n      next: () => {\n        if (this._buffer.length > 0) {\n          return Promise.resolve({ value: this._buffer.shift()!, done: false })\n        }\n        if (this._done) {\n          return Promise.resolve({ value: undefined, done: true })\n        }\n        return new Promise<IteratorResult<number>>((resolve) => {\n          this._resolve = resolve\n        })\n      },\n    }\n  }\n}\n\nexport function createSelectStaleTime(experimental: ExperimentalConfig) {\n  return (stale: number) =>\n    stale === INFINITE_CACHE &&\n    typeof experimental.staleTimes?.static === 'number'\n      ? experimental.staleTimes.static\n      : stale\n}\n\n/**\n * Intercepts writes to the `stale` field on the prerender store and yields\n * each update (after applying selectStaleTime) through the iterable. This\n * ensures the latest stale time is always serialized in the Flight stream,\n * even if the prerender is aborted by sync IO.\n */\nexport function trackStaleTime(\n  store: { stale: number },\n  iterable: StaleTimeIterable,\n  selectStaleTime: (stale: number) => number\n): void {\n  let _stale = store.stale\n  iterable.update(selectStaleTime(_stale))\n  Object.defineProperty(store, 'stale', {\n    get: () => _stale,\n    set: (value: number) => {\n      _stale = value\n      iterable.update(selectStaleTime(value))\n    },\n    configurable: true,\n    enumerable: true,\n  })\n}\n\n/**\n * Closes the stale time iterable and waits for React to flush the closing\n * chunk into the Flight stream. This also allows the prerender to complete if\n * no other work is pending.\n *\n * Flight's internal work gets scheduled as a microtask when we close the\n * iterable. We need to ensure Flight's pending queues are emptied before this\n * function returns, because the caller will abort the prerender immediately\n * after. We can't use a macrotask (that would allow dynamic IO to sneak into\n * the response), so we use microtasks instead. The exact number of awaits\n * isn't important as long as we wait enough ticks for Flight to finish writing.\n */\nexport async function finishStaleTimeTracking(\n  iterable: StaleTimeIterable\n): Promise<void> {\n  iterable.close()\n  await Promise.resolve()\n  await Promise.resolve()\n  await Promise.resolve()\n}\n","/**\n * For chromium based browsers (Chrome, Edge, etc.) and Safari,\n * icons need to stay under <head> to be picked up by the browser.\n *\n */\nconst REINSERT_ICON_SCRIPT = `\\\ndocument.querySelectorAll('body link[rel=\"icon\"], body link[rel=\"apple-touch-icon\"]').forEach(el => document.head.appendChild(el))`\n\nexport function createServerInsertedMetadata(nonce: string | undefined) {\n  let inserted = false\n\n  return async function getServerInsertedMetadata(): Promise<string> {\n    if (inserted) {\n      return ''\n    }\n\n    inserted = true\n    return `<script ${nonce ? `nonce=\"${nonce}\"` : ''}>${REINSERT_ICON_SCRIPT}</script>`\n  }\n}\n","// regexp is based on https://github.com/sindresorhus/escape-string-regexp\nconst reHasRegExp = /[|\\\\{}()[\\]^$+*?.-]/\nconst reReplaceRegExp = /[|\\\\{}()[\\]^$+*?.-]/g\n\nexport function escapeStringRegexp(str: string) {\n  // see also: https://github.com/lodash/lodash/blob/2da024c3b4f9947a48517639de7560457cd4ec6c/escapeRegExp.js#L23\n  if (reHasRegExp.test(str)) {\n    return str.replace(reReplaceRegExp, '\\\\$&')\n  }\n  return str\n}\n","import {\n  NEXT_INTERCEPTION_MARKER_PREFIX,\n  NEXT_QUERY_PARAM_PREFIX,\n} from '../../../../lib/constants'\nimport { INTERCEPTION_ROUTE_MARKERS } from './interception-routes'\nimport { escapeStringRegexp } from '../../escape-regexp'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { PARAMETER_PATTERN, parseMatchedParameter } from './get-dynamic-param'\n\nexport interface Group {\n  pos: number\n  repeat: boolean\n  optional: boolean\n}\n\nexport interface RouteRegex {\n  groups: { [groupName: string]: Group }\n  re: RegExp\n}\n\nexport type RegexReference = {\n  names: Record<string, string>\n  intercepted: Record<string, string>\n}\n\ntype GetNamedRouteRegexOptions = {\n  /**\n   * Whether to prefix the route keys with the NEXT_INTERCEPTION_MARKER_PREFIX\n   * or NEXT_QUERY_PARAM_PREFIX. This is only relevant when creating the\n   * routes-manifest during the build.\n   */\n  prefixRouteKeys: boolean\n\n  /**\n   * Whether to include the suffix in the route regex. This means that when you\n   * have something like `/[...slug].json` the `.json` part will be included\n   * in the regex, yielding `/(.*).json` as the regex.\n   */\n  includeSuffix?: boolean\n\n  /**\n   * Whether to include the prefix in the route regex. This means that when you\n   * have something like `/[...slug].json` the `/` part will be included\n   * in the regex, yielding `^/(.*).json$` as the regex.\n   *\n   * Note that interception markers will already be included without the need\n   */\n  includePrefix?: boolean\n\n  /**\n   * Whether to exclude the optional trailing slash from the route regex.\n   */\n  excludeOptionalTrailingSlash?: boolean\n\n  /**\n   * Whether to backtrack duplicate keys. This is only relevant when creating\n   * the routes-manifest during the build.\n   */\n  backreferenceDuplicateKeys?: boolean\n\n  /**\n   * If provided, this will be used as the reference for the dynamic parameter\n   * keys instead of generating them in context. This is currently only used for\n   * interception routes.\n   */\n  reference?: RegexReference\n}\n\ntype GetRouteRegexOptions = {\n  /**\n   * Whether to include extra parts in the route regex. This means that when you\n   * have something like `/[...slug].json` the `.json` part will be included\n   * in the regex, yielding `/(.*).json` as the regex.\n   */\n  includeSuffix?: boolean\n\n  /**\n   * Whether to include the prefix in the route regex. This means that when you\n   * have something like `/[...slug].json` the `/` part will be included\n   * in the regex, yielding `^/(.*).json$` as the regex.\n   *\n   * Note that interception markers will already be included without the need\n   * of adding this option.\n   */\n  includePrefix?: boolean\n\n  /**\n   * Whether to exclude the optional trailing slash from the route regex.\n   */\n  excludeOptionalTrailingSlash?: boolean\n}\n\nfunction getParametrizedRoute(\n  route: string,\n  includeSuffix: boolean,\n  includePrefix: boolean\n) {\n  const groups: { [groupName: string]: Group } = {}\n  let groupIndex = 1\n\n  const segments: string[] = []\n  for (const segment of removeTrailingSlash(route).slice(1).split('/')) {\n    const markerMatch = INTERCEPTION_ROUTE_MARKERS.find((m) =>\n      segment.startsWith(m)\n    )\n    const paramMatches = segment.match(PARAMETER_PATTERN) // Check for parameters\n\n    if (markerMatch && paramMatches && paramMatches[2]) {\n      const { key, optional, repeat } = parseMatchedParameter(paramMatches[2])\n      groups[key] = { pos: groupIndex++, repeat, optional }\n      segments.push(`/${escapeStringRegexp(markerMatch)}([^/]+?)`)\n    } else if (paramMatches && paramMatches[2]) {\n      const { key, repeat, optional } = parseMatchedParameter(paramMatches[2])\n      groups[key] = { pos: groupIndex++, repeat, optional }\n\n      if (includePrefix && paramMatches[1]) {\n        segments.push(`/${escapeStringRegexp(paramMatches[1])}`)\n      }\n\n      let s = repeat ? (optional ? '(?:/(.+?))?' : '/(.+?)') : '/([^/]+?)'\n\n      // Remove the leading slash if includePrefix already added it.\n      if (includePrefix && paramMatches[1]) {\n        s = s.substring(1)\n      }\n\n      segments.push(s)\n    } else {\n      segments.push(`/${escapeStringRegexp(segment)}`)\n    }\n\n    // If there's a suffix, add it to the segments if it's enabled.\n    if (includeSuffix && paramMatches && paramMatches[3]) {\n      segments.push(escapeStringRegexp(paramMatches[3]))\n    }\n  }\n\n  return {\n    parameterizedRoute: segments.join(''),\n    groups,\n  }\n}\n\n/**\n * From a normalized route this function generates a regular expression and\n * a corresponding groups object intended to be used to store matching groups\n * from the regular expression.\n */\nexport function getRouteRegex(\n  normalizedRoute: string,\n  {\n    includeSuffix = false,\n    includePrefix = false,\n    excludeOptionalTrailingSlash = false,\n  }: GetRouteRegexOptions = {}\n): RouteRegex {\n  const { parameterizedRoute, groups } = getParametrizedRoute(\n    normalizedRoute,\n    includeSuffix,\n    includePrefix\n  )\n\n  let re = parameterizedRoute\n  if (!excludeOptionalTrailingSlash) {\n    re += '(?:/)?'\n  }\n\n  return {\n    re: new RegExp(`^${re}$`),\n    groups: groups,\n  }\n}\n\n/**\n * Builds a function to generate a minimal routeKey using only a-z and minimal\n * number of characters.\n */\nfunction buildGetSafeRouteKey() {\n  let i = 0\n\n  return () => {\n    let routeKey = ''\n    let j = ++i\n    while (j > 0) {\n      routeKey += String.fromCharCode(97 + ((j - 1) % 26))\n      j = Math.floor((j - 1) / 26)\n    }\n    return routeKey\n  }\n}\n\nfunction getSafeKeyFromSegment({\n  interceptionMarker,\n  getSafeRouteKey,\n  segment,\n  routeKeys,\n  keyPrefix,\n  backreferenceDuplicateKeys,\n}: {\n  interceptionMarker?: string\n  getSafeRouteKey: () => string\n  segment: string\n  routeKeys: Record<string, string>\n  keyPrefix?: string\n  backreferenceDuplicateKeys: boolean\n}) {\n  const { key, optional, repeat } = parseMatchedParameter(segment)\n\n  // replace any non-word characters since they can break\n  // the named regex\n  let cleanedKey = key.replace(/\\W/g, '')\n\n  if (keyPrefix) {\n    cleanedKey = `${keyPrefix}${cleanedKey}`\n  }\n  let invalidKey = false\n\n  // check if the key is still invalid and fallback to using a known\n  // safe key\n  if (cleanedKey.length === 0 || cleanedKey.length > 30) {\n    invalidKey = true\n  }\n  if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {\n    invalidKey = true\n  }\n\n  if (invalidKey) {\n    cleanedKey = getSafeRouteKey()\n  }\n\n  const duplicateKey = cleanedKey in routeKeys\n\n  if (keyPrefix) {\n    routeKeys[cleanedKey] = `${keyPrefix}${key}`\n  } else {\n    routeKeys[cleanedKey] = key\n  }\n\n  // if the segment has an interception marker, make sure that's part of the regex pattern\n  // this is to ensure that the route with the interception marker doesn't incorrectly match\n  // the non-intercepted route (ie /app/(.)[username] should not match /app/[username])\n  const interceptionPrefix = interceptionMarker\n    ? escapeStringRegexp(interceptionMarker)\n    : ''\n\n  let pattern: string\n  if (duplicateKey && backreferenceDuplicateKeys) {\n    // Use a backreference to the key to ensure that the key is the same value\n    // in each of the placeholders.\n    pattern = `\\\\k<${cleanedKey}>`\n  } else if (repeat) {\n    pattern = `(?<${cleanedKey}>.+?)`\n  } else {\n    pattern = `(?<${cleanedKey}>[^/]+?)`\n  }\n\n  return {\n    key,\n    pattern: optional\n      ? `(?:/${interceptionPrefix}${pattern})?`\n      : `/${interceptionPrefix}${pattern}`,\n    cleanedKey: cleanedKey,\n    optional,\n    repeat,\n  }\n}\n\nfunction getNamedParametrizedRoute(\n  route: string,\n  prefixRouteKeys: boolean,\n  includeSuffix: boolean,\n  includePrefix: boolean,\n  backreferenceDuplicateKeys: boolean,\n  reference: RegexReference = { names: {}, intercepted: {} }\n) {\n  const getSafeRouteKey = buildGetSafeRouteKey()\n  const routeKeys: { [named: string]: string } = {}\n\n  const segments: string[] = []\n  const inverseParts: string[] = []\n\n  // Ensure we don't mutate the original reference object.\n  reference = structuredClone(reference)\n\n  for (const segment of removeTrailingSlash(route).slice(1).split('/')) {\n    const hasInterceptionMarker = INTERCEPTION_ROUTE_MARKERS.some((m) =>\n      segment.startsWith(m)\n    )\n\n    const paramMatches = segment.match(PARAMETER_PATTERN) // Check for parameters\n\n    const interceptionMarker = hasInterceptionMarker\n      ? paramMatches?.[1]\n      : undefined\n\n    let keyPrefix: string | undefined\n    if (interceptionMarker && paramMatches?.[2]) {\n      keyPrefix = prefixRouteKeys ? NEXT_INTERCEPTION_MARKER_PREFIX : undefined\n      reference.intercepted[paramMatches[2]] = interceptionMarker\n    } else if (paramMatches?.[2] && reference.intercepted[paramMatches[2]]) {\n      keyPrefix = prefixRouteKeys ? NEXT_INTERCEPTION_MARKER_PREFIX : undefined\n    } else {\n      keyPrefix = prefixRouteKeys ? NEXT_QUERY_PARAM_PREFIX : undefined\n    }\n\n    if (interceptionMarker && paramMatches && paramMatches[2]) {\n      // If there's an interception marker, add it to the segments.\n      const { key, pattern, cleanedKey, repeat, optional } =\n        getSafeKeyFromSegment({\n          getSafeRouteKey,\n          interceptionMarker,\n          segment: paramMatches[2],\n          routeKeys,\n          keyPrefix,\n          backreferenceDuplicateKeys,\n        })\n\n      segments.push(pattern)\n      inverseParts.push(\n        `/${paramMatches[1]}:${reference.names[key] ?? cleanedKey}${repeat ? (optional ? '*' : '+') : ''}`\n      )\n      reference.names[key] ??= cleanedKey\n    } else if (paramMatches && paramMatches[2]) {\n      // If there's a prefix, add it to the segments if it's enabled.\n      if (includePrefix && paramMatches[1]) {\n        segments.push(`/${escapeStringRegexp(paramMatches[1])}`)\n        inverseParts.push(`/${paramMatches[1]}`)\n      }\n\n      const { key, pattern, cleanedKey, repeat, optional } =\n        getSafeKeyFromSegment({\n          getSafeRouteKey,\n          segment: paramMatches[2],\n          routeKeys,\n          keyPrefix,\n          backreferenceDuplicateKeys,\n        })\n\n      // Remove the leading slash if includePrefix already added it.\n      let s = pattern\n      if (includePrefix && paramMatches[1]) {\n        s = s.substring(1)\n      }\n\n      segments.push(s)\n      inverseParts.push(\n        `/:${reference.names[key] ?? cleanedKey}${repeat ? (optional ? '*' : '+') : ''}`\n      )\n      reference.names[key] ??= cleanedKey\n    } else {\n      segments.push(`/${escapeStringRegexp(segment)}`)\n      inverseParts.push(`/${segment}`)\n    }\n\n    // If there's a suffix, add it to the segments if it's enabled.\n    if (includeSuffix && paramMatches && paramMatches[3]) {\n      segments.push(escapeStringRegexp(paramMatches[3]))\n      inverseParts.push(paramMatches[3])\n    }\n  }\n\n  return {\n    namedParameterizedRoute: segments.join(''),\n    routeKeys,\n    pathToRegexpPattern: inverseParts.join(''),\n    reference,\n  }\n}\n\n/**\n * This function extends `getRouteRegex` generating also a named regexp where\n * each group is named along with a routeKeys object that indexes the assigned\n * named group with its corresponding key. When the routeKeys need to be\n * prefixed to uniquely identify internally the \"prefixRouteKey\" arg should\n * be \"true\" currently this is only the case when creating the routes-manifest\n * during the build\n */\nexport function getNamedRouteRegex(\n  normalizedRoute: string,\n  options: GetNamedRouteRegexOptions\n) {\n  const result = getNamedParametrizedRoute(\n    normalizedRoute,\n    options.prefixRouteKeys,\n    options.includeSuffix ?? false,\n    options.includePrefix ?? false,\n    options.backreferenceDuplicateKeys ?? false,\n    options.reference\n  )\n\n  let namedRegex = result.namedParameterizedRoute\n  if (!options.excludeOptionalTrailingSlash) {\n    namedRegex += '(?:/)?'\n  }\n\n  return {\n    ...getRouteRegex(normalizedRoute, options),\n    namedRegex: `^${namedRegex}$`,\n    routeKeys: result.routeKeys,\n    pathToRegexpPattern: result.pathToRegexpPattern,\n    reference: result.reference,\n  }\n}\n\n/**\n * Generates a named regexp.\n * This is intended to be using for build time only.\n */\nexport function getNamedMiddlewareRegex(\n  normalizedRoute: string,\n  options: {\n    catchAll?: boolean\n  }\n) {\n  const { parameterizedRoute } = getParametrizedRoute(\n    normalizedRoute,\n    false,\n    false\n  )\n  const { catchAll = true } = options\n  if (parameterizedRoute === '/') {\n    let catchAllRegex = catchAll ? '.*' : ''\n    return {\n      namedRegex: `^/${catchAllRegex}$`,\n    }\n  }\n\n  const { namedParameterizedRoute } = getNamedParametrizedRoute(\n    normalizedRoute,\n    false,\n    false,\n    false,\n    false,\n    undefined\n  )\n  let catchAllGroupedRegex = catchAll ? '(?:(/.*)?)' : ''\n  return {\n    namedRegex: `^${namedParameterizedRoute}${catchAllGroupedRegex}$`,\n  }\n}\n","import type { Token } from 'next/dist/compiled/path-to-regexp'\n\n/**\n * Route pattern normalization utilities for path-to-regexp compatibility.\n *\n * path-to-regexp 6.3.0+ introduced stricter validation that rejects certain\n * patterns commonly used in Next.js interception routes. This module provides\n * normalization functions to make Next.js route patterns compatible with the\n * updated library while preserving all functionality.\n */\n\n/**\n * Internal separator used to normalize adjacent parameter patterns.\n * This unique marker is inserted between adjacent parameters and stripped out\n * during parameter extraction to avoid conflicts with real URL content.\n */\nexport const PARAM_SEPARATOR = '_NEXTSEP_'\n\n/**\n * Detects if a route pattern needs normalization for path-to-regexp compatibility.\n */\nexport function hasAdjacentParameterIssues(route: string): boolean {\n  if (typeof route !== 'string') return false\n\n  // Check for interception route markers followed immediately by parameters\n  // Pattern: /(.):param, /(..):param, /(...):param, /(.)(.):param etc.\n  // These patterns cause \"Must have text between two parameters\" errors\n  if (/\\/\\(\\.{1,3}\\):[^/\\s]+/.test(route)) {\n    return true\n  }\n\n  // Check for basic adjacent parameters without separators\n  // Pattern: :param1:param2 (but not :param* or other URL patterns)\n  if (/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route)) {\n    return true\n  }\n\n  return false\n}\n\n/**\n * Normalizes route patterns that have adjacent parameters without text between them.\n * Inserts a unique separator that can be safely stripped out later.\n */\nexport function normalizeAdjacentParameters(route: string): string {\n  let normalized = route\n\n  // Handle interception route patterns: (.):param -> (.)_NEXTSEP_:param\n  normalized = normalized.replace(\n    /(\\([^)]*\\)):([^/\\s]+)/g,\n    `$1${PARAM_SEPARATOR}:$2`\n  )\n\n  // Handle other adjacent parameter patterns: :param1:param2 -> :param1_NEXTSEP_:param2\n  normalized = normalized.replace(/:([^:/\\s)]+)(?=:)/g, `:$1${PARAM_SEPARATOR}`)\n\n  return normalized\n}\n\n/**\n * Normalizes tokens that have repeating modifiers (* or +) but empty prefix and suffix.\n *\n * path-to-regexp 6.3.0+ introduced validation that throws:\n * \"Can not repeat without prefix/suffix\"\n *\n * This occurs when a token has modifier: '*' or '+' with both prefix: '' and suffix: ''\n */\nexport function normalizeTokensForRegexp(tokens: Token[]): Token[] {\n  return tokens.map((token) => {\n    // Token union type: Token = string | TokenObject\n    // Literal path segments are strings, parameters/wildcards are objects\n    if (\n      typeof token === 'object' &&\n      token !== null &&\n      // Not all token objects have 'modifier' property (e.g., simple text tokens)\n      'modifier' in token &&\n      // Only repeating modifiers (* or +) cause the validation error\n      // Other modifiers like '?' (optional) are fine\n      (token.modifier === '*' || token.modifier === '+') &&\n      // Token objects can have different shapes depending on route pattern\n      'prefix' in token &&\n      'suffix' in token &&\n      // Both prefix and suffix must be empty strings\n      // This is what causes the validation error in path-to-regexp\n      token.prefix === '' &&\n      token.suffix === ''\n    ) {\n      // Add minimal prefix to satisfy path-to-regexp validation\n      // We use '/' as it's the most common path delimiter and won't break route matching\n      // The prefix gets used in regex generation but doesn't affect parameter extraction\n      return {\n        ...token,\n        prefix: '/',\n      }\n    }\n    return token\n  })\n}\n\n/**\n * Strips normalization separators from compiled pathname.\n * This removes separators that were inserted by normalizeAdjacentParameters\n * to satisfy path-to-regexp validation.\n *\n * Only removes separators in the specific contexts where they were inserted:\n * - After interception route markers: (.)_NEXTSEP_ -> (.)\n *\n * This targeted approach ensures we don't accidentally remove the separator\n * from legitimate user content.\n */\nexport function stripNormalizedSeparators(pathname: string): string {\n  // Remove separator after interception route markers\n  // Pattern: (.)_NEXTSEP_ -> (.), (..)_NEXTSEP_ -> (..), etc.\n  // The separator appears after the closing paren of interception markers\n  return pathname.replace(new RegExp(`\\\\)${PARAM_SEPARATOR}`, 'g'), ')')\n}\n\n/**\n * Strips normalization separators from extracted route parameters.\n * Used by both server and client code to clean up parameters after route matching.\n */\nexport function stripParameterSeparators(\n  params: Record<string, any>\n): Record<string, any> {\n  const cleaned: Record<string, any> = {}\n\n  for (const [key, value] of Object.entries(params)) {\n    if (typeof value === 'string') {\n      // Remove the separator if it appears at the start of parameter values\n      cleaned[key] = value.replace(new RegExp(`^${PARAM_SEPARATOR}`), '')\n    } else if (Array.isArray(value)) {\n      // Handle array parameters (from repeated route segments)\n      cleaned[key] = value.map((item) =>\n        typeof item === 'string'\n          ? item.replace(new RegExp(`^${PARAM_SEPARATOR}`), '')\n          : item\n      )\n    } else {\n      cleaned[key] = value\n    }\n  }\n\n  return cleaned\n}\n","/**\n * Client-safe utilities for route matching that don't import server-side\n * utilities to avoid bundling issues with Turbopack\n */\n\nimport type {\n  Key,\n  TokensToRegexpOptions,\n  ParseOptions,\n  TokensToFunctionOptions,\n} from 'next/dist/compiled/path-to-regexp'\nimport {\n  pathToRegexp,\n  compile,\n  regexpToFunction,\n} from 'next/dist/compiled/path-to-regexp'\nimport {\n  hasAdjacentParameterIssues,\n  normalizeAdjacentParameters,\n  stripParameterSeparators,\n  stripNormalizedSeparators,\n} from '../../../../lib/route-pattern-normalizer'\n\n/**\n * Client-safe wrapper around pathToRegexp that handles path-to-regexp 6.3.0+ validation errors.\n * This includes both \"Can not repeat without prefix/suffix\" and \"Must have text between parameters\" errors.\n */\nexport function safePathToRegexp(\n  route: string | RegExp | Array<string | RegExp>,\n  keys?: Key[],\n  options?: TokensToRegexpOptions & ParseOptions\n): RegExp {\n  if (typeof route !== 'string') {\n    return pathToRegexp(route, keys, options)\n  }\n\n  // Check if normalization is needed and cache the result\n  const needsNormalization = hasAdjacentParameterIssues(route)\n  const routeToUse = needsNormalization\n    ? normalizeAdjacentParameters(route)\n    : route\n\n  try {\n    return pathToRegexp(routeToUse, keys, options)\n  } catch (error) {\n    // Only try normalization if we haven't already normalized\n    if (!needsNormalization) {\n      try {\n        const normalizedRoute = normalizeAdjacentParameters(route)\n        return pathToRegexp(normalizedRoute, keys, options)\n      } catch (retryError) {\n        // If that doesn't work, fall back to original error\n        throw error\n      }\n    }\n    throw error\n  }\n}\n\n/**\n * Client-safe wrapper around compile that handles path-to-regexp 6.3.0+ validation errors.\n * No server-side error reporting to avoid bundling issues.\n * When normalization is applied, the returned compiler function automatically strips\n * the internal separator from the output URL.\n */\nexport function safeCompile(\n  route: string,\n  options?: TokensToFunctionOptions & ParseOptions\n) {\n  // Check if normalization is needed and cache the result\n  const needsNormalization = hasAdjacentParameterIssues(route)\n  const routeToUse = needsNormalization\n    ? normalizeAdjacentParameters(route)\n    : route\n\n  try {\n    const compiler = compile(routeToUse, options)\n\n    // If we normalized the route, wrap the compiler to strip separators from output\n    // The normalization inserts _NEXTSEP_ as a literal string in the pattern to satisfy\n    // path-to-regexp validation, but we don't want it in the final compiled URL\n    if (needsNormalization) {\n      return (params: any) => {\n        return stripNormalizedSeparators(compiler(params))\n      }\n    }\n\n    return compiler\n  } catch (error) {\n    // Only try normalization if we haven't already normalized\n    if (!needsNormalization) {\n      try {\n        const normalizedRoute = normalizeAdjacentParameters(route)\n        const compiler = compile(normalizedRoute, options)\n\n        // Wrap the compiler to strip separators from output\n        return (params: any) => {\n          return stripNormalizedSeparators(compiler(params))\n        }\n      } catch (retryError) {\n        // If that doesn't work, fall back to original error\n        throw error\n      }\n    }\n    throw error\n  }\n}\n\n/**\n * Client-safe wrapper around regexpToFunction that automatically cleans parameters.\n */\nexport function safeRegexpToFunction<\n  T extends Record<string, any> = Record<string, any>,\n>(regexp: RegExp, keys?: Key[]): (pathname: string) => { params: T } | false {\n  const originalMatcher = regexpToFunction<T>(regexp, keys || [])\n\n  return (pathname: string) => {\n    const result = originalMatcher(pathname)\n    if (!result) return false\n\n    // Clean parameters before returning\n    return {\n      ...result,\n      params: stripParameterSeparators(result.params as any) as T,\n    }\n  }\n}\n\n/**\n * Safe wrapper for route matcher functions that automatically cleans parameters.\n * This is client-safe and doesn't import path-to-regexp.\n */\nexport function safeRouteMatcher<T extends Record<string, any>>(\n  matcherFn: (pathname: string) => false | T\n): (pathname: string) => false | T {\n  return (pathname: string) => {\n    const result = matcherFn(pathname)\n    if (!result) return false\n\n    // Clean parameters before returning\n    return stripParameterSeparators(result) as T\n  }\n}\n","import type { Group } from './route-regex'\nimport { DecodeError } from '../../utils'\nimport type { Params } from '../../../../server/request/params'\nimport { safeRouteMatcher } from './route-match-utils'\n\nexport interface RouteMatchFn {\n  (pathname: string): false | Params\n}\n\ntype RouteMatcherOptions = {\n  // We only use the exec method of the RegExp object. This helps us avoid using\n  // type assertions that the passed in properties are of the correct type.\n  re: Pick<RegExp, 'exec'>\n  groups: Record<string, Group>\n}\n\nexport function getRouteMatcher({\n  re,\n  groups,\n}: RouteMatcherOptions): RouteMatchFn {\n  const rawMatcher = (pathname: string) => {\n    const routeMatch = re.exec(pathname)\n    if (!routeMatch) return false\n\n    const decode = (param: string) => {\n      try {\n        return decodeURIComponent(param)\n      } catch {\n        throw new DecodeError('failed to decode param')\n      }\n    }\n\n    const params: Params = {}\n    for (const [key, group] of Object.entries(groups)) {\n      const match = routeMatch[group.pos]\n      if (match !== undefined) {\n        if (group.repeat) {\n          params[key] = match.split('/').map((entry) => decode(entry))\n        } else {\n          params[key] = decode(match)\n        }\n      }\n    }\n\n    return params\n  }\n\n  // Wrap with safe matcher to handle parameter cleaning\n  return safeRouteMatcher(rawMatcher)\n}\n","import type { IncomingMessage } from 'http'\nimport type { Key } from 'next/dist/compiled/path-to-regexp'\nimport type { NextParsedUrlQuery } from '../../../../server/request-meta'\nimport type { RouteHas } from '../../../../lib/load-custom-routes'\nimport type { BaseNextRequest } from '../../../../server/base-http'\n\nimport { escapeStringRegexp } from '../../escape-regexp'\nimport { parseUrl, type ParsedUrl } from './parse-url'\nimport {\n  INTERCEPTION_ROUTE_MARKERS,\n  isInterceptionRouteAppPath,\n} from './interception-routes'\nimport { getCookieParser } from '../../../../server/api-utils/get-cookie-parser'\nimport type { Params } from '../../../../server/request/params'\nimport { safePathToRegexp, safeCompile } from './route-match-utils'\n\n/**\n * Ensure only a-zA-Z are used for param names for proper interpolating\n * with path-to-regexp\n */\nfunction getSafeParamName(paramName: string) {\n  let newParamName = ''\n\n  for (let i = 0; i < paramName.length; i++) {\n    const charCode = paramName.charCodeAt(i)\n\n    if (\n      (charCode > 64 && charCode < 91) || // A-Z\n      (charCode > 96 && charCode < 123) // a-z\n    ) {\n      newParamName += paramName[i]\n    }\n  }\n  return newParamName\n}\n\nfunction escapeSegment(str: string, segmentName: string) {\n  return str.replace(\n    new RegExp(`:${escapeStringRegexp(segmentName)}`, 'g'),\n    `__ESC_COLON_${segmentName}`\n  )\n}\n\nfunction unescapeSegments(str: string) {\n  return str.replace(/__ESC_COLON_/gi, ':')\n}\n\nexport function matchHas(\n  req: BaseNextRequest | IncomingMessage,\n  query: Params,\n  has: RouteHas[] = [],\n  missing: RouteHas[] = []\n): false | Params {\n  const params: Params = {}\n\n  const hasMatch = (hasItem: RouteHas) => {\n    let value\n    let key = hasItem.key\n\n    switch (hasItem.type) {\n      case 'header': {\n        key = key!.toLowerCase()\n        value = req.headers[key] as string\n        break\n      }\n      case 'cookie': {\n        if ('cookies' in req) {\n          value = req.cookies[hasItem.key]\n        } else {\n          const cookies = getCookieParser(req.headers)()\n          value = cookies[hasItem.key]\n        }\n\n        break\n      }\n      case 'query': {\n        value = query[key!]\n        break\n      }\n      case 'host': {\n        const { host } = req?.headers || {}\n        // remove port from host if present\n        const hostname = host?.split(':', 1)[0].toLowerCase()\n        value = hostname\n        break\n      }\n      default: {\n        break\n      }\n    }\n\n    if (!hasItem.value && value) {\n      params[getSafeParamName(key!)] = value\n      return true\n    } else if (value) {\n      const matcher = new RegExp(`^${hasItem.value}$`)\n      const matches = Array.isArray(value)\n        ? value.slice(-1)[0].match(matcher)\n        : value.match(matcher)\n\n      if (matches) {\n        if (Array.isArray(matches)) {\n          if (matches.groups) {\n            Object.keys(matches.groups).forEach((groupKey) => {\n              params[groupKey] = matches.groups![groupKey]\n            })\n          } else if (hasItem.type === 'host' && matches[0]) {\n            params.host = matches[0]\n          }\n        }\n        return true\n      }\n    }\n    return false\n  }\n\n  const allMatch =\n    has.every((item) => hasMatch(item)) &&\n    !missing.some((item) => hasMatch(item))\n\n  if (allMatch) {\n    return params\n  }\n  return false\n}\n\nexport function compileNonPath(value: string, params: Params): string {\n  if (!value.includes(':')) {\n    return value\n  }\n\n  for (const key of Object.keys(params)) {\n    if (value.includes(`:${key}`)) {\n      value = value\n        .replace(\n          new RegExp(`:${key}\\\\*`, 'g'),\n          `:${key}--ESCAPED_PARAM_ASTERISKS`\n        )\n        .replace(\n          new RegExp(`:${key}\\\\?`, 'g'),\n          `:${key}--ESCAPED_PARAM_QUESTION`\n        )\n        .replace(new RegExp(`:${key}\\\\+`, 'g'), `:${key}--ESCAPED_PARAM_PLUS`)\n        .replace(\n          new RegExp(`:${key}(?!\\\\w)`, 'g'),\n          `--ESCAPED_PARAM_COLON${key}`\n        )\n    }\n  }\n  value = value\n    .replace(/(:|\\*|\\?|\\+|\\(|\\)|\\{|\\})/g, '\\\\$1')\n    .replace(/--ESCAPED_PARAM_PLUS/g, '+')\n    .replace(/--ESCAPED_PARAM_COLON/g, ':')\n    .replace(/--ESCAPED_PARAM_QUESTION/g, '?')\n    .replace(/--ESCAPED_PARAM_ASTERISKS/g, '*')\n\n  // the value needs to start with a forward-slash to be compiled\n  // correctly\n  return safeCompile(`/${value}`, { validate: false })(params).slice(1)\n}\n\nexport function parseDestination(args: {\n  destination: string\n  params: Readonly<Params>\n  query: Readonly<NextParsedUrlQuery>\n}): ParsedUrl {\n  let escaped = args.destination\n  for (const param of Object.keys({ ...args.params, ...args.query })) {\n    if (!param) continue\n\n    escaped = escapeSegment(escaped, param)\n  }\n\n  const parsed = parseUrl(escaped)\n\n  let pathname = parsed.pathname\n  if (pathname) {\n    pathname = unescapeSegments(pathname)\n  }\n\n  let href = parsed.href\n  if (href) {\n    href = unescapeSegments(href)\n  }\n\n  let hostname = parsed.hostname\n  if (hostname) {\n    hostname = unescapeSegments(hostname)\n  }\n\n  let hash = parsed.hash\n  if (hash) {\n    hash = unescapeSegments(hash)\n  }\n\n  let search = parsed.search\n  if (search) {\n    search = unescapeSegments(search)\n  }\n\n  let origin = parsed.origin\n  if (origin) {\n    origin = unescapeSegments(origin)\n  }\n\n  return {\n    ...parsed,\n    pathname,\n    hostname,\n    href,\n    hash,\n    search,\n    origin,\n  }\n}\n\nexport function prepareDestination(args: {\n  appendParamsToQuery: boolean\n  destination: string\n  params: Params\n  query: NextParsedUrlQuery\n}) {\n  const parsedDestination = parseDestination(args)\n\n  const {\n    hostname: destHostname,\n    query: destQuery,\n    search: destSearch,\n  } = parsedDestination\n\n  // The following code assumes that the pathname here includes the hash if it's\n  // present.\n  let destPath = parsedDestination.pathname\n  if (parsedDestination.hash) {\n    destPath = `${destPath}${parsedDestination.hash}`\n  }\n\n  const destParams: (string | number)[] = []\n\n  const destPathParamKeys: Key[] = []\n  safePathToRegexp(destPath, destPathParamKeys)\n  for (const key of destPathParamKeys) {\n    destParams.push(key.name)\n  }\n\n  if (destHostname) {\n    const destHostnameParamKeys: Key[] = []\n    safePathToRegexp(destHostname, destHostnameParamKeys)\n    for (const key of destHostnameParamKeys) {\n      destParams.push(key.name)\n    }\n  }\n\n  const destPathCompiler = safeCompile(\n    destPath,\n    // we don't validate while compiling the destination since we should\n    // have already validated before we got to this point and validating\n    // breaks compiling destinations with named pattern params from the source\n    // e.g. /something:hello(.*) -> /another/:hello is broken with validation\n    // since compile validation is meant for reversing and not for inserting\n    // params from a separate path-regex into another\n    { validate: false }\n  )\n\n  let destHostnameCompiler\n  if (destHostname) {\n    destHostnameCompiler = safeCompile(destHostname, { validate: false })\n  }\n\n  // update any params in query values\n  for (const [key, strOrArray] of Object.entries(destQuery)) {\n    // the value needs to start with a forward-slash to be compiled\n    // correctly\n    if (Array.isArray(strOrArray)) {\n      destQuery[key] = strOrArray.map((value) =>\n        compileNonPath(unescapeSegments(value), args.params)\n      )\n    } else if (typeof strOrArray === 'string') {\n      destQuery[key] = compileNonPath(unescapeSegments(strOrArray), args.params)\n    }\n  }\n\n  // add path params to query if it's not a redirect and not\n  // already defined in destination query or path\n  let paramKeys = Object.keys(args.params).filter(\n    (name) => name !== 'nextInternalLocale'\n  )\n\n  if (\n    args.appendParamsToQuery &&\n    !paramKeys.some((key) => destParams.includes(key))\n  ) {\n    for (const key of paramKeys) {\n      if (!(key in destQuery)) {\n        destQuery[key] = args.params[key]\n      }\n    }\n  }\n\n  let newUrl\n\n  // The compiler also that the interception route marker is an unnamed param, hence '0',\n  // so we need to add it to the params object.\n  if (isInterceptionRouteAppPath(destPath)) {\n    for (const segment of destPath.split('/')) {\n      const marker = INTERCEPTION_ROUTE_MARKERS.find((m) =>\n        segment.startsWith(m)\n      )\n      if (marker) {\n        if (marker === '(..)(..)') {\n          args.params['0'] = '(..)'\n          args.params['1'] = '(..)'\n        } else {\n          args.params['0'] = marker\n        }\n        break\n      }\n    }\n  }\n\n  try {\n    newUrl = destPathCompiler(args.params)\n\n    const [pathname, hash] = newUrl.split('#', 2)\n    if (destHostnameCompiler) {\n      parsedDestination.hostname = destHostnameCompiler(args.params)\n    }\n    parsedDestination.pathname = pathname\n    parsedDestination.hash = `${hash ? '#' : ''}${hash || ''}`\n    parsedDestination.search = destSearch\n      ? compileNonPath(destSearch, args.params)\n      : ''\n  } catch (err: any) {\n    if (err.message.match(/Expected .*? to not repeat, but got an array/)) {\n      throw new Error(\n        `To use a multi-match in the destination you must add \\`*\\` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match`\n      )\n    }\n    throw err\n  }\n\n  // Query merge order lowest priority to highest\n  // 1. initial URL query values\n  // 2. path segment values\n  // 3. destination specified query values\n  parsedDestination.query = {\n    ...args.query,\n    ...parsedDestination.query,\n  }\n\n  return {\n    newUrl,\n    destQuery,\n    parsedDestination,\n  }\n}\n","/**\n * Decodes a query path parameter.\n *\n * @param value - The value to decode.\n * @returns The decoded value.\n */\nexport function decodeQueryPathParameter(value: string) {\n  // When deployed to Vercel, the value may be encoded, so this attempts to\n  // decode it and returns the original value if it fails.\n  try {\n    return decodeURIComponent(value)\n  } catch {\n    return value\n  }\n}\n","import type { UrlWithParsedQuery } from 'url'\nimport { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers'\n\nconst DUMMY_ORIGIN = 'http://n'\n\nexport function isFullStringUrl(url: string) {\n  return /https?:\\/\\//.test(url)\n}\n\nexport function parseUrl(url: string): URL | undefined {\n  let parsed: URL | undefined = undefined\n  try {\n    parsed = new URL(url, DUMMY_ORIGIN)\n  } catch {}\n  return parsed\n}\n\nexport function parseReqUrl(url: string): UrlWithParsedQuery | undefined {\n  const parsedUrl: URL | undefined = parseUrl(url)\n\n  if (!parsedUrl) {\n    return\n  }\n\n  const query: Record<string, string | string[]> = {}\n\n  for (const key of parsedUrl.searchParams.keys()) {\n    const values = parsedUrl.searchParams.getAll(key)\n    query[key] = values.length > 1 ? values : values[0]\n  }\n\n  const legacyUrl: UrlWithParsedQuery = {\n    query,\n    hash: parsedUrl.hash,\n    search: parsedUrl.search,\n    path: parsedUrl.pathname,\n    pathname: parsedUrl.pathname,\n    href: `${parsedUrl.pathname}${parsedUrl.search}${parsedUrl.hash}`,\n    host: '',\n    hostname: '',\n    auth: '',\n    protocol: '',\n    slashes: null,\n    port: '',\n  }\n  return legacyUrl\n}\n\nexport function stripNextRscUnionQuery(relativeUrl: string): string {\n  const urlInstance = new URL(relativeUrl, DUMMY_ORIGIN)\n  urlInstance.searchParams.delete(NEXT_RSC_UNION_QUERY)\n\n  return urlInstance.pathname + urlInstance.search\n}\n","// Format function modified from nodejs\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport type { UrlObject } from 'url'\nimport type { ParsedUrlQuery } from 'querystring'\nimport * as querystring from './querystring'\n\nconst slashedProtocols = /https?|ftp|gopher|file/\n\nexport function formatUrl(urlObj: UrlObject) {\n  let { auth, hostname } = urlObj\n  let protocol = urlObj.protocol || ''\n  let pathname = urlObj.pathname || ''\n  let hash = urlObj.hash || ''\n  let query = urlObj.query || ''\n  let host: string | false = false\n\n  auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : ''\n\n  if (urlObj.host) {\n    host = auth + urlObj.host\n  } else if (hostname) {\n    host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname)\n    if (urlObj.port) {\n      host += ':' + urlObj.port\n    }\n  }\n\n  if (query && typeof query === 'object') {\n    query = String(querystring.urlQueryToSearchParams(query as ParsedUrlQuery))\n  }\n\n  let search = urlObj.search || (query && `?${query}`) || ''\n\n  if (protocol && !protocol.endsWith(':')) protocol += ':'\n\n  if (\n    urlObj.slashes ||\n    ((!protocol || slashedProtocols.test(protocol)) && host !== false)\n  ) {\n    host = '//' + (host || '')\n    if (pathname && pathname[0] !== '/') pathname = '/' + pathname\n  } else if (!host) {\n    host = ''\n  }\n\n  if (hash && hash[0] !== '#') hash = '#' + hash\n  if (search && search[0] !== '?') search = '?' + search\n\n  pathname = pathname.replace(/[?#]/g, encodeURIComponent)\n  search = search.replace('#', '%23')\n\n  return `${protocol}${host}${pathname}${search}${hash}`\n}\n\nexport const urlObjectKeys = [\n  'auth',\n  'hash',\n  'host',\n  'hostname',\n  'href',\n  'path',\n  'pathname',\n  'port',\n  'protocol',\n  'query',\n  'search',\n  'slashes',\n]\n\nexport function formatWithValidation(url: UrlObject): string {\n  if (process.env.NODE_ENV === 'development') {\n    if (url !== null && typeof url === 'object') {\n      Object.keys(url).forEach((key) => {\n        if (!urlObjectKeys.includes(key)) {\n          console.warn(\n            `Unknown key passed via urlObject into url.format: ${key}`\n          )\n        }\n      })\n    }\n  }\n\n  return formatUrl(url)\n}\n","import type { Rewrite } from '../lib/load-custom-routes'\nimport type { RouteMatchFn } from '../shared/lib/router/utils/route-matcher'\nimport type { NextConfig } from './config'\nimport type { BaseNextRequest } from './base-http'\nimport type { NextUrlWithParsedQuery } from './request-meta'\nimport type { ParsedUrlQuery } from 'querystring'\n\nimport { normalizeLocalePath } from '../shared/lib/i18n/normalize-locale-path'\nimport { getPathMatch } from '../shared/lib/router/utils/path-match'\nimport { getNamedRouteRegex } from '../shared/lib/router/utils/route-regex'\nimport { getRouteMatcher } from '../shared/lib/router/utils/route-matcher'\nimport {\n  matchHas,\n  prepareDestination,\n} from '../shared/lib/router/utils/prepare-destination'\nimport { removeTrailingSlash } from '../shared/lib/router/utils/remove-trailing-slash'\nimport { normalizeRscURL } from '../shared/lib/router/utils/app-paths'\nimport {\n  NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER,\n  NEXT_CACHE_REVALIDATED_TAGS_HEADER,\n  NEXT_INTERCEPTION_MARKER_PREFIX,\n  NEXT_QUERY_PARAM_PREFIX,\n} from '../lib/constants'\nimport { normalizeNextQueryParam } from './web/utils'\nimport type { IncomingHttpHeaders, IncomingMessage } from 'http'\nimport { decodeQueryPathParameter } from './lib/decode-query-path-parameter'\nimport type { DeepReadonly } from '../shared/lib/deep-readonly'\nimport { parseReqUrl } from '../lib/url'\nimport { formatUrl } from '../shared/lib/router/utils/format-url'\n\nfunction filterInternalQuery(\n  query: Record<string, undefined | string | string[]>,\n  paramKeys: string[]\n) {\n  // this is used to pass query information in rewrites\n  // but should not be exposed in final query\n  delete query['nextInternalLocale']\n\n  for (const key in query) {\n    const isNextQueryPrefix =\n      key !== NEXT_QUERY_PARAM_PREFIX && key.startsWith(NEXT_QUERY_PARAM_PREFIX)\n\n    const isNextInterceptionMarkerPrefix =\n      key !== NEXT_INTERCEPTION_MARKER_PREFIX &&\n      key.startsWith(NEXT_INTERCEPTION_MARKER_PREFIX)\n\n    if (\n      isNextQueryPrefix ||\n      isNextInterceptionMarkerPrefix ||\n      paramKeys.includes(key)\n    ) {\n      delete query[key]\n    }\n  }\n}\n\nexport function normalizeCdnUrl(\n  req: BaseNextRequest | IncomingMessage,\n  paramKeys: string[]\n) {\n  // make sure to normalize req.url from CDNs to strip dynamic and rewrite\n  // params from the query which are added during routing\n  const _parsedUrl = parseReqUrl(req.url!)\n\n  // we can't normalize if we can't parse\n  if (!_parsedUrl) {\n    return req.url\n  }\n  delete (_parsedUrl as any).search\n  filterInternalQuery(_parsedUrl.query, paramKeys)\n\n  req.url = formatUrl(_parsedUrl)\n}\n\nexport function interpolateDynamicPath(\n  pathname: string,\n  params: ParsedUrlQuery,\n  defaultRouteRegex?: ReturnType<typeof getNamedRouteRegex> | undefined\n) {\n  if (!defaultRouteRegex) return pathname\n\n  for (const param of Object.keys(defaultRouteRegex.groups)) {\n    const { optional, repeat } = defaultRouteRegex.groups[param]\n    let builtParam = `[${repeat ? '...' : ''}${param}]`\n\n    if (optional) {\n      builtParam = `[${builtParam}]`\n    }\n\n    let paramValue: string\n    const value = params[param]\n\n    if (Array.isArray(value)) {\n      paramValue = value.map((v) => v && encodeURIComponent(v)).join('/')\n    } else if (value) {\n      paramValue = encodeURIComponent(value)\n    } else {\n      paramValue = ''\n    }\n\n    if (paramValue || optional) {\n      pathname = pathname.replaceAll(builtParam, paramValue)\n    }\n  }\n\n  return pathname\n}\n\nexport function normalizeDynamicRouteParams(\n  query: ParsedUrlQuery,\n  defaultRouteRegex: ReturnType<typeof getNamedRouteRegex>,\n  defaultRouteMatches: ParsedUrlQuery,\n  ignoreMissingOptional: boolean\n) {\n  let hasValidParams = true\n  let params: ParsedUrlQuery = {}\n\n  for (const key of Object.keys(defaultRouteRegex.groups)) {\n    let value: string | string[] | undefined = query[key]\n\n    if (typeof value === 'string') {\n      value = normalizeRscURL(value)\n    } else if (Array.isArray(value)) {\n      value = value.map(normalizeRscURL)\n    }\n\n    // if the value matches the default value we can't rely\n    // on the parsed params, this is used to signal if we need\n    // to parse x-now-route-matches or not\n    const defaultValue = defaultRouteMatches![key]\n    const isOptional = defaultRouteRegex!.groups[key].optional\n\n    const isDefaultValue = Array.isArray(defaultValue)\n      ? defaultValue.some((defaultVal) => {\n          return Array.isArray(value)\n            ? value.some((val) => val.includes(defaultVal))\n            : value?.includes(defaultVal)\n        })\n      : value?.includes(defaultValue as string)\n\n    if (\n      isDefaultValue ||\n      (typeof value === 'undefined' && !(isOptional && ignoreMissingOptional))\n    ) {\n      return { params: {}, hasValidParams: false }\n    }\n\n    // non-provided optional values should be undefined so normalize\n    // them to undefined\n    if (\n      isOptional &&\n      (!value ||\n        (Array.isArray(value) &&\n          value.length === 1 &&\n          // fallback optional catch-all SSG pages have\n          // [[...paramName]] for the root path on Vercel\n          (value[0] === 'index' || value[0] === `[[...${key}]]`)) ||\n        value === 'index' ||\n        value === `[[...${key}]]`)\n    ) {\n      value = undefined\n      delete query[key]\n    }\n\n    // query values from the proxy aren't already split into arrays\n    // so make sure to normalize catch-all values\n    if (\n      value &&\n      typeof value === 'string' &&\n      defaultRouteRegex!.groups[key].repeat\n    ) {\n      value = value.split('/')\n    }\n\n    if (value) {\n      params[key] = value\n    }\n  }\n\n  return {\n    params,\n    hasValidParams,\n  }\n}\n\nexport function getServerUtils({\n  page,\n  i18n,\n  basePath,\n  rewrites,\n  pageIsDynamic,\n  trailingSlash,\n  caseSensitive,\n}: {\n  page: string\n  i18n?: NextConfig['i18n']\n  basePath: string\n  rewrites: DeepReadonly<{\n    fallback?: ReadonlyArray<Rewrite>\n    afterFiles?: ReadonlyArray<Rewrite>\n    beforeFiles?: ReadonlyArray<Rewrite>\n  }>\n  pageIsDynamic: boolean\n  trailingSlash?: boolean\n  caseSensitive: boolean\n}) {\n  let defaultRouteRegex: ReturnType<typeof getNamedRouteRegex> | undefined\n  let dynamicRouteMatcher: RouteMatchFn | undefined\n  let defaultRouteMatches: ParsedUrlQuery | undefined\n\n  if (pageIsDynamic) {\n    defaultRouteRegex = getNamedRouteRegex(page, {\n      prefixRouteKeys: false,\n    })\n    dynamicRouteMatcher = getRouteMatcher(defaultRouteRegex)\n    defaultRouteMatches = dynamicRouteMatcher(page) as ParsedUrlQuery\n  }\n\n  function handleRewrites(\n    req: BaseNextRequest | IncomingMessage,\n    parsedUrl: DeepReadonly<NextUrlWithParsedQuery>\n  ) {\n    // Here we deep clone the parsedUrl to avoid mutating the original. We also\n    // cast this to a mutable type so we can mutate it within this scope.\n    const rewrittenParsedUrl = structuredClone(\n      parsedUrl\n    ) as NextUrlWithParsedQuery\n    const rewriteParams: Record<string, string> = {}\n    let fsPathname = rewrittenParsedUrl.pathname\n\n    const matchesPage = () => {\n      const fsPathnameNoSlash = removeTrailingSlash(fsPathname || '')\n      return (\n        fsPathnameNoSlash === removeTrailingSlash(page) ||\n        dynamicRouteMatcher?.(fsPathnameNoSlash)\n      )\n    }\n\n    const checkRewrite = (rewrite: DeepReadonly<Rewrite>): boolean => {\n      const matcher = getPathMatch(\n        rewrite.source + (trailingSlash ? '(/)?' : ''),\n        {\n          removeUnnamedParams: true,\n          strict: true,\n          sensitive: !!caseSensitive,\n        }\n      )\n\n      if (!rewrittenParsedUrl.pathname) return false\n\n      let params = matcher(rewrittenParsedUrl.pathname)\n\n      if ((rewrite.has || rewrite.missing) && params) {\n        const hasParams = matchHas(\n          req,\n          rewrittenParsedUrl.query,\n          rewrite.has as Rewrite['has'],\n          rewrite.missing as Rewrite['missing']\n        )\n\n        if (hasParams) {\n          Object.assign(params, hasParams)\n        } else {\n          params = false\n        }\n      }\n\n      if (params) {\n        const { parsedDestination, destQuery } = prepareDestination({\n          appendParamsToQuery: true,\n          destination: rewrite.destination,\n          params: params,\n          query: rewrittenParsedUrl.query,\n        })\n\n        // if the rewrite destination is external break rewrite chain\n        if (parsedDestination.protocol) {\n          return true\n        }\n\n        Object.assign(rewriteParams, destQuery, params)\n        Object.assign(rewrittenParsedUrl.query, parsedDestination.query)\n        delete (parsedDestination as any).query\n\n        Object.assign(rewrittenParsedUrl, parsedDestination)\n\n        fsPathname = rewrittenParsedUrl.pathname\n        if (!fsPathname) return false\n\n        if (basePath) {\n          fsPathname = fsPathname.replace(new RegExp(`^${basePath}`), '') || '/'\n        }\n\n        if (i18n) {\n          const result = normalizeLocalePath(fsPathname, i18n.locales)\n          fsPathname = result.pathname\n          rewrittenParsedUrl.query.nextInternalLocale =\n            result.detectedLocale || params.nextInternalLocale\n        }\n\n        if (fsPathname === page) {\n          return true\n        }\n\n        if (pageIsDynamic && dynamicRouteMatcher) {\n          const dynamicParams = dynamicRouteMatcher(fsPathname)\n          if (dynamicParams) {\n            rewrittenParsedUrl.query = {\n              ...rewrittenParsedUrl.query,\n              ...dynamicParams,\n            }\n            return true\n          }\n        }\n      }\n\n      return false\n    }\n\n    for (const rewrite of rewrites.beforeFiles || []) {\n      checkRewrite(rewrite)\n    }\n\n    if (fsPathname !== page) {\n      let finished = false\n\n      for (const rewrite of rewrites.afterFiles || []) {\n        finished = checkRewrite(rewrite)\n        if (finished) break\n      }\n\n      if (!finished && !matchesPage()) {\n        for (const rewrite of rewrites.fallback || []) {\n          finished = checkRewrite(rewrite)\n          if (finished) break\n        }\n      }\n    }\n\n    return { rewriteParams, rewrittenParsedUrl }\n  }\n\n  function getParamsFromRouteMatches(routeMatchesHeader: string) {\n    // If we don't have a default route regex, we can't get params from route\n    // matches\n    if (!defaultRouteRegex) return null\n\n    const { groups, routeKeys } = defaultRouteRegex\n\n    const matcher = getRouteMatcher({\n      re: {\n        // Simulate a RegExp match from the \\`req.url\\` input\n        exec: (str: string) => {\n          // Normalize all the prefixed query params.\n          const obj: Record<string, string> = Object.fromEntries(\n            new URLSearchParams(str)\n          )\n          for (const [key, value] of Object.entries(obj)) {\n            const normalizedKey = normalizeNextQueryParam(key)\n            if (!normalizedKey) continue\n\n            obj[normalizedKey] = value\n            delete obj[key]\n          }\n\n          // Use all the named route keys.\n          const result = {} as RegExpExecArray\n          for (const keyName of Object.keys(routeKeys)) {\n            const paramName = routeKeys[keyName]\n\n            // If this param name is not a valid parameter name, then skip it.\n            if (!paramName) continue\n\n            const group = groups[paramName]\n            const value = obj[keyName]\n\n            // When we're missing a required param, we can't match the route.\n            if (!group.optional && !value) return null\n\n            result[group.pos] = value\n          }\n\n          return result\n        },\n      },\n      groups,\n    })\n\n    const routeMatches = matcher(routeMatchesHeader)\n    if (!routeMatches) return null\n\n    return routeMatches\n  }\n\n  function normalizeQueryParams(\n    query: Record<string, string | string[] | undefined>,\n    routeParamKeys: Set<string>\n  ) {\n    // this is used to pass query information in rewrites\n    // but should not be exposed in final query\n    delete query['nextInternalLocale']\n\n    for (const [key, value] of Object.entries(query)) {\n      const normalizedKey = normalizeNextQueryParam(key)\n      if (!normalizedKey) continue\n\n      // Remove the prefixed key from the query params because we want\n      // to consume it for the dynamic route matcher.\n      delete query[key]\n      routeParamKeys.add(normalizedKey)\n\n      if (typeof value === 'undefined') continue\n\n      query[normalizedKey] = Array.isArray(value)\n        ? value.map((v) => decodeQueryPathParameter(v))\n        : decodeQueryPathParameter(value)\n    }\n  }\n\n  return {\n    handleRewrites,\n    defaultRouteRegex,\n    dynamicRouteMatcher,\n    defaultRouteMatches,\n    normalizeQueryParams,\n    getParamsFromRouteMatches,\n    /**\n     * Normalize dynamic route params.\n     *\n     * @param query - The query params to normalize.\n     * @param ignoreMissingOptional - Whether to ignore missing optional params.\n     * @returns The normalized params and whether they are valid.\n     */\n    normalizeDynamicRouteParams: (\n      query: ParsedUrlQuery,\n      ignoreMissingOptional: boolean\n    ) => {\n      if (!defaultRouteRegex || !defaultRouteMatches) {\n        return { params: {}, hasValidParams: false }\n      }\n\n      return normalizeDynamicRouteParams(\n        query,\n        defaultRouteRegex,\n        defaultRouteMatches,\n        ignoreMissingOptional\n      )\n    },\n\n    normalizeCdnUrl: (\n      req: BaseNextRequest | IncomingMessage,\n      paramKeys: string[]\n    ) => normalizeCdnUrl(req, paramKeys),\n\n    interpolateDynamicPath: (\n      pathname: string,\n      params: Record<string, undefined | string | string[]>\n    ) => interpolateDynamicPath(pathname, params, defaultRouteRegex),\n\n    filterInternalQuery: (query: ParsedUrlQuery, paramKeys: string[]) =>\n      filterInternalQuery(query, paramKeys),\n  }\n}\n\nexport function getPreviouslyRevalidatedTags(\n  headers: IncomingHttpHeaders,\n  previewModeId: string | undefined\n): string[] {\n  return typeof headers[NEXT_CACHE_REVALIDATED_TAGS_HEADER] === 'string' &&\n    headers[NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER] === previewModeId\n    ? headers[NEXT_CACHE_REVALIDATED_TAGS_HEADER].split(',')\n    : []\n}\n","export const VALID_LOADERS = [\n  'default',\n  'imgix',\n  'cloudinary',\n  'akamai',\n  'custom',\n] as const\n\nexport type LoaderValue = (typeof VALID_LOADERS)[number]\n\nexport type ImageLoaderProps = {\n  src: string\n  width: number\n  quality?: number\n}\n\nexport type ImageLoaderPropsWithConfig = ImageLoaderProps & {\n  config: Readonly<ImageConfig>\n}\n\nexport type LocalPattern = {\n  /**\n   * Can be literal or wildcard.\n   * Single `*` matches a single path segment.\n   * Double `**` matches any number of path segments.\n   */\n  pathname?: string\n\n  /**\n   * Can be literal query string such as `?v=1` or\n   * empty string meaning no query string.\n   */\n  search?: string\n}\n\nexport type RemotePattern = {\n  /**\n   * Must be `http` or `https`.\n   */\n  protocol?: 'http' | 'https'\n\n  /**\n   * Can be literal or wildcard.\n   * Single `*` matches a single subdomain.\n   * Double `**` matches any number of subdomains.\n   */\n  hostname: string\n\n  /**\n   * Can be literal port such as `8080` or empty string\n   * meaning no port.\n   */\n  port?: string\n\n  /**\n   * Can be literal or wildcard.\n   * Single `*` matches a single path segment.\n   * Double `**` matches any number of path segments.\n   */\n  pathname?: string\n\n  /**\n   * Can be literal query string such as `?v=1` or\n   * empty string meaning no query string.\n   */\n  search?: string\n}\n\ntype ImageFormat = 'image/avif' | 'image/webp'\n\n/**\n * Image configurations\n *\n * @see [Image configuration options](https://nextjs.org/docs/api-reference/next/image#configuration-options)\n */\nexport type ImageConfigComplete = {\n  /** @see [Device sizes documentation](https://nextjs.org/docs/api-reference/next/image#device-sizes) */\n  deviceSizes: number[]\n\n  /** @see [Image sizing documentation](https://nextjs.org/docs/app/building-your-application/optimizing/images#image-sizing) */\n  imageSizes: number[]\n\n  /** @see [Image loaders configuration](https://nextjs.org/docs/api-reference/next/legacy/image#loader) */\n  loader: LoaderValue\n\n  /** @see [Image loader configuration](https://nextjs.org/docs/app/api-reference/components/image#path) */\n  path: string\n\n  /** @see [Image loader configuration](https://nextjs.org/docs/api-reference/next/image#loader-configuration) */\n  loaderFile: string\n\n  /**\n   * @deprecated Use `remotePatterns` instead.\n   */\n  domains: string[]\n\n  /** @see [Disable static image import configuration](https://nextjs.org/docs/api-reference/next/image#disable-static-imports) */\n  disableStaticImages: boolean\n\n  /** @see [Cache behavior](https://nextjs.org/docs/api-reference/next/image#caching-behavior) */\n  minimumCacheTTL: number\n\n  /** @see [Acceptable formats](https://nextjs.org/docs/api-reference/next/image#acceptable-formats) */\n  formats: ImageFormat[]\n\n  /** @see [Maximum Disk Cache Size (in bytes)](https://nextjs.org/docs/api-reference/next/image#maximumdiskcachesize) */\n  maximumDiskCacheSize: number | undefined\n\n  /** @see [Maximum Redirects](https://nextjs.org/docs/api-reference/next/image#maximumredirects) */\n  maximumRedirects: number\n\n  /** @see [Maximum Response Body](https://nextjs.org/docs/api-reference/next/image#maximumresponsebody) */\n  maximumResponseBody: number\n\n  /** @see [Dangerously Allow Local IP](https://nextjs.org/docs/api-reference/next/image#dangerously-allow-local-ip) */\n  dangerouslyAllowLocalIP: boolean\n\n  /** @see [Dangerously Allow SVG](https://nextjs.org/docs/api-reference/next/image#dangerously-allow-svg) */\n  dangerouslyAllowSVG: boolean\n\n  /** @see [Content Security Policy](https://nextjs.org/docs/api-reference/next/image#contentsecuritypolicy) */\n  contentSecurityPolicy: string\n\n  /** @see [Content Disposition Type](https://nextjs.org/docs/api-reference/next/image#contentdispositiontype) */\n  contentDispositionType: 'inline' | 'attachment'\n\n  /** @see [Remote Patterns](https://nextjs.org/docs/api-reference/next/image#remotepatterns) */\n  remotePatterns: Array<URL | RemotePattern>\n\n  /** @see [Local Patterns](https://nextjs.org/docs/api-reference/next/image#localPatterns) */\n  localPatterns: LocalPattern[] | undefined\n\n  /** @see [Qualities](https://nextjs.org/docs/api-reference/next/image#qualities) */\n  qualities: number[] | undefined\n\n  /** @see [Unoptimized](https://nextjs.org/docs/api-reference/next/image#unoptimized) */\n  unoptimized: boolean\n\n  /**\n   * When true, the `cacheHandler` configured in next.config.js will also be used\n   * for caching optimized images. When false, images use the default filesystem cache.\n   * @see [Image Optimization Caching](https://nextjs.org/docs/app/api-reference/config/next-config-js/cacheHandler#image-optimization-caching)\n   */\n  customCacheHandler: boolean\n}\n\nexport type ImageConfig = Partial<ImageConfigComplete>\n\nexport const imageConfigDefault: ImageConfigComplete = {\n  deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],\n  imageSizes: [32, 48, 64, 96, 128, 256, 384],\n  path: '/_next/image',\n  loader: 'default',\n  loaderFile: '',\n  /**\n   * @deprecated Use `remotePatterns` instead to protect your application from malicious users.\n   */\n  domains: [],\n  disableStaticImages: false,\n  minimumCacheTTL: 14400, // 4 hours\n  formats: ['image/webp'],\n  maximumDiskCacheSize: undefined, // auto-detect by default\n  maximumRedirects: 3,\n  maximumResponseBody: 50_000_000, // 50 MB\n  dangerouslyAllowLocalIP: false,\n  dangerouslyAllowSVG: false,\n  contentSecurityPolicy: `script-src 'none'; frame-src 'none'; sandbox;`,\n  contentDispositionType: 'attachment',\n  localPatterns: undefined, // default: allow all local images\n  remotePatterns: [], // default: allow no remote images\n  qualities: [75],\n  unoptimized: false,\n  customCacheHandler: false,\n}\n","import React from 'react'\nimport type { ImageConfigComplete } from './image-config'\nimport { imageConfigDefault } from './image-config'\n\nexport const ImageConfigContext =\n  React.createContext<ImageConfigComplete>(imageConfigDefault)\n\nif (process.env.NODE_ENV !== 'production') {\n  ImageConfigContext.displayName = 'ImageConfigContext'\n}\n","import { getLayoutOrPageModule } from '../../lib/app-dir-module'\nimport type { LoaderTree } from '../../lib/app-dir-module'\nimport { parseLoaderTree } from '../../../shared/lib/router/utils/parse-loader-tree'\nimport type {\n  AppSegmentConfig,\n  InstantSample,\n} from '../../../build/segment-config/app/app-segment-config'\nimport {\n  workAsyncStorage,\n  type WorkStore,\n} from '../work-async-storage.external'\n\nexport async function anySegmentHasRuntimePrefetchEnabled(\n  tree: LoaderTree\n): Promise<boolean> {\n  const { mod: layoutOrPageMod } = await getLayoutOrPageModule(tree)\n\n  // TODO(restart-on-cache-miss): Does this work correctly for client page/layout modules?\n  const instantConfig = layoutOrPageMod\n    ? (layoutOrPageMod as AppSegmentConfig).unstable_instant\n    : undefined\n  const hasRuntimePrefetch =\n    instantConfig && typeof instantConfig === 'object'\n      ? instantConfig.prefetch === 'runtime'\n      : false\n  if (hasRuntimePrefetch) {\n    return true\n  }\n\n  const { parallelRoutes } = parseLoaderTree(tree)\n  for (const parallelRouteKey in parallelRoutes) {\n    const parallelRoute = parallelRoutes[parallelRouteKey]\n    const hasChildRuntimePrefetch =\n      await anySegmentHasRuntimePrefetchEnabled(parallelRoute)\n    if (hasChildRuntimePrefetch) {\n      return true\n    }\n  }\n\n  return false\n}\n\nexport async function isPageAllowedToBlock(tree: LoaderTree): Promise<boolean> {\n  const { mod: layoutOrPageMod } = await getLayoutOrPageModule(tree)\n\n  // TODO(restart-on-cache-miss): Does this work correctly for client page/layout modules?\n  const instantConfig = layoutOrPageMod\n    ? (layoutOrPageMod as AppSegmentConfig).unstable_instant\n    : undefined\n\n  // If we encounter a non-false instant config before a instant=false,\n  // the page isn't allowed to block. The config expresses a requirement for\n  // instant UI, so we should make sure that a static shell exists.\n  // (even if it'd use runtime prefetching for client navs)\n  if (instantConfig !== undefined) {\n    if (typeof instantConfig === 'object') {\n      return false\n    } else if (instantConfig === false) {\n      return true\n    }\n  }\n\n  const { parallelRoutes } = parseLoaderTree(tree)\n  for (const parallelRouteKey in parallelRoutes) {\n    const parallelRoute = parallelRoutes[parallelRouteKey]\n    const subtreeIsBlocking = await isPageAllowedToBlock(parallelRoute)\n    if (subtreeIsBlocking) {\n      return true\n    }\n  }\n\n  return false\n}\n\ntype FoundSegmentWithConfig = {\n  path: string[]\n  config: NonNullable<AppSegmentConfig['unstable_instant']>\n}\n\n/**\n * Checks if any segments in the loader tree have `instant` configs that need validating.\n * NOTE: Client navigations call this multiple times, so we cache it.\n * */\n// Shared helper (not exported, not cached — called by the cached wrappers)\nasync function anySegmentNeedsInstantValidation(\n  rootTree: LoaderTree,\n  mode: 'dev' | 'build'\n): Promise<boolean> {\n  const segments = await findSegmentsWithInstantConfig(rootTree)\n\n  // Check if there's any configs with `prefetch: 'static'` or `mode: 'instant'`.\n  // (If there's only `false`, there's no need to run validation).\n  // If any segment has `unstable_disableValidation`, we skip validation for the whole tree.\n  let needsValidation = false\n  for (const { config } of segments) {\n    if (typeof config === 'object') {\n      if (\n        config.unstable_disableValidation === true ||\n        (mode === 'dev' && config.unstable_disableDevValidation === true) ||\n        (mode === 'build' && config.unstable_disableBuildValidation === true)\n      ) {\n        return false\n      }\n      // do not short-circuit, some other segment might still have `unstable_disableValidation`\n      needsValidation = true\n    }\n  }\n  return needsValidation\n}\n\nexport const anySegmentNeedsInstantValidationInDev = cacheScopedToWorkStore(\n  async (rootTree: LoaderTree): Promise<boolean> =>\n    anySegmentNeedsInstantValidation(rootTree, 'dev')\n)\n\nexport const anySegmentNeedsInstantValidationInBuild = cacheScopedToWorkStore(\n  async (rootTree: LoaderTree): Promise<boolean> =>\n    anySegmentNeedsInstantValidation(rootTree, 'build')\n)\n\nexport const findSegmentsWithInstantConfig = cacheScopedToWorkStore(\n  async (rootTree: LoaderTree): Promise<FoundSegmentWithConfig[]> => {\n    const results: FoundSegmentWithConfig[] = []\n\n    async function visit(tree: LoaderTree, path: string[]): Promise<void> {\n      const { mod: layoutOrPageMod } = await getLayoutOrPageModule(tree)\n\n      // TODO(restart-on-cache-miss): Does this work correctly for client page/layout modules?\n      const instantConfig = layoutOrPageMod\n        ? (layoutOrPageMod as AppSegmentConfig).unstable_instant\n        : undefined\n      if (instantConfig !== undefined) {\n        results.push({\n          path,\n          config: instantConfig,\n        })\n      }\n\n      const { parallelRoutes } = parseLoaderTree(tree)\n      for (const parallelRouteKey in parallelRoutes) {\n        const childTree = parallelRoutes[parallelRouteKey]\n        await visit(childTree, [...path, parallelRouteKey])\n      }\n    }\n\n    await visit(rootTree, [])\n    return results\n  }\n)\n\nexport const resolveInstantConfigSamplesForPage = async (\n  tree: LoaderTree\n): Promise<InstantSample[] | null> => {\n  const { mod: layoutOrPageMod } = await getLayoutOrPageModule(tree)\n\n  const instantConfig = layoutOrPageMod\n    ? (layoutOrPageMod as AppSegmentConfig).unstable_instant\n    : undefined\n\n  let samples: InstantSample[] | null = null\n  if (\n    instantConfig !== undefined &&\n    typeof instantConfig === 'object' &&\n    instantConfig.samples\n  ) {\n    samples = instantConfig.samples\n  }\n\n  // The samples from inner segments override samples from outer segments,\n  // i.e. a page overrides the samples from a layout.\n  // We do not perform any merging logic.\n  const { parallelRoutes } = parseLoaderTree(tree)\n  for (const parallelRouteKey in parallelRoutes) {\n    if (parallelRouteKey !== 'children') {\n      // TODO(instant-validation-build): do something with with samples from non-children slots?\n      continue\n    }\n    const childTree = parallelRoutes[parallelRouteKey]\n    const childSamples = await resolveInstantConfigSamplesForPage(childTree)\n    if (childSamples !== null) {\n      samples = childSamples\n    }\n  }\n\n  return samples\n}\n\n/**\n * A simple cache wrapper for 1-argument functions.\n * The cache will live as long as the current WorkStore,\n * i.e. it's scoped to a single request.\n */\nfunction cacheScopedToWorkStore<TArg extends WeakKey, TRes>(\n  func: (arg: TArg) => TRes\n): (arg: TArg) => TRes {\n  const resultsPerWorkStore = new WeakMap<WorkStore, WeakMap<TArg, TRes>>()\n  return (arg: TArg): TRes => {\n    const workStore = workAsyncStorage.getStore()\n    if (!workStore) {\n      // No caching.\n      return func(arg)\n    }\n\n    let results = resultsPerWorkStore.get(workStore)\n    if (results && results.has(arg)) {\n      return results.get(arg)!\n    }\n\n    const result = func(arg)\n\n    if (!results) {\n      results = new WeakMap()\n      resultsPerWorkStore.set(workStore, results)\n    }\n    results.set(arg, result)\n\n    return result\n  }\n}\n","/**\n * Web debug channel implementation.\n * Loaded by debug-channel-server.ts.\n */\n\n// Types defined inline for now; will move to debug-channel-server.node.ts later.\nexport type DebugChannelPair = {\n  serverSide: DebugChannelServer\n  clientSide: DebugChannelClient\n}\n\nexport type DebugChannelServer = {\n  readable?: ReadableStream<Uint8Array>\n  writable: WritableStream<Uint8Array>\n}\n\ntype DebugChannelClient = {\n  readable: ReadableStream<Uint8Array>\n  writable?: WritableStream<Uint8Array>\n}\n\nexport function createDebugChannel(): DebugChannelPair | undefined {\n  if (process.env.NODE_ENV === 'production') {\n    return undefined\n  }\n  return createWebDebugChannel()\n}\n\nexport function createWebDebugChannel(): DebugChannelPair {\n  let readableController: ReadableStreamDefaultController | undefined\n\n  const clientSideReadable = new ReadableStream<Uint8Array>({\n    start(controller) {\n      readableController = controller\n    },\n  })\n\n  return {\n    serverSide: {\n      writable: new WritableStream<Uint8Array>({\n        write(chunk) {\n          readableController?.enqueue(chunk)\n        },\n        close() {\n          readableController?.close()\n        },\n        abort(err) {\n          readableController?.error(err)\n        },\n      }),\n    },\n    clientSide: { readable: clientSideReadable },\n  }\n}\n\n/**\n * toNodeDebugChannel is a no-op stub on the web path.\n * It should never be called in edge/web builds.\n */\nexport function toNodeDebugChannel(\n  _webDebugChannel: DebugChannelServer\n): never {\n  throw new Error(\n    'toNodeDebugChannel cannot be used in edge/web runtime, this is a bug in the Next.js codebase'\n  )\n}\n","import type { Readable } from 'node:stream'\nimport { InvariantError } from '../../../shared/lib/invariant-error'\n\n/**\n * When we abort a staged render, we can still provide react with more chunks from later phases\n * to use for their debug info. This will not cause more contents to be rendered.\n */\nexport function createNodeStreamWithLateRelease(\n  partialChunks: Array<Uint8Array>,\n  allChunks: Array<Uint8Array>,\n  releaseSignal: AbortSignal\n): Readable {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    throw new InvariantError(\n      'createNodeStreamWithLateRelease cannot be used in the edge runtime'\n    )\n  } else {\n    const { Readable } = require('node:stream') as typeof import('node:stream')\n\n    let nextIndex = 0\n\n    const readable = new Readable({\n      read() {\n        while (nextIndex < partialChunks.length) {\n          this.push(partialChunks[nextIndex])\n          nextIndex++\n        }\n      },\n    })\n\n    releaseSignal.addEventListener(\n      'abort',\n      () => {\n        // Flush any remaining chunks from the original set\n        while (nextIndex < partialChunks.length) {\n          readable.push(partialChunks[nextIndex])\n          nextIndex++\n        }\n        // Flush all chunks since we're now aborted and can't schedule\n        // any new work but these chunks might unblock debugInfo\n        while (nextIndex < allChunks.length) {\n          readable.push(allChunks[nextIndex])\n          nextIndex++\n        }\n\n        setImmediate(() => {\n          readable.push(null)\n        })\n      },\n      { once: true }\n    )\n\n    return readable\n  }\n}\n\nexport function createNodeStreamFromChunks(\n  chunks: Array<Uint8Array>,\n  signal?: AbortSignal\n): Readable {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    throw new InvariantError(\n      'createNodeStreamFromChunks cannot be used in the edge runtime'\n    )\n  } else {\n    const { Readable } = require('node:stream') as typeof import('node:stream')\n\n    // If there's a signal, delay closing until it fires\n    if (signal) {\n      signal.addEventListener(\n        'abort',\n        () => {\n          readable.push(null)\n        },\n        { once: true }\n      )\n    }\n\n    let nextIndex = 0\n    const readable = new Readable({\n      read() {\n        while (nextIndex < chunks.length) {\n          this.push(chunks[nextIndex])\n          nextIndex++\n        }\n        if (!signal) {\n          this.push(null)\n        }\n      },\n    })\n    return readable\n  }\n}\n","import type { ComponentType, ErrorInfo, JSX, ReactNode } from 'react'\nimport type { RenderOpts, PreloadCallbacks } from './types'\nimport type {\n  ActionResult,\n  DynamicParamTypesShort,\n  DynamicSegmentTuple,\n  FlightRouterState,\n  CacheNodeSeedData,\n  RSCPayload,\n  NavigationFlightResponse,\n  FlightData,\n  InitialRSCPayload,\n  FlightDataPath,\n  PrefetchHints,\n} from '../../shared/lib/app-router-types'\nimport type { Readable } from 'node:stream'\nimport {\n  workAsyncStorage,\n  type WorkStore,\n} from '../app-render/work-async-storage.external'\nimport type {\n  InstantValidationSamples,\n  PrerenderStoreModernClient,\n  PrerenderStoreModernRuntime,\n  RequestStore,\n  ValidationStoreClient,\n} from '../app-render/work-unit-async-storage.external'\nimport type { NextParsedUrlQuery } from '../request-meta'\nimport type { LoaderTree } from '../lib/app-dir-module'\nimport type { AppPageModule } from '../route-modules/app-page/module'\nimport type { BaseNextRequest, BaseNextResponse } from '../base-http'\nimport type { IncomingHttpHeaders } from 'http'\nimport * as ReactClient from 'react'\n\nimport RenderResult, {\n  type AppPageRenderResultMetadata,\n  type RenderResultOptions,\n} from '../render-result'\nimport {\n  chainStreams,\n  continueFizzStream,\n  continueDynamicPrerender,\n  continueStaticPrerender,\n  continueDynamicHTMLResume,\n  continueStaticFallbackPrerender,\n  streamToBuffer,\n  streamToString,\n  createInlinedDataStream,\n  createPendingStream,\n  createOnHeadersCallback,\n  resumeAndAbort,\n  renderToFlightStream,\n  renderToFizzStream,\n  resumeToFizzStream,\n  getServerPrerender,\n  getClientPrerender,\n  processPrelude as processPreludeOp,\n  createDocumentClosingStream,\n} from './stream-ops'\nimport { stripInternalQueries } from '../internal-utils'\nimport {\n  NEXT_HMR_REFRESH_HEADER,\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_ROUTER_STATE_TREE_HEADER,\n  NEXT_ROUTER_STALE_TIME_HEADER,\n  NEXT_URL,\n  RSC_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  NEXT_REQUEST_ID_HEADER,\n  NEXT_HTML_REQUEST_ID_HEADER,\n} from '../../client/components/app-router-headers'\nimport { createMetadataContext } from '../../lib/metadata/metadata-context'\nimport { createRequestStoreForRender } from '../async-storage/request-store'\nimport { createWorkStore } from '../async-storage/work-store'\nimport {\n  getAccessFallbackErrorTypeByStatus,\n  getAccessFallbackHTTPStatus,\n  isHTTPAccessFallbackError,\n} from '../../client/components/http-access-fallback/http-access-fallback'\nimport {\n  getURLFromRedirectError,\n  getRedirectStatusCodeFromError,\n} from '../../client/components/redirect'\nimport { isRedirectError } from '../../client/components/redirect-error'\nimport { getImplicitTags, type ImplicitTags } from '../lib/implicit-tags'\nimport { AppRenderSpan, NextNodeServerSpan } from '../lib/trace/constants'\nimport { getTracer, SpanStatusCode } from '../lib/trace/tracer'\nimport { FlightRenderResult } from './flight-render-result'\nimport {\n  createReactServerErrorHandler,\n  createHTMLErrorHandler,\n  type DigestedError,\n  isUserLandError,\n  getDigestForWellKnownError,\n} from './create-error-handler'\nimport { dynamicParamTypes } from './get-short-dynamic-param-type'\nimport { getSegmentParam } from '../../shared/lib/router/utils/get-segment-param'\nimport { getScriptNonceFromHeader } from './get-script-nonce-from-header'\nimport { parseAndValidateFlightRouterState } from './parse-and-validate-flight-router-state'\nimport { createFlightRouterStateFromLoaderTree } from './create-flight-router-state-from-loader-tree'\nimport { handleAction } from './action-handler'\nimport { isBailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport { warn, error } from '../../build/output/log'\nimport { appendMutableCookies } from '../web/spec-extension/adapters/request-cookies'\nimport { createServerInsertedHTML } from './server-inserted-html'\nimport { getRequiredScripts } from './required-scripts'\nimport { addPathPrefix } from '../../shared/lib/router/utils/add-path-prefix'\nimport { makeGetServerInsertedHTML } from './make-get-server-inserted-html'\nimport {\n  walkTreeWithFlightRouterState,\n  createFullTreeFlightDataForNavigation,\n} from './walk-tree-with-flight-router-state'\nimport { createComponentTree, getRootParams } from './create-component-tree'\nimport { getAssetQueryString } from './get-asset-query-string'\nimport {\n  getClientReferenceManifest,\n  getServerModuleMap,\n} from './manifests-singleton'\nimport {\n  DynamicState,\n  type PostponedState,\n  DynamicHTMLPreludeState,\n  parsePostponedState,\n} from './postponed-state'\nimport {\n  getDynamicDataPostponedState,\n  getDynamicHTMLPostponedState,\n  getPostponedFromState,\n} from './postponed-state'\nimport { isDynamicServerError } from '../../client/components/hooks-server-context'\nimport { getFlightStream } from './use-flight-response'\nimport {\n  StaticGenBailoutError,\n  isStaticGenBailoutError,\n} from '../../client/components/static-generation-bailout'\nimport { getStackWithoutErrorMessage } from '../../lib/format-server-error'\nimport { extractNextErrorCode } from '../../lib/error-telemetry-utils'\nimport {\n  accessedDynamicData,\n  createRenderInBrowserAbortSignal,\n  formatDynamicAPIAccesses,\n  isPrerenderInterruptedError,\n  createDynamicTrackingState,\n  createDynamicValidationState,\n  trackAllowedDynamicAccess,\n  throwIfDisallowedDynamic,\n  PreludeState,\n  consumeDynamicAccess,\n  type DynamicAccess,\n  logDisallowedDynamicError,\n  trackDynamicHoleInRuntimeShell,\n  trackDynamicHoleInStaticShell,\n  getStaticShellDisallowedDynamicReasons,\n  getNavigationDisallowedDynamicReasons,\n  trackDynamicHoleInNavigation,\n  DynamicHoleKind,\n  trackThrownErrorInNavigation,\n  createInstantValidationState,\n} from './dynamic-rendering'\nimport {\n  getClientComponentLoaderMetrics,\n  wrapClientComponentLoader,\n} from '../client-component-renderer-logger'\nimport { isNodeNextRequest } from '../base-http/helpers'\nimport {\n  parseRelativeUrl,\n  type ParsedRelativeUrl,\n} from '../../shared/lib/router/utils/parse-relative-url'\nimport AppRouter from '../../client/components/app-router'\nimport type { ServerComponentsHmrCache } from '../response-cache'\nimport type { RequestErrorContext } from '../instrumentation/types'\nimport { getIsPossibleServerAction } from '../lib/server-action-request-meta'\nimport { createInitialRouterState } from '../../client/components/router-reducer/create-initial-router-state'\nimport { createMutableActionQueue } from '../../client/components/app-router-instance'\nimport { getRevalidateReason } from '../instrumentation/utils'\nimport { PAGE_SEGMENT_KEY } from '../../shared/lib/segment'\nimport {\n  getFallbackRouteParams,\n  type OpaqueFallbackRouteParams,\n} from '../request/fallback-params'\nimport {\n  createReactServerPrerenderResult,\n  type ReactServerPrerenderResult,\n  ReactServerResult,\n  createReactServerPrerenderResultFromRender,\n} from './app-render-prerender-utils'\nimport {\n  Phase,\n  printDebugThrownValueForProspectiveRender,\n} from './prospective-render-utils'\nimport { runInSequentialTasks } from './app-render-render-utils'\nimport { waitAtLeastOneReactRenderTask } from '../../lib/scheduler'\nimport {\n  getHmrRefreshHash,\n  workUnitAsyncStorage,\n  type PrerenderStore,\n} from './work-unit-async-storage.external'\nimport { consoleAsyncStorage } from './console-async-storage.external'\nimport { CacheSignal } from './cache-signal'\nimport {\n  createResponseVaryParamsAccumulator,\n  finishAccumulatingVaryParams,\n  getMetadataVaryParamsThenable,\n} from './vary-params'\nimport { getTracedMetadata } from '../lib/trace/utils'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport {\n  StaleTimeIterable,\n  createSelectStaleTime,\n  trackStaleTime,\n  finishStaleTimeTracking,\n} from './stale-time'\n\nimport { HTML_CONTENT_TYPE_HEADER, INFINITE_CACHE } from '../../lib/constants'\nimport { createComponentStylesAndScripts } from './create-component-styles-and-scripts'\nimport { parseLoaderTree } from '../../shared/lib/router/utils/parse-loader-tree'\nimport {\n  createPrerenderResumeDataCache,\n  createRenderResumeDataCache,\n  type PrerenderResumeDataCache,\n  type RenderResumeDataCache,\n} from '../resume-data-cache/resume-data-cache'\nimport type { MetadataErrorType } from '../../lib/metadata/resolve-metadata'\nimport isError from '../../lib/is-error'\nimport { createServerInsertedMetadata } from './metadata-insertion/create-server-inserted-metadata'\nimport { getPreviouslyRevalidatedTags } from '../server-utils'\nimport { executeRevalidates } from '../revalidation-utils'\nimport {\n  trackPendingChunkLoad,\n  trackPendingImport,\n  trackPendingModules,\n} from './module-loading/track-module-loading.external'\nimport { isReactLargeShellError } from './react-large-shell-error'\nimport type { GlobalErrorComponent } from '../../client/components/builtin/global-error'\nimport { normalizeConventionFilePath } from './segment-explorer-path'\nimport { getRequestMeta } from '../request-meta'\nimport {\n  getDynamicParam,\n  interpolateParallelRouteParams,\n} from '../../shared/lib/router/utils/get-dynamic-param'\nimport type { Params } from '../request/params'\nimport { ImageConfigContext } from '../../shared/lib/image-config-context.shared-runtime'\nimport { imageConfigDefault } from '../../shared/lib/image-config'\nimport { RenderStage, StagedRenderingController } from './staged-rendering'\nimport {\n  anySegmentHasRuntimePrefetchEnabled,\n  isPageAllowedToBlock,\n  anySegmentNeedsInstantValidationInDev,\n  anySegmentNeedsInstantValidationInBuild,\n  resolveInstantConfigSamplesForPage,\n} from './instant-validation/instant-config'\nimport { warnOnce } from '../../shared/lib/utils/warn-once'\nimport {\n  createDebugChannel,\n  type DebugChannelPair,\n} from './debug-channel-server'\nimport { createNodeStreamWithLateRelease } from './instant-validation/stream-utils'\n\nimport {\n  createValidationBoundaryTracking,\n  type ValidationBoundaryTracking,\n} from './instant-validation/boundary-tracking'\nimport type {\n  AppSegmentConfig,\n  InstantSample,\n} from '../../build/segment-config/app/app-segment-config'\nimport { ResponseCookies } from '../web/spec-extension/cookies'\nimport { isInstantValidationError } from './instant-validation/instant-validation-error'\n\nexport type GetDynamicParamFromSegment = (\n  // The LoaderTree to extract the dynamic param from\n  loaderTree: LoaderTree\n) => DynamicParam | null\n\nexport type DynamicParam = {\n  param: string\n  value: string | string[] | null\n  treeSegment: DynamicSegmentTuple\n  type: DynamicParamTypesShort\n}\n\nexport type GenerateFlight = typeof generateDynamicFlightRenderResult\n\nexport type AppSharedContext = {\n  buildId: string\n  deploymentId: string\n  clientAssetToken: string\n}\n\nexport type AppRenderContext = {\n  sharedContext: AppSharedContext\n  workStore: WorkStore\n  url: ReturnType<typeof parseRelativeUrl>\n  componentMod: AppPageModule\n  renderOpts: RenderOpts\n  parsedRequestHeaders: ParsedRequestHeaders\n  getDynamicParamFromSegment: GetDynamicParamFromSegment\n  interpolatedParams: Params\n  query: NextParsedUrlQuery\n  isPrefetch: boolean\n  isPossibleServerAction: boolean\n  requestTimestamp: number\n  appUsingSizeAdjustment: boolean\n  flightRouterState?: FlightRouterState\n  requestId: string\n  htmlRequestId: string\n  pagePath: string\n  assetPrefix: string\n  isNotFoundPath: boolean\n  nonce: string | undefined\n  res: BaseNextResponse\n  /**\n   * For now, the implicit tags are common for the whole route. If we ever start\n   * rendering/revalidating segments independently, they need to move to the\n   * work unit store.\n   */\n  implicitTags: ImplicitTags\n}\n\nfunction maybeAppendBuildIdToRSCPayload<T extends RSCPayload>(\n  ctx: AppRenderContext,\n  payload: T\n): T {\n  if (!ctx.sharedContext.deploymentId) {\n    // When using the build id, we need to initialize the id on initial page load, so a build id\n    // header wouldn't be enough.\n    payload.b = ctx.sharedContext.buildId\n  }\n  return payload\n}\n\ninterface ParseRequestHeadersOptions {\n  readonly isRoutePPREnabled: boolean\n  readonly previewModeId: string | undefined\n}\n\nconst flightDataPathHeadKey = 'h'\nconst getFlightViewportKey = (requestId: string) => requestId + 'v'\nconst getFlightMetadataKey = (requestId: string) => requestId + 'm'\n\nconst filterStackFrame =\n  process.env.NODE_ENV !== 'production'\n    ? (require('../lib/source-maps') as typeof import('../lib/source-maps'))\n        .filterStackFrameDEV\n    : undefined\n\ninterface ParsedRequestHeaders {\n  /**\n   * Router state provided from the client-side router. Used to handle rendering\n   * from the common layout down. This value will be undefined if the request is\n   * not a client-side navigation request, or if the request is a prefetch\n   * request.\n   */\n  readonly flightRouterState: FlightRouterState | undefined\n  readonly isPrefetchRequest: boolean\n  readonly isRuntimePrefetchRequest: boolean\n  readonly isRouteTreePrefetchRequest: boolean\n  readonly isHmrRefresh: boolean\n  readonly isRSCRequest: boolean\n  readonly nonce: string | undefined\n  readonly previouslyRevalidatedTags: string[]\n  readonly requestId: string | undefined\n  readonly htmlRequestId: string | undefined\n}\n\nfunction parseRequestHeaders(\n  headers: IncomingHttpHeaders,\n  options: ParseRequestHeadersOptions\n): ParsedRequestHeaders {\n  // runtime prefetch requests are *not* treated as prefetch requests\n  // (TODO: this is confusing, we should refactor this to express this better)\n  const isPrefetchRequest = headers[NEXT_ROUTER_PREFETCH_HEADER] === '1'\n\n  const isRuntimePrefetchRequest = headers[NEXT_ROUTER_PREFETCH_HEADER] === '2'\n\n  const isHmrRefresh = headers[NEXT_HMR_REFRESH_HEADER] !== undefined\n\n  const isRSCRequest = headers[RSC_HEADER] !== undefined\n\n  const shouldProvideFlightRouterState =\n    isRSCRequest && (!isPrefetchRequest || !options.isRoutePPREnabled)\n\n  const flightRouterState = shouldProvideFlightRouterState\n    ? parseAndValidateFlightRouterState(headers[NEXT_ROUTER_STATE_TREE_HEADER])\n    : undefined\n\n  // Checks if this is a prefetch of the Route Tree by the Segment Cache\n  const isRouteTreePrefetchRequest =\n    headers[NEXT_ROUTER_SEGMENT_PREFETCH_HEADER] === '/_tree'\n\n  const csp =\n    headers['content-security-policy'] ||\n    headers['content-security-policy-report-only']\n\n  const nonce =\n    typeof csp === 'string' ? getScriptNonceFromHeader(csp) : undefined\n\n  const previouslyRevalidatedTags = getPreviouslyRevalidatedTags(\n    headers,\n    options.previewModeId\n  )\n\n  let requestId: string | undefined\n  let htmlRequestId: string | undefined\n\n  if (process.env.__NEXT_DEV_SERVER) {\n    // The request IDs are only used for the dev server to send debug\n    // information to the matching client (identified by the HTML request ID\n    // that was sent to the client with the HTML document) for the current\n    // request (identified by the request ID, as defined by the client).\n\n    requestId =\n      typeof headers[NEXT_REQUEST_ID_HEADER] === 'string'\n        ? headers[NEXT_REQUEST_ID_HEADER]\n        : undefined\n\n    htmlRequestId =\n      typeof headers[NEXT_HTML_REQUEST_ID_HEADER] === 'string'\n        ? headers[NEXT_HTML_REQUEST_ID_HEADER]\n        : undefined\n  }\n\n  return {\n    flightRouterState,\n    isPrefetchRequest,\n    isRuntimePrefetchRequest,\n    isRouteTreePrefetchRequest,\n    isHmrRefresh,\n    isRSCRequest,\n    nonce,\n    previouslyRevalidatedTags,\n    requestId,\n    htmlRequestId,\n  }\n}\n\n/**\n * Walks the loader tree to find the minimum `unstable_dynamicStaleTime` exported by\n * any page module. Returns null if no page exports the config.\n *\n * This only reads static exports from page modules — it does not render any\n * server components, so it's cheap to call.\n *\n * TODO: Move this to the prefetch hints file so we don't have to walk the\n * tree on every render.\n */\nasync function getDynamicStaleTime(tree: LoaderTree): Promise<number | null> {\n  const { page, parallelRoutes } = parseLoaderTree(tree)\n\n  let result: number | null = null\n\n  // Only pages (not layouts) can export unstable_dynamicStaleTime.\n  if (typeof page !== 'undefined') {\n    const pageMod = await page[0]()\n    if (\n      pageMod &&\n      typeof (pageMod as AppSegmentConfig).unstable_dynamicStaleTime ===\n        'number'\n    ) {\n      const value = (pageMod as AppSegmentConfig).unstable_dynamicStaleTime!\n      result = result !== null ? Math.min(result, value) : value\n    }\n  }\n\n  const childPromises: Promise<number | null>[] = []\n  for (const parallelRouteKey in parallelRoutes) {\n    childPromises.push(getDynamicStaleTime(parallelRoutes[parallelRouteKey]))\n  }\n  const childResults = await Promise.all(childPromises)\n  for (const childResult of childResults) {\n    if (childResult !== null) {\n      result = result !== null ? Math.min(result, childResult) : childResult\n    }\n  }\n\n  return result\n}\n\nfunction createNotFoundLoaderTree(loaderTree: LoaderTree): LoaderTree {\n  const components = loaderTree[2]\n  const hasGlobalNotFound = !!components['global-not-found']\n  const notFoundTreeComponents: LoaderTree[2] = hasGlobalNotFound\n    ? {\n        layout: components['global-not-found']!,\n        page: [() => null, 'next/dist/client/components/builtin/empty-stub'],\n      }\n    : {\n        page: components['not-found'],\n      }\n\n  return [\n    '',\n    {\n      children: [PAGE_SEGMENT_KEY, {}, notFoundTreeComponents, null],\n    },\n    // Always include global-error so that getGlobalErrorStyles can access it.\n    // When global-not-found is present, use full components.\n    // Otherwise, only include global-error module.\n    hasGlobalNotFound\n      ? components\n      : { 'global-error': components['global-error'] },\n    null, // staticSiblings\n  ]\n}\n\n/**\n * Returns a function that parses the dynamic segment and return the associated value.\n */\nfunction makeGetDynamicParamFromSegment(\n  interpolatedParams: Params,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  optimisticRouting: boolean\n): GetDynamicParamFromSegment {\n  return function getDynamicParamFromSegment(loaderTree: LoaderTree) {\n    const [segment, , , staticSiblings] = loaderTree\n    const segmentParam = getSegmentParam(segment)\n    if (!segmentParam) {\n      return null\n    }\n    const segmentKey = segmentParam.paramName\n    const dynamicParamType = dynamicParamTypes[segmentParam.paramType]\n    // Static siblings are only included when optimistic routing is enabled\n    const siblings = optimisticRouting ? staticSiblings : null\n    return getDynamicParam(\n      interpolatedParams,\n      segmentKey,\n      dynamicParamType,\n      fallbackRouteParams,\n      siblings\n    )\n  }\n}\n\nfunction NonIndex({\n  createElement,\n  pagePath,\n  statusCode,\n  isPossibleServerAction,\n}: {\n  createElement: typeof ReactClient.createElement\n  pagePath: string\n  statusCode: number | undefined\n  isPossibleServerAction: boolean\n}) {\n  const is404Page = pagePath === '/404'\n  const isInvalidStatusCode = typeof statusCode === 'number' && statusCode > 400\n\n  // Only render noindex for page request, skip for server actions\n  // TODO: is this correct if `isPossibleServerAction` is a false positive?\n  if (!isPossibleServerAction && (is404Page || isInvalidStatusCode)) {\n    return createElement('meta', {\n      name: 'robots',\n      content: 'noindex',\n    })\n  }\n  return null\n}\n\n/**\n * This is used by server actions & client-side navigations to generate RSC data from a client-side request.\n * This function is only called on \"dynamic\" requests (ie, there wasn't already a static response).\n * It uses request headers (namely `next-router-state-tree`) to determine where to start rendering.\n */\nasync function generateDynamicRSCPayload(\n  ctx: AppRenderContext,\n  options?: {\n    actionResult?: ActionResult\n    skipPageRendering?: boolean\n    staleTimeIterable?: AsyncIterable<number>\n    staticStageByteLengthPromise?: Promise<number>\n    runtimePrefetchStream?: ReadableStream<Uint8Array>\n  }\n): Promise<RSCPayload> {\n  // Flight data that is going to be passed to the browser.\n  // Currently a single item array but in the future multiple patches might be combined in a single request.\n\n  // We initialize `flightData` to an empty string because the client router knows how to tolerate\n  // it (treating it as an MPA navigation). The only time this function wouldn't generate flight data\n  // is for server actions, if the server action handler instructs this function to skip it. When the server\n  // action reducer sees a falsy value, it'll simply resolve the action with no data.\n  let flightData: FlightData = ''\n\n  const {\n    componentMod: {\n      routeModule: {\n        userland: { loaderTree },\n      },\n      createElement,\n      createMetadataComponents,\n      Fragment,\n    },\n    query,\n    requestId,\n    flightRouterState,\n    workStore,\n    url,\n  } = ctx\n\n  const serveStreamingMetadata = !!ctx.renderOpts.serveStreamingMetadata\n\n  if (!options?.skipPageRendering) {\n    const preloadCallbacks: PreloadCallbacks = []\n\n    // If we're performing instant validation, we need to render the whole tree,\n    // without skipping shared layouts.\n    const needsFullTree =\n      process.env.__NEXT_DEV_SERVER &&\n      ctx.renderOpts.cacheComponents &&\n      !options?.actionResult && // Only for navigations\n      (await anySegmentNeedsInstantValidationInDev(loaderTree))\n\n    const metadataIsRuntimePrefetchable =\n      await anySegmentHasRuntimePrefetchEnabled(loaderTree)\n    const { Viewport, Metadata, MetadataOutlet } = createMetadataComponents({\n      tree: loaderTree,\n      parsedQuery: query,\n      pathname: url.pathname,\n      metadataContext: createMetadataContext(ctx.renderOpts),\n      interpolatedParams: ctx.interpolatedParams,\n      serveStreamingMetadata,\n      isRuntimePrefetchable: metadataIsRuntimePrefetchable,\n    })\n\n    const rscHead = createElement(\n      Fragment,\n      {\n        key: flightDataPathHeadKey,\n      },\n      createElement(NonIndex, {\n        createElement,\n        pagePath: ctx.pagePath,\n        statusCode: ctx.res.statusCode,\n        isPossibleServerAction: ctx.isPossibleServerAction,\n      }),\n      createElement(Viewport, {\n        key: getFlightViewportKey(requestId),\n      }),\n      createElement(Metadata, {\n        key: getFlightMetadataKey(requestId),\n      })\n    )\n\n    flightData = (\n      needsFullTree\n        ? await createFullTreeFlightDataForNavigation({\n            ctx,\n            loaderTree,\n            rscHead,\n            injectedCSS: new Set(),\n            injectedJS: new Set(),\n            injectedFontPreloadTags: new Set(),\n            preloadCallbacks,\n            MetadataOutlet,\n          })\n        : await walkTreeWithFlightRouterState({\n            ctx,\n            loaderTreeToFilter: loaderTree,\n            parentParams: {},\n            flightRouterState,\n            rscHead,\n            injectedCSS: new Set(),\n            injectedJS: new Set(),\n            injectedFontPreloadTags: new Set(),\n            rootLayoutIncluded: false,\n            preloadCallbacks,\n            MetadataOutlet,\n            hintTree: ctx.renderOpts.prefetchHints?.[ctx.pagePath] ?? null,\n          })\n    ).map((path) => path.slice(1)) // remove the '' (root) segment\n  }\n\n  // In dev, the Vary header may not reliably reflect whether a route can\n  // be intercepted, because interception routes are compiled on demand.\n  // Default to true so the client doesn't cache a stale Fallback entry.\n  const varyHeader = ctx.res.getHeader('vary')\n  const couldBeIntercepted =\n    !!process.env.__NEXT_DEV_SERVER ||\n    (typeof varyHeader === 'string' && varyHeader.includes(NEXT_URL))\n\n  // If we have an action result, then this is a server action response.\n  // We can rely on this because `ActionResult` will always be a promise, even if\n  // the result is falsey.\n  if (options?.actionResult) {\n    return maybeAppendBuildIdToRSCPayload(ctx, {\n      a: options.actionResult,\n      f: flightData,\n      q: getRenderedSearch(query),\n      i: !!couldBeIntercepted,\n    })\n  }\n\n  // Otherwise, it's a regular RSC response.\n  const baseResponse: NavigationFlightResponse = maybeAppendBuildIdToRSCPayload(\n    ctx,\n    {\n      f: flightData,\n      q: getRenderedSearch(query),\n      i: !!couldBeIntercepted,\n      S: workStore.isStaticGeneration,\n      h: getMetadataVaryParamsThenable(),\n    }\n  )\n\n  if (options?.staleTimeIterable !== undefined) {\n    baseResponse.s = options.staleTimeIterable\n  }\n\n  if (options?.staticStageByteLengthPromise !== undefined) {\n    baseResponse.l = options.staticStageByteLengthPromise\n  }\n\n  if (options?.runtimePrefetchStream !== undefined) {\n    baseResponse.p = options.runtimePrefetchStream\n  }\n\n  // Include the per-page dynamic stale time from unstable_dynamicStaleTime, but only\n  // for dynamic renders (not prerenders/static generation). The client treats\n  // its presence as authoritative.\n  // TODO: Move this to the prefetch hints file so we don't have to walk the\n  // tree on every render.\n  if (!workStore.isStaticGeneration) {\n    const dynamicStaleTime = await getDynamicStaleTime(\n      ctx.componentMod.routeModule.userland.loaderTree\n    )\n    if (dynamicStaleTime !== null) {\n      baseResponse.d = dynamicStaleTime\n    }\n  }\n\n  return baseResponse\n}\n\nfunction createErrorContext(\n  ctx: AppRenderContext,\n  renderSource: RequestErrorContext['renderSource']\n): RequestErrorContext {\n  return {\n    routerKind: 'App Router',\n    routePath: ctx.pagePath,\n    // TODO: is this correct if `isPossibleServerAction` is a false positive?\n    routeType: ctx.isPossibleServerAction ? 'action' : 'render',\n    renderSource,\n    revalidateReason: getRevalidateReason(ctx.workStore),\n  }\n}\n\n/**\n * Produces a RenderResult containing the Flight data for the given request. See\n * `generateDynamicRSCPayload` for information on the contents of the render result.\n */\nasync function generateDynamicFlightRenderResult(\n  req: BaseNextRequest,\n  ctx: AppRenderContext,\n  requestStore: RequestStore,\n  options?: {\n    actionResult: ActionResult\n    skipPageRendering: boolean\n    componentTree?: CacheNodeSeedData\n    preloadCallbacks?: PreloadCallbacks\n    temporaryReferences?: WeakMap<any, string>\n    waitUntil?: Promise<unknown>\n  }\n): Promise<RenderResult> {\n  const { htmlRequestId, renderOpts, requestId, workStore } = ctx\n\n  const {\n    onInstrumentationRequestError,\n    setReactDebugChannel,\n    isBuildTimePrerendering = false,\n  } = renderOpts\n\n  function onFlightDataRenderError(err: DigestedError, silenceLog: boolean) {\n    return onInstrumentationRequestError?.(\n      err,\n      req,\n      createErrorContext(ctx, 'react-server-components-payload'),\n      silenceLog\n    )\n  }\n\n  const onError = createReactServerErrorHandler(\n    process.env.NODE_ENV === 'development',\n    isBuildTimePrerendering,\n    workStore.reactServerErrorsByDigest,\n    onFlightDataRenderError\n  )\n\n  const debugChannel = setReactDebugChannel && createDebugChannel()\n\n  if (debugChannel) {\n    setReactDebugChannel(debugChannel.clientSide, htmlRequestId, requestId)\n  }\n\n  const { clientModules } = getClientReferenceManifest()\n\n  // For app dir, use the bundled version of Flight server renderer (renderToReadableStream)\n  // which contains the subset React.\n  const rscPayload = await workUnitAsyncStorage.run(\n    requestStore,\n    generateDynamicRSCPayload,\n    ctx,\n    options\n  )\n\n  const flightStream = workUnitAsyncStorage.run(\n    requestStore,\n    renderToFlightStream,\n    ctx.componentMod,\n    rscPayload,\n    clientModules,\n    {\n      onError,\n      temporaryReferences: options?.temporaryReferences,\n      filterStackFrame,\n      debugChannel: debugChannel?.serverSide,\n    }\n  )\n\n  return new FlightRenderResult(\n    flightStream,\n    { fetchMetrics: workStore.fetchMetrics },\n    options?.waitUntil\n  )\n}\n\n/**\n * Production-only staged dynamic flight render for cache components. Uses\n * staged rendering to separate static (RDC-backed) from runtime/dynamic\n * content.\n */\nasync function generateStagedDynamicFlightRenderResult(\n  req: BaseNextRequest,\n  ctx: AppRenderContext,\n  requestStore: RequestStore\n): Promise<RenderResult> {\n  const { componentMod, workStore, renderOpts } = ctx\n  const { renderToReadableStream, routeModule } = componentMod\n  const { loaderTree } = routeModule.userland\n  const { onInstrumentationRequestError, experimental } = renderOpts\n\n  function onFlightDataRenderError(err: DigestedError, silenceLog: boolean) {\n    return onInstrumentationRequestError?.(\n      err,\n      req,\n      createErrorContext(ctx, 'react-server-components-payload'),\n      silenceLog\n    )\n  }\n\n  const onError = createReactServerErrorHandler(\n    false,\n    false,\n    workStore.reactServerErrorsByDigest,\n    onFlightDataRenderError\n  )\n\n  const selectStaleTime = createSelectStaleTime(experimental)\n  const staleTimeIterable = new StaleTimeIterable()\n\n  // TODO(cached-navs): this assumes that we checked during build that there's no sync IO.\n  // but it can happen e.g. after a revalidation or conditionally for a param that wasn't prerendered.\n  // we should change this to track sync IO, log an error and advance to dynamic.\n  const shouldTrackSyncIO = false\n  const stageController = new StagedRenderingController(\n    null, // no aborting\n    null, // no abandoning\n    shouldTrackSyncIO\n  )\n\n  // Initialize stale time tracking on the request store.\n  requestStore.stale = INFINITE_CACHE\n  requestStore.stagedRendering = stageController\n  requestStore.asyncApiPromises = createAsyncApiPromises(\n    stageController,\n    requestStore.cookies,\n    requestStore.mutableCookies,\n    requestStore.headers\n  )\n\n  trackStaleTime(\n    requestStore as { stale: number },\n    staleTimeIterable,\n    selectStaleTime\n  )\n\n  // Deferred promise for the static stage byte length. Flight serializes the\n  // resolved value into the stream so the client knows where the static\n  // prefix ends.\n  let resolveStaticStageByteLength: (count: number) => void\n  const staticStageByteLengthPromise = new Promise<number>((resolve) => {\n    resolveStaticStageByteLength = resolve\n  })\n\n  // Check if this route has opted into runtime prefetching via\n  // unstable_instant. If so, we piggyback on the dynamic render to fill caches\n  // and then spawn a final runtime prerender whose result stream is embedded in\n  // the RSC payload. This is gated on the explicit opt-in because it adds extra\n  // server processing, increases the response payload size, and the runtime\n  // prefetch output should have been validated first.\n  const hasRuntimePrefetch =\n    await anySegmentHasRuntimePrefetchEnabled(loaderTree)\n\n  let runtimePrefetchStream: ReadableStream<Uint8Array> | undefined\n\n  if (hasRuntimePrefetch) {\n    // Create a mutable cache that gets filled during the dynamic render.\n    const prerenderResumeDataCache = createPrerenderResumeDataCache()\n    requestStore.prerenderResumeDataCache = prerenderResumeDataCache\n\n    const cacheSignal = new CacheSignal()\n    trackPendingModules(cacheSignal)\n    requestStore.cacheSignal = cacheSignal\n\n    // Create a deferred stream for the runtime prefetch result. Its readable\n    // side goes into the RSC payload (Flight serializes it lazily). The\n    // writable side receives the runtime prerender result once the dynamic\n    // render has filled all caches.\n    const runtimePrefetchTransform = new TransformStream<Uint8Array>()\n    runtimePrefetchStream = runtimePrefetchTransform.readable\n\n    // Wait for the dynamic render to fill caches, then run the final runtime\n    // prerender (fire-and-forget — does not block the response).\n    void cacheSignal\n      .cacheReady()\n      .then(() =>\n        spawnRuntimePrefetchWithFilledCaches(\n          runtimePrefetchTransform.writable,\n          ctx,\n          prerenderResumeDataCache,\n          requestStore,\n          onError\n        )\n      )\n  }\n\n  const rscPayload = await workUnitAsyncStorage.run(\n    requestStore,\n    generateDynamicRSCPayload,\n    ctx,\n    { staleTimeIterable, staticStageByteLengthPromise, runtimePrefetchStream }\n  )\n\n  const { clientModules } = getClientReferenceManifest()\n\n  const flightReadableStream = await runInSequentialTasks(\n    () => {\n      stageController.advanceStage(RenderStage.Static)\n\n      const stream = workUnitAsyncStorage.run(\n        requestStore,\n        renderToReadableStream,\n        rscPayload,\n        clientModules,\n        { onError, filterStackFrame }\n      )\n\n      const [dynamicStream, staticStream] = stream.tee()\n\n      countStaticStageBytes(staticStream, stageController).then(\n        resolveStaticStageByteLength\n      )\n\n      return dynamicStream\n    },\n    () => {\n      // This is a separate task that doesn't advance a stage. It forces\n      // draining the microtask queue so that the stale time iterable is closed\n      // before we advance to the dynamic stage.\n      void finishStaleTimeTracking(staleTimeIterable)\n    },\n    () => {\n      stageController.advanceStage(RenderStage.Dynamic)\n    }\n  )\n\n  return new FlightRenderResult(flightReadableStream, {\n    fetchMetrics: workStore.fetchMetrics,\n  })\n}\n\n/**\n * Runs a final runtime prerender using the provided (already filled) cache and\n * pipes its output into the provided writable stream. The caller is responsible\n * for waiting until caches are warm before calling this function.\n */\nasync function spawnRuntimePrefetchWithFilledCaches(\n  writable: WritableStream<Uint8Array>,\n  ctx: AppRenderContext,\n  prerenderResumeDataCache: PrerenderResumeDataCache,\n  requestStore: RequestStore,\n  onError: (err: unknown) => string | undefined\n): Promise<void> {\n  try {\n    const { componentMod, getDynamicParamFromSegment } = ctx\n    const { loaderTree } = componentMod.routeModule.userland\n    const rootParams = getRootParams(loaderTree, getDynamicParamFromSegment)\n    const staleTimeIterable = new StaleTimeIterable()\n\n    const { result } = await finalRuntimeServerPrerender(\n      ctx,\n      generateDynamicRSCPayload.bind(null, ctx, { staleTimeIterable }),\n      prerenderResumeDataCache,\n      null, // renderResumeDataCache\n      rootParams,\n      requestStore.headers,\n      requestStore.cookies,\n      requestStore.draftMode,\n      onError,\n      staleTimeIterable\n    )\n\n    await result.prelude.pipeTo(writable)\n  } catch {\n    // Runtime prerender failed. Close the stream gracefully — the navigation\n    // still works, we just won't get cached runtime data.\n    try {\n      await writable.close()\n    } catch {\n      // Writable may already be closed/errored.\n    }\n  }\n}\n\ntype RenderToReadableStreamServerOptions = NonNullable<\n  Parameters<\n    (typeof import('react-server-dom-webpack/server.node'))['renderToReadableStream']\n  >[2]\n>\n\nasync function stagedRenderToReadableStreamWithoutCachesInDev(\n  ctx: AppRenderContext,\n  requestStore: RequestStore,\n  getPayload: (requestStore: RequestStore) => Promise<RSCPayload>,\n  options: Omit<RenderToReadableStreamServerOptions, 'environmentName'>\n) {\n  // We're rendering while bypassing caches,\n  // so we have no hope of showing a useful runtime stage.\n  // But we still want things like `params` to show up in devtools correctly,\n  // which relies on mechanisms we've set up for staged rendering,\n  // so we do a 2-task version (Static -> Dynamic) instead.\n\n  // We aren't filling caches so we don't need to abort this render, it'll\n  // stream in a single pass\n  const stageController = new StagedRenderingController(\n    null, // no aborting\n    null, // no abandoning\n    false // do not track sync IO (we don't have reliable stages)\n  )\n\n  const environmentName = () => {\n    const currentStage = stageController.currentStage\n    switch (currentStage) {\n      case RenderStage.Before:\n      case RenderStage.EarlyStatic:\n      case RenderStage.Static:\n        return 'Prerender'\n      case RenderStage.EarlyRuntime:\n      case RenderStage.Runtime:\n      case RenderStage.Dynamic:\n      case RenderStage.Abandoned:\n        return 'Server'\n      default:\n        currentStage satisfies never\n        throw new InvariantError(`Invalid render stage: ${currentStage}`)\n    }\n  }\n\n  requestStore.stagedRendering = stageController\n  requestStore.asyncApiPromises = createAsyncApiPromises(\n    stageController,\n    requestStore.cookies,\n    requestStore.mutableCookies,\n    requestStore.headers\n  )\n\n  const { clientModules } = getClientReferenceManifest()\n  const rscPayload = await getPayload(requestStore)\n\n  return await runInSequentialTasks(\n    () => {\n      stageController.advanceStage(RenderStage.Static)\n      return workUnitAsyncStorage.run(\n        requestStore,\n        renderToFlightStream,\n        ctx.componentMod,\n        rscPayload,\n        clientModules,\n        {\n          ...options,\n          environmentName,\n        }\n      )\n    },\n    () => {\n      stageController.advanceStage(RenderStage.Dynamic)\n    }\n  )\n}\n\n/**\n * Fork of `generateDynamicFlightRenderResult` that renders using `renderWithRestartOnCacheMissInDev`\n * to ensure correct separation of environments Prerender/Server (for use in Cache Components)\n */\nasync function generateDynamicFlightRenderResultWithStagesInDev(\n  req: BaseNextRequest,\n  ctx: AppRenderContext,\n  initialRequestStore: RequestStore,\n  createRequestStore: (() => RequestStore) | undefined,\n  fallbackParams: OpaqueFallbackRouteParams | null\n): Promise<RenderResult> {\n  const {\n    htmlRequestId,\n    renderOpts,\n    requestId,\n    workStore,\n    componentMod: {\n      createElement,\n      routeModule: {\n        userland: { loaderTree },\n      },\n    },\n    url,\n  } = ctx\n\n  const {\n    onInstrumentationRequestError,\n    setReactDebugChannel,\n    setCacheStatus,\n    isBuildTimePrerendering = false,\n  } = renderOpts\n\n  function onFlightDataRenderError(err: DigestedError, silenceLog: boolean) {\n    return onInstrumentationRequestError?.(\n      err,\n      req,\n      createErrorContext(ctx, 'react-server-components-payload'),\n      silenceLog\n    )\n  }\n\n  const onError = createReactServerErrorHandler(\n    process.env.NODE_ENV === 'development',\n    isBuildTimePrerendering,\n    workStore.reactServerErrorsByDigest,\n    onFlightDataRenderError\n  )\n\n  // We validate RSC requests for HMR refreshes and client navigations when\n  // instant configs exist, since we render all the layouts necessary to perform\n  // the validation in those cases.\n  const shouldValidate =\n    !isBypassingCachesInDev(initialRequestStore) &&\n    (initialRequestStore.isHmrRefresh === true ||\n      (await anySegmentNeedsInstantValidationInDev(loaderTree)))\n\n  const getPayload = async (requestStore: RequestStore) => {\n    const payload: RSCPayload &\n      RSCPayloadDevProperties &\n      RSCInitialPayloadPartialDev = await workUnitAsyncStorage.run(\n      requestStore,\n      generateDynamicRSCPayload,\n      ctx,\n      undefined\n    )\n\n    if (isBypassingCachesInDev(requestStore)) {\n      // Mark the RSC payload to indicate that caches were bypassed in dev.\n      // This lets the client know not to cache anything based on this render.\n      payload._bypassCachesInDev = createElement(WarnForBypassCachesInDev, {\n        route: workStore.route,\n      })\n    } else if (shouldValidate) {\n      // If this payload will be used for validation, it needs to contain the\n      // canonical URL. Without it we'd get an error.\n      payload.c = prepareInitialCanonicalUrl(url)\n    }\n\n    return payload\n  }\n\n  let debugChannel: DebugChannelPair | undefined\n  let stream: ReadableStream<Uint8Array>\n\n  if (\n    // We only do this flow if we can safely recreate the store from scratch\n    // (which is not the case for renders after an action)\n    createRequestStore &&\n    // We only do this flow if we're not bypassing caches in dev using\n    // \"disable cache\" in devtools or a hard refresh (cache-control: \"no-store\")\n    !isBypassingCachesInDev(initialRequestStore)\n  ) {\n    // Before we kick off the render, we set the cache status back to it's initial state\n    // in case a previous render bypassed the cache.\n    if (setCacheStatus) {\n      setCacheStatus('ready', htmlRequestId)\n    }\n\n    const {\n      stream: serverStream,\n      accumulatedChunksPromise,\n      syncInterruptReason,\n      startTime,\n      staticStageEndTime,\n      runtimeStageEndTime,\n      debugChannel: returnedDebugChannel,\n      requestStore: finalRequestStore,\n    } = await renderWithRestartOnCacheMissInDev(\n      ctx,\n      initialRequestStore,\n      createRequestStore,\n      getPayload,\n      onError\n    )\n\n    if (shouldValidate) {\n      let validationDebugChannelClient: Readable | undefined = undefined\n      if (returnedDebugChannel) {\n        const [t1, t2] = returnedDebugChannel.clientSide.readable.tee()\n        returnedDebugChannel.clientSide.readable = t1\n        validationDebugChannelClient = nodeStreamFromReadableStream(t2)\n      }\n      consoleAsyncStorage.run(\n        { dim: true },\n        spawnStaticShellValidationInDev,\n        accumulatedChunksPromise,\n        syncInterruptReason,\n        startTime,\n        staticStageEndTime,\n        runtimeStageEndTime,\n        ctx,\n        finalRequestStore,\n        fallbackParams,\n        validationDebugChannelClient\n      )\n    } else {\n      logValidationSkipped(ctx)\n    }\n\n    debugChannel = returnedDebugChannel\n    stream = serverStream\n  } else {\n    // We're either bypassing caches or we can't restart the render.\n    // Do a dynamic render, but with (basic) environment labels.\n\n    // Set cache status to bypass when specifically bypassing caches in dev\n    if (setCacheStatus) {\n      setCacheStatus('bypass', htmlRequestId)\n    }\n\n    debugChannel = setReactDebugChannel && createDebugChannel()\n\n    stream = await stagedRenderToReadableStreamWithoutCachesInDev(\n      ctx,\n      initialRequestStore,\n      getPayload,\n      {\n        onError: onError,\n        filterStackFrame,\n        debugChannel: debugChannel?.serverSide,\n      }\n    )\n  }\n\n  if (debugChannel && setReactDebugChannel) {\n    setReactDebugChannel(debugChannel.clientSide, htmlRequestId, requestId)\n  }\n\n  return new FlightRenderResult(stream, {\n    fetchMetrics: workStore.fetchMetrics,\n  })\n}\n\nasync function generateRuntimePrefetchResult(\n  req: BaseNextRequest,\n  ctx: AppRenderContext,\n  requestStore: RequestStore\n): Promise<RenderResult> {\n  const { workStore, renderOpts } = ctx\n  const { isBuildTimePrerendering = false, onInstrumentationRequestError } =\n    renderOpts\n\n  function onFlightDataRenderError(err: DigestedError, silenceLog: boolean) {\n    return onInstrumentationRequestError?.(\n      err,\n      req,\n      // TODO(runtime-ppr): should we use a different value?\n      createErrorContext(ctx, 'react-server-components-payload'),\n      silenceLog\n    )\n  }\n\n  const onError = createReactServerErrorHandler(\n    false,\n    isBuildTimePrerendering,\n    workStore.reactServerErrorsByDigest,\n    onFlightDataRenderError\n  )\n\n  const metadata: AppPageRenderResultMetadata = {}\n  const staleTimeIterable = new StaleTimeIterable()\n\n  const {\n    componentMod: {\n      routeModule: {\n        userland: { loaderTree },\n      },\n    },\n    getDynamicParamFromSegment,\n  } = ctx\n  const rootParams = getRootParams(loaderTree, getDynamicParamFromSegment)\n\n  // We need to share caches between the prospective prerender and the final prerender,\n  // but we're not going to persist this anywhere.\n  const prerenderResumeDataCache = createPrerenderResumeDataCache()\n  // We're not resuming an existing render.\n  const renderResumeDataCache = null\n\n  await prospectiveRuntimeServerPrerender(\n    ctx,\n    generateDynamicRSCPayload.bind(null, ctx),\n    prerenderResumeDataCache,\n    renderResumeDataCache,\n    rootParams,\n    requestStore.headers,\n    requestStore.cookies,\n    requestStore.draftMode\n  )\n\n  const response = await finalRuntimeServerPrerender(\n    ctx,\n    generateDynamicRSCPayload.bind(null, ctx, { staleTimeIterable }),\n    prerenderResumeDataCache,\n    renderResumeDataCache,\n    rootParams,\n    requestStore.headers,\n    requestStore.cookies,\n    requestStore.draftMode,\n    onError,\n    staleTimeIterable\n  )\n\n  applyMetadataFromPrerenderResult(response, metadata, workStore)\n  metadata.fetchMetrics = ctx.workStore.fetchMetrics\n\n  return new FlightRenderResult(response.result.prelude, metadata)\n}\n\nasync function prospectiveRuntimeServerPrerender(\n  ctx: AppRenderContext,\n  getPayload: () => any,\n  prerenderResumeDataCache: PrerenderResumeDataCache | null,\n  renderResumeDataCache: RenderResumeDataCache | null,\n  rootParams: Params,\n  headers: PrerenderStoreModernRuntime['headers'],\n  cookies: PrerenderStoreModernRuntime['cookies'],\n  draftMode: PrerenderStoreModernRuntime['draftMode']\n) {\n  const { implicitTags, renderOpts, workStore } = ctx\n  const { ComponentMod } = renderOpts\n\n  // Prerender controller represents the lifetime of the prerender.\n  // It will be aborted when a Task is complete or a synchronously aborting\n  // API is called. Notably during cache-filling renders this does not actually\n  // terminate the render itself which will continue until all caches are filled\n  const initialServerPrerenderController = new AbortController()\n\n  // This controller represents the lifetime of the React render call. Notably\n  // during the cache-filling render it is different from the prerender controller\n  // because we don't want to end the react render until all caches are filled.\n  const initialServerRenderController = new AbortController()\n\n  // The cacheSignal helps us track whether caches are still filling or we are ready\n  // to cut the render off.\n  const cacheSignal = new CacheSignal()\n\n  const initialServerPrerenderStore: PrerenderStoreModernRuntime = {\n    type: 'prerender-runtime',\n    phase: 'render',\n    rootParams,\n    implicitTags,\n    renderSignal: initialServerRenderController.signal,\n    controller: initialServerPrerenderController,\n    // During the initial prerender we need to track all cache reads to ensure\n    // we render long enough to fill every cache it is possible to visit during\n    // the final prerender.\n    cacheSignal,\n    // We only need to track dynamic accesses during the final prerender.\n    dynamicTracking: null,\n    // Runtime prefetches are never cached server-side, only client-side,\n    // so we set `expire` and `revalidate` to their minimum values just in case.\n    revalidate: 1,\n    expire: 0,\n    stale: INFINITE_CACHE,\n    tags: [...implicitTags.tags],\n    renderResumeDataCache,\n    prerenderResumeDataCache,\n    hmrRefreshHash: undefined,\n    // We don't track vary params during initial prerender, only the final one\n    varyParamsAccumulator: null,\n    // No stage sequencing needed for prospective renders.\n    stagedRendering: null,\n    // These are not present in regular prerenders, but allowed in a runtime prerender.\n    headers,\n    cookies,\n    draftMode,\n  }\n\n  const { clientModules } = getClientReferenceManifest()\n\n  // We're not going to use the result of this render because the only time it could be used\n  // is if it completes in a microtask and that's likely very rare for any non-trivial app\n  const initialServerPayload = await workUnitAsyncStorage.run(\n    initialServerPrerenderStore,\n    getPayload\n  )\n\n  const prerenderOptions = {\n    filterStackFrame,\n    onError: (err: unknown) => {\n      const digest = getDigestForWellKnownError(err)\n\n      if (digest) {\n        return digest\n      }\n\n      if (initialServerPrerenderController.signal.aborted) {\n        // The render aborted before this error was handled which indicates\n        // the error is caused by unfinished components within the render\n        return\n      } else if (\n        process.env.NEXT_DEBUG_BUILD ||\n        process.env.__NEXT_VERBOSE_LOGGING\n      ) {\n        printDebugThrownValueForProspectiveRender(\n          err,\n          workStore.route,\n          Phase.ProspectiveRender\n        )\n      }\n    },\n    // We don't want to stop rendering until the cacheSignal is complete so we pass\n    // a different signal to this render call than is used by dynamic APIs to signify\n    // transitioning out of the prerender environment\n    signal: initialServerRenderController.signal,\n  }\n\n  const pendingInitialServerResult = workUnitAsyncStorage.run(\n    initialServerPrerenderStore,\n    getServerPrerender(ComponentMod),\n    initialServerPayload,\n    clientModules,\n    prerenderOptions\n  )\n\n  // Wait for all caches to be finished filling and for async imports to resolve\n  trackPendingModules(cacheSignal)\n  await cacheSignal.cacheReady()\n\n  initialServerRenderController.abort()\n  initialServerPrerenderController.abort()\n\n  // We don't need to continue the prerender process if we already\n  // detected invalid dynamic usage in the initial prerender phase.\n  if (workStore.invalidDynamicUsageError) {\n    throw workStore.invalidDynamicUsageError\n  }\n\n  try {\n    return await createReactServerPrerenderResult(pendingInitialServerResult)\n  } catch (err) {\n    if (\n      initialServerRenderController.signal.aborted ||\n      initialServerPrerenderController.signal.aborted\n    ) {\n      // These are expected errors that might error the prerender. we ignore them.\n    } else if (\n      process.env.NEXT_DEBUG_BUILD ||\n      process.env.__NEXT_VERBOSE_LOGGING\n    ) {\n      // We don't normally log these errors because we are going to retry anyway but\n      // it can be useful for debugging Next.js itself to get visibility here when needed\n      printDebugThrownValueForProspectiveRender(\n        err,\n        workStore.route,\n        Phase.ProspectiveRender\n      )\n    }\n    return null\n  }\n}\n\n/**\n * Prepends a single ASCII byte to the stream indicating whether the response\n * is partial (contains dynamic holes): '~' (0x7e) for partial, '#' (0x23)\n * for complete.\n */\nfunction prependIsPartialByte(\n  stream: ReadableStream<Uint8Array>,\n  isPartial: boolean\n): ReadableStream<Uint8Array> {\n  const byte = new Uint8Array([isPartial ? 0x7e : 0x23])\n  return stream.pipeThrough(\n    new TransformStream({\n      start(controller) {\n        controller.enqueue(byte)\n      },\n    })\n  )\n}\n\nasync function finalRuntimeServerPrerender(\n  ctx: AppRenderContext,\n  getPayload: () => any,\n  prerenderResumeDataCache: PrerenderResumeDataCache | null,\n  renderResumeDataCache: RenderResumeDataCache | null,\n  rootParams: Params,\n  headers: PrerenderStoreModernRuntime['headers'],\n  cookies: PrerenderStoreModernRuntime['cookies'],\n  draftMode: PrerenderStoreModernRuntime['draftMode'],\n  onError: (err: unknown) => string | undefined,\n  staleTimeIterable: StaleTimeIterable\n) {\n  const { implicitTags, renderOpts } = ctx\n  const { ComponentMod, experimental, isDebugDynamicAccesses } = renderOpts\n  const selectStaleTime = createSelectStaleTime(experimental)\n\n  let serverIsDynamic = false\n  const finalServerController = new AbortController()\n\n  const serverDynamicTracking = createDynamicTrackingState(\n    isDebugDynamicAccesses\n  )\n\n  const finalStageController = new StagedRenderingController(\n    finalServerController.signal,\n    null, // no abandoning\n    true // track sync IO\n  )\n\n  const varyParamsAccumulator = createResponseVaryParamsAccumulator()\n\n  const finalServerPrerenderStore: PrerenderStoreModernRuntime = {\n    type: 'prerender-runtime',\n    phase: 'render',\n    rootParams,\n    implicitTags,\n    renderSignal: finalServerController.signal,\n    controller: finalServerController,\n    // All caches we could read must already be filled so no tracking is necessary\n    cacheSignal: null,\n    dynamicTracking: serverDynamicTracking,\n    // Runtime prefetches are never cached server-side, only client-side,\n    // so we set `expire` and `revalidate` to their minimum values just in case.\n    revalidate: 1,\n    expire: 0,\n    stale: INFINITE_CACHE,\n    tags: [...implicitTags.tags],\n    prerenderResumeDataCache,\n    renderResumeDataCache,\n    hmrRefreshHash: undefined,\n    varyParamsAccumulator,\n    // Used to separate the stages in the 5-task pipeline.\n    stagedRendering: finalStageController,\n    // These are not present in regular prerenders, but allowed in a runtime prerender.\n    headers,\n    cookies,\n    draftMode,\n  }\n\n  trackStaleTime(finalServerPrerenderStore, staleTimeIterable, selectStaleTime)\n\n  const { clientModules } = getClientReferenceManifest()\n\n  const finalRSCPayload = await workUnitAsyncStorage.run(\n    finalServerPrerenderStore,\n    getPayload\n  )\n\n  let prerenderIsPending = true\n  const result = await runInSequentialTasks(\n    async () => {\n      // EarlyStatic stage: render begins.\n      // Runtime-prefetchable segments render immediately.\n      // Non-prefetchable segments are gated until the Static stage.\n      finalStageController.advanceStage(RenderStage.EarlyStatic)\n      const prerenderResult = await workUnitAsyncStorage.run(\n        finalServerPrerenderStore,\n        getServerPrerender(ComponentMod),\n        finalRSCPayload,\n        clientModules,\n        {\n          filterStackFrame,\n          onError,\n          signal: finalServerController.signal,\n        }\n      )\n      prerenderIsPending = false\n      return prerenderResult\n    },\n    () => {\n      // Advance to Static stage: resolve promise holding back\n      // non-prefetchable segments so they can begin rendering.\n      finalStageController.advanceStage(RenderStage.Static)\n    },\n    () => {\n      // Advance to EarlyRuntime stage: resolve cookies/headers for\n      // runtime-prefetchable segments. Sync IO is checked here.\n      finalStageController.advanceStage(RenderStage.EarlyRuntime)\n    },\n    () => {\n      // Advance to Runtime stage: resolve cookies/headers for\n      // non-prefetchable segments. Sync IO is allowed here.\n      finalStageController.advanceStage(RenderStage.Runtime)\n    },\n    () => {\n      Promise.all([\n        finishStaleTimeTracking(staleTimeIterable),\n        finishAccumulatingVaryParams(varyParamsAccumulator),\n      ]).then(() => {\n        // Abort. This runs as a microtask after Flight has flushed the\n        // staleTime and varyParams closing chunks, but before the next\n        // macrotask resolves the overall result.\n        if (finalServerController.signal.aborted) {\n          // If the server controller is already aborted we must have called\n          // something that required aborting the prerender synchronously such\n          // as with new Date()\n          serverIsDynamic = true\n          return\n        }\n\n        if (prerenderIsPending) {\n          // If prerenderIsPending then we have blocked for longer than a Task\n          // and we assume there is something unfinished.\n          serverIsDynamic = true\n        }\n        finalServerController.abort()\n      })\n    }\n  )\n\n  result.prelude = prependIsPartialByte(result.prelude, serverIsDynamic)\n\n  return {\n    result,\n    // TODO(runtime-ppr): do we need to produce a digest map here?\n    // digestErrorsMap: ...,\n    dynamicAccess: serverDynamicTracking,\n    isPartial: serverIsDynamic,\n    collectedRevalidate: finalServerPrerenderStore.revalidate,\n    collectedExpire: finalServerPrerenderStore.expire,\n    collectedStale: staleTimeIterable.currentValue,\n    collectedTags: finalServerPrerenderStore.tags,\n  }\n}\n\n/**\n * Crawlers will inadvertently think the canonicalUrl in the RSC payload should be crawled\n * when our intention is to just seed the router state with the current URL.\n * This function splits up the pathname so that we can later join it on\n * when we're ready to consume the path.\n */\nfunction prepareInitialCanonicalUrl(url: RequestStore['url']) {\n  return (url.pathname + url.search).split('/')\n}\n\nfunction getRenderedSearch(query: NextParsedUrlQuery): string {\n  // Inlined implementation of querystring.encode, which is not available in\n  // the Edge runtime.\n  const pairs = []\n  for (const key in query) {\n    const value = query[key]\n    if (value == null) continue\n    if (Array.isArray(value)) {\n      for (const v of value) {\n        pairs.push(\n          `${encodeURIComponent(key)}=${encodeURIComponent(String(v))}`\n        )\n      }\n    } else {\n      pairs.push(\n        `${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`\n      )\n    }\n  }\n\n  // The result should match the format of a web URL's `search` property, since\n  // this is the format that's stored in the App Router state.\n  // TODO: We're a bit inconsistent about this. The x-nextjs-rewritten-query\n  // header omits the leading question mark. Should refactor to always do\n  // that instead.\n  if (pairs.length === 0) {\n    // If the search string is empty, return an empty string.\n    return ''\n  }\n  // Prepend '?' to the search params string.\n  return '?' + pairs.join('&')\n}\n\n// This is the data necessary to render <AppRouter /> when no SSR errors are encountered\nasync function getRSCPayload(\n  tree: LoaderTree,\n  ctx: AppRenderContext,\n  options: {\n    is404: boolean\n    staleTimeIterable?: AsyncIterable<number>\n    staticStageByteLengthPromise?: Promise<number>\n    runtimePrefetchStream?: ReadableStream<Uint8Array>\n  }\n): Promise<InitialRSCPayload & { P: ReactNode }> {\n  const {\n    is404,\n    staleTimeIterable,\n    staticStageByteLengthPromise,\n    runtimePrefetchStream,\n  } = options\n  const injectedCSS = new Set<string>()\n  const injectedJS = new Set<string>()\n  const injectedFontPreloadTags = new Set<string>()\n  let missingSlots: Set<string> | undefined\n\n  // We only track missing parallel slots in development\n  if (process.env.__NEXT_DEV_SERVER) {\n    missingSlots = new Set<string>()\n  }\n\n  const {\n    getDynamicParamFromSegment,\n    query,\n    appUsingSizeAdjustment,\n    componentMod: { createMetadataComponents, createElement, Fragment },\n    url,\n    workStore,\n  } = ctx\n\n  const hints = ctx.renderOpts.prefetchHints?.[ctx.pagePath] ?? null\n  const initialTree = await createFlightRouterStateFromLoaderTree(\n    tree,\n    hints,\n    getDynamicParamFromSegment,\n    query\n  )\n  const serveStreamingMetadata = !!ctx.renderOpts.serveStreamingMetadata\n  const hasGlobalNotFound = !!tree[2]['global-not-found']\n\n  const metadataIsRuntimePrefetchable =\n    await anySegmentHasRuntimePrefetchEnabled(tree)\n  const { Viewport, Metadata, MetadataOutlet } = createMetadataComponents({\n    tree,\n    // When it's using global-not-found, metadata errorType is undefined, which will retrieve the\n    // metadata from the page.\n    // When it's using not-found, metadata errorType is 'not-found', which will retrieve the\n    // metadata from the not-found.js boundary.\n    // TODO: remove this condition and keep it undefined when global-not-found is stabilized.\n    errorType: is404 && !hasGlobalNotFound ? 'not-found' : undefined,\n    parsedQuery: query,\n    pathname: url.pathname,\n    metadataContext: createMetadataContext(ctx.renderOpts),\n    interpolatedParams: ctx.interpolatedParams,\n    serveStreamingMetadata,\n    isRuntimePrefetchable: metadataIsRuntimePrefetchable,\n  })\n\n  const preloadCallbacks: PreloadCallbacks = []\n\n  const seedData = await createComponentTree({\n    ctx,\n    loaderTree: tree,\n    parentParams: {},\n    parentOptionalCatchAllParamName: null,\n    parentRuntimePrefetchable: false,\n    injectedCSS,\n    injectedJS,\n    injectedFontPreloadTags,\n    rootLayoutIncluded: false,\n    missingSlots,\n    preloadCallbacks,\n    authInterrupts: ctx.renderOpts.experimental.authInterrupts,\n    MetadataOutlet,\n  })\n\n  // When the `vary` response header is present with `Next-URL`, that means there's a chance\n  // it could respond differently if there's an interception route. We provide this information\n  // to `AppRouter` so that it can properly seed the prefetch cache with a prefix, if needed.\n  // In dev, the Vary header may not reliably reflect whether a route can\n  // be intercepted, because interception routes are compiled on demand.\n  // Default to true so the client doesn't cache a stale Fallback entry.\n  const varyHeader = ctx.res.getHeader('vary')\n  const couldBeIntercepted =\n    !!process.env.__NEXT_DEV_SERVER ||\n    (typeof varyHeader === 'string' && varyHeader.includes(NEXT_URL))\n\n  const initialHead = createElement(\n    Fragment,\n    {\n      key: flightDataPathHeadKey,\n    },\n    createElement(NonIndex, {\n      createElement,\n      pagePath: ctx.pagePath,\n      statusCode: ctx.res.statusCode,\n      isPossibleServerAction: ctx.isPossibleServerAction,\n    }),\n    createElement(Viewport, null),\n    createElement(Metadata, null),\n    appUsingSizeAdjustment\n      ? createElement('meta', {\n          name: 'next-size-adjust',\n          content: '',\n        })\n      : null\n  )\n\n  const { GlobalError, styles: globalErrorStyles } = await getGlobalErrorStyles(\n    tree,\n    ctx\n  )\n\n  // Assume the head we're rendering contains only partial data if PPR is\n  // enabled and this is a statically generated response. This is used by the\n  // client Segment Cache after a prefetch to determine if it can skip the\n  // second request to fill in the dynamic data.\n  //\n  // See similar comment in create-component-tree.tsx for more context.\n  const isPossiblyPartialHead =\n    workStore.isStaticGeneration &&\n    ctx.renderOpts.experimental.isRoutePPREnabled === true\n\n  return maybeAppendBuildIdToRSCPayload(ctx, {\n    // See the comment above the `Preloads` component (below) for why this is part of the payload\n    P: createElement(Preloads, {\n      preloadCallbacks: preloadCallbacks,\n    }),\n    c: prepareInitialCanonicalUrl(url),\n    q: getRenderedSearch(query),\n    i: !!couldBeIntercepted,\n    f: [\n      [\n        initialTree,\n        seedData,\n        initialHead,\n        isPossiblyPartialHead,\n      ] as FlightDataPath,\n    ],\n    m: missingSlots,\n    G: [GlobalError, globalErrorStyles],\n    // Tells the client whether this route supports per-segment prefetching.\n    // With Cache Components, all routes support it. Without it, only fully\n    // static pages do, because their per-segment prefetch responses are\n    // generated during static generation (build or ISR).\n    S: workStore.isStaticGeneration || ctx.renderOpts.cacheComponents,\n    h: getMetadataVaryParamsThenable(),\n    s: staleTimeIterable,\n    l: staticStageByteLengthPromise,\n    p: runtimePrefetchStream,\n    // Include the per-page dynamic stale time from unstable_dynamicStaleTime, but\n    // only for dynamic renders. The client treats its presence as\n    // authoritative.\n    // TODO: Move this to the prefetch hints file so we don't have to walk\n    // the tree on every render.\n    d: !workStore.isStaticGeneration\n      ? ((await getDynamicStaleTime(tree)) ?? undefined)\n      : undefined,\n  })\n}\n\n/**\n * Preload calls (such as `ReactDOM.preloadStyle` and `ReactDOM.preloadFont`) need to be called during rendering\n * in order to create the appropriate preload tags in the DOM, otherwise they're a no-op. Since we invoke\n * renderToReadableStream with a function that returns component props rather than a component itself, we use\n * this component to \"render  \" the preload calls.\n */\nfunction Preloads({ preloadCallbacks }: { preloadCallbacks: Function[] }) {\n  preloadCallbacks.forEach((preloadFn) => preloadFn())\n  return null\n}\n\n// This is the data necessary to render <AppRouter /> when an error state is triggered\nasync function getErrorRSCPayload(\n  tree: LoaderTree,\n  ctx: AppRenderContext,\n  ssrError: unknown,\n  errorType: MetadataErrorType | 'redirect' | undefined\n) {\n  const {\n    getDynamicParamFromSegment,\n    query,\n    componentMod: { createMetadataComponents, createElement, Fragment },\n    url,\n    workStore,\n  } = ctx\n\n  const serveStreamingMetadata = !!ctx.renderOpts.serveStreamingMetadata\n  const metadataIsRuntimePrefetchable =\n    await anySegmentHasRuntimePrefetchEnabled(tree)\n  const { Viewport, Metadata } = createMetadataComponents({\n    tree,\n    parsedQuery: query,\n    pathname: url.pathname,\n    metadataContext: createMetadataContext(ctx.renderOpts),\n    errorType,\n    interpolatedParams: ctx.interpolatedParams,\n    serveStreamingMetadata: serveStreamingMetadata,\n    isRuntimePrefetchable: metadataIsRuntimePrefetchable,\n  })\n\n  const initialHead = createElement(\n    Fragment,\n    {\n      key: flightDataPathHeadKey,\n    },\n    createElement(NonIndex, {\n      createElement,\n      pagePath: ctx.pagePath,\n      statusCode: ctx.res.statusCode,\n      isPossibleServerAction: ctx.isPossibleServerAction,\n    }),\n    createElement(Viewport, null),\n    process.env.__NEXT_DEV_SERVER &&\n      createElement('meta', {\n        name: 'next-error',\n        content: 'not-found',\n      }),\n    createElement(Metadata, null)\n  )\n\n  const errorHints = ctx.renderOpts.prefetchHints?.[ctx.pagePath] ?? null\n  const initialTree = await createFlightRouterStateFromLoaderTree(\n    tree,\n    errorHints,\n    getDynamicParamFromSegment,\n    query\n  )\n\n  let err: Error | undefined = undefined\n  if (ssrError) {\n    err = isError(ssrError) ? ssrError : new Error(ssrError + '')\n  }\n\n  // For metadata notFound error there's no global not found boundary on top\n  // so we create a not found page with AppRouter\n  const seedData: CacheNodeSeedData = [\n    createElement(\n      'html',\n      {\n        id: '__next_error__',\n      },\n      createElement('head', null),\n      createElement(\n        'body',\n        null,\n        process.env.__NEXT_DEV_SERVER && err\n          ? createElement('template', {\n              'data-next-error-message': err.message,\n              'data-next-error-digest': 'digest' in err ? err.digest : '',\n              'data-next-error-stack': err.stack,\n            })\n          : null\n      )\n    ),\n    {},\n    null,\n    false,\n    null, // varyParams - not tracked for error pages\n  ]\n\n  const { GlobalError, styles: globalErrorStyles } = await getGlobalErrorStyles(\n    tree,\n    ctx\n  )\n\n  const isPossiblyPartialHead =\n    workStore.isStaticGeneration &&\n    ctx.renderOpts.experimental.isRoutePPREnabled === true\n\n  return maybeAppendBuildIdToRSCPayload(ctx, {\n    c: prepareInitialCanonicalUrl(url),\n    q: getRenderedSearch(query),\n    m: undefined,\n    i: false,\n    f: [\n      [\n        initialTree,\n        seedData,\n        initialHead,\n        isPossiblyPartialHead,\n      ] as FlightDataPath,\n    ],\n    G: [GlobalError, globalErrorStyles],\n    // Tells the client whether this route supports per-segment prefetching.\n    // With Cache Components, all routes support it. Without it, only fully\n    // static pages do, because their per-segment prefetch responses are\n    // generated during static generation (build or ISR).\n    S: workStore.isStaticGeneration || ctx.renderOpts.cacheComponents,\n    h: getMetadataVaryParamsThenable(),\n  } satisfies InitialRSCPayload)\n}\n\n// This component must run in an SSR context. It will render the RSC root component\nfunction App<T>({\n  reactServerStream,\n  reactDebugStream,\n  debugEndTime,\n  preinitScripts,\n  ServerInsertedHTMLProvider,\n  nonce,\n  images,\n}: {\n  /* eslint-disable @next/internal/no-ambiguous-jsx -- React Client */\n  reactServerStream: Readable | BinaryStreamOf<T>\n  reactDebugStream: Readable | ReadableStream<Uint8Array> | undefined\n  debugEndTime: number | undefined\n  preinitScripts: () => void\n  ServerInsertedHTMLProvider: ComponentType<{\n    children: JSX.Element\n  }>\n  images: RenderOpts['images']\n  nonce?: string\n}): JSX.Element {\n  preinitScripts()\n  const response = ReactClient.use(\n    getFlightStream<InitialRSCPayload>(\n      reactServerStream,\n      reactDebugStream,\n      debugEndTime,\n      nonce\n    )\n  )\n\n  const initialState = createInitialRouterState({\n    // This is not used during hydration, so we don't have to pass a\n    // real timestamp.\n    navigatedAt: -1,\n    initialRSCPayload: response,\n    // location is not initialized in the SSR render\n    // it's set to window.location during hydration\n    location: null,\n  })\n\n  const actionQueue = createMutableActionQueue(initialState, null)\n\n  const { HeadManagerContext } =\n    require('../../shared/lib/head-manager-context.shared-runtime') as typeof import('../../shared/lib/head-manager-context.shared-runtime')\n\n  return (\n    <HeadManagerContext.Provider\n      value={{\n        appDir: true,\n        nonce,\n      }}\n    >\n      <ImageConfigContext.Provider value={images ?? imageConfigDefault}>\n        <ServerInsertedHTMLProvider>\n          <AppRouter actionQueue={actionQueue} globalErrorState={response.G} />\n        </ServerInsertedHTMLProvider>\n      </ImageConfigContext.Provider>\n    </HeadManagerContext.Provider>\n  )\n  /* eslint-enable @next/internal/no-ambiguous-jsx -- React Client */\n}\n\n// @TODO our error stream should be probably just use the same root component. But it was previously\n// different I don't want to figure out if that is meaningful at this time so just keeping the behavior\n// consistent for now.\nfunction ErrorApp<T>({\n  reactServerStream,\n  preinitScripts,\n  ServerInsertedHTMLProvider,\n  nonce,\n  images,\n}: {\n  reactServerStream: BinaryStreamOf<T>\n  preinitScripts: () => void\n  ServerInsertedHTMLProvider: ComponentType<{\n    children: JSX.Element\n  }>\n  nonce?: string\n  images: RenderOpts['images']\n}): JSX.Element {\n  /* eslint-disable @next/internal/no-ambiguous-jsx -- React Client */\n  preinitScripts()\n  const response = ReactClient.use(\n    getFlightStream<InitialRSCPayload>(\n      reactServerStream,\n      undefined,\n      undefined,\n      nonce\n    )\n  )\n\n  const initialState = createInitialRouterState({\n    // This is not used during hydration, so we don't have to pass a\n    // real timestamp.\n    navigatedAt: -1,\n    initialRSCPayload: response,\n    // location is not initialized in the SSR render\n    // it's set to window.location during hydration\n    location: null,\n  })\n\n  const actionQueue = createMutableActionQueue(initialState, null)\n\n  return (\n    <ImageConfigContext.Provider value={images ?? imageConfigDefault}>\n      <ServerInsertedHTMLProvider>\n        <AppRouter actionQueue={actionQueue} globalErrorState={response.G} />\n      </ServerInsertedHTMLProvider>\n    </ImageConfigContext.Provider>\n  )\n  /* eslint-enable @next/internal/no-ambiguous-jsx -- React Client */\n}\n\n// We use a trick with TS Generics to branch streams with a type so we can\n// consume the parsed value of a Readable Stream if it was constructed with a\n// certain object shape. The generic type is not used directly in the type so it\n// requires a disabling of the eslint rule disallowing unused vars\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type BinaryStreamOf<T> = ReadableStream<Uint8Array>\n\nasync function renderToHTMLOrFlightImpl(\n  req: BaseNextRequest,\n  res: BaseNextResponse,\n  url: ReturnType<typeof parseRelativeUrl>,\n  pagePath: string,\n  query: NextParsedUrlQuery,\n  renderOpts: RenderOpts,\n  workStore: WorkStore,\n  parsedRequestHeaders: ParsedRequestHeaders,\n  postponedState: PostponedState | null,\n  serverComponentsHmrCache: ServerComponentsHmrCache | undefined,\n  sharedContext: AppSharedContext,\n  interpolatedParams: Params,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null\n) {\n  const isNotFoundPath = pagePath === '/404'\n  if (isNotFoundPath) {\n    res.statusCode = 404\n  }\n\n  // A unique request timestamp used by development to ensure that it's\n  // consistent and won't change during this request. This is important to\n  // avoid that resources can be deduped by React Float if the same resource is\n  // rendered or preloaded multiple times: `<link href=\"a.css?v={Date.now()}\"/>`.\n  const requestTimestamp = Date.now()\n\n  const {\n    ComponentMod,\n    nextFontManifest,\n    serverActions,\n    assetPrefix = '',\n    enableTainting,\n    cacheComponents,\n    setIsrStatus,\n  } = renderOpts\n\n  const { cachedNavigations } = renderOpts.experimental\n\n  // We need to expose the bundled `require` API globally for\n  // react-server-dom-webpack. This is a hack until we find a better way.\n  if (ComponentMod.__next_app__) {\n    const instrumented = wrapClientComponentLoader(ComponentMod)\n\n    // When we are prerendering if there is a cacheSignal for tracking\n    // cache reads we track calls to `loadChunk` and `require`. This allows us\n    // to treat chunk/module loading with similar semantics as cache reads to avoid\n    // module loading from causing a prerender to abort too early.\n\n    const shouldTrackModuleLoading = () => {\n      if (!cacheComponents) {\n        return false\n      }\n      if (process.env.__NEXT_DEV_SERVER) {\n        return true\n      }\n      const workUnitStore = workUnitAsyncStorage.getStore()\n\n      if (!workUnitStore) {\n        return false\n      }\n\n      switch (workUnitStore.type) {\n        case 'prerender':\n        case 'prerender-client':\n        case 'validation-client':\n        case 'prerender-runtime':\n        case 'cache':\n        case 'private-cache':\n          return true\n        case 'prerender-ppr':\n        case 'prerender-legacy':\n        case 'request':\n        case 'unstable-cache':\n        case 'generate-static-params':\n          return false\n        default:\n          workUnitStore satisfies never\n      }\n    }\n\n    const __next_require__: typeof instrumented.require = (...args) => {\n      const exportsOrPromise = instrumented.require(...args)\n      if (shouldTrackModuleLoading()) {\n        // requiring an async module returns a promise.\n        trackPendingImport(exportsOrPromise)\n      }\n      return exportsOrPromise\n    }\n    // @ts-expect-error\n    globalThis.__next_require__ = __next_require__\n\n    const __next_chunk_load__: typeof instrumented.loadChunk = (...args) => {\n      const loadingChunk = instrumented.loadChunk(...args)\n      if (shouldTrackModuleLoading()) {\n        trackPendingChunkLoad(loadingChunk)\n      }\n      return loadingChunk\n    }\n    // @ts-expect-error\n    globalThis.__next_chunk_load__ = __next_chunk_load__\n  }\n\n  if (process.env.__NEXT_DEV_SERVER && setIsrStatus && !cacheComponents) {\n    // Reset the ISR status at start of request.\n    const { pathname } = new URL(req.url || '/', 'http://n')\n    setIsrStatus(\n      pathname,\n      // Only pages using the Node runtime can use ISR, Edge is always dynamic.\n      process.env.NEXT_RUNTIME === 'edge' ? false : undefined\n    )\n  }\n\n  if (\n    // The type check here ensures that `req` is correctly typed, and the\n    // environment variable check provides dead code elimination.\n    process.env.NEXT_RUNTIME !== 'edge' &&\n    isNodeNextRequest(req)\n  ) {\n    res.onClose(() => {\n      // We stop tracking fetch metrics when the response closes, since we\n      // report them at that time.\n      workStore.shouldTrackFetchMetrics = false\n    })\n\n    req.originalRequest.on('end', () => {\n      if ('performance' in globalThis) {\n        const metrics = getClientComponentLoaderMetrics({ reset: true })\n        if (metrics) {\n          getTracer()\n            .startSpan(NextNodeServerSpan.clientComponentLoading, {\n              startTime: metrics.clientComponentLoadStart,\n              attributes: {\n                'next.clientComponentLoadCount':\n                  metrics.clientComponentLoadCount,\n                'next.span_type': NextNodeServerSpan.clientComponentLoading,\n              },\n            })\n            .end(\n              metrics.clientComponentLoadStart +\n                metrics.clientComponentLoadTimes\n            )\n        }\n      }\n    })\n  }\n\n  const metadata: AppPageRenderResultMetadata = {\n    statusCode: isNotFoundPath ? 404 : undefined,\n  }\n\n  const appUsingSizeAdjustment = !!nextFontManifest?.appUsingSizeAdjust\n\n  ComponentMod.patchFetch()\n\n  // Pull out the hooks/references from the component.\n  const {\n    routeModule: {\n      userland: { loaderTree },\n    },\n    taintObjectReference,\n  } = ComponentMod\n  if (enableTainting) {\n    taintObjectReference(\n      'Do not pass process.env to Client Components since it will leak sensitive data',\n      process.env\n    )\n  }\n\n  workStore.fetchMetrics = []\n  metadata.fetchMetrics = workStore.fetchMetrics\n\n  // don't modify original query object\n  query = { ...query }\n  stripInternalQueries(query)\n\n  const { isStaticGeneration } = workStore\n\n  let requestId: string\n  let htmlRequestId: string\n\n  const {\n    flightRouterState,\n    isPrefetchRequest,\n    isRuntimePrefetchRequest,\n    isRSCRequest,\n    isHmrRefresh,\n    nonce,\n  } = parsedRequestHeaders\n\n  if (parsedRequestHeaders.requestId) {\n    // If the client has provided a request ID (in development mode), we use it.\n    requestId = parsedRequestHeaders.requestId\n  } else {\n    // Otherwise we generate a new request ID.\n    if (isStaticGeneration) {\n      requestId = Buffer.from(\n        await crypto.subtle.digest('SHA-1', Buffer.from(req.url))\n      ).toString('hex')\n    } else if (process.env.NEXT_RUNTIME === 'edge') {\n      requestId = crypto.randomUUID()\n    } else {\n      requestId = (\n        require('next/dist/compiled/nanoid') as typeof import('next/dist/compiled/nanoid')\n      ).nanoid()\n    }\n  }\n\n  // If the client has provided an HTML request ID, we use it to associate the\n  // request with the HTML document from which it originated, which is used to\n  // send debug information to the associated WebSocket client. Otherwise, this\n  // is the request for the HTML document, so we use the request ID also as the\n  // HTML request ID.\n  htmlRequestId = parsedRequestHeaders.htmlRequestId || requestId\n\n  const getDynamicParamFromSegment = makeGetDynamicParamFromSegment(\n    interpolatedParams,\n    fallbackRouteParams,\n    renderOpts.experimental.optimisticRouting\n  )\n\n  const isPossibleActionRequest = getIsPossibleServerAction(req)\n\n  // For implicit tags, we use the resolved pathname which has dynamic params\n  // interpolated, is decoded, and has trailing slash removed.\n  const resolvedPathname = getRequestMeta(req, 'resolvedPathname')\n  if (!resolvedPathname) {\n    throw new InvariantError('resolvedPathname must be set in request metadata')\n  }\n\n  const implicitTags = await getImplicitTags(\n    workStore.page,\n    resolvedPathname,\n    fallbackRouteParams\n  )\n\n  const ctx: AppRenderContext = {\n    componentMod: ComponentMod,\n    url,\n    renderOpts,\n    workStore,\n    parsedRequestHeaders,\n    getDynamicParamFromSegment,\n    interpolatedParams,\n    query,\n    isPrefetch: isPrefetchRequest,\n    isPossibleServerAction: isPossibleActionRequest,\n    requestTimestamp,\n    appUsingSizeAdjustment,\n    flightRouterState,\n    requestId,\n    htmlRequestId,\n    pagePath,\n    assetPrefix,\n    isNotFoundPath,\n    nonce,\n    res,\n    sharedContext,\n    implicitTags,\n  }\n\n  getTracer().setRootSpanAttribute('next.route', pagePath)\n\n  if (isStaticGeneration) {\n    // We're either building or revalidating. In either case we need to\n    // prerender our page rather than render it.\n    const prerenderToStreamWithTracing = getTracer().wrap(\n      AppRenderSpan.getBodyResult,\n      {\n        spanName: `prerender route (app) ${pagePath}`,\n        attributes: {\n          'next.route': pagePath,\n        },\n      },\n      prerenderToStream\n    )\n\n    const response = await prerenderToStreamWithTracing(\n      req,\n      res,\n      ctx,\n      metadata,\n      loaderTree,\n      fallbackRouteParams\n    )\n\n    // If we're debugging partial prerendering, print all the dynamic API accesses\n    // that occurred during the render.\n    // @TODO move into renderToStream function\n    if (\n      response.dynamicAccess &&\n      accessedDynamicData(response.dynamicAccess) &&\n      renderOpts.isDebugDynamicAccesses\n    ) {\n      warn('The following dynamic usage was detected:')\n      for (const access of formatDynamicAPIAccesses(response.dynamicAccess)) {\n        warn(access)\n      }\n    }\n\n    // If we encountered any unexpected errors during build we fail the\n    // prerendering phase and the build.\n    if (workStore.invalidDynamicUsageError) {\n      logDisallowedDynamicError(workStore, workStore.invalidDynamicUsageError)\n      throw new StaticGenBailoutError()\n    }\n    if (response.digestErrorsMap.size) {\n      const buildFailingError = response.digestErrorsMap.values().next().value\n      if (buildFailingError) throw buildFailingError\n    }\n    // Pick first userland SSR error, which is also not a RSC error.\n    if (response.ssrErrors.length) {\n      const buildFailingError = response.ssrErrors.find((err) =>\n        isUserLandError(err)\n      )\n      if (buildFailingError) throw buildFailingError\n    }\n\n    const options: RenderResultOptions = {\n      metadata,\n      contentType: HTML_CONTENT_TYPE_HEADER,\n    }\n\n    // If we have pending revalidates, wait until they are all resolved.\n    const maybeRevalidatesPromise = executeRevalidates(workStore)\n    if (maybeRevalidatesPromise !== false) {\n      const revalidatesPromise = maybeRevalidatesPromise.finally(() => {\n        if (process.env.NEXT_PRIVATE_DEBUG_CACHE) {\n          console.log('pending revalidates promise finished for:', url.href)\n        }\n      })\n      if (renderOpts.waitUntil) {\n        renderOpts.waitUntil(revalidatesPromise)\n      } else {\n        options.waitUntil = revalidatesPromise\n      }\n    }\n\n    applyMetadataFromPrerenderResult(response, metadata, workStore)\n\n    if (response.renderResumeDataCache) {\n      metadata.renderResumeDataCache = response.renderResumeDataCache\n    }\n\n    const streamString = await streamToString(response.stream)\n    const result = new RenderResult(streamString, options)\n\n    // Run build-time instant validation if the page has instant configs\n    // TODO(instant-validation-build): This is not a great place to wire this in.\n    if (\n      workStore.cacheComponentsEnabled &&\n      workStore.isBuildTimePrerendering &&\n      renderOpts.runInstantValidation &&\n      (await anySegmentNeedsInstantValidationInBuild(loaderTree))\n    ) {\n      // Throws StaticGenBailoutError if validation failed.\n      await validateInstantConfigsInBuild(\n        ctx,\n        response.renderResumeDataCache ?? null\n      )\n    }\n\n    return result\n  } else {\n    // We're rendering dynamically\n    const renderResumeDataCache =\n      renderOpts.renderResumeDataCache ??\n      postponedState?.renderResumeDataCache ??\n      null\n\n    const rootParams = getRootParams(loaderTree, ctx.getDynamicParamFromSegment)\n    const fallbackParams = getRequestMeta(req, 'fallbackParams') || null\n\n    const createRequestStore = createRequestStoreForRender.bind(\n      null,\n      req,\n      res,\n      url,\n      rootParams,\n      implicitTags,\n      renderOpts.onUpdateCookies,\n      renderOpts.previewProps,\n      isHmrRefresh,\n      serverComponentsHmrCache,\n      renderResumeDataCache,\n      fallbackParams\n    )\n    const requestStore = createRequestStore()\n\n    if (\n      process.env.__NEXT_DEV_SERVER &&\n      setIsrStatus &&\n      !cacheComponents &&\n      // Only pages using the Node runtime can use ISR, so we only need to\n      // update the status for those.\n      // The type check here ensures that `req` is correctly typed, and the\n      // environment variable check provides dead code elimination.\n      process.env.NEXT_RUNTIME !== 'edge' &&\n      isNodeNextRequest(req)\n    ) {\n      req.originalRequest.on('end', () => {\n        const { pathname } = new URL(req.url || '/', 'http://n')\n        const isStatic = !requestStore.usedDynamic && !workStore.forceDynamic\n        setIsrStatus(pathname, isStatic)\n      })\n    }\n\n    if (isRSCRequest) {\n      if (isRuntimePrefetchRequest) {\n        return generateRuntimePrefetchResult(req, ctx, requestStore)\n      } else {\n        if (\n          process.env.__NEXT_DEV_SERVER &&\n          process.env.NEXT_RUNTIME !== 'edge' &&\n          cacheComponents\n        ) {\n          return generateDynamicFlightRenderResultWithStagesInDev(\n            req,\n            ctx,\n            requestStore,\n            createRequestStore,\n            fallbackParams\n          )\n        } else if (cacheComponents && cachedNavigations) {\n          return generateStagedDynamicFlightRenderResult(req, ctx, requestStore)\n        } else {\n          return generateDynamicFlightRenderResult(req, ctx, requestStore)\n        }\n      }\n    }\n\n    let didExecuteServerAction = false\n    let formState: null | any = null\n    if (isPossibleActionRequest) {\n      // For action requests, we handle them differently with a special render result.\n      const actionRequestResult = await handleAction({\n        req,\n        res,\n        ComponentMod,\n        generateFlight: generateDynamicFlightRenderResult,\n        workStore,\n        requestStore,\n        serverActions,\n        ctx,\n        metadata,\n      })\n\n      if (actionRequestResult) {\n        if (actionRequestResult.type === 'not-found') {\n          const notFoundLoaderTree = createNotFoundLoaderTree(loaderTree)\n          res.statusCode = 404\n          metadata.statusCode = 404\n          const stream = await renderToStream(\n            requestStore,\n            req,\n            res,\n            ctx,\n            notFoundLoaderTree,\n            formState,\n            postponedState,\n            metadata,\n            undefined, // Prevent restartable-render behavior in dev + Cache Components mode\n            fallbackParams\n          )\n\n          return new RenderResult(stream, {\n            metadata,\n            contentType: HTML_CONTENT_TYPE_HEADER,\n          })\n        } else if (actionRequestResult.type === 'done') {\n          if (actionRequestResult.result) {\n            actionRequestResult.result.assignMetadata(metadata)\n            return actionRequestResult.result\n          } else if (actionRequestResult.formState) {\n            formState = actionRequestResult.formState\n          }\n        }\n      }\n\n      didExecuteServerAction = true\n    }\n\n    const options: RenderResultOptions = {\n      metadata,\n      contentType: HTML_CONTENT_TYPE_HEADER,\n    }\n\n    const stream = await renderToStream(\n      // NOTE: in Cache Components (dev), if the render is restarted, it will use a different requestStore\n      // than the one that we're passing in here.\n      requestStore,\n      req,\n      res,\n      ctx,\n      loaderTree,\n      formState,\n      postponedState,\n      metadata,\n      // If we're rendering HTML after an action, we don't want restartable-render behavior\n      // because the result should be dynamic, like it is in prod.\n      // Also, the request store might have been mutated by the action (e.g. enabling draftMode)\n      // and we currently we don't copy changes over when creating a new store,\n      // so the restarted render wouldn't be correct.\n      didExecuteServerAction ? undefined : createRequestStore,\n      fallbackParams\n    )\n\n    // Invalid dynamic usages should only error the request in development.\n    // In production, it's better to produce a result.\n    // (the dynamic error will still be thrown inside the component tree, but it's catchable by error boundaries)\n    if (workStore.invalidDynamicUsageError && process.env.__NEXT_DEV_SERVER) {\n      throw workStore.invalidDynamicUsageError\n    }\n\n    // If we have pending revalidates, wait until they are all resolved.\n    const maybeRevalidatesPromise = executeRevalidates(workStore)\n    if (maybeRevalidatesPromise !== false) {\n      const revalidatesPromise = maybeRevalidatesPromise.finally(() => {\n        if (process.env.NEXT_PRIVATE_DEBUG_CACHE) {\n          console.log('pending revalidates promise finished for:', url.href)\n        }\n      })\n      if (renderOpts.waitUntil) {\n        renderOpts.waitUntil(revalidatesPromise)\n      } else {\n        options.waitUntil = revalidatesPromise\n      }\n    }\n\n    // Create the new render result for the response.\n    return new RenderResult(stream, options)\n  }\n}\n\nexport type AppPageRender = (\n  req: BaseNextRequest,\n  res: BaseNextResponse,\n  pagePath: string,\n  query: NextParsedUrlQuery,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  renderOpts: RenderOpts,\n  serverComponentsHmrCache: ServerComponentsHmrCache | undefined,\n  sharedContext: AppSharedContext\n) => Promise<RenderResult<AppPageRenderResultMetadata>>\n\nexport const renderToHTMLOrFlight: AppPageRender = (\n  req,\n  res,\n  pagePath,\n  query,\n  fallbackRouteParams,\n  renderOpts,\n  serverComponentsHmrCache,\n  sharedContext\n) => {\n  if (!req.url) {\n    throw new Error('Invalid URL')\n  }\n\n  const url = parseRelativeUrl(req.url, undefined, false)\n\n  // We read these values from the request object as, in certain cases,\n  // base-server will strip them to opt into different rendering behavior.\n  const parsedRequestHeaders = parseRequestHeaders(req.headers, {\n    isRoutePPREnabled: renderOpts.experimental.isRoutePPREnabled === true,\n    previewModeId: renderOpts.previewProps?.previewModeId,\n  })\n\n  const { isPrefetchRequest, previouslyRevalidatedTags, nonce } =\n    parsedRequestHeaders\n\n  let interpolatedParams: Params\n  let postponedState: PostponedState | null = null\n\n  // If provided, the postpone state should be parsed so it can be provided to\n  // React.\n  if (typeof renderOpts.postponed === 'string') {\n    if (fallbackRouteParams) {\n      throw new InvariantError(\n        'postponed state should not be provided when fallback params are provided'\n      )\n    }\n\n    interpolatedParams = interpolateParallelRouteParams(\n      renderOpts.ComponentMod.routeModule.userland.loaderTree,\n      renderOpts.params ?? {},\n      pagePath,\n      fallbackRouteParams\n    )\n\n    postponedState = parsePostponedState(\n      renderOpts.postponed,\n      interpolatedParams,\n      renderOpts.experimental.maxPostponedStateSizeBytes\n    )\n  } else {\n    interpolatedParams = interpolateParallelRouteParams(\n      renderOpts.ComponentMod.routeModule.userland.loaderTree,\n      renderOpts.params ?? {},\n      pagePath,\n      fallbackRouteParams\n    )\n  }\n\n  if (\n    postponedState?.renderResumeDataCache &&\n    renderOpts.renderResumeDataCache\n  ) {\n    throw new InvariantError(\n      'postponed state and dev warmup immutable resume data cache should not be provided together'\n    )\n  }\n\n  const workStore = createWorkStore({\n    page: renderOpts.routeModule.definition.page,\n    renderOpts,\n    // @TODO move to workUnitStore of type Request\n    isPrefetchRequest,\n    buildId: sharedContext.buildId,\n    previouslyRevalidatedTags,\n    nonce,\n  })\n\n  return workAsyncStorage.run(\n    workStore,\n    // The function to run\n    renderToHTMLOrFlightImpl,\n    // all of it's args\n    req,\n    res,\n    url,\n    pagePath,\n    query,\n    renderOpts,\n    workStore,\n    parsedRequestHeaders,\n    postponedState,\n    serverComponentsHmrCache,\n    sharedContext,\n    interpolatedParams,\n    fallbackRouteParams\n  )\n}\n\nfunction applyMetadataFromPrerenderResult(\n  response: Pick<\n    PrerenderToStreamResult,\n    | 'collectedExpire'\n    | 'collectedRevalidate'\n    | 'collectedStale'\n    | 'collectedTags'\n  >,\n  metadata: AppPageRenderResultMetadata,\n  workStore: WorkStore\n) {\n  if (response.collectedTags) {\n    metadata.fetchTags = response.collectedTags.join(',')\n  }\n\n  // Let the client router know how long to keep the cached entry around.\n  const staleHeader = String(response.collectedStale)\n  metadata.headers ??= {}\n  metadata.headers[NEXT_ROUTER_STALE_TIME_HEADER] = staleHeader\n\n  // If force static is specifically set to false, we should not revalidate\n  // the page.\n  if (workStore.forceStatic === false || response.collectedRevalidate === 0) {\n    metadata.cacheControl = { revalidate: 0, expire: undefined }\n  } else {\n    // Copy the cache control value onto the render result metadata.\n    metadata.cacheControl = {\n      revalidate:\n        response.collectedRevalidate >= INFINITE_CACHE\n          ? false\n          : response.collectedRevalidate,\n      expire:\n        response.collectedExpire >= INFINITE_CACHE\n          ? undefined\n          : response.collectedExpire,\n    }\n  }\n\n  // provide bailout info for debugging\n  if (metadata.cacheControl.revalidate === 0) {\n    metadata.staticBailoutInfo = {\n      description: workStore.dynamicUsageDescription,\n      stack: workStore.dynamicUsageStack,\n    }\n  }\n}\n\ntype RSCPayloadDevProperties = {\n  /** Only available during cacheComponents development builds. Used for logging errors. */\n  _validation?: Promise<ReactNode>\n  _bypassCachesInDev?: ReactNode\n}\n\ntype RSCInitialPayloadPartialDev = {\n  c?: InitialRSCPayload['c']\n}\n\nasync function renderToStream(\n  requestStore: RequestStore,\n  req: BaseNextRequest,\n  res: BaseNextResponse,\n  ctx: AppRenderContext,\n  tree: LoaderTree,\n  formState: any,\n  postponedState: PostponedState | null,\n  metadata: AppPageRenderResultMetadata,\n  createRequestStore: (() => RequestStore) | undefined,\n  fallbackParams: OpaqueFallbackRouteParams | null\n): Promise<ReadableStream<Uint8Array>> {\n  /* eslint-disable @next/internal/no-ambiguous-jsx -- React Client */\n  const {\n    assetPrefix,\n    htmlRequestId,\n    nonce,\n    pagePath,\n    renderOpts,\n    requestId,\n    workStore,\n  } = ctx\n\n  const {\n    basePath,\n    buildManifest,\n    ComponentMod: { createElement },\n    crossOrigin,\n    experimental,\n    isBuildTimePrerendering = false,\n    onInstrumentationRequestError,\n    page,\n    reactMaxHeadersLength,\n    setReactDebugChannel,\n    shouldWaitOnAllReady,\n    subresourceIntegrityManifest,\n    supportsDynamicResponse,\n    cacheComponents,\n  } = renderOpts\n\n  const { cachedNavigations } = renderOpts.experimental\n\n  const { ServerInsertedHTMLProvider, renderServerInsertedHTML } =\n    createServerInsertedHTML()\n  const getServerInsertedMetadata = createServerInsertedMetadata(nonce)\n\n  const tracingMetadata = getTracedMetadata(\n    getTracer().getTracePropagationData(),\n    experimental.clientTraceMetadata\n  )\n\n  const polyfills: JSX.IntrinsicElements['script'][] =\n    buildManifest.polyfillFiles\n      .filter(\n        (polyfill) =>\n          polyfill.endsWith('.js') && !polyfill.endsWith('.module.js')\n      )\n      .map((polyfill) => ({\n        src: `${assetPrefix}/_next/${polyfill}${getAssetQueryString(\n          ctx,\n          false\n        )}`,\n        integrity: subresourceIntegrityManifest?.[polyfill],\n        crossOrigin,\n        noModule: true,\n        nonce,\n      }))\n\n  const [preinitScripts, bootstrapScript] = getRequiredScripts(\n    buildManifest,\n    // Why is assetPrefix optional on renderOpts?\n    // @TODO make it default empty string on renderOpts and get rid of it from ctx\n    assetPrefix,\n    crossOrigin,\n    subresourceIntegrityManifest,\n    getAssetQueryString(ctx, true),\n    nonce,\n    page\n  )\n\n  // In development mode, set the request ID as a global variable, before the\n  // bootstrap script is executed, which depends on it during hydration.\n  // For MPA navigations (page reload, direct URL entry), the request ID\n  // header is not present, so we generate a random one.\n  const bootstrapScriptContent = process.env.__NEXT_DEV_SERVER\n    ? `self.__next_r=${JSON.stringify(requestId ?? crypto.randomUUID())}`\n    : undefined\n\n  // Create the \"render route (app)\" span manually so we can keep it open during streaming.\n  // This is necessary because errors inside Suspense boundaries are reported asynchronously\n  // during stream consumption, after a typical wrapped function would have ended the span.\n  // Note: We pass the full span name as the first argument since startSpan uses it directly.\n  const renderSpan = getTracer().startSpan(\n    `render route (app) ${pagePath}` as any,\n    {\n      attributes: {\n        'next.span_name': `render route (app) ${pagePath}`,\n        'next.span_type': AppRenderSpan.getBodyResult,\n        'next.route': pagePath,\n      },\n    }\n  )\n\n  // Helper to end the span with error status (used when throwing from catch blocks)\n  const endSpanWithError = (err: unknown) => {\n    if (!renderSpan.isRecording()) return\n    if (err instanceof Error) {\n      renderSpan.recordException(err)\n      renderSpan.setAttribute('error.type', err.name)\n    }\n    renderSpan.setStatus({\n      code: SpanStatusCode.ERROR,\n      message: err instanceof Error ? err.message : undefined,\n    })\n    renderSpan.end()\n  }\n\n  // Run the rest of the function within the span's context so child spans\n  // (like \"build component tree\", \"generateMetadata\") are properly parented.\n  return getTracer().withSpan(renderSpan, async () => {\n    const { reactServerErrorsByDigest } = workStore\n    function onHTMLRenderRSCError(err: DigestedError, silenceLog: boolean) {\n      return onInstrumentationRequestError?.(\n        err,\n        req,\n        createErrorContext(ctx, 'react-server-components'),\n        silenceLog\n      )\n    }\n    const serverComponentsErrorHandler = createReactServerErrorHandler(\n      process.env.NODE_ENV === 'development',\n      isBuildTimePrerendering,\n      reactServerErrorsByDigest,\n      onHTMLRenderRSCError,\n      renderSpan\n    )\n\n    function onHTMLRenderSSRError(err: DigestedError) {\n      // We don't need to silence logs here. onHTMLRenderSSRError won't be called\n      // at all if the error was logged before in the RSC error handler.\n      const silenceLog = false\n      return onInstrumentationRequestError?.(\n        err,\n        req,\n        createErrorContext(ctx, 'server-rendering'),\n        silenceLog\n      )\n    }\n\n    const allCapturedErrors: Array<unknown> = []\n    const htmlRendererErrorHandler = createHTMLErrorHandler(\n      process.env.NODE_ENV === 'development',\n      isBuildTimePrerendering,\n      reactServerErrorsByDigest,\n      allCapturedErrors,\n      onHTMLRenderSSRError,\n      renderSpan\n    )\n\n    let reactServerResult: null | ReactServerResult = null\n    let reactDebugStream: ReadableStream<Uint8Array> | undefined\n\n    const setHeader = res.setHeader.bind(res)\n    const appendHeader = res.appendHeader.bind(res)\n    const { clientModules } = getClientReferenceManifest()\n\n    try {\n      if (\n        process.env.__NEXT_DEV_SERVER &&\n        // Edge routes never prerender so we don't have a Prerender environment for anything in edge runtime\n        process.env.NEXT_RUNTIME !== 'edge' &&\n        // We only have a Prerender environment for projects opted into cacheComponents\n        cacheComponents\n      ) {\n        let debugChannel: DebugChannelPair | undefined\n\n        // eslint-disable-next-line @typescript-eslint/no-shadow\n        const getPayload = async (requestStore: RequestStore) => {\n          const payload: InitialRSCPayload & RSCPayloadDevProperties =\n            await workUnitAsyncStorage.run(\n              requestStore,\n              getRSCPayload,\n              tree,\n              ctx,\n              { is404: res.statusCode === 404 }\n            )\n\n          if (isBypassingCachesInDev(requestStore)) {\n            // Mark the RSC payload to indicate that caches were bypassed in dev.\n            // This lets the client know not to cache anything based on this render.\n            if (renderOpts.setCacheStatus) {\n              // we know this is available  when cacheComponents is enabled, but typeguard to be safe\n              renderOpts.setCacheStatus('bypass', htmlRequestId)\n            }\n            payload._bypassCachesInDev = createElement(\n              WarnForBypassCachesInDev,\n              {\n                route: workStore.route,\n              }\n            )\n          }\n\n          return payload\n        }\n\n        if (\n          // We only do this flow if we can safely recreate the store from scratch\n          // (which is not the case for renders after an action)\n          createRequestStore &&\n          // We only do this flow if we're not bypassing caches in dev using\n          // \"disable cache\" in devtools or a hard refresh (cache-control: \"no-store\")\n          !isBypassingCachesInDev(requestStore)\n        ) {\n          const {\n            stream: serverStream,\n            accumulatedChunksPromise,\n            syncInterruptReason,\n            startTime,\n            staticStageEndTime,\n            runtimeStageEndTime,\n            debugChannel: returnedDebugChannel,\n            requestStore: finalRequestStore,\n          } = await renderWithRestartOnCacheMissInDev(\n            ctx,\n            requestStore,\n            createRequestStore,\n            getPayload,\n            serverComponentsErrorHandler\n          )\n\n          let validationDebugChannelClient: Readable | undefined = undefined\n          if (returnedDebugChannel) {\n            const [t1, t2] = returnedDebugChannel.clientSide.readable.tee()\n            returnedDebugChannel.clientSide.readable = t1\n            validationDebugChannelClient = nodeStreamFromReadableStream(t2)\n          }\n\n          consoleAsyncStorage.run(\n            { dim: true },\n            spawnStaticShellValidationInDev,\n            accumulatedChunksPromise,\n            syncInterruptReason,\n            startTime,\n            staticStageEndTime,\n            runtimeStageEndTime,\n            ctx,\n            finalRequestStore,\n            fallbackParams,\n            validationDebugChannelClient\n          )\n\n          reactServerResult = new ReactServerResult(serverStream)\n          requestStore = finalRequestStore\n          debugChannel = returnedDebugChannel\n        } else {\n          logValidationSkipped(ctx)\n\n          // We're either bypassing caches or we can't restart the render.\n          // Do a dynamic render, but with (basic) environment labels.\n\n          debugChannel = setReactDebugChannel && createDebugChannel()\n\n          const serverStream =\n            await stagedRenderToReadableStreamWithoutCachesInDev(\n              ctx,\n              requestStore,\n              getPayload,\n              {\n                onError: serverComponentsErrorHandler,\n                filterStackFrame,\n                debugChannel: debugChannel?.serverSide,\n              }\n            )\n          reactServerResult = new ReactServerResult(serverStream)\n        }\n\n        if (debugChannel && setReactDebugChannel) {\n          const [readableSsr, readableBrowser] =\n            debugChannel.clientSide.readable.tee()\n\n          reactDebugStream = readableSsr\n\n          setReactDebugChannel(\n            { readable: readableBrowser },\n            htmlRequestId,\n            requestId\n          )\n        }\n      } else if (cacheComponents && cachedNavigations) {\n        // Production Cache Components + Cached Navigations: use staged\n        // rendering so the RSC payload includes the static stage byte length\n        // (`l` field), enabling the client to cache the static subset during\n        // hydration.\n        const { renderToReadableStream } = ctx.componentMod\n\n        const selectStaleTime = createSelectStaleTime(experimental)\n        const staleTimeIterable = new StaleTimeIterable()\n\n        // TODO(cached-navs): this assumes that we checked during build that there's no sync IO.\n        // but it can happen e.g. after a revalidation or conditionally for a param that wasn't prerendered.\n        // we should change this to track sync IO, log an error and advance to dynamic.\n        const shouldTrackSyncIO = false\n        const stageController = new StagedRenderingController(\n          null, // no aborting\n          null, // no abandoning\n          shouldTrackSyncIO\n        )\n\n        requestStore.stale = INFINITE_CACHE\n        requestStore.stagedRendering = stageController\n\n        trackStaleTime(\n          requestStore as { stale: number },\n          staleTimeIterable,\n          selectStaleTime\n        )\n\n        let resolveStaticStageByteLength: (count: number) => void\n        const staticStageByteLengthPromise = new Promise<number>((resolve) => {\n          resolveStaticStageByteLength = resolve\n        })\n\n        // If the route has runtime prefetching enabled, spawn a runtime\n        // prerender after the resume render fills caches. The result is\n        // embedded in the initial RSC payload so the client can cache\n        // runtime-prefetchable content during hydration.\n        const hasRuntimePrefetch =\n          await anySegmentHasRuntimePrefetchEnabled(tree)\n\n        let runtimePrefetchStream: ReadableStream<Uint8Array> | undefined\n\n        if (hasRuntimePrefetch) {\n          const prerenderResumeDataCache = createPrerenderResumeDataCache()\n          requestStore.prerenderResumeDataCache = prerenderResumeDataCache\n\n          const cacheSignal = new CacheSignal()\n          trackPendingModules(cacheSignal)\n          requestStore.cacheSignal = cacheSignal\n\n          const runtimePrefetchTransform = new TransformStream<Uint8Array>()\n          runtimePrefetchStream = runtimePrefetchTransform.readable\n\n          void cacheSignal\n            .cacheReady()\n            .then(() =>\n              spawnRuntimePrefetchWithFilledCaches(\n                runtimePrefetchTransform.writable,\n                ctx,\n                prerenderResumeDataCache,\n                requestStore,\n                serverComponentsErrorHandler\n              )\n            )\n        }\n\n        const RSCPayload = await workUnitAsyncStorage.run(\n          requestStore,\n          getRSCPayload,\n          tree,\n          ctx,\n          {\n            is404: res.statusCode === 404,\n            staleTimeIterable,\n            staticStageByteLengthPromise,\n            runtimePrefetchStream,\n          }\n        )\n\n        const flightStream = await runInSequentialTasks(\n          () => {\n            stageController.advanceStage(RenderStage.Static)\n\n            const stream = workUnitAsyncStorage.run(\n              requestStore,\n              renderToReadableStream,\n              RSCPayload,\n              clientModules,\n              {\n                onError: serverComponentsErrorHandler,\n                filterStackFrame,\n              }\n            )\n\n            const [dynamicStream, staticStream] = stream.tee()\n\n            countStaticStageBytes(staticStream, stageController).then(\n              resolveStaticStageByteLength!\n            )\n\n            return dynamicStream\n          },\n          () => {\n            // This is a separate task that doesn't advance a stage. It forces\n            // draining the microtask queue so that the stale time iterable is\n            // closed before we advance to the dynamic stage.\n            void finishStaleTimeTracking(staleTimeIterable)\n          },\n          () => {\n            stageController.advanceStage(RenderStage.Dynamic)\n          }\n        )\n\n        reactServerResult = new ReactServerResult(flightStream)\n      } else {\n        // This is a dynamic render. We don't do dynamic tracking because we're not prerendering\n        const RSCPayload: RSCPayload & RSCPayloadDevProperties =\n          await workUnitAsyncStorage.run(\n            requestStore,\n            getRSCPayload,\n            tree,\n            ctx,\n            { is404: res.statusCode === 404 }\n          )\n\n        const debugChannel = setReactDebugChannel && createDebugChannel()\n\n        if (debugChannel) {\n          const [readableSsr, readableBrowser] =\n            debugChannel.clientSide.readable.tee()\n\n          reactDebugStream = readableSsr\n\n          setReactDebugChannel(\n            { readable: readableBrowser },\n            htmlRequestId,\n            requestId\n          )\n        }\n\n        reactServerResult = new ReactServerResult(\n          workUnitAsyncStorage.run(\n            requestStore,\n            renderToFlightStream,\n            ctx.componentMod,\n            RSCPayload,\n            clientModules,\n            {\n              filterStackFrame,\n              onError: serverComponentsErrorHandler,\n              debugChannel: debugChannel?.serverSide,\n            }\n          )\n        )\n      }\n\n      // React doesn't start rendering synchronously but we want the RSC render to have a chance to start\n      // before we begin SSR rendering because we want to capture any available preload headers so we tick\n      // one task before continuing\n      await waitAtLeastOneReactRenderTask()\n\n      // If provided, the postpone state should be parsed as JSON so it can be\n      // provided to React.\n      if (typeof renderOpts.postponed === 'string') {\n        if (postponedState?.type === DynamicState.DATA) {\n          // We have a complete HTML Document in the prerender but we need to\n          // still include the new server component render because it was not included\n          // in the static prelude.\n          const inlinedDataStream = createInlinedDataStream(\n            reactServerResult.tee(),\n            nonce,\n            formState\n          )\n\n          // End the span since there's no async rendering in this path\n          if (renderSpan.isRecording()) renderSpan.end()\n          return chainStreams(inlinedDataStream, createDocumentClosingStream())\n        } else if (postponedState) {\n          // We assume we have dynamic HTML requiring a resume render to complete\n          const { postponed, preludeState } =\n            getPostponedFromState(postponedState)\n\n          const resumeAppElement = (\n            <App\n              reactServerStream={reactServerResult.tee()}\n              reactDebugStream={reactDebugStream}\n              debugEndTime={undefined}\n              preinitScripts={preinitScripts}\n              ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n              nonce={nonce}\n              images={ctx.renderOpts.images}\n            />\n          )\n\n          const getServerInsertedHTML = makeGetServerInsertedHTML({\n            polyfills,\n            renderServerInsertedHTML,\n            serverCapturedErrors: allCapturedErrors,\n            basePath,\n            tracingMetadata: tracingMetadata,\n          })\n\n          const { stream: htmlStream, allReady } =\n            await workUnitAsyncStorage.run(\n              requestStore,\n              resumeToFizzStream,\n              resumeAppElement,\n              postponed,\n              { onError: htmlRendererErrorHandler, nonce }\n            )\n\n          // End the render span only after React completed rendering (including anything inside Suspense boundaries)\n          allReady.finally(() => {\n            if (renderSpan.isRecording()) renderSpan.end()\n          })\n\n          return await continueDynamicHTMLResume(htmlStream, {\n            delayDataUntilFirstHtmlChunk:\n              preludeState === DynamicHTMLPreludeState.Empty,\n            inlinedDataStream: createInlinedDataStream(\n              reactServerResult.consume(),\n              nonce,\n              formState\n            ),\n            getServerInsertedHTML,\n            getServerInsertedMetadata,\n            deploymentId: ctx.sharedContext.deploymentId,\n          })\n        }\n      }\n\n      // This is a regular dynamic render\n      const getServerInsertedHTML = makeGetServerInsertedHTML({\n        polyfills,\n        renderServerInsertedHTML,\n        serverCapturedErrors: allCapturedErrors,\n        basePath,\n        tracingMetadata: tracingMetadata,\n      })\n\n      const generateStaticHTML =\n        supportsDynamicResponse !== true || !!shouldWaitOnAllReady\n\n      const appElement = (\n        <App\n          reactServerStream={reactServerResult.tee()}\n          reactDebugStream={reactDebugStream}\n          debugEndTime={undefined}\n          preinitScripts={preinitScripts}\n          ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n          nonce={nonce}\n          images={ctx.renderOpts.images}\n        />\n      )\n\n      const fizzOptions = {\n        onError: htmlRendererErrorHandler,\n        nonce,\n        onHeaders: (headers: Headers) => {\n          headers.forEach((value, key) => {\n            appendHeader(key, value)\n          })\n        },\n        maxHeadersLength: reactMaxHeadersLength,\n        bootstrapScriptContent,\n        bootstrapScripts: [bootstrapScript],\n        formState,\n      }\n\n      const { stream: htmlStream, allReady } = await workUnitAsyncStorage.run(\n        requestStore,\n        renderToFizzStream,\n        appElement,\n        fizzOptions\n      )\n\n      // End the render span only after React completed rendering (including anything inside Suspense boundaries)\n      allReady.finally(() => {\n        if (renderSpan.isRecording()) renderSpan.end()\n      })\n\n      return await continueFizzStream(htmlStream, {\n        inlinedDataStream: createInlinedDataStream(\n          reactServerResult.consume(),\n          nonce,\n          formState\n        ),\n        isStaticGeneration: generateStaticHTML,\n        allReady,\n        deploymentId: ctx.sharedContext.deploymentId,\n        getServerInsertedHTML,\n        getServerInsertedMetadata,\n        validateRootLayout: !!process.env.__NEXT_DEV_SERVER,\n      })\n    } catch (err) {\n      if (\n        isStaticGenBailoutError(err) ||\n        (typeof err === 'object' &&\n          err !== null &&\n          'message' in err &&\n          typeof err.message === 'string' &&\n          err.message.includes(\n            'https://nextjs.org/docs/advanced-features/static-html-export'\n          ))\n      ) {\n        // Ensure that \"next dev\" prints the red error overlay\n        endSpanWithError(err)\n        throw err\n      }\n\n      // If a bailout made it to this point, it means it wasn't wrapped inside\n      // a suspense boundary.\n      const shouldBailoutToCSR = isBailoutToCSRError(err)\n      if (shouldBailoutToCSR) {\n        const stack = getStackWithoutErrorMessage(err)\n        error(\n          `${err.reason} should be wrapped in a suspense boundary at page \"${pagePath}\". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout\\n${stack}`\n        )\n\n        endSpanWithError(err)\n        throw err\n      }\n\n      let errorType: MetadataErrorType | 'redirect' | undefined\n\n      if (isHTTPAccessFallbackError(err)) {\n        res.statusCode = getAccessFallbackHTTPStatus(err)\n        metadata.statusCode = res.statusCode\n        errorType = getAccessFallbackErrorTypeByStatus(res.statusCode)\n      } else if (isRedirectError(err)) {\n        errorType = 'redirect'\n        res.statusCode = getRedirectStatusCodeFromError(err)\n        metadata.statusCode = res.statusCode\n\n        const redirectUrl = addPathPrefix(\n          getURLFromRedirectError(err),\n          basePath\n        )\n\n        // If there were mutable cookies set, we need to set them on the\n        // response.\n        const headers = new Headers()\n        if (appendMutableCookies(headers, requestStore.mutableCookies)) {\n          setHeader('set-cookie', Array.from(headers.values()))\n        }\n\n        setHeader('location', redirectUrl)\n      } else if (!shouldBailoutToCSR) {\n        res.statusCode = 500\n        metadata.statusCode = res.statusCode\n      }\n\n      const [errorPreinitScripts, errorBootstrapScript] = getRequiredScripts(\n        buildManifest,\n        assetPrefix,\n        crossOrigin,\n        subresourceIntegrityManifest,\n        getAssetQueryString(ctx, false),\n        nonce,\n        '/_not-found/page'\n      )\n\n      let errorRSCPayload: InitialRSCPayload\n      let errorServerStream: import('./stream-ops').AnyStream\n\n      try {\n        errorRSCPayload = await workUnitAsyncStorage.run(\n          requestStore,\n          getErrorRSCPayload,\n          tree,\n          ctx,\n          reactServerErrorsByDigest.has((err as any).digest) ? null : err,\n          errorType\n        )\n\n        errorServerStream = workUnitAsyncStorage.run(\n          requestStore,\n          renderToFlightStream,\n          ctx.componentMod,\n          errorRSCPayload,\n          clientModules,\n          {\n            filterStackFrame,\n            onError: serverComponentsErrorHandler,\n          }\n        )\n\n        if (reactServerResult === null) {\n          // We errored when we did not have an RSC stream to read from. This is not just a render\n          // error, we need to throw early\n          endSpanWithError(err)\n          throw err\n        }\n      } catch (setupErr) {\n        endSpanWithError(setupErr)\n        throw setupErr\n      }\n\n      try {\n        const generateStaticHTML =\n          supportsDynamicResponse !== true || !!shouldWaitOnAllReady\n\n        const { stream: errorHtmlStream, allReady: errorAllReady } =\n          await workUnitAsyncStorage.run(\n            requestStore,\n            renderToFizzStream,\n            <ErrorApp\n              reactServerStream={errorServerStream}\n              ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n              preinitScripts={errorPreinitScripts}\n              nonce={nonce}\n              images={ctx.renderOpts.images}\n            />,\n            {\n              nonce,\n              bootstrapScriptContent,\n              bootstrapScripts: [errorBootstrapScript],\n              formState,\n            }\n          )\n\n        // End the render span only after React completed rendering (including anything inside Suspense boundaries)\n        errorAllReady.finally(() => {\n          if (renderSpan.isRecording()) renderSpan.end()\n        })\n\n        return await continueFizzStream(errorHtmlStream, {\n          inlinedDataStream: createInlinedDataStream(\n            // This is intentionally using the readable datastream from the\n            // main render rather than the flight data from the error page\n            // render\n            reactServerResult.consume(),\n            nonce,\n            formState\n          ),\n          isStaticGeneration: generateStaticHTML,\n          deploymentId: ctx.sharedContext.deploymentId,\n          getServerInsertedHTML: makeGetServerInsertedHTML({\n            polyfills,\n            renderServerInsertedHTML,\n            serverCapturedErrors: [],\n            basePath,\n            tracingMetadata: tracingMetadata,\n          }),\n          getServerInsertedMetadata,\n          validateRootLayout: !!process.env.__NEXT_DEV_SERVER,\n        })\n      } catch (finalErr: any) {\n        if (\n          process.env.__NEXT_DEV_SERVER &&\n          isHTTPAccessFallbackError(finalErr)\n        ) {\n          const { bailOnRootNotFound } =\n            require('../../client/components/dev-root-http-access-fallback-boundary') as typeof import('../../client/components/dev-root-http-access-fallback-boundary')\n          bailOnRootNotFound()\n        }\n        endSpanWithError(finalErr)\n        throw finalErr\n      }\n    }\n  })\n  /* eslint-enable @next/internal/no-ambiguous-jsx */\n}\n\nasync function renderWithRestartOnCacheMissInDev(\n  ctx: AppRenderContext,\n  initialRequestStore: RequestStore,\n  createRequestStore: () => RequestStore,\n  getPayload: (requestStore: RequestStore) => Promise<RSCPayload>,\n  onError: (error: unknown) => void\n) {\n  const { htmlRequestId, renderOpts } = ctx\n\n  const { ComponentMod, setCacheStatus, setReactDebugChannel } = renderOpts\n\n  let startTime = -Infinity\n\n  // If the render is restarted, we'll recreate a fresh request store\n  let requestStore: RequestStore = initialRequestStore\n\n  const environmentName = () => {\n    const currentStage = requestStore.stagedRendering!.currentStage\n    switch (currentStage) {\n      case RenderStage.Before:\n      case RenderStage.EarlyStatic:\n      case RenderStage.Static:\n        return 'Prerender'\n      case RenderStage.EarlyRuntime:\n        return 'Prefetch'\n      case RenderStage.Runtime:\n        return 'Prefetchable'\n      case RenderStage.Dynamic:\n      case RenderStage.Abandoned:\n        return 'Server'\n      default:\n        currentStage satisfies never\n        throw new InvariantError(`Invalid render stage: ${currentStage}`)\n    }\n  }\n\n  //===============================================\n  // Initial render\n  //===============================================\n\n  // Try to render the page and see if there's any cache misses.\n  // If there are, wait for caches to finish and restart the render.\n\n  // This render might end up being used as a prospective render (if there's cache misses),\n  // so we need to set it up for filling caches.\n  const cacheSignal = new CacheSignal()\n\n  // If we encounter async modules that delay rendering, we'll also need to restart.\n  // TODO(restart-on-cache-miss): technically, we only need to wait for pending *server* modules here,\n  // but `trackPendingModules` doesn't distinguish between client and server.\n  trackPendingModules(cacheSignal)\n\n  const prerenderResumeDataCache = createPrerenderResumeDataCache()\n\n  const initialReactController = new AbortController()\n  const initialDataController = new AbortController() // Controls hanging promises we create\n  const initialAbandonController = new AbortController() // Controls whether this render is abandoned\n  const initialStageController = new StagedRenderingController(\n    initialDataController.signal,\n    initialAbandonController,\n    true // track sync IO\n  )\n\n  requestStore.prerenderResumeDataCache = prerenderResumeDataCache\n  // `getRenderResumeDataCache` will fall back to using `prerenderResumeDataCache` as `renderResumeDataCache`,\n  // so not having a resume data cache won't break any expectations in case we don't need to restart.\n  requestStore.renderResumeDataCache = null\n  requestStore.stagedRendering = initialStageController\n  requestStore.asyncApiPromises = createAsyncApiPromises(\n    initialStageController,\n    requestStore.cookies,\n    requestStore.mutableCookies,\n    requestStore.headers\n  )\n  requestStore.cacheSignal = cacheSignal\n\n  let debugChannel = setReactDebugChannel && createDebugChannel()\n  const { clientModules } = getClientReferenceManifest()\n\n  // Note: The stage controller starts out in the `Before` stage,\n  // where sync IO does not cause aborts, so it's okay if it happens before render.\n  const initialRscPayload = await getPayload(requestStore)\n\n  const initialStreamResult = await runInSequentialTasks(\n    () => {\n      initialStageController.advanceStage(RenderStage.EarlyStatic)\n      startTime = performance.now() + performance.timeOrigin\n\n      const streamPair = workUnitAsyncStorage\n        .run(\n          requestStore,\n          renderToFlightStream,\n          ComponentMod,\n          initialRscPayload,\n          clientModules,\n          {\n            onError,\n            environmentName,\n            startTime,\n            filterStackFrame,\n            debugChannel: debugChannel?.serverSide,\n            signal: initialReactController.signal,\n          }\n        )\n        .tee()\n\n      // If we abort the render, we want to reject the stage-dependent promises as well.\n      // Note that we want to install this listener after the render is started\n      // so that it runs after react is finished running its abort code.\n      initialReactController.signal.addEventListener(\n        'abort',\n        () => {\n          const { reason } = initialReactController.signal\n          initialDataController.abort(reason)\n        },\n        { once: true }\n      )\n\n      const stream = streamPair[0]\n      const accumulatedChunksPromise = accumulateStreamChunks(\n        streamPair[1],\n        initialStageController,\n        initialDataController.signal\n      )\n\n      initialDataController.signal.addEventListener(\n        'abort',\n        () => {\n          accumulatedChunksPromise.catch(() => {})\n          stream.cancel()\n        },\n        { once: true }\n      )\n\n      return {\n        stream,\n        accumulatedChunksPromise,\n      }\n    },\n    () => {\n      if (initialAbandonController.signal.aborted === true) {\n        return\n      } else if (cacheSignal.hasPendingReads()) {\n        initialAbandonController.abort()\n      } else {\n        initialStageController.advanceStage(RenderStage.Static)\n      }\n    },\n    () => {\n      if (initialAbandonController.signal.aborted === true) {\n        return\n      } else if (cacheSignal.hasPendingReads()) {\n        initialAbandonController.abort()\n      } else {\n        initialStageController.advanceStage(RenderStage.EarlyRuntime)\n      }\n    },\n    () => {\n      if (initialAbandonController.signal.aborted === true) {\n        return\n      } else if (cacheSignal.hasPendingReads()) {\n        initialAbandonController.abort()\n      } else {\n        initialStageController.advanceStage(RenderStage.Runtime)\n      }\n    },\n    () => {\n      if (initialAbandonController.signal.aborted === true) {\n        return\n      } else if (cacheSignal.hasPendingReads()) {\n        initialAbandonController.abort()\n      } else {\n        initialStageController.advanceStage(RenderStage.Dynamic)\n      }\n    }\n  )\n\n  if (initialStageController.currentStage !== RenderStage.Abandoned) {\n    // No cache misses. We can use the result as-is.\n    return {\n      stream: initialStreamResult.stream,\n      accumulatedChunksPromise: initialStreamResult.accumulatedChunksPromise,\n      syncInterruptReason: initialStageController.getSyncInterruptReason(),\n      startTime,\n      staticStageEndTime: initialStageController.getStaticStageEndTime(),\n      runtimeStageEndTime: initialStageController.getRuntimeStageEndTime(),\n      debugChannel,\n      requestStore,\n    }\n  }\n\n  if (process.env.__NEXT_DEV_SERVER && setCacheStatus) {\n    setCacheStatus('filling', htmlRequestId)\n  }\n\n  // Cache miss. We will use the initial render to fill caches, and discard its result.\n  // Then, we can render again with warm caches.\n\n  // TODO(restart-on-cache-miss):\n  // This might end up waiting for more caches than strictly necessary,\n  // because we can't abort the render yet, and we'll let runtime/dynamic APIs resolve.\n  // Ideally we'd only wait for caches that are needed in the static stage.\n  // This will be optimized in the future by not allowing runtime/dynamic APIs to resolve.\n\n  await cacheSignal.cacheReady()\n  initialReactController.abort()\n\n  //===============================================\n  // Final render (restarted)\n  //===============================================\n\n  // The initial render acted as a prospective render to warm the caches.\n  requestStore = createRequestStore()\n\n  // We are going to render this pass all the way through because we've already\n  // filled any caches so we won't be aborting this time.\n  const abortSignal = null\n  const finalStageController = new StagedRenderingController(\n    abortSignal,\n    null, // no abandoning\n    true // track sync IO\n  )\n\n  // We've filled the caches, so now we can render as usual,\n  // without any cache-filling mechanics.\n  requestStore.prerenderResumeDataCache = null\n  requestStore.renderResumeDataCache = createRenderResumeDataCache(\n    prerenderResumeDataCache\n  )\n  requestStore.stagedRendering = finalStageController\n  requestStore.cacheSignal = null\n  requestStore.asyncApiPromises = createAsyncApiPromises(\n    finalStageController,\n    requestStore.cookies,\n    requestStore.mutableCookies,\n    requestStore.headers\n  )\n\n  // The initial render already wrote to its debug channel.\n  // We're not using it, so we need to create a new one.\n  debugChannel = setReactDebugChannel && createDebugChannel()\n\n  // Note: The stage controller starts out in the `Before` stage,\n  // where sync IO does not cause aborts, so it's okay if it happens before render.\n  const finalRscPayload = await getPayload(requestStore)\n\n  const finalStreamResult = await runInSequentialTasks(\n    () => {\n      finalStageController.advanceStage(RenderStage.EarlyStatic)\n      startTime = performance.now() + performance.timeOrigin\n\n      const streamPair = workUnitAsyncStorage\n        .run(\n          requestStore,\n          renderToFlightStream,\n          ComponentMod,\n          finalRscPayload,\n          clientModules,\n          {\n            onError,\n            environmentName,\n            startTime,\n            filterStackFrame,\n            debugChannel: debugChannel?.serverSide,\n          }\n        )\n        .tee()\n\n      return {\n        stream: streamPair[0],\n        accumulatedChunksPromise: accumulateStreamChunks(\n          streamPair[1],\n          finalStageController,\n          null\n        ),\n      }\n    },\n    () => {\n      // Static stage\n      finalStageController.advanceStage(RenderStage.Static)\n    },\n    () => {\n      // EarlyRuntime stage\n      finalStageController.advanceStage(RenderStage.EarlyRuntime)\n    },\n    () => {\n      // Runtime stage\n      finalStageController.advanceStage(RenderStage.Runtime)\n    },\n    () => {\n      // Dynamic stage\n      finalStageController.advanceStage(RenderStage.Dynamic)\n    }\n  )\n\n  if (process.env.__NEXT_DEV_SERVER && setCacheStatus) {\n    setCacheStatus('filled', htmlRequestId)\n  }\n\n  return {\n    stream: finalStreamResult.stream,\n    accumulatedChunksPromise: finalStreamResult.accumulatedChunksPromise,\n    syncInterruptReason: finalStageController.getSyncInterruptReason(),\n    startTime,\n    staticStageEndTime: finalStageController.getStaticStageEndTime(),\n    runtimeStageEndTime: finalStageController.getRuntimeStageEndTime(),\n    debugChannel,\n    requestStore,\n  }\n}\n\ninterface AccumulatedStreamChunks {\n  readonly staticChunks: Array<Uint8Array>\n  readonly runtimeChunks: Array<Uint8Array>\n  readonly dynamicChunks: Array<Uint8Array>\n}\n\nasync function accumulateStreamChunks(\n  stream: ReadableStream<Uint8Array>,\n  stageController: StagedRenderingController,\n  signal: AbortSignal | null\n): Promise<AccumulatedStreamChunks> {\n  const staticChunks: Array<Uint8Array> = []\n  const runtimeChunks: Array<Uint8Array> = []\n  const dynamicChunks: Array<Uint8Array> = []\n  const reader = stream.getReader()\n\n  let cancelled = false\n  function cancel() {\n    if (!cancelled) {\n      cancelled = true\n      reader.cancel()\n    }\n  }\n\n  if (signal) {\n    signal.addEventListener('abort', cancel, { once: true })\n  }\n\n  try {\n    while (!cancelled) {\n      const { done, value } = await reader.read()\n      if (done) {\n        cancel()\n        break\n      }\n      switch (stageController.currentStage) {\n        case RenderStage.Before:\n          throw new InvariantError(\n            'Unexpected stream chunk while in Before stage'\n          )\n        case RenderStage.EarlyStatic:\n        case RenderStage.Static:\n          staticChunks.push(value)\n        // fall through\n        case RenderStage.EarlyRuntime:\n        case RenderStage.Runtime:\n          runtimeChunks.push(value)\n        // fall through\n        case RenderStage.Dynamic:\n          dynamicChunks.push(value)\n          break\n        case RenderStage.Abandoned:\n          // If the render was abandoned, we won't use the chunks,\n          // so there's no need to accumulate them\n          break\n        default:\n          stageController.currentStage satisfies never\n          break\n      }\n    }\n  } catch (err) {\n    // When we cancel the reader we may reject the read.\n    // Only swallow errors caused by our intentional cancel();\n    // re-throw unexpected errors to avoid silently returning partial data.\n    if (!cancelled) {\n      throw err\n    }\n  }\n\n  return { staticChunks, runtimeChunks, dynamicChunks }\n}\n\nasync function countStaticStageBytes(\n  stream: ReadableStream<Uint8Array>,\n  stageController: StagedRenderingController\n): Promise<number> {\n  let byteLength = 0\n  const reader = stream.getReader()\n\n  stageController.onStage(RenderStage.EarlyRuntime, () => {\n    reader.cancel()\n  })\n\n  while (true) {\n    const { done, value } = await reader.read()\n    if (done) {\n      break\n    }\n    if (stageController.currentStage <= RenderStage.Static) {\n      byteLength += value.byteLength\n    } else {\n      reader.cancel()\n      break\n    }\n  }\n\n  return byteLength\n}\n\nfunction createAsyncApiPromises(\n  stagedRendering: StagedRenderingController,\n  cookies: RequestStore['cookies'],\n  mutableCookies: RequestStore['mutableCookies'],\n  headers: RequestStore['headers']\n): NonNullable<RequestStore['asyncApiPromises']> {\n  return {\n    // Runtime APIs (for prefetch segments)\n    cookies: stagedRendering.delayUntilStage(\n      RenderStage.Runtime,\n      'cookies',\n      cookies\n    ),\n    earlyCookies: stagedRendering.delayUntilStage(\n      RenderStage.EarlyRuntime,\n      'cookies',\n      cookies\n    ),\n    mutableCookies: stagedRendering.delayUntilStage(\n      RenderStage.Runtime,\n      'cookies',\n      mutableCookies as RequestStore['cookies']\n    ),\n    earlyMutableCookies: stagedRendering.delayUntilStage(\n      RenderStage.EarlyRuntime,\n      'cookies',\n      mutableCookies as RequestStore['cookies']\n    ),\n    headers: stagedRendering.delayUntilStage(\n      RenderStage.Runtime,\n      'headers',\n      headers\n    ),\n    earlyHeaders: stagedRendering.delayUntilStage(\n      RenderStage.EarlyRuntime,\n      'headers',\n      headers\n    ),\n    // These are not used directly, but we chain other `params`/`searchParams` promises off of them.\n    sharedParamsParent: stagedRendering.delayUntilStage(\n      RenderStage.Runtime,\n      undefined,\n      '<internal params>'\n    ),\n    earlySharedParamsParent: stagedRendering.delayUntilStage(\n      RenderStage.EarlyRuntime,\n      undefined,\n      '<internal params>'\n    ),\n    sharedSearchParamsParent: stagedRendering.delayUntilStage(\n      RenderStage.Runtime,\n      undefined,\n      '<internal searchParams>'\n    ),\n    earlySharedSearchParamsParent: stagedRendering.delayUntilStage(\n      RenderStage.EarlyRuntime,\n      undefined,\n      '<internal searchParams>'\n    ),\n    connection: stagedRendering.delayUntilStage(\n      RenderStage.Dynamic,\n      'connection',\n      undefined\n    ),\n  }\n}\n\n/**\n * Logs the given messages, and sends the error instances to the browser as an\n * RSC stream, where they can be deserialized and logged (or otherwise presented\n * in the devtools), while leveraging React's capabilities to not only\n * source-map the stack frames (via findSourceMapURL), but also create virtual\n * server modules that allow users to inspect the server source code in the\n * browser.\n */\nasync function logMessagesAndSendErrorsToBrowser(\n  messages: unknown[],\n  ctx: AppRenderContext\n): Promise<void> {\n  const { htmlRequestId, renderOpts } = ctx\n  const { sendErrorsToBrowser } = renderOpts\n\n  const errors: Error[] = []\n  for (const message of messages) {\n    // Log the error to the CLI. Prevent the logs from being dimmed, which we\n    // apply for other logs during the spawned validation.\n    consoleAsyncStorage.exit(() => {\n      console.error(message)\n    })\n\n    // Error instances are also sent to the browser. We're currently using a\n    // non-Error message only in debug build mode as a message that is only\n    // meant for the CLI. FIXME: This is a bit spooky action at a distance. We\n    // should maybe have a more explicit way of determining which messages\n    // should be sent to the browser. Regardless, only real errors with a proper\n    // stack make sense to be \"replayed\" in the browser.\n    if (message instanceof Error) {\n      errors.push(message)\n    }\n  }\n\n  if (errors.length > 0) {\n    if (!sendErrorsToBrowser) {\n      throw new InvariantError(\n        'Expected `sendErrorsToBrowser` to be defined in renderOpts.'\n      )\n    }\n\n    // Build a Map of error → error code for errors that have one.\n    // React doesn't revive __NEXT_ERROR_CODE during RSC deserialization, so we\n    // send it as a side-channel Map. RSC preserves object identity, so the\n    // deserialized Map keys will reference the same Error objects.\n    const errorCodes = new Map<Error, string>()\n    for (const err of errors) {\n      const code = extractNextErrorCode(err)\n      if (code !== undefined) {\n        errorCodes.set(err, code)\n      }\n    }\n\n    const { clientModules } = getClientReferenceManifest()\n\n    const errorsFlightStream = renderToFlightStream(\n      ctx.componentMod,\n      { errors, errorCodes },\n      clientModules,\n      { filterStackFrame }\n    )\n\n    sendErrorsToBrowser(errorsFlightStream, htmlRequestId)\n  }\n}\n\nfunction logValidationSkipped(ctx: AppRenderContext) {\n  if (process.env.__NEXT_TEST_MODE && process.env.NEXT_TEST_LOG_VALIDATION) {\n    const requestId = ctx.requestId\n    const url = ctx.url.href\n    console.log(\n      '<VALIDATION_MESSAGE>' +\n        JSON.stringify({ type: 'validation_start', requestId, url }) +\n        '</VALIDATION_MESSAGE>'\n    )\n    console.log(\n      '<VALIDATION_MESSAGE>' +\n        JSON.stringify({ type: 'validation_end', requestId, url }) +\n        '</VALIDATION_MESSAGE>'\n    )\n  }\n}\n\nasync function spawnStaticShellValidationInDev(\n  ...args: Parameters<typeof spawnStaticShellValidationInDevImpl>\n) {\n  if (process.env.__NEXT_TEST_MODE && process.env.NEXT_TEST_LOG_VALIDATION) {\n    const ctx: AppRenderContext = args[5]\n    const requestId = ctx.requestId\n    const url = ctx.url.href\n    console.log(\n      '<VALIDATION_MESSAGE>' +\n        JSON.stringify({ type: 'validation_start', requestId, url }) +\n        '</VALIDATION_MESSAGE>'\n    )\n    try {\n      return await spawnStaticShellValidationInDevImpl(...args)\n    } finally {\n      console.log(\n        '<VALIDATION_MESSAGE>' +\n          JSON.stringify({ type: 'validation_end', requestId, url }) +\n          '</VALIDATION_MESSAGE>'\n      )\n    }\n  } else {\n    return await spawnStaticShellValidationInDevImpl(...args)\n  }\n}\n\n/**\n * This function is a fork of prerenderToStream cacheComponents branch.\n * While it doesn't return a stream we want it to have identical\n * prerender semantics to prerenderToStream and should update it\n * in conjunction with any changes to that function.\n */\nasync function spawnStaticShellValidationInDevImpl(\n  accumulatedChunksPromise: Promise<AccumulatedStreamChunks>,\n  syncInterruptReason: Error | null,\n  startTime: number,\n  staticStageEndTime: number,\n  runtimeStageEndTime: number,\n  ctx: AppRenderContext,\n  requestStore: RequestStore,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  debugChannelClient: Readable | undefined\n): Promise<void> {\n  const debug =\n    process.env.NEXT_PRIVATE_DEBUG_VALIDATION === '1' ? console.log : undefined\n\n  const {\n    componentMod: ComponentMod,\n    getDynamicParamFromSegment,\n    renderOpts,\n    workStore,\n  } = ctx\n\n  const loaderTree = ComponentMod.routeModule.userland.loaderTree\n\n  const allowEmptyStaticShell =\n    (renderOpts.allowEmptyStaticShell ?? false) ||\n    (await isPageAllowedToBlock(loaderTree))\n\n  const rootParams = getRootParams(loaderTree, getDynamicParamFromSegment)\n\n  const hmrRefreshHash = getHmrRefreshHash(requestStore)\n\n  // We don't need to continue the prerender process if we already\n  // detected invalid dynamic usage in the initial prerender phase.\n  const { invalidDynamicUsageError } = workStore\n  if (invalidDynamicUsageError) {\n    return logMessagesAndSendErrorsToBrowser([invalidDynamicUsageError], ctx)\n  }\n\n  if (syncInterruptReason) {\n    return logMessagesAndSendErrorsToBrowser([syncInterruptReason], ctx)\n  }\n\n  let debugChunks: Uint8Array[] | null = null\n  if (debugChannelClient) {\n    debugChunks = []\n    debugChannelClient.on('data', (c) => {\n      debugChunks!.push(c)\n    })\n  }\n\n  const accumulatedChunks = await accumulatedChunksPromise\n  const { staticChunks, runtimeChunks, dynamicChunks } = accumulatedChunks\n\n  const needsInstantValidation =\n    await anySegmentNeedsInstantValidationInDev(loaderTree)\n\n  // `samples` from instant config are only used during build\n  const validationSamples = null\n  const validationSampleTracking = null\n\n  // First we warmup SSR with the runtime chunks. This ensures that when we do\n  // the full prerender pass with dynamic tracking module loading won't\n  // interrupt the prerender and can properly observe the entire content\n  await warmupClientModulesForStagedValidation(\n    // if we're going to be validating prefetches, we'll be rendering some segments in the dynamic stage.\n    // otherwise, for static shell validation, we only need to warm up to the runtime stage.\n    // we also need to use a different store type, because instant validation allows more APIs to resolve.\n    needsInstantValidation ? 'validation-client' : 'prerender-client',\n    needsInstantValidation ? dynamicChunks : runtimeChunks,\n    dynamicChunks,\n    rootParams,\n    fallbackRouteParams,\n    allowEmptyStaticShell,\n    ctx,\n    validationSamples,\n    validationSampleTracking\n  )\n\n  debug?.(`Starting static shell validation...`)\n\n  const runtimeResult = await validateStagedShell(\n    runtimeChunks,\n    dynamicChunks,\n    debugChunks,\n    runtimeStageEndTime,\n    rootParams,\n    fallbackRouteParams,\n    allowEmptyStaticShell,\n    ctx,\n    hmrRefreshHash,\n    trackDynamicHoleInRuntimeShell\n  )\n\n  if (runtimeResult.length > 0) {\n    debug?.(`❌ Failed - ${runtimeResult.length} errors from runtime stage`)\n    // We have something to report from the runtime validation\n    // We can skip the rest\n    return logMessagesAndSendErrorsToBrowser(runtimeResult, ctx)\n  }\n\n  const staticResult = await validateStagedShell(\n    staticChunks,\n    dynamicChunks,\n    debugChunks,\n    staticStageEndTime,\n    rootParams,\n    fallbackRouteParams,\n    allowEmptyStaticShell,\n    ctx,\n    hmrRefreshHash,\n    trackDynamicHoleInStaticShell\n  )\n\n  if (staticResult.length > 0) {\n    debug?.(`❌ Failed - ${staticResult.length} errors from static stage`)\n    // We have something to report from the static validation\n    // We can skip the rest\n    return logMessagesAndSendErrorsToBrowser(staticResult, ctx)\n  }\n  debug?.(`✅ Passed`)\n\n  if (needsInstantValidation) {\n    const instantConfigsResult = await validateInstantConfigs(\n      accumulatedChunks,\n      debugChunks,\n      startTime,\n      rootParams,\n      fallbackRouteParams,\n      ctx,\n      hmrRefreshHash,\n      validationSamples\n    )\n\n    if (instantConfigsResult.length > 0) {\n      return logMessagesAndSendErrorsToBrowser(instantConfigsResult, ctx)\n    }\n  }\n}\n\nasync function warmupClientModulesForStagedValidation(\n  storeType: PrerenderStoreModernClient['type'] | ValidationStoreClient['type'],\n  partialServerChunks: Array<Uint8Array>,\n  allServerChunks: Array<Uint8Array>,\n  rootParams: Params,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  allowEmptyStaticShell: boolean,\n  ctx: AppRenderContext,\n  validationSamples: ValidationStoreClient['validationSamples'],\n  validationSampleTracking: ValidationStoreClient['validationSampleTracking']\n) {\n  const { implicitTags, nonce, workStore } = ctx\n\n  // Warmup SSR\n  const initialClientPrerenderController = new AbortController()\n  const initialClientReactController = new AbortController()\n  const initialClientRenderController = new AbortController()\n\n  const preinitScripts = () => {}\n  const { ServerInsertedHTMLProvider } = createServerInsertedHTML()\n\n  let initialClientPrerenderStore: PrerenderStore\n  if (storeType === 'prerender-client') {\n    const store: PrerenderStoreModernClient = {\n      type: 'prerender-client',\n      phase: 'render',\n      rootParams,\n      fallbackRouteParams,\n      implicitTags,\n      renderSignal: initialClientRenderController.signal,\n      controller: initialClientPrerenderController,\n      // For HTML Generation the only cache tracked activity\n      // is module loading, which has it's own cache signal\n      cacheSignal: null,\n      dynamicTracking: null,\n      allowEmptyStaticShell,\n      revalidate: INFINITE_CACHE,\n      expire: INFINITE_CACHE,\n      stale: INFINITE_CACHE,\n      tags: [...implicitTags.tags],\n      // TODO should this be removed from client stores?\n      prerenderResumeDataCache: null,\n      renderResumeDataCache: null,\n      hmrRefreshHash: undefined,\n      // Client prerenders don't track server param access\n      varyParamsAccumulator: null,\n    }\n    initialClientPrerenderStore = store\n  } else {\n    const store: ValidationStoreClient = {\n      type: 'validation-client',\n      phase: 'render',\n      rootParams,\n      implicitTags,\n      renderSignal: initialClientRenderController.signal,\n      controller: initialClientPrerenderController,\n      // For HTML Generation the only cache tracked activity\n      // is module loading, which has it's own cache signal\n      cacheSignal: null,\n      dynamicTracking: null,\n      revalidate: INFINITE_CACHE,\n      expire: INFINITE_CACHE,\n      stale: INFINITE_CACHE,\n      tags: [...implicitTags.tags],\n      // TODO should this be removed from client stores?\n      prerenderResumeDataCache: null,\n      renderResumeDataCache: null,\n      hmrRefreshHash: undefined,\n      // Client prerenders don't track server param access\n      varyParamsAccumulator: null,\n      // We're not rendering any validation boundaries yet.\n      boundaryState: null,\n      validationSamples,\n      validationSampleTracking,\n      fallbackRouteParams,\n    }\n    initialClientPrerenderStore = store\n  }\n\n  // TODO: maybe conditionally switch between runtime chunks and all chunks?\n  // but warming too much should always be fine, just not always necessary\n  const serverStream = createNodeStreamWithLateRelease(\n    partialServerChunks,\n    allServerChunks,\n    initialClientReactController.signal\n  )\n\n  const pendingInitialClientResult = workUnitAsyncStorage.run(\n    initialClientPrerenderStore,\n    getClientPrerender,\n    // eslint-disable-next-line @next/internal/no-ambiguous-jsx -- React Client\n    <App\n      reactServerStream={serverStream}\n      reactDebugStream={undefined}\n      debugEndTime={undefined}\n      preinitScripts={preinitScripts}\n      ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n      nonce={nonce}\n      images={ctx.renderOpts.images}\n    />,\n    {\n      signal: initialClientReactController.signal,\n      onError: (err: unknown) => {\n        const digest = getDigestForWellKnownError(err)\n\n        if (digest) {\n          return digest\n        }\n\n        if (isReactLargeShellError(err)) {\n          // TODO: Aggregate\n          console.error(err)\n          return undefined\n        }\n\n        if (initialClientReactController.signal.aborted) {\n          // These are expected errors that might error the prerender. we ignore them.\n        } else if (\n          process.env.NEXT_DEBUG_BUILD ||\n          process.env.__NEXT_VERBOSE_LOGGING\n        ) {\n          // We don't normally log these errors because we are going to retry anyway but\n          // it can be useful for debugging Next.js itself to get visibility here when needed\n          printDebugThrownValueForProspectiveRender(\n            err,\n            workStore.route,\n            Phase.ProspectiveRender\n          )\n        }\n      },\n      // We don't need bootstrap scripts in this prerender\n      // bootstrapScripts: [bootstrapScript],\n    }\n  )\n\n  // The listener to abort our own render controller must be added after React\n  // has added its listener, to ensure that pending I/O is not\n  // aborted/rejected too early.\n  initialClientReactController.signal.addEventListener(\n    'abort',\n    () => {\n      initialClientRenderController.abort()\n    },\n    { once: true }\n  )\n\n  pendingInitialClientResult.catch((err: unknown) => {\n    if (\n      initialClientReactController.signal.aborted ||\n      isPrerenderInterruptedError(err)\n    ) {\n      // These are expected errors that might error the prerender. we ignore them.\n    } else if (\n      process.env.NEXT_DEBUG_BUILD ||\n      process.env.__NEXT_VERBOSE_LOGGING\n    ) {\n      // We don't normally log these errors because we are going to retry anyway but\n      // it can be useful for debugging Next.js itself to get visibility here when needed\n      printDebugThrownValueForProspectiveRender(\n        err,\n        workStore.route,\n        Phase.ProspectiveRender\n      )\n    }\n  })\n\n  // This is mostly needed for dynamic `import()`s in client components.\n  // Promises passed to client were already awaited above (assuming that they came from cached functions)\n  const cacheSignal = new CacheSignal()\n  trackPendingModules(cacheSignal)\n  await cacheSignal.cacheReady()\n  initialClientReactController.abort()\n}\n\nasync function validateStagedShell(\n  stageChunks: Array<Uint8Array>,\n  allServerChunks: Array<Uint8Array>,\n  debugChunks: null | Array<Uint8Array>,\n  debugEndTime: number | undefined,\n  rootParams: Params,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  allowEmptyStaticShell: boolean,\n  ctx: AppRenderContext,\n  hmrRefreshHash: string | undefined,\n  trackDynamicHole:\n    | typeof trackDynamicHoleInStaticShell\n    | typeof trackDynamicHoleInRuntimeShell\n): Promise<Array<unknown>> {\n  const { implicitTags, nonce, workStore } = ctx\n\n  const clientDynamicTracking = createDynamicTrackingState(\n    false //isDebugDynamicAccesses\n  )\n  const clientReactController = new AbortController()\n  const clientRenderController = new AbortController()\n\n  const preinitScripts = () => {}\n  const { ServerInsertedHTMLProvider } = createServerInsertedHTML()\n\n  const finalClientPrerenderStore: PrerenderStore = {\n    type: 'prerender-client',\n    phase: 'render',\n    rootParams,\n    fallbackRouteParams,\n    implicitTags,\n    renderSignal: clientRenderController.signal,\n    controller: clientReactController,\n    // No APIs require a cacheSignal through the workUnitStore during the HTML prerender\n    cacheSignal: null,\n    dynamicTracking: clientDynamicTracking,\n    allowEmptyStaticShell,\n    revalidate: INFINITE_CACHE,\n    expire: INFINITE_CACHE,\n    stale: INFINITE_CACHE,\n    tags: [...implicitTags.tags],\n    // TODO should this be removed from client stores?\n    prerenderResumeDataCache: null,\n    renderResumeDataCache: null,\n    hmrRefreshHash,\n    // Client prerenders don't track server param access\n    varyParamsAccumulator: null,\n  }\n\n  const dynamicValidation = createDynamicValidationState()\n\n  const serverStream = createNodeStreamWithLateRelease(\n    stageChunks,\n    allServerChunks,\n    clientReactController.signal\n  )\n\n  const debugChannelClient = debugChunks\n    ? createNodeStreamWithLateRelease(\n        debugChunks,\n        debugChunks,\n        clientReactController.signal\n      )\n    : undefined\n\n  try {\n    let { prelude: unprocessedPrelude } = await runInSequentialTasks(\n      () => {\n        const pendingFinalClientResult = workUnitAsyncStorage.run(\n          finalClientPrerenderStore,\n          getClientPrerender,\n          // eslint-disable-next-line @next/internal/no-ambiguous-jsx -- React Client\n          <App\n            reactServerStream={serverStream}\n            reactDebugStream={debugChannelClient}\n            debugEndTime={debugEndTime}\n            preinitScripts={preinitScripts}\n            ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n            nonce={nonce}\n            images={ctx.renderOpts.images}\n          />,\n          {\n            signal: clientReactController.signal,\n            onError: (err: unknown, errorInfo: ErrorInfo) => {\n              if (\n                isPrerenderInterruptedError(err) ||\n                clientReactController.signal.aborted\n              ) {\n                const componentStack = errorInfo.componentStack\n                if (typeof componentStack === 'string') {\n                  trackDynamicHole(\n                    workStore,\n                    componentStack,\n                    dynamicValidation,\n                    clientDynamicTracking\n                  )\n                }\n                return\n              }\n\n              if (isReactLargeShellError(err)) {\n                // TODO: Aggregate\n                console.error(err)\n                return undefined\n              }\n\n              return getDigestForWellKnownError(err)\n            },\n            // We don't need bootstrap scripts in this prerender\n            // bootstrapScripts: [bootstrapScript],\n          }\n        )\n\n        // The listener to abort our own render controller must be added after\n        // React has added its listener, to ensure that pending I/O is not\n        // aborted/rejected too early.\n        clientReactController.signal.addEventListener(\n          'abort',\n          () => {\n            clientRenderController.abort()\n          },\n          { once: true }\n        )\n\n        return pendingFinalClientResult\n      },\n      () => {\n        clientReactController.abort()\n      }\n    )\n\n    const { preludeIsEmpty } = await processPreludeOp(unprocessedPrelude)\n    return getStaticShellDisallowedDynamicReasons(\n      workStore,\n      preludeIsEmpty ? PreludeState.Empty : PreludeState.Full,\n      dynamicValidation,\n      // TODO(instant-validation): if allowEmptyStaticShell is true (likely due to blocking configs),\n      // we should probably just skip this altogether\n      allowEmptyStaticShell\n    )\n  } catch (thrownValue) {\n    // Even if the root errors we still want to report any cache components errors\n    // that were discovered before the root errored.\n    let errors: Array<unknown> = getStaticShellDisallowedDynamicReasons(\n      workStore,\n      PreludeState.Errored,\n      dynamicValidation,\n      // TODO(instant-validation): if allowEmptyStaticShell is true (likely due to blocking configs),\n      // we should probably just skip this altogether\n      allowEmptyStaticShell\n    )\n\n    if (process.env.NEXT_DEBUG_BUILD || process.env.__NEXT_VERBOSE_LOGGING) {\n      errors.unshift(\n        'During dynamic validation the root of the page errored. The next logged error is the thrown value. It may be a duplicate of errors reported during the normal development mode render.',\n        thrownValue\n      )\n    }\n\n    return errors\n  }\n}\n\n/**\n * Validates instant configs by iterating URL depths from deepest to\n * shallowest. At each depth, builds a combined payload where segments\n * above the boundary use Dynamic stage (already mounted) and segments\n * below use Static/Runtime stage (being prefetched). If the new subtree\n * contains any `unstable_instant` configs, the payload is rendered to\n * detect dynamic holes without Suspense.\n */\nasync function validateInstantConfigs(\n  accumulatedChunks: AccumulatedStreamChunks,\n  debugChunks: null | Array<Uint8Array>,\n  startTime: number,\n  rootParams: Params,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null,\n  ctx: AppRenderContext,\n  hmrRefreshHash: string | undefined,\n  validationSamples: ValidationStoreClient['validationSamples'] | null\n): Promise<Array<unknown>> {\n  const debug =\n    process.env.NEXT_PRIVATE_DEBUG_VALIDATION === '1' ? console.log : undefined\n\n  const {\n    createCombinedPayloadAtDepth,\n    createCombinedPayloadStream,\n    collectStagedSegmentData,\n    discoverValidationDepths,\n  } = ctx.componentMod.InstantValidation()!\n\n  const { createValidationSampleTracking } =\n    require('./instant-validation/instant-samples') as typeof import('./instant-validation/instant-samples')\n\n  debug?.('\\nStarting depth-based instant validation...')\n\n  const loaderTree = ctx.componentMod.routeModule.userland.loaderTree\n\n  // Only affects a debug environment name label, not functional behavior.\n  const hasRuntimePrefetch = true\n\n  const clientReferenceManifest = getClientReferenceManifest()\n\n  const {\n    cache,\n    payload: initialRscPayload,\n    stageEndTimes,\n  } = await collectStagedSegmentData(\n    {\n      [RenderStage.Static]: accumulatedChunks.staticChunks,\n      [RenderStage.Runtime]: accumulatedChunks.runtimeChunks,\n      [RenderStage.Dynamic]: accumulatedChunks.dynamicChunks,\n    },\n    debugChunks,\n    startTime,\n    hasRuntimePrefetch,\n    clientReferenceManifest\n  )\n\n  const { implicitTags, nonce, workStore } = ctx\n  const isDebugChannelEnabled = !!ctx.renderOpts.setReactDebugChannel\n\n  /**\n   * Build and validate a combined payload at the given URL depth.\n   *\n   * Returns null if no instant config exists at this depth.\n   * Returns an empty array if validation passed.\n   * Returns a non-empty array of errors if validation failed.\n   *\n   * When the initial validation uses static segments and finds errors,\n   * automatically retries with runtime stages to discriminate between\n   * runtime and dynamic errors, returning the more specific result.\n   */\n  async function validateAtDepth(\n    depth: number,\n    groupDepthForValidation: number\n  ): Promise<Array<unknown> | null> {\n    return validateAtDepthImpl(depth, groupDepthForValidation, null)\n  }\n\n  async function validateAtDepthImpl(\n    depth: number,\n    groupDepthForValidation: number,\n    previousBoundaryState: null | ValidationBoundaryTracking\n  ): Promise<null | Array<unknown>> {\n    const extraChunksController = new AbortController()\n\n    const boundaryState = createValidationBoundaryTracking()\n    let useRuntimeStageForPartialSegments = false\n    if (previousBoundaryState) {\n      // We're doing a followup render to better discriminate error types\n      useRuntimeStageForPartialSegments = true\n      for (const id of previousBoundaryState.expectedIds) {\n        boundaryState.expectedIds.add(id)\n      }\n    }\n\n    const payloadResult = await createCombinedPayloadAtDepth(\n      initialRscPayload,\n      cache,\n      loaderTree,\n      ctx.getDynamicParamFromSegment,\n      ctx.query,\n      depth,\n      groupDepthForValidation,\n      extraChunksController.signal,\n      boundaryState,\n      clientReferenceManifest,\n      stageEndTimes,\n      useRuntimeStageForPartialSegments\n    )\n\n    if (payloadResult === null) {\n      return null\n    }\n\n    const reactController = new AbortController()\n    const renderController = new AbortController()\n    const preinitScripts = () => {}\n    const { ServerInsertedHTMLProvider } = createServerInsertedHTML()\n\n    const { stream: serverStream, debugStream } =\n      await createCombinedPayloadStream(\n        payloadResult.payload,\n        extraChunksController,\n        reactController.signal,\n        clientReferenceManifest,\n        startTime,\n        isDebugChannelEnabled\n      )\n\n    const instantValidationState = createInstantValidationState(\n      payloadResult.createInstantStack\n    )\n\n    const validationSampleTracking =\n      validationSamples !== null ? createValidationSampleTracking() : null\n\n    const clientDynamicTracking = createDynamicTrackingState(false)\n\n    const prerenderStore: PrerenderStore = {\n      type: 'validation-client',\n      phase: 'render',\n      rootParams,\n      implicitTags,\n      renderSignal: renderController.signal,\n      controller: reactController,\n      cacheSignal: null,\n      dynamicTracking: clientDynamicTracking,\n      revalidate: INFINITE_CACHE,\n      expire: INFINITE_CACHE,\n      stale: INFINITE_CACHE,\n      tags: [...implicitTags.tags],\n      prerenderResumeDataCache: null,\n      renderResumeDataCache: null,\n      hmrRefreshHash,\n      varyParamsAccumulator: null,\n      boundaryState,\n      fallbackRouteParams,\n      validationSamples,\n      validationSampleTracking,\n    }\n\n    let errors: Array<unknown>\n    try {\n      const { prelude: unprocessedPrelude } = await runInSequentialTasks(\n        () => {\n          const pendingResult = workUnitAsyncStorage.run(\n            prerenderStore,\n            getClientPrerender,\n            // eslint-disable-next-line @next/internal/no-ambiguous-jsx -- React Client\n            <App\n              reactServerStream={serverStream}\n              reactDebugStream={debugStream ?? undefined}\n              debugEndTime={undefined}\n              preinitScripts={preinitScripts}\n              ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n              nonce={nonce}\n              images={ctx.renderOpts.images}\n            />,\n            {\n              signal: reactController.signal,\n              onError: (err: unknown, errorInfo: ErrorInfo) => {\n                if (\n                  isPrerenderInterruptedError(err) ||\n                  reactController.signal.aborted\n                ) {\n                  const componentStack = errorInfo.componentStack\n                  if (typeof componentStack === 'string') {\n                    trackDynamicHoleInNavigation(\n                      workStore,\n                      componentStack,\n                      instantValidationState,\n                      clientDynamicTracking,\n                      payloadResult.hasAmbiguousErrors\n                        ? DynamicHoleKind.Runtime\n                        : DynamicHoleKind.Dynamic,\n                      boundaryState\n                    )\n                  }\n                  return\n                } else if (!reactController.signal.aborted) {\n                  const componentStack = errorInfo.componentStack\n                  if (typeof componentStack === 'string') {\n                    let errorForDisplay = err\n                    if (process.env.NODE_ENV === 'production') {\n                      // In production (i.e. build validation), Flight omits everything except the digest\n                      // when serializing errors, which makes them very unfriendly for debugging.\n                      // Map the deserialized errors back to their original error object to make it more useful.\n                      if (\n                        err &&\n                        typeof err === 'object' &&\n                        'digest' in err &&\n                        typeof err.digest === 'string'\n                      ) {\n                        const serverError =\n                          workStore.reactServerErrorsByDigest.get(err.digest)\n                        if (serverError !== undefined) {\n                          errorForDisplay = serverError\n                        }\n                      }\n                    }\n\n                    trackThrownErrorInNavigation(\n                      workStore,\n                      instantValidationState,\n                      errorForDisplay,\n                      componentStack\n                    )\n                  }\n                }\n\n                if (isReactLargeShellError(err)) {\n                  console.error(err)\n                  return undefined\n                }\n\n                return getDigestForWellKnownError(err)\n              },\n            }\n          )\n\n          reactController.signal.addEventListener(\n            'abort',\n            () => {\n              renderController.abort()\n            },\n            { once: true }\n          )\n\n          return pendingResult\n        },\n        () => {\n          reactController.abort()\n        }\n      )\n\n      const { preludeIsEmpty } = await processPreludeOp(unprocessedPrelude)\n\n      errors = getNavigationDisallowedDynamicReasons(\n        workStore,\n        preludeIsEmpty ? PreludeState.Empty : PreludeState.Full,\n        instantValidationState,\n        validationSampleTracking,\n        boundaryState\n      )\n    } catch (thrownValue) {\n      errors = getNavigationDisallowedDynamicReasons(\n        workStore,\n        PreludeState.Errored,\n        instantValidationState,\n        validationSampleTracking,\n        boundaryState\n      )\n    }\n\n    // This prerender did not produce any errors\n    if (errors.length === 0) {\n      return []\n    }\n\n    if (previousBoundaryState === null && payloadResult.hasAmbiguousErrors) {\n      // This is the first validation attempt. we prepared a payload where dynamic holes might be runtime data dependencies\n      // or dynamic data dependencies. We do a followup validation using a payload with only Runtime segments to discriminate\n      const dynamicOnlyErrors = await validateAtDepthImpl(\n        depth,\n        groupDepthForValidation,\n        boundaryState\n      )\n\n      if (dynamicOnlyErrors !== null && dynamicOnlyErrors.length > 0) {\n        // The dynamic errors only validation found errors to report so we favor those\n        return dynamicOnlyErrors\n      }\n    }\n\n    // If we didn't return some other errors at this point the only thing to return is this validation's errors\n    return errors\n  }\n\n  // Discover validation depth bounds from the LoaderTree. The array\n  // length is the max URL depth; each entry is the max group depth\n  // (route group segments) between that URL depth and the next.\n  const groupDepthsByUrlDepth = discoverValidationDepths(loaderTree)\n  const maxDepth = groupDepthsByUrlDepth.length\n\n  for (let depth = maxDepth - 1; depth >= 0; depth--) {\n    const maxGroupDepth = groupDepthsByUrlDepth[depth]\n\n    for (\n      let currentGroupDepth = maxGroupDepth;\n      currentGroupDepth >= 0;\n      currentGroupDepth--\n    ) {\n      debug?.(\n        `Trying depth ${depth}` +\n          (currentGroupDepth > 0\n            ? ` + groupDepth ${currentGroupDepth}...`\n            : '...')\n      )\n\n      const errors = await validateAtDepth(depth, currentGroupDepth)\n\n      if (errors === null) {\n        debug?.(`  No config at depth ${depth}+${currentGroupDepth}, skipping.`)\n        continue\n      }\n\n      if (errors.length > 0) {\n        debug?.(\n          `  Depth ${depth}+${currentGroupDepth}: ❌ Failed (${errors.length} errors)`\n        )\n        return errors\n      }\n\n      debug?.(`  Depth ${depth}+${currentGroupDepth}: ✅ Passed`)\n    }\n  }\n\n  debug?.(`✅ All depths passed`)\n  return []\n}\n\n/**\n * Two-pass render for build-time instant validation.\n * The flow is similar to `renderWithRestartOnCacheMissInDev`: pass 1 warms caches,\n * pass 2 renders with warm caches. If pass 1 has no cache misses,\n * its result is returned directly.\n *\n * Differences from `renderWithRestartOnCacheMissInDev`:\n * - both renders are abortable: if we know that we can't use a stream, we can just\n *   throw it away, we don't have to render a complete result.\n * - We don't need to tee the stream, we only care about accumulating chunks.\n */\nasync function renderWithRestartOnCacheMissInValidation(\n  ctx: AppRenderContext,\n  initialRequestStore: RequestStore,\n  createRequestStore: () => RequestStore,\n  getPayload: (requestStore: RequestStore) => Promise<RSCPayload>,\n  createOnError: (\n    signal: AbortSignal,\n    isRestart: boolean\n  ) => (error: unknown) => void,\n  prefilledDataCache: RenderResumeDataCache | null\n): Promise<{\n  accumulatedChunksPromise: Promise<AccumulatedStreamChunks>\n  startTime: number\n  stageController: StagedRenderingController\n  requestStore: RequestStore\n}> {\n  const { componentMod: ComponentMod } = ctx\n  const { clientModules } = getClientReferenceManifest()\n\n  let startTime = -Infinity\n  let requestStore: RequestStore = initialRequestStore\n\n  //===============================================\n  // Initial render (prospective — may warm caches)\n  //===============================================\n\n  const cacheSignal = new CacheSignal()\n  trackPendingModules(cacheSignal)\n\n  // The prerender we rean before the validation probably already filled some caches,\n  // so we want to save work and re-use them.\n  const prerenderResumeDataCache = prefilledDataCache\n    ? createPrerenderResumeDataCache(prefilledDataCache)\n    : createPrerenderResumeDataCache()\n\n  const initialReactController = new AbortController()\n  const initialDataController = new AbortController()\n\n  const initialAbandonController = new AbortController()\n  const initialStageController = new StagedRenderingController(\n    initialDataController.signal,\n    initialAbandonController,\n    true // track sync IO\n  )\n\n  requestStore.prerenderResumeDataCache = prerenderResumeDataCache\n  requestStore.renderResumeDataCache = null\n  requestStore.stagedRendering = initialStageController\n  requestStore.cacheSignal = cacheSignal\n  requestStore.asyncApiPromises = createAsyncApiPromises(\n    initialStageController,\n    requestStore.cookies,\n    requestStore.mutableCookies,\n    requestStore.headers\n  )\n  // We don't set `requestStore.controller and requestStore.renderSignal here.\n  // Right now, we only abort for sync IO, and in the first render, that's just a restart\n  // (after waiting for caches)\n  requestStore.controller = undefined\n  requestStore.renderSignal = undefined\n\n  const initialRscPayload = await getPayload(requestStore)\n\n  const advanceStageIfNoCacheMiss = (\n    stage: Parameters<StagedRenderingController['advanceStage']>[0]\n  ) => {\n    if (initialAbandonController.signal.aborted === true) {\n      return\n    } else if (cacheSignal.hasPendingReads()) {\n      initialAbandonController.abort()\n    } else {\n      initialStageController.advanceStage(stage)\n    }\n  }\n\n  const initialResult = await runInSequentialTasks(\n    () => {\n      initialStageController.advanceStage(RenderStage.EarlyStatic)\n      startTime = performance.now() + performance.timeOrigin\n\n      const stream = workUnitAsyncStorage.run(\n        requestStore,\n        renderToFlightStream,\n        ComponentMod,\n        initialRscPayload,\n        clientModules,\n        {\n          onError: createOnError(initialReactController.signal, false),\n          startTime,\n          filterStackFrame,\n          signal: initialReactController.signal,\n        }\n      )\n\n      initialReactController.signal.addEventListener(\n        'abort',\n        () => {\n          const { reason } = initialReactController.signal\n          initialDataController.abort(reason)\n        },\n        { once: true }\n      )\n\n      const accumulatedChunksPromise = accumulateStreamChunks(\n        stream,\n        initialStageController,\n        initialDataController.signal\n      )\n      accumulatedChunksPromise.catch(() => {})\n      return { accumulatedChunksPromise }\n    },\n    () => {\n      advanceStageIfNoCacheMiss(RenderStage.Static)\n    },\n    () => {\n      advanceStageIfNoCacheMiss(RenderStage.EarlyRuntime)\n    },\n    () => {\n      advanceStageIfNoCacheMiss(RenderStage.Runtime)\n    },\n    () => {\n      advanceStageIfNoCacheMiss(RenderStage.Dynamic)\n    }\n  )\n\n  if (initialStageController.currentStage !== RenderStage.Abandoned) {\n    // No cache misses. Use the result as-is.\n    return {\n      accumulatedChunksPromise: initialResult.accumulatedChunksPromise,\n      startTime,\n      stageController: initialStageController,\n      requestStore,\n    }\n  }\n\n  // Cache miss. Wait for caches to fill, then re-render with warm caches.\n  await cacheSignal.cacheReady()\n  initialReactController.abort()\n\n  //===============================================\n  // Final render (restarted, with warm caches)\n  //===============================================\n\n  requestStore = createRequestStore()\n\n  // Unlike dev, where we're re-using the render that'll be visible in the browser,\n  // we *can* abort the validation render.\n\n  const finalReactController = new AbortController()\n  const finalDataController = new AbortController()\n  const finalStageController = new StagedRenderingController(\n    finalDataController.signal, // abortable\n    null, // no abandoning\n    true // track sync IO\n  )\n\n  requestStore.prerenderResumeDataCache = null\n  requestStore.renderResumeDataCache = createRenderResumeDataCache(\n    prerenderResumeDataCache\n  )\n  requestStore.stagedRendering = finalStageController\n  requestStore.cacheSignal = null\n  requestStore.asyncApiPromises = createAsyncApiPromises(\n    finalStageController,\n    requestStore.cookies,\n    requestStore.mutableCookies,\n    requestStore.headers\n  )\n  // Right now, we only abort for sync IO.\n  // If sync IO occurs in a place where it's not allowed, then we have to fail validation,\n  // and we can abort the render immediately, without waiting for anything else..\n  requestStore.controller = finalReactController\n  requestStore.renderSignal = finalDataController.signal\n\n  const finalRscPayload = await getPayload(requestStore)\n\n  const finalResult = await runInSequentialTasks(\n    () => {\n      finalStageController.advanceStage(RenderStage.EarlyStatic)\n      startTime = performance.now() + performance.timeOrigin\n\n      const stream = workUnitAsyncStorage.run(\n        requestStore,\n        renderToFlightStream,\n        ComponentMod,\n        finalRscPayload,\n        clientModules,\n        {\n          onError: createOnError(finalReactController.signal, true),\n          startTime,\n          filterStackFrame,\n          signal: finalReactController.signal,\n        }\n      )\n\n      finalReactController.signal.addEventListener(\n        'abort',\n        () => {\n          finalDataController.abort(finalReactController.signal.reason)\n        },\n        { once: true }\n      )\n\n      const accumulatedChunksPromise = accumulateStreamChunks(\n        stream,\n        finalStageController,\n        null\n      )\n      accumulatedChunksPromise.catch(() => {})\n\n      return {\n        accumulatedChunksPromise,\n      }\n    },\n    () => {\n      finalStageController.advanceStage(RenderStage.Static)\n    },\n    () => {\n      finalStageController.advanceStage(RenderStage.EarlyRuntime)\n    },\n    () => {\n      finalStageController.advanceStage(RenderStage.Runtime)\n    },\n    () => {\n      finalStageController.advanceStage(RenderStage.Dynamic)\n    }\n  )\n\n  return {\n    accumulatedChunksPromise: finalResult.accumulatedChunksPromise,\n    startTime,\n    stageController: finalStageController,\n    requestStore,\n  }\n}\n\nasync function validateInstantConfigsInBuild(\n  ctx: AppRenderContext,\n  prefilledDataCache: RenderResumeDataCache | null\n): Promise<void> {\n  const run = async () => {\n    let success: boolean\n    try {\n      // The validation renders are separate renders, and use a separate WorkStore.\n      // However, we defensively exit the existing workStore to avoid relying on something from there\n      // before we shadow it.\n      success = await workAsyncStorage.exit(async () =>\n        validateInstantConfigsInBuildImpl(ctx, prefilledDataCache)\n      )\n    } catch (err) {\n      console.error(\n        new InvariantError(\n          'An unexpected error occcured during instant validation',\n          { cause: err }\n        )\n      )\n      success = false\n    }\n    if (!success) {\n      console.error('Stopping prerender due to instant validation errors.')\n      throw new StaticGenBailoutError()\n    }\n  }\n\n  if (process.env.__NEXT_TEST_MODE && process.env.NEXT_TEST_LOG_VALIDATION) {\n    // In tests, we use these markers to extract the relevant portion of the CLI logs.\n    // We want consistent ordering of these messages and other console.error calls,\n    // so we use console.error here as well. Using console.log leads to non-deterministic\n    // log order, likely stdout/stderr can interleave in non-deterministic ways.\n    const requestId = Date.now()\n    const route = ctx.workStore.route\n    console.error(\n      '<VALIDATION_MESSAGE>' +\n        JSON.stringify({\n          type: 'validation_start',\n          requestId,\n          url: route,\n        }) +\n        '</VALIDATION_MESSAGE>'\n    )\n    try {\n      return await run()\n    } finally {\n      console.error(\n        '<VALIDATION_MESSAGE>' +\n          JSON.stringify({\n            type: 'validation_end',\n            requestId,\n            url: route,\n          }) +\n          '</VALIDATION_MESSAGE>'\n      )\n    }\n  } else {\n    return await run()\n  }\n}\n\n/**\n * Runs instant validation at build time using the `samples` from `unstable_instant`.\n *\n * For each sample, this creates a staged RSC render with a synthetic `RequestStore`\n * populated from sample data, then feeds the accumulated chunks to\n * `validateInstantConfigs` which handles the actual validation.\n */\nasync function validateInstantConfigsInBuildImpl(\n  ctx: AppRenderContext,\n  prefilledDataCache: RenderResumeDataCache | null\n): Promise<boolean> {\n  const debug =\n    process.env.NEXT_PRIVATE_DEBUG_VALIDATION === '1' ? console.log : undefined\n\n  const { workStore: outerWorkStore } = ctx\n  const route = outerWorkStore.route\n\n  const loaderTree = ctx.componentMod.routeModule.userland.loaderTree\n  let samples = await resolveInstantConfigSamplesForPage(loaderTree)\n  if (!samples || samples.length === 0) {\n    // No samples defined; use a single empty sample to still run validation\n    samples = [{}]\n  }\n  debug?.('Resolved samples:', samples)\n\n  const allPossibleFallbackRouteParams = getFallbackRouteParams(\n    route,\n    ctx.componentMod.routeModule\n  )\n\n  for (let sampleIndex = 0; sampleIndex < samples.length; sampleIndex++) {\n    const sample = samples[sampleIndex]\n    debug?.(`Validating sample (${sampleIndex + 1}/${samples.length}):`, sample)\n\n    let errors: unknown[]\n    try {\n      errors = await consoleAsyncStorage.run({ dim: true }, () =>\n        validateInstantConfigInBuildWithSample(\n          ctx,\n          sample,\n          allPossibleFallbackRouteParams,\n          prefilledDataCache\n        )\n      )\n    } catch (err) {\n      if (isInstantValidationError(err)) {\n        errors = [err]\n      } else {\n        throw err\n      }\n    }\n\n    if (errors.length > 0) {\n      debug?.(`❌ Sample failed validation (${errors.length} errors)`)\n      const sampleDesc =\n        samples.length > 1\n          ? ` (sample ${sampleIndex + 1} of ${samples.length})`\n          : ''\n      for (const err of errors) {\n        console.error(err)\n      }\n      console.error(\n        `Build-time instant validation failed for route \"${route}\"${sampleDesc}.`\n      )\n      return false\n    } else {\n      debug?.('✅ Sample validated successfully')\n    }\n  }\n  return true\n}\n\nasync function validateInstantConfigInBuildWithSample(\n  outerCtx: AppRenderContext,\n  sample: InstantSample,\n  allPossibleFallbackRouteParams: OpaqueFallbackRouteParams | null,\n  prefilledDataCache: RenderResumeDataCache | null\n): Promise<unknown[]> {\n  // The flow for build mirrors what we do when validating in dev.\n  // We have to perform a full dynamic render to get the RSC chunks for each stage.\n  // In order to do that, we have to set up a mock AppRenderContext, workStore, and requestStore\n  // based on the `sample` we're using.\n\n  const { workStore: outerWorkStore } = outerCtx\n\n  const loaderTree = outerCtx.componentMod.routeModule.userland.loaderTree\n  const route = outerWorkStore.route\n\n  const {\n    createCookiesFromSample,\n    createHeadersFromSample,\n    createDraftModeForValidation,\n    createRelativeURLFromSamples,\n    createValidationSampleTracking,\n  } =\n    require('./instant-validation/instant-samples') as typeof import('./instant-validation/instant-samples')\n\n  // TODO(instant-validation-build): it feels like this should happen higher up\n  // and go through existing URL parsing/generation logic?\n  const sampleUrl = createRelativeURLFromSamples(\n    route,\n    sample.params,\n    sample.searchParams\n  )\n\n  const sampleParams = sample.params ?? {}\n  let fallbackRouteParams: OpaqueFallbackRouteParams | null = null\n  if (allPossibleFallbackRouteParams) {\n    const fallbackRouteParamsMut = new Map()\n    for (const [paramKey, value] of allPossibleFallbackRouteParams) {\n      if (!(paramKey in sampleParams)) {\n        fallbackRouteParamsMut.set(paramKey, value)\n      }\n    }\n    fallbackRouteParams = fallbackRouteParamsMut\n  }\n\n  const getDynamicParamFromSegment = makeGetDynamicParamFromSegment(\n    sampleParams,\n    fallbackRouteParams,\n    false\n  )\n\n  const sampleRootParams = getRootParams(loaderTree, getDynamicParamFromSegment)\n\n  let sampleUrlWithoutQuery: Omit<ParsedRelativeUrl, 'query'>\n  let sampleQuery: ParsedRelativeUrl['query']\n  ;({ query: sampleQuery, ...sampleUrlWithoutQuery } = sampleUrl)\n\n  const { AfterContext } =\n    require('../after/after-context') as typeof import('../after/after-context')\n\n  // NOTE: Matching the field order in `createWorkStore` to avoid deopting.\n  const workStore: WorkStore = {\n    isStaticGeneration: false,\n    page: outerWorkStore.page,\n    route: outerWorkStore.route,\n    incrementalCache: outerWorkStore.incrementalCache,\n    cacheLifeProfiles: outerWorkStore.cacheLifeProfiles,\n    isBuildTimePrerendering: false,\n    fetchCache: outerWorkStore.fetchCache,\n    isOnDemandRevalidate: false,\n\n    isDraftMode: false,\n\n    isPrefetchRequest: false,\n    buildId: outerWorkStore.buildId,\n    reactLoadableManifest: outerWorkStore.reactLoadableManifest,\n    assetPrefix: outerWorkStore.assetPrefix,\n    nonce: outerWorkStore.nonce,\n\n    // Never run `after()` for this validation render. by definition, `after` can't affect the rendered output.\n    afterContext: new AfterContext({\n      waitUntil(promise) {\n        promise.catch(() => {})\n      },\n      onClose() {},\n      onTaskError() {},\n    }),\n\n    cacheComponentsEnabled: outerWorkStore.cacheComponentsEnabled,\n    previouslyRevalidatedTags: [],\n    refreshTagsByCacheKind: new Map(),\n    runInCleanSnapshot: outerWorkStore.runInCleanSnapshot,\n    shouldTrackFetchMetrics: false,\n    reactServerErrorsByDigest: new Map(),\n  }\n\n  return workAsyncStorage.run(workStore, async () => {\n    // NOTE: match field order in renderToHTMLOrFlightImpl to avoid deopts\n    const validationCtx: AppRenderContext = {\n      componentMod: outerCtx.componentMod,\n      url: sampleUrlWithoutQuery,\n      renderOpts: outerCtx.renderOpts,\n      workStore,\n      parsedRequestHeaders: outerCtx.parsedRequestHeaders,\n      getDynamicParamFromSegment,\n      interpolatedParams: sampleParams,\n      query: sampleQuery,\n      isPrefetch: false,\n      isPossibleServerAction: false,\n      requestTimestamp: outerCtx.requestTimestamp,\n      appUsingSizeAdjustment: outerCtx.appUsingSizeAdjustment,\n      flightRouterState: undefined,\n      requestId: outerCtx.requestId,\n      htmlRequestId: outerCtx.htmlRequestId,\n      pagePath: outerCtx.pagePath,\n      assetPrefix: outerCtx.assetPrefix,\n      isNotFoundPath: outerCtx.isNotFoundPath,\n      nonce: outerCtx.nonce,\n      res: outerCtx.res,\n      sharedContext: outerCtx.sharedContext,\n      implicitTags: outerCtx.implicitTags,\n    }\n\n    const validationSamples: InstantValidationSamples = {\n      params: sample.params,\n      searchParams: sample.searchParams,\n    }\n\n    const createRequestStore = (): RequestStore => {\n      // Create exhaustive request data from sample\n      const sampleCookies = createCookiesFromSample(sample.cookies, route)\n\n      // We don't have to bother initializing these, pages can't access them anyway,\n      // we just need them because RequestStore requires them.\n      const unusedMutableCookies = new ResponseCookies(new Headers())\n\n      // Create headers.\n      const sampleHeaders = createHeadersFromSample(\n        sample.headers,\n        sample.cookies,\n        route\n      )\n\n      const draftMode = createDraftModeForValidation()\n\n      return {\n        type: 'request',\n        phase: 'render',\n        implicitTags: outerCtx.implicitTags,\n        url: {\n          pathname: sampleUrl.pathname,\n          search: sampleUrl.search,\n        },\n        headers: sampleHeaders,\n        cookies: sampleCookies,\n        mutableCookies: unusedMutableCookies,\n        userspaceMutableCookies: unusedMutableCookies,\n        draftMode,\n        rootParams: sampleRootParams,\n        validationSamples,\n        validationSampleTracking: createValidationSampleTracking(),\n        // These will be set when rendering\n        renderResumeDataCache: null,\n        prerenderResumeDataCache: null,\n        stagedRendering: null,\n        asyncApiPromises: undefined,\n      }\n    }\n\n    // Track server errors. If one of them surfaces during the client render\n    // in the deserialized form (with no message/stack) we'll use this to map it\n    // back to the original.\n    const onServerError = createReactServerErrorHandler(\n      true, // shouldFormatError\n      true, // isBuildTimePrerendering - disables tracing\n      workStore.reactServerErrorsByDigest,\n      () => {} // Don't report anything here. If needed, it will be reported in the client render.\n    )\n\n    const {\n      accumulatedChunksPromise,\n      startTime,\n      stageController,\n      requestStore: finalServerStore,\n    } = await renderWithRestartOnCacheMissInValidation(\n      validationCtx,\n      createRequestStore(),\n      createRequestStore,\n      (requestStore) =>\n        workUnitAsyncStorage.run(\n          requestStore,\n          getRSCPayload,\n          loaderTree,\n          validationCtx,\n          { is404: false }\n        ),\n      (signal) =>\n        function onError(err) {\n          const digest = getDigestForWellKnownError(err)\n          if (digest) {\n            return digest\n          }\n          if (signal.aborted) {\n            return\n          }\n          return onServerError(err)\n        },\n      prefilledDataCache\n    )\n\n    const accumulatedChunks = await accumulatedChunksPromise\n    const debugChunks = null // TODO(instant-validation-build): support debugChannel\n\n    // Missing sample errors take priority over everything else,\n    // because they prevent us from rendering everything we need to validate.\n    const serverValidationSampleTracking =\n      finalServerStore.validationSampleTracking!\n    if (serverValidationSampleTracking.missingSampleErrors.length > 0) {\n      return serverValidationSampleTracking.missingSampleErrors\n    }\n\n    // We also error for sync IO. This runs after the prerender,\n    // so if we get sync IO errors here, they're likely from the runtime stage --\n    // the prerender probably discovered sync IO in the static stage\n    if (\n      stageController.currentStage === RenderStage.Abandoned &&\n      stageController.syncInterruptReason\n    ) {\n      return [stageController.syncInterruptReason]\n    }\n\n    const allowEmptyStaticShell =\n      (validationCtx.renderOpts.allowEmptyStaticShell ?? false) ||\n      (await isPageAllowedToBlock(loaderTree))\n\n    // Now we the chunks of a fully rendered page, just like in dev.\n    // We can use them to validate all the navigations required by `instant` configs.\n    // Note that we're not performing static shell validation here -- that happens\n    // implicitly as part of the static prerender.\n\n    // The static prerender has warmed some client modules already,\n    // but we'll be reaching Runtime/Dynamic stages and thus rendering more content,\n    // so we need to warm again.\n    // TODO(instant-validation-build): This might warm too much, possibly hitting errors on code that didn't expect\n    // to run at build time. For example, we generally don't need to render leaf segments (e.g. __PAGE__) in\n    // the Dynamic stage, they're Runtime at best.\n\n    const warmupValidationSamplesTracking = createValidationSampleTracking()\n    await warmupClientModulesForStagedValidation(\n      'validation-client',\n      accumulatedChunks.dynamicChunks,\n      accumulatedChunks.dynamicChunks,\n      sampleRootParams,\n      fallbackRouteParams,\n      allowEmptyStaticShell,\n      validationCtx,\n      validationSamples,\n      warmupValidationSamplesTracking\n    )\n    if (warmupValidationSamplesTracking.missingSampleErrors.length > 0) {\n      return warmupValidationSamplesTracking.missingSampleErrors\n    }\n\n    return await validateInstantConfigs(\n      accumulatedChunks,\n      debugChunks,\n      startTime,\n      sampleRootParams,\n      fallbackRouteParams,\n      validationCtx,\n      undefined, // hmrRefreshHash,\n      validationSamples\n    )\n  })\n}\n\ntype PrerenderToStreamResult = {\n  stream: ReadableStream<Uint8Array>\n  digestErrorsMap: Map<string, DigestedError>\n  ssrErrors: Array<unknown>\n  dynamicAccess?: null | Array<DynamicAccess>\n  collectedRevalidate: number\n  collectedExpire: number\n  collectedStale: number\n  collectedTags: null | string[]\n  renderResumeDataCache?: RenderResumeDataCache\n}\n\n/**\n * Determines whether we should generate static flight data.\n */\nfunction shouldGenerateStaticFlightData(workStore: WorkStore): boolean {\n  const { isStaticGeneration } = workStore\n  if (!isStaticGeneration) return false\n\n  return true\n}\n\nasync function prerenderToStream(\n  req: BaseNextRequest,\n  res: BaseNextResponse,\n  ctx: AppRenderContext,\n  metadata: AppPageRenderResultMetadata,\n  tree: LoaderTree,\n  fallbackRouteParams: OpaqueFallbackRouteParams | null\n): Promise<PrerenderToStreamResult> {\n  // When prerendering formState is always null. We still include it\n  // because some shared APIs expect a formState value and this is slightly\n  // more explicit than making it an optional function argument\n  const formState = null\n\n  const {\n    assetPrefix,\n    getDynamicParamFromSegment,\n    implicitTags,\n    nonce,\n    pagePath,\n    renderOpts,\n    workStore,\n  } = ctx\n\n  const {\n    basePath,\n    buildManifest,\n    ComponentMod,\n    crossOrigin,\n    experimental,\n    isDebugDynamicAccesses,\n    isBuildTimePrerendering = false,\n    onInstrumentationRequestError,\n    page,\n    reactMaxHeadersLength,\n    subresourceIntegrityManifest,\n    cacheComponents,\n  } = renderOpts\n\n  const { cachedNavigations } = renderOpts.experimental\n\n  const allowEmptyStaticShell =\n    (renderOpts.allowEmptyStaticShell ?? false) ||\n    (await isPageAllowedToBlock(tree))\n\n  const rootParams = getRootParams(tree, getDynamicParamFromSegment)\n\n  const { ServerInsertedHTMLProvider, renderServerInsertedHTML } =\n    createServerInsertedHTML()\n  const getServerInsertedMetadata = createServerInsertedMetadata(nonce)\n\n  const tracingMetadata = getTracedMetadata(\n    getTracer().getTracePropagationData(),\n    experimental.clientTraceMetadata\n  )\n\n  const polyfills: JSX.IntrinsicElements['script'][] =\n    buildManifest.polyfillFiles\n      .filter(\n        (polyfill) =>\n          polyfill.endsWith('.js') && !polyfill.endsWith('.module.js')\n      )\n      .map((polyfill) => ({\n        src: `${assetPrefix}/_next/${polyfill}${getAssetQueryString(\n          ctx,\n          false\n        )}`,\n        integrity: subresourceIntegrityManifest?.[polyfill],\n        crossOrigin,\n        noModule: true,\n        nonce,\n      }))\n\n  const [preinitScripts, bootstrapScript] = getRequiredScripts(\n    buildManifest,\n    // Why is assetPrefix optional on renderOpts?\n    // @TODO make it default empty string on renderOpts and get rid of it from ctx\n    assetPrefix,\n    crossOrigin,\n    subresourceIntegrityManifest,\n    getAssetQueryString(ctx, true),\n    nonce,\n    page\n  )\n\n  const { reactServerErrorsByDigest } = workStore\n  // We don't report errors during prerendering through our instrumentation hooks\n  const reportErrors = !experimental.isRoutePPREnabled\n  function onHTMLRenderRSCError(err: DigestedError, silenceLog: boolean) {\n    if (reportErrors) {\n      return onInstrumentationRequestError?.(\n        err,\n        req,\n        createErrorContext(ctx, 'react-server-components'),\n        silenceLog\n      )\n    }\n  }\n  const serverComponentsErrorHandler = createReactServerErrorHandler(\n    process.env.NODE_ENV === 'development',\n    isBuildTimePrerendering,\n    reactServerErrorsByDigest,\n    onHTMLRenderRSCError\n  )\n\n  function onHTMLRenderSSRError(err: DigestedError) {\n    if (reportErrors) {\n      // We don't need to silence logs here. onHTMLRenderSSRError won't be\n      // called at all if the error was logged before in the RSC error handler.\n      const silenceLog = false\n      return onInstrumentationRequestError?.(\n        err,\n        req,\n        createErrorContext(ctx, 'server-rendering'),\n        silenceLog\n      )\n    }\n  }\n  const allCapturedErrors: Array<unknown> = []\n  const htmlRendererErrorHandler = createHTMLErrorHandler(\n    process.env.NODE_ENV === 'development',\n    isBuildTimePrerendering,\n    reactServerErrorsByDigest,\n    allCapturedErrors,\n    onHTMLRenderSSRError\n  )\n\n  let reactServerPrerenderResult: null | ReactServerPrerenderResult = null\n  const setMetadataHeader = (name: string) => {\n    metadata.headers ??= {}\n    metadata.headers[name] = res.getHeader(name)\n  }\n  const setHeader = (name: string, value: string | string[]) => {\n    res.setHeader(name, value)\n    setMetadataHeader(name)\n    return res\n  }\n  const appendHeader = (name: string, value: string | string[]) => {\n    if (Array.isArray(value)) {\n      value.forEach((item) => {\n        res.appendHeader(name, item)\n      })\n    } else {\n      res.appendHeader(name, value)\n    }\n    setMetadataHeader(name)\n  }\n\n  const selectStaleTime = createSelectStaleTime(experimental)\n  const { clientModules } = getClientReferenceManifest()\n\n  let prerenderStore: PrerenderStore | null = null\n\n  try {\n    if (cacheComponents) {\n      /**\n       * cacheComponents with PPR\n       *\n       * The general approach is to render the RSC stream first allowing any cache reads to resolve.\n       * Once we have settled all cache reads we restart the render and abort after a single Task.\n       *\n       * Unlike with the non PPR case we can't synchronously abort the render when a dynamic API is used\n       * during the initial render because we need to ensure all caches can be filled as part of the initial Task\n       * and a synchronous abort might prevent us from filling all caches.\n       *\n       * Once the render is complete we allow the SSR render to finish and use a combination of the postponed state\n       * and the reactServerIsDynamic value to determine how to treat the resulting render\n       */\n\n      // The prerender controller represents the lifetime of the prerender. It\n      // will be aborted when a task is complete or a synchronously aborting API\n      // is called. Notably, during prospective prerenders, this does not\n      // actually terminate the prerender itself, which will continue until all\n      // caches are filled.\n      const initialServerPrerenderController = new AbortController()\n\n      // This controller is used to abort the React prerender.\n      const initialServerReactController = new AbortController()\n\n      // This controller represents the lifetime of the React prerender. Its\n      // signal can be used for any I/O operation to abort the I/O and/or to\n      // reject, when prerendering aborts. This includes our own hanging\n      // promises for accessing request data, and for fetch calls. It might be\n      // replaced in the future by React.cacheSignal(). It's aborted after the\n      // React controller, so that no pending I/O can register abort listeners\n      // that are called before React's abort listener is called. This ensures\n      // that pending I/O is not rejected too early when aborting the prerender.\n      // Notably, during the prospective prerender, it is different from the\n      // prerender controller because we don't want to end the React prerender\n      // until all caches are filled.\n      const initialServerRenderController = new AbortController()\n\n      // The cacheSignal helps us track whether caches are still filling or we are ready\n      // to cut the render off.\n      const cacheSignal = new CacheSignal()\n\n      // Always start with a fresh prerender RDC so warmup can fill misses,\n      // even when we have a prefilled render RDC to seed from.\n      const prerenderResumeDataCache = createPrerenderResumeDataCache()\n      let renderResumeDataCache: RenderResumeDataCache | null =\n        renderOpts.renderResumeDataCache ?? null\n\n      const initialServerPayloadPrerenderStore: PrerenderStore = {\n        type: 'prerender',\n        phase: 'render',\n        rootParams,\n        fallbackRouteParams,\n        implicitTags,\n        // While this render signal isn't going to be used to abort a React render while getting the RSC payload\n        // various request data APIs bind to this controller to reject after completion.\n        renderSignal: initialServerRenderController.signal,\n        // When we generate the RSC payload we might abort this controller due to sync IO\n        // but we don't actually care about sync IO in this phase so we use a throw away controller\n        // that isn't connected to anything\n        controller: new AbortController(),\n        // During the initial prerender we need to track all cache reads to ensure\n        // we render long enough to fill every cache it is possible to visit during\n        // the final prerender.\n        cacheSignal,\n        dynamicTracking: null,\n        allowEmptyStaticShell,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n        prerenderResumeDataCache,\n        renderResumeDataCache,\n        hmrRefreshHash: undefined,\n        // We don't track vary params during initial prerender, only the final one\n        varyParamsAccumulator: null,\n      }\n\n      // We're not going to use the result of this render because the only time it could be used\n      // is if it completes in a microtask and that's likely very rare for any non-trivial app\n      const initialServerPayload = await workUnitAsyncStorage.run(\n        initialServerPayloadPrerenderStore,\n        getRSCPayload,\n        tree,\n        ctx,\n        { is404: res.statusCode === 404 }\n      )\n\n      const initialServerPrerenderStore: PrerenderStore = (prerenderStore = {\n        type: 'prerender',\n        phase: 'render',\n        rootParams,\n        fallbackRouteParams,\n        implicitTags,\n        renderSignal: initialServerRenderController.signal,\n        controller: initialServerPrerenderController,\n        // During the initial prerender we need to track all cache reads to ensure\n        // we render long enough to fill every cache it is possible to visit during\n        // the final prerender.\n        cacheSignal,\n        dynamicTracking: null,\n        allowEmptyStaticShell,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n        prerenderResumeDataCache,\n        renderResumeDataCache,\n        hmrRefreshHash: undefined,\n        // We don't track vary params during initial prerender, only the final one\n        varyParamsAccumulator: null,\n      })\n\n      const initialPrerenderOptions = {\n        filterStackFrame,\n        onError: (err: unknown) => {\n          const digest = getDigestForWellKnownError(err)\n\n          if (digest) {\n            return digest\n          }\n\n          if (isReactLargeShellError(err)) {\n            // TODO: Aggregate\n            console.error(err)\n            return undefined\n          }\n\n          if (initialServerPrerenderController.signal.aborted) {\n            // The render aborted before this error was handled which indicates\n            // the error is caused by unfinished components within the render\n            return\n          } else if (\n            process.env.NEXT_DEBUG_BUILD ||\n            process.env.__NEXT_VERBOSE_LOGGING\n          ) {\n            printDebugThrownValueForProspectiveRender(\n              err,\n              workStore.route,\n              Phase.ProspectiveRender\n            )\n          }\n        },\n        // We don't want to stop rendering until the cacheSignal is complete so we pass\n        // a different signal to this render call than is used by dynamic APIs to signify\n        // transitioning out of the prerender environment\n        signal: initialServerReactController.signal,\n      }\n\n      const pendingInitialServerResult = workUnitAsyncStorage.run(\n        initialServerPrerenderStore,\n        getServerPrerender(ComponentMod),\n        initialServerPayload,\n        clientModules,\n        initialPrerenderOptions\n      )\n\n      // The listener to abort our own render controller must be added after\n      // React has added its listener, to ensure that pending I/O is not\n      // aborted/rejected too early.\n      initialServerReactController.signal.addEventListener(\n        'abort',\n        () => {\n          initialServerRenderController.abort()\n          initialServerPrerenderController.abort()\n        },\n        { once: true }\n      )\n\n      // Wait for all caches to be finished filling and for async imports to resolve\n      trackPendingModules(cacheSignal)\n      await cacheSignal.cacheReady()\n\n      initialServerReactController.abort()\n\n      // We don't need to continue the prerender process if we already\n      // detected invalid dynamic usage in the initial prerender phase.\n      if (workStore.invalidDynamicUsageError) {\n        logDisallowedDynamicError(workStore, workStore.invalidDynamicUsageError)\n        throw new StaticGenBailoutError()\n      }\n\n      let initialServerResult\n      try {\n        initialServerResult = await createReactServerPrerenderResult(\n          pendingInitialServerResult\n        )\n      } catch (err) {\n        if (\n          initialServerReactController.signal.aborted ||\n          initialServerPrerenderController.signal.aborted\n        ) {\n          // These are expected errors that might error the prerender. we ignore them.\n        } else if (\n          process.env.NEXT_DEBUG_BUILD ||\n          process.env.__NEXT_VERBOSE_LOGGING\n        ) {\n          // We don't normally log these errors because we are going to retry anyway but\n          // it can be useful for debugging Next.js itself to get visibility here when needed\n          printDebugThrownValueForProspectiveRender(\n            err,\n            workStore.route,\n            Phase.ProspectiveRender\n          )\n        }\n      }\n\n      if (initialServerResult) {\n        const initialClientPrerenderController = new AbortController()\n        const initialClientReactController = new AbortController()\n        const initialClientRenderController = new AbortController()\n\n        const initialClientPrerenderStore: PrerenderStore = {\n          type: 'prerender-client',\n          phase: 'render',\n          rootParams,\n          fallbackRouteParams,\n          implicitTags,\n          renderSignal: initialClientRenderController.signal,\n          controller: initialClientPrerenderController,\n          // For HTML Generation the only cache tracked activity\n          // is module loading, which has it's own cache signal\n          cacheSignal: null,\n          dynamicTracking: null,\n          allowEmptyStaticShell,\n          revalidate: INFINITE_CACHE,\n          expire: INFINITE_CACHE,\n          stale: INFINITE_CACHE,\n          tags: [...implicitTags.tags],\n          prerenderResumeDataCache,\n          renderResumeDataCache,\n          hmrRefreshHash: undefined,\n          // Client prerenders don't track server param access\n          varyParamsAccumulator: null,\n        }\n\n        const pendingInitialClientResult = workUnitAsyncStorage.run(\n          initialClientPrerenderStore,\n          getClientPrerender,\n          // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n          <App\n            reactServerStream={initialServerResult.asUnclosingStream()}\n            reactDebugStream={undefined}\n            debugEndTime={undefined}\n            preinitScripts={preinitScripts}\n            ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n            nonce={nonce}\n            images={ctx.renderOpts.images}\n          />,\n          {\n            signal: initialClientReactController.signal,\n            onError: (err: unknown) => {\n              const digest = getDigestForWellKnownError(err)\n\n              if (digest) {\n                return digest\n              }\n\n              if (isReactLargeShellError(err)) {\n                // TODO: Aggregate\n                console.error(err)\n                return undefined\n              }\n\n              if (initialClientReactController.signal.aborted) {\n                // These are expected errors that might error the prerender. we ignore them.\n              } else if (\n                process.env.NEXT_DEBUG_BUILD ||\n                process.env.__NEXT_VERBOSE_LOGGING\n              ) {\n                // We don't normally log these errors because we are going to retry anyway but\n                // it can be useful for debugging Next.js itself to get visibility here when needed\n                printDebugThrownValueForProspectiveRender(\n                  err,\n                  workStore.route,\n                  Phase.ProspectiveRender\n                )\n              }\n            },\n            bootstrapScripts: [bootstrapScript],\n          }\n        )\n\n        // The listener to abort our own render controller must be added after\n        // React has added its listener, to ensure that pending I/O is not\n        // aborted/rejected too early.\n        initialClientReactController.signal.addEventListener(\n          'abort',\n          () => {\n            initialClientRenderController.abort()\n          },\n          { once: true }\n        )\n\n        pendingInitialClientResult.catch((err: unknown) => {\n          if (\n            initialClientReactController.signal.aborted ||\n            isPrerenderInterruptedError(err)\n          ) {\n            // These are expected errors that might error the prerender. we ignore them.\n          } else if (\n            process.env.NEXT_DEBUG_BUILD ||\n            process.env.__NEXT_VERBOSE_LOGGING\n          ) {\n            // We don't normally log these errors because we are going to retry anyway but\n            // it can be useful for debugging Next.js itself to get visibility here when needed\n            printDebugThrownValueForProspectiveRender(\n              err,\n              workStore.route,\n              Phase.ProspectiveRender\n            )\n          }\n        })\n\n        // This is mostly needed for dynamic `import()`s in client components.\n        // Promises passed to client were already awaited above (assuming that they came from cached functions)\n        trackPendingModules(cacheSignal)\n        await cacheSignal.cacheReady()\n        initialClientReactController.abort()\n      }\n\n      if (renderOpts.renderResumeDataCache) {\n        // Swap to the warmed cache so the final render uses entries produced during warmup.\n        renderResumeDataCache = createRenderResumeDataCache(\n          prerenderResumeDataCache\n        )\n      }\n\n      const finalServerReactController = new AbortController()\n      const finalServerRenderController = new AbortController()\n\n      const varyParamsAccumulator = createResponseVaryParamsAccumulator()\n\n      const finalServerPayloadPrerenderStore: PrerenderStore = {\n        type: 'prerender',\n        phase: 'render',\n        rootParams,\n        fallbackRouteParams,\n        implicitTags,\n        // While this render signal isn't going to be used to abort a React render while getting the RSC payload\n        // various request data APIs bind to this controller to reject after completion.\n        renderSignal: finalServerRenderController.signal,\n        // When we generate the RSC payload we might abort this controller due to sync IO\n        // but we don't actually care about sync IO in this phase so we use a throw away controller\n        // that isn't connected to anything\n        controller: new AbortController(),\n        // All caches we could read must already be filled so no tracking is necessary\n        cacheSignal: null,\n        dynamicTracking: null,\n        allowEmptyStaticShell,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n        prerenderResumeDataCache,\n        renderResumeDataCache,\n        hmrRefreshHash: undefined,\n        varyParamsAccumulator,\n      }\n\n      const finalAttemptRSCPayload = await workUnitAsyncStorage.run(\n        finalServerPayloadPrerenderStore,\n        getRSCPayload,\n        tree,\n        ctx,\n        { is404: res.statusCode === 404 }\n      )\n\n      let staleTimeIterable: StaleTimeIterable | undefined\n      if (cachedNavigations) {\n        staleTimeIterable = new StaleTimeIterable()\n        finalAttemptRSCPayload.s = staleTimeIterable\n      }\n\n      const serverDynamicTracking = createDynamicTrackingState(\n        isDebugDynamicAccesses\n      )\n      let serverIsDynamic = false\n\n      const finalServerPrerenderStore: PrerenderStore = (prerenderStore = {\n        type: 'prerender',\n        phase: 'render',\n        rootParams,\n        fallbackRouteParams,\n        implicitTags,\n        renderSignal: finalServerRenderController.signal,\n        controller: finalServerReactController,\n        // All caches we could read must already be filled so no tracking is necessary\n        cacheSignal: null,\n        dynamicTracking: serverDynamicTracking,\n        allowEmptyStaticShell,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n        prerenderResumeDataCache,\n        renderResumeDataCache,\n        hmrRefreshHash: undefined,\n        varyParamsAccumulator,\n      })\n\n      if (staleTimeIterable !== undefined) {\n        trackStaleTime(\n          finalServerPrerenderStore,\n          staleTimeIterable,\n          selectStaleTime\n        )\n      }\n\n      let prerenderIsPending = true\n      const finalRSCPrerenderOptions = {\n        filterStackFrame,\n        onError: (err: unknown) => {\n          return serverComponentsErrorHandler(err)\n        },\n        signal: finalServerReactController.signal,\n      }\n      const finalRSCAbortCallback = async () => {\n        // Now that the prerendering is complete, we know the final stale\n        // time and vary params. Close the stale time iterable and resolve\n        // the vary params thenable so Flight can serialize their values\n        // into the stream. The timing here is important: both were\n        // included in the Flight payload, but they can only be serialized\n        // at the very end, after all the components have finished.\n        //\n        // We resolve these directly here instead of reading from the work\n        // unit store because this callback runs in a separate task (via\n        // setTimeout) and may not have access to the async storage context.\n        const pendingFinishes: Promise<void>[] = [\n          finishAccumulatingVaryParams(varyParamsAccumulator),\n        ]\n        if (staleTimeIterable !== undefined) {\n          pendingFinishes.push(finishStaleTimeTracking(staleTimeIterable))\n        }\n        await Promise.all(pendingFinishes)\n\n        if (finalServerReactController.signal.aborted) {\n          // If the server controller is already aborted we must have called something\n          // that required aborting the prerender synchronously such as with new Date()\n          serverIsDynamic = true\n          return\n        }\n\n        if (prerenderIsPending) {\n          // If prerenderIsPending then we have blocked for longer than a Task and we assume\n          // there is something unfinished.\n          serverIsDynamic = true\n        }\n\n        finalServerReactController.abort()\n      }\n      const finalRSCPrerenderFn = async () => {\n        const pendingPrerenderResult = workUnitAsyncStorage.run(\n          // The store to scope\n          finalServerPrerenderStore,\n          // The function to run\n          getServerPrerender(ComponentMod),\n          // ... the arguments for the function to run\n          finalAttemptRSCPayload,\n          clientModules,\n          finalRSCPrerenderOptions\n        )\n\n        // The listener to abort our own render controller must be added\n        // after React has added its listener, to ensure that pending I/O\n        // is not aborted/rejected too early.\n        finalServerReactController.signal.addEventListener(\n          'abort',\n          () => {\n            finalServerRenderController.abort()\n          },\n          { once: true }\n        )\n\n        const prerenderResult = await pendingPrerenderResult\n        prerenderIsPending = false\n\n        return prerenderResult\n      }\n      const reactServerResult = (reactServerPrerenderResult =\n        await createReactServerPrerenderResult(\n          runInSequentialTasks(finalRSCPrerenderFn, finalRSCAbortCallback)\n        ))\n\n      const clientDynamicTracking = createDynamicTrackingState(\n        isDebugDynamicAccesses\n      )\n\n      const finalClientReactController = new AbortController()\n      const finalClientRenderController = new AbortController()\n\n      const finalClientPrerenderStore: PrerenderStore = {\n        type: 'prerender-client',\n        phase: 'render',\n        rootParams,\n        fallbackRouteParams,\n        implicitTags,\n        renderSignal: finalClientRenderController.signal,\n        controller: finalClientReactController,\n        // No APIs require a cacheSignal through the workUnitStore during the HTML prerender\n        cacheSignal: null,\n        dynamicTracking: clientDynamicTracking,\n        allowEmptyStaticShell,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n        prerenderResumeDataCache,\n        renderResumeDataCache,\n        hmrRefreshHash: undefined,\n        // Client prerenders don't track server param access\n        varyParamsAccumulator: null,\n      }\n\n      let dynamicValidation = createDynamicValidationState()\n\n      const finalClientOnHeaders = createOnHeadersCallback(appendHeader)\n\n      let { prelude: unprocessedPrelude, postponed } =\n        await runInSequentialTasks(\n          () => {\n            const pendingFinalClientResult = workUnitAsyncStorage.run(\n              finalClientPrerenderStore,\n              getClientPrerender,\n              // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n              <App\n                reactServerStream={reactServerResult.asUnclosingStream()}\n                reactDebugStream={undefined}\n                debugEndTime={undefined}\n                preinitScripts={preinitScripts}\n                ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n                nonce={nonce}\n                images={ctx.renderOpts.images}\n              />,\n              {\n                signal: finalClientReactController.signal,\n                onError: (err: unknown, errorInfo: ErrorInfo) => {\n                  if (\n                    isPrerenderInterruptedError(err) ||\n                    finalClientReactController.signal.aborted\n                  ) {\n                    const componentStack: string | undefined = (\n                      errorInfo as any\n                    ).componentStack\n                    if (typeof componentStack === 'string') {\n                      trackAllowedDynamicAccess(\n                        workStore,\n                        componentStack,\n                        dynamicValidation,\n                        clientDynamicTracking\n                      )\n                    }\n                    return\n                  }\n\n                  return htmlRendererErrorHandler(err, errorInfo)\n                },\n                onHeaders: finalClientOnHeaders,\n                maxHeadersLength: reactMaxHeadersLength,\n                bootstrapScripts: [bootstrapScript],\n              }\n            )\n\n            // The listener to abort our own render controller must be added\n            // after React has added its listener, to ensure that pending I/O is\n            // not aborted/rejected too early.\n            finalClientReactController.signal.addEventListener(\n              'abort',\n              () => {\n                finalClientRenderController.abort()\n              },\n              { once: true }\n            )\n\n            return pendingFinalClientResult\n          },\n          () => {\n            finalClientReactController.abort()\n          }\n        )\n\n      const { prelude, preludeIsEmpty } =\n        await processPreludeOp(unprocessedPrelude)\n\n      // If we've disabled throwing on empty static shell, then we don't need to\n      // track any dynamic access that occurs above the suspense boundary because\n      // we'll do so in the route shell.\n      if (!allowEmptyStaticShell) {\n        throwIfDisallowedDynamic(\n          workStore,\n          preludeIsEmpty ? PreludeState.Empty : PreludeState.Full,\n          dynamicValidation,\n          serverDynamicTracking\n        )\n      }\n\n      const getServerInsertedHTML = makeGetServerInsertedHTML({\n        polyfills,\n        renderServerInsertedHTML,\n        serverCapturedErrors: allCapturedErrors,\n        basePath,\n        tracingMetadata: tracingMetadata,\n      })\n\n      metadata.flightData = await streamToBuffer(\n        cachedNavigations\n          ? prependIsPartialByte(reactServerResult.asStream(), serverIsDynamic)\n          : reactServerResult.asStream()\n      )\n\n      // collectSegmentData needs the raw flight data without the marker byte.\n      const flightData = cachedNavigations\n        ? metadata.flightData.subarray(1)\n        : metadata.flightData\n\n      await collectSegmentData(\n        flightData,\n        finalServerPrerenderStore,\n        ComponentMod,\n        renderOpts,\n        ctx.pagePath,\n        metadata\n      )\n\n      if (serverIsDynamic) {\n        // Dynamic case\n        // We will always need to perform a \"resume\" render of some kind when this route is accessed\n        // because the RSC data itself is dynamic. We determine if there are any HTML holes or not\n        // but generally this is a \"partial\" prerender in that there will be a per-request compute\n        // concatenated to the static shell.\n        if (postponed != null) {\n          // Dynamic HTML case\n          metadata.postponed = await getDynamicHTMLPostponedState(\n            postponed,\n            preludeIsEmpty\n              ? DynamicHTMLPreludeState.Empty\n              : DynamicHTMLPreludeState.Full,\n            fallbackRouteParams,\n            prerenderResumeDataCache,\n            cacheComponents\n          )\n        } else {\n          // Dynamic Data case\n          metadata.postponed = await getDynamicDataPostponedState(\n            prerenderResumeDataCache,\n            cacheComponents\n          )\n        }\n        reactServerResult.consume()\n        const continueDynamicPrerenderOpts = {\n          getServerInsertedHTML,\n          getServerInsertedMetadata,\n          deploymentId: ctx.sharedContext.deploymentId,\n        }\n        return {\n          digestErrorsMap: reactServerErrorsByDigest,\n          ssrErrors: allCapturedErrors,\n          stream: await continueDynamicPrerender(\n            prelude,\n            continueDynamicPrerenderOpts\n          ),\n          dynamicAccess: consumeDynamicAccess(\n            serverDynamicTracking,\n            clientDynamicTracking\n          ),\n          // TODO: Should this include the SSR pass?\n          collectedRevalidate: finalServerPrerenderStore.revalidate,\n          collectedExpire: finalServerPrerenderStore.expire,\n          collectedStale: selectStaleTime(finalServerPrerenderStore.stale),\n          collectedTags: finalServerPrerenderStore.tags,\n          renderResumeDataCache: createRenderResumeDataCache(\n            prerenderResumeDataCache\n          ),\n        }\n      } else {\n        // Static case\n        // We will not perform resumption per request. The result can be served statically to the requestor\n        // and if there was anything dynamic it will only be rendered in the browser.\n        if (workStore.forceDynamic) {\n          throw new StaticGenBailoutError(\n            'Invariant: a Page with `dynamic = \"force-dynamic\"` did not trigger the dynamic pathway. This is a bug in Next.js'\n          )\n        }\n\n        let htmlStream: ReadableStream<Uint8Array> = prelude\n        if (postponed != null) {\n          // We postponed but nothing dynamic was used. We resume the render now and immediately abort it\n          // so we can set all the postponed boundaries to client render mode before we store the HTML response\n          const foreverStream = createPendingStream()\n          const resumePrelude = await resumeAndAbort(\n            // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n            <App\n              reactServerStream={foreverStream}\n              reactDebugStream={undefined}\n              debugEndTime={undefined}\n              preinitScripts={() => {}}\n              ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n              nonce={nonce}\n              images={ctx.renderOpts.images}\n            />,\n            JSON.parse(JSON.stringify(postponed)),\n            {\n              signal: createRenderInBrowserAbortSignal(),\n              onError: htmlRendererErrorHandler,\n              nonce,\n            }\n          )\n          // First we write everything from the prerender, then we write everything from the aborted resume render\n          htmlStream = chainStreams(prelude, resumePrelude)\n        }\n\n        let finalStream\n        const hasFallbackRouteParams =\n          fallbackRouteParams && fallbackRouteParams.size > 0\n        if (hasFallbackRouteParams) {\n          // This is a \"static fallback\" prerender: although the page didn't\n          // access any runtime params in a Server Component, it may have\n          // accessed a runtime param in a client segment.\n          //\n          // TODO: If there were no client segments, we can use the fully static\n          // path instead.\n          //\n          // Rather than use a dynamic server resume to fill in the params,\n          // we can rely on the client to parse the params from the URL and use\n          // that to hydrate the page.\n          //\n          // Send an empty InitialRSCPayload to the server component renderer\n          // The data will be fetched by the client instead.\n          // TODO: In the future, rather than defer the entire hydration payload\n          // to be fetched by the client, we should only defer the client\n          // segments, since those are the only ones whose data is not complete.\n          const emptyReactServerResult =\n            await createReactServerPrerenderResultFromRender(\n              renderToFlightStream(ComponentMod, [], clientModules, {\n                filterStackFrame,\n                onError: serverComponentsErrorHandler,\n              })\n            )\n          finalStream = await continueStaticFallbackPrerender(htmlStream, {\n            inlinedDataStream: createInlinedDataStream(\n              emptyReactServerResult.consumeAsStream(),\n              nonce,\n              formState\n            ),\n            getServerInsertedHTML,\n            getServerInsertedMetadata,\n            deploymentId: ctx.sharedContext.deploymentId,\n          })\n        } else {\n          // Normal static prerender case, no fallback param handling needed\n          finalStream = await continueStaticPrerender(htmlStream, {\n            inlinedDataStream: createInlinedDataStream(\n              reactServerResult.consumeAsStream(),\n              nonce,\n              formState\n            ),\n            getServerInsertedHTML,\n            getServerInsertedMetadata,\n            deploymentId: ctx.sharedContext.deploymentId,\n          })\n        }\n\n        return {\n          digestErrorsMap: reactServerErrorsByDigest,\n          ssrErrors: allCapturedErrors,\n          stream: finalStream,\n          dynamicAccess: consumeDynamicAccess(\n            serverDynamicTracking,\n            clientDynamicTracking\n          ),\n          // TODO: Should this include the SSR pass?\n          collectedRevalidate: finalServerPrerenderStore.revalidate,\n          collectedExpire: finalServerPrerenderStore.expire,\n          collectedStale: selectStaleTime(finalServerPrerenderStore.stale),\n          collectedTags: finalServerPrerenderStore.tags,\n          renderResumeDataCache: createRenderResumeDataCache(\n            prerenderResumeDataCache\n          ),\n        }\n      }\n    } else if (experimental.isRoutePPREnabled) {\n      // We're statically generating with PPR and need to do dynamic tracking\n      let dynamicTracking = createDynamicTrackingState(isDebugDynamicAccesses)\n\n      const prerenderResumeDataCache = createPrerenderResumeDataCache()\n      const reactServerPrerenderStore: PrerenderStore = (prerenderStore = {\n        type: 'prerender-ppr',\n        phase: 'render',\n        rootParams,\n        fallbackRouteParams,\n        implicitTags,\n        dynamicTracking,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n        prerenderResumeDataCache,\n      })\n      const RSCPayload = await workUnitAsyncStorage.run(\n        reactServerPrerenderStore,\n        getRSCPayload,\n        tree,\n        ctx,\n        { is404: res.statusCode === 404 }\n      )\n      let reactServerResult: ReactServerPrerenderResult\n      reactServerResult = reactServerPrerenderResult =\n        await createReactServerPrerenderResultFromRender(\n          workUnitAsyncStorage.run(\n            reactServerPrerenderStore,\n            renderToFlightStream,\n            ComponentMod,\n            RSCPayload,\n            clientModules,\n            {\n              filterStackFrame,\n              onError: serverComponentsErrorHandler,\n            }\n          )\n        )\n\n      const ssrPrerenderStore: PrerenderStore = {\n        type: 'prerender-ppr',\n        phase: 'render',\n        rootParams,\n        fallbackRouteParams,\n        implicitTags,\n        dynamicTracking,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n        prerenderResumeDataCache,\n      }\n      const pprOnHeaders = createOnHeadersCallback(appendHeader)\n      const { prelude: unprocessedPrelude, postponed } =\n        await workUnitAsyncStorage.run(\n          ssrPrerenderStore,\n          getClientPrerender,\n          // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n          <App\n            reactServerStream={reactServerResult.asUnclosingStream()}\n            reactDebugStream={undefined}\n            debugEndTime={undefined}\n            preinitScripts={preinitScripts}\n            ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n            nonce={nonce}\n            images={ctx.renderOpts.images}\n          />,\n          {\n            onError: htmlRendererErrorHandler,\n            onHeaders: pprOnHeaders,\n            maxHeadersLength: reactMaxHeadersLength,\n            bootstrapScripts: [bootstrapScript],\n          }\n        )\n      const getServerInsertedHTML = makeGetServerInsertedHTML({\n        polyfills,\n        renderServerInsertedHTML,\n        serverCapturedErrors: allCapturedErrors,\n        basePath,\n        tracingMetadata: tracingMetadata,\n      })\n\n      // After awaiting here we've waited for the entire RSC render to complete. Crucially this means\n      // that when we detect whether we've used dynamic APIs below we know we'll have picked up even\n      // parts of the React Server render that might not be used in the SSR render.\n      const flightData = await streamToBuffer(reactServerResult.asStream())\n\n      if (shouldGenerateStaticFlightData(workStore)) {\n        metadata.flightData = flightData\n        await collectSegmentData(\n          flightData,\n          ssrPrerenderStore,\n          ComponentMod,\n          renderOpts,\n          ctx.pagePath,\n          metadata\n        )\n      }\n\n      const { prelude, preludeIsEmpty } =\n        await processPreludeOp(unprocessedPrelude)\n\n      /**\n       * When prerendering there are three outcomes to consider\n       *\n       *   Dynamic HTML:      The prerender has dynamic holes (caused by using Next.js Dynamic Rendering APIs)\n       *                      We will need to resume this result when requests are handled and we don't include\n       *                      any server inserted HTML or inlined flight data in the static HTML\n       *\n       *   Dynamic Data:      The prerender has no dynamic holes but dynamic APIs were used. We will not\n       *                      resume this render when requests are handled but we will generate new inlined\n       *                      flight data since it is dynamic and differences may end up reconciling on the client\n       *\n       *   Static:            The prerender has no dynamic holes and no dynamic APIs were used. We statically encode\n       *                      all server inserted HTML and flight data\n       */\n      // First we check if we have any dynamic holes in our HTML prerender\n      if (accessedDynamicData(dynamicTracking.dynamicAccesses)) {\n        if (postponed != null) {\n          // Dynamic HTML case.\n          metadata.postponed = await getDynamicHTMLPostponedState(\n            postponed,\n            preludeIsEmpty\n              ? DynamicHTMLPreludeState.Empty\n              : DynamicHTMLPreludeState.Full,\n            fallbackRouteParams,\n            prerenderResumeDataCache,\n            cacheComponents\n          )\n        } else {\n          // Dynamic Data case.\n          metadata.postponed = await getDynamicDataPostponedState(\n            prerenderResumeDataCache,\n            cacheComponents\n          )\n        }\n        // Regardless of whether this is the Dynamic HTML or Dynamic Data case we need to ensure we include\n        // server inserted html in the static response because the html that is part of the prerender may depend on it\n        // It is possible in the set of stream transforms for Dynamic HTML vs Dynamic Data may differ but currently both states\n        // require the same set so we unify the code path here\n        reactServerResult.consume()\n        const pprDynamicOpts = {\n          getServerInsertedHTML,\n          getServerInsertedMetadata,\n          deploymentId: ctx.sharedContext.deploymentId,\n        }\n        return {\n          digestErrorsMap: reactServerErrorsByDigest,\n          ssrErrors: allCapturedErrors,\n          stream: await continueDynamicPrerender(prelude, pprDynamicOpts),\n          dynamicAccess: dynamicTracking.dynamicAccesses,\n          // TODO: Should this include the SSR pass?\n          collectedRevalidate: reactServerPrerenderStore.revalidate,\n          collectedExpire: reactServerPrerenderStore.expire,\n          collectedStale: selectStaleTime(reactServerPrerenderStore.stale),\n          collectedTags: reactServerPrerenderStore.tags,\n        }\n      } else if (fallbackRouteParams && fallbackRouteParams.size > 0) {\n        // Rendering the fallback case.\n        metadata.postponed = await getDynamicDataPostponedState(\n          prerenderResumeDataCache,\n          cacheComponents\n        )\n\n        const pprFallbackDynamicOpts = {\n          getServerInsertedHTML,\n          getServerInsertedMetadata,\n          deploymentId: ctx.sharedContext.deploymentId,\n        }\n        return {\n          digestErrorsMap: reactServerErrorsByDigest,\n          ssrErrors: allCapturedErrors,\n          stream: await continueDynamicPrerender(\n            prelude,\n            pprFallbackDynamicOpts\n          ),\n          dynamicAccess: dynamicTracking.dynamicAccesses,\n          // TODO: Should this include the SSR pass?\n          collectedRevalidate: reactServerPrerenderStore.revalidate,\n          collectedExpire: reactServerPrerenderStore.expire,\n          collectedStale: selectStaleTime(reactServerPrerenderStore.stale),\n          collectedTags: reactServerPrerenderStore.tags,\n        }\n      } else {\n        // Static case\n        // We still have not used any dynamic APIs. At this point we can produce an entirely static prerender response\n        if (workStore.forceDynamic) {\n          throw new StaticGenBailoutError(\n            'Invariant: a Page with `dynamic = \"force-dynamic\"` did not trigger the dynamic pathway. This is a bug in Next.js'\n          )\n        }\n\n        let htmlStream: ReadableStream<Uint8Array> = prelude\n        if (postponed != null) {\n          // We postponed but nothing dynamic was used. We resume the render now and immediately abort it\n          // so we can set all the postponed boundaries to client render mode before we store the HTML response\n          const foreverStream = createPendingStream()\n          const resumePrelude = await resumeAndAbort(\n            // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n            <App\n              reactServerStream={foreverStream}\n              reactDebugStream={undefined}\n              debugEndTime={undefined}\n              preinitScripts={() => {}}\n              ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n              nonce={nonce}\n              images={ctx.renderOpts.images}\n            />,\n            JSON.parse(JSON.stringify(postponed)),\n            {\n              signal: createRenderInBrowserAbortSignal(),\n              onError: htmlRendererErrorHandler,\n              nonce,\n            }\n          )\n          // First we write everything from the prerender, then we write everything from the aborted resume render\n          htmlStream = chainStreams(prelude, resumePrelude)\n        }\n\n        return {\n          digestErrorsMap: reactServerErrorsByDigest,\n          ssrErrors: allCapturedErrors,\n          stream: await continueStaticPrerender(htmlStream, {\n            inlinedDataStream: createInlinedDataStream(\n              reactServerResult.consumeAsStream(),\n              nonce,\n              formState\n            ),\n            getServerInsertedHTML,\n            getServerInsertedMetadata,\n            deploymentId: ctx.sharedContext.deploymentId,\n          }),\n          dynamicAccess: dynamicTracking.dynamicAccesses,\n          // TODO: Should this include the SSR pass?\n          collectedRevalidate: reactServerPrerenderStore.revalidate,\n          collectedExpire: reactServerPrerenderStore.expire,\n          collectedStale: selectStaleTime(reactServerPrerenderStore.stale),\n          collectedTags: reactServerPrerenderStore.tags,\n        }\n      }\n    } else {\n      const prerenderLegacyStore: PrerenderStore = (prerenderStore = {\n        type: 'prerender-legacy',\n        phase: 'render',\n        rootParams,\n        implicitTags,\n        revalidate: INFINITE_CACHE,\n        expire: INFINITE_CACHE,\n        stale: INFINITE_CACHE,\n        tags: [...implicitTags.tags],\n      })\n      // This is a regular static generation. We don't do dynamic tracking because we rely on\n      // the old-school dynamic error handling to bail out of static generation\n      const RSCPayload = await workUnitAsyncStorage.run(\n        prerenderLegacyStore,\n        getRSCPayload,\n        tree,\n        ctx,\n        { is404: res.statusCode === 404 }\n      )\n\n      let reactServerResult: ReactServerPrerenderResult\n      reactServerResult = reactServerPrerenderResult =\n        await createReactServerPrerenderResultFromRender(\n          workUnitAsyncStorage.run(\n            prerenderLegacyStore,\n            renderToFlightStream,\n            ComponentMod,\n            RSCPayload,\n            clientModules,\n            {\n              filterStackFrame,\n              onError: serverComponentsErrorHandler,\n            }\n          )\n        )\n\n      const { stream: htmlStream } = await workUnitAsyncStorage.run(\n        prerenderLegacyStore,\n        renderToFizzStream,\n        // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n        <App\n          reactServerStream={reactServerResult.asUnclosingStream()}\n          reactDebugStream={undefined}\n          debugEndTime={undefined}\n          preinitScripts={preinitScripts}\n          ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n          nonce={nonce}\n          images={ctx.renderOpts.images}\n        />,\n        {\n          onError: htmlRendererErrorHandler,\n          nonce,\n          bootstrapScripts: [bootstrapScript],\n        }\n      )\n\n      if (shouldGenerateStaticFlightData(workStore)) {\n        const flightData = await streamToBuffer(reactServerResult.asStream())\n        metadata.flightData = flightData\n        await collectSegmentData(\n          flightData,\n          prerenderLegacyStore,\n          ComponentMod,\n          renderOpts,\n          ctx.pagePath,\n          metadata\n        )\n      }\n\n      const getServerInsertedHTML = makeGetServerInsertedHTML({\n        polyfills,\n        renderServerInsertedHTML,\n        serverCapturedErrors: allCapturedErrors,\n        basePath,\n        tracingMetadata: tracingMetadata,\n      })\n      return {\n        digestErrorsMap: reactServerErrorsByDigest,\n        ssrErrors: allCapturedErrors,\n        stream: await continueFizzStream(htmlStream, {\n          inlinedDataStream: createInlinedDataStream(\n            reactServerResult.consumeAsStream(),\n            nonce,\n            formState\n          ),\n          isStaticGeneration: true,\n          getServerInsertedHTML,\n          getServerInsertedMetadata,\n          deploymentId: ctx.sharedContext.deploymentId,\n        }),\n        // TODO: Should this include the SSR pass?\n        collectedRevalidate: prerenderLegacyStore.revalidate,\n        collectedExpire: prerenderLegacyStore.expire,\n        collectedStale: selectStaleTime(prerenderLegacyStore.stale),\n        collectedTags: prerenderLegacyStore.tags,\n      }\n    }\n  } catch (err) {\n    if (\n      isStaticGenBailoutError(err) ||\n      (typeof err === 'object' &&\n        err !== null &&\n        'message' in err &&\n        typeof err.message === 'string' &&\n        err.message.includes(\n          'https://nextjs.org/docs/advanced-features/static-html-export'\n        ))\n    ) {\n      // Ensure that \"next dev\" prints the red error overlay\n      throw err\n    }\n\n    // If this is a static generation error, we need to throw it so that it\n    // can be handled by the caller if we're in static generation mode.\n    if (isDynamicServerError(err)) {\n      throw err\n    }\n\n    // If a bailout made it to this point, it means it wasn't wrapped inside\n    // a suspense boundary.\n    const shouldBailoutToCSR = isBailoutToCSRError(err)\n    if (shouldBailoutToCSR) {\n      const stack = getStackWithoutErrorMessage(err)\n      error(\n        `${err.reason} should be wrapped in a suspense boundary at page \"${pagePath}\". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout\\n${stack}`\n      )\n\n      throw err\n    }\n\n    // If we errored when we did not have an RSC stream to read from. This is\n    // not just a render error, we need to throw early.\n    if (reactServerPrerenderResult === null) {\n      throw err\n    }\n\n    let errorType: MetadataErrorType | 'redirect' | undefined\n\n    if (isHTTPAccessFallbackError(err)) {\n      res.statusCode = getAccessFallbackHTTPStatus(err)\n      metadata.statusCode = res.statusCode\n      errorType = getAccessFallbackErrorTypeByStatus(res.statusCode)\n    } else if (isRedirectError(err)) {\n      errorType = 'redirect'\n      res.statusCode = getRedirectStatusCodeFromError(err)\n      metadata.statusCode = res.statusCode\n\n      const redirectUrl = addPathPrefix(getURLFromRedirectError(err), basePath)\n\n      setHeader('location', redirectUrl)\n    } else if (!shouldBailoutToCSR) {\n      res.statusCode = 500\n      metadata.statusCode = res.statusCode\n    }\n\n    const [errorPreinitScripts, errorBootstrapScript] = getRequiredScripts(\n      buildManifest,\n      assetPrefix,\n      crossOrigin,\n      subresourceIntegrityManifest,\n      getAssetQueryString(ctx, false),\n      nonce,\n      '/_not-found/page'\n    )\n\n    const prerenderLegacyStore: PrerenderStore = (prerenderStore = {\n      type: 'prerender-legacy',\n      phase: 'render',\n      rootParams,\n      implicitTags: implicitTags,\n      revalidate:\n        typeof prerenderStore?.revalidate !== 'undefined'\n          ? prerenderStore.revalidate\n          : INFINITE_CACHE,\n      expire:\n        typeof prerenderStore?.expire !== 'undefined'\n          ? prerenderStore.expire\n          : INFINITE_CACHE,\n      stale:\n        typeof prerenderStore?.stale !== 'undefined'\n          ? prerenderStore.stale\n          : INFINITE_CACHE,\n      tags: [...(prerenderStore?.tags || implicitTags.tags)],\n    })\n    const errorRSCPayload = await workUnitAsyncStorage.run(\n      prerenderLegacyStore,\n      getErrorRSCPayload,\n      tree,\n      ctx,\n      reactServerErrorsByDigest.has((err as any).digest) ? undefined : err,\n      errorType\n    )\n\n    const errorServerStream = workUnitAsyncStorage.run(\n      prerenderLegacyStore,\n      renderToFlightStream,\n      ComponentMod,\n      errorRSCPayload,\n      clientModules,\n      {\n        filterStackFrame,\n        onError: serverComponentsErrorHandler,\n      }\n    )\n\n    try {\n      const { stream: errorHtmlStream } = await workUnitAsyncStorage.run(\n        prerenderLegacyStore,\n        renderToFizzStream,\n        // eslint-disable-next-line @next/internal/no-ambiguous-jsx\n        <ErrorApp\n          reactServerStream={errorServerStream}\n          ServerInsertedHTMLProvider={ServerInsertedHTMLProvider}\n          preinitScripts={errorPreinitScripts}\n          nonce={nonce}\n          images={ctx.renderOpts.images}\n        />,\n        {\n          nonce,\n          bootstrapScripts: [errorBootstrapScript],\n          formState,\n        }\n      )\n\n      if (shouldGenerateStaticFlightData(workStore)) {\n        const flightData = await streamToBuffer(\n          reactServerPrerenderResult.asStream()\n        )\n        metadata.flightData = flightData\n        await collectSegmentData(\n          flightData,\n          prerenderLegacyStore,\n          ComponentMod,\n          renderOpts,\n          ctx.pagePath,\n          metadata\n        )\n      }\n\n      // This is intentionally using the readable datastream from the main\n      // render rather than the flight data from the error page render\n      const flightStream = reactServerPrerenderResult.consumeAsStream()\n\n      return {\n        digestErrorsMap: reactServerErrorsByDigest,\n        ssrErrors: allCapturedErrors,\n        stream: await continueFizzStream(errorHtmlStream, {\n          inlinedDataStream: createInlinedDataStream(\n            flightStream,\n            nonce,\n            formState\n          ),\n          isStaticGeneration: true,\n          getServerInsertedHTML: makeGetServerInsertedHTML({\n            polyfills,\n            renderServerInsertedHTML,\n            serverCapturedErrors: [],\n            basePath,\n            tracingMetadata: tracingMetadata,\n          }),\n          getServerInsertedMetadata,\n          validateRootLayout: !!process.env.__NEXT_DEV_SERVER,\n          deploymentId: ctx.sharedContext.deploymentId,\n        }),\n        dynamicAccess: null,\n        collectedRevalidate:\n          prerenderStore !== null ? prerenderStore.revalidate : INFINITE_CACHE,\n        collectedExpire:\n          prerenderStore !== null ? prerenderStore.expire : INFINITE_CACHE,\n        collectedStale: selectStaleTime(\n          prerenderStore !== null ? prerenderStore.stale : INFINITE_CACHE\n        ),\n        collectedTags: prerenderStore !== null ? prerenderStore.tags : null,\n      }\n    } catch (finalErr: any) {\n      if (\n        process.env.__NEXT_DEV_SERVER &&\n        isHTTPAccessFallbackError(finalErr)\n      ) {\n        const { bailOnRootNotFound } =\n          require('../../client/components/dev-root-http-access-fallback-boundary') as typeof import('../../client/components/dev-root-http-access-fallback-boundary')\n        bailOnRootNotFound()\n      }\n      throw finalErr\n    }\n  }\n}\n\nconst getGlobalErrorStyles = async (\n  tree: LoaderTree,\n  ctx: AppRenderContext\n): Promise<{\n  GlobalError: GlobalErrorComponent\n  styles: ReactNode | undefined\n}> => {\n  const globalErrorModule = parseLoaderTree(tree).modules['global-error']\n\n  if (!globalErrorModule) {\n    throw new Error(\n      'Invariant: global-error module is required but not found in loader tree'\n    )\n  }\n\n  const {\n    componentMod: { createElement },\n  } = ctx\n\n  // Get the GlobalError component and styles from the loader tree\n  const [GlobalErrorComponent, styles] = await createComponentStylesAndScripts({\n    ctx,\n    filePath: globalErrorModule[1],\n    getComponent: globalErrorModule[0],\n    injectedCSS: new Set(),\n    injectedJS: new Set(),\n  })\n\n  let globalErrorStyles: ReactNode = styles\n\n  if (process.env.__NEXT_DEV_SERVER) {\n    const dir =\n      (process.env.NEXT_RUNTIME === 'edge'\n        ? process.env.__NEXT_EDGE_PROJECT_DIR\n        : ctx.renderOpts.dir) || ''\n\n    const globalErrorModulePath = normalizeConventionFilePath(\n      dir,\n      globalErrorModule[1]\n    )\n    if (globalErrorModulePath) {\n      const SegmentViewNode = ctx.componentMod.SegmentViewNode\n      globalErrorStyles =\n        // This will be rendered next to GlobalError component under ErrorBoundary,\n        // it requires a key to avoid React warning about duplicate keys.\n        createElement(\n          SegmentViewNode,\n          {\n            key: 'ge-svn',\n            type: 'global-error',\n            pagePath: globalErrorModulePath,\n          },\n          globalErrorStyles\n        )\n    }\n  }\n\n  return {\n    GlobalError: GlobalErrorComponent,\n    styles: globalErrorStyles,\n  }\n}\n\nasync function collectSegmentData(\n  fullPageDataBuffer: Buffer,\n  prerenderStore: PrerenderStore,\n  ComponentMod: AppPageModule,\n  renderOpts: RenderOpts,\n  pagePath: string,\n  metadata: AppPageRenderResultMetadata\n): Promise<void> {\n  // Per-segment prefetch data\n  //\n  // All of the segments for a page are generated simultaneously, including\n  // during revalidations. This is to ensure consistency, because it's\n  // possible for a mismatch between a layout and page segment can cause the\n  // client to error during rendering. We want to preserve the ability of the\n  // client to recover from such a mismatch by re-requesting all the segments\n  // to get a consistent view of the page.\n  //\n  // For performance, we reuse the Flight output that was created when\n  // generating the initial page HTML. The Flight stream for the whole page is\n  // decomposed into a separate stream per segment.\n\n  const { clientModules, edgeRscModuleMapping, rscModuleMapping } =\n    getClientReferenceManifest()\n\n  // Manifest passed to the Flight client for reading the full-page Flight\n  // stream. Based off similar code in use-cache-wrapper.ts.\n  const isEdgeRuntime = process.env.NEXT_RUNTIME === 'edge'\n  const serverConsumerManifest = {\n    // moduleLoading must be null because we don't want to trigger preloads of ClientReferences\n    // to be added to the consumer. Instead, we'll wait for any ClientReference to be emitted\n    // which themselves will handle the preloading.\n    moduleLoading: null,\n    moduleMap: isEdgeRuntime ? edgeRscModuleMapping : rscModuleMapping,\n    serverModuleMap: getServerModuleMap(),\n  }\n\n  const selectStaleTime = createSelectStaleTime(renderOpts.experimental)\n  const staleTime = selectStaleTime(prerenderStore.stale)\n\n  // Resolve prefetch hints. At runtime (next start / ISR), the precomputed\n  // hints are already loaded from the prefetch-hints.json manifest. During\n  // build, compute them by measuring segment gzip sizes and write them to\n  // metadata so the build pipeline can persist them to the manifest.\n  let hints: PrefetchHints | null\n  const prefetchInlining = renderOpts.experimental.prefetchInlining\n  if (!prefetchInlining) {\n    hints = null\n  } else if (renderOpts.isBuildTimePrerendering) {\n    // Build time: compute fresh hints and store in metadata for the manifest.\n    hints = await ComponentMod.collectPrefetchHints(\n      fullPageDataBuffer,\n      staleTime,\n      clientModules,\n      serverConsumerManifest,\n      prefetchInlining.maxSize,\n      prefetchInlining.maxBundleSize\n    )\n    metadata.prefetchHints = hints\n  } else {\n    // Runtime: use hints from the manifest. Never compute fresh hints\n    // during ISR/revalidation.\n    hints = renderOpts.prefetchHints?.[pagePath] ?? null\n  }\n\n  // Pass the resolved hints so collectSegmentData can union them into\n  // the TreePrefetch. During the initial build the FlightRouterState in\n  // the buffer doesn't have inlining hints yet (they were just computed\n  // above), so we need to merge them in here. At runtime/ISR the hints\n  // are already embedded in the FlightRouterState, so this is null.\n  metadata.segmentData = await ComponentMod.collectSegmentData(\n    renderOpts.cacheComponents,\n    fullPageDataBuffer,\n    staleTime,\n    clientModules,\n    serverConsumerManifest,\n    Boolean(renderOpts.experimental.prefetchInlining),\n    hints\n  )\n}\n\nfunction isBypassingCachesInDev(requestStore: RequestStore): boolean {\n  return (\n    !!process.env.__NEXT_DEV_SERVER &&\n    requestStore.headers.get('cache-control') === 'no-cache'\n  )\n}\n\nfunction WarnForBypassCachesInDev({ route }: { route: string }) {\n  warnOnce(\n    `Route ${route} is rendering with server caches disabled. For this navigation, Component Metadata in React DevTools will not accurately reflect what is statically prerenderable and runtime prefetchable. See more info here: https://nextjs.org/docs/messages/cache-bypass-in-dev`\n  )\n  return null\n}\n\nfunction nodeStreamFromReadableStream<T>(stream: ReadableStream<T>) {\n  if (process.env.NEXT_RUNTIME === 'edge') {\n    throw new InvariantError(\n      'nodeStreamFromReadableStream cannot be used in the edge runtime'\n    )\n  } else {\n    const reader = stream.getReader()\n\n    const { Readable } = require('node:stream') as typeof import('node:stream')\n\n    return new Readable({\n      read() {\n        reader\n          .read()\n          .then(({ done, value }) => {\n            if (done) {\n              this.push(null)\n            } else {\n              this.push(value)\n            }\n          })\n          .catch((err) => this.destroy(err))\n      },\n    })\n  }\n}\n","export function getRevalidateReason(params: {\n  isOnDemandRevalidate?: boolean\n  isStaticGeneration?: boolean\n}): 'on-demand' | 'stale' | undefined {\n  if (params.isOnDemandRevalidate) {\n    return 'on-demand'\n  }\n  if (params.isStaticGeneration) {\n    return 'stale'\n  }\n  return undefined\n}\n","import type { FlightRouterState } from '../../shared/lib/app-router-types'\nimport { flightRouterStateSchema } from './types'\nimport { assert } from 'next/dist/compiled/superstruct'\n\nexport function parseAndValidateFlightRouterState(\n  stateHeader: string | string[]\n): FlightRouterState\nexport function parseAndValidateFlightRouterState(\n  stateHeader: undefined\n): undefined\nexport function parseAndValidateFlightRouterState(\n  stateHeader: string | string[] | undefined\n): FlightRouterState | undefined\nexport function parseAndValidateFlightRouterState(\n  stateHeader: string | string[] | undefined\n): FlightRouterState | undefined {\n  if (typeof stateHeader === 'undefined') {\n    return undefined\n  }\n  if (Array.isArray(stateHeader)) {\n    throw new Error(\n      'Multiple router state headers were sent. This is not allowed.'\n    )\n  }\n\n  // We limit the size of the router state header to ~40kb. This is to prevent\n  // a malicious user from sending a very large header and slowing down the\n  // resolving of the router state.\n  // This is around 2,000 nested or parallel route segment states:\n  // '{\"children\":[\"\",{}]}'.length === 20.\n  if (stateHeader.length > 20 * 2000) {\n    throw new Error('The router state header was too large.')\n  }\n\n  try {\n    const state = JSON.parse(decodeURIComponent(stateHeader))\n    assert(state, flightRouterStateSchema)\n    return state\n  } catch {\n    throw new Error('The router state header was sent but could not be parsed.')\n  }\n}\n","import { ESCAPE_REGEX } from '../htmlescape'\n\nexport function getScriptNonceFromHeader(\n  cspHeaderValue: string\n): string | undefined {\n  const directives = cspHeaderValue\n    // Directives are split by ';'.\n    .split(';')\n    .map((directive) => directive.trim())\n\n  // First try to find the directive for the 'script-src', otherwise try to\n  // fallback to the 'default-src'.\n  const directive =\n    directives.find((dir) => dir.startsWith('script-src')) ||\n    directives.find((dir) => dir.startsWith('default-src'))\n\n  // If no directive could be found, then we're done.\n  if (!directive) {\n    return\n  }\n\n  // Extract the nonce from the directive\n  const nonce = directive\n    .split(' ')\n    // Remove the 'strict-src'/'default-src' string, this can't be the nonce.\n    .slice(1)\n    .map((source) => source.trim())\n    // Find the first source with the 'nonce-' prefix.\n    .find(\n      (source) =>\n        source.startsWith(\"'nonce-\") &&\n        source.length > 8 &&\n        source.endsWith(\"'\")\n    )\n    // Grab the nonce by trimming the 'nonce-' prefix.\n    ?.slice(7, -1)\n\n  // If we could't find the nonce, then we're done.\n  if (!nonce) {\n    return\n  }\n\n  // Don't accept the nonce value if it contains HTML escape characters.\n  // Technically, the spec requires a base64'd value, but this is just an\n  // extra layer.\n  if (ESCAPE_REGEX.test(nonce)) {\n    throw new Error(\n      'Nonce value from Content-Security-Policy contained HTML escape characters.\\nLearn more: https://nextjs.org/docs/messages/nonce-contained-invalid-characters'\n    )\n  }\n\n  return nonce\n}\n","import type { WorkStore } from '../app-render/work-async-storage.external'\nimport type { IncrementalCache } from '../lib/incremental-cache'\nimport type { RenderOpts } from '../app-render/types'\nimport type { FetchMetric } from '../base-http'\nimport type { RequestLifecycleOpts } from '../base-server'\nimport type { AppSegmentConfig } from '../../build/segment-config/app/app-segment-config'\nimport type { CacheLife } from '../use-cache/cache-life'\n\nimport { AfterContext } from '../after/after-context'\n\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { createLazyResult, type LazyResult } from '../lib/lazy-result'\nimport { getCacheHandlerEntries } from '../use-cache/handlers'\nimport { createSnapshot } from '../app-render/async-local-storage'\n\nexport type WorkStoreContext = {\n  /**\n   * The page that is being rendered. This relates to the path to the page file.\n   */\n  page: string\n\n  isPrefetchRequest?: boolean\n  nonce?: string\n  renderOpts: {\n    cacheLifeProfiles?: { [profile: string]: CacheLife }\n    incrementalCache?: IncrementalCache\n    isOnDemandRevalidate?: boolean\n    cacheComponents: boolean\n    fetchCache?: AppSegmentConfig['fetchCache']\n    isPossibleServerAction?: boolean\n    pendingWaitUntil?: Promise<any>\n    experimental: Pick<\n      RenderOpts['experimental'],\n      'isRoutePPREnabled' | 'authInterrupts'\n    >\n\n    /**\n     * Fetch metrics attached in patch-fetch.ts\n     **/\n    fetchMetrics?: FetchMetric[]\n\n    /**\n     * A hack around accessing the store value outside the context of the\n     * request.\n     *\n     * @internal\n     * @deprecated should only be used as a temporary workaround\n     */\n    // TODO: remove this when we resolve accessing the store outside the execution context\n    store?: WorkStore\n  } & Pick<\n    // Pull some properties from RenderOpts so that the docs are also\n    // mirrored.\n    RenderOpts,\n    | 'assetPrefix'\n    | 'supportsDynamicResponse'\n    | 'shouldWaitOnAllReady'\n    | 'isBuildTimePrerendering'\n    | 'isDraftMode'\n    | 'isDebugDynamicAccesses'\n  > &\n    RequestLifecycleOpts &\n    Partial<Pick<RenderOpts, 'reactLoadableManifest'>>\n\n  /**\n   * The build ID of the current build.\n   */\n  buildId: string\n\n  // Tags that were previously revalidated (e.g. by a redirecting server action)\n  // and have already been sent to cache handlers.\n  previouslyRevalidatedTags: string[]\n}\n\nexport function createWorkStore({\n  page,\n  renderOpts,\n  isPrefetchRequest,\n  buildId,\n  previouslyRevalidatedTags,\n  nonce,\n}: WorkStoreContext): WorkStore {\n  /**\n   * Rules of Static & Dynamic HTML:\n   *\n   *    1.) We must generate static HTML unless the caller explicitly opts\n   *        in to dynamic HTML support.\n   *\n   *    2.) If dynamic HTML support is requested, we must honor that request\n   *        or throw an error. It is the sole responsibility of the caller to\n   *        ensure they aren't e.g. requesting dynamic HTML for a static page.\n   *\n   *    3.) If the request is in draft mode, we must generate dynamic HTML.\n   *\n   *    4.) If the request is a server action, we must generate dynamic HTML.\n   *\n   * These rules help ensure that other existing features like request caching,\n   * coalescing, and ISR continue working as intended.\n   */\n  const isStaticGeneration =\n    !renderOpts.shouldWaitOnAllReady &&\n    !renderOpts.supportsDynamicResponse &&\n    !renderOpts.isDraftMode &&\n    !renderOpts.isPossibleServerAction\n\n  const shouldTrackFetchMetrics =\n    !!process.env.__NEXT_DEV_SERVER ||\n    // The only times we want to track fetch metrics outside of development is\n    // when we are performing a static generation and we either are in debug\n    // mode, or tracking fetch metrics was specifically opted into.\n    (isStaticGeneration &&\n      (!!process.env.NEXT_DEBUG_BUILD ||\n        process.env.NEXT_SSG_FETCH_METRICS === '1'))\n\n  const store: WorkStore = {\n    isStaticGeneration,\n    page,\n    route: normalizeAppPath(page),\n    incrementalCache:\n      // we fallback to a global incremental cache for edge-runtime locally\n      // so that it can access the fs cache without mocks\n      renderOpts.incrementalCache || (globalThis as any).__incrementalCache,\n    cacheLifeProfiles: renderOpts.cacheLifeProfiles,\n    isBuildTimePrerendering: renderOpts.isBuildTimePrerendering,\n    fetchCache: renderOpts.fetchCache,\n    isOnDemandRevalidate: renderOpts.isOnDemandRevalidate,\n\n    isDraftMode: renderOpts.isDraftMode,\n\n    isPrefetchRequest,\n    buildId,\n    reactLoadableManifest: renderOpts?.reactLoadableManifest || {},\n    assetPrefix: renderOpts?.assetPrefix || '',\n    nonce,\n\n    afterContext: createAfterContext(renderOpts),\n    cacheComponentsEnabled: renderOpts.cacheComponents,\n    previouslyRevalidatedTags,\n    refreshTagsByCacheKind: createRefreshTagsByCacheKind(),\n    runInCleanSnapshot: createSnapshot(),\n    shouldTrackFetchMetrics,\n    reactServerErrorsByDigest: new Map(),\n  }\n\n  // TODO: remove this when we resolve accessing the store outside the execution context\n  renderOpts.store = store\n\n  return store\n}\n\nfunction createAfterContext(renderOpts: RequestLifecycleOpts): AfterContext {\n  const { waitUntil, onClose, onAfterTaskError } = renderOpts\n  return new AfterContext({\n    waitUntil,\n    onClose,\n    onTaskError: onAfterTaskError,\n  })\n}\n\n/**\n * Creates a map with lazy results that refresh tags for the respective cache\n * kind when they're awaited for the first time.\n */\nfunction createRefreshTagsByCacheKind(): Map<string, LazyResult<void>> {\n  const refreshTagsByCacheKind = new Map<string, LazyResult<void>>()\n  const cacheHandlers = getCacheHandlerEntries()\n\n  if (cacheHandlers) {\n    for (const [kind, cacheHandler] of cacheHandlers) {\n      if ('refreshTags' in cacheHandler) {\n        refreshTagsByCacheKind.set(\n          kind,\n          createLazyResult(async () => cacheHandler.refreshTags())\n        )\n      }\n    }\n  }\n\n  return refreshTagsByCacheKind\n}\n","export type ValidationBoundaryTracking = {\n  expectedIds: Set<string>\n  renderedIds: Set<string>\n}\n\nexport function createValidationBoundaryTracking(): ValidationBoundaryTracking {\n  return {\n    expectedIds: new Set(),\n    renderedIds: new Set(),\n  }\n}\n","import { resolveRouteParamsFromTree } from '../../build/static-paths/utils'\nimport type { FallbackRouteParam } from '../../build/static-paths/types'\nimport type { DynamicParamTypesShort } from '../../shared/lib/app-router-types'\nimport { dynamicParamTypes } from '../app-render/get-short-dynamic-param-type'\nimport type AppPageRouteModule from '../route-modules/app-page/module'\nimport { parseAppRoute } from '../../shared/lib/router/routes/app'\nimport { extractPathnameRouteParamSegmentsFromLoaderTree } from '../../build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree'\n\nexport type OpaqueFallbackRouteParamValue = [\n  /**\n   * The search value of the fallback route param. This is the opaque key\n   * that will be used to replace the dynamic param in the postponed state.\n   */\n  searchValue: string,\n\n  /**\n   * The dynamic param type of the fallback route param. This is the type of\n   * the dynamic param that will be used to replace the dynamic param in the\n   * postponed state.\n   */\n  dynamicParamType: DynamicParamTypesShort,\n]\n\n/**\n * An opaque fallback route params object. This is used to store the fallback\n * route params in a way that is not easily accessible to the client.\n */\nexport type OpaqueFallbackRouteParams = ReadonlyMap<\n  string,\n  OpaqueFallbackRouteParamValue\n>\n\n/**\n * The entries of the opaque fallback route params object.\n *\n * @param key the key of the fallback route param\n * @param value the value of the fallback route param\n */\nexport type OpaqueFallbackRouteParamEntries =\n  ReturnType<OpaqueFallbackRouteParams['entries']> extends MapIterator<\n    [infer K, infer V]\n  >\n    ? ReadonlyArray<[K, V]>\n    : never\n\n/**\n * Creates an opaque fallback route params object from the fallback route params.\n *\n * @param fallbackRouteParams the fallback route params\n * @returns the opaque fallback route params\n */\nexport function createOpaqueFallbackRouteParams(\n  fallbackRouteParams: readonly FallbackRouteParam[]\n): OpaqueFallbackRouteParams | null {\n  // If there are no fallback route params, we can return early.\n  if (fallbackRouteParams.length === 0) return null\n\n  // As we're creating unique keys for each of the dynamic route params, we only\n  // need to generate a unique ID once per request because each of the keys will\n  // be also be unique.\n  const uniqueID = Math.random().toString(16).slice(2)\n\n  const keys = new Map<string, OpaqueFallbackRouteParamValue>()\n\n  // Generate a unique key for the fallback route param, if this key is found\n  // in the static output, it represents a bug in cache components.\n  for (const { paramName, paramType } of fallbackRouteParams) {\n    keys.set(paramName, [\n      `%%drp:${paramName}:${uniqueID}%%`,\n      dynamicParamTypes[paramType],\n    ])\n  }\n\n  return keys\n}\n\n/**\n * Gets the fallback route params for a given page. This is an expensive\n * operation because it requires parsing the loader tree to extract the fallback\n * route params.\n *\n * @param page the page\n * @param routeModule the route module\n * @returns the opaque fallback route params\n */\nexport function getFallbackRouteParams(\n  page: string,\n  routeModule: AppPageRouteModule\n) {\n  const route = parseAppRoute(page, true)\n\n  // Extract the pathname-contributing segments from the loader tree. This\n  // mirrors the logic in buildAppStaticPaths where we determine which segments\n  // actually contribute to the pathname.\n  const { pathnameRouteParamSegments, params } =\n    extractPathnameRouteParamSegmentsFromLoaderTree(\n      routeModule.userland.loaderTree,\n      route\n    )\n\n  // Create fallback route params for the pathname segments.\n  const fallbackRouteParams: FallbackRouteParam[] =\n    pathnameRouteParamSegments.map(({ paramName, paramType }) => ({\n      paramName,\n      paramType,\n    }))\n\n  // Resolve route params from the loader tree. This mutates the\n  // fallbackRouteParams array to add any route params that are\n  // unknown at request time.\n  //\n  // The page parameter contains placeholders like [slug], which helps\n  // resolveRouteParamsFromTree determine which params are unknown.\n  resolveRouteParamsFromTree(\n    routeModule.userland.loaderTree,\n    params, // Static params extracted from the page\n    route, // The page pattern with placeholders\n    fallbackRouteParams // Will be mutated to add route params\n  )\n\n  // Convert the fallback route params to an opaque format that can be safely\n  // used in the postponed state without exposing implementation details.\n  return createOpaqueFallbackRouteParams(fallbackRouteParams)\n}\n","import type { LoaderTree } from '../../../server/lib/app-dir-module'\nimport type { Params } from '../../../server/request/params'\nimport type { DynamicParamTypes } from '../../../shared/lib/app-router-types'\nimport {\n  parseAppRouteSegment,\n  type NormalizedAppRoute,\n  type NormalizedAppRouteSegment,\n} from '../../../shared/lib/router/routes/app'\nimport { parseLoaderTree } from '../../../shared/lib/router/utils/parse-loader-tree'\nimport { resolveParamValue } from '../../../shared/lib/router/utils/resolve-param-value'\n\n/**\n * Validates that the static segments in currentPath match the corresponding\n * segments in targetSegments. This ensures we only extract dynamic parameters\n * that are part of the target pathname structure.\n *\n * Segments are compared literally - interception markers like \"(.)photo\" are\n * part of the pathname and must match exactly.\n *\n * @example\n * // Matching paths\n * currentPath: ['blog', '(.)photo']\n * targetSegments: ['blog', '(.)photo', '[id]']\n * → Returns true (both static segments match exactly)\n *\n * @example\n * // Non-matching paths\n * currentPath: ['blog', '(.)photo']\n * targetSegments: ['blog', 'photo', '[id]']\n * → Returns false (segments don't match - marker is part of pathname)\n *\n * @param currentPath - The accumulated path segments from the loader tree\n * @param targetSegments - The target pathname split into segments\n * @returns true if all static segments match, false otherwise\n */\nfunction validatePrefixMatch(\n  currentPath: NormalizedAppRouteSegment[],\n  route: NormalizedAppRoute\n): boolean {\n  for (let i = 0; i < currentPath.length; i++) {\n    const pathSegment = currentPath[i]\n    const targetPathSegment = route.segments[i]\n\n    // Type mismatch - one is static, one is dynamic\n    if (pathSegment.type !== targetPathSegment.type) {\n      return false\n    }\n\n    // One has an interception marker, the other doesn't.\n    if (\n      pathSegment.interceptionMarker !== targetPathSegment.interceptionMarker\n    ) {\n      return false\n    }\n\n    // Both are static but names don't match\n    if (\n      pathSegment.type === 'static' &&\n      targetPathSegment.type === 'static' &&\n      pathSegment.name !== targetPathSegment.name\n    ) {\n      return false\n    }\n    // Both are dynamic but param names don't match\n    else if (\n      pathSegment.type === 'dynamic' &&\n      targetPathSegment.type === 'dynamic' &&\n      pathSegment.param.paramType !== targetPathSegment.param.paramType &&\n      pathSegment.param.paramName !== targetPathSegment.param.paramName\n    ) {\n      return false\n    }\n  }\n\n  return true\n}\n\n/**\n * Extracts pathname route param segments from a loader tree and resolves\n * parameter values from static segments in the route.\n *\n * @param loaderTree - The loader tree structure containing route hierarchy\n * @param route - The target route to match against\n * @returns Object containing pathname route param segments and resolved params\n */\nexport function extractPathnameRouteParamSegmentsFromLoaderTree(\n  loaderTree: LoaderTree,\n  route: NormalizedAppRoute\n): {\n  pathnameRouteParamSegments: Array<{\n    readonly name: string\n    readonly paramName: string\n    readonly paramType: DynamicParamTypes\n  }>\n  params: Params\n} {\n  const pathnameRouteParamSegments: Array<{\n    readonly name: string\n    readonly paramName: string\n    readonly paramType: DynamicParamTypes\n  }> = []\n  const params: Params = {}\n\n  // BFS traversal with depth and path tracking\n  const queue: Array<{\n    tree: LoaderTree\n    depth: number\n    currentPath: NormalizedAppRouteSegment[]\n  }> = [{ tree: loaderTree, depth: 0, currentPath: [] }]\n\n  while (queue.length > 0) {\n    const { tree, depth, currentPath } = queue.shift()!\n    const { segment, parallelRoutes } = parseLoaderTree(tree)\n\n    // Build the path for the current node\n    let updatedPath = currentPath\n    let nextDepth = depth\n\n    const appSegment = parseAppRouteSegment(segment)\n\n    // Only add to path if it's a real segment that appears in the URL\n    // Route groups and parallel markers don't contribute to URL pathname\n    if (\n      appSegment &&\n      appSegment.type !== 'route-group' &&\n      appSegment.type !== 'parallel-route'\n    ) {\n      updatedPath = [...currentPath, appSegment]\n      nextDepth = depth + 1\n    }\n\n    // Check if this segment has a param and matches the target pathname at this depth\n    if (appSegment?.type === 'dynamic') {\n      const { paramName, paramType } = appSegment.param\n\n      // Check if this segment is at the correct depth in the target pathname\n      // A segment matches if:\n      // 1. There's a dynamic segment at this depth in the pathname\n      // 2. The parameter names match (e.g., [id] matches [id], not [category])\n      // 3. The static segments leading up to this point match (prefix check)\n      if (depth < route.segments.length) {\n        const targetSegment = route.segments[depth]\n\n        // Match if the target pathname has a dynamic segment at this depth\n        if (targetSegment.type === 'dynamic') {\n          // Check that parameter names match exactly\n          // This prevents [category] from matching against /[id]\n          if (paramName !== targetSegment.param.paramName) {\n            continue // Different param names, skip this segment\n          }\n\n          // Validate that the path leading up to this dynamic segment matches\n          // the target pathname. This prevents false matches like extracting\n          // [slug] from \"/news/[slug]\" when the tree has \"/blog/[slug]\"\n          if (validatePrefixMatch(currentPath, route)) {\n            pathnameRouteParamSegments.push({\n              name: segment,\n              paramName,\n              paramType,\n            })\n          }\n        }\n      }\n\n      // Resolve parameter value if it's not already known.\n      if (!params.hasOwnProperty(paramName)) {\n        const paramValue = resolveParamValue(\n          paramName,\n          paramType,\n          depth,\n          route,\n          params\n        )\n\n        if (paramValue !== undefined) {\n          params[paramName] = paramValue\n        }\n      }\n    }\n\n    // Continue traversing all parallel routes to find matching segments\n    for (const parallelRoute of Object.values(parallelRoutes)) {\n      queue.push({\n        tree: parallelRoute,\n        depth: nextDepth,\n        currentPath: updatedPath,\n      })\n    }\n  }\n\n  return { pathnameRouteParamSegments, params }\n}\n","import type { LoaderTree } from '../../server/lib/app-dir-module'\nimport type { Params } from '../../server/request/params'\nimport type { AppPageRouteModule } from '../../server/route-modules/app-page/module.compiled'\nimport type { AppRouteRouteModule } from '../../server/route-modules/app-route/module.compiled'\nimport { isAppPageRouteModule } from '../../server/route-modules/checks'\nimport type { DynamicParamTypes } from '../../shared/lib/app-router-types'\nimport {\n  parseAppRouteSegment,\n  type NormalizedAppRoute,\n} from '../../shared/lib/router/routes/app'\nimport { parseLoaderTree } from '../../shared/lib/router/utils/parse-loader-tree'\nimport type { AppSegment } from '../segment-config/app/app-segments'\nimport { extractPathnameRouteParamSegmentsFromLoaderTree } from './app/extract-pathname-route-param-segments-from-loader-tree'\nimport { resolveParamValue } from '../../shared/lib/router/utils/resolve-param-value'\nimport type { FallbackRouteParam } from './types'\n\n/**\n * Encodes a parameter value using the provided encoder.\n *\n * @param value - The value to encode.\n * @param encoder - The encoder to use.\n * @returns The encoded value.\n */\nexport function encodeParam(\n  value: string | string[],\n  encoder: (value: string) => string\n) {\n  let replaceValue: string\n  if (Array.isArray(value)) {\n    replaceValue = value.map(encoder).join('/')\n  } else {\n    replaceValue = encoder(value)\n  }\n\n  return replaceValue\n}\n\n/**\n * Normalizes a pathname to a consistent format.\n *\n * @param pathname - The pathname to normalize.\n * @returns The normalized pathname.\n */\nexport function normalizePathname(pathname: string) {\n  return pathname.replace(/\\\\/g, '/').replace(/(?!^)\\/$/, '')\n}\n\n/**\n * Extracts segments that contribute to the pathname by traversing the loader tree\n * based on the route module type.\n *\n * @param routeModule - The app route module (page or route handler)\n * @param segments - Array of AppSegment objects collected from the route\n * @param page - The target pathname to match against, INCLUDING interception\n *               markers (e.g., \"/blog/[slug]\", \"/(.)photo/[id]\")\n * @returns Array of segments with param info that contribute to the pathname\n */\nexport function extractPathnameRouteParamSegments(\n  routeModule: AppRouteRouteModule | AppPageRouteModule,\n  segments: readonly Readonly<AppSegment>[],\n  route: NormalizedAppRoute\n): Array<{\n  readonly name: string\n  readonly paramName: string\n  readonly paramType: DynamicParamTypes\n}> {\n  // For AppPageRouteModule, use the loaderTree traversal approach\n  if (isAppPageRouteModule(routeModule)) {\n    const { pathnameRouteParamSegments } =\n      extractPathnameRouteParamSegmentsFromLoaderTree(\n        routeModule.userland.loaderTree,\n        route\n      )\n    return pathnameRouteParamSegments\n  }\n\n  return extractPathnameRouteParamSegmentsFromSegments(segments)\n}\n\nexport function extractPathnameRouteParamSegmentsFromSegments(\n  segments: readonly Readonly<AppSegment>[]\n): Array<{\n  readonly name: string\n  readonly paramName: string\n  readonly paramType: DynamicParamTypes\n}> {\n  // TODO: should we consider what values are already present in the page?\n\n  // For AppRouteRouteModule, filter the segments array to get the route params\n  // that contribute to the pathname.\n  const result: Array<{\n    readonly name: string\n    readonly paramName: string\n    readonly paramType: DynamicParamTypes\n  }> = []\n\n  for (const segment of segments) {\n    // Skip segments without param info.\n    if (!segment.paramName || !segment.paramType) continue\n\n    // Collect all the route param keys that contribute to the pathname.\n    result.push({\n      name: segment.name,\n      paramName: segment.paramName,\n      paramType: segment.paramType,\n    })\n  }\n\n  return result\n}\n\n/**\n * Resolves all route parameters from the loader tree. This function uses\n * tree-based traversal to correctly handle the hierarchical structure of routes\n * and accurately determine parameter values based on their depth in the tree.\n *\n * This processes both regular route parameters (from the main children route) and\n * parallel route parameters (from slots like @modal, @sidebar).\n *\n * Unlike interpolateParallelRouteParams (which has a complete URL at runtime),\n * this build-time function determines which route params are unknown.\n * The pathname may contain placeholders like [slug], making it incomplete.\n *\n * @param loaderTree - The loader tree structure containing route hierarchy\n * @param params - The current route parameters object (will be mutated)\n * @param route - The current route being processed\n * @param fallbackRouteParams - Array of fallback route parameters (will be mutated)\n */\nexport function resolveRouteParamsFromTree(\n  loaderTree: LoaderTree,\n  params: Params,\n  route: NormalizedAppRoute,\n  fallbackRouteParams: FallbackRouteParam[]\n): void {\n  // Stack-based traversal with depth tracking\n  const stack: Array<{\n    tree: LoaderTree\n    depth: number\n  }> = [{ tree: loaderTree, depth: 0 }]\n\n  while (stack.length > 0) {\n    const { tree, depth } = stack.pop()!\n    const { segment, parallelRoutes } = parseLoaderTree(tree)\n\n    const appSegment = parseAppRouteSegment(segment)\n\n    // If this segment is a route parameter, then we should process it if it's\n    // not already known and is not already marked as a fallback route param.\n    if (\n      appSegment?.type === 'dynamic' &&\n      !params.hasOwnProperty(appSegment.param.paramName) &&\n      !fallbackRouteParams.some(\n        (param) => param.paramName === appSegment.param.paramName\n      )\n    ) {\n      const { paramName, paramType } = appSegment.param\n\n      const paramValue = resolveParamValue(\n        paramName,\n        paramType,\n        depth,\n        route,\n        params\n      )\n\n      if (paramValue !== undefined) {\n        params[paramName] = paramValue\n      } else if (paramType !== 'optional-catchall') {\n        // If we couldn't resolve the param, mark it as a fallback\n        fallbackRouteParams.push({ paramName, paramType })\n      }\n    }\n\n    // Calculate next depth - increment if this is not a route group and not empty\n    let nextDepth = depth\n    if (\n      appSegment &&\n      appSegment.type !== 'route-group' &&\n      appSegment.type !== 'parallel-route'\n    ) {\n      nextDepth++\n    }\n\n    // Add all parallel routes to the stack for processing.\n    for (const parallelRoute of Object.values(parallelRoutes)) {\n      stack.push({ tree: parallelRoute, depth: nextDepth })\n    }\n  }\n}\n","import MODERN_BROWSERSLIST_TARGET from './modern-browserslist-target'\n\nexport { MODERN_BROWSERSLIST_TARGET }\n\nexport type ValueOf<T> = Required<T>[keyof T]\n\nexport const COMPILER_NAMES = {\n  client: 'client',\n  server: 'server',\n  edgeServer: 'edge-server',\n} as const\n\nexport type CompilerNameValues = ValueOf<typeof COMPILER_NAMES>\n\nexport const COMPILER_INDEXES: {\n  [compilerKey in CompilerNameValues]: number\n} = {\n  [COMPILER_NAMES.client]: 0,\n  [COMPILER_NAMES.server]: 1,\n  [COMPILER_NAMES.edgeServer]: 2,\n} as const\n\n// Re-export entry constants for backward compatibility\nexport {\n  UNDERSCORE_NOT_FOUND_ROUTE,\n  UNDERSCORE_NOT_FOUND_ROUTE_ENTRY,\n  UNDERSCORE_GLOBAL_ERROR_ROUTE,\n  UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY,\n} from './entry-constants'\n\nexport enum AdapterOutputType {\n  /**\n   * `PAGES` represents all the React pages that are under `pages/`.\n   */\n  PAGES = 'PAGES',\n\n  /**\n   * `PAGES_API` represents all the API routes under `pages/api/`.\n   */\n  PAGES_API = 'PAGES_API',\n  /**\n   * `APP_PAGE` represents all the React pages that are under `app/` with the\n   * filename of `page.{j,t}s{,x}`.\n   */\n  APP_PAGE = 'APP_PAGE',\n\n  /**\n   * `APP_ROUTE` represents all the API routes and metadata routes that are under `app/` with the\n   * filename of `route.{j,t}s{,x}`.\n   */\n  APP_ROUTE = 'APP_ROUTE',\n\n  /**\n   * `PRERENDER` represents an ISR enabled route that might\n   * have a seeded cache entry or fallback generated during build\n   */\n  PRERENDER = 'PRERENDER',\n\n  /**\n   * `STATIC_FILE` represents a static file (ie /_next/static)\n   */\n  STATIC_FILE = 'STATIC_FILE',\n\n  /**\n   * `MIDDLEWARE` represents the middleware output if present\n   */\n  MIDDLEWARE = 'MIDDLEWARE',\n}\n\nexport const PHASE_EXPORT = 'phase-export'\nexport const PHASE_ANALYZE = 'phase-analyze'\nexport const PHASE_PRODUCTION_BUILD = 'phase-production-build'\nexport const PHASE_PRODUCTION_SERVER = 'phase-production-server'\nexport const PHASE_DEVELOPMENT_SERVER = 'phase-development-server'\nexport const PHASE_TEST = 'phase-test'\nexport const PHASE_INFO = 'phase-info'\n\nexport type PHASE_TYPE =\n  | typeof PHASE_INFO\n  | typeof PHASE_TEST\n  | typeof PHASE_EXPORT\n  | typeof PHASE_ANALYZE\n  | typeof PHASE_PRODUCTION_BUILD\n  | typeof PHASE_PRODUCTION_SERVER\n  | typeof PHASE_DEVELOPMENT_SERVER\n\nexport const PAGES_MANIFEST = 'pages-manifest.json'\nexport const APP_PATHS_MANIFEST = 'app-paths-manifest.json'\nexport const APP_PATH_ROUTES_MANIFEST = 'app-path-routes-manifest.json'\nexport const BUILD_MANIFEST = 'build-manifest.json'\nexport const FUNCTIONS_CONFIG_MANIFEST = 'functions-config-manifest.json'\nexport const SUBRESOURCE_INTEGRITY_MANIFEST = 'subresource-integrity-manifest'\nexport const NEXT_FONT_MANIFEST = 'next-font-manifest'\nexport const EXPORT_MARKER = 'export-marker.json'\nexport const EXPORT_DETAIL = 'export-detail.json'\nexport const PRERENDER_MANIFEST = 'prerender-manifest.json'\nexport const PREFETCH_HINTS = 'prefetch-hints.json'\nexport const ROUTES_MANIFEST = 'routes-manifest.json'\nexport const IMAGES_MANIFEST = 'images-manifest.json'\nexport const SERVER_FILES_MANIFEST = 'required-server-files'\nexport const DEV_CLIENT_PAGES_MANIFEST = '_devPagesManifest.json'\nexport const MIDDLEWARE_MANIFEST = 'middleware-manifest.json'\nexport const TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST =\n  '_clientMiddlewareManifest.js'\nexport const TURBOPACK_CLIENT_BUILD_MANIFEST = 'client-build-manifest.json'\nexport const DEV_CLIENT_MIDDLEWARE_MANIFEST = '_devMiddlewareManifest.json'\nexport const REACT_LOADABLE_MANIFEST = 'react-loadable-manifest.json'\nexport const SERVER_DIRECTORY = 'server'\nexport const CONFIG_FILES = [\n  'next.config.js',\n  'next.config.mjs',\n  'next.config.ts',\n  // process.features can be undefined on Edge runtime\n  // TODO: Remove `as any` once we bump @types/node to v22.10.0+\n  ...((process?.features as any)?.typescript ? ['next.config.mts'] : []),\n]\nexport const BUILD_ID_FILE = 'BUILD_ID'\nexport const BLOCKED_PAGES = ['/_document', '/_app', '/_error']\nexport const CLIENT_PUBLIC_FILES_PATH = 'public'\nexport const CLIENT_STATIC_FILES_PATH = 'static'\nexport const STRING_LITERAL_DROP_BUNDLE = '__NEXT_DROP_CLIENT_FILE__'\nexport const NEXT_BUILTIN_DOCUMENT = '__NEXT_BUILTIN_DOCUMENT__'\nexport const BARREL_OPTIMIZATION_PREFIX = '__barrel_optimize__'\n\n// server/[entry]/page_client-reference-manifest.js\nexport const CLIENT_REFERENCE_MANIFEST = 'client-reference-manifest'\n// server/server-reference-manifest\nexport const SERVER_REFERENCE_MANIFEST = 'server-reference-manifest'\n// server/middleware-build-manifest.js\nexport const MIDDLEWARE_BUILD_MANIFEST = 'middleware-build-manifest'\n// server/middleware-react-loadable-manifest.js\nexport const MIDDLEWARE_REACT_LOADABLE_MANIFEST =\n  'middleware-react-loadable-manifest'\n// server/interception-route-rewrite-manifest.js\nexport const INTERCEPTION_ROUTE_REWRITE_MANIFEST =\n  'interception-route-rewrite-manifest'\n// server/dynamic-css-manifest.js\nexport const DYNAMIC_CSS_MANIFEST = 'dynamic-css-manifest'\n\n// static/runtime/main.js\nexport const CLIENT_STATIC_FILES_RUNTIME_MAIN = `main`\nexport const CLIENT_STATIC_FILES_RUNTIME_MAIN_APP = `${CLIENT_STATIC_FILES_RUNTIME_MAIN}-app`\n// next internal client components chunk for layouts\nexport const APP_CLIENT_INTERNALS = 'app-pages-internals'\n// static/runtime/react-refresh.js\nexport const CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH = `react-refresh`\n// static/runtime/webpack.js\nexport const CLIENT_STATIC_FILES_RUNTIME_WEBPACK = `webpack`\n// static/runtime/polyfills.js\nexport const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS = 'polyfills'\nexport const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL = Symbol(\n  CLIENT_STATIC_FILES_RUNTIME_POLYFILLS\n)\nexport const DEFAULT_RUNTIME_WEBPACK = 'webpack-runtime'\nexport const EDGE_RUNTIME_WEBPACK = 'edge-runtime-webpack'\nexport const STATIC_PROPS_ID = '__N_SSG'\nexport const SERVER_PROPS_ID = '__N_SSP'\nexport const DEFAULT_SERIF_FONT = {\n  name: 'Times New Roman',\n  xAvgCharWidth: 821,\n  azAvgWidth: 854.3953488372093,\n  unitsPerEm: 2048,\n}\nexport const DEFAULT_SANS_SERIF_FONT = {\n  name: 'Arial',\n  xAvgCharWidth: 904,\n  azAvgWidth: 934.5116279069767,\n  unitsPerEm: 2048,\n}\nexport const STATIC_STATUS_PAGES = ['/500']\nexport const TRACE_OUTPUT_VERSION = 1\n// in `MB`\nexport const TURBO_TRACE_DEFAULT_MEMORY_LIMIT = 6000\n\nexport const RSC_MODULE_TYPES = {\n  client: 'client',\n  server: 'server',\n} as const\n\n// comparing\n// https://nextjs.org/docs/api-reference/edge-runtime\n// with\n// https://nodejs.org/docs/latest/api/globals.html\nexport const EDGE_UNSUPPORTED_NODE_APIS = [\n  'clearImmediate',\n  'setImmediate',\n  'BroadcastChannel',\n  'ByteLengthQueuingStrategy',\n  'CompressionStream',\n  'CountQueuingStrategy',\n  'DecompressionStream',\n  'DomException',\n  'MessageChannel',\n  'MessageEvent',\n  'MessagePort',\n  'ReadableByteStreamController',\n  'ReadableStreamBYOBRequest',\n  'ReadableStreamDefaultController',\n  'TransformStreamDefaultController',\n  'WritableStreamDefaultController',\n]\n\nexport const SYSTEM_ENTRYPOINTS = new Set<string>([\n  CLIENT_STATIC_FILES_RUNTIME_MAIN,\n  CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH,\n  CLIENT_STATIC_FILES_RUNTIME_MAIN_APP,\n])\n","import {\n  extractInterceptionRouteInformation,\n  isInterceptionRouteAppPath,\n} from './interception-routes'\n\n// Identify /.*[param].*/ in route string\nconst TEST_ROUTE = /\\/[^/]*\\[[^/]+\\][^/]*(?=\\/|$)/\n\n// Identify /[param]/ in route string\nconst TEST_STRICT_ROUTE = /\\/\\[[^/]+\\](?=\\/|$)/\n\n/**\n * Check if a route is dynamic.\n *\n * @param route - The route to check.\n * @param strict - Whether to use strict mode which prohibits segments with prefixes/suffixes (default: true).\n * @returns Whether the route is dynamic.\n */\nexport function isDynamicRoute(route: string, strict: boolean = true): boolean {\n  if (isInterceptionRouteAppPath(route)) {\n    route = extractInterceptionRouteInformation(route).interceptedRoute\n  }\n\n  if (strict) {\n    return TEST_STRICT_ROUTE.test(route)\n  }\n\n  return TEST_ROUTE.test(route)\n}\n","import { pathHasPrefix } from '../router/utils/path-has-prefix'\n\n/**\n * strip _next/data/<build-id>/ prefix and .json suffix\n */\nexport function normalizeDataPath(pathname: string) {\n  if (!pathHasPrefix(pathname || '/', '/_next/data')) {\n    return pathname\n  }\n  pathname = pathname\n    .replace(/\\/_next\\/data\\/[^/]{1,}/, '')\n    .replace(/\\.json$/, '')\n\n  if (pathname === '/index') {\n    return '/'\n  }\n  return pathname\n}\n","import { ensureLeadingSlash } from './ensure-leading-slash'\nimport { isDynamicRoute } from '../router/utils'\nimport { NormalizeError } from '../utils'\n\n/**\n * Takes a page and transforms it into its file counterpart ensuring that the\n * output is normalized. Note this function is not idempotent because a page\n * `/index` can be referencing `/index/index.js` and `/index/index` could be\n * referencing `/index/index/index.js`. Examples:\n *  - `/` -> `/index`\n *  - `/index/foo` -> `/index/index/foo`\n *  - `/index` -> `/index/index`\n */\nexport function normalizePagePath(page: string): string {\n  const normalized =\n    /^\\/index(\\/|$)/.test(page) && !isDynamicRoute(page)\n      ? `/index${page}`\n      : page === '/'\n        ? '/index'\n        : ensureLeadingSlash(page)\n\n  if (process.env.NEXT_RUNTIME !== 'edge') {\n    const { posix } = require('path') as typeof import('path')\n    const resolvedPage = posix.normalize(normalized)\n    if (resolvedPage !== normalized) {\n      throw new NormalizeError(\n        `Requested and resolved page mismatch: ${normalized} ${resolvedPage}`\n      )\n    }\n  }\n\n  return normalized\n}\n","import type { PageExtensions } from '../../build/page-extensions-type'\nimport { normalizePathSep } from '../../shared/lib/page-path/normalize-path-sep'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport { isAppRouteRoute } from '../is-app-route-route'\n\nexport const STATIC_METADATA_IMAGES = {\n  icon: {\n    filename: 'icon',\n    extensions: ['ico', 'jpg', 'jpeg', 'png', 'svg'],\n  },\n  apple: {\n    filename: 'apple-icon',\n    extensions: ['jpg', 'jpeg', 'png'],\n  },\n  favicon: {\n    filename: 'favicon',\n    extensions: ['ico'],\n  },\n  openGraph: {\n    filename: 'opengraph-image',\n    extensions: ['jpg', 'jpeg', 'png', 'gif'],\n  },\n  twitter: {\n    filename: 'twitter-image',\n    extensions: ['jpg', 'jpeg', 'png', 'gif'],\n  },\n} as const\n\n// Match routes that are metadata routes, e.g. /sitemap.xml, /favicon.<ext>, /<icon>.<ext>, etc.\n// TODO-METADATA: support more metadata routes with more extensions\nexport const DEFAULT_METADATA_ROUTE_EXTENSIONS = ['js', 'jsx', 'ts', 'tsx']\n\n// Match the file extension with the dynamic multi-routes extensions\n// e.g. ([xml, js], null) -> can match `/sitemap.xml/route`, `sitemap.js/route`\n// e.g. ([png], [ts]) -> can match `/opengraph-image.png`, `/opengraph-image.ts`\nexport const getExtensionRegexString = (\n  staticExtensions: readonly string[],\n  dynamicExtensions: readonly string[] | null\n) => {\n  let result: string\n  // If there's no possible multi dynamic routes, will not match any <name>[].<ext> files\n  if (!dynamicExtensions || dynamicExtensions.length === 0) {\n    result = `(\\\\.(?:${staticExtensions.join('|')}))`\n  } else {\n    result = `(?:\\\\.(${staticExtensions.join('|')})|(\\\\.(${dynamicExtensions.join('|')})))`\n  }\n  return result\n}\n\n/**\n * Matches the static metadata files, e.g. /robots.txt, /sitemap.xml, /favicon.ico, etc.\n * @param appDirRelativePath the relative file path to app/\n * @returns if the path is a static metadata file route\n */\nexport function isStaticMetadataFile(appDirRelativePath: string) {\n  return isMetadataRouteFile(appDirRelativePath, [], true)\n}\n\n// Pre-compiled static regexes for common cases\nconst FAVICON_REGEX = /^[\\\\/]favicon\\.ico$/\nconst ROBOTS_TXT_REGEX = /^[\\\\/]robots\\.txt$/\nconst MANIFEST_JSON_REGEX = /^[\\\\/]manifest\\.json$/\nconst MANIFEST_WEBMANIFEST_REGEX = /^[\\\\/]manifest\\.webmanifest$/\nconst SITEMAP_XML_REGEX = /[\\\\/]sitemap\\.xml$/\n\n// Cache for compiled regex patterns based on parameters\nconst compiledRegexCache = new Map<string, RegExp[]>()\n\n// Fast path checks for common metadata files\nfunction fastPathCheck(normalizedPath: string): boolean | null {\n  // Check favicon.ico first (most common)\n  if (FAVICON_REGEX.test(normalizedPath)) return true\n\n  // Check other common static files\n  if (ROBOTS_TXT_REGEX.test(normalizedPath)) return true\n  if (MANIFEST_JSON_REGEX.test(normalizedPath)) return true\n  if (MANIFEST_WEBMANIFEST_REGEX.test(normalizedPath)) return true\n  if (SITEMAP_XML_REGEX.test(normalizedPath)) return true\n\n  // Quick negative check - if it doesn't contain any metadata keywords, skip\n  if (\n    !normalizedPath.includes('robots') &&\n    !normalizedPath.includes('manifest') &&\n    !normalizedPath.includes('sitemap') &&\n    !normalizedPath.includes('icon') &&\n    !normalizedPath.includes('apple-icon') &&\n    !normalizedPath.includes('opengraph-image') &&\n    !normalizedPath.includes('twitter-image') &&\n    !normalizedPath.includes('favicon')\n  ) {\n    return false\n  }\n\n  return null // Continue with full regex matching\n}\n\nfunction getCompiledRegexes(\n  pageExtensions: PageExtensions,\n  strictlyMatchExtensions: boolean\n): RegExp[] {\n  // Create cache key\n  const cacheKey = `${pageExtensions.join(',')}|${strictlyMatchExtensions}`\n\n  const cached = compiledRegexCache.get(cacheKey)\n  if (cached) {\n    return cached\n  }\n\n  // Pre-compute common strings\n  const trailingMatcher = strictlyMatchExtensions ? '$' : '?$'\n  const variantsMatcher = '\\\\d?'\n  const groupSuffix = strictlyMatchExtensions ? '' : '(-\\\\w{6})?'\n  const suffixMatcher = variantsMatcher + groupSuffix\n\n  // Pre-compute extension arrays to avoid repeated concatenation\n  const robotsExts =\n    pageExtensions.length > 0 ? [...pageExtensions, 'txt'] : ['txt']\n  const manifestExts =\n    pageExtensions.length > 0\n      ? [...pageExtensions, 'webmanifest', 'json']\n      : ['webmanifest', 'json']\n\n  const regexes = [\n    new RegExp(\n      `^[\\\\\\\\/]robots${getExtensionRegexString(robotsExts, null)}${trailingMatcher}`\n    ),\n    new RegExp(\n      `^[\\\\\\\\/]manifest${getExtensionRegexString(manifestExts, null)}${trailingMatcher}`\n    ),\n    // FAVICON_REGEX removed - already handled in fastPathCheck\n    new RegExp(\n      `[\\\\\\\\/]sitemap${getExtensionRegexString(['xml'], pageExtensions)}${trailingMatcher}`\n    ),\n    new RegExp(\n      `[\\\\\\\\/]icon${suffixMatcher}${getExtensionRegexString(\n        STATIC_METADATA_IMAGES.icon.extensions,\n        pageExtensions\n      )}${trailingMatcher}`\n    ),\n    new RegExp(\n      `[\\\\\\\\/]apple-icon${suffixMatcher}${getExtensionRegexString(\n        STATIC_METADATA_IMAGES.apple.extensions,\n        pageExtensions\n      )}${trailingMatcher}`\n    ),\n    new RegExp(\n      `[\\\\\\\\/]opengraph-image${suffixMatcher}${getExtensionRegexString(\n        STATIC_METADATA_IMAGES.openGraph.extensions,\n        pageExtensions\n      )}${trailingMatcher}`\n    ),\n    new RegExp(\n      `[\\\\\\\\/]twitter-image${suffixMatcher}${getExtensionRegexString(\n        STATIC_METADATA_IMAGES.twitter.extensions,\n        pageExtensions\n      )}${trailingMatcher}`\n    ),\n  ]\n\n  compiledRegexCache.set(cacheKey, regexes)\n  return regexes\n}\n\n/**\n * Determine if the file is a metadata route file entry\n * @param appDirRelativePath the relative file path to app/\n * @param pageExtensions the js extensions, such as ['js', 'jsx', 'ts', 'tsx']\n * @param strictlyMatchExtensions if it's true, match the file with page extension, otherwise match the file with default corresponding extension\n * @returns if the file is a metadata route file\n */\nexport function isMetadataRouteFile(\n  appDirRelativePath: string,\n  pageExtensions: PageExtensions,\n  strictlyMatchExtensions: boolean\n): boolean {\n  // Early exit for empty or obviously non-metadata paths\n  if (!appDirRelativePath || appDirRelativePath.length < 2) {\n    return false\n  }\n\n  const normalizedPath = normalizePathSep(appDirRelativePath)\n\n  // Fast path check for common cases\n  const fastResult = fastPathCheck(normalizedPath)\n  if (fastResult !== null) {\n    return fastResult\n  }\n\n  // Get compiled regexes from cache\n  const regexes = getCompiledRegexes(pageExtensions, strictlyMatchExtensions)\n\n  // Use for loop instead of .some() for better performance\n  for (let i = 0; i < regexes.length; i++) {\n    if (regexes[i].test(normalizedPath)) {\n      return true\n    }\n  }\n\n  return false\n}\n\n// Check if the route is a static metadata route, with /route suffix\n// e.g. /favicon.ico/route, /icon.png/route, etc.\n// But skip the text routes like robots.txt since they might also be dynamic.\n// Checking route path is not enough to determine if text routes is dynamic.\nexport function isStaticMetadataRoute(route: string) {\n  // extract ext with regex\n  const pathname = route.replace(/\\/route$/, '')\n\n  const matched =\n    isAppRouteRoute(route) &&\n    isMetadataRouteFile(pathname, [], true) &&\n    // These routes can either be built by static or dynamic entrypoints,\n    // so we assume they're dynamic\n    pathname !== '/robots.txt' &&\n    pathname !== '/manifest.webmanifest' &&\n    !pathname.endsWith('/sitemap.xml')\n\n  return matched\n}\n\n/**\n * Determine if a page or pathname is a metadata page.\n *\n * The input is a page or pathname, which can be with or without page suffix /foo/page or /foo.\n * But it will not contain the /route suffix.\n *\n * .e.g\n * /robots -> true\n * /sitemap -> true\n * /foo -> false\n */\nexport function isMetadataPage(page: string) {\n  const matched = !isAppRouteRoute(page) && isMetadataRouteFile(page, [], false)\n\n  return matched\n}\n\n/*\n * Determine if a Next.js route is a metadata route.\n * `route` will has a route suffix.\n *\n * e.g.\n * /app/robots/route -> true\n * /robots/route -> true\n * /sitemap/[__metadata_id__]/route -> true\n * /app/sitemap/page -> false\n * /icon-a102f4/route -> true\n */\nexport function isMetadataRoute(route: string): boolean {\n  let page = normalizeAppPath(route)\n    .replace(/^\\/?app\\//, '')\n    // Remove the dynamic route id\n    .replace('/[__metadata_id__]', '')\n    // Remove the /route suffix\n    .replace(/\\/route$/, '')\n\n  if (page[0] !== '/') page = '/' + page\n\n  const matched = isAppRouteRoute(route) && isMetadataRouteFile(page, [], false)\n\n  return matched\n}\n","import path from '../shared/lib/isomorphic/path'\nimport type { CacheFs } from '../shared/lib/utils'\n\n/**\n * A task to be written.\n */\ntype Task = [\n  /**\n   * The directory to create.\n   */\n  directory: string,\n\n  /**\n   * The promise to create the directory.\n   */\n  mkdir: Promise<unknown>,\n\n  /**\n   * The promises to write the files that are dependent on the directory being\n   * created.\n   */\n  writeFile: Promise<unknown>[],\n]\n/**\n * MultiFileWriter is a utility for writing multiple files in parallel that\n * guarantees that all files will be written after their containing directory\n * is created, and that the directory will only be created once.\n */\nexport class MultiFileWriter {\n  /**\n   * The tasks to be written.\n   */\n  private readonly tasks: Task[] = []\n\n  constructor(\n    /**\n     * The file system methods to use.\n     */\n    private readonly fs: Pick<CacheFs, 'mkdir' | 'writeFile'>\n  ) {}\n\n  /**\n   * Finds or creates a task for a directory.\n   *\n   * @param directory - The directory to find or create a task for.\n   * @returns The task for the directory.\n   */\n  private findOrCreateTask(directory: string): Task {\n    // See if this directory already has a task to create it.\n    for (const task of this.tasks) {\n      if (task[0] === directory) {\n        return task\n      }\n    }\n\n    const promise = this.fs.mkdir(directory)\n\n    // Attach a catch handler so that it doesn't throw an unhandled promise\n    // rejection warning.\n    promise.catch(() => {})\n\n    // Otherwise, create a new task for this directory.\n    const task: Task = [directory, promise, []]\n    this.tasks.push(task)\n\n    return task\n  }\n\n  /**\n   * Appends a file to the writer to be written after its containing directory\n   * is created. The file writer should be awaited after all the files have been\n   * appended. Any async operation that occurs between appending and awaiting\n   * may cause an unhandled promise rejection warning and potentially crash the\n   * process.\n   *\n   * @param filePath - The path to the file to write.\n   * @param data - The data to write to the file.\n   */\n  public append(filePath: string, data: Buffer | string): void {\n    // Find or create a task for the directory that contains the file.\n    const task = this.findOrCreateTask(path.dirname(filePath))\n\n    const promise = task[1].then(() => this.fs.writeFile(filePath, data))\n\n    // Attach a catch handler so that it doesn't throw an unhandled promise\n    // rejection warning.\n    promise.catch(() => {})\n\n    // Add the file write to the task AFTER the directory promise has resolved.\n    task[2].push(promise)\n  }\n\n  /**\n   * Returns a promise that resolves when all the files have been written.\n   */\n  public wait(): Promise<unknown> {\n    return Promise.all(this.tasks.flatMap((task) => task[2]))\n  }\n}\n","import type { RouteMetadata } from '../../../export/routes/types'\nimport type { CacheHandler, CacheHandlerContext, CacheHandlerValue } from '.'\nimport type { CacheFs } from '../../../shared/lib/utils'\nimport type { TagManifestEntry } from './tags-manifest.external'\nimport {\n  CachedRouteKind,\n  IncrementalCacheKind,\n  type CachedFetchValue,\n  type IncrementalCacheValue,\n  type SetIncrementalFetchCacheContext,\n  type SetIncrementalResponseCacheContext,\n} from '../../response-cache'\n\nimport type { LRUCache } from '../lru-cache'\nimport path from '../../../shared/lib/isomorphic/path'\nimport {\n  NEXT_CACHE_TAGS_HEADER,\n  NEXT_DATA_SUFFIX,\n  NEXT_META_SUFFIX,\n  RSC_SEGMENT_SUFFIX,\n  RSC_SEGMENTS_DIR_SUFFIX,\n  RSC_SUFFIX,\n} from '../../../lib/constants'\nimport { areTagsExpired, tagsManifest } from './tags-manifest.external'\nimport { MultiFileWriter } from '../../../lib/multi-file-writer'\nimport { getMemoryCache } from './memory-cache.external'\n\ntype FileSystemCacheContext = Omit<\n  CacheHandlerContext,\n  'fs' | 'serverDistDir'\n> & {\n  fs: CacheFs\n  serverDistDir: string\n}\n\nexport default class FileSystemCache implements CacheHandler {\n  private fs: FileSystemCacheContext['fs']\n  private flushToDisk?: FileSystemCacheContext['flushToDisk']\n  private serverDistDir: FileSystemCacheContext['serverDistDir']\n  private revalidatedTags: string[]\n  private static debug: boolean = !!process.env.NEXT_PRIVATE_DEBUG_CACHE\n  private static memoryCache: LRUCache<CacheHandlerValue> | undefined\n\n  constructor(ctx: FileSystemCacheContext) {\n    this.fs = ctx.fs\n    this.flushToDisk = ctx.flushToDisk\n    this.serverDistDir = ctx.serverDistDir\n    this.revalidatedTags = ctx.revalidatedTags\n\n    if (ctx.maxMemoryCacheSize) {\n      if (!FileSystemCache.memoryCache) {\n        if (FileSystemCache.debug) {\n          console.log('FileSystemCache: using memory store for fetch cache')\n        }\n\n        FileSystemCache.memoryCache = getMemoryCache(ctx.maxMemoryCacheSize)\n      } else if (FileSystemCache.debug) {\n        console.log('FileSystemCache: memory store already initialized')\n      }\n    } else if (FileSystemCache.debug) {\n      console.log('FileSystemCache: not using memory store for fetch cache')\n    }\n  }\n\n  public resetRequestCache(): void {}\n\n  public async revalidateTag(\n    tags: string | string[],\n    durations?: { expire?: number }\n  ) {\n    tags = typeof tags === 'string' ? [tags] : tags\n\n    if (FileSystemCache.debug) {\n      console.log('FileSystemCache: revalidateTag', tags, durations)\n    }\n\n    if (tags.length === 0) {\n      return\n    }\n\n    const now = Date.now()\n\n    for (const tag of tags) {\n      const existingEntry = tagsManifest.get(tag) || {}\n\n      if (durations) {\n        // Use provided durations directly\n        const updates: TagManifestEntry = { ...existingEntry }\n\n        // mark as stale immediately\n        updates.stale = now\n\n        if (durations.expire !== undefined) {\n          updates.expired = now + durations.expire * 1000 // Convert seconds to ms\n        }\n\n        tagsManifest.set(tag, updates)\n      } else {\n        // Update expired field for immediate expiration (default behavior when no durations provided)\n        tagsManifest.set(tag, { ...existingEntry, expired: now })\n      }\n    }\n  }\n\n  public async get(...args: Parameters<CacheHandler['get']>) {\n    const [key, ctx] = args\n    const { kind } = ctx\n\n    let data = FileSystemCache.memoryCache?.get(key)\n\n    if (FileSystemCache.debug) {\n      if (kind === IncrementalCacheKind.FETCH) {\n        console.log('FileSystemCache: get', key, ctx.tags, kind, !!data)\n      } else {\n        console.log('FileSystemCache: get', key, kind, !!data)\n      }\n    }\n\n    // let's check the disk for seed data\n    if (!data && process.env.NEXT_RUNTIME !== 'edge') {\n      try {\n        if (kind === IncrementalCacheKind.APP_ROUTE) {\n          const filePath = this.getFilePath(\n            `${key}.body`,\n            IncrementalCacheKind.APP_ROUTE\n          )\n          const fileData = await this.fs.readFile(filePath)\n          const { mtime } = await this.fs.stat(filePath)\n\n          const meta = JSON.parse(\n            await this.fs.readFile(\n              filePath.replace(/\\.body$/, NEXT_META_SUFFIX),\n              'utf8'\n            )\n          )\n\n          data = {\n            lastModified: mtime.getTime(),\n            value: {\n              kind: CachedRouteKind.APP_ROUTE,\n              body: fileData,\n              headers: meta.headers,\n              status: meta.status,\n            },\n          }\n        } else {\n          const filePath = this.getFilePath(\n            kind === IncrementalCacheKind.FETCH ? key : `${key}.html`,\n            kind\n          )\n\n          const fileData = await this.fs.readFile(filePath, 'utf8')\n          const { mtime } = await this.fs.stat(filePath)\n\n          if (kind === IncrementalCacheKind.FETCH) {\n            const { tags, fetchIdx, fetchUrl } = ctx\n\n            if (!this.flushToDisk) return null\n\n            const lastModified = mtime.getTime()\n            const parsedData: CachedFetchValue = JSON.parse(fileData)\n            data = {\n              lastModified,\n              value: parsedData,\n            }\n\n            if (data.value?.kind === CachedRouteKind.FETCH) {\n              const storedTags = data.value?.tags\n\n              // update stored tags if a new one is being added\n              // TODO: remove this when we can send the tags\n              // via header on GET same as SET\n              if (!tags?.every((tag) => storedTags?.includes(tag))) {\n                if (FileSystemCache.debug) {\n                  console.log(\n                    'FileSystemCache: tags vs storedTags mismatch',\n                    tags,\n                    storedTags\n                  )\n                }\n                await this.set(key, data.value, {\n                  fetchCache: true,\n                  tags,\n                  fetchIdx,\n                  fetchUrl,\n                })\n              }\n            }\n          } else if (kind === IncrementalCacheKind.APP_PAGE) {\n            // We try to load the metadata file, but if it fails, we don't\n            // error. We also don't load it if this is a fallback.\n            let meta: RouteMetadata | undefined\n            try {\n              meta = JSON.parse(\n                await this.fs.readFile(\n                  filePath.replace(/\\.html$/, NEXT_META_SUFFIX),\n                  'utf8'\n                )\n              )\n            } catch {}\n\n            let maybeSegmentData: Map<string, Buffer> | undefined\n            if (meta?.segmentPaths) {\n              // Collect all the segment data for this page.\n              // TODO: To optimize file system reads, we should consider creating\n              // separate cache entries for each segment, rather than storing them\n              // all on the page's entry. Though the behavior is\n              // identical regardless.\n              const segmentData: Map<string, Buffer> = new Map()\n              maybeSegmentData = segmentData\n              const segmentsDir = key + RSC_SEGMENTS_DIR_SUFFIX\n              await Promise.all(\n                meta.segmentPaths.map(async (segmentPath: string) => {\n                  const segmentDataFilePath = this.getFilePath(\n                    segmentsDir + segmentPath + RSC_SEGMENT_SUFFIX,\n                    IncrementalCacheKind.APP_PAGE\n                  )\n                  try {\n                    segmentData.set(\n                      segmentPath,\n                      await this.fs.readFile(segmentDataFilePath)\n                    )\n                  } catch {\n                    // This shouldn't happen, but if for some reason we fail to\n                    // load a segment from the filesystem, treat it the same as if\n                    // the segment is dynamic and does not have a prefetch.\n                  }\n                })\n              )\n            }\n\n            let rscData: Buffer | undefined\n            if (\n              !ctx.isFallback &&\n              (!ctx.isRoutePPREnabled || meta?.postponed == null)\n            ) {\n              rscData = await this.fs.readFile(\n                this.getFilePath(\n                  `${key}${RSC_SUFFIX}`,\n                  IncrementalCacheKind.APP_PAGE\n                )\n              )\n            }\n\n            data = {\n              lastModified: mtime.getTime(),\n              value: {\n                kind: CachedRouteKind.APP_PAGE,\n                html: fileData,\n                rscData,\n                postponed: meta?.postponed,\n                headers: meta?.headers,\n                status: meta?.status,\n                segmentData: maybeSegmentData,\n              },\n            }\n          } else if (kind === IncrementalCacheKind.PAGES) {\n            let meta: RouteMetadata | undefined\n            let pageData: string | object = {}\n\n            if (!ctx.isFallback) {\n              pageData = JSON.parse(\n                await this.fs.readFile(\n                  this.getFilePath(\n                    `${key}${NEXT_DATA_SUFFIX}`,\n                    IncrementalCacheKind.PAGES\n                  ),\n                  'utf8'\n                )\n              )\n            }\n\n            data = {\n              lastModified: mtime.getTime(),\n              value: {\n                kind: CachedRouteKind.PAGES,\n                html: fileData,\n                pageData,\n                headers: meta?.headers,\n                status: meta?.status,\n              },\n            }\n          } else {\n            throw new Error(\n              `Invariant: Unexpected route kind ${kind} in file system cache.`\n            )\n          }\n        }\n\n        if (data) {\n          FileSystemCache.memoryCache?.set(key, data)\n        }\n      } catch {\n        return null\n      }\n    }\n\n    if (\n      data?.value?.kind === CachedRouteKind.APP_PAGE ||\n      data?.value?.kind === CachedRouteKind.APP_ROUTE ||\n      data?.value?.kind === CachedRouteKind.PAGES\n    ) {\n      const tagsHeader = data.value.headers?.[NEXT_CACHE_TAGS_HEADER]\n      if (typeof tagsHeader === 'string') {\n        const cacheTags = tagsHeader.split(',')\n\n        // we trigger a blocking validation if an ISR page\n        // had a tag revalidated, if we want to be a background\n        // revalidation instead we return data.lastModified = -1\n        if (\n          cacheTags.length > 0 &&\n          areTagsExpired(cacheTags, data.lastModified)\n        ) {\n          if (FileSystemCache.debug) {\n            console.log('FileSystemCache: expired tags', cacheTags)\n          }\n\n          return null\n        }\n      }\n    } else if (data?.value?.kind === CachedRouteKind.FETCH) {\n      const combinedTags =\n        ctx.kind === IncrementalCacheKind.FETCH\n          ? [...(ctx.tags || []), ...(ctx.softTags || [])]\n          : []\n\n      // When revalidate tag is called we don't return stale data so it's\n      // updated right away.\n      if (combinedTags.some((tag) => this.revalidatedTags.includes(tag))) {\n        if (FileSystemCache.debug) {\n          console.log('FileSystemCache: was revalidated', combinedTags)\n        }\n\n        return null\n      }\n\n      if (areTagsExpired(combinedTags, data.lastModified)) {\n        if (FileSystemCache.debug) {\n          console.log('FileSystemCache: expired tags', combinedTags)\n        }\n\n        return null\n      }\n    }\n\n    return data ?? null\n  }\n\n  public async set(\n    key: string,\n    data: IncrementalCacheValue | null,\n    ctx: SetIncrementalFetchCacheContext | SetIncrementalResponseCacheContext\n  ) {\n    FileSystemCache.memoryCache?.set(key, {\n      value: data,\n      lastModified: Date.now(),\n    })\n\n    if (FileSystemCache.debug) {\n      console.log('FileSystemCache: set', key)\n    }\n\n    if (!this.flushToDisk || !data) return\n\n    // Create a new writer that will prepare to write all the files to disk\n    // after their containing directory is created.\n    const writer = new MultiFileWriter(this.fs)\n\n    if (data.kind === CachedRouteKind.APP_ROUTE) {\n      const filePath = this.getFilePath(\n        `${key}.body`,\n        IncrementalCacheKind.APP_ROUTE\n      )\n\n      writer.append(filePath, data.body)\n\n      const meta: RouteMetadata = {\n        headers: data.headers,\n        status: data.status,\n        postponed: undefined,\n        segmentPaths: undefined,\n        prefetchHints: undefined,\n      }\n\n      writer.append(\n        filePath.replace(/\\.body$/, NEXT_META_SUFFIX),\n        JSON.stringify(meta, null, 2)\n      )\n    } else if (\n      data.kind === CachedRouteKind.PAGES ||\n      data.kind === CachedRouteKind.APP_PAGE\n    ) {\n      const isAppPath = data.kind === CachedRouteKind.APP_PAGE\n      const htmlPath = this.getFilePath(\n        `${key}.html`,\n        isAppPath ? IncrementalCacheKind.APP_PAGE : IncrementalCacheKind.PAGES\n      )\n\n      writer.append(htmlPath, data.html)\n\n      // Fallbacks don't generate a data file.\n      if (!ctx.fetchCache && !ctx.isFallback && !ctx.isRoutePPREnabled) {\n        writer.append(\n          this.getFilePath(\n            `${key}${isAppPath ? RSC_SUFFIX : NEXT_DATA_SUFFIX}`,\n            isAppPath\n              ? IncrementalCacheKind.APP_PAGE\n              : IncrementalCacheKind.PAGES\n          ),\n          isAppPath ? data.rscData! : JSON.stringify(data.pageData)\n        )\n      }\n\n      if (data?.kind === CachedRouteKind.APP_PAGE) {\n        let segmentPaths: string[] | undefined\n        if (data.segmentData) {\n          segmentPaths = []\n          const segmentsDir = htmlPath.replace(\n            /\\.html$/,\n            RSC_SEGMENTS_DIR_SUFFIX\n          )\n\n          for (const [segmentPath, buffer] of data.segmentData) {\n            segmentPaths.push(segmentPath)\n            const segmentDataFilePath =\n              segmentsDir + segmentPath + RSC_SEGMENT_SUFFIX\n            writer.append(segmentDataFilePath, buffer)\n          }\n        }\n\n        const meta: RouteMetadata = {\n          headers: data.headers,\n          status: data.status,\n          postponed: data.postponed,\n          segmentPaths,\n          prefetchHints: undefined,\n        }\n\n        writer.append(\n          htmlPath.replace(/\\.html$/, NEXT_META_SUFFIX),\n          JSON.stringify(meta)\n        )\n      }\n    } else if (data.kind === CachedRouteKind.FETCH) {\n      const filePath = this.getFilePath(key, IncrementalCacheKind.FETCH)\n      writer.append(\n        filePath,\n        JSON.stringify({\n          ...data,\n          tags: ctx.fetchCache ? ctx.tags : [],\n        })\n      )\n    }\n\n    // Wait for all FS operations to complete.\n    await writer.wait()\n  }\n\n  private getFilePath(pathname: string, kind: IncrementalCacheKind): string {\n    switch (kind) {\n      case IncrementalCacheKind.FETCH:\n        // we store in .next/cache/fetch-cache so it can be persisted\n        // across deploys\n        return path.join(\n          this.serverDistDir,\n          '..',\n          'cache',\n          'fetch-cache',\n          pathname\n        )\n      case IncrementalCacheKind.PAGES:\n        return path.join(this.serverDistDir, 'pages', pathname)\n      case IncrementalCacheKind.IMAGE:\n      case IncrementalCacheKind.APP_PAGE:\n      case IncrementalCacheKind.APP_ROUTE:\n        return path.join(this.serverDistDir, 'app', pathname)\n      default:\n        throw new Error(`Unexpected file path kind: ${kind}`)\n    }\n  }\n}\n","/**\n * This transforms a URL pathname into a route. It removes any trailing slashes\n * and the `/index` suffix.\n *\n * @param pathname - The URL path that needs to be optimized.\n * @returns - The route\n *\n * @example\n * // returns '/example'\n * toRoute('/example/index/');\n *\n * @example\n * // returns '/example'\n * toRoute('/example/');\n *\n * @example\n * // returns '/'\n * toRoute('/index/');\n *\n * @example\n * // returns '/'\n * toRoute('/');\n */\nexport function toRoute(pathname: string): string {\n  return pathname.replace(/(?:\\/index)?\\/?$/, '') || '/'\n}\n","import type { CacheFs } from '../../../shared/lib/utils'\nimport type { PrerenderManifest } from '../../../build'\nimport {\n  type IncrementalCacheValue,\n  type IncrementalCacheEntry,\n  type IncrementalCache as IncrementalCacheType,\n  IncrementalCacheKind,\n  CachedRouteKind,\n  type IncrementalResponseCacheEntry,\n  type IncrementalFetchCacheEntry,\n  type GetIncrementalFetchCacheContext,\n  type GetIncrementalResponseCacheContext,\n  type CachedFetchValue,\n  type SetIncrementalFetchCacheContext,\n  type SetIncrementalResponseCacheContext,\n} from '../../response-cache'\nimport type { DeepReadonly } from '../../../shared/lib/deep-readonly'\nimport FileSystemCache from './file-system-cache'\nimport { normalizePagePath } from '../../../shared/lib/page-path/normalize-page-path'\n\nimport {\n  CACHE_ONE_YEAR_SECONDS,\n  NEXT_CACHE_TAGS_HEADER,\n  PRERENDER_REVALIDATE_HEADER,\n} from '../../../lib/constants'\nimport { toRoute } from '../to-route'\nimport { SharedCacheControls } from './shared-cache-controls.external'\nimport {\n  getPrerenderResumeDataCache,\n  getRenderResumeDataCache,\n  workUnitAsyncStorage,\n} from '../../app-render/work-unit-async-storage.external'\nimport { InvariantError } from '../../../shared/lib/invariant-error'\nimport type { Revalidate } from '../cache-control'\nimport { getPreviouslyRevalidatedTags } from '../../server-utils'\nimport { workAsyncStorage } from '../../app-render/work-async-storage.external'\nimport { DetachedPromise } from '../../../lib/detached-promise'\nimport { areTagsExpired, areTagsStale } from './tags-manifest.external'\n\nexport interface CacheHandlerContext {\n  fs?: CacheFs\n  dev?: boolean\n  flushToDisk?: boolean\n  serverDistDir?: string\n  maxMemoryCacheSize?: number\n  fetchCacheKeyPrefix?: string\n  prerenderManifest?: PrerenderManifest\n  revalidatedTags: string[]\n  _requestHeaders: IncrementalCache['requestHeaders']\n}\n\nexport interface CacheHandlerValue {\n  lastModified: number\n  age?: number\n  cacheState?: string\n  value: IncrementalCacheValue | null\n}\n\nexport class CacheHandler {\n  // eslint-disable-next-line\n  constructor(_ctx: CacheHandlerContext) {}\n\n  public async get(\n    _cacheKey: string,\n    _ctx: GetIncrementalFetchCacheContext | GetIncrementalResponseCacheContext\n  ): Promise<CacheHandlerValue | null> {\n    return {} as any\n  }\n\n  public async set(\n    _cacheKey: string,\n    _data: IncrementalCacheValue | null,\n    _ctx: SetIncrementalFetchCacheContext | SetIncrementalResponseCacheContext\n  ): Promise<void> {}\n\n  public async revalidateTag(\n    _tags: string | string[],\n    _durations?: { expire?: number }\n  ): Promise<void> {}\n\n  public resetRequestCache(): void {}\n}\n\nexport class IncrementalCache implements IncrementalCacheType {\n  readonly dev?: boolean\n  readonly disableForTestmode?: boolean\n  readonly cacheHandler?: CacheHandler\n  readonly hasCustomCacheHandler: boolean\n  readonly prerenderManifest: DeepReadonly<PrerenderManifest>\n  readonly requestHeaders: Record<string, undefined | string | string[]>\n  readonly allowedRevalidateHeaderKeys?: string[]\n  readonly minimalMode?: boolean\n  readonly fetchCacheKeyPrefix?: string\n  readonly isOnDemandRevalidate?: boolean\n  readonly revalidatedTags?: readonly string[]\n\n  private static readonly debug: boolean =\n    !!process.env.NEXT_PRIVATE_DEBUG_CACHE\n  private readonly locks = new Map<string, Promise<void>>()\n\n  /**\n   * The cache controls for routes. This will source the values from the\n   * prerender manifest until the in-memory cache is updated with new values.\n   */\n  private readonly cacheControls: SharedCacheControls\n\n  constructor({\n    fs,\n    dev,\n    flushToDisk,\n    minimalMode,\n    serverDistDir,\n    requestHeaders,\n    maxMemoryCacheSize,\n    getPrerenderManifest,\n    fetchCacheKeyPrefix,\n    CurCacheHandler,\n    allowedRevalidateHeaderKeys,\n  }: {\n    fs?: CacheFs\n    dev: boolean\n    minimalMode?: boolean\n    serverDistDir?: string\n    flushToDisk?: boolean\n    allowedRevalidateHeaderKeys?: string[]\n    requestHeaders: IncrementalCache['requestHeaders']\n    maxMemoryCacheSize?: number\n    getPrerenderManifest: () => DeepReadonly<PrerenderManifest>\n    fetchCacheKeyPrefix?: string\n    CurCacheHandler?: typeof CacheHandler\n  }) {\n    this.hasCustomCacheHandler = Boolean(CurCacheHandler)\n\n    const cacheHandlersSymbol = Symbol.for('@next/cache-handlers')\n    const _globalThis: typeof globalThis & {\n      [cacheHandlersSymbol]?: {\n        FetchCache?: typeof CacheHandler\n      }\n    } = globalThis\n\n    if (!CurCacheHandler) {\n      // if we have a global cache handler available leverage it\n      const globalCacheHandler = _globalThis[cacheHandlersSymbol]\n\n      if (globalCacheHandler?.FetchCache) {\n        CurCacheHandler = globalCacheHandler.FetchCache\n        if (IncrementalCache.debug) {\n          console.log('IncrementalCache: using global FetchCache cache handler')\n        }\n      } else {\n        if (fs && serverDistDir) {\n          if (IncrementalCache.debug) {\n            console.log('IncrementalCache: using filesystem cache handler')\n          }\n          CurCacheHandler = FileSystemCache\n        }\n      }\n    } else if (IncrementalCache.debug) {\n      console.log(\n        'IncrementalCache: using custom cache handler',\n        CurCacheHandler.name\n      )\n    }\n\n    if (process.env.__NEXT_TEST_MAX_ISR_CACHE) {\n      // Allow cache size to be overridden for testing purposes\n      maxMemoryCacheSize = parseInt(process.env.__NEXT_TEST_MAX_ISR_CACHE, 10)\n    }\n    this.dev = dev\n    this.disableForTestmode = process.env.NEXT_PRIVATE_TEST_PROXY === 'true'\n    // this is a hack to avoid Webpack knowing this is equal to this.minimalMode\n    // because we replace this.minimalMode to true in production bundles.\n    const minimalModeKey = 'minimalMode'\n    this[minimalModeKey] = minimalMode\n    this.requestHeaders = requestHeaders\n    this.allowedRevalidateHeaderKeys = allowedRevalidateHeaderKeys\n    this.prerenderManifest = getPrerenderManifest()\n    this.cacheControls = new SharedCacheControls(this.prerenderManifest)\n    this.fetchCacheKeyPrefix = fetchCacheKeyPrefix\n    let revalidatedTags: string[] = []\n\n    if (\n      requestHeaders[PRERENDER_REVALIDATE_HEADER] ===\n      this.prerenderManifest?.preview?.previewModeId\n    ) {\n      this.isOnDemandRevalidate = true\n    }\n\n    if (minimalMode) {\n      revalidatedTags = this.revalidatedTags = getPreviouslyRevalidatedTags(\n        requestHeaders,\n        this.prerenderManifest?.preview?.previewModeId\n      )\n    }\n\n    if (CurCacheHandler) {\n      this.cacheHandler = new CurCacheHandler({\n        dev,\n        fs,\n        flushToDisk,\n        serverDistDir,\n        revalidatedTags,\n        maxMemoryCacheSize,\n        _requestHeaders: requestHeaders,\n        fetchCacheKeyPrefix,\n      })\n    }\n  }\n\n  private calculateRevalidate(\n    pathname: string,\n    fromTime: number,\n    dev: boolean,\n    isFallback: boolean | undefined\n  ): Revalidate {\n    // in development we don't have a prerender-manifest\n    // and default to always revalidating to allow easier debugging\n    if (dev)\n      return Math.floor(performance.timeOrigin + performance.now() - 1000)\n\n    const cacheControl = this.cacheControls.get(toRoute(pathname))\n\n    // if an entry isn't present in routes we fallback to a default\n    // of revalidating after 1 second unless it's a fallback request.\n    const initialRevalidateSeconds = cacheControl\n      ? cacheControl.revalidate\n      : isFallback\n        ? false\n        : 1\n\n    const revalidateAfter =\n      typeof initialRevalidateSeconds === 'number'\n        ? initialRevalidateSeconds * 1000 + fromTime\n        : initialRevalidateSeconds\n\n    return revalidateAfter\n  }\n\n  _getPathname(pathname: string, fetchCache?: boolean) {\n    return fetchCache ? pathname : normalizePagePath(pathname)\n  }\n\n  resetRequestCache() {\n    this.cacheHandler?.resetRequestCache?.()\n  }\n\n  async lock(cacheKey: string): Promise<() => Promise<void> | void> {\n    // Wait for any existing lock on this cache key to be released\n    // This implements a simple queue-based locking mechanism\n    while (true) {\n      const lock = this.locks.get(cacheKey)\n\n      if (IncrementalCache.debug) {\n        console.log('IncrementalCache: lock get', cacheKey, !!lock)\n      }\n\n      // If no lock exists, we can proceed to acquire it\n      if (!lock) break\n\n      // Wait for the existing lock to be released before trying again\n      await lock\n    }\n\n    // Create a new detached promise that will represent this lock\n    // The resolve function (unlock) will be returned to the caller\n    const { resolve, promise } = new DetachedPromise<void>()\n\n    if (IncrementalCache.debug) {\n      console.log('IncrementalCache: successfully locked', cacheKey)\n    }\n\n    // Store the lock promise in the locks map\n    this.locks.set(cacheKey, promise)\n\n    return () => {\n      // Resolve the promise to release the lock.\n      resolve()\n\n      // Remove the lock from the map once it's released so that future gets\n      // can acquire the lock.\n      this.locks.delete(cacheKey)\n    }\n  }\n\n  async revalidateTag(\n    tags: string | string[],\n    durations?: { expire?: number }\n  ): Promise<void> {\n    return this.cacheHandler?.revalidateTag(tags, durations)\n  }\n\n  // x-ref: https://github.com/facebook/react/blob/2655c9354d8e1c54ba888444220f63e836925caa/packages/react/src/ReactFetch.js#L23\n  async generateCacheKey(\n    url: string,\n    init: RequestInit | Request = {}\n  ): Promise<string> {\n    // this should be bumped anytime a fix is made to cache entries\n    // that should bust the cache\n    const MAIN_KEY_PREFIX = 'v3'\n\n    const bodyChunks: string[] = []\n\n    const encoder = new TextEncoder()\n    const decoder = new TextDecoder()\n\n    if (init.body) {\n      // handle Uint8Array body\n      if (init.body instanceof Uint8Array) {\n        bodyChunks.push(decoder.decode(init.body))\n        ;(init as any)._ogBody = init.body\n      } // handle ReadableStream body\n      else if (typeof (init.body as any).getReader === 'function') {\n        const readableBody = init.body as ReadableStream<Uint8Array | string>\n\n        const chunks: Uint8Array[] = []\n\n        try {\n          await readableBody.pipeTo(\n            new WritableStream({\n              write(chunk) {\n                if (typeof chunk === 'string') {\n                  chunks.push(encoder.encode(chunk))\n                  bodyChunks.push(chunk)\n                } else {\n                  chunks.push(chunk)\n                  bodyChunks.push(decoder.decode(chunk, { stream: true }))\n                }\n              },\n            })\n          )\n\n          // Flush the decoder.\n          bodyChunks.push(decoder.decode())\n\n          // Create a new buffer with all the chunks.\n          const length = chunks.reduce((total, arr) => total + arr.length, 0)\n          const arrayBuffer = new Uint8Array(length)\n\n          // Push each of the chunks into the new array buffer.\n          let offset = 0\n          for (const chunk of chunks) {\n            arrayBuffer.set(chunk, offset)\n            offset += chunk.length\n          }\n\n          ;(init as any)._ogBody = arrayBuffer\n        } catch (err) {\n          console.error('Problem reading body', err)\n        }\n      } // handle FormData or URLSearchParams bodies\n      else if (typeof (init.body as any).keys === 'function') {\n        const formData = init.body as FormData\n        ;(init as any)._ogBody = init.body\n        for (const key of new Set([...formData.keys()])) {\n          const values = formData.getAll(key)\n          bodyChunks.push(\n            `${key}=${(\n              await Promise.all(\n                values.map(async (val) => {\n                  if (typeof val === 'string') {\n                    return val\n                  } else {\n                    return await val.text()\n                  }\n                })\n              )\n            ).join(',')}`\n          )\n        }\n        // handle blob body\n      } else if (typeof (init.body as any).arrayBuffer === 'function') {\n        const blob = init.body as Blob\n        const arrayBuffer = await blob.arrayBuffer()\n        bodyChunks.push(await blob.text())\n        ;(init as any)._ogBody = new Blob([arrayBuffer], { type: blob.type })\n      } else if (typeof init.body === 'string') {\n        bodyChunks.push(init.body)\n        ;(init as any)._ogBody = init.body\n      }\n    }\n\n    const headers =\n      typeof (init.headers || {}).keys === 'function'\n        ? Object.fromEntries(init.headers as Headers)\n        : Object.assign({}, init.headers)\n\n    // w3c trace context headers can break request caching and deduplication\n    // so we remove them from the cache key\n    if ('traceparent' in headers) delete headers['traceparent']\n    if ('tracestate' in headers) delete headers['tracestate']\n\n    const cacheString = JSON.stringify([\n      MAIN_KEY_PREFIX,\n      this.fetchCacheKeyPrefix || '',\n      url,\n      init.method,\n      headers,\n      init.mode,\n      init.redirect,\n      init.credentials,\n      init.referrer,\n      init.referrerPolicy,\n      init.integrity,\n      init.cache,\n      bodyChunks,\n    ])\n\n    if (process.env.NEXT_RUNTIME === 'edge') {\n      function bufferToHex(buffer: ArrayBuffer): string {\n        return Array.prototype.map\n          .call(new Uint8Array(buffer), (b) => b.toString(16).padStart(2, '0'))\n          .join('')\n      }\n      const buffer = encoder.encode(cacheString)\n      return bufferToHex(await crypto.subtle.digest('SHA-256', buffer))\n    } else {\n      const crypto = require('crypto') as typeof import('crypto')\n      return crypto.createHash('sha256').update(cacheString).digest('hex')\n    }\n  }\n\n  async get(\n    cacheKey: string,\n    ctx: GetIncrementalFetchCacheContext\n  ): Promise<IncrementalFetchCacheEntry | null>\n  async get(\n    cacheKey: string,\n    ctx: GetIncrementalResponseCacheContext\n  ): Promise<IncrementalResponseCacheEntry | null>\n  async get(\n    cacheKey: string,\n    ctx: GetIncrementalFetchCacheContext | GetIncrementalResponseCacheContext\n  ): Promise<IncrementalCacheEntry | null> {\n    // Unlike other caches if we have a resume data cache, we use it even if\n    // testmode would normally disable it or if requestHeaders say 'no-cache'.\n    if (ctx.kind === IncrementalCacheKind.FETCH) {\n      const workUnitStore = workUnitAsyncStorage.getStore()\n      const resumeDataCache = workUnitStore\n        ? getRenderResumeDataCache(workUnitStore)\n        : null\n      if (resumeDataCache) {\n        const memoryCacheData = resumeDataCache.fetch.get(cacheKey)\n        if (memoryCacheData?.kind === CachedRouteKind.FETCH) {\n          // Check if any tags were recently revalidated before returning RDC entry.\n          // When a server action calls updateTag(), the re-render should see fresh\n          // data instead of stale RDC data.\n          const workStore = workAsyncStorage.getStore()\n          const combinedTags = [...(ctx.tags || []), ...(ctx.softTags || [])]\n          const hasRevalidatedTag = combinedTags.some(\n            (tag) =>\n              this.revalidatedTags?.includes(tag) ||\n              workStore?.pendingRevalidatedTags?.some(\n                (item) => item.tag === tag\n              )\n          )\n\n          if (hasRevalidatedTag) {\n            if (IncrementalCache.debug) {\n              console.log('IncrementalCache: rdc:revalidated-tag', cacheKey)\n            }\n            // Fall through to cacheHandler lookup\n          } else {\n            if (IncrementalCache.debug) {\n              console.log('IncrementalCache: rdc:hit', cacheKey)\n            }\n\n            return { isStale: false, value: memoryCacheData }\n          }\n        } else if (IncrementalCache.debug) {\n          console.log('IncrementalCache: rdc:miss', cacheKey)\n        }\n      } else {\n        if (IncrementalCache.debug) {\n          console.log('IncrementalCache: rdc:no-resume-data')\n        }\n      }\n    }\n\n    // we don't leverage the prerender cache in dev mode\n    // so that getStaticProps is always called for easier debugging\n    if (\n      this.disableForTestmode ||\n      (this.dev &&\n        (ctx.kind !== IncrementalCacheKind.FETCH ||\n          this.requestHeaders['cache-control'] === 'no-cache'))\n    ) {\n      return null\n    }\n\n    cacheKey = this._getPathname(\n      cacheKey,\n      ctx.kind === IncrementalCacheKind.FETCH\n    )\n\n    const cacheData = await this.cacheHandler?.get(cacheKey, ctx)\n\n    if (ctx.kind === IncrementalCacheKind.FETCH) {\n      if (!cacheData) {\n        return null\n      }\n\n      if (cacheData.value?.kind !== CachedRouteKind.FETCH) {\n        throw new InvariantError(\n          `Expected cached value for cache key ${JSON.stringify(cacheKey)} to be a \"FETCH\" kind, got ${JSON.stringify(cacheData.value?.kind)} instead.`\n        )\n      }\n\n      const workStore = workAsyncStorage.getStore()\n      const combinedTags = [...(ctx.tags || []), ...(ctx.softTags || [])]\n      // if a tag was revalidated we don't return stale data\n      if (\n        combinedTags.some(\n          (tag) =>\n            this.revalidatedTags?.includes(tag) ||\n            workStore?.pendingRevalidatedTags?.some((item) => item.tag === tag)\n        )\n      ) {\n        if (IncrementalCache.debug) {\n          console.log('IncrementalCache: expired tag', cacheKey)\n        }\n\n        return null\n      }\n\n      // As we're able to get the cache entry for this fetch, and the prerender\n      // resume data cache (RDC) is available, it must have been populated by a\n      // previous fetch, but was not yet present in the in-memory cache. This\n      // could be the case when performing multiple renders in parallel during\n      // build time where we de-duplicate the fetch calls.\n      //\n      // We add it to the RDC so that the next fetch call will be able to use it\n      // and it won't have to reach into the fetch cache implementation.\n      const workUnitStore = workUnitAsyncStorage.getStore()\n      if (workUnitStore) {\n        const prerenderResumeDataCache =\n          getPrerenderResumeDataCache(workUnitStore)\n        if (prerenderResumeDataCache) {\n          if (IncrementalCache.debug) {\n            console.log('IncrementalCache: rdc:set', cacheKey)\n          }\n\n          prerenderResumeDataCache.fetch.set(cacheKey, cacheData.value)\n        }\n      }\n\n      const revalidate = ctx.revalidate || cacheData.value.revalidate\n      const age =\n        (performance.timeOrigin +\n          performance.now() -\n          (cacheData.lastModified || 0)) /\n        1000\n\n      let isStale = age > revalidate\n      const data = cacheData.value.data\n\n      if (areTagsExpired(combinedTags, cacheData.lastModified)) {\n        return null\n      } else if (areTagsStale(combinedTags, cacheData.lastModified)) {\n        isStale = true\n      }\n\n      return {\n        isStale,\n        value: { kind: CachedRouteKind.FETCH, data, revalidate },\n      }\n    } else if (cacheData?.value?.kind === CachedRouteKind.FETCH) {\n      throw new InvariantError(\n        `Expected cached value for cache key ${JSON.stringify(cacheKey)} not to be a ${JSON.stringify(ctx.kind)} kind, got \"FETCH\" instead.`\n      )\n    }\n\n    let entry: IncrementalResponseCacheEntry | null = null\n    const { isFallback } = ctx\n    const cacheControl = this.cacheControls.get(toRoute(cacheKey))\n\n    let isStale: boolean | -1 | undefined\n    let revalidateAfter: Revalidate\n\n    if (cacheData?.lastModified === -1) {\n      isStale = -1\n      revalidateAfter = -1 * CACHE_ONE_YEAR_SECONDS * 1000\n    } else {\n      const now = performance.timeOrigin + performance.now()\n      const lastModified = cacheData?.lastModified || now\n\n      revalidateAfter = this.calculateRevalidate(\n        cacheKey,\n        lastModified,\n        this.dev ?? false,\n        ctx.isFallback\n      )\n\n      isStale =\n        revalidateAfter !== false && revalidateAfter < now ? true : undefined\n\n      // If the stale time couldn't be determined based on the revalidation\n      // time, we check if the tags are expired or stale.\n      if (\n        isStale === undefined &&\n        (cacheData?.value?.kind === CachedRouteKind.APP_PAGE ||\n          cacheData?.value?.kind === CachedRouteKind.APP_ROUTE)\n      ) {\n        const tagsHeader = cacheData.value.headers?.[NEXT_CACHE_TAGS_HEADER]\n\n        if (typeof tagsHeader === 'string') {\n          const cacheTags = tagsHeader.split(',')\n\n          if (cacheTags.length > 0) {\n            if (areTagsExpired(cacheTags, lastModified)) {\n              isStale = -1\n            } else if (areTagsStale(cacheTags, lastModified)) {\n              isStale = true\n            }\n          }\n        }\n      }\n    }\n\n    if (cacheData) {\n      entry = {\n        isStale,\n        cacheControl,\n        revalidateAfter,\n        value: cacheData.value,\n        isFallback,\n      }\n    }\n\n    if (\n      !cacheData &&\n      this.prerenderManifest.notFoundRoutes.includes(cacheKey)\n    ) {\n      // for the first hit after starting the server the cache\n      // may not have a way to save notFound: true so if\n      // the prerender-manifest marks this as notFound then we\n      // return that entry and trigger a cache set to give it a\n      // chance to update in-memory entries\n      entry = {\n        isStale,\n        value: null,\n        cacheControl,\n        revalidateAfter,\n        isFallback,\n      }\n      this.set(cacheKey, entry.value, { ...ctx, cacheControl })\n    }\n    return entry\n  }\n\n  async set(\n    pathname: string,\n    data: CachedFetchValue | null,\n    ctx: SetIncrementalFetchCacheContext\n  ): Promise<void>\n  async set(\n    pathname: string,\n    data: Exclude<IncrementalCacheValue, CachedFetchValue> | null,\n    ctx: SetIncrementalResponseCacheContext\n  ): Promise<void>\n  async set(\n    pathname: string,\n    data: IncrementalCacheValue | null,\n    ctx: SetIncrementalFetchCacheContext | SetIncrementalResponseCacheContext\n  ): Promise<void> {\n    // Even if we otherwise disable caching for testMode or if no fetchCache is\n    // configured we still always stash results in the resume data cache if one\n    // exists. This is because this is a transient in memory cache that\n    // populates caches ahead of a dynamic render in dev mode to allow the RSC\n    // debug info to have the right environment associated to it.\n    if (data?.kind === CachedRouteKind.FETCH) {\n      const workUnitStore = workUnitAsyncStorage.getStore()\n      const prerenderResumeDataCache = workUnitStore\n        ? getPrerenderResumeDataCache(workUnitStore)\n        : null\n      if (prerenderResumeDataCache) {\n        if (IncrementalCache.debug) {\n          console.log('IncrementalCache: rdc:set', pathname)\n        }\n\n        prerenderResumeDataCache.fetch.set(pathname, data)\n      }\n    }\n\n    if (this.disableForTestmode || (this.dev && !ctx.fetchCache)) return\n\n    pathname = this._getPathname(pathname, ctx.fetchCache)\n\n    // FetchCache has upper limit of 2MB per-entry currently\n    const itemSize = JSON.stringify(data).length\n    if (\n      ctx.fetchCache &&\n      itemSize > 2 * 1024 * 1024 &&\n      // We ignore the size limit when custom cache handler is being used, as it\n      // might not have this limit\n      !this.hasCustomCacheHandler &&\n      // We also ignore the size limit when it's an implicit build-time-only\n      // caching that the user isn't even aware of.\n      !ctx.isImplicitBuildTimeCache\n    ) {\n      const warningText = `Failed to set Next.js data cache for ${ctx.fetchUrl || pathname}, items over 2MB can not be cached (${itemSize} bytes)`\n\n      if (this.dev) {\n        throw new Error(warningText)\n      }\n      console.warn(warningText)\n      return\n    }\n\n    try {\n      if (!ctx.fetchCache && ctx.cacheControl) {\n        this.cacheControls.set(toRoute(pathname), ctx.cacheControl)\n      }\n\n      await this.cacheHandler?.set(pathname, data, ctx)\n    } catch (error) {\n      console.warn('Failed to update prerender cache for', pathname, error)\n    }\n  }\n}\n","import type { IncomingMessage, ServerResponse } from 'node:http'\nimport type { NextConfigRuntime } from '../../config-shared'\nimport type { UrlWithParsedQuery } from 'node:url'\nimport type { ServerCacheStatus } from '../../../next-devtools/dev-overlay/cache-indicator'\n\nexport type RevalidateFn = (config: {\n  urlPath: string\n  headers: { [key: string]: string | string[] }\n  opts: { unstable_onlyGenerated?: boolean }\n}) => Promise<void>\n\n// The RouterServerContext contains instance specific\n// information that isn't available/relevant when\n// deployed in serverless environments, the key is\n// the relative project dir this allows separate contexts\n// when running multiple next instances in same process\nexport type RouterServerContext = Record<\n  string,\n  {\n    // hostname the server is started with\n    hostname?: string\n    // revalidate function to bypass going through network\n    // to invoke revalidate request (uses mocked req/res)\n    revalidate?: RevalidateFn\n    // function to render the 404 page\n    render404?: (\n      req: IncomingMessage,\n      res: ServerResponse,\n      parsedUrl?: UrlWithParsedQuery,\n      setHeaders?: boolean\n    ) => Promise<void>\n    // exposing nextConfig for dev mode specifically\n    nextConfig?: NextConfigRuntime\n    // whether running in custom server mode\n    isCustomServer?: boolean\n    // whether test proxy is enabled\n    experimentalTestProxy?: boolean\n    // allow dev server to log with original stack\n    logErrorWithOriginalStack?: (err: unknown, type: string) => void\n    // allow setting ISR status in dev\n    setIsrStatus?: (key: string, value: boolean | undefined) => void\n    setReactDebugChannel?: (\n      debugChannel: { readable: ReadableStream<Uint8Array> },\n      htmlRequestId: string,\n      requestId: string\n    ) => void\n    setCacheStatus?: (status: ServerCacheStatus, htmlRequestId: string) => void\n    sendErrorsToBrowser?: (\n      errorsRscStream: ReadableStream<Uint8Array>,\n      htmlRequestId: string\n    ) => void\n    // indicates request handlers are already wrapped by next-server tracing\n    isWrappedByNextServer?: boolean\n  }\n>\n\nexport const RouterServerContextSymbol = Symbol.for(\n  '@next/router-server-methods'\n)\n\nexport const routerServerGlobal = globalThis as typeof globalThis & {\n  [RouterServerContextSymbol]?: RouterServerContext\n}\n","import { NEXT_URL } from '../client/components/app-router-headers'\nimport type { Rewrite } from './load-custom-routes'\nimport type { DeepReadonly } from '../shared/lib/deep-readonly'\n\nexport function isInterceptionRouteRewrite(route: DeepReadonly<Rewrite>) {\n  // When we generate interception rewrites in the above implementation, we always do so with only a single `has` condition.\n  return route.has?.[0]?.key === NEXT_URL\n}\n","import '../../build/adapter/setup-node-env.external'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport type {\n  InstrumentationOnRequestError,\n  RequestErrorContext,\n} from '../instrumentation/types'\nimport type { ParsedUrlQuery } from 'node:querystring'\nimport type { UrlWithParsedQuery } from 'node:url'\nimport type {\n  PrerenderManifest,\n  RequiredServerFilesManifest,\n} from '../../build'\nimport type { DevRoutesManifest } from '../lib/router-utils/setup-dev-bundler'\nimport type { RouteDefinition } from '../route-definitions/route-definition'\nimport type { DeepReadonly } from '../../shared/lib/deep-readonly'\nimport {\n  BUILD_ID_FILE,\n  BUILD_MANIFEST,\n  CLIENT_REFERENCE_MANIFEST,\n  DYNAMIC_CSS_MANIFEST,\n  NEXT_FONT_MANIFEST,\n  PRERENDER_MANIFEST,\n  REACT_LOADABLE_MANIFEST,\n  ROUTES_MANIFEST,\n  SERVER_FILES_MANIFEST,\n  SERVER_REFERENCE_MANIFEST,\n  SUBRESOURCE_INTEGRITY_MANIFEST,\n} from '../../shared/lib/constants'\nimport { parseReqUrl } from '../../lib/url'\nimport {\n  normalizeLocalePath,\n  type PathLocale,\n} from '../../shared/lib/i18n/normalize-locale-path'\nimport { isDynamicRoute } from '../../shared/lib/router/utils'\nimport { removePathPrefix } from '../../shared/lib/router/utils/remove-path-prefix'\nimport { getServerUtils } from '../server-utils'\nimport { detectDomainLocale } from '../../shared/lib/i18n/detect-domain-locale'\nimport { getHostname } from '../../shared/lib/get-hostname'\nimport { checkIsOnDemandRevalidate } from '../api-utils'\nimport type { PreviewData } from '../../types'\nimport type { BuildManifest } from '../get-page-files'\nimport type { ReactLoadableManifest } from '../load-components'\nimport type { NextFontManifest } from '../../build/webpack/plugins/next-font-manifest-plugin'\nimport { normalizeDataPath } from '../../shared/lib/page-path/normalize-data-path'\nimport { pathHasPrefix } from '../../shared/lib/router/utils/path-has-prefix'\nimport {\n  addRequestMeta,\n  getRequestMeta,\n  type NextIncomingMessage,\n} from '../request-meta'\nimport { normalizePagePath } from '../../shared/lib/page-path/normalize-page-path'\nimport { isStaticMetadataRoute } from '../../lib/metadata/is-metadata-route'\nimport { IncrementalCache } from '../lib/incremental-cache'\nimport { initializeCacheHandlers, setCacheHandler } from '../use-cache/handlers'\nimport { interopDefault } from '../app-render/interop-default'\nimport { RouteKind } from '../route-kind'\nimport type { BaseNextRequest } from '../base-http'\nimport type { I18NConfig, NextConfigRuntime } from '../config-shared'\nimport ResponseCache, { type ResponseGenerator } from '../response-cache'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport {\n  RouterServerContextSymbol,\n  routerServerGlobal,\n  type RouterServerContext,\n} from '../lib/router-utils/router-server-context'\nimport { decodePathParams } from '../lib/router-utils/decode-path-params'\nimport { removeTrailingSlash } from '../../shared/lib/router/utils/remove-trailing-slash'\nimport { isInterceptionRouteRewrite } from '../../lib/is-interception-route-rewrite'\n\n/**\n * RouteModuleOptions is the options that are passed to the route module, other\n * route modules should extend this class to add specific options for their\n * route.\n */\nexport interface RouteModuleOptions<\n  D extends RouteDefinition = RouteDefinition,\n  U = unknown,\n> {\n  readonly definition: Readonly<D>\n  readonly userland: Readonly<U>\n  readonly distDir: string\n  readonly relativeProjectDir: string\n}\n\n/**\n * RouteHandlerContext is the base context for a route handler.\n */\nexport interface RouteModuleHandleContext {\n  /**\n   * Any matched parameters for the request. This is only defined for dynamic\n   * routes.\n   */\n  params: Record<string, string | string[] | undefined> | undefined\n}\n\nconst dynamicImportEsmDefault = (id: string) =>\n  import(/* webpackIgnore: true */ /* turbopackIgnore: true */ id).then(\n    (mod) => mod.default || mod\n  )\n\n/**\n * RouteModule is the base class for all route modules. This class should be\n * extended by all route modules.\n */\nexport abstract class RouteModule<\n  D extends RouteDefinition = RouteDefinition,\n  U = unknown,\n> {\n  /**\n   * The userland module. This is the module that is exported from the user's\n   * code. This is marked as readonly to ensure that the module is not mutated\n   * because the module (when compiled) only provides getters.\n   */\n  public readonly userland: Readonly<U>\n\n  /**\n   * The definition of the route.\n   */\n  public readonly definition: Readonly<D>\n\n  /**\n   * The shared modules that are exposed and required for the route module.\n   */\n  public static readonly sharedModules: any\n\n  public isDev: boolean\n  public distDir: string\n  public relativeProjectDir: string\n  public incrementCache?: IncrementalCache\n  public responseCache?: ResponseCache\n\n  constructor({\n    userland,\n    definition,\n    distDir,\n    relativeProjectDir,\n  }: RouteModuleOptions<D, U>) {\n    this.userland = userland\n    this.definition = definition\n    this.isDev = !!process.env.__NEXT_DEV_SERVER\n    this.distDir = distDir\n    this.relativeProjectDir = relativeProjectDir\n  }\n\n  private getRouterServerContext(\n    req: NextIncomingMessage\n  ): RouterServerContext[string] | undefined {\n    const hostname = getRequestMeta(req, 'hostname')\n    const revalidate = getRequestMeta(req, 'revalidate')\n    const render404 = getRequestMeta(req, 'render404')\n    const relativeProjectDir =\n      getRequestMeta(req, 'relativeProjectDir') || this.relativeProjectDir\n    const routerServerContext =\n      routerServerGlobal[RouterServerContextSymbol]?.[relativeProjectDir]\n\n    return {\n      ...routerServerContext,\n      ...(hostname !== undefined ? { hostname } : {}),\n      ...(revalidate !== undefined ? { revalidate } : {}),\n      ...(render404 !== undefined ? { render404 } : {}),\n    }\n  }\n\n  public normalizeUrl(\n    _req: IncomingMessage | BaseNextRequest,\n    _parsedUrl: UrlWithParsedQuery\n  ) {}\n\n  public async instrumentationOnRequestError(\n    req: IncomingMessage | BaseNextRequest,\n    ...args: Parameters<InstrumentationOnRequestError>\n  ) {\n    if (process.env.NEXT_RUNTIME === 'edge') {\n      const { getEdgeInstrumentationModule } = await import('../web/globals')\n      const instrumentation = await getEdgeInstrumentationModule()\n\n      if (instrumentation) {\n        await instrumentation.onRequestError?.(...args)\n      }\n    } else {\n      const { join } = require('node:path') as typeof import('node:path')\n      const absoluteProjectDir = join(\n        /* turbopackIgnore: true */\n        process.cwd(),\n        getRequestMeta(req, 'relativeProjectDir') || this.relativeProjectDir\n      )\n\n      const { instrumentationOnRequestError } = await import(\n        '../lib/router-utils/instrumentation-globals.external.js'\n      )\n\n      return instrumentationOnRequestError(\n        absoluteProjectDir,\n        this.distDir,\n        ...args\n      )\n    }\n  }\n\n  private loadManifests(\n    srcPage: string,\n    projectDir?: string\n  ): {\n    buildId: string\n    buildManifest: BuildManifest\n    fallbackBuildManifest: BuildManifest\n    routesManifest: DeepReadonly<DevRoutesManifest>\n    nextFontManifest: DeepReadonly<NextFontManifest>\n    prerenderManifest: DeepReadonly<PrerenderManifest>\n    serverFilesManifest: DeepReadonly<RequiredServerFilesManifest> | undefined\n    reactLoadableManifest: DeepReadonly<ReactLoadableManifest>\n    subresourceIntegrityManifest: any\n    clientReferenceManifest: any\n    serverActionsManifest: any\n    dynamicCssManifest: any\n    interceptionRoutePatterns: RegExp[]\n  } {\n    let result\n    if (process.env.NEXT_RUNTIME === 'edge') {\n      const { getEdgePreviewProps } =\n        require('../web/get-edge-preview-props') as typeof import('../web/get-edge-preview-props')\n\n      const maybeJSONParse = (str?: string) =>\n        str ? JSON.parse(str) : undefined\n\n      result = {\n        buildId: process.env.__NEXT_BUILD_ID || '',\n        buildManifest: self.__BUILD_MANIFEST as any,\n        fallbackBuildManifest: {} as any,\n        reactLoadableManifest: maybeJSONParse(self.__REACT_LOADABLE_MANIFEST),\n        nextFontManifest: maybeJSONParse(self.__NEXT_FONT_MANIFEST),\n        prerenderManifest: {\n          routes: {},\n          dynamicRoutes: {},\n          notFoundRoutes: [],\n          version: 4,\n          preview: getEdgePreviewProps(),\n        } as const,\n        routesManifest: {\n          version: 4,\n          caseSensitive: Boolean(process.env.__NEXT_CASE_SENSITIVE_ROUTES),\n          basePath: process.env.__NEXT_BASE_PATH || '',\n          rewrites: (process.env.__NEXT_REWRITES as any) || {\n            beforeFiles: [],\n            afterFiles: [],\n            fallback: [],\n          },\n          redirects: [],\n          headers: [],\n          onMatchHeaders: [],\n          i18n:\n            (process.env.__NEXT_I18N_CONFIG as any as I18NConfig) || undefined,\n          skipProxyUrlNormalize: Boolean(\n            process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE\n          ),\n        },\n        serverFilesManifest: self.__SERVER_FILES_MANIFEST,\n        clientReferenceManifest: self.__RSC_MANIFEST?.[srcPage],\n        serverActionsManifest: maybeJSONParse(self.__RSC_SERVER_MANIFEST),\n        subresourceIntegrityManifest: maybeJSONParse(\n          self.__SUBRESOURCE_INTEGRITY_MANIFEST\n        ),\n        dynamicCssManifest: maybeJSONParse(self.__DYNAMIC_CSS_MANIFEST),\n        interceptionRoutePatterns: (\n          maybeJSONParse(self.__INTERCEPTION_ROUTE_REWRITE_MANIFEST) ?? []\n        ).map((rewrite: any) => new RegExp(rewrite.regex)),\n      }\n    } else {\n      if (!projectDir) {\n        throw new Error('Invariant: projectDir is required for node runtime')\n      }\n      const { loadManifestFromRelativePath } =\n        require('../load-manifest.external') as typeof import('../load-manifest.external')\n      const normalizedPagePath = normalizePagePath(srcPage)\n\n      const router =\n        this.definition.kind === RouteKind.PAGES ||\n        this.definition.kind === RouteKind.PAGES_API\n          ? 'pages'\n          : 'app'\n\n      const [\n        routesManifest,\n        prerenderManifest,\n        buildManifest,\n        fallbackBuildManifest,\n        reactLoadableManifest,\n        nextFontManifest,\n        clientReferenceManifest,\n        serverActionsManifest,\n        subresourceIntegrityManifest,\n        serverFilesManifest,\n        buildId,\n        dynamicCssManifest,\n      ] = [\n        loadManifestFromRelativePath<DevRoutesManifest>({\n          projectDir,\n          distDir: this.distDir,\n          manifest: ROUTES_MANIFEST,\n          shouldCache: !this.isDev,\n        }),\n        loadManifestFromRelativePath<PrerenderManifest>({\n          projectDir,\n          distDir: this.distDir,\n          manifest: PRERENDER_MANIFEST,\n          shouldCache: !this.isDev,\n        }),\n        loadManifestFromRelativePath<BuildManifest>({\n          projectDir,\n          distDir: this.distDir,\n          manifest: BUILD_MANIFEST,\n          shouldCache: !this.isDev,\n        }),\n        srcPage === '/_error'\n          ? loadManifestFromRelativePath<BuildManifest>({\n              projectDir,\n              distDir: this.distDir,\n              manifest: `fallback-${BUILD_MANIFEST}`,\n              shouldCache: !this.isDev,\n              handleMissing: true,\n            })\n          : ({} as BuildManifest),\n        loadManifestFromRelativePath<ReactLoadableManifest>({\n          projectDir,\n          distDir: this.distDir,\n          manifest: process.env.TURBOPACK\n            ? `server/${router === 'app' ? 'app' : 'pages'}${normalizedPagePath}/${REACT_LOADABLE_MANIFEST}`\n            : REACT_LOADABLE_MANIFEST,\n          handleMissing: true,\n          shouldCache: !this.isDev,\n        }),\n        loadManifestFromRelativePath<NextFontManifest>({\n          projectDir,\n          distDir: this.distDir,\n          manifest: `server/${NEXT_FONT_MANIFEST}.json`,\n          shouldCache: !this.isDev,\n        }),\n        router === 'app' && !isStaticMetadataRoute(srcPage)\n          ? loadManifestFromRelativePath({\n              distDir: this.distDir,\n              projectDir,\n              useEval: true,\n              handleMissing: true,\n              manifest: `server/app${srcPage.replace(/%5F/g, '_') + '_' + CLIENT_REFERENCE_MANIFEST}.js`,\n              shouldCache: !this.isDev,\n            })\n          : undefined,\n        router === 'app'\n          ? loadManifestFromRelativePath<any>({\n              distDir: this.distDir,\n              projectDir,\n              manifest: `server/${SERVER_REFERENCE_MANIFEST}.json`,\n              handleMissing: true,\n              shouldCache: !this.isDev,\n            })\n          : {},\n        loadManifestFromRelativePath<Record<string, string>>({\n          projectDir,\n          distDir: this.distDir,\n          manifest: `server/${SUBRESOURCE_INTEGRITY_MANIFEST}.json`,\n          handleMissing: true,\n          shouldCache: !this.isDev,\n        }),\n        this.isDev\n          ? undefined\n          : loadManifestFromRelativePath<RequiredServerFilesManifest>({\n              projectDir,\n              distDir: this.distDir,\n              shouldCache: true,\n              manifest: `${SERVER_FILES_MANIFEST}.json`,\n            }),\n        this.isDev\n          ? 'development'\n          : loadManifestFromRelativePath<any>({\n              projectDir,\n              distDir: this.distDir,\n              manifest: BUILD_ID_FILE,\n              skipParse: true,\n              shouldCache: true,\n            }),\n        loadManifestFromRelativePath<any>({\n          projectDir,\n          distDir: this.distDir,\n          manifest: DYNAMIC_CSS_MANIFEST,\n          shouldCache: !this.isDev,\n          handleMissing: true,\n        }),\n      ]\n\n      result = {\n        buildId,\n        buildManifest,\n        fallbackBuildManifest,\n        routesManifest,\n        nextFontManifest,\n        prerenderManifest,\n        serverFilesManifest,\n        reactLoadableManifest,\n        clientReferenceManifest: (clientReferenceManifest as any)\n          ?.__RSC_MANIFEST?.[srcPage.replace(/%5F/g, '_')],\n        serverActionsManifest,\n        subresourceIntegrityManifest,\n        dynamicCssManifest,\n        interceptionRoutePatterns: routesManifest.rewrites.beforeFiles\n          .filter(isInterceptionRouteRewrite)\n          .map((rewrite) => new RegExp(rewrite.regex)),\n      }\n    }\n\n    return result\n  }\n\n  public async loadCustomCacheHandlers(\n    req: IncomingMessage | BaseNextRequest,\n    nextConfig: NextConfigRuntime\n  ) {\n    if (process.env.NEXT_RUNTIME !== 'edge') {\n      const { cacheMaxMemorySize, cacheHandlers } = nextConfig\n      if (!cacheHandlers) return\n\n      // If we've already initialized the cache handlers interface, don't do it\n      // again.\n      if (!initializeCacheHandlers(cacheMaxMemorySize)) return\n\n      for (const [kind, handler] of Object.entries(cacheHandlers)) {\n        if (!handler) continue\n\n        const { formatDynamicImportPath } =\n          require('../../lib/format-dynamic-import-path') as typeof import('../../lib/format-dynamic-import-path')\n\n        const { join } = require('node:path') as typeof import('node:path')\n        const absoluteProjectDir = join(\n          /* turbopackIgnore: true */\n          process.cwd(),\n          getRequestMeta(req, 'relativeProjectDir') || this.relativeProjectDir\n        )\n\n        setCacheHandler(\n          kind,\n          interopDefault(\n            await dynamicImportEsmDefault(\n              formatDynamicImportPath(\n                `${absoluteProjectDir}/${this.distDir}`,\n                handler\n              )\n            )\n          )\n        )\n      }\n    }\n  }\n\n  public async getIncrementalCache(\n    req: IncomingMessage | BaseNextRequest,\n    nextConfig: NextConfigRuntime,\n    prerenderManifest: DeepReadonly<PrerenderManifest>,\n    isMinimalMode: boolean\n  ): Promise<IncrementalCache> {\n    if (process.env.NEXT_RUNTIME === 'edge') {\n      return (globalThis as any).__incrementalCache\n    } else {\n      let CacheHandler: any\n      const { cacheHandler } = nextConfig\n\n      if (cacheHandler) {\n        const { formatDynamicImportPath } =\n          require('../../lib/format-dynamic-import-path') as typeof import('../../lib/format-dynamic-import-path')\n\n        CacheHandler = interopDefault(\n          await dynamicImportEsmDefault(\n            formatDynamicImportPath(this.distDir, cacheHandler)\n          )\n        )\n      }\n      const { join } = require('node:path') as typeof import('node:path')\n      const projectDir = join(\n        /* turbopackIgnore: true */\n        process.cwd(),\n        getRequestMeta(req, 'relativeProjectDir') || this.relativeProjectDir\n      )\n\n      await this.loadCustomCacheHandlers(req, nextConfig)\n\n      // incremental-cache is request specific\n      // although can have shared caches in module scope\n      // per-cache handler\n      const incrementalCache = new IncrementalCache({\n        fs: (\n          require('../lib/node-fs-methods') as typeof import('../lib/node-fs-methods')\n        ).nodeFs,\n        dev: this.isDev,\n        requestHeaders: req.headers,\n        allowedRevalidateHeaderKeys:\n          nextConfig.experimental.allowedRevalidateHeaderKeys,\n        minimalMode: isMinimalMode,\n        serverDistDir: `${projectDir}/${this.distDir}/server`,\n        fetchCacheKeyPrefix: nextConfig.experimental.fetchCacheKeyPrefix,\n        maxMemoryCacheSize: nextConfig.cacheMaxMemorySize,\n        flushToDisk: !isMinimalMode && nextConfig.experimental.isrFlushToDisk,\n        getPrerenderManifest: () => prerenderManifest,\n        CurCacheHandler: CacheHandler,\n      })\n\n      // we need to expose this on globalThis as the app-render\n      // workStore grabs the incrementalCache from there\n      ;(globalThis as any).__incrementalCache = incrementalCache\n      return incrementalCache\n    }\n  }\n\n  public async onRequestError(\n    req: IncomingMessage | BaseNextRequest,\n    err: unknown,\n    errorContext: RequestErrorContext,\n    silenceLog: boolean,\n    routerServerContext?: RouterServerContext[string]\n  ) {\n    if (!silenceLog) {\n      if (routerServerContext?.logErrorWithOriginalStack) {\n        routerServerContext.logErrorWithOriginalStack(err, 'app-dir')\n      } else {\n        console.error(err)\n      }\n    }\n    await this.instrumentationOnRequestError(\n      req,\n      err,\n      {\n        path: req.url || '/',\n        headers: req.headers,\n        method: req.method || 'GET',\n      },\n      errorContext\n    )\n  }\n\n  /** A more lightweight version of `prepare()` for only retrieving the config on edge */\n  public getNextConfigEdge(req: NextIncomingMessage): {\n    nextConfig: NextConfigRuntime\n    deploymentId: string\n  } {\n    if (process.env.NEXT_RUNTIME !== 'edge') {\n      throw new Error(\n        'Invariant: getNextConfigEdge must only be called in edge runtime'\n      )\n    }\n\n    let serverFilesManifest = self.__SERVER_FILES_MANIFEST as any as\n      | RequiredServerFilesManifest\n      | undefined\n    const routerServerContext = this.getRouterServerContext(req)\n    const nextConfig =\n      routerServerContext?.nextConfig || serverFilesManifest?.config\n\n    if (!nextConfig) {\n      throw new Error(\"Invariant: nextConfig couldn't be loaded\")\n    }\n\n    let deploymentId\n    if (nextConfig.experimental?.runtimeServerDeploymentId) {\n      if (!process.env.NEXT_DEPLOYMENT_ID) {\n        throw new Error(\n          'process.env.NEXT_DEPLOYMENT_ID is missing but runtimeServerDeploymentId is enabled'\n        )\n      }\n      deploymentId = process.env.NEXT_DEPLOYMENT_ID\n    } else {\n      deploymentId = nextConfig.deploymentId || ''\n    }\n\n    return { nextConfig, deploymentId }\n  }\n\n  public async prepare(\n    req: IncomingMessage | BaseNextRequest,\n    res: ServerResponse | null,\n    {\n      srcPage,\n      multiZoneDraftMode,\n    }: {\n      srcPage: string\n      multiZoneDraftMode?: boolean\n    }\n  ): Promise<\n    | {\n        buildId: string\n        deploymentId: string\n        clientAssetToken: string\n        locale?: string\n        locales?: readonly string[]\n        defaultLocale?: string\n        query: ParsedUrlQuery\n        originalQuery: ParsedUrlQuery\n        originalPathname: string\n        params?: ParsedUrlQuery\n        parsedUrl: UrlWithParsedQuery\n        previewData: PreviewData\n        pageIsDynamic: boolean\n        isDraftMode: boolean\n        resolvedPathname: string\n        encodedResolvedPathname: string\n        isNextDataRequest: boolean\n        buildManifest: DeepReadonly<BuildManifest>\n        fallbackBuildManifest: DeepReadonly<BuildManifest>\n        nextFontManifest: DeepReadonly<NextFontManifest>\n        serverFilesManifest:\n          | DeepReadonly<RequiredServerFilesManifest>\n          | undefined\n        reactLoadableManifest: DeepReadonly<ReactLoadableManifest>\n        routesManifest: DeepReadonly<DevRoutesManifest>\n        prerenderManifest: DeepReadonly<PrerenderManifest>\n        // we can't pull in the client reference type or it causes issues with\n        // our pre-compiled types\n        clientReferenceManifest?: any\n        serverActionsManifest?: any\n        dynamicCssManifest?: any\n        subresourceIntegrityManifest?: DeepReadonly<Record<string, string>>\n        isOnDemandRevalidate: boolean\n        revalidateOnlyGenerated: boolean\n        nextConfig: NextConfigRuntime\n        routerServerContext?: RouterServerContext[string]\n        interceptionRoutePatterns?: any\n      }\n    | undefined\n  > {\n    let absoluteProjectDir: string | undefined\n\n    // edge runtime handles loading instrumentation at the edge adapter level\n    if (process.env.NEXT_RUNTIME !== 'edge') {\n      const { join, relative } =\n        require('node:path') as typeof import('node:path')\n\n      absoluteProjectDir = join(\n        /* turbopackIgnore: true */\n        process.cwd(),\n        getRequestMeta(req, 'relativeProjectDir') || this.relativeProjectDir\n      )\n\n      const absoluteDistDir = getRequestMeta(req, 'distDir')\n\n      if (absoluteDistDir) {\n        this.distDir = relative(absoluteProjectDir, absoluteDistDir)\n      }\n      const { ensureInstrumentationRegistered } = await import(\n        '../lib/router-utils/instrumentation-globals.external.js'\n      )\n      // ensure instrumentation is registered and pass\n      // onRequestError below\n      ensureInstrumentationRegistered(absoluteProjectDir, this.distDir)\n    }\n    const manifests = this.loadManifests(srcPage, absoluteProjectDir)\n    const { routesManifest, prerenderManifest, serverFilesManifest } = manifests\n\n    const { basePath, i18n, rewrites } = routesManifest\n\n    const routerServerContext = this.getRouterServerContext(req)\n    const nextConfig =\n      routerServerContext?.nextConfig || serverFilesManifest?.config\n\n    // Injected in base-server.ts\n    const protocol = req.headers['x-forwarded-proto']?.includes('https')\n      ? 'https'\n      : 'http'\n\n    // When there are hostname and port we build an absolute URL\n    if (!getRequestMeta(req, 'initURL')) {\n      const initUrl = serverFilesManifest?.config.experimental.trustHostHeader\n        ? `${protocol}://${req.headers.host || 'localhost'}${req.url}`\n        : `${protocol}://${routerServerContext?.hostname || 'localhost'}${req.url}`\n\n      addRequestMeta(req, 'initURL', initUrl)\n      addRequestMeta(req, 'initProtocol', protocol)\n    }\n\n    if (basePath) {\n      req.url = removePathPrefix(req.url || '/', basePath)\n    }\n\n    const parsedUrl = parseReqUrl(req.url || '/')\n    addRequestMeta(req, 'initQuery', { ...parsedUrl?.query })\n    // if we couldn't parse the URL we can't continue\n    if (!parsedUrl) {\n      return\n    }\n    let isNextDataRequest = false\n\n    if (pathHasPrefix(parsedUrl.pathname || '/', '/_next/data')) {\n      isNextDataRequest = true\n      parsedUrl.pathname = normalizeDataPath(parsedUrl.pathname || '/')\n    }\n    this.normalizeUrl(req, parsedUrl)\n    let originalPathname = parsedUrl.pathname || '/'\n    const originalQuery = { ...parsedUrl.query }\n    const pageIsDynamic = isDynamicRoute(srcPage)\n\n    let localeResult: PathLocale | undefined\n    let detectedLocale: string | undefined\n\n    if (i18n) {\n      localeResult = normalizeLocalePath(\n        parsedUrl.pathname || '/',\n        i18n.locales\n      )\n\n      if (localeResult.detectedLocale) {\n        req.url = `${localeResult.pathname}${parsedUrl.search}`\n        originalPathname = localeResult.pathname\n\n        if (!detectedLocale) {\n          detectedLocale = localeResult.detectedLocale\n        }\n      }\n    }\n\n    // Normalize the page path for route matching. The srcPage contains the\n    // internal page path (e.g., /app/[slug]/page), but route matchers expect\n    // the pathname format (e.g., /app/[slug]).\n    const normalizedSrcPage = normalizeAppPath(srcPage)\n\n    const serverUtils = getServerUtils({\n      page: normalizedSrcPage,\n      i18n,\n      basePath,\n      rewrites,\n      pageIsDynamic,\n      trailingSlash: process.env.__NEXT_TRAILING_SLASH as any as boolean,\n      caseSensitive: Boolean(routesManifest.caseSensitive),\n    })\n\n    const domainLocale = detectDomainLocale(\n      i18n?.domains,\n      getHostname(parsedUrl, req.headers),\n      detectedLocale\n    )\n\n    if (Boolean(domainLocale)) {\n      addRequestMeta(req, 'isLocaleDomain', Boolean(domainLocale))\n    }\n\n    const defaultLocale =\n      getRequestMeta(req, 'defaultLocale') ||\n      domainLocale?.defaultLocale ||\n      i18n?.defaultLocale\n\n    // Ensure parsedUrl.pathname includes locale before processing\n    // rewrites or they won't match correctly.\n    if (defaultLocale && !detectedLocale) {\n      parsedUrl.pathname = `/${defaultLocale}${parsedUrl.pathname === '/' ? '' : parsedUrl.pathname}`\n    }\n    const locale =\n      getRequestMeta(req, 'locale') || detectedLocale || defaultLocale\n\n    // we apply rewrites against cloned URL so that we don't\n    // modify the original with the rewrite destination\n    const { rewriteParams, rewrittenParsedUrl } = serverUtils.handleRewrites(\n      req,\n      parsedUrl\n    )\n    const rewriteParamKeys = Object.keys(rewriteParams)\n    Object.assign(parsedUrl.query, rewrittenParsedUrl.query)\n\n    // after processing rewrites we want to remove locale\n    // from parsedUrl pathname\n    if (i18n) {\n      parsedUrl.pathname = normalizeLocalePath(\n        parsedUrl.pathname || '/',\n        i18n.locales\n      ).pathname\n\n      rewrittenParsedUrl.pathname = normalizeLocalePath(\n        rewrittenParsedUrl.pathname || '/',\n        i18n.locales\n      ).pathname\n    }\n\n    let params: Record<string, undefined | string | string[]> | undefined =\n      getRequestMeta(req, 'params')\n\n    // attempt parsing from pathname\n    if (!params && serverUtils.dynamicRouteMatcher) {\n      const paramsMatch = serverUtils.dynamicRouteMatcher(\n        normalizeDataPath(\n          rewrittenParsedUrl?.pathname || parsedUrl.pathname || '/'\n        )\n      )\n      const paramsResult = serverUtils.normalizeDynamicRouteParams(\n        paramsMatch || {},\n        true\n      )\n\n      if (paramsResult.hasValidParams) {\n        params = paramsResult.params\n      }\n    }\n\n    // Local \"next start\" expects the routing parsed query values\n    // to not be present in the URL although when deployed proxies\n    // will add query values from resolving the routes to pass to function.\n\n    // TODO: do we want to change expectations for \"next start\"\n    // to include these query values in the URL which affects asPath\n    // but would match deployed behavior, e.g. a rewrite from middleware\n    // that adds a query param would be in asPath as query but locally\n    // it won't be in the asPath but still available in the query object\n    const query = getRequestMeta(req, 'query') || {\n      ...parsedUrl.query,\n    }\n\n    const routeParamKeys = new Set<string>()\n    const combinedParamKeys = []\n\n    // We don't include rewriteParamKeys in the combinedParamKeys\n    // for app router since the searchParams is populated from the\n    // URL so we don't want to strip the rewrite params from the URL\n    // so that searchParams can include them.\n    if (\n      this.definition.kind === RouteKind.PAGES ||\n      this.definition.kind === RouteKind.PAGES_API\n    ) {\n      for (const key of [\n        ...rewriteParamKeys,\n        ...Object.keys(serverUtils.defaultRouteMatches || {}),\n      ]) {\n        // We only want to filter rewrite param keys from the URL\n        // if they are matches from the URL e.g. the key/value matches\n        // before and after applying the rewrites /:path for /hello and\n        // { path: 'hello' } but not for { path: 'another' } and /hello\n        // TODO: we should prefix rewrite param keys the same as we do\n        // for dynamic routes so we can identify them properly\n        const originalValue = Array.isArray(originalQuery[key])\n          ? originalQuery[key].join('')\n          : originalQuery[key]\n\n        const queryValue = Array.isArray(query[key])\n          ? query[key].join('')\n          : query[key]\n\n        if (!(key in originalQuery) || originalValue === queryValue) {\n          combinedParamKeys.push(key)\n        }\n      }\n    }\n\n    serverUtils.normalizeCdnUrl(req, combinedParamKeys)\n    serverUtils.normalizeQueryParams(query, routeParamKeys)\n    serverUtils.filterInternalQuery(originalQuery, combinedParamKeys)\n\n    if (pageIsDynamic) {\n      const queryResult = serverUtils.normalizeDynamicRouteParams(query, true)\n\n      const paramsResult = serverUtils.normalizeDynamicRouteParams(\n        params || {},\n        true\n      )\n\n      let paramsToInterpolate: ParsedUrlQuery\n\n      if (\n        // if both query and params are valid but one\n        // provided more information and the query params\n        // were nxtP prefixed rely on that one\n        query &&\n        params &&\n        paramsResult.hasValidParams &&\n        queryResult.hasValidParams &&\n        routeParamKeys.size > 0 &&\n        Object.keys(paramsResult.params).length <=\n          Object.keys(queryResult.params).length\n      ) {\n        paramsToInterpolate = queryResult.params\n        params = Object.assign(queryResult.params)\n      } else {\n        paramsToInterpolate =\n          paramsResult.hasValidParams && params\n            ? params\n            : queryResult.hasValidParams\n              ? query\n              : {}\n      }\n\n      req.url = serverUtils.interpolateDynamicPath(\n        req.url || '/',\n        paramsToInterpolate\n      )\n      parsedUrl.pathname = serverUtils.interpolateDynamicPath(\n        parsedUrl.pathname || '/',\n        paramsToInterpolate\n      )\n      originalPathname = serverUtils.interpolateDynamicPath(\n        originalPathname,\n        paramsToInterpolate\n      )\n\n      // try pulling from query if valid\n      if (!params) {\n        if (queryResult.hasValidParams) {\n          params = Object.assign({}, queryResult.params)\n\n          // If we pulled from query remove it so it's\n          // only in params\n          for (const key in serverUtils.defaultRouteMatches) {\n            delete query[key]\n          }\n        } else {\n          // use final params from URL matching\n          const paramsMatch = serverUtils.dynamicRouteMatcher?.(\n            normalizeDataPath(\n              localeResult?.pathname || parsedUrl.pathname || '/'\n            )\n          )\n          // we don't normalize these as they are allowed to be\n          // the literal slug matches here e.g. /blog/[slug]\n          // actually being requested\n          if (paramsMatch) {\n            params = Object.assign({}, paramsMatch)\n          }\n        }\n      }\n    }\n\n    // Remove any normalized params from the query if they\n    // weren't present as non-prefixed query key e.g.\n    // ?search=1&nxtPsearch=hello we don't delete search\n    for (const key of routeParamKeys) {\n      if (!(key in originalQuery)) {\n        delete query[key]\n        // handle the case where there's collision and we\n        // normalized nxtPid=123 -> id=123 but user also\n        // sends id=456 as separate key\n      } else if (\n        originalQuery[key] &&\n        query[key] &&\n        originalQuery[key] !== query[key]\n      ) {\n        query[key] = originalQuery[key]\n      }\n    }\n\n    const { isOnDemandRevalidate, revalidateOnlyGenerated } =\n      checkIsOnDemandRevalidate(req, prerenderManifest.preview)\n\n    let isDraftMode = false\n    let previewData: PreviewData\n\n    // preview data relies on non-edge utils\n    if (process.env.NEXT_RUNTIME !== 'edge' && res) {\n      const { tryGetPreviewData } =\n        require('../api-utils/node/try-get-preview-data') as typeof import('../api-utils/node/try-get-preview-data')\n\n      previewData = tryGetPreviewData(\n        req,\n        res,\n        prerenderManifest.preview,\n        Boolean(multiZoneDraftMode)\n      )\n      isDraftMode = previewData !== false\n    }\n\n    if (!nextConfig) {\n      throw new Error(\"Invariant: nextConfig couldn't be loaded\")\n    }\n\n    if (process.env.NEXT_RUNTIME !== 'edge') {\n      const { installProcessErrorHandlers } =\n        require('../node-environment-extensions/process-error-handlers') as typeof import('../node-environment-extensions/process-error-handlers')\n\n      installProcessErrorHandlers(\n        Boolean(\n          nextConfig.experimental.removeUncaughtErrorAndRejectionListeners\n        )\n      )\n    }\n\n    let resolvedPathname = normalizedSrcPage\n    if (isDynamicRoute(resolvedPathname) && params) {\n      resolvedPathname = serverUtils.interpolateDynamicPath(\n        resolvedPathname,\n        params\n      )\n    }\n\n    if (resolvedPathname === '/index') {\n      resolvedPathname = '/'\n    }\n\n    if (\n      res &&\n      Boolean(req.headers['x-nextjs-data']) &&\n      (!res.statusCode || res.statusCode === 200)\n    ) {\n      res.setHeader(\n        'x-nextjs-matched-path',\n        removeTrailingSlash(`${locale ? `/${locale}` : ''}${normalizedSrcPage}`)\n      )\n    }\n    const encodedResolvedPathname = resolvedPathname\n\n    // we decode for cache key/manifest usage encoded is\n    // for URL building\n    try {\n      resolvedPathname = decodePathParams(resolvedPathname)\n    } catch (_) {}\n\n    resolvedPathname = removeTrailingSlash(resolvedPathname)\n    addRequestMeta(req, 'resolvedPathname', resolvedPathname)\n\n    let deploymentId\n    if (nextConfig.experimental?.runtimeServerDeploymentId) {\n      if (!process.env.NEXT_DEPLOYMENT_ID) {\n        throw new Error(\n          'process.env.NEXT_DEPLOYMENT_ID is missing but runtimeServerDeploymentId is enabled'\n        )\n      }\n      deploymentId = process.env.NEXT_DEPLOYMENT_ID\n    } else {\n      deploymentId = nextConfig.deploymentId || ''\n    }\n\n    return {\n      query,\n      originalQuery,\n      originalPathname,\n      params,\n      parsedUrl,\n      locale,\n      isNextDataRequest,\n      locales: i18n?.locales,\n      defaultLocale,\n      isDraftMode,\n      previewData,\n      pageIsDynamic,\n      resolvedPathname,\n      encodedResolvedPathname,\n      isOnDemandRevalidate,\n      revalidateOnlyGenerated,\n      ...manifests,\n      // loadManifest returns a readonly object, but we don't want to propagate that throughout the\n      // whole codebase (for now)\n      nextConfig:\n        nextConfig satisfies DeepReadonly<NextConfigRuntime> as NextConfigRuntime,\n      routerServerContext,\n      deploymentId,\n      clientAssetToken:\n        nextConfig.experimental.immutableAssetToken || deploymentId,\n    }\n  }\n\n  public getResponseCache(req: IncomingMessage | BaseNextRequest) {\n    if (!this.responseCache) {\n      const minimalMode = getRequestMeta(req, 'minimalMode') ?? false\n      this.responseCache = new ResponseCache(minimalMode)\n    }\n    return this.responseCache\n  }\n\n  public async handleResponse({\n    req,\n    nextConfig,\n    cacheKey,\n    routeKind,\n    isFallback,\n    prerenderManifest,\n    isRoutePPREnabled,\n    isOnDemandRevalidate,\n    revalidateOnlyGenerated,\n    responseGenerator,\n    waitUntil,\n    isMinimalMode,\n  }: {\n    req: IncomingMessage | BaseNextRequest\n    nextConfig: NextConfigRuntime\n    cacheKey: string | null\n    routeKind: RouteKind\n    isFallback?: boolean\n    prerenderManifest: DeepReadonly<PrerenderManifest>\n    isRoutePPREnabled?: boolean\n    isOnDemandRevalidate?: boolean\n    revalidateOnlyGenerated?: boolean\n    responseGenerator: ResponseGenerator\n    waitUntil?: (prom: Promise<any>) => void\n    isMinimalMode: boolean\n  }) {\n    const responseCache = this.getResponseCache(req)\n    const cacheEntry = await responseCache.get(cacheKey, responseGenerator, {\n      routeKind,\n      isFallback,\n      isRoutePPREnabled,\n      isOnDemandRevalidate,\n      isPrefetch: req.headers.purpose === 'prefetch',\n      // Use x-invocation-id header to scope the in-memory cache to a single\n      // revalidation request in minimal mode.\n      invocationID: req.headers['x-invocation-id'] as string | undefined,\n      incrementalCache: await this.getIncrementalCache(\n        req,\n        nextConfig,\n        prerenderManifest,\n        isMinimalMode\n      ),\n      waitUntil,\n    })\n\n    if (!cacheEntry) {\n      if (\n        cacheKey &&\n        // revalidate only generated can bail even if cacheKey is provided\n        !(isOnDemandRevalidate && revalidateOnlyGenerated)\n      ) {\n        // A cache entry might not be generated if a response is written\n        // in `getInitialProps` or `getServerSideProps`, but those shouldn't\n        // have a cache key. If we do have a cache key but we don't end up\n        // with a cache entry, then either Next.js or the application has a\n        // bug that needs fixing.\n        throw new Error('invariant: cache entry required but not generated')\n      }\n    }\n    return cacheEntry\n  }\n}\n","export function isAppRouteRoute(route: string): boolean {\n  return route.endsWith('/route')\n}\n","/**\n * For a given page path, this function ensures that there is no backslash\n * escaping slashes in the path. Example:\n *  - `foo\\/bar\\/baz` -> `foo/bar/baz`\n */\nexport function normalizePathSep(path: string): string {\n  return path.replace(/\\\\/g, '/')\n}\n","import type { Key } from 'next/dist/compiled/path-to-regexp'\nimport { regexpToFunction } from 'next/dist/compiled/path-to-regexp'\nimport { pathToRegexp } from 'next/dist/compiled/path-to-regexp'\n\ninterface Options {\n  /**\n   * A transformer function that will be applied to the regexp generated\n   * from the provided path and path-to-regexp.\n   */\n  regexModifier?: (regex: string) => string\n  /**\n   * When true the function will remove all unnamed parameters\n   * from the matched parameters.\n   */\n  removeUnnamedParams?: boolean\n  /**\n   * When true the regexp won't allow an optional trailing delimiter\n   * to match.\n   */\n  strict?: boolean\n\n  /**\n   * When true the matcher will be case-sensitive, defaults to false\n   */\n  sensitive?: boolean\n}\n\nexport type PatchMatcher = (\n  pathname: string,\n  params?: Record<string, any>\n) => Record<string, any> | false\n\n/**\n * Generates a path matcher function for a given path and options based on\n * path-to-regexp. By default the match will be case insensitive, non strict\n * and delimited by `/`.\n */\nexport function getPathMatch(path: string, options?: Options): PatchMatcher {\n  const keys: Key[] = []\n  const regexp = pathToRegexp(path, keys, {\n    delimiter: '/',\n    sensitive:\n      typeof options?.sensitive === 'boolean' ? options.sensitive : false,\n    strict: options?.strict,\n  })\n\n  const matcher = regexpToFunction<Record<string, any>>(\n    options?.regexModifier\n      ? new RegExp(options.regexModifier(regexp.source), regexp.flags)\n      : regexp,\n    keys\n  )\n\n  /**\n   * A matcher function that will check if a given pathname matches the path\n   * given in the builder function. When the path does not match it will return\n   * `false` but if it does it will return an object with the matched params\n   * merged with the params provided in the second argument.\n   */\n  return (pathname, params) => {\n    // If no pathname is provided it's not a match.\n    if (typeof pathname !== 'string') return false\n\n    const match = matcher(pathname)\n\n    // If the path did not match `false` will be returned.\n    if (!match) return false\n\n    /**\n     * If unnamed params are not allowed they must be removed from\n     * the matched parameters. path-to-regexp uses \"string\" for named and\n     * \"number\" for unnamed parameters.\n     */\n    if (options?.removeUnnamedParams) {\n      for (const key of keys) {\n        if (typeof key.name === 'number') {\n          delete match.params[key.name]\n        }\n      }\n    }\n\n    return { ...params, ...match.params }\n  }\n}\n","import type { NextApiRequestCookies } from '.'\n\n/**\n * Parse cookies from the `headers` of request\n * @param req request object\n */\n\nexport function getCookieParser(headers: {\n  [key: string]: string | string[] | null | undefined\n}): () => NextApiRequestCookies {\n  return function parseCookie(): NextApiRequestCookies {\n    const { cookie } = headers\n\n    if (!cookie) {\n      return {}\n    }\n\n    const { parse: parseCookieFn } =\n      require('next/dist/compiled/cookie') as typeof import('next/dist/compiled/cookie')\n    return parseCookieFn(Array.isArray(cookie) ? cookie.join('; ') : cookie)\n  }\n}\n","import type { ParsedUrlQuery } from 'querystring'\n\nimport { searchParamsToUrlQuery } from './querystring'\nimport { parseRelativeUrl } from './parse-relative-url'\n\nexport interface ParsedUrl {\n  auth: string | null\n  hash: string\n  hostname: string | null\n  href: string\n  origin?: string | null\n  pathname: string\n  port: string | null\n  protocol: string | null\n  query: ParsedUrlQuery\n  search: string\n  slashes: boolean | null\n}\n\nexport function parseUrl(url: string): ParsedUrl {\n  if (url.startsWith('/')) {\n    return parseRelativeUrl(url)\n  }\n\n  const parsedURL = new URL(url)\n  const username = parsedURL.username\n  const password = parsedURL.password\n  const auth = username\n    ? password\n      ? `${username}:${password}`\n      : username\n    : null\n  const pathname = parsedURL.pathname\n  const search = parsedURL.search\n  return {\n    auth,\n    hash: parsedURL.hash,\n    hostname: parsedURL.hostname,\n    href: parsedURL.href,\n    pathname,\n    port: parsedURL.port,\n    protocol: parsedURL.protocol,\n    query: searchParamsToUrlQuery(parsedURL.searchParams),\n    search,\n    origin: parsedURL.origin,\n    slashes:\n      parsedURL.href.slice(\n        parsedURL.protocol.length,\n        parsedURL.protocol.length + 2\n      ) === '//',\n  }\n}\n","import escapePathDelimiters from '../../../shared/lib/router/utils/escape-path-delimiters'\nimport { DecodeError } from '../../../shared/lib/utils'\n\n/**\n * We only encode path delimiters for path segments from\n * getStaticPaths so we need to attempt decoding the URL\n * to match against and only escape the path delimiters\n * this allows non-ascii values to be handled e.g.\n * Japanese characters.\n * */\nfunction decodePathParams(pathname: string): string {\n  // TODO: investigate adding this handling for non-SSG\n  // pages so non-ascii names also work there.\n  return pathname\n    .split('/')\n    .map((seg) => {\n      try {\n        seg = escapePathDelimiters(decodeURIComponent(seg), true)\n      } catch (_) {\n        // An improperly encoded URL was provided\n        throw new DecodeError('Failed to decode path param(s).')\n      }\n      return seg\n    })\n    .join('/')\n}\n\nexport { decodePathParams }\n","// escape delimiters used by path-to-regexp\nexport default function escapePathDelimiters(\n  segment: string,\n  escapeEncoded?: boolean\n): string {\n  return segment.replace(\n    new RegExp(`([/#?]${escapeEncoded ? '|%(2f|23|3f|5c)' : ''})`, 'gi'),\n    (char: string) => encodeURIComponent(char)\n  )\n}\n","import React from 'react'\nimport type { NextRouter } from './router/router'\n\nexport const RouterContext = React.createContext<NextRouter | null>(null)\n\nif (process.env.NODE_ENV !== 'production') {\n  RouterContext.displayName = 'RouterContext'\n}\n","import type {\n  DynamicPrerenderManifestRoute,\n  PrerenderManifest,\n} from '../../../../build'\nimport type { DeepReadonly } from '../../../../shared/lib/deep-readonly'\nimport {\n  getRouteMatcher,\n  type RouteMatchFn,\n} from '../../../../shared/lib/router/utils/route-matcher'\nimport { getRouteRegex } from '../../../../shared/lib/router/utils/route-regex'\n\n/**\n * A matcher for a dynamic route.\n */\ntype Matcher = {\n  /**\n   * The matcher for the dynamic route. This is lazily created when the matcher\n   * is first used.\n   */\n  matcher?: RouteMatchFn\n\n  /**\n   * The source of the dynamic route.\n   */\n  source: string\n\n  /**\n   * The route that matches the source.\n   */\n  route: DeepReadonly<DynamicPrerenderManifestRoute>\n}\n\nexport type PrerenderManifestMatch = {\n  source: string\n  route: DeepReadonly<DynamicPrerenderManifestRoute>\n}\n\n/**\n * A matcher for the prerender manifest.\n *\n * This class is used to match the pathname to the dynamic route.\n */\nexport class PrerenderManifestMatcher {\n  private readonly matchers: Array<Matcher>\n  constructor(\n    pathname: string,\n    prerenderManifest: DeepReadonly<PrerenderManifest>\n  ) {\n    this.matchers = Object.entries(prerenderManifest.dynamicRoutes)\n      .filter(([source, route]) => {\n        // If the pathname is a fallback source route, or the source route is\n        // the same as the pathname, then we should include it in the matchers.\n        return route.fallbackSourceRoute === pathname || source === pathname\n      })\n      .map(([source, route]) => ({ source, route }))\n  }\n\n  /**\n   * Match the pathname to the dynamic route. If no match is found, an error is\n   * thrown.\n   *\n   * @param pathname - The pathname to match.\n   * @returns The dynamic route that matches the pathname.\n   */\n  public match(pathname: string): PrerenderManifestMatch | null {\n    // Iterate over the matchers. They're already in the correct order of\n    // specificity as they were inserted into the prerender manifest that way\n    // and iterating over them with Object.entries guarantees that.\n    for (const matcher of this.matchers) {\n      // Lazily create the matcher, this is only done once per matcher.\n      if (!matcher.matcher) {\n        matcher.matcher = getRouteMatcher(getRouteRegex(matcher.source))\n      }\n\n      const match = matcher.matcher(pathname)\n      if (match) {\n        return {\n          source: matcher.source,\n          route: matcher.route,\n        }\n      }\n    }\n\n    return null\n  }\n}\n","import type { Normalizer } from '../normalizer'\n\nexport class SuffixPathnameNormalizer implements Normalizer {\n  constructor(private readonly suffix: string) {}\n\n  public match(pathname: string) {\n    // If the pathname doesn't end in the suffix, we don't match.\n    if (!pathname.endsWith(this.suffix)) return false\n\n    return true\n  }\n\n  public normalize(pathname: string, matched?: boolean): string {\n    // If we're not matched and we don't match, we don't need to normalize.\n    if (!matched && !this.match(pathname)) return pathname\n\n    return pathname.substring(0, pathname.length - this.suffix.length)\n  }\n}\n","import type { PathnameNormalizer } from './pathname-normalizer'\n\nimport { RSC_SUFFIX } from '../../../lib/constants'\nimport { SuffixPathnameNormalizer } from './suffix'\n\nexport class RSCPathnameNormalizer\n  extends SuffixPathnameNormalizer\n  implements PathnameNormalizer\n{\n  constructor() {\n    super(RSC_SUFFIX)\n  }\n}\n","import type { PathnameNormalizer } from './pathname-normalizer'\n\nimport {\n  RSC_SEGMENT_SUFFIX,\n  RSC_SEGMENTS_DIR_SUFFIX,\n} from '../../../lib/constants'\nimport { escapeStringRegexp } from '../../../shared/lib/escape-regexp'\n\nconst PATTERN = new RegExp(\n  `^(/.*)${escapeStringRegexp(RSC_SEGMENTS_DIR_SUFFIX)}(/.*)${escapeStringRegexp(RSC_SEGMENT_SUFFIX)}$`\n)\n\nexport class SegmentPrefixRSCPathnameNormalizer implements PathnameNormalizer {\n  public match(pathname: string): boolean {\n    return PATTERN.test(pathname)\n  }\n\n  public extract(pathname: string) {\n    const match = pathname.match(PATTERN)\n    if (!match) return null\n\n    return { originalPathname: match[1], segmentPath: match[2] }\n  }\n\n  public normalize(pathname: string): string {\n    const match = this.extract(pathname)\n    if (!match) return pathname\n\n    return match.originalPathname\n  }\n}\n","import type { IncomingMessage } from 'http'\n\nimport type { BaseNextRequest } from '../../base-http'\nimport { parseReqUrl } from '../../../lib/url'\nimport { formatUrl } from '../../../shared/lib/router/utils/format-url'\n\nexport function normalizeAppPageRequestUrl(\n  req: Pick<IncomingMessage | BaseNextRequest, 'url'>,\n  pathname: string\n) {\n  if (!req.url) {\n    return\n  }\n\n  const normalizedUrl = parseReqUrl(req.url)\n  if (!normalizedUrl) {\n    return\n  }\n\n  normalizedUrl.pathname = pathname\n  req.url = formatUrl(normalizedUrl)\n}\n"],"names":["leafPrototypes","getProto","installedChunks","b","error","Error","exports","require","version","renderToReadableStream","resume","__defProp","Object","__getOwnPropDesc","__getOwnPropNames","__hasOwnProp","src_exports","all","RequestCookies","ResponseCookies","parseCookie","parseSetCookie","stringifyCookie","name","c","_a","attrs","Date","Boolean","stringified","encodeURIComponent","cookie","map","Map","pair","splitAt","key","decodeURIComponent","setCookie","attributes","domain","expires","httponly","maxage","path","samesite","secure","partitioned","priority","value2","string","t","Number","SAME_SITE","PRIORITY","newT","to","from","except","desc","requestHeaders","header","Symbol","args","Array","_","n","names","result","JSON","v","responseHeaders","_b","_c","cookieString","cookiesString","start","ch","lastComma","nextStart","cookiesSeparatorFound","cookiesStrings","pos","skipWhitespace","parsed","bag","headers","serialized","options","e","i","s","r","a","o","f","l","h","Buffer","u","d","noop","HeaderParser","g","w","FileStream","process","k","nullDecoder","finalcb","checkEndState","z","E","M","L","A","p","y","m","C","S","P","T","x","B","K","D","U","V","W","ssCb","Math","readPctEnc","String","skipKeyBytes","skipValBytes","getDecoder","TextDecoder","convertToUTF8","memcmp","matchNeedle","__dirname","parse","format","isNaN","parseFloat","parseInt","__nccwpck_require__","TypeError","isFinite","empty","Events","EE","addListener","clearEvent","EventEmitter","arguments","Promise","TimeoutError","pTimeout","setTimeout","clearTimeout","clearInterval","setInterval","run","tryConsume","mustConsume","consumeText","isSafe","safePattern","escapeString","tokensToFunction","flags","RegExp","regexpToFunction","tokensToRegexp","R","pathToRegexp","styleReplacer","match","prefix","suffix","scriptReplacer","getIteratorFn","maybeIterable","MAYBE_ITERATOR_SYMBOL","objectName","object","describeKeyForErrorMessage","encodedKey","describeValueForErrorMessage","isArrayImpl","CLIENT_REFERENCE_TAG","describeElementType","type","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_VIEW_TRANSITION_TYPE","REACT_FORWARD_REF_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","payload","flushBuffered","destination","writeChunk","chunk","writtenBytes","writeToDestination","currentView","Uint8Array","target","read","textEncoder","view","destinationHasCapacity$1","writeChunkAndReturn","completeWriting","stringToPrecomputedChunk","content","console","byteLengthOfChunk","typeName","willCoercionThrow","checkAttributeStringCoercion","attributeName","checkCSSPropertyStringCoercion","propName","checkHtmlStringCoercion","isAttributeNameSafe","hasOwnProperty","validatedAttributeNameCache","illegalAttributeNameCache","VALID_ATTRIBUTE_NAME_REGEX","checkControlledValueProps","tagName","props","hasReadOnlyValue","escapeTextForBrowser","text","matchHtmlRegExp","index","html","lastIndex","sanitizeURL","url","isJavaScriptProtocol","escapeEntireInlineScriptContent","scriptText","scriptRegex","createRenderState","resumableState","nonce","externalRuntimeConfig","importMap","onHeaders","maxHeadersLength","inlineScriptWithNonce","startInlineScript","nonceStyle","inlineStyleWithNonce","startInlineStyle","idPrefix","bootstrapChunks","bootstrapScriptContent","bootstrapScripts","bootstrapModules","pushCompletedShellIdAttribute","endOfStartTag","endInlineScript","importMapScriptStart","importMapScriptEnd","createPreambleState","Set","preloadBootstrapScriptOrModule","startScriptSrc","attributeEnd","scriptNonce","scriptIntegirty","scriptCrossOrigin","endAsyncScript","startModuleSrc","createResumableState","identifierPrefix","NothingSent","createFormatContext","insertionMode","selectedValue","tagScope","viewTransition","createRootFormatContext","namespaceURI","SVG_MODE","MATHML_MODE","ROOT_HTML_MODE","getChildFormatContext","parentContext","subtreeScope","HTML_MODE","HTML_TABLE_MODE","HTML_TABLE_BODY_MODE","HTML_COLGROUP_MODE","HTML_TABLE_ROW_MODE","HTML_HEAD_MODE","HTML_HTML_MODE","getSuspenseViewTransition","parentViewTransition","getSuspenseFallbackFormatContext","NeedUpgradeToViewTransitions","getSuspenseContentFormatContext","makeId","treeId","localId","pushTextInstance","renderState","textEmbedded","textSeparator","pushViewTransitionAttributes","formatContext","pushStringAttribute","pushStyleAttribute","style","styleName","isFirst","styleValue","nameChunk","warnedStyleNames","msPattern$1","hyphenPattern","character","badVendoredStyleNamePattern","badStyleValueWithSemicolonPattern","value$jscomp$0","warnedStyleValues","warnedForNaNValue","warnedForInfinityValue","styleNameCache","uppercasePattern","msPattern","unitlessNumbers","styleAttributeStart","styleAssign","styleSeparator","pushBooleanAttribute","attributeSeparator","attributeEmptyString","attributeAssign","pushAdditionalFormField","startHiddenInputChunk","validateAdditionalFormField","endOfStartTagSelfClosing","getCustomFormFields","formAction","id","customFields","formData","pushFormActionAttribute","formEncType","formMethod","formTarget","didWarnFormActionName","didWarnFormActionMethod","didWarnFormActionTarget","actionJavaScriptURL","injectFormReplayingRuntime","pushAttribute","didWarnForNewBooleanPropsWithEmptyValue","aliases","pushInnerHTML","innerHTML","children","checkSelectProp","preamble","formReplayingRuntimeScript","pushLinkImpl","propKey","startChunkForTag","propValue","escapeStyleTextContent","styleText","styleRegex","pushSelfClosing","tag","pushTitleImpl","endChunkForTag","pushScriptImpl","pushStartSingletonElement","pushStartGenericElement","tagStartChunk","validatedTagCache","VALID_TAG_REGEX","endTagCache","hoistPreambleState","preambleState","writeBootstrap","writeStartPendingSuspenseBoundary","startPendingSuspenseBoundary1","startPendingSuspenseBoundary2","escapeJSStringsForInstructionScripts","input","regexForJSStringsInInstructionScripts","escapeJSObjectForInstructionScripts","regexForJSStringsInScripts","flushStyleTagsLateForBoundary","styleQueue","rules","hrefs","currentlyFlushingRenderState","lateStyleTagResourceOpen1","lateStyleTagResourceOpen2","spaceSeparator","lateStyleTagResourceOpen3","destinationHasCapacity","lateStyleTagTemplateClose","currentlyRenderingBoundaryHasStylesToHoist","hasStylesToHoist","stylesheet","PREAMBLE","writeHoistablesForBoundary","hoistableState","flushResource","resource","flushStyleInPreamble","stylesheetFlushingQueue","flushStylesInPreamble","hasStylesheets","styleTagResourceOpen1","styleTagResourceOpen2","styleTagResourceOpen3","styleTagResourceClose","preloadLateStyle","PENDING$1","PRELOADED","preloadLateStyles","SentCompletedShellId","completedShellIdAttributeStart","createHoistableState","href","EXISTS","adoptPreloadCredentials","preloadState","getPreloadAsHeader","as","params","paramName","escapeHrefForLinkHeaderURLContext","escapeStringForLinkHeaderQuotedParamValueContext","hrefInput","regexForHrefInLinkHeaderURLContext","escapeHrefForLinkHeaderURLContextReplacer","regexForLinkHeaderQuotedParamValueContext","escapeStringForLinkHeaderQuotedParamValueContextReplacer","hoistStyleQueueDependency","hoistStylesheetDependency","hoistHoistables","parentState","childState","hasSuspenseyContent","flushingInShell","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_FRAGMENT_TYPE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","innerType","popToNearestCommonAncestor","prev","next","parentNext","switchContext","newSnapshot","currentActiveSnapshot","pushAllNext","popAllPrevious","popPreviousToCommonLevel","popNextToCommonLevel","warnOnInvalidCallback","callback","didWarnOnInvalidCallback","warnNoop","publicInstance","callerName","warningKey","didWarnAboutNoopUpdateForComponent","getTreeId","context","overflow","clz32","pushTreeContext","baseContext","totalChildren","baseIdWithLeadingBit","baseLength","length","numberOfOverflowBits","getSuspendedThenable","suspendedThenable","thenable","resolveCurrentlyRenderingComponent","currentlyRenderingComponent","isInHookUserCodeInDev","createHook","numberOfReRenders","createWorkInProgressHook","workInProgressHook","firstWorkInProgressHook","isReRender","getThenableStateAfterSuspending","state","thenableState","resetHooksState","currentlyRenderingKeyPath","currentlyRenderingRequest","currentlyRenderingTask","didScheduleRenderPhaseUpdate","renderPhaseUpdates","readContext","basicStateReducer","action","useReducer","reducer","initialArg","init","currentHookNameInDev","firstRenderPhaseUpdate","dispatchAction","useMemo","nextCreate","deps","prevState","JSCompiler_inline_result","objectIs","componentIdentity","queue","throwOnUseEffectEventCall","unsupportedStartTransition","unsupportedSetOptimisticState","createPostbackActionStateKey","permalink","componentKeyPath","hookIndex","useActionState","initialState","actionStateHookIndex","actionStateCounter","request","nextPostbackStateKey","isSignatureEqual","postbackKey","actionStateMatchingIndex","boundAction","_boundAction","unwrapThenable","thenableIndexCounter","fulfilledValue","fulfilledThenable","rejectedThenable","shouldCaptureSuspendedCallSite","currentTask","currentTaskInDEV","currentComponentStack","suspendedCallSiteStack","suspendedCallSiteDebugTask","SuspenseException","unsupportedRefresh","disabledLog","prepareStackTrace","structuredStackTrace","formatOwnerStack","prevPrepareStackTrace","describeBuiltInComponentFrame","describeNativeComponentFrame","fn","construct","reentry","frame","componentFrameCache","previousDispatcher","ReactSharedInternals","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","Fake","Reflect","control","x$0","x$1","sample","namePropDescriptor","_RunInRootFrame$Deter","sampleStack","controlStack","sampleLines","controlLines","_frame","assign","describeComponentStackByType","lazyComponent","idx","getViewTransitionClassName","defaultClass","eventClass","resetOwnerStackLimit","now","getCurrentTime","lastResetTime","isEligibleForOutlining","boundary","defaultErrorHandler","bind","RequestInstance","rootFormatContext","progressiveChunkSize","onError","onAllReady","onShellReady","onShellError","onFatalError","formState","abortSet","createRequest","createPendingSegment","pushComponentStack","createRenderTask","emptyTreeContext","emptyContextObject","createPrerenderRequest","resumeRequest","postponedState","createReplayTask","resumeAndPrerenderRequest","resolveRequest","currentRequest","requestStorage","pingTask","task","scheduleMicrotask","performWork","setImmediate","createSuspenseBoundary","row","fallbackAbortableTasks","defer","PENDING","node","childIndex","blockedBoundary","blockedSegment","blockedPreamble","keyPath","treeContext","componentStack","legacyContext","debugTask","replay","parentFormatContext","lastPushedText","getCurrentStackInDEV","info","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","pushServerComponentStack","debugInfo","componentInfo","REACT_ELEMENT_TYPE","owner","stack","replaceSuspenseComponentStackWithSuspenseFallbackStack","getThrownInfo","node$jscomp$0","errorInfo","encodeErrorForBoundary","digest","thrownInfo","wasAborted","describeObjectForErrorMessage","objectOrArray","expandedName","objKind","jsxChildrenParents","jsxPropsParents","_value2","_substr2","logRecoverableError","fatalError","CLOSED","finishSuspenseListRow","unblockSuspenseListRow","unblockedRow","inheritedHoistables","unblockedBoundaries","unblockedBoundary","finishedTask","tryToResolveTogetherRow","togetherRow","boundaries","allCompleteAndInlinable","rowBoundary","createSuspenseListRow","previousRow","newRow","renderSuspenseListRows","rows","revealOrder","prevKeyPath","prevTreeContext","prevRow","previousComponentStack","previousDebugTask","previousSuspenseListRow","resumeSlots","resumeSegmentID","resumeNode","renderNode","warnForMissingKey","_node3","newSegment","COMPLETED","finishedSegment","thrownValue","ABORTED","ERRORED","renderWithHooks","Component","secondArg","prevThenableState","localIdCounter","callComponentInDEV","finishFunctionComponent","hasId","actionStateCount","didEmitActionStateMarkers","segment","formStateMarkerIsMatching","formStateMarkerIsNotMatching","renderNodeDestructive","renderElement","ref","newProps","defaultProps","_propName","resolvedProps","contextType","didWarnAboutInvalidateContextType","addendum","instance","componentName","didWarnAboutUninitializedState","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","_componentName","newApiName","didWarnAboutLegacyLifecyclesAndDerivedState","didWarnAboutChildContextTypes","didWarnAboutContextTypes$1","hasMutatedProps","didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate","classComponentUpdater","internalInstance","contextType$jscomp$0","componentName$jscomp$0","didWarnAboutDirectlyAssigningPropsToState","getDerivedStateFromProps","partialState","componentName$jscomp$1","didWarnAboutUndefinedDerivedState","oldState","componentName$jscomp$2","didWarnAboutDeprecatedWillMount","oldQueue","oldReplace","nextState","dontMutate","partial","partialState$jscomp$0","nextChildren","callRenderInDEV","didWarnAboutReassigningProps","componentName$jscomp$3","didWarnAboutBadClass","actionStateMatchingIndex$jscomp$0","_componentName$jscomp$0","didWarnAboutContextTypes","componentName$jscomp$4","didWarnAboutGetDerivedStateOnFunctionComponent","_componentName2","didWarnAboutContextTypeOnFunctionComponent","prevContext","prevKeyPath$jscomp$0","_children","target$jscomp$0","invalidProps","warnedProperties$1","rARIACamel$1","ariaProperties","rARIA$1","prop","didWarnValueNull","eventRegistry","unknownProps","warnedProperties","lowerCasedName","EVENT_NAME_REGEX","INVALID_EVENT_NAME_REGEX","rARIA","rARIACamel","possibleStandardNames","didWarnDefaultSelectValue","propKey$jscomp$0","children$jscomp$0","innerHTML$jscomp$0","propValue$jscomp$0","propKey$jscomp$1","children$jscomp$1","selected","innerHTML$jscomp$1","propValue$jscomp$1","didWarnSelectedSetOnOption","stringValue","didWarnInvalidOptionInnerHTML","React","child","didWarnInvalidOptionChildren","selectedMarkerAttribute","didWarnDefaultTextareaValue","propKey$jscomp$2","defaultValue","children$jscomp$2","propValue$jscomp$2","leadingNewline","propKey$jscomp$3","value$jscomp$1","defaultValue$jscomp$0","checked","defaultChecked","propValue$jscomp$3","didWarnFormActionType","didWarnDefaultChecked","didWarnDefaultInputValue","propKey$jscomp$4","children$jscomp$3","innerHTML$jscomp$2","name$jscomp$0","formAction$jscomp$0","formEncType$jscomp$0","formMethod$jscomp$0","formTarget$jscomp$0","propValue$jscomp$4","formData$jscomp$0","JSCompiler_inline_result$jscomp$1","propKey$jscomp$5","children$jscomp$4","innerHTML$jscomp$3","formAction$jscomp$1","formEncType$jscomp$1","formMethod$jscomp$1","formTarget$jscomp$1","propValue$jscomp$5","formData$jscomp$1","formActionName","JSCompiler_inline_result$jscomp$2","propKey$jscomp$6","propValue$jscomp$6","propKey$jscomp$7","children$jscomp$5","innerHTML$jscomp$4","propValue$jscomp$7","sanitizedValue","JSCompiler_inline_result$jscomp$3","noscriptTagInScope","isFallback","children$jscomp$6","JSCompiler_inline_result$jscomp$4","noscriptTagInScope$jscomp$0","isFallback$jscomp$0","rel","precedence","JSCompiler_inline_result$jscomp$5","propDescription","resourceState","preloadResource","_resource","noscriptTagInScope$jscomp$1","asyncProp","JSCompiler_inline_result$jscomp$6","resources","preloads","resourceState$jscomp$0","scriptProps","preloadResource$jscomp$0","resource$jscomp$0","noscriptTagInScope$jscomp$2","children$jscomp$7","child$jscomp$0","precedence$jscomp$0","href$jscomp$0","propKey$jscomp$8","children$jscomp$8","innerHTML$jscomp$5","propValue$jscomp$8","child$jscomp$1","JSCompiler_inline_result$jscomp$7","styleQueue$jscomp$0","resourceState$jscomp$1","propKey$jscomp$9","children$jscomp$9","innerHTML$jscomp$6","propValue$jscomp$9","child$jscomp$2","noscriptTagInScope$jscomp$3","isFallback$jscomp$1","JSCompiler_inline_result$jscomp$8","propKey$jscomp$10","children$jscomp$10","innerHTML$jscomp$7","propValue$jscomp$10","pictureOrNoScriptTagInScope","src","srcSet","sizes","key$jscomp$0","promotablePreloads","resource$jscomp$1","PRELOAD_NO_CREDS","crossOrigin","headPreambleContributionChunk","JSCompiler_inline_result$jscomp$9","preamble$jscomp$0","bodyPreambleContributionChunk","JSCompiler_inline_result$jscomp$10","preamble$jscomp$1","htmlPreambleContributionChunk","doctypeChunk","JSCompiler_inline_result$jscomp$11","propKey$jscomp$11","children$jscomp$11","innerHTML$jscomp$8","propValue$jscomp$11","_prevContext2","_prevKeyPath3","preambleSegment","REACT_LEGACY_HIDDEN_TYPE","prevKeyPath$jscomp$1","segment$jscomp$0","prevKeyPath$jscomp$2","startActivityBoundary","_prevKeyPath4","endActivityBoundary","iteratorFn","iterator","validateIterable","step","_prevKeyPath2","prevKeyPath$jscomp$3","prevContext$jscomp$0","prevKeyPath$jscomp$4","resumableState$jscomp$0","autoName","resumableState$jscomp$1","update","enter","exit","share","autoName$jscomp$0","REACT_SCOPE_TYPE","_prevKeyPath","_prevContext","_prevRow","_content","prevKeyPath$jscomp$5","prevContext$jscomp$1","prevRow$jscomp$0","parentBoundary","parentPreamble","parentHoistableState","parentSegment","fallback","fallbackAbortSet","newBoundary","boundarySegment","contentRootSegment","trackedPostpones","suspenseComponentStack","fallbackKeyPath","fallbackReplayNode","suspendedPrimaryTask","queueCompletedSegment","preparePreamble","thrownValue$2","CLIENT_RENDERED","untrackBoundary","suspendedFallbackTask","propsWithoutRef","prevSnapshot","prevKeyPath$jscomp$6","prevValue","rendererSigil","prevNode","newNode","prevSnapshot$jscomp$0","context$jscomp$0","render","newChildren","prevKeyPath$jscomp$7","callLazyInitInDEV","segmentId","prevReplay","resumedSegment","replayElement","keyOrIndex","childNodes","childSlots","abortRemainingReplayNodes","previousReplaySet","resumedBoundary","iterable","didWarnAboutGenerators","didWarnAboutMaps","retryNode","refProp","REACT_OPTIMISTIC_KEY","renderChildrenArray","didWarnForKey","WeakSet","parentOwner","replayNodes","j","errorDigest","trackPostponedBoundary","POSTPONED","tracked","boundaryNode","addToReplayParent","trackPostpone","spawnNewSuspendedReplayTask","spawnNewSuspendedRenderTask","previousFormatContext","previousContext","previousKeyPath","previousTreeContext","childrenLength","chunkLength","thrownValue$3","abortTaskSoft","request$jscomp$0","nodes","slots","error$jscomp$0","errorDigest$jscomp$0","errorInfo$jscomp$0","aborted","safelyEmitEarlyPreloads","shellComplete","linkHeader","queueIter","queueStep","sheetIter","sheetStep","sheet","props$jscomp$0","completeShell","completeAll","childSegment","segmentByteSize","postponedRow","postponedBoundary","request$jscomp$1","prevDispatcher","HooksDispatcher","prevAsyncDispatcher","DefaultAsyncDispatcher","prevRequest","prevGetCurrentStackImpl","prevResumableState","currentResumableState","pingedTasks","prevTaskInDEV","task$jscomp$0","ping","x$jscomp$0","ping$jscomp$0","errorInfo$jscomp$1","boundary$jscomp$0","boundaryRow","flushCompletedQueues","preparePreambleFromSubtree","collectedPreambleSegments","pendingPreambles","preparePreambleFromSegment","originalRequestByteSize","hasPendingPreambles","flushSubtree","placeholder1","placeholder2","FLUSHED","chunks","chunkIdx","childIdx","flushSegment","errorMessage","errorStack","startClientRenderedSuspenseBoundary","clientRenderedSuspenseBoundaryError1","clientRenderedSuspenseBoundaryError1A","clientRenderedSuspenseBoundaryErrorAttrInterstitial","clientRenderedSuspenseBoundaryError1B","clientRenderedSuspenseBoundaryError1C","clientRenderedSuspenseBoundaryError1D","clientRenderedSuspenseBoundaryError2","flushingPartialBoundaries","flushedByteSize","flushingShell","startCompletedSuspenseBoundary","endSuspenseBoundary","flushSegmentContainer","startSegmentHTML","startSegmentHTML2","startSegmentSVG","startSegmentSVG2","startSegmentMathML","startSegmentMathML2","startSegmentTable","startSegmentTable2","startSegmentTableBody","startSegmentTableBody2","startSegmentTableRow","startSegmentTableRow2","startSegmentColGroup","startSegmentColGroup2","endSegmentHTML","endSegmentSVG","endSegmentMathML","endSegmentTable","endSegmentTableBody","endSegmentTableRow","endSegmentColGroup","flushCompletedBoundary","nextArrayOpenBrackChunk","completedSegments","flushPartiallyCompletedSegment","requiresStyleInsertion","requiresViewTransitions","SentClientRenderFunction","clientRenderScriptFunctionOnly","SentCompleteBoundaryFunction","completeBoundaryScriptFunctionOnly","SentUpgradeToViewTransitions","completeBoundaryUpgradeToViewTransitionsInstruction","SentStyleInsertionFunction","completeBoundaryWithStylesScript1FullPartial","completeBoundaryWithStylesScript1Partial","completeBoundaryScript1Partial","completeBoundaryScript2","completeBoundaryScript3a","arrayFirstOpenBracket","LATE","arrayCloseBracket","arraySubsequentOpenBracket","arrayInterstitial","completeBoundaryScript3b","completeBoundaryScriptEnd","segmentID","SentCompleteSegmentFunction","completeSegmentScript1Full","completeSegmentScript1Partial","completeSegmentScript2","completeSegmentScriptEnd","completedRootSegment","completedPreambleSegments","i$jscomp$0","htmlChunks","headChunks","charsetChunks","viewportChunks","importMapChunks","hoistableChunks","segments","headChunks$jscomp$0","bodyChunks","renderState$jscomp$0","SentMarkShellTime","shellId","shellTimeRuntimeScript","renderState$jscomp$1","viewportChunks$jscomp$0","hoistableChunks$jscomp$0","clientRenderedBoundaries","renderState$jscomp$2","errorComponentStack","clientRenderScript1Full","clientRenderScript1Partial","clientRenderScript1A","clientRenderErrorScriptArgInterstitial","clientRenderScriptEnd","completedBoundaries","partialBoundaries","largeBoundaries","startWork","enqueueEarlyPreloadsAfterInitialWork","enqueueFlush","startFlowing","abort","reason","abortableTasks","abortTask","ASYNC_ITERATOR","bestStack","restoreThenableState","lastThenable","previousThenableValue","previousThenableThen","previousThenableReason","prevStatus","fallbackTask","error$4","parentKeyPath","workingMap","parentNode","getPostponedState","nextSegmentId","replaySlots","ensureCorrectIsomorphicReactVersion","isomorphicReactPackageVersion","createDrainHandler","createCancelHandler","createFakeWritableFromReadableStreamController$1","controller","createFakeWritableFromReadableStreamController","createFakeWritableFromReadable","readable","util","async_hooks","ReactDOM","stream","REACT_MEMO_CACHE_SENTINEL","WeakMap","queueMicrotask","ReactDOMSharedInternals","NotPending","JSCompiler_temp","bucket","imageSrcSet","imageSizes","fetchPriority","Function","inst","internals","log","LN2","usable","initialValue","previousRef","subscribe","getSnapshot","getServerSnapshot","passthrough","size","data","callComponent","callRender","callLazyInit","lazy","performance","localPerformance","localDate","resolve","reject","onHeadersImpl","headersDescriptor","Headers","writable","ReadableStream","signal","listener","hasStartedFlowing","allReady","res","rej","getCrossOriginStringAs","getValueDescriptorExpectingObjectForWarning","thing","getValueDescriptorExpectingEnumForWarning","resolveDispatcher","dispatcher","__REACT_DEVTOOLS_GLOBAL_HOOK__","Internals","container","containerInfo","implementation","previousTransition","previousUpdatePriority","integrity","encountered","form","typeOf","$$typeof","checkEvalAvailabilityOnceDev","hasConfirmedEval","eval","$jscomp$unused$catch","requireAsyncModule","promise","globalThis","ignoreReject","preloadModule","metadata","promises","chunkId","entry","chunkCache","requireModule","moduleExports","processReply","root","formFieldPrefix","temporaryReferences","serializeTypedArray","typedArray","Blob","blobId","nextPartId","FormData","resolveToJSON","originalValue","streamId","parentReference","writtenObjects","modelRoot","pendingParts","lazyId","partJSON","serializeModel","_lazyId","_partJSON2","_data","promiseId","partValue","previousReference","_partJSON3","_data3","originalKey","ArrayBuffer","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","DataView","reader","buffer","binaryReader","progress","_partJSON","getPrototypeOf","ObjectPrototype","descriptor","knownServerReferences","model","json","defaultEncodeFormAction","referenceClosure","boundCache","reference","body","prefixedData","referenceId","numberOfBoundArgs","boundPromise","boundArgs","createFakeServerFunction","filename","sourceMap","line","col","environmentName","innerFunction","encodedName","encodeURI","fakeServerFunctionIdx","registerBoundServerReference","bound","encodeFormAction","FunctionBind","newFn","ArraySlice","addObjectToProperties","properties","indent","addedProperties","addValueToProperties","propertyName","propsKeys","propsLength","array","kind","getIODescription","str","markAllTracksInOrder","supportsUserTiming","getIOColor","functionName","getIOLongName","ioInfo","description","env","rootEnv","getIOShortName","queryIdx","logComponentAwait","asyncInfo","trackIdx","startTime","endTime","entryName","trackNames","logIOInfoErrored","logIOInfo","color","ReactPromise","status","hasGCedResponse","weakResponse","unwrapWeakResponse","closeDebugChannel","debugChannel","readChunk","initializeModelChunk","initializeModuleChunk","getRoot","getChunk","createPendingChunk","response","releasePendingChunk","flushInitialRenderPerformance","filterDebugInfo","moveDebugInfoFromChunkToInnerValue","resolveLazy","wakeChunk","listeners","fulfillReference","rejectChunk","rejectReference","resolveBlockedCycle","resolvedChunk","referencedChunk","wakeChunkIfInitialized","resolveListeners","rejectListeners","cyclicHandler","triggerErrorOnChunk","prevHandler","initializingHandler","prevChunk","initializingChunk","initializeDebugChunk","createResolvedModelChunk","createResolvedIteratorResultChunk","done","resolveIteratorResultChunk","resolveModelChunk","resolveModuleChunk","debugChunk","prevIsInitializingDebugInfo","isInitializingDebugInfo","initializeDebugInfo","waitForReference","resolvedModel","parseModel","reportGlobalError","debugChannelRegistry","nullRefGetter","initializeElement","element","lazyNode","normalizedStackTrace","createFakeJSXCallStackInDEV","supportsCreateTask","buildFakeCallStack","initializeFakeTask","initializeFakeStack","createLazyChunkWrapper","validated","lazyType","fulfilledChunk","handler","parentObject","_referencedChunk","mappedValue","transferReferencedDebugInfo","blockedValue","erroredComponent","isAwaitingDebugInfo","loadServerReference","metaData","callServer","findSourceMapURL","serverReference","bundlerConfig","resolvedModuleData","resolvedValue","parentChunk","debugInfoEntry","getOutlinedModel","createMap","createSet","createBlob","createFormData","applyConstructor","extractIterator","createModel","missingCall","markIOStarted","ResponseInstance","serverReferenceConfig","moduleLoading","allowPartialStream","replayConsole","debugStartTime","debugEndTime","WeakRef","ReactSharedInteralsServer","createResponse","createStreamState","streamDebugValue","streamState","debugValuePromise","MIN_CHUNK_SIZE","incrementChunkDebugInfo","previousEndTime","addAsyncInfo","resolveChunkDebugInfo","resolveBuffer","resolveStream","startReadableStream","closed","previousBlockedChunk","_chunk3","blockedChunk","asyncIterator","startAsyncIterable","nextWriteIndex","nextReadIndex","arg","resolveErrorDev","message","errorOptions","reviveModel","getRootTask","useEnclosingLine","innerCall","frameKey","fakeFunctionCache","enclosingLine","enclosingCol","fakeFunctionIdx","childEnvironmentName","rootTask","cachedEntry","ownerTask","fakeJSXCallSite","_componentInfoOrAsyncInfo","currentOwnerInDEV","ownerStack","initializeIOInfo","mergeBuffer","lastChunk","byteLength","_i3","resolveTypedArray","constructor","bytesPerElement","rootChunk","flushComponentPerformance","response$jscomp$0","trackIdx$jscomp$6","trackTime","parentEndTime","previousResult","startTime$jscomp$0","_i4","_info","childrenEndTime","childTrackIdx","childTrackTime","_i5","childResult","childEndTime","componentEndTime","isLastComponent","endTimeIdx","_i6","_info2","time","candidateInfo","trackIdx$jscomp$0","componentEndTime$jscomp$0","childrenEndTime$jscomp$0","entryName$jscomp$0","measureName","env$jscomp$0","isPrimaryEnv","selfTime","color$jscomp$0","debugTask$jscomp$0","measureName$jscomp$0","properties$jscomp$0","env$jscomp$1","trackIdx$jscomp$3","endTime$jscomp$0","entryName$jscomp$1","debugTask$jscomp$1","properties$jscomp$1","tooltipText","_j","_candidateInfo","_env","trackIdx$jscomp$4","childrenEndTime$jscomp$3","env$jscomp$2","name$jscomp$1","entryName$jscomp$2","measureName$jscomp$1","properties$jscomp$2","_env2","trackIdx$jscomp$5","endTime$jscomp$1","entryName$jscomp$3","debugTask$jscomp$2","tooltipText$jscomp$0","processFullStringRow","clientReference","nonce$jscomp$0","JSCompiler_temp_const$jscomp$0","JSCompiler_temp_const$jscomp$1","replayConsoleWithCallStackInDEV","_chunk4","unblock","processBinaryChunk","rowState","rowID","rowTag","rowLength","lastIdx","offset","stringDecoder","decoderOptions","NaN","BigInt","mightHaveStaticConstructor","code","close","noServerCall$1","createResponseFromOptions","startReadingFromStream$1","onDone","debugValue","_ref","noServerCall","startReadingFromStream","onEnd","bind$1","v8FrameRegExp","jscSpiderMonkeyFrameRegExp","_this","resolveCallback","rejectCallback","wrapperPromise","FinalizationRegistry","createFakeJSXCallStack","replayConsoleWithCallStack","methodName","stackTrace","prevStack","newArgs","callStack","promiseForResponse","streamDoneCount","handleDone","serverConsumerManifest","streamEndedCount","endOfFirst","endOfSecond","checkKeyStringCoercion","getTaskName","UnknownOwner","elementRefGetterWithDeprecationWarning","didWarnAboutElementRef","validateChildKeys","isValidElement","specialPropKeyWarningShown","createTask","unknownOwnerDebugStack","callStackForError","unknownOwnerDebugTask","didWarnAboutKeySpread","config","maybeKey","isStaticChildren","trackActualOwner","previousStackTraceLimit","debugStackDEV","debugStack","keys","getter","displayName","warnAboutAccessingKey","jsxDEVImpl","didWarnStateUpdateForUnmountedComponent","updater","emptyObject","ReactNoopUpdateQueue","ComponentDummy","PureComponent","getOwner","hasValidKey","ReactElement","getElementKey","escaperLookup","mapChildren","func","count","mapIntoArray","escapedPrefix","nameSoFar","invokeCallback","oldElement","newKey","childKey","userProvidedKeyEscapeRegex","lazyInitializer","resolveDebugValue","rejectDebugValue","moduleObject","_ioInfo","_ioInfo2","releaseAsyncTransition","startTransition","scope","prevTransition","currentTransition","returnValue","onStartTransitionFinish","addTransitionType","transition","transitionTypes","enqueueTask","enqueueTaskImpl","requireString","_err","didWarnAboutMessageChannel","MessageChannel","channel","aggregateErrors","errors","AggregateError","popActScope","prevActQueue","prevActScopeDepth","actScopeDepth","recursivelyFlushAsyncActWork","flushActQueue","isFlushing","continuation","didWarnAboutOldJSXRuntime","deprecatedAPIs","fnName","reportError","didWarnNoAwaitAct","queueSeveralMicrotasks","forEachFunc","forEachContext","didAwaitActCall","error$0","_thrownError","returnValue$jscomp$0","getCurrentStack","childArray","_i","refObject","ownName","elementType","ctor","compare","Context","formatterFn","create","configure","strEscape","sort","isTypedArrayWithEntries","stringifyTypedArray","getPositiveIntegerOption","RangeError","getItemCount","stringifyFnReplacer","$","stringifyArrayReplacer","stringifyIndent","stringifySimple","actionId","actionArgs","dispatchAppRouterAction","ACTION_SERVER_ACTION","basePath","__NEXT_ROUTER_BASEPATH","pathname","__NEXT_DEV_SERVER","startsWith","document","location","origin","includes","URL","searchParams","set","undefined","RSC_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_HMR_REFRESH_HEADER","NEXT_HMR_REFRESH_HASH_COOKIE","NEXT_URL","RSC_CONTENT_TYPE_HEADER","NEXT_INSTANT_PREFETCH_HEADER","NEXT_INSTANT_TEST_COOKIE","FLIGHT_HEADERS","NEXT_RSC_UNION_QUERY","NEXT_ROUTER_STALE_TIME_HEADER","NEXT_DID_POSTPONE_HEADER","NEXT_REWRITTEN_PATH_HEADER","NEXT_REWRITTEN_QUERY_HEADER","NEXT_IS_PRERENDER_HEADER","NEXT_ACTION_NOT_FOUND_HEADER","NEXT_REQUEST_ID_HEADER","NEXT_HTML_REQUEST_ID_HEADER","NEXT_ACTION_REVALIDATED_HEADER","addBasePath","required","normalizePathTrailingSlash","__NEXT_MANUAL_TRAILING_SLASH","query","hash","parsePath","__NEXT_TRAILING_SLASH","test","endsWith","removeTrailingSlash","__NEXT_MANUAL_CLIENT_BASE_PATH","addPathPrefix","isExternalURL","window","createFromFetchBrowser","__NEXT_REACT_DEBUG_CHANNEL","runRemainingActions","actionQueue","setState","pending","runAction","needsRefresh","dispatch","ACTION_REFRESH","actionResult","handleResult","discarded","didRevalidate","isThenable","then","err","createMutableActionQueue","instrumentationHooks","resolvers","ACTION_RESTORE","deferredPromise","newAction","last","ACTION_NAVIGATE","onRouterTransitionStart","getCurrentAppRouterState","dispatchNavigateAction","navigateType","scrollBehavior","linkInstanceRef","__NEXT_APP_NAV_FAIL_HANDLING","__pendingUrl","setLinkForCurrentNavigation","isExternalUrl","locationSearch","search","dispatchTraverseAction","historyState","publicAppRouterInstance","back","history","forward","prefetch","fetchStrategy","isJavaScriptURLString","getAppRouterActionQueue","PrefetchKind","FetchStrategy","prefetchWithSegmentCache","nextUrl","treeAtTimeOfPrefetch","onInvalidate","createPrefetchURL","isBot","navigator","userAgent","cacheKey","createCacheKey","schedulePrefetchTask","PrefetchPriority","tree","replace","scroll","ScrollBehavior","push","refresh","hmrRefresh","resetKnownRoutes","ACTION_HMR_REFRESH","__NEXT_GESTURE_TRANSITION","experimental_gesturePush","currentUrl","canonicalUrl","freshnessPolicy","FreshnessPolicy","forkedGestureState","navigate","renderedSearch","cache","dispatchGestureState","fontFamily","height","display","alignItems","justifyContent","marginTop","maxWidth","padding","textAlign","marginBottom","fontSize","fontWeight","letterSpacing","lineHeight","margin","gap","borderRadius","cursor","background","border","position","bottom","left","right","errorThemeCss","WarningIcon","svg","width","viewBox","fill","isServerError","handleISRError","head","dangerouslySetInnerHTML","__html","div","h1","button","onClick","HTTPAccessFallbackErrorBoundary","triggeredStatus","previousPathname","componentDidCatch","missingSlots","has","warningMessage","localeCompare","slot","join","warnOnce","getDerivedStateFromError","isHTTPAccessFallbackError","getAccessFallbackHTTPStatus","notFound","forbidden","unauthorized","errorComponents","HTTPAccessErrorStatus","isNotFound","isForbidden","isUnauthorized","meta","getAccessFallbackErrorTypeByStatus","HTTPAccessFallbackBoundary","useUntrackedPathname","useContext","MissingSlotContext","bailOnRootNotFound","NotAllowedRootHTTPFallbackError","DevRootHTTPAccessFallbackBoundary","ErrorBoundaryHandler","AppRouterContext","reset","unstable_retry","isNextRouterError","handleHardNavError","errorStyles","errorScripts","this","errorComponent","ErrorBoundary","workAsyncStorage","store","getStore","isStaticGeneration","DYNAMIC_ERROR_CODE","DynamicServerError","isDynamicServerError","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","values","HTTP_ERROR_FALLBACK_ERROR_CODE","httpStatus","split","isRedirectError","linkForMostRecentNavigation","PENDING_LINK_STATUS","IDLE_LINK_STATUS","link","setOptimisticLinkStatus","unmountLinkForCurrentNavigation","getLinkForCurrentNavigation","prefetchable","prefetchableAndVisible","observer","IntersectionObserver","entries","intersectionRatio","rootMargin","observeVisibility","existingInstance","get","unmountPrefetchableInstance","observe","mountLinkInstance","router","prefetchEnabled","prefetchURL","isVisible","prefetchTask","prefetchHref","mountFormInstance","delete","cancelPrefetchTask","unobserve","onLinkVisibilityChanged","onNavigationIntent","unstable_upgradeToDynamicPrefetch","__NEXT_DYNAMIC_ON_HOVER","rescheduleLinkPrefetch","pingVisibleLinks","isPrefetchTaskDirty","scheduleSegmentPrefetchTask","matchSegment","existingSegment","useNavFailureHandler","useEffect","uncaughtExceptionHandler","evt","addEventListener","removeEventListener","layoutSegmentPromisesCache","createLayoutSegmentPromises","cached","segmentPromises","segmentsPromises","parallelRouteKey","getSelectedLayoutSegmentPath","computeSelectedLayoutSegment","createDevToolsInstrumentedPromise","selectedLayoutSegmentPromises","selectedLayoutSegmentsPromises","rootNavigationPromisesCache","createRootNavigationPromises","pathParams","searchParamsString","toString","pathParamsString","stringify","treeCache","readonlySearchParams","ReadonlyURLSearchParams","layoutSegmentPromises","nestedLayoutPromisesCache","createNestedLayoutNavigationPromises","parentNavPromises","parallelRouteKeys","hasFallbackRouteParams","workUnitAsyncStorage","workUnitStore","fallbackParams","fallbackRouteParams","PathnameContext","DIGEST","ReadonlyURLSearchParamsError","URLSearchParams","append","REDIRECT_ERROR_CODE","errorCode","slice","statusCode","at","RedirectStatusCode","actionAsyncStorage","getRedirectError","redirect","isAction","permanentRedirect","getURLFromRedirectError","getRedirectTypeFromError","getRedirectStatusCodeFromError","getSelectedParams","currentTree","parallelRoute","isDynamicParameter","isArray","segmentValue","PAGE_SEGMENT_KEY","removeLeadingSlash","segmentToPathname","normalizeSegments","reduce","acc","isGroupSegment","extractPathFromFlightRouterState","flightRouterState","DEFAULT_SEGMENT_KEY","INTERCEPTION_ROUTE_MARKERS","parallelRoutes","childrenPath","value","childPath","extractSourcePageFromFlightRouterState","sourcePageSegments","extractSourcePageSegmentsFromFlightRouterState","segmentToSourcePagePathname","dynamicParamType","computeChangedPath","treeA","treeB","changedPath","computeChangedPathImpl","segmentA","parallelRoutesA","segmentB","parallelRoutesB","normalizedSegmentA","normalizedSegmentB","parallelRouterKey","createHrefFromUrl","includeHash","createDebugChannel","createFromReadableStream","createFromReadableStreamBrowser","createFromFetch","doMpaNavigation","urlToUrlWithoutFlightMarker","fetchServerResponse","prepareFlightRouterStateForRequest","isHmrRefresh","isLegacyPPR","__NEXT_PPR","__NEXT_CACHE_COMPONENTS","createFetch","responseUrl","redirected","contentType","interception","postponed","ok","flightResponsePromise","createFromNextReadableStream","flightResponse","cacheData","NEXT_NAV_DEPLOYMENT_ID_HEADER","getNavigationBuildId","normalizedFlightData","normalizeFlightData","staticStageData","resolveStaticStageData","flightData","q","couldBeIntercepted","supportsPerSegmentPrefetching","dynamicStaleTime","UnknownDynamicStaleTime","runtimePrefetchStream","_debugInfo","originalUrl","processFetch","responseStream","InvariantError","isPartial","stripIsPartialByte","__NEXT_EXPERIMENTAL_CACHED_NAVIGATIONS","stream1","stream2","tee","isResponsePartial","responseBodyClone","strippedResponse","Response","statusText","defineProperty","cancel","decodeStaticStage","staticStageByteLengthPromise","remaining","getReader","pull","enqueue","subarray","shouldImmediatelyDecode","__NEXT_TEST_MODE","deploymentId","getDeploymentId","self","__next_r","crypto","getRandomValues","fetchOptions","credentials","fetchUrl","setCacheBustingSearchParam","processed","fetch","fetchPromise","createFromNextFetch","browserResponse","__NEXT_CLIENT_VALIDATE_RSC_REQUEST_HEADERS","flightStream","unstable_allowPartialStream","createInitialCacheNodeForHydration","navigatedAt","initialTree","seedData","seedHead","seedDynamicStaleAt","createCacheNodeOnNavigation","separateRefreshUrls","scrollRef","startPPRNavigation","oldUrl","oldRenderedSearch","oldCacheNode","oldRouterState","newRouteTree","newMetadataVaryPath","freshness","isSamePageNavigation","accumulation","oldRootRefreshState","updateCacheNodeOnNavigation","didFindRootLayout","parentNeedsDynamicRequest","parentRefreshState","dropPrefetchRsc","existingCacheNode","refreshUrl","newCacheNode","needsDynamicRequest","oldSegment","createSegmentFromRouteTree","isNavigatingToNewRootLayout","nextTree","currentTreeSegment","nextTreeSegment","currentIsRootLayout","PrefetchHint","nextIsRootLayout","prefetchHints","currentTreeChildren","nextTreeChild","currentTreeChild","NOT_FOUND_SEGMENT_KEY","newSlots","oldRouterStateChildren","seedDataChildren","childDidFindRootLayout","shouldRefreshDynamicData","isLeafSegment","createCacheNodeForSegment","cacheNode","createCacheNode","rsc","prefetchRsc","prefetchHead","maybeRefreshState","refreshState","add","patchedRouterStateChildren","taskChildren","childNeedsDynamicRequest","dynamicRequestTreeChildren","newCacheNodeSlots","oldCacheNodeSlots","newRouteTreeChild","oldRouterStateChild","seedDataChild","oldSegmentChild","newSegmentChild","seedHeadChild","reuseActiveSegmentInDefaultSlot","parentRouteTree","reusedUrl","reusedRenderedSearch","oldRefreshState","reusedRouteTree","convertReusedFlightRouterStateToRouteTree","metadataVaryPath","taskChild","taskChildRoute","route","dynamicRequestTreeChild","dynamicRequestTree","newFlightRouterState","createDynamicRequestTree","accumulateScrollRef","current","isPage","getRenderedSearchFromVaryPath","varyPath","stringifiedQuery","fromEntries","patchRouterStateWithNewChildren","baseRouterState","clone","newRouterState","seedRsc","dynamicStaleAt","doesSegmentNeedDynamicRequest","bfcacheEntry","readFromBFCacheDuringRegularNavigation","writeToBFCache","writeHeadToBFCache","readFromBFCache","oldRsc","oldRscDidResolve","isDeferredRsc","cachedRsc","isCachedRscPartial","segmentEntry","readSegmentCacheEntry","EntryStatus","promiseForFulfilledEntry","waitForSegmentCacheEntry","createDeferredRsc","doesHeadNeedDynamicRequest","cachedHead","isCachedHeadPartial","metadataEntry","__NEXT_OPTIMISTIC_ROUTING","previousNavigationDidMismatch","spawnDynamicRequests","primaryUrl","routeCacheEntry","primaryRequestPromise","fetchMissingDynamicData","refreshRequestPromises","scopedDynamicRequestTree","voidPromise","finishNavigationTask","exitStatus","onFulfill","remainingCount","onReject","forEach","refreshRequestPromise","abortRemainingPendingTasks","childExitStatus","primaryRequestResult","dispatchRetryDueToTreeMismatch","seed","isHardRetry","retryUrl","retryNextUrl","baseTree","originalNavigateType","markRouteEntryAsDynamicRewrite","discoverKnownRoute","routeTree","invalidateRouteCacheEntries","lastCommitted","getLastCommittedTree","retryNavigateType","retryAction","ACTION_SERVER_PATCH","previousTree","mpa","convertServerPatchToFullTree","__NEXT_EXPOSE_TESTING_API","waitForNavigationLock","staticStageResponse","getStaleAt","staleAt","buildId","writeStaticStageResponseIntoCache","catch","processRuntimePrefetchStream","writeDynamicRenderResponseIntoCache","flightDatas","headVaryParams","navigationSeed","computeDynamicStaleAt","didReceiveUnknownParallelRoute","writeDynamicDataIntoNavigationTask","serverRouteTree","dynamicData","dynamicHead","finishPendingCacheNode","dynamicSegmentData","updateBFCacheEntryStaleAt","serverChildren","dynamicDataChildren","serverRouteTreeChild","dynamicDataChild","taskSegment","serverSegment","DEFERRED","pendingRsc","responseDebugInfo","fulfilledRsc","apply","rejectedRsc","waitForNavigationLockIfActive","lastCommittedTree","setLastCommittedTree","DYNAMIC_STALETIME_MS","__NEXT_CLIENT_ROUTER_DYNAMIC_STALETIME","STATIC_STALETIME_MS","getStaleTimeMs","__NEXT_CLIENT_ROUTER_STATIC_STALETIME","navigateReducer","getElementById","completeHardNavigation","currentRenderedSearch","navigateUsingSegmentCache","setCacheBustingSearchParamWithHash","computeCacheBustingSearchParam","existingSearch","pairs","rawQuery","filter","dynamicStaleTimeSeconds","invalidateBfCache","newStaleAt","createCacheMap","originalHref","Fallback","Revalidation","parent","getFromCacheMap","currentCacheVersion","rootEntry","isRevalidation","getEntryWithFallbackImpl","previousKey","remainingKeys","isValueExpired","deleteMapEntry","existingEntry","fallbackEntry","lruPut","setInCacheMap","cacheMap","getOrInitialize","newEntry","setMapEntryValue","updateLruSize","oldEntry","deleteFromCacheMap","deleteFromLru","parentMap","revalidatingEntry","setSizeInCacheMap","readVaryParams","convertRouteTreeToFlightRouterState","staleTimeSeconds","max","MetadataOnlyRequestTree","routeCacheMap","segmentCacheMap","invalidationListeners","currentRouteCacheVersion","currentSegmentCacheVersion","getCurrentRouteCacheVersion","getCurrentSegmentCacheVersion","invalidateEntirePrefetchCache","pingInvalidationListeners","invalidateSegmentCacheEntries","tasks","notifyInvalidationListener","readRouteCacheEntry","getRouteVaryPath","matchKnownRoute","pendingEntry","promiseWithResolvers","createPromiseWithResolvers","createDetachedRouteCacheEntry","blockedTasks","Infinity","readOrCreateRouteCacheEntry","deprecated_requestOptimisticRouteCacheEntry","requestedUrl","requestedSearch","urlWithoutSearchParams","routeWithNoSearchParams","createPrefetchRequestKey","canonicalUrlForRouteWithNoSearchParams","optimisticCanonicalSearch","optimisticRenderedSearch","optimisticUrl","deprecated_createOptimisticRouteTree","hasDynamicRewrite","newRenderedSearch","clonedSlots","originalSlots","childTree","requestKey","clonePageVaryPathWithNewSearchParams","readOrCreateSegmentCacheEntry","varyPathForRequest","getSegmentVaryPathForRequest","createDetachedSegmentCacheEntry","readOrCreateRevalidatingSegmentEntry","overwriteRevalidatingSegmentCacheEntry","upsertSegmentEntry","candidateEntry","currentStrategy","rejectedEntry","upgradeToPendingSegment","emptyEntry","attemptToFulfillDynamicSegmentFromBFCache","dynamicPrefetchStaleAt","fulfillSegmentCacheEntry","attemptToUpgradeSegmentFromBFCache","upserted","pingBlockedTasks","pingPrefetchTask","createMetadataRouteTree","HEAD_REQUEST_KEY","fulfillRouteCacheEntry","fulfilledEntry","writeRouteIntoCache","getFulfilledRouteVaryPath","segmentCacheEntry","rejectRouteCacheEntry","rejectSegmentCacheEntry","convertRootFlightRouterStateToRouteTree","convertFlightRouterStateToRouteTree","ROOT_SEGMENT_REQUEST_KEY","parentPartialVaryPath","getPartialPageVaryPath","getPartialLayoutVaryPath","parentRequestKey","requestKeyPart","createSegmentRequestKeyPart","appendSegmentRequestKeyPart","parentRenderedSearch","partialVaryPath","originalSegment","compressedRefreshState","paramCacheKey","appendLayoutVaryPath","finalizeLayoutVaryPath","finalizePageVaryPath","finalizeMetadataVaryPath","childRouterState","childRequestKeyPart","fetchRouteOnCacheMiss","addInstantPrefetchHeaderIfLocked","urlAfterRedirects","fetchPrefetchResponse","varyHeader","routeIsPPREnabled","pathnameParts","rootSegment","prefetchStream","responseSize","createNonTaskyPrefetchResponseStream","serverData","renderedPathname","getRenderedPathname","getRenderedSearch","convertTreePrefetchToRouteTree","pathnamePartsIndex","prefetchSlots","childDoesAppearInURL","childPartialVaryPath","childPrefetch","childSegmentName","childParam","param","childParamValue","parseDynamicParamFromURLPart","childParamKey","getCacheKeyForDynamicParam","siblings","doesStaticSegmentAppearInURL","childPathnamePartsIndex","childRequestKey","rootTree","headVaryParamsThenable","writeDynamicTreeResponseIntoCache","originalPathname","normalizedFlightDataResult","isRootRender","getStaleAtFromHeader","fulfilledVaryPath","fetchSegmentOnCacheMiss","routeKey","normalizedRequestKey","staleTime","varyParams","__NEXT_VARY_PARAMS","getFulfilledSegmentVaryPath","fetchInlinedSegmentsOnCacheMiss","spawnedEntries","rejectSegmentEntriesIfStillPending","fillInlinedSegmentEntries","inlinedNode","ownedEntry","childInlinedNode","headStaleAt","headKey","ownedHeadEntry","fetchSegmentPrefetchesUsingDynamicRequest","fulfilledEntries","bufferedResponseSize","originalFlightStream","onStreamClose","onResponseSizeUpdate","totalByteLength","totalBytesReceivedSoFar","averageSize","metadataTree","flightDataEntry","segmentPath","writeSeedDataIntoCache","entriesOwnedByCurrentTask","varyParamsThenable","fulfillEntrySpawnedByRuntimePrefetch","childSeedData","isHeadPartial","segmentVaryParams","possiblyNewEntry","canNewFetchStrategyProvideMoreContent","newStrategy","isNavigationLocked","staleTimeIterable","defaultIsPartial","firstByte","hasMarker","remainder","lruSize","ensureCleanupIsScheduled","tail","newNodeSize","prevNodeSize","deleted","pingPrefetchScheduler","cleanup","maxLruSize","writeCookieValue","cookieStore","existing","lockState","acquireLock","releaseLock","startListeningForInstantNavigationCookie","__next_instant_test","reload","random","event","changed","parseCookieValue","raw","rawState","refreshOnInstantNavigationUnlock","transitionToCapturedSPA","fromTree","toTree","updateCapturedSPAToTree","currentCacheNode","currentFlightRouterState","ensurePrefetchThenNavigate","navigateImpl","navigateUsingPrefetchedRouteTree","optimisticRoute","navigateToUnknownRoute","navigateToKnownRoute","completeSoftNavigation","prefetchSeed","DynamicRequestTreeForEntireRoute","promiseForDynamicServerResponse","pushRef","pendingPush","mpaNavigation","preserveCustomHistoryState","focusAndScrollRef","previousNextUrl","referringNextUrl","collectedDebugInfo","activeScrollRef","forceScroll","nextUrlForNewRoute","onlyHashChange","oldScrollRef","hashFragment","completeTraverseNavigation","baseData","treePatch","dataPatch","headPatch","convertServerPatchToFullTreeImpl","clonedTree","updatedParallelRouteKey","baseTreeChildren","baseSeedDataChildren","newTreeChildren","newSeedDataChildren","childBaseRouterState","childBaseSeedData","finalFlightRouterState","createEmptyPart","staticChildren","dynamicChild","dynamicChildParamName","dynamicChildParamType","pattern","knownRouteTreeRoot","firstPart","remainingParts","discoverKnownRoutePart","parentKnownRoutePart","urlPart","fullTree","segmentAppearsInURL","paramType","staticSiblings","knownRoutePart","nextUrlPart","nextRemainingParts","discoverDynamicChild","part","newChild","mutablePart","sibling","existingChild","resultFromChildren","childRouteTree","resolvedParams","matchKnownRoutePart","partIndex","staticChild","dynamicPart","dynamicPattern","matchedPart","reifiedTree","reifyRouteTree","newValue","newCacheKey","newVaryPath","reifiedMetadata","syntheticEntry","taskHeap","inProgressRequests","sortIdCounter","didScheduleMicrotask","mostRecentlyHoveredLink","revalidationCooldownTimeoutHandle","startRevalidationCooldown","_onComplete","routeCacheVersion","segmentCacheVersion","phase","hasBackgroundWork","spawnedRuntimePrefetches","sortId","isCanceled","_heapIndex","trackMostRecentlyHoveredLink","heapPush","heapDelete","heap","pop","heapSiftDown","onComplete","reschedulePrefetchTask","heapResift","processQueueInMicrotask","hasNetworkBandwidth","spawnPrefetchSubtask","prefetchSubtask","onPrefetchConnectionClosed","heapPeek","pingRoute","pingRootRouteTree","pingStaticSegmentData","pingSharedPartOfCacheComponentsTree","oldTree","newTree","oldTreeChildren","newTreeChild","newTreeChildSegment","oldTreeChild","oldTreeChildSegment","doesCurrentSegmentMatchCachedSegment","pingNewPartOfCacheComponentsTree","pingRuntimeHead","requestTree","pingRuntimePrefetches","pingRouteTreeAndIncludeDynamicData","requestTreeChildren","diffRouteTreeAgainstCurrent","requestTreeChild","subtreeHasLoadingBoundary","pingPPRDisabledRouteTreeUpToLoadingBoundary","refetchMarkerContext","refetchMarker","keyWithoutSearch","routeWithoutSearch","heapPop","isInsideRefetchingParent","spawnedSegment","fulfilled","pingFullSegmentRevalidation","__NEXT_PREFETCH_INLINING","headEntry","inlinedEntries","collectInlinedEntriesImpl","pingPPRSegmentRevalidation","revalidatingSegment","nonEmptyRevalidatingSegment","emptySegment","currentSegment","cachedSegment","addSearchParamsIfPageSegment","compareQueuePriority","priorityDiff","phaseDiff","heapSiftUp","first","parentIndex","halfLength","leftIndex","rightIndex","NavigationResultTag","original","parentPath","finalizedVaryPath","pageRequestKey","originalVaryPath","pathParamsVaryPath","searchParamsVaryPath","newSearch","NEXT_STATIC_GEN_BAILOUT","StaticGenBailoutError","isStaticGenBailoutError","UnrecognizedActionError","unstable_isUnrecognizedActionError","unstable_rethrow","isBailoutToCSRError","isDynamicPostpone","isPostpone","isHangingPromiseRejectionError","isPrerenderInterruptedError","cause","promisesWithDebugInfo","useActionQueue","canonicalState","setGesture","useOptimistic","useAppDevRenderingIndicator","stateWithDebugInfo","promiseWithDebugInfo","asyncState","use","getOrCreateDebugChannelReadableWriterPair","requestId","TransformStream","writer","getWriter","finally","HMR_MESSAGE_SENT_TO_BROWSER","HMR_MESSAGE_SENT_TO_SERVER","friendlySyntaxErrorLabel","isLikelyASyntaxError","stripAnsi","hadMissingSassError","formatMessage","verbose","importTraceNote","filteredModuleTrace","moduleTrace","trace","originName","breakingChangeIndex","indexOf","NEXT_RSPACK","moduleName","file","moduleIdentifier","parts","details","lines","loaderPaths","exec","parsingError","errorLine","errorColumn","trim","splice","firstLine","loaderPath","arr","formatWebpackMessages","formattedErrors","isUnknownNextFontError","formattedWarnings","warnings","reactServerComponentsError","unshift","some","REACT_REFRESH_FULL_RELOAD_FROM_ERROR","getTerminalLoggingConfig","__NEXT_BROWSER_DEBUG_INFO_IN_TERMINAL","for","terminalLoggingConfig","UNAVAILABLE_MARKER","maximumDepth","depthLimit","maximumBreadth","edgeLimit","safeStringifyWithDepth","clientFileLogger","formatTimestamp","hours","getHours","padStart","minutes","getMinutes","seconds","getSeconds","milliseconds","getMilliseconds","level","isReactServerReplayedLog","Element","toLowerCase","logEntry","timestamp","toUpperCase","logEntries","scheduleLogFlush","getLogs","clear","logFlushTimeout","heartbeatInterval","sendClientFileLogs","stopHeartbeat","isTerminalLoggingEnabled","serializeEntries","clientEntry","stringifyUserArg","logQueue","socket","readyState","WebSocket","OPEN","logs","send","flushScheduled","cancelFlush","sourceType","scheduleLogSend","timeout","rafId","requestAnimationFrame","cb","cancelAnimationFrame","onSocketReady","__NEXT_MCP_SERVER","logStringify","styles","label","queueMicroTask","errorQueue","errorHandlers","rejectionQueue","rejectionHandlers","ReplaySsrOnlyErrors","onBlockingError","ssrError","readSsrError","ssrErrorTemplateTag","querySelector","getAttribute","MISSING_ROOT_TAGS_ERROR","RuntimeErrorHandler","hadRuntimeError","ErroredHtml","globalError","GlobalError","globalErrorStyles","DefaultGlobalError","AppDevOverlayErrorBoundary","reactError","reportHmrLatency","sendMessage","updatedModules","startMsSinceEpoch","endMsSinceEpoch","hasUpdate","latencyMs","__nextDevClientId","page","isPageHidden","visibilityState","__NEXT_HMR_LATENCY_CB","mostRecentCompilationHash","round","reloading","webpackStartMsSinceEpoch","pendingHotUpdateWebpack","resolvePendingHotUpdateWebpack","waitForWebpackRuntimeHotUpdate","canApplyUpdates","module","hot","performFullReload","dependencyChain","processMessage","processTurbopackMessage","staticIndicatorState","handleErrors","formatted","__NEXT_HMR_CB","__NEXT_DEV_INDICATOR","appIsrManifest","isStatic","versionInfo","debug","devIndicator","devToolsConfig","errorCount","clientId","warningCount","formattedMessages","warn","tryApplyUpdatesWebpack","__webpack_hash__","handleApplyUpdates","addStatusHandler","removeStatusHandler","check","sessionId","turbopackHmr","onTurbopackMessage","documentElement","errorJSON","errorObject","ready","write","errorState","getSerializedOverlayState","segmentTrieData","getSegmentTrieData","serializedErrors","errorCodes","enumerable","configurable","HotReload","webSocket","handleOnUnhandledError","handleOnUnhandledRejection","useWebSocketPing","GlobalLayoutRouterContext","interval","appDirRoute","getFlightDataPartsFromPath","flightDataPath","pathToSegment","createInitialRSCPayloadFromFallbackPrerender","fallbackInitialRSCPayload","originalFlightDataPath","originalFlightRouterState","fillInFallbackFlightRouterStateImpl","doesAppearInURL","paramValue","childFlightRouterState","G","getNextFlightSegmentPath","flightSegmentPath","stripClientOnlyDataFromFlightRouterState","_refreshState","refreshMarker","cleanedSegment","stripClientOnlyDataFromSegment","cleanedParallelRoutes","hasBasePath","pathHasPrefix","globalBuildId","setNavigationBuildId","removeBasePath","rewrittenQuery","rewrittenPath","urlWithoutFlightParameters","getParamValueFromCacheKey","urlSearchParamsToParsedUrlQuery","TEXT_PLAIN_CONTENT_TYPE_HEADER","HTML_CONTENT_TYPE_HEADER","JSON_CONTENT_TYPE_HEADER","NEXT_QUERY_PARAM_PREFIX","NEXT_INTERCEPTION_MARKER_PREFIX","MATCHED_PATH_HEADER","PRERENDER_REVALIDATE_HEADER","PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER","RSC_SEGMENTS_DIR_SUFFIX","RSC_SEGMENT_SUFFIX","RSC_SUFFIX","ACTION_SUFFIX","NEXT_DATA_SUFFIX","NEXT_META_SUFFIX","NEXT_BODY_SUFFIX","NEXT_CACHE_TAGS_HEADER","NEXT_CACHE_REVALIDATED_TAGS_HEADER","NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER","NEXT_RESUME_HEADER","NEXT_RESUME_STATE_LENGTH_HEADER","NEXT_CACHE_TAG_MAX_ITEMS","NEXT_CACHE_TAG_MAX_LENGTH","NEXT_CACHE_SOFT_TAG_MAX_LENGTH","NEXT_CACHE_IMPLICIT_TAG_ID","NEXT_CACHE_ROOT_PARAM_TAG_ID","CACHE_ONE_YEAR_SECONDS","INFINITE_CACHE","MIDDLEWARE_FILENAME","MIDDLEWARE_LOCATION_REGEXP","PROXY_FILENAME","PROXY_LOCATION_REGEXP","INSTRUMENTATION_HOOK_FILENAME","PAGES_DIR_ALIAS","DOT_NEXT_ALIAS","ROOT_DIR_ALIAS","APP_DIR_ALIAS","RSC_MOD_REF_PROXY_ALIAS","RSC_ACTION_VALIDATE_ALIAS","RSC_ACTION_PROXY_ALIAS","RSC_CACHE_WRAPPER_ALIAS","RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS","RSC_ACTION_ENCRYPTION_ALIAS","RSC_ACTION_CLIENT_WRAPPER_ALIAS","PUBLIC_DIR_MIDDLEWARE_CONFLICT","SSG_GET_INITIAL_PROPS_CONFLICT","SERVER_PROPS_GET_INIT_PROPS_CONFLICT","SERVER_PROPS_SSG_CONFLICT","STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR","SERVER_PROPS_EXPORT_ERROR","GSP_NO_RETURNED_VALUE","GSSP_NO_RETURNED_VALUE","UNSTABLE_REVALIDATE_RENAME_ERROR","GSSP_COMPONENT_MEMBER_ERROR","NON_STANDARD_NODE_ENV","SSG_FALLBACK_EXPORT_ERROR","ESLINT_DEFAULT_DIRS","SERVER_RUNTIME","edge","experimentalEdge","nodejs","WEB_SOCKET_MAX_RECONNECTIONS","WEBPACK_LAYERS_NAMES","shared","reactServerComponents","serverSideRendering","actionBrowser","apiNode","apiEdge","middleware","instrument","edgeAsset","appPagesBrowser","pagesDirBrowser","pagesDirEdge","pagesDirNode","WEBPACK_LAYERS","GROUP","builtinReact","serverOnly","neutralTarget","clientOnly","bundled","appPages","WEBPACK_RESOURCE_QUERIES","edgeSSREntry","metadataRoute","metadataImageMeta","formatDynamicImportPath","dir","filePath","absoluteFilePath","pathToFileURL","METADATA_BOUNDARY_NAME","VIEWPORT_BOUNDARY_NAME","OUTLET_BOUNDARY_NAME","ROOT_LAYOUT_BOUNDARY_NAME","isError","getProperError","seen","isPlainObject","_key","scheduleOnNextTick","nextTick","scheduleImmediate","atLeastOneTask","waitAtLeastOneReactRenderTask","isPending","useTransition","AfterContext","waitUntil","onClose","onTaskError","workUnitStores","callbackQueue","PromiseQueue","pause","after","errorWaitUntilNotAvailable","reportTaskError","addCallback","afterTaskStore","afterTaskAsyncStorage","rootTaskSpawnPhase","runCallbacksOnClosePromise","runCallbacksOnClose","wrappedCallback","bindSnapshot","runCallbacks","workStore","withExecuteRevalidates","onIdle","taskKind","handlerError","wrapApiHandler","getTracer","setRootSpanAttribute","NodeSpan","spanName","sendStatusCode","statusOrUrl","writeHead","Location","end","checkIsOnDemandRevalidate","req","previewProps","HeadersAdapter","isOnDemandRevalidate","previewModeId","revalidateOnlyGenerated","COOKIE_NAME_PRERENDER_BYPASS","COOKIE_NAME_PRERENDER_DATA","RESPONSE_LIMIT_DEFAULT","SYMBOL_PREVIEW_DATA","SYMBOL_CLEARED_COOKIES","clearPreviewData","serialize","previous","getHeader","setHeader","httpOnly","sameSite","ApiError","sendError","statusMessage","setLazyProp","opts","optsReset","tryGetPreviewData","multiZoneDraftMode","cookies","encryptedPreviewData","tokenPreviewData","jsonwebtoken","verify","previewModeSigningKey","decryptWithSecret","decryptedPreviewData","previewModeEncryptionKey","sharedAsyncLocalStorageNotAvailableError","FakeAsyncLocalStorage","disable","enterWith","maybeGlobalAsyncLocalStorage","AsyncLocalStorage","createAsyncLocalStorage","createSnapshot","snapshot","DynamicHoleKind","PreludeState","hasPostpone","createDynamicTrackingState","isDebugDynamicAccesses","dynamicAccesses","syncDynamicErrorWithStack","createDynamicValidationState","hasSuspenseAboveBody","hasDynamicMetadata","dynamicMetadata","hasDynamicViewport","hasAllowedDynamic","dynamicErrors","getFirstDynamicReason","trackingState","expression","markCurrentScopeAsDynamic","forceDynamic","forceStatic","dynamicShouldError","postponeWithTracking","dynamicTracking","revalidate","dynamicUsageDescription","dynamicUsageStack","usedDynamic","throwToInterruptStaticGeneration","prerenderStore","trackDynamicDataInDynamicRender","abortOnSynchronousDynamicDataAccess","createPrerenderInterruptedError","abortOnSynchronousPlatformIOAccess","errorWithStack","abortAndThrowOnSynchronousRequestDataAccess","prerenderSignal","Postpone","assertPostpone","createPostponeReason","isDynamicPostponeReason","NEXT_PRERENDER_INTERRUPTED","accessedDynamicData","consumeDynamicAccess","serverDynamic","clientDynamic","formatDynamicAPIAccesses","access","createRenderInBrowserAbortSignal","AbortController","BailoutToCSRError","createHangingInputAbortSignal","cacheSignal","inputReady","stagedRendering","waitForStage","getRuntimeStage","annotateDynamicAccess","useDynamicRouteParams","makeHangingPromise","renderSignal","useDynamicSearchParams","throwForMissingRequestStore","hasSuspenseRegex","hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex","hasMetadataRegex","hasViewportRegex","hasOutletRegex","hasInstantValidationBoundaryRegex","INSTANT_VALIDATION_BOUNDARY_NAME","trackAllowedDynamicAccess","dynamicValidation","addErrorContext","createInstantValidationState","createInstantStack","hasAllowedClientDynamicAboveBoundary","validationPreventingErrors","thrownErrorsOutsideBoundary","trackDynamicHoleInNavigation","boundaryState","boundaryLocation","suspenseLocation","expectedIds","renderedIds","syncError","trackThrownErrorInNavigation","trackDynamicHoleInRuntimeShell","trackDynamicHoleInStaticShell","logDisallowedDynamicError","throwIfDisallowedDynamic","prelude","getStaticShellDisallowedDynamicReasons","configAllowsBlocking","getNavigationDisallowedDynamicReasons","validationSampleTracking","missingSampleErrors","instrumentParamsForClientValidation","underlyingParams","validationSamples","declaredKeys","createExhaustiveParamsProxy","expectCompleteParamsInClientValidation","missingParams","trackMissingSampleErrorAndThrow","InstantValidationError","instrumentSearchParamsForClientValidation","underlyingSearchParams","createExhaustiveURLSearchParamsProxy","createValidationSampleTracking","trackMissingSampleError","getExpectedSampleTracking","createCookiesFromSample","sampleCookies","declaredNames","Proxy","RequestCookiesAdapter","receiver","originalMethod","createMissingCookieSampleError","call","nameOrCookie","createHeadersFromSample","rawSampleHeaders","sampleHeaders","find","cookieHeaderValue","headersInit","rawName","createDraftModeForValidation","isEnabled","enable","declaredParamNames","wellKnownProperties","createExhaustiveSearchParamsProxy","declaredSearchParamNames","createMissingSearchParamSampleError","originalMathod","hasOwn","createRelativeURLFromSamples","sampleParams","sampleSearchParams","createPathnameFromRouteAndSampleParams","interpolatedSegments","rawSegment","getSegmentParam","qs","createURLSearchParamsFromSample","parseRelativeUrl","assertRootParamInSamples","INSTANT_VALIDATION_ERROR_DIGEST","isInstantValidationError","RenderStage","StagedRenderingController","abortSignal","abandonController","shouldTrackSyncIO","currentStage","syncInterruptReason","staticStageEndTime","runtimeStageEndTime","staticStageListeners","earlyRuntimeStageListeners","runtimeStageListeners","dynamicStageListeners","staticStagePromise","earlyRuntimeStagePromise","runtimeStagePromise","dynamicStagePromise","once","abandonRender","onStage","stage","shouldTrackSyncInterrupt","syncInterruptCurrentStageWithReason","advanceStage","getSyncInterruptReason","getStaticStageEndTime","getRuntimeStageEndTime","resolveStaticStage","resolveEarlyRuntimeStage","resolveRuntimeStage","timeOrigin","resolveDynamicStage","staticListeners","earlyRuntimeListeners","runtimeListeners","dynamicListeners","getStagePromise","delayUntilStage","ioTrigger","CIPHER_ALGORITHM","encryptWithSecret","secret","iv","salt","cipher","encrypted","concat","final","getAuthTag","encryptedData","CIPHER_SALT_LENGTH","decipher","setAuthTag","HANGING_PROMISE_REJECTION","HangingPromiseRejectionError","abortListenersBySignal","hangingPromise","boundRejection","currentListeners","makeDevtoolsIOAwarePromise","underlying","requestStore","delayUntilRuntimeStage","createDefaultCacheHandler","maxSize","refreshTags","getExpiration","updateTags","memoryCache","LRUCache","pendingSets","NEXT_PRIVATE_DEBUG_CACHE","pendingPromise","privateEntry","areTagsExpired","tags","areTagsStale","returnStream","newSaved","expire","resolvePending","clonedValue","isErrored","errorRetryCount","expiration","tagsManifest","expired","durations","updates","stale","LRUNode","SentinelNode","calculateSize","onEvict","totalSize","addToHead","removeNode","moveToHead","removeTail","lastNode","remove","currentSize","nodeFs","existsSync","fs","readFile","readFileSync","writeFile","mkdir","recursive","stat","REACT_POSTPONE_TYPE","findSourceMap","sourceMapIgnoreListsEverything","ignoreList","sources","findApplicableSourceMapPayload","line0","column0","sections","middle","section","column","didWarnAboutInvalidSourceMapDEV","filterStackFrameDEV","sourceURL","line1","column1","sourceMapPayload","invalidSourceMap","sourceMapURLs","findSourceMapURLDEV","scriptNameOrSourceURL","sourceMapURL","sourceMapJSON","sourceMapURLData","devirtualizeReactServerURL","envIdx","suffixIdx","lastIndexOf","decodeURI","isAnonymousFrameLikelyJSNative","ignoreListAnonymousStackFramesIfSandwiched","frames","isAnonymousFrame","isIgnoredFrame","getMethodName","ignoreFrame","currentFrame","previousFrameIsIgnored","ignoreSandwich","nextFrame","BaseServerSpan","LoadComponentsSpan","NextServerSpan","NextNodeServerSpan","StartServerSpan","RenderSpan","AppRenderSpan","RouterSpan","AppRouteRouteHandlersSpan","ResolveMetadataSpan","MiddlewareSpan","NextVanillaSpanAllowlist","LogSpanAllowList","_global","installProcessErrorHandlers","shouldRemoveUncaughtErrorAndRejectionListeners","nextInitializedProcessErrorHandlers","removeAllListeners","on","savedRevalidationState","cloneRevalidationState","curr","prevTagsWithProfile","prevRevalidateWrites","newRevalidates","pendingRevalidatedTags","item","profileKey","profile","pendingRevalidateWrites","pendingRevalidates","executeRevalidates","revalidateTags","tagsWithProfile","incrementalCache","handlers","getCacheHandlers","tagsByProfile","existingKey","tagsForProfile","cacheLife","cacheLifeProfiles","revalidateTag","ReactServerDOMTurbopackClient","ReactServerDOMWebpackClient","altType","altPkg","pkg","handlersSymbol","handlersMapSymbol","handlersSetSymbol","initializeCacheHandlers","cacheMaxMemorySize","DefaultCache","RemoteCache","getCacheHandler","getCacheHandlerEntries","setCacheHandler","cacheHandler","ReadonlyHeadersError","callable","ReflectAdapter","lowercased","deleteProperty","seal","merge","callbackfn","thisArg","ReadonlyRequestCookiesError","SYMBOL_MODIFY_COOKIE_VALUES","getModifiedCookieValues","modified","appendMutableCookies","mutableCookies","modifiedCookieValues","resCookies","returnedCookies","getAll","MutableRequestCookiesAdapter","wrap","onUpdateCookies","responseCookies","modifiedValues","modifiedCookies","updateResponseCookies","pathWasRevalidated","ActionDidRevalidateStaticAndDynamic","allCookies","serializedCookies","tempCookies","wrappedCookies","createCookiesWithMutableAccessCheck","ensureCookiesAreStillMutable","areCookiesMutableInCurrentPhase","_callingExpression","responseCookiesToRequestCookies","requestCookies","ActionDidNotRevalidate","ActionDidRevalidateDynamicOnly","LayoutRouterContext","TemplateContext","getDeploymentIdQuery","ampersand","getAssetToken","NEXT_IMMUTABLE_ASSET_TOKEN","NEXT_DEPLOYMENT_ID","getAssetTokenQuery","djb2Hash","charCodeAt","hexHash","HeadManagerContext","SearchParamsContext","createContext","PathParamsContext","NavigationPromisesContext","getObjectClassLabel","prototype","BAILOUT_TO_CSR","ensureLeadingSlash","normalizeAppPath","compareAppPaths","aHasSlot","bHasSlot","normalizeRscURL","prefetchHeader","segmentPrefetchHeader","stateTreeHeader","nextUrlHeader","interceptionMarker","marker","isCatchAll","getParamProperties","repeat","optional","isInterceptionRouteAppPath","extractInterceptionRouteInformation","interceptingRoute","interceptedRoute","splitInterceptingRoute","HTML_LIMITED_BOT_UA_RE","HEADLESS_BROWSER_BOT_UA_RE","HTML_LIMITED_BOT_UA_RE_STRING","getBotType","hashIndex","queryIndex","hasQuery","substring","base","parseQuery","globalBase","resolvedBase","protocol","host","auth","hostname","port","searchParamsToUrlQuery","slashes","stringifyUrlQueryParam","urlQueryToSearchParams","searchParamsList","encodeToFilesystemAndURLSafeString","simpleParamValueRegex","btoa","convertSegmentPathToStaticExportFilename","getSegmentValue","isParallelRouteSegment","extractInfoFromServerReferenceId","infoByte","argMask","usedArgs","bit","typeBit","hasRestArgs","restArgs","omitUnusedArgs","filteredArgs","WEB_VITALS","execOnce","used","ABSOLUTE_URL_REGEX","isAbsoluteUrl","getLocationOrigin","getURL","getDisplayName","isResSent","finished","headersSent","normalizeRepeatedSlashes","urlParts","urlNoQuery","loadGetInitialProps","App","ctx","getInitialProps","pageProps","SP","ST","every","method","DecodeError","NormalizeError","PageNotFoundError","MissingStaticPage","MiddlewareNotFoundError","stringifyError","isDefinitelyAValidIdentifier","describeStringPropertyAccess","describeHasCheckingStringProperty","stringifiedProp","msg","voidHandler","_defineProperty","obj","isClientReference","CLIENT_REFERENCE_TAG$1","registerClientReferenceImpl","proxyImplementation","async","SERVER_REFERENCE_TAG","getReference","moduleId","proxy","proxyHandlers$1","deepProxyHandlers","resolveClientReferenceMetadata","modulePath","preload","hints","uniquePart","trimOptions","emitHint","preloadModule$1","hasProperties","trimmed","resolveOwner","currentOwner","componentStorage","resolvePromiseOrAwaitNode","unresolvedNode","getAsyncSequenceFromPromise","asyncId","getAsyncId","pendingOperations","collectStackTracePrivate","framesToSkip","callSite","callSite$jscomp$0","identifierRegExp","collectedStackTrace","collectStackTrace","parseStackTracePrivate","skipFrames","parseStackTrace","stackTraceCache","frameRegExp","isAsync","currentComponentDebugInfo","unsupportedHook","unsupportedContext","ReactSharedInternalsServer","isGetter","defaultFilterStackFrame","devirtualizeURL","filterStackTrace","filteredStack","callsite","hasUnfilteredFrame","lineNumber","columnNumber","isAwaitInUserspace","firstFrame","patchConsole","consoleInst","wrapperMethod","badge","outlineComponentInfo","serializeDebugModel","filterStackFrame","keepDebugAlive","OPENING","PRERENDER","serializeDebugThenable","counter","emitOutlinedDebugModelChunk","emitErrorChunk","ABORTING","emitDebugHaltChunk","deferredDebugObjects","cancelled","serializeThenable","newTask","forwardDebugInfoFromThenable","erroredTask","haltTask","finishHaltedTask","finishAbortedTask","forwardDebugInfoFromCurrentContext","readThenable","callWithDebugContextInDEV","componentDebugInfo","renderFunctionComponent","canEmitDebugInfo","outlineTask","componentDebugID","componentEnv","advanceTaskTime","emitDebugChunk","wakeable","multiShot","renderModelDestructive","emptyRoot","logKeyError","renderFragment","forwardDebugInfo","deferTask","serializeLazyID","retryTask","serializeByValueID","emitAsyncSequence","alreadyForwardedDebugInfo","visited","visitAsyncNode","cutOff","chain","previousIONode","cutOff$jscomp$0","awaited","serializeIONode","markOperationEndTime","implicitSlot","lastTimestamp","debugOwner","parentPropertyName","serializedSize","prevImplicitSlot","serializeDeferredObject","serializeNumber","number","encodeReferenceChunk","serializeClientReference","clientReferenceKey","writtenClientReferences","existingId","clientReferenceMetadata","importId","emitImportChunk","serializeDebugClientReference","outlineModel","outlineModelWithFormatContext","bufferId","emitTypedArrayChunk","serializeDebugTypedArray","doNotLimit","__PROTO__$1","textId","elementReference","_writtenObjects","_existingReference","MAX_ROW_SIZE","TEMPORARY_REFERENCE_TAG","newFormatContext","outlineDebugModel","REACT_LEGACY_ELEMENT_TYPE","errorEnv","blob","abortBlob","streamTask","abortStream","supportsBYOB","isByteStream","callOnAllReadyIfReady","tryStreamTask","getAsyncIterator","abortIterable","isIterator","callIteratorInDEV","endStreamRow","ObjectPrototype$1","symbols","emitTextChunk","writtenServerReferences","emitSymbolChunk","CLOSING","causeReference","causeId","existingRef","emitIOInfoChunk","objectLimit","ioNode","promiseRef","callsite$jscomp$0","binaryLength","renderDebugModel","CONSTRUCTOR_MARKER","tempRef","existingDebugReference","debugModelRoot","debugNoOutline","prevModelRoot","ioInfo$jscomp$0","id$jscomp$0","sequence","forwardDebugInfoFromAbortedTask","emitTimingChunk","emitChunk","ERRORED$1","prevCanEmitDebugInfo","RENDERING","parentSerializedSize","currentEnv","processedChunk","errorId","currentRequest$1","flushCompletedChunks","debugDestination","debugChunks","importsChunks","hintChunks","_debugChunks","regularChunks","errorChunks","startFlowingDebug","error$2","fromHex","resolveDebugMessage","command","retainedValue","resolveServerReference","RESPONSE_SYMBOL","loadServerReference$1","blockedPromise","cachedPromise","resolveReference","promiseValue","MAX_BOUND_ARGS","bumpArrayCount","arrayContext","_chunk$reason","rawModel","parentObj","parentKey","arrayRoot","proxyHandlers","MAX_BIGINT_DIGITS","parseTypedArray","parseReadableStream","parseAsyncIterable","childContext","localLength","rootArrayContexts","ArrayPrototype","referenceArrayRoot","flightController","_chunk","FlightIterator","backingFormData","arraySizeLimit","resolveField","decodeBoundActionMetaData","serverManifest","serverReferenceToString","PROMISE_PROTOTYPE","lastRanAwait","emptyStack","resourceType","callIterator","triggerAsyncId","trigger","currentAsyncId","inspectedValue","cycleProtection","seenActions","webpackMap","_entry$value","busboyStream","pendingFiles","queuedFields","_ref2","mimeType","JSCompiler_object_inline_chunks_284","exportName","debugChannelReadable","onData","lastWasPartial","stringBuffer","debugWritable","debugChannelWritable","createCacheRoot","createFakeCallStack","fnMap","objectCache","ReactServerDOMTurbopackServer","ReactServerDOMWebpackServer","ReactServerDOMTurbopackStatic","ReactServerDOMWebpackStatic","getAltProxyForBindingsDEV","fillPool","customRandom","StructError","isObject","print","toFailures","Struct","assert","is","mask","validate","define","never","unknown","coerce","getSize","refine","__webpack_require__","mode","ns","def","definition","moreModules","chunkIds","runtime","runtimeStyles","runtimeStyleChanged","vendoredReactRSC","vendoredReactSSR","CachedRouteKind","IncrementalCacheKind","RouteKind","DynamicState","DynamicHTMLPreludeState","Phase","NEXT_REQUEST_META","getRequestMeta","addRequestMeta","DetachedPromise","ENCODED_TAGS","HTML","HEAD","BODY","BODY_AND_HTML","META","ICON_MARK","indexOfUint8Array","haystack","isBuffer","byteOffset","completeMatch","isEquivalentUint8Arrays","removeFromUint8Array","tagIndex","removed","voidCatch","encoder","TextEncoder","chainStreams","streams","pipeTo","preventClose","nextStream","lastStream","streamFromString","encode","streamFromBuffer","streamToChunks","streamToBuffer","streamToString","decoder","fatal","decode","createBufferedTransformStream","maxBufferByteLength","bufferedChunks","bufferByteLength","flush","copiedBytes","bufferedChunk","transform","scheduleFlush","detached","createMetadataTransformStream","insert","chunkIndex","isMarkRemoved","iconMarkIndex","closedHeadIndex","iconMarkLength","replaced","insertion","encodedInsertion","insertionLength","createHeadInsertionTransformStream","inserted","hasBytes","insertedHeadContent","createFlightDataInjectionTransformStream","delayDataUntilFirstHtmlChunk","htmlStreamFinished","donePulling","startOrContinuePulling","startPulling","CLOSE_TAG","createMoveSuffixStream","foundSuffix","before","createHtmlDataDplIdTransformStream","dplId","didTransform","htmlTagIndex","insertionPoint","attribute","encodedAttribute","modifiedChunk","chainTransformers","transformers","transformer","pipeThrough","continueFizzStream","renderStream","inlinedDataStream","getServerInsertedHTML","getServerInsertedMetadata","validateRootLayout","flushed","foundHtml","foundBody","suffixUnclosed","missingTags","continueDynamicPrerender","prerenderStream","continueStaticPrerender","continueStaticFallbackPrerender","cacheBustingHeader","searchStr","NEXT_CLIENT_RESUME_SCRIPT","didAlreadyInsert","headClosingTagIndex","continueDynamicHTMLResume","normalizeNextQueryParam","detectDomainLocale","domainItems","detectedLocale","defaultLocale","locales","locale","addPathSuffix","getHostname","normalizeLocalePath","lowercasedLocales","removePathPrefix","withoutPrefix","REGEX_LOCALHOST_HOSTNAME","parseURL","Internal","NextURL","baseOrOpts","analyze","getNextPathnameInfo","i18n","trailingSlash","nextConfig","pathnameNoDataPrefix","paths","parseData","i18nProvider","__NEXT_NO_MIDDLEWARE_URL_NORMALIZE","domainLocale","domains","formatPathname","addLocale","ignorePrefix","lower","forceLocale","formatSearch","password","username","toJSON","Request","ResponseAbortedName","ResponseAborted","clientComponentLoadStart","clientComponentLoadTimes","clientComponentLoadCount","getClientComponentLoaderMetrics","metrics","isAbortError","pipeToNodeResponse","waitUntilForEnd","errored","destroyed","writableFinished","createWriterFromResponse","started","drained","onDrain","off","WritableStream","NEXT_OTEL_PERFORMANCE_PREFIX","measure","flushHeaders","destroy","RenderResult","EMPTY","fromStatic","assignMetadata","isNull","isDynamic","toUnchunkedString","ESCAPE_LOOKUP","ESCAPE_REGEX","htmlEscapeJsonString","MANIFESTS_SINGLETON","globalThisWithManifests","getManifestsSingleton","manifestSingleton","getClientReferenceManifest","proxiedClientReferenceManifest","getServerActionsManifest","serverActionsManifest","getServerModuleMap","serverModuleMap","flightResponses","getFlightStream","debugStream","newResponse","edgeSSRModuleMapping","ssrModuleMapping","moduleMap","Readable","createFromNodeStream","responseOnNextTick","writeFlightDataInstruction","scriptStart","htmlInlinedData","fromCodePoint","ReactServerResult","_stream","consume","createReactServerPrerenderResult","ReactServerPrerenderResult","createReactServerPrerenderResultFromRender","assertChunks","_chunks","consumeChunks","asUnclosingStream","createUnclosingStream","consumeAsUnclosingStream","asStream","createClosingStream","consumeAsStream","processPrelude","unprocessedPrelude","peek","firstResult","preludeIsEmpty","createInlinedDataStream","source","startScriptTag","flightReader","scriptContents","decodedString","createPendingStream","createOnHeadersCallback","appendHeader","resumeAndAbort","renderToFlightStream","ComponentMod","clientModules","webStreamToString","renderToFizzStream","streamOptions","renderToInitialFizzStream","ReactDOMServer","resumeToFizzStream","getServerPrerender","prerender","getClientPrerender","INTERNAL_QUERY_NAMES","createMetadataContext","renderOpts","isStaticMetadataRouteFile","DraftModeProvider","cookieValue","_isEnabled","_previewModeId","_mutableCookies","mergeMiddlewareCookies","existingCookies","setCookieValue","splitCookiesString","charAt","createRequestStoreForRender","rootParams","implicitTags","serverComponentsHmrCache","renderResumeDataCache","defaultOnUpdateCookies","getHeaders","cleaned","userspaceMutableCookies","draftMode","__serverComponentsHmrCache","createLazyResult","pendingResult","onfulfilled","onrejected","getImplicitTags","getDerivedTags","derivedTags","curPathname","tagsArray","expirationsByCacheKind","createTagsExpirationsByCacheKind","cacheHandlers","FlightRenderResult","invalidServerComponentReactHooks","setMessage","getStackWithoutErrorMessage","formatServerError","addedMessage","clientHook","regex","createDigestWithErrorCode","originalDigest","__NEXT_ERROR_CODE","extractNextErrorCode","isReactLargeShellError","getDigestForWellKnownError","createReactServerErrorHandler","shouldFormatError","isBuildTimePrerendering","reactServerErrors","onReactServerRenderError","spanToRecordOn","stringHash","span","getActiveScopeSpan","recordException","setAttribute","setStatus","SpanStatusCode","createHTMLErrorHandler","allCapturedErrors","onHTMLRenderSSRError","isSSRError","dynamicParamTypes","catchall","dynamic","dynamicParamTypesSchema","segmentSchema","flightRouterStateSchema","createFlightRouterStateFromLoaderTreeImpl","loaderTree","hintTree","getDynamicParamFromSegment","layout","loading","dynamicParam","treeSegment","segmentTree","mod","instantConfig","unstable_instant","childHintNode","createFlightRouterStateFromLoaderTree","createRouteTreePrefetch","actionsForbiddenHeaders","getServerActionRequestMetadata","isURLEncodedAction","isMultipartAction","isFetchAction","isPossibleServerAction","stdout","enabled","NO_COLOR","FORCE_COLOR","isTTY","CI","TERM","replaceClose","nextIndex","formatter","open","bold","red","green","yellow","magenta","white","prefixes","wait","LOGGING_METHOD","prefixedLog","prefixType","shift","consoleMethod","warnOnceCache","BUILTIN_PREFIX","nextInternalPrefixRegex","normalizeFilePath","projectDir","cwd","relativeProjectRoot","relativePath","projectDirName","projectDirWithSlash","normalizeConventionFilePath","conventionPath","BOUNDARY_PREFIX","getConventionPathByType","conventionType","modules","nodeHeadersToRecord","record","getForwardedHeaders","fromNodeOutgoingHttpHeaders","nodeHeaders","mergedHeaders","filterReqHeaders","forbiddenHeaders","createForwardedActionResponse","workerPathname","forwardedHeaders","proto","__NEXT_PRIVATE_ORIGIN","duplex","internal","createRedirectRenderResult","originalHost","redirectUrl","redirectType","currentPathname","appRelativeRedirectUrl","getAppRelativeRedirectUrl","resolved","parsedRedirectUrl","prerenderManifest","preview","limitUntrustedHeaderValueForLogs","handleAction","generateFlight","serverActions","forwardedHostHeader","forwardedHostHeaderValue","hostHeader","warning","handleUnrecognizedFetchAction","getActionNotFoundError","fetchCache","originHeader","originHost","isCsrfOriginAllowed","originDomain","allowedOrigins","normalizedOrigin","allowedOrigin","normalizedAllowed","matchWildcardDomain","normalizedDomain","normalizedPattern","domainParts","patternParts","patternPart","domainPart","skipPageRendering","actionWasForwarded","forwardedWorker","selectWorkerForForwarding","pageName","bundlePath","workers","actionModId","boundActionArguments","createTemporaryReferenceSet","decodeReply","decodeReplyFromBusboy","decodeAction","decodeFormState","PassThrough","Transform","pipeline","actionBodyFromMeta","defaultBodySizeLimit","bodySizeLimit","bodySizeLimitBytes","sizeLimitTransform","encoding","getActionModIdOrError","busboy","defParamCharset","limits","fieldSize","abortController","sizeLimitedBody","fakeRequest","toWeb","areAllActionIdsValid","mpaFormData","hasAtLeastOneAction","$ACTION_","$ACTION_ID_","actionIdFieldName","$ACTION_REF_","actionDescriptorField","actionFields","actionField","isInvalidStringActionDescriptor","actionDescriptor","ACTION_DESCRIPTOR_ID_PREFIX","executeActionAndPrepareForRender","actionData","actionHandler","actionMod","__next_app__","logInfo","actionType","logServerFunctions","actionInfo","isInlineAction","exportedName","addRevalidationHeader","isTagRevalidated","isCookieRevalidated","duration","maybeRevalidatesPromise","isDraftMode","ServerInsertedHTMLContext","useServerInsertedHTML","addInsertedServerHTMLCallback","createServerInsertedHTML","serverInsertedHTMLCallbacks","addInsertedHtml","ServerInsertedHTMLProvider","renderServerInsertedHTML","ReactClient","encodeURIPath","getRequiredScripts","buildManifest","assetPrefix","SRIManifest","pagePath","preinitScripts","preinitScriptCommands","bootstrapScript","files","rootMainFilesTree","rootMainFiles","makeGetServerInsertedHTML","polyfills","serverCapturedErrors","tracingMetadata","flushedErrorMetaTagsUntilIndex","polyfillTags","polyfill","script","traceMetaTags","errorMetaTags","isPermanent","httpEquiv","serverInsertedHTML","getLinkAndScriptTags","injectedCSS","injectedScripts","collectNewImports","filePathWithoutExt","cssChunks","jsChunks","entryCSSFiles","entryJSFiles","cssFiles","jsFiles","css","scripts","getPreloadableFonts","nextFontManifest","injectedFontPreloadTags","filepathWithoutExtension","fontFiles","foundFontUsage","preloadedFontFiles","app","fontFile","hasLoadingComponentInTree","isUseCacheFunction","$$id","getLayoutOrPageModule","modType","defaultPage","isLayout","isDefaultPage","interopDefault","default","parseLoaderTree","template","getAssetQueryString","addTimestamp","shouldAddVersion","requestTimestamp","sharedContext","clientAssetToken","renderCssResource","entryCssFiles","preloadCallbacks","componentMod","createElement","entryCssFile","fullHref","inlined","parsedRequestHeaders","isRSCRequest","preloadStyle","createComponentStylesAndScripts","getComponent","injectedJS","jsHrefs","weakRef","deref","locked","Batcher","cacheKeyFn","schedulerFn","batch","fromResponseCacheEntry","cacheEntry","pageData","rscData","segmentData","toResponseCacheEntry","isMiss","isStale","cacheControl","parsePositiveInt","envValue","DEFAULT_TTL_MS","NEXT_PRIVATE_RESPONSE_CACHE_TTL","DEFAULT_MAX_SIZE","NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE","TTL_SENTINEL","invocationID","ResponseCache","minimal_mode","ttl","getBatcher","revalidateBatcher","evictedInvocationIDs","compoundKey","extractInvocationID","separatorIndex","responseGenerator","hasResolved","previousCacheEntry","cachedItem","expiresAt","isRoutePPREnabled","isPrefetch","routeKind","handleGet","previousIncrementalCacheEntry","routeKindToIncrementalCacheKind","incrementalResponseCacheEntry","handleRevalidate","responseCacheEntry","isRevalidating","min","createSegmentVaryParamsAccumulator","accumulator","emptySet","emptyVaryParamsAccumulator","createResponseVaryParamsAccumulator","getMetadataVaryParamsThenable","getMetadataVaryParamsAccumulator","responseAccumulator","varyParamsAccumulator","finishAccumulatingVaryParams","rootVaryParams","segmentAccumulator","finishSegmentAccumulator","merged","resolver","createComponentTree","createComponentTreeInternal","errorMissingDefaultExport","convention","parentParams","parentOptionalCatchAllParamName","parentRuntimePrefetchable","rootLayoutIncluded","authInterrupts","MetadataOutlet","isRoot","defaultExport","nextConfigOutput","experimental","cacheComponents","Fragment","SegmentViewNode","LayoutRouter","RenderFromTemplateContext","ClientPageRoot","ClientSegmentRoot","createServerSearchParamsForServerPage","createPrerenderSearchParamsForClientPage","createServerParamsForServerSegment","createPrerenderParamsForClientSegment","serverHooks","injectedCSSWithCurrentLayout","injectedJSWithCurrentLayout","injectedFontPreloadTagsWithCurrentLayout","layerAssets","getLayerAssets","layoutOrPagePath","styleTags","scriptTags","fontFilename","ext","preloadFont","preconnect","Template","templateStyles","templateScripts","ErrorComponent","Loading","loadingStyles","loadingScripts","layoutOrPageMod","hideSpan","rootLayoutAtThisLevel","rootLayoutIncludedAtThisLevelOrAbove","NotFound","notFoundStyles","isRuntimePrefetchable","hasRuntimePrefetch","Forbidden","forbiddenStyles","Unauthorized","unauthorizedStyles","validateRevalidate","revalidateVal","defaultRevalidate","unstable_dynamicStaleTime","pageStaleTime","isPossiblyPartialResponse","LayoutOrPage","isValidElementType","segmentParam","currentParams","optionalCatchAllParamName","isSegmentViewEnabled","notFoundElement","notFoundFilePath","createBoundaryConventionElement","conventionName","forbiddenElement","unauthorizedElement","parallelRouteMap","isChildrenRouteKey","notFoundComponent","forbiddenComponent","unauthorizedComponent","childCacheNodeSeedData","parsedTree","PARALLEL_ROUTE_DEFAULT_PATH","templateNode","templateFilePath","errorFilePath","loadingFilePath","globalErrorFilePath","wrappedErrorStyles","fileNameSuffix","segmentViewBoundaries","isNextjsBuiltinFilePath","parallelRouteProps","parallelRouteCacheNodeSeedData","parallelRouteProp","loadingElement","cacheNodeKey","loadingData","createSeedData","isClientComponent","createVaryParamsAccumulator","pageElement","serverProvidedParams","promiseOfParams","promiseOfSearchParams","$$isPage","isDefaultSegment","pageFilePath","segmentType","wrappedPageElement","segmentNode","isRootLayoutWithChildrenSlotAndAtLeastOneMoreSlot","clientSegment","notfoundClientSegment","forbiddenClientSegment","unauthorizedClientSegment","createErrorBoundaryClientSegmentRoot","ErrorBoundaryComponent","errorElement","SegmentComponent","$$isLayout","layoutFilePath","getRootParams","getRootParamsImpl","deferredRsc","LoadingBoundaryProvider","walkTreeWithFlightRouterState","loaderTreeToFilter","parentIsInsideSharedLayout","rscHead","parallelRoutesKeys","actualSegment","renderComponentsOnThisLevel","isInsideSharedLayout","isRouteTreePrefetchRequest","canSegmentBeOverridden","overriddenSegment","routerState","layoutPath","subPath","createFullTreeFlightDataForNavigation","hintTreeForInitialRender","parseAppRouteSegment","parseAppRoute","normalized","pathnameSegments","appSegment","dynamicSegments","interceptionPrefixFromParamType","resolveParamValue","depth","processedSegments","pathSegment","interceptionPrefix","interpolateParallelRouteParams","interpolated","structuredClone","nextDepth","getDynamicParam","interpolatedParams","segmentKey","getParamValue","searchValue","PARAMETER_PATTERN","parseMatchedParameter","serializeUseCacheCacheStore","isCacheComponentsEnabled","hasExplicitRevalidate","hasExplicitExpire","readRootParamNames","binaryString","arrayBufferToString","bytes","len","fromCharCode","binary","stringifyResumeDataCache","resumeDataCache","encryptedBoundArgs","deflateSync","createPrerenderResumeDataCache","decryptedBoundArgs","createRenderResumeDataCache","resumeDataCacheOrPersistedCache","maxPostponedStateSizeBytes","inflateSync","maxDecompressedSize","maxOutputLength","parseUseCacheCacheStore","stringToUint8Array","atob","getDynamicHTMLPostponedState","preludeState","dataString","replacementsString","postponedString","getDynamicDataPostponedState","ANNOUNCER_TYPE","AppRouterAnnouncer","portalNode","setPortalNode","useState","getAnnouncerNode","existingAnnouncer","getElementsByName","shadowRoot","cssText","announcer","ariaLive","role","shadow","attachShadow","appendChild","getElementsByTagName","isConnected","removeChild","routeAnnouncement","setRouteAnnouncement","previousTitle","useRef","currentTitle","title","pageHeader","innerText","textContent","createPortal","useRouter","HandleRedirect","RedirectErrorBoundary","RedirectBoundary","createRouterCacheKey","withoutSearchParameters","unresolvedThenable","RootErrorBoundary","NameSpace","RootLayoutBoundary","globalMutable","HistoryUpdater","appRouterState","useInsertionEffect","__NA","__PRIVATE_NEXTJS_INTERNALS_TREE","pushState","replaceState","copyNextJsInternalHistoryState","currentState","Head","headCacheNode","resolvedPrefetchRsc","useDeferredValue","Router","nd","sourcePage","__internal_src_page","handlePageShow","persisted","pendingMpaPath","handleUnhandledRedirect","preventDefault","originalPushState","originalReplaceState","applyUrlFromHistoryPushReplace","appHistoryState","_unused","_N","onPopState","matchingHead","findHeadInCacheImpl","keyPrefix","keyPrefixWithoutSearchParams","childParallelRoutes","childCacheNode","instrumentedNavigationPromises","layoutRouterContext","parentTree","parentCacheNode","parentSegmentPath","parentLoadingData","debugNameContext","isActive","globalLayoutRouterContext","headKeyWithoutSearchParams","HotReloader","RuntimeStylesForWebpack","AppRouter","globalErrorState","forceUpdate","renderedStylesSize","createInitialRouterState","initialRSCPayload","initialFlightStreamForCache","initialCanonicalUrlParts","initialFlightData","initialRenderedSearch","initialCouldBeIntercepted","initialSupportsPerSegmentPrefetching","initialStaleTime","initialStaticStageByteLength","initialHeadVaryParams","initialRuntimePrefetchStream","initialDynamicStaleTimeSeconds","initialCanonicalUrl","initialSeedData","initialHead","initialRouteTree","initialTask","printDebugThrownValueForProspectiveRender","originalErrorStack","stackStart","shouldAttemptPatching","warnAboutTimers","runInSequentialTasks","rest","scheduleTimeout","createAtomicTimerGroup","delayMs","isFirstCallback","firstTimerIdleStart","didFirstTimerRun","didImmediateRun","runFirstCallback","unpatchedSetImmediate","runSubsequentCallback","timer","_idleStart","ids","DANGEROUSLY_runPendingImmediatesAfterCurrentTask","expectNoPendingImmediates","CacheSignal","earlyListeners","tickPending","pendingTimeoutCleanup","subscribedSignals","invokeListenersIfNoPendingReads","noMorePendingCaches","clearPending","immediate","clearImmediate","cacheReady","beginRead","subscriber","endRead","hasPendingReads","trackRead","onFinally","subscribeToReads","unsubscribeFromReads","getTracedMetadata","traceData","clientTraceMetadata","StaleTimeIterable","_done","currentValue","_resolve","_buffer","createSelectStaleTime","staleTimes","static","trackStaleTime","selectStaleTime","_stale","finishStaleTimeTracking","createServerInsertedMetadata","reHasRegExp","reReplaceRegExp","escapeStringRegexp","getRouteRegex","normalizedRoute","includeSuffix","includePrefix","excludeOptionalTrailingSlash","parameterizedRoute","groups","getParametrizedRoute","groupIndex","markerMatch","paramMatches","re","getSafeKeyFromSegment","getSafeRouteKey","routeKeys","backreferenceDuplicateKeys","cleanedKey","invalidKey","duplicateKey","PARAM_SEPARATOR","hasAdjacentParameterIssues","normalizeAdjacentParameters","stripNormalizedSeparators","safePathToRegexp","needsNormalization","routeToUse","retryError","safeCompile","compiler","compile","getRouteMatcher","matcherFn","routeMatch","group","unescapeSegments","compileNonPath","decodeQueryPathParameter","parseReqUrl","parsedUrl","parseUrl","slashedProtocols","formatUrl","urlObj","querystring","filterInternalQuery","paramKeys","isNextQueryPrefix","isNextInterceptionMarkerPrefix","getPreviouslyRevalidatedTags","imageConfigDefault","deviceSizes","loader","loaderFile","disableStaticImages","minimumCacheTTL","formats","maximumDiskCacheSize","maximumRedirects","maximumResponseBody","dangerouslyAllowLocalIP","dangerouslyAllowSVG","contentSecurityPolicy","contentDispositionType","localPatterns","remotePatterns","qualities","unoptimized","customCacheHandler","ImageConfigContext","anySegmentHasRuntimePrefetchEnabled","isPageAllowedToBlock","anySegmentNeedsInstantValidation","findSegmentsWithInstantConfig","needsValidation","unstable_disableValidation","unstable_disableDevValidation","unstable_disableBuildValidation","anySegmentNeedsInstantValidationInDev","cacheScopedToWorkStore","anySegmentNeedsInstantValidationInBuild","results","visit","resolveInstantConfigSamplesForPage","samples","childSamples","resultsPerWorkStore","createWebDebugChannel","readableController","clientSideReadable","serverSide","clientSide","createNodeStreamWithLateRelease","partialChunks","allChunks","releaseSignal","maybeAppendBuildIdToRSCPayload","getDynamicStaleTime","pageMod","childPromises","makeGetDynamicParamFromSegment","optimisticRouting","NonIndex","is404Page","generateDynamicRSCPayload","routeModule","userland","createMetadataComponents","serveStreamingMetadata","needsFullTree","metadataIsRuntimePrefetchable","Viewport","Metadata","parsedQuery","metadataContext","baseResponse","createErrorContext","renderSource","routerKind","routePath","routeType","revalidateReason","generateDynamicFlightRenderResult","htmlRequestId","onInstrumentationRequestError","setReactDebugChannel","reactServerErrorsByDigest","silenceLog","rscPayload","fetchMetrics","generateStagedDynamicFlightRenderResult","resolveStaticStageByteLength","stageController","asyncApiPromises","createAsyncApiPromises","prerenderResumeDataCache","trackPendingModules","runtimePrefetchTransform","spawnRuntimePrefetchWithFilledCaches","dynamicStream","staticStream","countStaticStageBytes","finalRuntimeServerPrerender","stagedRenderToReadableStreamWithoutCachesInDev","getPayload","generateDynamicFlightRenderResultWithStagesInDev","initialRequestStore","createRequestStore","setCacheStatus","shouldValidate","isBypassingCachesInDev","_bypassCachesInDev","WarnForBypassCachesInDev","prepareInitialCanonicalUrl","serverStream","accumulatedChunksPromise","returnedDebugChannel","finalRequestStore","renderWithRestartOnCacheMissInDev","validationDebugChannelClient","t1","t2","nodeStreamFromReadableStream","consoleAsyncStorage","dim","spawnStaticShellValidationInDev","logValidationSkipped","generateRuntimePrefetchResult","prospectiveRuntimeServerPrerender","applyMetadataFromPrerenderResult","initialServerPrerenderController","initialServerRenderController","initialServerPrerenderStore","hmrRefreshHash","initialServerPayload","prerenderOptions","NEXT_DEBUG_BUILD","__NEXT_VERBOSE_LOGGING","pendingInitialServerResult","invalidDynamicUsageError","prependIsPartialByte","byte","serverIsDynamic","finalServerController","serverDynamicTracking","finalStageController","finalServerPrerenderStore","finalRSCPayload","prerenderIsPending","prerenderResult","dynamicAccess","collectedRevalidate","collectedExpire","collectedStale","collectedTags","getRSCPayload","is404","appUsingSizeAdjustment","hasGlobalNotFound","errorType","getGlobalErrorStyles","isPossiblyPartialHead","Preloads","preloadFn","getErrorRSCPayload","errorHints","reactServerStream","reactDebugStream","images","Provider","appDir","ErrorApp","renderToHTMLOrFlightImpl","isNotFoundPath","enableTainting","setIsrStatus","cachedNavigations","instrumented","loadChunk","shouldTrackModuleLoading","__next_require__","exportsOrPromise","trackPendingImport","__next_chunk_load__","loadingChunk","trackPendingChunkLoad","shouldTrackFetchMetrics","originalRequest","startSpan","appUsingSizeAdjust","patchFetch","taintObjectReference","isPrefetchRequest","isRuntimePrefetchRequest","subtle","isPossibleActionRequest","resolvedPathname","prerenderToStreamWithTracing","prerenderToStream","digestErrorsMap","buildFailingError","ssrErrors","revalidatesPromise","cacheComponentsEnabled","runInstantValidation","validateInstantConfigsInBuild","didExecuteServerAction","actionRequestResult","components","notFoundTreeComponents","notFoundLoaderTree","renderToStream","renderToHTMLOrFlight","csp","previouslyRevalidatedTags","shouldProvideFlightRouterState","parseAndValidateFlightRouterState","stateHeader","getScriptNonceFromHeader","cspHeaderValue","directive","directives","parsePostponedState","postponedStringLengthMatch","postponedStringLength","replacements","replaceAll","createWorkStore","shouldWaitOnAllReady","supportsDynamicResponse","NEXT_SSG_FETCH_METRICS","__incrementalCache","reactLoadableManifest","afterContext","createAfterContext","onAfterTaskError","refreshTagsByCacheKind","createRefreshTagsByCacheKind","runInCleanSnapshot","fetchTags","staleHeader","staticBailoutInfo","reactMaxHeadersLength","subresourceIntegrityManifest","getTracePropagationData","polyfillFiles","noModule","randomUUID","renderSpan","endSpanWithError","isRecording","withSpan","serverComponentsErrorHandler","htmlRendererErrorHandler","reactServerResult","readableSsr","readableBrowser","RSCPayload","getPostponedFromState","resumeAppElement","htmlStream","appElement","webContinueFizzStream","errorRSCPayload","errorServerStream","shouldBailoutToCSR","errorPreinitScripts","errorBootstrapScript","setupErr","errorHtmlStream","errorAllReady","finalErr","initialReactController","initialDataController","initialAbandonController","initialStageController","initialRscPayload","initialStreamResult","streamPair","accumulateStreamChunks","finalRscPayload","finalStreamResult","staticChunks","runtimeChunks","dynamicChunks","earlyCookies","earlyMutableCookies","earlyHeaders","sharedParamsParent","earlySharedParamsParent","sharedSearchParamsParent","earlySharedSearchParamsParent","connection","logMessagesAndSendErrorsToBrowser","messages","sendErrorsToBrowser","NEXT_TEST_LOG_VALIDATION","spawnStaticShellValidationInDevImpl","debugChannelClient","NEXT_PRIVATE_DEBUG_VALIDATION","allowEmptyStaticShell","getHmrRefreshHash","accumulatedChunks","needsInstantValidation","warmupClientModulesForStagedValidation","runtimeResult","validateStagedShell","staticResult","instantConfigsResult","validateInstantConfigs","storeType","partialServerChunks","allServerChunks","initialClientPrerenderStore","initialClientPrerenderController","initialClientReactController","initialClientRenderController","pendingInitialClientResult","stageChunks","trackDynamicHole","clientDynamicTracking","clientReactController","clientRenderController","finalClientPrerenderStore","pendingFinalClientResult","processPreludeOp","createCombinedPayloadAtDepth","createCombinedPayloadStream","collectStagedSegmentData","discoverValidationDepths","InstantValidation","clientReferenceManifest","stageEndTimes","isDebugChannelEnabled","validateAtDepth","groupDepthForValidation","validateAtDepthImpl","previousBoundaryState","extraChunksController","useRuntimeStageForPartialSegments","payloadResult","reactController","renderController","instantValidationState","hasAmbiguousErrors","dynamicOnlyErrors","groupDepthsByUrlDepth","maxDepth","maxGroupDepth","currentGroupDepth","renderWithRestartOnCacheMissInValidation","createOnError","prefilledDataCache","advanceStageIfNoCacheMiss","initialResult","finalReactController","finalDataController","finalResult","success","validateInstantConfigsInBuildImpl","outerWorkStore","allPossibleFallbackRouteParams","getFallbackRouteParams","pathnameRouteParamSegments","extractPathnameRouteParamSegmentsFromLoaderTree","currentPath","updatedPath","targetSegment","validatePrefixMatch","targetPathSegment","resolveRouteParamsFromTree","uniqueID","sampleIndex","validateInstantConfigInBuildWithSample","sampleDesc","outerCtx","sampleUrlWithoutQuery","sampleQuery","sampleUrl","fallbackRouteParamsMut","paramKey","sampleRootParams","validationCtx","unusedMutableCookies","onServerError","finalServerStore","serverValidationSampleTracking","warmupValidationSamplesTracking","shouldGenerateStaticFlightData","reportErrors","reactServerPrerenderResult","setMetadataHeader","initialServerResult","initialServerReactController","initialServerPayloadPrerenderStore","initialPrerenderOptions","finalServerReactController","finalServerRenderController","finalServerPayloadPrerenderStore","finalAttemptRSCPayload","finalRSCPrerenderOptions","finalRSCAbortCallback","pendingFinishes","finalRSCPrerenderFn","pendingPrerenderResult","finalClientReactController","finalClientRenderController","finalClientOnHeaders","collectSegmentData","continueDynamicPrerenderOpts","finalStream","foreverStream","resumePrelude","emptyReactServerResult","reactServerPrerenderStore","ssrPrerenderStore","pprOnHeaders","pprDynamicOpts","pprFallbackDynamicOpts","prerenderLegacyStore","globalErrorModule","GlobalErrorComponent","globalErrorModulePath","fullPageDataBuffer","edgeRscModuleMapping","rscModuleMapping","prefetchInlining","collectPrefetchHints","maxBundleSize","BUILD_MANIFEST","features","typescript","TEST_ROUTE","TEST_STRICT_ROUTE","isDynamicRoute","strict","normalizeDataPath","normalizePagePath","posix","resolvedPage","normalize","getExtensionRegexString","staticExtensions","dynamicExtensions","FAVICON_REGEX","ROBOTS_TXT_REGEX","MANIFEST_JSON_REGEX","MANIFEST_WEBMANIFEST_REGEX","SITEMAP_XML_REGEX","compiledRegexCache","MultiFileWriter","findOrCreateTask","directory","flatMap","FileSystemCache","flushToDisk","serverDistDir","revalidatedTags","maxMemoryCacheSize","getMemoryCache","resetRequestCache","getFilePath","fileData","mtime","lastModified","getTime","fetchIdx","parsedData","storedTags","maybeSegmentData","segmentPaths","segmentsDir","segmentDataFilePath","tagsHeader","cacheTags","combinedTags","softTags","isAppPath","htmlPath","toRoute","IncrementalCache","dev","minimalMode","getPrerenderManifest","fetchCacheKeyPrefix","CurCacheHandler","allowedRevalidateHeaderKeys","locks","hasCustomCacheHandler","cacheHandlersSymbol","_globalThis","globalCacheHandler","FetchCache","__NEXT_TEST_MAX_ISR_CACHE","disableForTestmode","NEXT_PRIVATE_TEST_PROXY","cacheControls","SharedCacheControls","_requestHeaders","calculateRevalidate","fromTime","floor","initialRevalidateSeconds","_getPathname","lock","generateCacheKey","_ogBody","readableBody","total","arrayBuffer","val","cacheString","referrer","referrerPolicy","createHash","revalidateAfter","getRenderResumeDataCache","memoryCacheData","getPrerenderResumeDataCache","age","notFoundRoutes","itemSize","isImplicitBuildTimeCache","warningText","RouterServerContextSymbol","routerServerGlobal","isInterceptionRouteRewrite","dynamicImportEsmDefault","RouteModule","distDir","relativeProjectDir","isDev","getRouterServerContext","render404","routerServerContext","normalizeUrl","_req","_parsedUrl","instrumentationOnRequestError","absoluteProjectDir","loadManifests","srcPage","loadManifestFromRelativePath","routesManifest","fallbackBuildManifest","serverFilesManifest","dynamicCssManifest","manifest","shouldCache","handleMissing","isAppRouteRoute","isMetadataRouteFile","appDirRelativePath","pageExtensions","strictlyMatchExtensions","normalizedPath","fastResult","regexes","getCompiledRegexes","trailingMatcher","suffixMatcher","variantsMatcher","robotsExts","manifestExts","useEval","skipParse","__RSC_MANIFEST","interceptionRoutePatterns","rewrites","beforeFiles","rewrite","loadCustomCacheHandlers","getIncrementalCache","isMinimalMode","CacheHandler","isrFlushToDisk","onRequestError","errorContext","logErrorWithOriginalStack","getNextConfigEdge","prepare","localeResult","previewData","relative","absoluteDistDir","ensureInstrumentationRegistered","manifests","initUrl","trustHostHeader","isNextDataRequest","originalQuery","pageIsDynamic","normalizedSrcPage","serverUtils","getServerUtils","caseSensitive","defaultRouteRegex","dynamicRouteMatcher","defaultRouteMatches","namedRegex","getNamedParametrizedRoute","prefixRouteKeys","intercepted","inverseParts","hasInterceptionMarker","namedParameterizedRoute","pathToRegexpPattern","handleRewrites","rewrittenParsedUrl","rewriteParams","fsPathname","checkRewrite","regexp","matcher","removeUnnamedParams","sensitive","delimiter","regexModifier","missing","hasParams","matchHas","hasMatch","hasItem","getCookieParser","parseCookieFn","getSafeParamName","newParamName","charCode","matches","groupKey","parsedDestination","destQuery","prepareDestination","destHostnameCompiler","newUrl","parseDestination","escaped","parsedURL","destHostname","destSearch","destPath","destParams","destPathParamKeys","destHostnameParamKeys","destPathCompiler","strOrArray","appendParamsToQuery","nextInternalLocale","dynamicParams","fsPathnameNoSlash","afterFiles","normalizeQueryParams","routeParamKeys","normalizedKey","getParamsFromRouteMatches","routeMatchesHeader","routeMatches","keyName","normalizeDynamicRouteParams","ignoreMissingOptional","hasValidParams","isOptional","isDefaultValue","defaultVal","normalizeCdnUrl","interpolateDynamicPath","builtParam","rewriteParamKeys","paramsMatch","paramsResult","combinedParamKeys","queryValue","paramsToInterpolate","queryResult","removeUncaughtErrorAndRejectionListeners","encodedResolvedPathname","seg","char","runtimeServerDeploymentId","immutableAssetToken","getResponseCache","responseCache","handleResponse","purpose","RouterContext","PrerenderManifestMatcher","matchers","dynamicRoutes","fallbackSourceRoute","SuffixPathnameNormalizer","matched","RSCPathnameNormalizer","PATTERN","SegmentPrefixRSCPathnameNormalizer","extract","registerServerReact","registerClientReact","AppPageRouteModule","normalizers","segmentPrefetchRSC","normalizeAppPageRequestUrl","normalizedUrl","pathCouldBeIntercepted","getVaryHeader","baseVaryHeader","vendored","contexts","vendoredContexts"],"mappings":"UACIA,eADAC,SCAAC,gB,2ICOAC,EAJJ,SAASC,QACP,MAAM,qBAAwB,CAAxB,AAAIC,MAHV,qIAGM,qB,MAAA,Q,WAAA,G,aAAA,EAAuB,EAC/B,CAiBAC,QAAQ,OAAO,CAAGH,AAVdA,CAAAA,EAAII,oBAAQ,qEAAuE,EAUnEC,OAAO,CAC3BF,QAAQ,sBAAsB,CAAGH,EAAEM,sBAAsB,CACzDH,QAAQ,cAAc,CAAGF,MACzBE,QAAQ,oBAAoB,CAAGF,MAC3BD,EAAEO,MAAM,EACVJ,CAAAA,QAAQ,MAAM,CAAGH,EAAEO,MAAM,AAAD,C,yEC1B1B,IAAIC,UAAYC,OAAO,cAAc,CACjCC,iBAAmBD,OAAO,wBAAwB,CAClDE,kBAAoBF,OAAO,mBAAmB,CAC9CG,aAAeH,OAAO,SAAS,CAAC,cAAc,CAgB9CI,YAAc,CAAC,EAfKC,IAgBF,CACpB,eAAgB,IAAMC,eACtB,gBAAiB,IAAMC,gBACvB,YAAa,IAAMC,YACnB,eAAgB,IAAMC,eACtB,gBAAiB,IAAMC,eAC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AY9lB,YAAc6lB,UAAYA,UAAU,KAAK,GACrDrH,aAEF,AAzXd,SACE7F,QAAQ,CACR6F,WAAW,CACXlqC,EAAE,CACF6B,GAAG,CACHs9B,MAAM,CACNtoC,KAAK,EAEL,OAAQgL,KACN,KAAK,GACH4oC,cACEpG,SACArkC,GACA0sC,YAAYvN,OAAQtoC,OAAO,MAAM,CACjCqzC,aAEF,MACF,MAAK,GACH4C,kBACEzI,SACArkC,GACAm/B,OACAtoC,MACA0nC,UACA,EACA2L,aAEF,MACF,MAAK,IACHO,cACEpG,SACArkC,GACA,IAAMm/B,OAAO,MAAM,CAAGtoC,MAAQ61C,YAAYvN,OAAQtoC,OAClDqzC,aAEF,MACF,MAAK,GACH4C,kBACEzI,SACArkC,GACAm/B,OACAtoC,MACA2nC,kBACA,EACA0L,aAEF,MACF,MAAK,GACH4C,kBACEzI,SACArkC,GACAm/B,OACAtoC,MACA4nC,WACA,EACAyL,aAEF,MACF,MAAK,IACH4C,kBACEzI,SACArkC,GACAm/B,OACAtoC,MACA6nC,YACA,EACAwL,aAEF,MACF,MAAK,GACH4C,kBACEzI,SACArkC,GACAm/B,OACAtoC,MACA8nC,WACA,EACAuL,aAEF,MACF,MAAK,IACH4C,kBACEzI,SACArkC,GACAm/B,OACAtoC,MACA+nC,YACA,EACAsL,aAEF,MACF,MAAK,GACH4C,kBACEzI,SACArkC,GACAm/B,OACAtoC,MACAgoC,aACA,EACAqL,aAEF,MACF,MAAK,IACH4C,kBACEzI,SACArkC,GACAm/B,OACAtoC,MACAioC,aACA,EACAoL,aAEF,MACF,MAAK,GACH4C,kBACEzI,SACArkC,GACAm/B,OACAtoC,MACAkoC,cACA,EACAmL,aAEF,MACF,MAAK,IACH4C,kBACEzI,SACArkC,GACAm/B,OACAtoC,MACAmoC,eACA,EACAkL,aAEF,MACF,MAAK,GACH4C,kBACEzI,SACArkC,GACAm/B,OACAtoC,MACAooC,SACA,EACAiL,aAEF,MACJ,CACA,IACE,IAAIwH,cAAgBr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,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,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345]}