{"version":3,"sources":["../../../../src/build/templates/app-page-runtime.ts"],"sourcesContent":["import type { LoaderTree } from '../../server/lib/app-dir-module'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\nimport type { FallbackRouteParam } from '../static-paths/types'\n\nimport {\n  AppPageRouteModule,\n  type AppPageRouteHandlerContext,\n} from '../../server/route-modules/app-page/module.compiled' with { 'turbopack-transition': 'next-ssr' }\n\nimport { RouteKind } from '../../server/route-kind' with { 'turbopack-transition': 'next-server-utility' }\n\nimport { getRevalidateReason } from '../../server/instrumentation/utils' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n  getTracer,\n  SpanKind,\n  SpanStatusCode,\n  type Span,\n} from '../../server/lib/trace/tracer' with { 'turbopack-transition': 'next-server-utility' }\nimport type { RequestMeta } from '../../server/request-meta'\nimport {\n  addRequestMeta,\n  getRequestMeta,\n  setRequestMeta,\n} from '../../server/request-meta' with { 'turbopack-transition': 'next-server-utility' }\nimport { BaseServerSpan } from '../../server/lib/trace/constants' with { 'turbopack-transition': 'next-server-utility' }\nimport { stripFlightHeaders } from '../../server/app-render/strip-flight-headers' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n  NodeNextRequest,\n  NodeNextResponse,\n} from '../../server/base-http/node' with { 'turbopack-transition': 'next-server-utility' }\nimport { checkIsAppPPREnabled } from '../../server/lib/experimental/ppr' with { 'turbopack-transition': 'next-server-utility' }\nimport { isRSCRequestHeader } from '../../server/lib/is-rsc-request' with { 'turbopack-transition': 'next-server-utility' }\nimport { isNonHtmlSecFetchDest } from '../../server/lib/is-non-html-sec-fetch-dest' with { 'turbopack-transition': 'next-server-utility' }\nimport { UNDERSCORE_NOT_FOUND_ROUTE } from '../../shared/lib/entry-constants' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n  getFallbackRouteParams,\n  getPlaceholderFallbackRouteParams,\n  buildDynamicSegmentPlaceholder,\n  createOpaqueFallbackRouteParams,\n  type OpaqueFallbackRouteParams,\n} from '../../server/request/fallback-params' with { 'turbopack-transition': 'next-server-utility' }\nimport { setManifestsSingleton } from '../../server/app-render/manifests-singleton' with { 'turbopack-transition': 'next-server-utility' }\nimport { shouldServeStreamingMetadata } from '../../server/lib/streaming-metadata' with { 'turbopack-transition': 'next-server-utility' }\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths' with { 'turbopack-transition': 'next-server-utility' }\nimport { getIsPossibleServerAction } from '../../server/lib/server-action-request-meta' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n  RSC_HEADER,\n  NEXT_ROUTER_PREFETCH_HEADER,\n  NEXT_ROUTER_SEGMENT_PREFETCH_HEADER,\n  NEXT_INSTANT_TEST_COOKIE,\n  NEXT_IS_PRERENDER_HEADER,\n  NEXT_DID_POSTPONE_HEADER,\n  RSC_CONTENT_TYPE_HEADER,\n  NEXT_HMR_REFRESH_HEADER,\n} from '../../client/components/app-router-headers' with { 'turbopack-transition': 'next-server-utility' }\nimport { getBotType } from '../../shared/lib/router/utils/is-bot' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n  CachedRouteKind,\n  IncrementalCacheKind,\n  type CachedAppPageValue,\n  type ResponseCacheEntry,\n  type ResponseGenerator,\n} from '../../server/response-cache' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n  FallbackMode,\n  parseFallbackField,\n} from '../../lib/fallback' with { 'turbopack-transition': 'next-server-utility' }\nimport RenderResult from '../../server/render-result' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n  CACHE_ONE_YEAR_SECONDS,\n  HTML_CONTENT_TYPE_HEADER,\n  NEXT_CACHE_TAGS_HEADER,\n  NEXT_NAV_DEPLOYMENT_ID_HEADER,\n  NEXT_RESUME_HEADER,\n  NEXT_RESUME_STATE_LENGTH_HEADER,\n} from '../../lib/constants' with { 'turbopack-transition': 'next-server-utility' }\nimport type { CacheControl } from '../../server/lib/cache-control'\nimport { ENCODED_TAGS } from '../../server/stream-utils/encoded-tags' with { 'turbopack-transition': 'next-server-utility' }\nimport { sendRenderResult } from '../../server/send-payload' with { 'turbopack-transition': 'next-server-utility' }\nimport { NoFallbackError } from '../../shared/lib/no-fallback-error.external' with { 'turbopack-transition': 'next-server-utility' }\nimport { parseMaxPostponedStateSize } from '../../shared/lib/size-limit' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n  getMaxPostponedStateSize,\n  getPostponedStateExceededErrorMessage,\n  readBodyWithSizeLimit,\n} from '../../server/lib/postponed-request-body' with { 'turbopack-transition': 'next-server-utility' }\nimport { parseUrl } from '../../lib/url' with { 'turbopack-transition': 'next-server-utility' }\n\nimport * as entryBase from '../../server/app-render/entry-base' with { 'turbopack-transition': 'next-server-utility' }\nimport { RedirectStatusCode } from '../../client/components/redirect-status-code' with { 'turbopack-transition': 'next-server-utility' }\nimport { InvariantError } from '../../shared/lib/invariant-error' with { 'turbopack-transition': 'next-server-utility' }\nimport { scheduleOnNextTick } from '../../lib/scheduler' with { 'turbopack-transition': 'next-server-utility' }\nimport { isInterceptionRouteAppPath } from '../../shared/lib/router/utils/interception-routes' with { 'turbopack-transition': 'next-server-utility' }\nimport { getSegmentParam } from '../../shared/lib/router/utils/get-segment-param' with { 'turbopack-transition': 'next-server-utility' }\n\n/**\n * Builds the cache key for the most complete prerenderable shell we can derive\n * from the shell that matched this request. Only params that can still be\n * filled by `generateStaticParams` are substituted; fully dynamic params stay\n * as placeholders so a request like `/c/foo` can complete `/[one]/[two]` into\n * `/c/[two]` rather than `/c/foo`.\n */\nfunction buildCompletedShellCacheKey(\n  fallbackPathname: string,\n  remainingPrerenderableParams: readonly FallbackRouteParam[],\n  params: Record<string, undefined | string | string[]> | undefined\n): string {\n  const prerenderableParamsByName = new Map(\n    remainingPrerenderableParams.map((param) => [param.paramName, param])\n  )\n\n  return (\n    fallbackPathname\n      .split('/')\n      .map((segment) => {\n        const segmentParam = getSegmentParam(segment)\n        if (!segmentParam) {\n          return segment\n        }\n\n        const remainingParam = prerenderableParamsByName.get(\n          segmentParam.paramName\n        )\n        if (!remainingParam) {\n          return segment\n        }\n\n        const value = params?.[remainingParam.paramName]\n        if (!value) {\n          return segment\n        }\n\n        const encodedValue = Array.isArray(value)\n          ? value.map((item) => encodeURIComponent(item)).join('/')\n          : encodeURIComponent(value)\n\n        return segment.replace(\n          buildDynamicSegmentPlaceholder(remainingParam),\n          encodedValue\n        )\n      })\n      .join('/') || '/'\n  )\n}\n\n// This implementation is imported by every route-specific app-page wrapper.\nexport function createAppPageEntrypoint({\n  tree,\n  page,\n  pathname,\n  require: __next_app_require__,\n  loadChunk: __next_app_load_chunk__,\n  interopDefault,\n}: {\n  tree: LoaderTree\n  page: string\n  pathname: string\n  require: (id: string | number) => unknown\n  loadChunk: (id: string | number) => Promise<unknown>\n  interopDefault: typeof import('../../server/app-render/interop-default').interopDefault\n}) {\n  const __next_app__ = {\n    require: __next_app_require__,\n    loadChunk: __next_app_load_chunk__,\n  }\n\n  const routeModule = new AppPageRouteModule({\n    definition: {\n      kind: RouteKind.APP_PAGE,\n      page,\n      pathname,\n      // The following aren't used in production.\n      bundlePath: '',\n      filename: '',\n      appPaths: [],\n    },\n    userland: {\n      loaderTree: tree,\n    },\n    distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n    relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n  })\n\n  let srcPage = page\n  // turbopack doesn't normalize `/index` in the page name\n  // so we need to to process dynamic routes properly\n  // TODO: fix turbopack providing differing value from webpack\n  if (process.env.TURBOPACK) {\n    srcPage = srcPage.replace(/\\/index$/, '') || '/'\n  } else if (srcPage === '/index') {\n    // we always normalize /index specifically\n    srcPage = '/'\n  }\n\n  const normalizedSrcPage = normalizeAppPath(srcPage)\n\n  async function handler(\n    req: IncomingMessage,\n    res: ServerResponse,\n    ctx: {\n      waitUntil?: (prom: Promise<void>) => void\n      requestMeta?: RequestMeta\n    }\n  ) {\n    if (ctx.requestMeta) {\n      setRequestMeta(req, ctx.requestMeta)\n    }\n\n    if (routeModule.isDev) {\n      addRequestMeta(\n        req,\n        'devRequestTimingInternalsEnd',\n        process.hrtime.bigint()\n      )\n    }\n    const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'))\n\n    // Capture the request target before `prepare()` runs, since route\n    // normalization (e.g. `normalizeCdnUrl`) rewrites `req.url` and would\n    // otherwise change the `http.target` span attribute. This mirrors\n    // `BaseServer.handleRequest`, which records the target before normalization.\n    const httpTarget = req.url\n\n    const multiZoneDraftMode = process.env\n      .__NEXT_MULTI_ZONE_DRAFT_MODE as any as boolean\n\n    const prepareResult = await routeModule.prepare(req, res, {\n      srcPage,\n      multiZoneDraftMode,\n    })\n\n    if (!prepareResult) {\n      res.statusCode = 400\n      res.end('Bad Request')\n      ctx.waitUntil?.(Promise.resolve())\n      return null\n    }\n\n    const {\n      buildId,\n      query,\n      params,\n      pageIsDynamic,\n      buildManifest,\n      nextFontManifest,\n      reactLoadableManifest,\n      serverActionsManifest,\n      clientReferenceManifest,\n      subresourceIntegrityManifest,\n      prerenderManifest,\n      prefetchHintsManifest,\n      isDraftMode,\n      resolvedPathname,\n      revalidateOnlyGenerated,\n      routerServerContext,\n      nextConfig,\n      parsedUrl,\n      interceptionRoutePatterns,\n      deploymentId,\n      clientAssetToken,\n    } = prepareResult\n\n    let { isOnDemandRevalidate } = prepareResult\n\n    // We use the resolvedPathname instead of the parsedUrl.pathname because it\n    // is not rewritten as resolvedPathname is. This will ensure that the correct\n    // prerender info is used instead of using the original pathname as the\n    // source. If however PPR is enabled and cacheComponents is disabled, we\n    // treat the pathname as dynamic. Currently, there's a bug in the PPR\n    // implementation that incorrectly leaves %%drp placeholders in the output of\n    // parallel routes. This is addressed with cacheComponents.\n    const prerenderMatch =\n      nextConfig.experimental.ppr &&\n      !nextConfig.cacheComponents &&\n      isInterceptionRouteAppPath(resolvedPathname)\n        ? null\n        : routeModule.match(resolvedPathname, prerenderManifest)\n    const prerenderInfo = prerenderMatch?.route ?? null\n\n    const isPrerendered = !!prerenderManifest.routes[resolvedPathname]\n\n    const userAgent = req.headers['user-agent'] || ''\n    const botType = getBotType(userAgent)\n\n    /**\n     * If true, this indicates that the request being made is for an app\n     * prefetch request.\n     */\n    const isPrefetchRSCRequest =\n      getRequestMeta(req, 'isPrefetchRSCRequest') ??\n      req.headers[NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2'\n\n    // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later\n\n    const isRSCRequest =\n      getRequestMeta(req, 'isRSCRequest') ??\n      isRSCRequestHeader(req.headers[RSC_HEADER])\n\n    const isPossibleServerAction = getIsPossibleServerAction(req)\n\n    // For subresource requests (e.g. images or fonts), return plain text 404\n    // instead of rendering the not-found route.\n    if (\n      normalizedSrcPage === UNDERSCORE_NOT_FOUND_ROUTE &&\n      (req.method === 'GET' || req.method === 'HEAD') &&\n      !isRSCRequest &&\n      isNonHtmlSecFetchDest(req.headers['sec-fetch-dest'])\n    ) {\n      res.statusCode = 404\n      res.setHeader(\n        'Cache-Control',\n        'private, no-cache, no-store, max-age=0, must-revalidate'\n      )\n      res.setHeader('Content-Type', 'text/plain; charset=utf-8')\n      res.end('Not Found')\n      ctx.waitUntil?.(Promise.resolve())\n      return null\n    }\n\n    /**\n     * If the route being rendered is an app page, and the ppr feature has been\n     * enabled, then the given route _could_ support PPR.\n     */\n    const couldSupportPPR: boolean = checkIsAppPPREnabled(\n      nextConfig.experimental.ppr\n    )\n\n    // Stash postponed state for server actions when in minimal mode.\n    // We extract it here so the RDC is available for the re-render after the action completes.\n    const resumeStateLengthHeader = req.headers[NEXT_RESUME_STATE_LENGTH_HEADER]\n    if (\n      !getRequestMeta(req, 'postponed') &&\n      isMinimalMode &&\n      couldSupportPPR &&\n      isPossibleServerAction &&\n      resumeStateLengthHeader &&\n      typeof resumeStateLengthHeader === 'string'\n    ) {\n      const stateLength = parseInt(resumeStateLengthHeader, 10)\n      const { maxPostponedStateSize, maxPostponedStateSizeBytes } =\n        getMaxPostponedStateSize(nextConfig.experimental.maxPostponedStateSize)\n\n      if (!isNaN(stateLength) && stateLength > 0) {\n        if (stateLength > maxPostponedStateSizeBytes) {\n          res.statusCode = 413\n          res.end(getPostponedStateExceededErrorMessage(maxPostponedStateSize))\n          ctx.waitUntil?.(Promise.resolve())\n          return null\n        }\n\n        // Calculate max total body size to prevent buffering excessively large\n        // payloads before the action handler checks. We use stateLength (not\n        // maxPostponedStateSizeBytes) so the postponed state doesn't eat into\n        // the action body budget - it's already validated above.\n        const defaultActionBodySizeLimit = '1 MB'\n        const actionBodySizeLimit =\n          nextConfig.experimental.serverActions?.bodySizeLimit ??\n          defaultActionBodySizeLimit\n        const actionBodySizeLimitBytes =\n          actionBodySizeLimit !== defaultActionBodySizeLimit\n            ? (\n                require('next/dist/compiled/bytes') as typeof import('next/dist/compiled/bytes')\n              ).parse(actionBodySizeLimit)\n            : 1024 * 1024 // 1 MB\n        const maxTotalBodySize = stateLength + actionBodySizeLimitBytes\n\n        const fullBody = await readBodyWithSizeLimit(req, maxTotalBodySize)\n        if (fullBody === null) {\n          res.statusCode = 413\n          res.end(\n            `Request body exceeded limit. ` +\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          ctx.waitUntil?.(Promise.resolve())\n          return null\n        }\n\n        if (fullBody.length >= stateLength) {\n          // Extract postponed state from the beginning\n          const postponedState = fullBody\n            .subarray(0, stateLength)\n            .toString('utf8')\n          addRequestMeta(req, 'postponed', postponedState)\n\n          // Store the remaining action body for the action handler\n          const actionBody = fullBody.subarray(stateLength)\n          addRequestMeta(req, 'actionBody', actionBody)\n        } else {\n          throw new Error(\n            `invariant: expected ${stateLength} bytes of postponed state but only received ${fullBody.length} bytes`\n          )\n        }\n      }\n    }\n\n    if (\n      typeof getRequestMeta(req, 'postponed') !== 'string' &&\n      couldSupportPPR &&\n      req.headers[NEXT_RESUME_HEADER] === '1' &&\n      req.method === 'POST'\n    ) {\n      const { maxPostponedStateSize, maxPostponedStateSizeBytes } =\n        getMaxPostponedStateSize(nextConfig.experimental.maxPostponedStateSize)\n\n      // Decode the postponed state from the request body, it will come as\n      // an array of buffers, so collect them and then concat them to form\n      // the string.\n      const body = await readBodyWithSizeLimit(req, maxPostponedStateSizeBytes)\n      if (body === null) {\n        res.statusCode = 413\n        res.end(getPostponedStateExceededErrorMessage(maxPostponedStateSize))\n        ctx.waitUntil?.(Promise.resolve())\n        return null\n      }\n      const postponed = body.toString('utf8')\n\n      addRequestMeta(req, 'postponed', postponed)\n    }\n\n    // When enabled, this will allow the use of the `?__nextppronly` query to\n    // enable debugging of the static shell.\n    const hasDebugStaticShellQuery =\n      process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING === '1' &&\n      typeof query.__nextppronly !== 'undefined' &&\n      couldSupportPPR\n\n    // When enabled, this will allow the use of the `?__nextppronly` query\n    // to enable debugging of the fallback shell.\n    const hasDebugFallbackShellQuery =\n      hasDebugStaticShellQuery && query.__nextppronly === 'fallback'\n\n    // Whether the testing API is exposed (dev mode or explicit flag)\n    const exposeTestingApi =\n      routeModule.isDev === true ||\n      nextConfig.experimental.exposeTestingApiInProductionBuild === true\n\n    // Enable the Instant Navigation Testing API. Renders only the prefetched\n    // portion of the page, excluding dynamic content. This allows tests to\n    // assert on the prefetched UI state deterministically.\n    //\n    // The instant test cookie is sent automatically with all requests while a\n    // navigation lock is held. We treat a request as a test render when the\n    // cookie is present and either:\n    // - it's a document request (no RSC header) — covers MPA navigations\n    // - it's a prefetch RSC request — covers client-side prefetches\n    // Regular RSC navigation requests proceed normally even during a locked\n    // scope; blocking happens on the client side.\n    const isInstantNavigationTest =\n      exposeTestingApi &&\n      typeof req.headers.cookie === 'string' &&\n      req.headers.cookie.includes(NEXT_INSTANT_TEST_COOKIE + '=') &&\n      (!isRSCRequestHeader(req.headers[RSC_HEADER]) ||\n        req.headers[NEXT_ROUTER_PREFETCH_HEADER] === '1')\n\n    // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the\n    // prerender manifest and this is an app page.\n    const isRoutePPREnabled: boolean =\n      // When the instant navigation testing API is active, enable the PPR\n      // prerender path even without Cache Components. In dev mode without CC,\n      // static pages need this path to produce buffered segment data (the\n      // legacy prerender path hangs in dev mode).\n      (couldSupportPPR || isInstantNavigationTest) &&\n      ((\n        prerenderManifest.routes[normalizedSrcPage] ??\n        prerenderManifest.dynamicRoutes[normalizedSrcPage]\n      )?.renderingMode === 'PARTIALLY_STATIC' ||\n        // Ideally we'd want to check the appConfig to see if this page has PPR\n        // enabled or not, but that would require plumbing the appConfig through\n        // to the server during development. We assume that the page supports it\n        // but only during development or when the testing API is exposed.\n        ((hasDebugStaticShellQuery || isInstantNavigationTest) &&\n          (exposeTestingApi ||\n            routerServerContext?.experimentalTestProxy === true)))\n\n    const isDebugStaticShell: boolean =\n      (hasDebugStaticShellQuery || isInstantNavigationTest) && isRoutePPREnabled\n\n    // We should enable debugging dynamic accesses when the static shell\n    // debugging has been enabled and we're also in development mode.\n    const isDebugDynamicAccesses =\n      isDebugStaticShell && routeModule.isDev === true\n\n    const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled\n\n    // If we're in minimal mode, then try to get the postponed information from\n    // the request metadata. If available, use it for resuming the postponed\n    // render.\n    const minimalPostponed = isRoutePPREnabled\n      ? getRequestMeta(req, 'postponed')\n      : undefined\n    const hasPostponedState = typeof minimalPostponed === 'string'\n\n    // If PPR is enabled, and this is a RSC request (but not a prefetch), then\n    // we can use this fact to only generate the flight data for the request\n    // because we can't cache the HTML (as it's also dynamic).\n    const staticPrefetchDataRoute =\n      prerenderManifest.routes[resolvedPathname]?.prefetchDataRoute\n\n    let isDynamicRSCRequest =\n      isRoutePPREnabled &&\n      isRSCRequest &&\n      !isPrefetchRSCRequest &&\n      // If generated at build time, treat the RSC request as static\n      // so we can serve the prebuilt .rsc without a dynamic render.\n      // Only do this for routes that have a concrete prefetchDataRoute.\n      !staticPrefetchDataRoute\n\n    // During a PPR revalidation, the RSC request is not dynamic if postponed\n    // metadata is absent. An empty string represents a resume request without\n    // postponed state, which should perform a full dynamic render.\n    if (isMinimalMode) {\n      isDynamicRSCRequest = isDynamicRSCRequest && hasPostponedState\n    }\n\n    // Need to read this before it's stripped by stripFlightHeaders. We don't\n    // need to transfer it to the request meta because it's only read\n    // within this function; the static segment data should have already been\n    // generated, so we will always either return a static response or a 404.\n    const rawSegmentPrefetchHeader =\n      req.headers[NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]\n    const segmentPrefetchHeader =\n      getRequestMeta(req, 'segmentPrefetchRSCRequest') ??\n      (isPrefetchRSCRequest\n        ? typeof rawSegmentPrefetchHeader === 'string'\n          ? rawSegmentPrefetchHeader\n          : Array.isArray(rawSegmentPrefetchHeader)\n            ? rawSegmentPrefetchHeader[0]\n            : undefined\n        : undefined)\n\n    // TODO: investigate existing bug with shouldServeStreamingMetadata always\n    // being true for a revalidate due to modifying the base-server this.renderOpts\n    // when fixing this to correct logic it causes hydration issue since we set\n    // serveStreamingMetadata to true during export\n    const serveStreamingMetadata = !userAgent\n      ? true\n      : shouldServeStreamingMetadata(userAgent, nextConfig.htmlLimitedBots)\n\n    // PPR shells are generated for streaming metadata. Requests that require\n    // blocking metadata must bypass the shell so the prerender and dynamic\n    // render use the same metadata tree.\n    const shouldForceDynamicPPRRender =\n      isRoutePPREnabled && !serveStreamingMetadata\n\n    const isSSG = Boolean(\n      (prerenderInfo ||\n        isPrerendered ||\n        prerenderManifest.routes[normalizedSrcPage]) &&\n        !shouldForceDynamicPPRRender\n    )\n\n    // When a page supports cacheComponents, we can support RDC for Navigations\n    const supportsRDCForNavigations =\n      isRoutePPREnabled && nextConfig.cacheComponents === true\n\n    // In development, we always want to generate dynamic HTML.\n    const supportsDynamicResponse: boolean =\n      // If we're in development, we always support dynamic HTML, unless it's\n      // a data request, in which case we only produce static HTML.\n      routeModule.isDev === true ||\n      // If this is a draft mode request, it supports dynamic HTML.\n      isDraftMode ||\n      // If this is not SSG or does not have static paths, then it supports\n      // dynamic HTML.\n      !isSSG ||\n      // If this request has provided postponed data, it supports dynamic\n      // HTML.\n      hasPostponedState ||\n      // If this handler supports onCacheEntryV2, then we can only support\n      // dynamic responses if it's a dynamic RSC request and not in minimal mode. If it\n      // doesn't support it we must fallback to the default behavior.\n      (supportsRDCForNavigations && getRequestMeta(req, 'onCacheEntryV2')\n        ? // In minimal mode, we'll always want to generate a static response\n          // which will generate the RDC for the route. When resuming a Dynamic\n          // RSC request, we'll pass the minimal postponed data to the render\n          // which will trigger the `supportsDynamicResponse` to be true.\n          isDynamicRSCRequest && !isMinimalMode\n        : // Otherwise, we can support dynamic responses if it's a dynamic RSC request.\n          isDynamicRSCRequest)\n\n    const remainingPrerenderableParams =\n      prerenderInfo?.remainingPrerenderableParams ?? []\n    // Concrete optional routes like `/optional-catchall` can still match their\n    // generic shell entry (eg /optional-catchall/[[...slug]]) in the prerender manifest.\n    // If the omitted param already resolved to a real prerendered path, keep serving that concrete result.\n    const hasOmittedConcreteFallbackParam =\n      isPrerendered &&\n      remainingPrerenderableParams.some((param) => {\n        const value = params?.[param.paramName]\n        return value == null || (Array.isArray(value) && value.length === 0)\n      })\n    const hasUnresolvedRootFallbackParams =\n      prerenderInfo?.fallback === null &&\n      (prerenderInfo.fallbackRootParams?.length ?? 0) > 0\n\n    let ssgCacheKey: string | null = null\n    let usesCompletedShellCacheKey = false\n    if (\n      !isDraftMode &&\n      isSSG &&\n      !supportsDynamicResponse &&\n      !isPossibleServerAction &&\n      !hasPostponedState &&\n      !isDynamicRSCRequest\n    ) {\n      // For normal SSG routes we cache by the fully resolved pathname. For\n      // partial fallbacks we instead derive the cache key from the shell\n      // that matched this request so `/prefix/[one]/[two]` can specialize into\n      // `/prefix/c/[two]` without promoting all the way to `/prefix/c/foo`.\n      // This includes entries with unresolved ROOT params: those requests are\n      // served blocking (no shell can be shared across root branches), but\n      // the entry they produce is still keyed by the completed shell — root\n      // params and any other prerenderable params resolve into the key while\n      // params that `generateStaticParams` can never provide stay as\n      // placeholders and must not partition the cache.\n      const fallbackPathname = prerenderMatch\n        ? typeof prerenderInfo?.fallback === 'string'\n          ? prerenderInfo.fallback\n          : prerenderMatch.source\n        : null\n\n      if (\n        // Partial fallback shells are only specialized per request when Partial\n        // Prefetching is enabled, mirroring the `partialFallback` flag the\n        // adapter emits for deployments. When it's disabled we fall through to\n        // the normal ISR cache key (`resolvedPathname`) so the shell stays\n        // shared, matching the behavior before the `partialFallbacks` config\n        // flag was removed.\n        nextConfig.partialPrefetching &&\n        fallbackPathname &&\n        prerenderInfo?.fallbackRouteParams?.length\n      ) {\n        if (remainingPrerenderableParams.length > 0) {\n          const completedShellCacheKey = buildCompletedShellCacheKey(\n            fallbackPathname,\n            remainingPrerenderableParams,\n            params\n          )\n\n          // If applying the current request params doesn't make the shell any\n          // more complete, then this shell is already at its most complete\n          // form and should remain shared rather than creating a new cache entry.\n          if (completedShellCacheKey !== fallbackPathname) {\n            ssgCacheKey = completedShellCacheKey\n            usesCompletedShellCacheKey = true\n          }\n        }\n      } else {\n        ssgCacheKey = resolvedPathname\n      }\n    }\n\n    // the staticPathKey differs from ssgCacheKey since\n    // ssgCacheKey is null in dev since we're always in \"dynamic\"\n    // mode in dev to bypass the cache. It can also be null for partial\n    // fallback shells that should remain shared and must not create a\n    // param-specific ISR entry, but we still need to honor fallback handling.\n    let staticPathKey = ssgCacheKey\n    if (\n      !staticPathKey &&\n      (routeModule.isDev ||\n        (isSSG &&\n          pageIsDynamic &&\n          prerenderInfo?.fallbackRouteParams?.length &&\n          // Server action requests must not get a staticPathKey, otherwise they\n          // enter the fallback rendering block below and return the cached HTML\n          // shell with the action result appended, instead of responding with\n          // just the RSC action result.\n          !isPossibleServerAction))\n    ) {\n      staticPathKey = resolvedPathname\n    }\n\n    // If this is a request for an app path that should be statically generated\n    // and we aren't in the edge runtime, strip the flight headers so it will\n    // generate the static response.\n    if (\n      !routeModule.isDev &&\n      !isDraftMode &&\n      isSSG &&\n      isRSCRequest &&\n      !isDynamicRSCRequest\n    ) {\n      stripFlightHeaders(req.headers)\n    }\n\n    const ComponentMod = {\n      ...entryBase,\n      tree,\n      handler,\n      routeModule,\n      __next_app__,\n    }\n\n    // Before rendering (which initializes component tree modules), we have to\n    // set the reference manifests to our global store so Server Action's\n    // encryption util can access to them at the top level of the page module.\n    if (serverActionsManifest && clientReferenceManifest) {\n      setManifestsSingleton({\n        page: srcPage,\n        clientReferenceManifest,\n        serverActionsManifest,\n      })\n    }\n\n    const method = req.method || 'GET'\n    const tracer = getTracer()\n    const activeSpan = tracer.getActiveScopeSpan()\n    const isWrappedByNextServer = Boolean(\n      routerServerContext?.isWrappedByNextServer\n    )\n    const remainingFallbackRouteParams =\n      nextConfig.partialPrefetching && remainingPrerenderableParams.length > 0\n        ? (prerenderInfo?.fallbackRouteParams?.filter(\n            (param) =>\n              !remainingPrerenderableParams.some(\n                (prerenderableParam) =>\n                  prerenderableParam.paramName === param.paramName\n              )\n          ) ?? [])\n        : []\n\n    const render404 = async () => {\n      // TODO: should route-module itself handle rendering the 404\n      if (routerServerContext?.render404) {\n        await routerServerContext.render404(req, res, parsedUrl, false)\n      } else {\n        res.end('This page could not be found')\n      }\n      return null\n    }\n\n    try {\n      const varyHeader = routeModule.getVaryHeader(\n        resolvedPathname,\n        interceptionRoutePatterns\n      )\n      res.setHeader('Vary', varyHeader)\n      let parentSpan: Span | undefined\n      const invokeRouteModule = async (\n        span: Span | undefined,\n        context: AppPageRouteHandlerContext\n      ) => {\n        const nextReq = new NodeNextRequest(req)\n        const nextRes = new NodeNextResponse(res)\n\n        return routeModule.render(nextReq, nextRes, context).finally(() => {\n          if (!span) return\n\n          span.setAttributes({\n            'http.status_code': res.statusCode,\n            'next.rsc': isRSCRequest,\n          })\n\n          if (res.statusCode && res.statusCode >= 500) {\n            // For 5xx status codes: SHOULD be set to 'Error' span status.\n            // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status\n            span.setStatus({\n              code: SpanStatusCode.ERROR,\n            })\n            // For span status 'Error', SHOULD set 'error.type' attribute.\n            span.setAttribute('error.type', res.statusCode.toString())\n          }\n\n          const rootSpanAttributes = tracer.getRootSpanAttributes()\n          // We were unable to get attributes, probably OTEL is not enabled\n          if (!rootSpanAttributes) {\n            return\n          }\n\n          if (\n            rootSpanAttributes.get('next.span_type') !==\n            BaseServerSpan.handleRequest\n          ) {\n            console.warn(\n              `Unexpected root span type '${rootSpanAttributes.get(\n                'next.span_type'\n              )}'. Please report this Next.js issue https://github.com/vercel/next.js`\n            )\n            return\n          }\n\n          const route =\n            rootSpanAttributes.get('next.route') || normalizedSrcPage\n          const name = isRSCRequest\n            ? `RSC ${method} ${route}`\n            : `${method} ${route}`\n\n          span.setAttributes({\n            'next.route': route,\n            'http.route': route,\n            'next.span_name': name,\n          })\n          span.updateName(name)\n\n          // Propagate http.route to the parent span if one exists (e.g.\n          // a platform-created HTTP span in adapter deployments).\n          if (parentSpan && parentSpan !== span) {\n            parentSpan.setAttribute('http.route', route)\n            parentSpan.updateName(name)\n          }\n        })\n      }\n\n      const incrementalCache =\n        getRequestMeta(req, 'incrementalCache') ||\n        (await routeModule.getIncrementalCache(\n          req,\n          nextConfig,\n          prerenderManifest,\n          isMinimalMode\n        ))\n\n      incrementalCache?.resetRequestCache()\n      ;(globalThis as any).__incrementalCache = incrementalCache\n\n      const doRender = async ({\n        span,\n        postponed,\n        fallbackRouteParams,\n        forceStaticRender,\n        allowEmptyStaticShell,\n      }: {\n        span?: Span\n        allowEmptyStaticShell?: boolean\n\n        /**\n         * The postponed data for this render. This is only provided when resuming\n         * a render that has been postponed.\n         */\n        postponed: string | undefined\n\n        /**\n         * The unknown route params for this render.\n         */\n        fallbackRouteParams: OpaqueFallbackRouteParams | null\n\n        /**\n         * When true, this indicates that the response generator is being called\n         * in a 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> => {\n        const context: AppPageRouteHandlerContext = {\n          query,\n          params,\n          page: normalizedSrcPage,\n          sharedContext: {\n            buildId,\n            deploymentId,\n            clientAssetToken,\n          },\n          serverComponentsHmrCache: getRequestMeta(\n            req,\n            'serverComponentsHmrCache'\n          ),\n          fallbackRouteParams,\n          renderOpts: {\n            App: () => null,\n            Document: () => null,\n            pageConfig: {},\n            ComponentMod,\n            Component: interopDefault(ComponentMod),\n\n            params,\n            routeModule,\n            page: srcPage,\n            postponed,\n            allowEmptyStaticShell,\n            serveStreamingMetadata,\n            supportsDynamicResponse:\n              typeof postponed === 'string' || supportsDynamicResponse,\n            buildManifest,\n            nextFontManifest,\n            reactLoadableManifest,\n            subresourceIntegrityManifest,\n            setCacheStatus: routerServerContext?.setCacheStatus,\n            setIsrStatus: routerServerContext?.setIsrStatus,\n            setReactDebugChannel: routerServerContext?.setReactDebugChannel,\n            sendErrorsToBrowser: routerServerContext?.sendErrorsToBrowser,\n\n            dir:\n              process.env.NEXT_RUNTIME === 'nodejs'\n                ? (require('path') as typeof import('path')).join(\n                    /* turbopackIgnore: true */\n                    process.cwd(),\n                    routeModule.relativeProjectDir\n                  )\n                : `${process.cwd()}/${routeModule.relativeProjectDir}`,\n            isDraftMode,\n            botType,\n            isOnDemandRevalidate,\n            isPossibleServerAction,\n            assetPrefix: nextConfig.assetPrefix,\n            nextConfigOutput: nextConfig.output,\n            crossOrigin: nextConfig.crossOrigin,\n            trailingSlash: nextConfig.trailingSlash,\n            images: nextConfig.images,\n            previewProps: prerenderManifest.preview,\n            enableTainting: nextConfig.experimental.taint,\n            htmlLimitedBots: nextConfig.htmlLimitedBots,\n            reactMaxHeadersLength: nextConfig.reactMaxHeadersLength,\n\n            multiZoneDraftMode,\n            prefetchHints: prefetchHintsManifest,\n            incrementalCache,\n            cacheLifeProfiles: nextConfig.cacheLife,\n            staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,\n            basePath: nextConfig.basePath,\n            serverActions: nextConfig.experimental.serverActions,\n            logServerFunctions:\n              typeof nextConfig.logging === 'object' &&\n              Boolean(nextConfig.logging.serverFunctions),\n\n            ...(isDebugStaticShell ||\n            isDebugDynamicAccesses ||\n            isDebugFallbackShell\n              ? {\n                  isBuildTimePrerendering: true,\n                  supportsDynamicResponse: false,\n                  isStaticGeneration: true,\n                  isDebugDynamicAccesses: isDebugDynamicAccesses,\n                }\n              : {}),\n            cacheComponents: Boolean(nextConfig.cacheComponents),\n            partialPrefetching: nextConfig.partialPrefetching,\n            // A fallback shell can only be upgraded to a concrete version if at\n            // least one of its fallback params is a `generateStaticParams`\n            // candidate (`remainingPrerenderableParams`), and only when Partial\n            // Prefetching is enabled (the upgrade itself is gated on it above).\n            // This gates whether the per-segment prefetch responses are flagged\n            // `isUpgradeableISRFallback`; without an upgrade to wait for, the\n            // client should not retry the prefetch.\n            isFallbackUpgradeable:\n              Boolean(nextConfig.partialPrefetching) &&\n              remainingPrerenderableParams.length > 0,\n            validationLevel:\n              nextConfig.experimental.instantInsights.validationLevel,\n            experimental: {\n              isRoutePPREnabled,\n              expireTime: nextConfig.expireTime,\n              staleTimes: nextConfig.experimental.staleTimes,\n              dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover),\n              optimisticRouting: Boolean(\n                nextConfig.experimental.optimisticRouting\n              ),\n              inlineCss: Boolean(nextConfig.experimental.inlineCss),\n              prefetchInlining:\n                nextConfig.experimental.prefetchInlining ?? false,\n              authInterrupts: Boolean(nextConfig.experimental.authInterrupts),\n              serverComponentsHmrCancellation: Boolean(\n                nextConfig.experimental.serverComponentsHmrCancellation\n              ),\n              useCacheTimeout: nextConfig.experimental.useCacheTimeout,\n              cachedNavigations:\n                nextConfig.experimental.cachedNavigations ?? false,\n              clientTraceMetadata:\n                nextConfig.experimental.clientTraceMetadata || ([] as any),\n              clientParamParsingOrigins:\n                nextConfig.experimental.clientParamParsingOrigins,\n              maxPostponedStateSizeBytes: parseMaxPostponedStateSize(\n                nextConfig.experimental.maxPostponedStateSize\n              ),\n              exposeTestingApi,\n            },\n\n            waitUntil: ctx.waitUntil,\n            onClose: (cb) => {\n              res.on('close', cb)\n            },\n            onAfterTaskError: () => {},\n\n            onInstrumentationRequestError: (\n              error,\n              _request,\n              errorContext,\n              silenceLog\n            ) =>\n              routeModule.onRequestError(\n                req,\n                error,\n                errorContext,\n                silenceLog,\n                routerServerContext\n              ),\n            err: getRequestMeta(req, 'invokeError'),\n          },\n        }\n\n        // When we're revalidating in the background, we should not allow dynamic\n        // responses.\n        if (forceStaticRender) {\n          context.renderOpts.supportsDynamicResponse = false\n        }\n\n        const result = await invokeRouteModule(span, context)\n\n        const { metadata } = result\n\n        const {\n          cacheControl,\n          headers = {},\n          // Add any fetch tags that were on the page to the response headers.\n          fetchTags: cacheTags,\n          fetchMetrics,\n        } = metadata\n\n        // Apply the `expireTime` fallback as soon as we have the render's\n        // `cacheControl`, so every downstream consumer (the cache stored via\n        // `incrementalCache.set`, the response Cache-Control header, the outgoing\n        // entry returned to `handleResponse`) sees a finalized `cacheControl`\n        // with a populated `expire`. This mirrors the build-time fallback in\n        // `build/index.ts` so we don't apply an expire to routes that opt out of\n        // revalidation entirely (`revalidate: false`) or that are dynamic\n        // (`revalidate: 0`).\n        if (\n          cacheControl &&\n          cacheControl.revalidate !== false &&\n          cacheControl.revalidate > 0 &&\n          cacheControl.expire === undefined\n        ) {\n          cacheControl.expire = nextConfig.expireTime\n        }\n\n        if (cacheTags) {\n          headers[NEXT_CACHE_TAGS_HEADER] = cacheTags\n        }\n\n        // Pull any fetch metrics from the render onto the request.\n        ;(req as any).fetchMetrics = fetchMetrics\n\n        // we don't throw static to dynamic errors in dev as isSSG\n        // is a best guess in dev since we don't have the prerender pass\n        // to know whether the path is actually static or not\n        if (\n          isSSG &&\n          cacheControl?.revalidate === 0 &&\n          !routeModule.isDev &&\n          !isRoutePPREnabled\n        ) {\n          const staticBailoutInfo = metadata.staticBailoutInfo\n\n          const err = new Error(\n            `Page changed from static to dynamic at runtime ${resolvedPathname}${\n              staticBailoutInfo?.description\n                ? `, reason: ${staticBailoutInfo.description}`\n                : ``\n            }` +\n              `\\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`\n          )\n\n          if (staticBailoutInfo?.stack) {\n            const stack = staticBailoutInfo.stack\n            err.stack = err.message + stack.substring(stack.indexOf('\\n'))\n          }\n\n          throw err\n        }\n\n        return {\n          value: {\n            kind: CachedRouteKind.APP_PAGE,\n            html: result,\n            headers,\n            rscData: metadata.flightData,\n            postponed: metadata.postponed,\n            status: metadata.statusCode,\n            segmentData: metadata.segmentData,\n          } satisfies CachedAppPageValue,\n          cacheControl,\n        } satisfies ResponseCacheEntry\n      }\n\n      const responseGenerator: ResponseGenerator = async ({\n        hasResolved,\n        previousCacheEntry: previousIncrementalCacheEntry,\n        isRevalidating,\n        span,\n        forceStaticRender = false,\n      }) => {\n        const isProduction = routeModule.isDev === false\n        const didRespond = hasResolved || res.writableEnded\n\n        try {\n          // skip on-demand revalidate if cache is not present and\n          // revalidate-if-generated is set\n          if (\n            isOnDemandRevalidate &&\n            revalidateOnlyGenerated &&\n            !previousIncrementalCacheEntry &&\n            !isMinimalMode\n          ) {\n            if (routerServerContext?.render404) {\n              await routerServerContext.render404(req, res)\n            } else {\n              res.statusCode = 404\n              res.end('This page could not be found')\n            }\n            return null\n          }\n\n          let fallbackMode: FallbackMode | undefined\n\n          if (prerenderInfo) {\n            fallbackMode = parseFallbackField(prerenderInfo.fallback)\n          }\n\n          if (\n            nextConfig.partialPrefetching &&\n            prerenderInfo?.fallback === null &&\n            !hasOmittedConcreteFallbackParam &&\n            !hasUnresolvedRootFallbackParams &&\n            remainingPrerenderableParams.length > 0\n          ) {\n            // Generic source shells without unresolved root params don't have a\n            // concrete fallback file of their own, so they're marked as blocking.\n            // When we can complete the shell into a more specific\n            // prerendered shell for this request, treat it like a prerender\n            // fallback so we can serve that shell instead of blocking on the full\n            // route. Root-param shells stay blocking, since unknown root branches\n            // should not inherit a shell from another generated branch.\n            fallbackMode = FallbackMode.PRERENDER\n          }\n\n          // When serving a request that requires blocking metadata, we want to\n          // use a blocking render instead of the prerendered fallback. Without\n          // PPR, preserve the existing behavior for built-in bots.\n          if (\n            fallbackMode === FallbackMode.PRERENDER &&\n            (isRoutePPREnabled ? !serveStreamingMetadata : Boolean(botType))\n          ) {\n            fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER\n          }\n\n          if (previousIncrementalCacheEntry?.isStale === -1) {\n            isOnDemandRevalidate = true\n          }\n\n          // TODO: adapt for PPR\n          // only allow on-demand revalidate for fallback: true/blocking\n          // or for prerendered fallback: false paths\n          if (\n            isOnDemandRevalidate &&\n            (fallbackMode !== FallbackMode.NOT_FOUND ||\n              previousIncrementalCacheEntry)\n          ) {\n            fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER\n          }\n\n          if (\n            !isMinimalMode &&\n            fallbackMode !== FallbackMode.BLOCKING_STATIC_RENDER &&\n            staticPathKey &&\n            !didRespond &&\n            !isDraftMode &&\n            pageIsDynamic &&\n            (isProduction || !isPrerendered)\n          ) {\n            // if the page has dynamicParams: false and this pathname wasn't\n            // prerendered trigger the no fallback handling\n            if (\n              // In development, fall through to render to handle missing\n              // getStaticPaths.\n              (isProduction || prerenderInfo) &&\n              // When fallback isn't present, abort this render so we 404\n              fallbackMode === FallbackMode.NOT_FOUND\n            ) {\n              if (nextConfig.adapterPath) {\n                return await render404()\n              }\n              throw new NoFallbackError()\n            }\n\n            // When cacheComponents is enabled, we can use the fallback\n            // response if the request is not a dynamic RSC request because the\n            // RSC data when this feature flag is enabled does not contain any\n            // param references. Without this feature flag enabled, the RSC data\n            // contains param references, and therefore we can't use the fallback.\n            if (\n              isRoutePPREnabled &&\n              (nextConfig.cacheComponents\n                ? !isDynamicRSCRequest\n                : !isRSCRequest)\n            ) {\n              const cacheKey =\n                isProduction && typeof prerenderInfo?.fallback === 'string'\n                  ? prerenderInfo.fallback\n                  : normalizedSrcPage\n\n              let fallbackRouteParams: OpaqueFallbackRouteParams | null\n              if (isProduction) {\n                // In production, rely on the prerender manifest's fallback\n                // entry — the authoritative set computed at build time by\n                // `buildAppStaticPaths`.\n                if (prerenderInfo?.fallbackRouteParams) {\n                  fallbackRouteParams = createOpaqueFallbackRouteParams(\n                    prerenderInfo.fallbackRouteParams\n                  )\n                } else if (isDebugFallbackShell) {\n                  fallbackRouteParams = getFallbackRouteParams(\n                    normalizedSrcPage,\n                    routeModule\n                  )\n                } else {\n                  fallbackRouteParams = null\n                }\n              } else {\n                // In dev the prerender manifest isn't populated for ad-hoc\n                // prefetches (`fallbackMode` is undefined for not-fully-generated\n                // routes, so the on-demand manifest write is skipped, and\n                // `getPrerenderManifest` is cached regardless). So\n                // `prerenderInfo` is unavailable here. Instead base-server\n                // derives the per-URL fallback set from the dev `getStaticPaths`\n                // result and threads it via the `fallbackParams` request meta —\n                // the most-specific prerendered route matching this URL, so\n                // `generateStaticParams`-covered params resolve in the shell and\n                // only the uncovered ones are deferred, matching what a\n                // production build serves. `isDebugFallbackShell` (the explicit\n                // fallback-shell debug flow) still forces the worst case.\n                if (isDebugFallbackShell) {\n                  fallbackRouteParams = getFallbackRouteParams(\n                    normalizedSrcPage,\n                    routeModule\n                  )\n                } else if (isDebugStaticShell) {\n                  // base-server threads the per-URL fallback set via the\n                  // `fallbackParams` meta for every dev Cache Components dynamic\n                  // request, so reuse it as the fallback route params for this\n                  // shell render. It only sets the meta for routes that still\n                  // have uncovered params, so an absent meta means this URL is\n                  // fully covered by `generateStaticParams` and there is nothing\n                  // to defer (`null`).\n                  fallbackRouteParams =\n                    getRequestMeta(req, 'fallbackParams') ?? null\n                } else {\n                  fallbackRouteParams = null\n                }\n              }\n\n              // When rendering a debug static shell, override the fallback\n              // params on the request so that the staged rendering correctly\n              // defers params that are not statically known.\n              if (isDebugStaticShell && fallbackRouteParams) {\n                addRequestMeta(req, 'fallbackParams', fallbackRouteParams)\n              }\n\n              // We use the response cache here to handle the revalidation and\n              // management of the fallback shell.\n              const fallbackResponse = await routeModule.handleResponse({\n                cacheKey,\n                req,\n                nextConfig,\n                routeKind: RouteKind.APP_PAGE,\n                isFallback: true,\n                prerenderManifest,\n                isRoutePPREnabled,\n                responseGenerator: async () =>\n                  doRender({\n                    span,\n                    // We pass `undefined` as rendering a fallback isn't resumed\n                    // here.\n                    postponed: undefined,\n                    // Always serve the shell that matched this request\n                    // immediately. If there are still prerenderable params left,\n                    // the background path below will complete the shell into a\n                    // more specific cache entry for later requests.\n                    fallbackRouteParams,\n                    forceStaticRender: true,\n                    allowEmptyStaticShell: isInstantNavigationTest || undefined,\n                  }),\n                waitUntil: ctx.waitUntil,\n                isMinimalMode,\n              })\n\n              // If the fallback response was set to null, then we should return null.\n              if (fallbackResponse === null) return null\n\n              // Otherwise, if we did get a fallback response, we should return it.\n              if (fallbackResponse) {\n                if (\n                  !isMinimalMode &&\n                  isRoutePPREnabled &&\n                  // Upgrading a fallback shell into a more specific ISR entry is\n                  // only done when Partial Prefetching is enabled, mirroring the\n                  // `partialFallback` flag the adapter emits for deployments.\n                  nextConfig.partialPrefetching &&\n                  // Match the build-time contract: only fallback shells that can\n                  // still be completed with prerenderable params should upgrade.\n                  remainingPrerenderableParams.length > 0 &&\n                  ssgCacheKey &&\n                  incrementalCache &&\n                  !isOnDemandRevalidate &&\n                  !isDebugFallbackShell &&\n                  // The testing API relies on deterministic shell behavior, so\n                  // don't upgrade fallback shells in the background when it's\n                  // exposed.\n                  !exposeTestingApi &&\n                  // Instant Navigation Testing API requests intentionally keep\n                  // the route in shell mode; don't upgrade these in background.\n                  !isInstantNavigationTest\n                ) {\n                  scheduleOnNextTick(async () => {\n                    const responseCache = routeModule.getResponseCache(req)\n\n                    try {\n                      // Only the params that were just specialized should be\n                      // removed from the fallback render. Any remaining fallback\n                      // params stay deferred so the revalidated result is a more\n                      // specific shell (e.g. `/prefix/c/[two]`), not a fully\n                      // concrete route (`/prefix/c/foo`).\n                      await responseCache.revalidate(\n                        ssgCacheKey,\n                        incrementalCache,\n                        isRoutePPREnabled,\n                        false,\n                        (c) => {\n                          return doRender({\n                            span: c.span,\n                            postponed: undefined,\n                            fallbackRouteParams:\n                              remainingFallbackRouteParams.length > 0\n                                ? createOpaqueFallbackRouteParams(\n                                    remainingFallbackRouteParams\n                                  )\n                                : null,\n                            forceStaticRender: true,\n                          })\n                        },\n                        // We don't have a prior entry for this param-specific shell.\n                        null,\n                        hasResolved,\n                        ctx.waitUntil\n                      )\n                    } catch (err) {\n                      console.error(\n                        'Error revalidating the page in the background',\n                        err\n                      )\n                    }\n                  })\n                }\n\n                // Remove the cache control from the response to prevent it from being\n                // used in the surrounding cache.\n                delete fallbackResponse.cacheControl\n\n                return fallbackResponse\n              }\n            }\n          }\n\n          // Only requests that aren't revalidating can be resumed. If we have the\n          // minimal postponed data, then we should resume the render with it.\n          let postponed =\n            !isOnDemandRevalidate && !isRevalidating && minimalPostponed\n              ? minimalPostponed\n              : undefined\n\n          if (\n            // If this is a dynamic RSC request or a server action request, we should\n            // use the postponed data from the static render (if available). This\n            // ensures that we can utilize the resume data cache (RDC) from the static\n            // render to ensure that the data is consistent between the static and\n            // dynamic renders (for navigations) or when re-rendering after a server\n            // action.\n            // Only enable RDC for Navigations if the feature is enabled.\n            supportsRDCForNavigations &&\n            process.env.NEXT_RUNTIME !== 'edge' &&\n            !isMinimalMode &&\n            incrementalCache &&\n            // Include both dynamic RSC requests (navigations) and server actions\n            (isDynamicRSCRequest || isPossibleServerAction) &&\n            // We don't typically trigger an on-demand revalidation for dynamic RSC\n            // requests, as we're typically revalidating the page in the background\n            // instead. However, if the cache entry is stale, we should trigger a\n            // background revalidation on dynamic RSC requests. This prevents us\n            // from entering an infinite loop of revalidations.\n            !forceStaticRender\n          ) {\n            const incrementalCacheEntry = await incrementalCache.get(\n              resolvedPathname,\n              {\n                kind: IncrementalCacheKind.APP_PAGE,\n                isRoutePPREnabled: true,\n                isFallback: false,\n              }\n            )\n\n            // If the cache entry is found, we should use the postponed data from\n            // the cache.\n            if (\n              incrementalCacheEntry &&\n              incrementalCacheEntry.value &&\n              incrementalCacheEntry.value.kind === CachedRouteKind.APP_PAGE\n            ) {\n              // CRITICAL: we're assigning the postponed data from the cache entry\n              // here as we're using the RDC to resume the render.\n              postponed = incrementalCacheEntry.value.postponed\n\n              // If the cache entry is stale, we should trigger a background\n              // revalidation so that subsequent requests will get a fresh response.\n              if (\n                incrementalCacheEntry &&\n                // We want to trigger this flow if the cache entry is stale and if\n                // the requested revalidation flow is either foreground or\n                // background.\n                (incrementalCacheEntry.isStale === -1 ||\n                  incrementalCacheEntry.isStale === true)\n              ) {\n                // We want to schedule this on the next tick to ensure that the\n                // render is not blocked on it.\n                scheduleOnNextTick(async () => {\n                  const responseCache = routeModule.getResponseCache(req)\n\n                  try {\n                    await responseCache.revalidate(\n                      resolvedPathname,\n                      incrementalCache,\n                      isRoutePPREnabled,\n                      false,\n                      (c) =>\n                        responseGenerator({\n                          ...c,\n                          // CRITICAL: we need to set this to true as we're\n                          // revalidating in the background and typically this dynamic\n                          // RSC request is not treated as static.\n                          forceStaticRender: true,\n                        }),\n                      // CRITICAL: we need to pass null here because passing the\n                      // previous cache entry here (which is stale) will switch on\n                      // isOnDemandRevalidate and break the prerendering.\n                      null,\n                      hasResolved,\n                      ctx.waitUntil\n                    )\n                  } catch (err) {\n                    console.error(\n                      'Error revalidating the page in the background',\n                      err\n                    )\n                  }\n                })\n              }\n            }\n          }\n\n          // When we're in minimal mode, if we're trying to debug the static shell,\n          // return an empty App Page response instead of resuming the dynamic\n          // render. The static shell has already been streamed by the platform.\n          if (\n            (isDebugStaticShell || isDebugDynamicAccesses) &&\n            typeof postponed !== 'undefined'\n          ) {\n            return {\n              cacheControl: { revalidate: 1, expire: undefined },\n              value: {\n                kind: CachedRouteKind.APP_PAGE,\n                html: RenderResult.fromStatic(\n                  '',\n                  isRSCRequest\n                    ? RSC_CONTENT_TYPE_HEADER\n                    : HTML_CONTENT_TYPE_HEADER\n                ),\n                rscData: undefined,\n                postponed,\n                segmentData: undefined,\n                headers: undefined,\n                status: undefined,\n              } satisfies CachedAppPageValue,\n            }\n          }\n\n          const placeholderFallbackRouteParams =\n            // When a request carries dynamic placeholder values (e.g. \"[slug]\"),\n            // defer only the unresolved subset instead of forcing all fallback\n            // params to suspend.\n            !routeModule.isDev &&\n            pageIsDynamic &&\n            prerenderInfo?.fallbackRouteParams\n              ? getPlaceholderFallbackRouteParams(\n                  params as\n                    | Record<string, undefined | string | string[]>\n                    | undefined,\n                  prerenderInfo.fallbackRouteParams\n                )\n              : null\n\n          const fallbackRouteParamsForRender =\n            placeholderFallbackRouteParams &&\n            placeholderFallbackRouteParams.length > 0\n              ? placeholderFallbackRouteParams\n              : prerenderInfo?.fallbackRouteParams\n\n          const hasPlaceholderFallbackRouteParams =\n            placeholderFallbackRouteParams != null &&\n            placeholderFallbackRouteParams.length > 0\n\n          // When route-module.ts resolved partial nxtP* params during\n          // background revalidation, filter fallbackRouteParams to only the\n          // params that are still unresolved. This lets doRender produce an\n          // intermediate PPR shell that suspends only for those params.\n          let effectiveFallbackRouteParams: FallbackRouteParam[] | null = null\n          if (\n            nextConfig.cacheComponents &&\n            prerenderInfo?.fallbackRouteParams\n          ) {\n            const resolvedKeys = getRequestMeta(req, 'resolvedRouteParamKeys')\n            if (resolvedKeys && resolvedKeys.size > 0) {\n              effectiveFallbackRouteParams =\n                prerenderInfo.fallbackRouteParams.filter(\n                  (param) => !resolvedKeys.has(param.paramName)\n                )\n            }\n          }\n\n          const fallbackRouteParams =\n            // In production or when debugging the static shell for a\n            // non-prerendered URL, use the prerender manifest's fallback route\n            // params which correctly identifies which params are unknown.\n            ((isProduction && getRequestMeta(req, 'renderFallbackShell')) ||\n              hasPlaceholderFallbackRouteParams ||\n              (isDebugStaticShell && !isPrerendered)) &&\n            fallbackRouteParamsForRender\n              ? createOpaqueFallbackRouteParams(fallbackRouteParamsForRender)\n              : // For intermediate shells where some params are resolved and\n                // others still have placeholders, use the filtered subset so the\n                // prerender suspends only for the unresolved params.\n                effectiveFallbackRouteParams &&\n                  effectiveFallbackRouteParams.length > 0 &&\n                  effectiveFallbackRouteParams.length <\n                    (prerenderInfo?.fallbackRouteParams?.length ?? 0)\n                ? createOpaqueFallbackRouteParams(effectiveFallbackRouteParams)\n                : // A render cached under a completed shell cache key must keep\n                  // deferring the params the key leaves as placeholders (the\n                  // ones `generateStaticParams` can never provide) so they\n                  // resume per request instead of baking into the shared entry.\n                  // This is the blocking analog of the background shell\n                  // upgrade above and is likewise self-hosted only: in minimal\n                  // mode the platform proxy owns this contract by stripping\n                  // never-prerenderable params from the request, which defers\n                  // them through the placeholder handling instead.\n                  !isMinimalMode &&\n                    usesCompletedShellCacheKey &&\n                    remainingFallbackRouteParams.length > 0\n                  ? createOpaqueFallbackRouteParams(\n                      remainingFallbackRouteParams\n                    )\n                  : isDebugFallbackShell\n                    ? getFallbackRouteParams(normalizedSrcPage, routeModule)\n                    : null\n\n          // For staged dynamic rendering (Cached Navigations) and debug static\n          // shell rendering, pass the fallback params via request meta so the\n          // RequestStore knows which params to defer. We don't pass them as\n          // fallbackRouteParams because that would replace actual param values\n          // with opaque placeholders during segment resolution.\n          if (\n            (isProduction || isDebugStaticShell) &&\n            nextConfig.cacheComponents &&\n            !isPrerendered &&\n            prerenderInfo?.fallbackRouteParams\n          ) {\n            const fallbackParams = createOpaqueFallbackRouteParams(\n              fallbackRouteParamsForRender ?? prerenderInfo.fallbackRouteParams\n            )\n\n            if (fallbackParams) {\n              addRequestMeta(req, 'fallbackParams', fallbackParams)\n            }\n          }\n\n          // Perform the render.\n          return doRender({\n            span,\n            postponed,\n            fallbackRouteParams,\n            forceStaticRender,\n            allowEmptyStaticShell: isInstantNavigationTest || undefined,\n          })\n        } catch (err) {\n          // if this is a background revalidate we need to report\n          // the request error here as it won't be bubbled\n          if (previousIncrementalCacheEntry?.isStale) {\n            const silenceLog = false\n            await routeModule.onRequestError(\n              req,\n              err,\n              {\n                routerKind: 'App Router',\n                routePath: srcPage,\n                routeType: 'render',\n                revalidateReason: getRevalidateReason({\n                  isStaticGeneration: isSSG,\n                  isOnDemandRevalidate,\n                }),\n              },\n              silenceLog,\n              routerServerContext\n            )\n          }\n          throw err\n        }\n      }\n\n      const handleResponse = async (span?: Span): Promise<null | void> => {\n        const cacheEntry = await routeModule.handleResponse({\n          cacheKey: ssgCacheKey,\n          responseGenerator: (c) =>\n            responseGenerator({\n              span,\n              ...c,\n            }),\n          routeKind: RouteKind.APP_PAGE,\n          isOnDemandRevalidate,\n          isRoutePPREnabled,\n          req,\n          nextConfig,\n          prerenderManifest,\n          waitUntil: ctx.waitUntil,\n          isMinimalMode,\n        })\n\n        if (isDraftMode) {\n          res.setHeader(\n            'Cache-Control',\n            'private, no-cache, no-store, max-age=0, must-revalidate'\n          )\n        }\n\n        // Dev responses use `no-cache` so the browser can restore them from the\n        // HTTP cache on back/forward instead of reloading. HMR refresh responses\n        // opt out into `no-store` because a superseded refresh's fetch is aborted\n        // mid-write: under `no-cache` the response is stored, so the abort leaves\n        // the cache entry shared with the superseding refresh (same URL)\n        // half-written; Chromium then discards it and reissues the superseding\n        // refresh on a second connection as a duplicate request. `no-store` keeps\n        // that entry from being created.\n        if (routeModule.isDev) {\n          res.setHeader(\n            'Cache-Control',\n            req.headers[NEXT_HMR_REFRESH_HEADER] === '1'\n              ? 'no-store'\n              : 'no-cache, must-revalidate'\n          )\n        }\n\n        if (!cacheEntry) {\n          if (ssgCacheKey) {\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          return null\n        }\n\n        if (cacheEntry.value?.kind !== CachedRouteKind.APP_PAGE) {\n          throw new Error(\n            `Invariant app-page handler received invalid cache entry ${cacheEntry.value?.kind}`\n          )\n        }\n\n        const didPostpone = typeof cacheEntry.value.postponed === 'string'\n\n        // Set the build ID header for RSC navigation requests when deploymentId is configured. This\n        // corresponds with maybeAppendBuildIdToRSCPayload in app-render.tsx which omits the build ID\n        // from the RSC payload when deploymentId is set (relying on this header instead). Server\n        // actions are excluded here because action redirect responses get the deployment ID header\n        // from the pre-fetched redirect target (via createRedirectRenderResult in action-handler.ts\n        // which copies headers from the internal RSC fetch).\n        // For static prerenders served from CDN, routes-manifest.json adds a header.\n        if (isRSCRequest && !isPossibleServerAction && deploymentId) {\n          res.setHeader(NEXT_NAV_DEPLOYMENT_ID_HEADER, deploymentId)\n        }\n\n        if (\n          isSSG &&\n          // We don't want to send a cache header for requests that contain dynamic\n          // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC\n          // request, then we should set the cache header.\n          !isDynamicRSCRequest &&\n          (!didPostpone || isPrefetchRSCRequest)\n        ) {\n          if (!isMinimalMode) {\n            // set x-nextjs-cache header to match the header\n            // we set for the image-optimizer\n            res.setHeader(\n              'x-nextjs-cache',\n              isOnDemandRevalidate\n                ? 'REVALIDATED'\n                : cacheEntry.isMiss\n                  ? 'MISS'\n                  : cacheEntry.isStale\n                    ? 'STALE'\n                    : 'HIT'\n            )\n          }\n          // Set a header used by the client router to signal the response is static\n          // and should respect the `static` cache staleTime value.\n          res.setHeader(NEXT_IS_PRERENDER_HEADER, '1')\n        }\n        const { value: cachedData } = cacheEntry\n\n        // Coerce the cache control parameter from the render.\n        let cacheControl: CacheControl | undefined\n\n        // If this is a resume request in minimal mode it is streamed with dynamic\n        // content and should not be cached.\n        if (hasPostponedState) {\n          cacheControl = { revalidate: 0, expire: undefined }\n        }\n\n        // If this is in minimal mode and this is a flight request that isn't a\n        // prefetch request while PPR is enabled, it cannot be cached as it contains\n        // dynamic content.\n        else if (isDynamicRSCRequest) {\n          cacheControl = { revalidate: 0, expire: undefined }\n        } else if (!routeModule.isDev) {\n          // If this is a preview mode request, we shouldn't cache it\n          if (isDraftMode) {\n            cacheControl = { revalidate: 0, expire: undefined }\n          }\n\n          // If this isn't SSG, then we should set change the header only if it is\n          // not set already.\n          else if (!isSSG) {\n            if (!res.getHeader('Cache-Control')) {\n              cacheControl = { revalidate: 0, expire: undefined }\n            }\n          } else if (cacheEntry.cacheControl) {\n            // If the cache entry has a cache control with a revalidate value that's\n            // a number, use it.\n            if (typeof cacheEntry.cacheControl.revalidate === 'number') {\n              if (cacheEntry.cacheControl.revalidate < 1) {\n                throw new Error(\n                  `Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`\n                )\n              }\n\n              cacheControl = {\n                revalidate: cacheEntry.cacheControl.revalidate,\n                expire: cacheEntry.cacheControl.expire,\n              }\n            }\n            // Otherwise if the revalidate value is false, then we should use the\n            // cache time of one year.\n            else {\n              cacheControl = {\n                revalidate: CACHE_ONE_YEAR_SECONDS,\n                expire: undefined,\n              }\n            }\n          }\n        }\n\n        cacheEntry.cacheControl = cacheControl\n\n        if (\n          typeof segmentPrefetchHeader === 'string' &&\n          cachedData?.kind === CachedRouteKind.APP_PAGE &&\n          cachedData.segmentData\n        ) {\n          // This is a prefetch request issued by the client Segment Cache. These\n          // should never reach the application layer (lambda). We should either\n          // respond from the cache (HIT) or respond with 404 (MISS).\n\n          // Set a header to indicate that PPR is enabled for this route. This\n          // lets the client distinguish between a regular cache miss and a cache\n          // miss due to PPR being disabled. In other contexts this header is used\n          // to indicate that the response contains dynamic data, but here we're\n          // only using it to indicate that the feature is enabled — the segment\n          // response itself contains whether the data is dynamic.\n          res.setHeader(NEXT_DID_POSTPONE_HEADER, '2')\n\n          // Add the cache tags header to the response if it exists and we're in\n          // minimal mode while rendering a static page.\n          const tags = cachedData.headers?.[NEXT_CACHE_TAGS_HEADER]\n          if (isMinimalMode && isSSG && tags && typeof tags === 'string') {\n            res.setHeader(NEXT_CACHE_TAGS_HEADER, tags)\n          }\n\n          const matchedSegment = cachedData.segmentData.get(\n            segmentPrefetchHeader\n          )\n          if (matchedSegment !== undefined) {\n            // Cache hit\n            return sendRenderResult({\n              req,\n              res,\n              generateEtags: nextConfig.generateEtags,\n              poweredByHeader: nextConfig.poweredByHeader,\n              result: RenderResult.fromStatic(\n                matchedSegment,\n                RSC_CONTENT_TYPE_HEADER\n              ),\n              cacheControl: cacheEntry.cacheControl,\n            })\n          }\n\n          // Cache miss. Either a cache entry for this route has not been generated\n          // (which technically should not be possible when PPR is enabled, because\n          // at a minimum there should always be a fallback entry) or there's no\n          // match for the requested segment. Respond with a 404.\n          res.statusCode = 404\n          return sendRenderResult({\n            req,\n            res,\n            generateEtags: nextConfig.generateEtags,\n            poweredByHeader: nextConfig.poweredByHeader,\n            result: RenderResult.EMPTY,\n            cacheControl: cacheEntry.cacheControl,\n          })\n        }\n\n        // If there's a callback for `onCacheEntry`, call it with the cache entry\n        // and the revalidate options. If we support RDC for Navigations, we\n        // prefer the `onCacheEntryV2` callback. Once RDC for Navigations is the\n        // default, we can remove the fallback to `onCacheEntry` as\n        // `onCacheEntryV2` is now fully supported.\n        const onCacheEntry = supportsRDCForNavigations\n          ? (getRequestMeta(req, 'onCacheEntryV2') ??\n            getRequestMeta(req, 'onCacheEntry'))\n          : getRequestMeta(req, 'onCacheEntry')\n\n        // `onCacheEntry` lets the platform capture a freshly prerendered result\n        // so the proxy can write it to the ISR cache; on deploy it returns true\n        // and the function returns below. In debug-shell mode the render was\n        // skipped and we only serve the already-cached shell, so there is nothing\n        // to capture, and we need to reach the serve path below to close the\n        // document. `onCacheEntry` is absent in `next start`/dev, so this guard\n        // only affects the deploy (minimalMode) path.\n        if (onCacheEntry && !isDebugStaticShell) {\n          const rawCacheEntryUrl = getRequestMeta(req, 'initURL') ?? req.url\n          const cacheEntryUrl = rawCacheEntryUrl\n            ? (parseUrl(rawCacheEntryUrl)?.pathname ?? rawCacheEntryUrl)\n            : undefined\n\n          const finished = await onCacheEntry(cacheEntry, {\n            url: cacheEntryUrl,\n          })\n\n          if (finished) return null\n        }\n\n        if (cachedData.headers) {\n          const headers = { ...cachedData.headers }\n\n          if (!isMinimalMode || !isSSG) {\n            delete headers[NEXT_CACHE_TAGS_HEADER]\n          }\n\n          for (let [key, value] of Object.entries(headers)) {\n            if (typeof value === 'undefined') continue\n\n            if (Array.isArray(value)) {\n              for (const v of value) {\n                res.appendHeader(key, v)\n              }\n            } else if (typeof value === 'number') {\n              value = value.toString()\n              res.appendHeader(key, value)\n            } else {\n              res.appendHeader(key, value)\n            }\n          }\n        }\n\n        // Add the cache tags header to the response if it exists and we're in\n        // minimal mode while rendering a static page.\n        const tags = cachedData.headers?.[NEXT_CACHE_TAGS_HEADER]\n        if (isMinimalMode && isSSG && tags && typeof tags === 'string') {\n          res.setHeader(NEXT_CACHE_TAGS_HEADER, tags)\n        }\n\n        // If the request is a data request, then we shouldn't set the status code\n        // from the response because it should always be 200. This should be gated\n        // behind the experimental PPR flag.\n        if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) {\n          res.statusCode = cachedData.status\n        }\n\n        // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes\n        if (\n          !isMinimalMode &&\n          cachedData.status &&\n          RedirectStatusCode[cachedData.status] &&\n          isRSCRequest\n        ) {\n          res.statusCode = 200\n        }\n\n        // Mark that the request did postpone.\n        if (didPostpone && !isDynamicRSCRequest) {\n          res.setHeader(NEXT_DID_POSTPONE_HEADER, '1')\n        }\n\n        // we don't go through this block when preview mode is true\n        // as preview mode is a dynamic request (bypasses cache) and doesn't\n        // generate both HTML and payloads in the same request so continue to just\n        // return the generated payload\n        if (isRSCRequest && !isDraftMode) {\n          // If this is a dynamic RSC request, then stream the response.\n          if (typeof cachedData.rscData === 'undefined') {\n            // If the response is not an RSC response, then we can't serve it.\n            if (cachedData.html.contentType !== RSC_CONTENT_TYPE_HEADER) {\n              if (nextConfig.cacheComponents) {\n                res.statusCode = 404\n                return sendRenderResult({\n                  req,\n                  res,\n                  generateEtags: nextConfig.generateEtags,\n                  poweredByHeader: nextConfig.poweredByHeader,\n                  result: RenderResult.EMPTY,\n                  cacheControl: cacheEntry.cacheControl,\n                })\n              } else {\n                // Otherwise this case is not expected.\n                throw new InvariantError(\n                  `Expected RSC response, got ${cachedData.html.contentType}`\n                )\n              }\n            }\n\n            return sendRenderResult({\n              req,\n              res,\n              generateEtags: nextConfig.generateEtags,\n              poweredByHeader: nextConfig.poweredByHeader,\n              result: cachedData.html,\n              cacheControl: cacheEntry.cacheControl,\n            })\n          }\n\n          // As this isn't a prefetch request, we should serve the static flight\n          // data.\n          return sendRenderResult({\n            req,\n            res,\n            generateEtags: nextConfig.generateEtags,\n            poweredByHeader: nextConfig.poweredByHeader,\n            result: RenderResult.fromStatic(\n              cachedData.rscData,\n              RSC_CONTENT_TYPE_HEADER\n            ),\n            cacheControl: cacheEntry.cacheControl,\n          })\n        }\n\n        // This is a request for HTML data.\n        const body = cachedData.html\n\n        // Instant Navigation Testing API: under the instant lock we serve the\n        // static shell as a complete document without resuming the dynamic\n        // render, either recovering from an empty (blocking) shell or appending\n        // the closing tags to a non-empty one.\n        if (isInstantNavigationTest && isDebugStaticShell) {\n          const isEmptyPrelude =\n            typeof cachedData.postponed === 'string' &&\n            entryBase.isEmptyHTMLPrelude(cachedData.postponed)\n\n          if (isEmptyPrelude) {\n            // A blocking route (a Suspense boundary above <body>, or `export\n            // const instant = false`) has an empty static shell. Serving it under\n            // the lock would be a blank document with no way to release the lock,\n            // so every reload would render the same blank shell and leave the\n            // user stuck. We surface the reason instead: in development we throw\n            // so it shows as an error overlay (the catch below clears the instant\n            // cookie via Set-Cookie); in production we serve a minimal document\n            // whose script clears the cookie client-side, since on deploy the\n            // edge has already served the cached shell and committed the response\n            // headers and this function only resumes by appending to the body, so\n            // a Set-Cookie could not take effect. `next start` reuses the same\n            // document, where throwing would render only a generic \"Internal\n            // Server Error\" page.\n            if (routeModule.isDev === true) {\n              throw new Error(\n                `The Navigation Inspector was active, but you attempted to load a blocking route. Reload the page to reset the inspector.\\n\\n` +\n                  `To identify why this route is blocking, refer to the Instant Navigation docs: https://preview.nextjs.org/docs/app/guides/instant-navigation`\n              )\n            }\n\n            const recoveryHtml =\n              `<!DOCTYPE html><html><head><meta charSet=\"utf-8\"/></head><body>` +\n              `<script>document.cookie=\"${NEXT_INSTANT_TEST_COOKIE}=; Path=/; Max-Age=0\"</script>` +\n              `<p>The Navigation Inspector was active, but you attempted to load a blocking route. Reload the page to reset the inspector.</p>` +\n              `<p>To identify why this route is blocking, refer to the ` +\n              `<a href=\"https://preview.nextjs.org/docs/app/guides/instant-navigation\">Instant Navigation docs</a>.</p>` +\n              `</body></html>`\n\n            return sendRenderResult({\n              req,\n              res,\n              generateEtags: nextConfig.generateEtags,\n              poweredByHeader: nextConfig.poweredByHeader,\n              result: RenderResult.fromStatic(\n                recoveryHtml,\n                HTML_CONTENT_TYPE_HEADER\n              ),\n              cacheControl: { revalidate: 0, expire: undefined },\n            })\n          }\n\n          // Non-empty shell: the cookie-guarded bootstrap that sets\n          // self.__next_instant_test is embedded in the prerendered shell via\n          // `bootstrapScriptContent`, so it is already present (in the served\n          // shell for a fresh render, or in the cached prelude on deploy). Append\n          // the closing tags so the browser can parse a complete document.\n          body.push(\n            new ReadableStream({\n              start(controller) {\n                controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML)\n                controller.close()\n              },\n            })\n          )\n          return sendRenderResult({\n            req,\n            res,\n            generateEtags: nextConfig.generateEtags,\n            poweredByHeader: nextConfig.poweredByHeader,\n            result: body,\n            cacheControl: { revalidate: 0, expire: undefined },\n          })\n        }\n\n        // If there's no postponed state, we should just serve the HTML. This\n        // should also be the case for a resume request because it's completed\n        // as a server render (rather than a static render).\n        if (!didPostpone || isMinimalMode || isRSCRequest) {\n          // If we're in test mode, we should add a sentinel chunk to the response\n          // that's between the static and dynamic parts so we can compare the\n          // chunks and add assertions.\n          if (\n            process.env.__NEXT_TEST_MODE &&\n            isMinimalMode &&\n            isRoutePPREnabled &&\n            body.contentType === HTML_CONTENT_TYPE_HEADER\n          ) {\n            // As we're in minimal mode, the static part would have already been\n            // streamed first. The only part that this streams is the dynamic part\n            // so we should FIRST stream the sentinel and THEN the dynamic part.\n            body.unshift(createPPRBoundarySentinel())\n          }\n\n          return sendRenderResult({\n            req,\n            res,\n            generateEtags: nextConfig.generateEtags,\n            poweredByHeader: nextConfig.poweredByHeader,\n            result: body,\n            cacheControl: cacheEntry.cacheControl,\n          })\n        }\n\n        // If we're debugging the static shell or the dynamic API accesses, we\n        // should just serve the HTML without resuming the render. The returned\n        // HTML will be the static shell so all the Dynamic API's will be used\n        // during static generation.\n        if (isDebugStaticShell || isDebugDynamicAccesses) {\n          // Since we're not resuming the render, we need to at least add the\n          // closing body and html tags to create valid HTML.\n          body.push(\n            new ReadableStream({\n              start(controller) {\n                controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML)\n                controller.close()\n              },\n            })\n          )\n\n          return sendRenderResult({\n            req,\n            res,\n            generateEtags: nextConfig.generateEtags,\n            poweredByHeader: nextConfig.poweredByHeader,\n            result: body,\n            cacheControl: { revalidate: 0, expire: undefined },\n          })\n        }\n\n        // If we're in test mode, we should add a sentinel chunk to the response\n        // that's between the static and dynamic parts so we can compare the\n        // chunks and add assertions.\n        if (process.env.__NEXT_TEST_MODE) {\n          body.push(createPPRBoundarySentinel())\n        }\n\n        // This request has postponed, so let's create a new transformer that the\n        // dynamic data can pipe to that will attach the dynamic data to the end\n        // of the response.\n        const transformer = new TransformStream<Uint8Array, Uint8Array>()\n        body.push(transformer.readable)\n\n        // Plumb fallback params via request meta so the RequestStore created\n        // downstream in app-render.tsx knows which params to defer during the\n        // resume. We don't pass them as `fallbackRouteParams` because that\n        // would replace actual param values with opaque placeholders during\n        // segment resolution; the resolved values are baked into the URL and\n        // already interpolated into the postponed state.\n        if (nextConfig.cacheComponents && prerenderInfo?.fallbackRouteParams) {\n          const fallbackParams = createOpaqueFallbackRouteParams(\n            prerenderInfo.fallbackRouteParams\n          )\n          if (fallbackParams) {\n            addRequestMeta(req, 'fallbackParams', fallbackParams)\n          }\n        }\n\n        // Perform the render again, but this time, provide the postponed state.\n        // We don't await because we want the result to start streaming now, and\n        // we've already chained the transformer's readable to the render result.\n        doRender({\n          span,\n          postponed: cachedData.postponed,\n          // This is a resume render, not a fallback render. Fallback params\n          // (for cacheComponents routes) are plumbed via request meta above.\n          fallbackRouteParams: null,\n          forceStaticRender: false,\n        })\n          .then(async (result) => {\n            if (!result) {\n              throw new Error('Invariant: expected a result to be returned')\n            }\n\n            if (result.value?.kind !== CachedRouteKind.APP_PAGE) {\n              throw new Error(\n                `Invariant: expected a page response, got ${result.value?.kind}`\n              )\n            }\n\n            // Pipe the resume result to the transformer.\n            await result.value.html.pipeTo(transformer.writable)\n          })\n          .catch((err) => {\n            // An error occurred during piping or preparing the render, abort\n            // the transformers writer so we can terminate the stream.\n            transformer.writable.abort(err).catch((e) => {\n              console.error(\"couldn't abort transformer\", e)\n            })\n          })\n\n        return sendRenderResult({\n          req,\n          res,\n          generateEtags: nextConfig.generateEtags,\n          poweredByHeader: nextConfig.poweredByHeader,\n          result: body,\n          // We don't want to cache the response if it has postponed data because\n          // the response being sent to the client it's dynamic parts are streamed\n          // to the client on the same request.\n          cacheControl: { revalidate: 0, expire: undefined },\n        })\n      }\n\n      // TODO: activeSpan code path is for when wrapped by\n      // next-server can be removed when this is no longer used\n      if (isWrappedByNextServer && activeSpan) {\n        await handleResponse(activeSpan)\n      } else {\n        parentSpan = tracer.getActiveScopeSpan()\n        return await tracer.withPropagatedContext(\n          req.headers,\n          () =>\n            tracer.trace(\n              BaseServerSpan.handleRequest,\n              {\n                spanName: `${method} ${srcPage}`,\n                kind: SpanKind.SERVER,\n                attributes: {\n                  'http.method': method,\n                  'http.target': httpTarget,\n                },\n              },\n              handleResponse\n            ),\n          undefined,\n          !isWrappedByNextServer\n        )\n      }\n    } catch (err) {\n      // If an Instant Navigation Testing document render fails (e.g. the page\n      // blocks at the root with no Suspense boundary above it, producing an empty\n      // or bailed-out static shell), clear the instant navigation cookie before\n      // serving the error page. Otherwise the cookie would persist and every\n      // reload would re-render the same broken shell, leaving the user stuck\n      // without a way to release the lock.\n      if (isInstantNavigationTest && !res.headersSent) {\n        res.setHeader(\n          'Set-Cookie',\n          `${NEXT_INSTANT_TEST_COOKIE}=; Path=/; Max-Age=0`\n        )\n      }\n\n      if (!(err instanceof NoFallbackError)) {\n        const silenceLog = false\n        await routeModule.onRequestError(\n          req,\n          err,\n          {\n            routerKind: 'App Router',\n            routePath: srcPage,\n            routeType: 'render',\n            revalidateReason: getRevalidateReason({\n              isStaticGeneration: isSSG,\n              isOnDemandRevalidate,\n            }),\n          },\n          silenceLog,\n          routerServerContext\n        )\n      }\n\n      // rethrow so that we can handle serving error page\n      throw err\n    }\n  }\n\n  return {\n    __next_app__,\n    routeModule,\n    handler,\n  }\n}\n\n// TODO: omit this from production builds, only test builds should include it\n/**\n * Creates a readable stream that emits a PPR boundary sentinel.\n *\n * @returns A readable stream that emits a PPR boundary sentinel.\n */\nfunction createPPRBoundarySentinel() {\n  return new ReadableStream({\n    start(controller) {\n      controller.enqueue(\n        new TextEncoder().encode('<!-- PPR_BOUNDARY_SENTINEL -->')\n      )\n      controller.close()\n    },\n  })\n}\n"],"names":["AppPageRouteModule","RouteKind","getRevalidateReason","getTracer","SpanKind","SpanStatusCode","addRequestMeta","getRequestMeta","setRequestMeta","BaseServerSpan","stripFlightHeaders","NodeNextRequest","NodeNextResponse","checkIsAppPPREnabled","isRSCRequestHeader","isNonHtmlSecFetchDest","UNDERSCORE_NOT_FOUND_ROUTE","getFallbackRouteParams","getPlaceholderFallbackRouteParams","buildDynamicSegmentPlaceholder","createOpaqueFallbackRouteParams","setManifestsSingleton","shouldServeStreamingMetadata","normalizeAppPath","getIsPossibleServerAction","RSC_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_ROUTER_SEGMENT_PREFETCH_HEADER","NEXT_INSTANT_TEST_COOKIE","NEXT_IS_PRERENDER_HEADER","NEXT_DID_POSTPONE_HEADER","RSC_CONTENT_TYPE_HEADER","NEXT_HMR_REFRESH_HEADER","getBotType","CachedRouteKind","IncrementalCacheKind","FallbackMode","parseFallbackField","RenderResult","CACHE_ONE_YEAR_SECONDS","HTML_CONTENT_TYPE_HEADER","NEXT_CACHE_TAGS_HEADER","NEXT_NAV_DEPLOYMENT_ID_HEADER","NEXT_RESUME_HEADER","NEXT_RESUME_STATE_LENGTH_HEADER","ENCODED_TAGS","sendRenderResult","NoFallbackError","parseMaxPostponedStateSize","getMaxPostponedStateSize","getPostponedStateExceededErrorMessage","readBodyWithSizeLimit","parseUrl","entryBase","RedirectStatusCode","InvariantError","scheduleOnNextTick","isInterceptionRouteAppPath","getSegmentParam","buildCompletedShellCacheKey","fallbackPathname","remainingPrerenderableParams","params","prerenderableParamsByName","Map","map","param","paramName","split","segment","segmentParam","remainingParam","get","value","encodedValue","Array","isArray","item","encodeURIComponent","join","replace","createAppPageEntrypoint","tree","page","pathname","require","__next_app_require__","loadChunk","__next_app_load_chunk__","interopDefault","__next_app__","routeModule","definition","kind","APP_PAGE","bundlePath","filename","appPaths","userland","loaderTree","distDir","process","env","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","srcPage","TURBOPACK","normalizedSrcPage","handler","req","res","ctx","prerenderManifest","prerenderInfo","requestMeta","isDev","hrtime","bigint","isMinimalMode","Boolean","httpTarget","url","multiZoneDraftMode","__NEXT_MULTI_ZONE_DRAFT_MODE","prepareResult","prepare","statusCode","end","waitUntil","Promise","resolve","buildId","query","pageIsDynamic","buildManifest","nextFontManifest","reactLoadableManifest","serverActionsManifest","clientReferenceManifest","subresourceIntegrityManifest","prefetchHintsManifest","isDraftMode","resolvedPathname","revalidateOnlyGenerated","routerServerContext","nextConfig","parsedUrl","interceptionRoutePatterns","deploymentId","clientAssetToken","isOnDemandRevalidate","prerenderMatch","experimental","ppr","cacheComponents","match","route","isPrerendered","routes","userAgent","headers","botType","isPrefetchRSCRequest","isRSCRequest","isPossibleServerAction","method","setHeader","couldSupportPPR","resumeStateLengthHeader","stateLength","parseInt","maxPostponedStateSize","maxPostponedStateSizeBytes","isNaN","defaultActionBodySizeLimit","actionBodySizeLimit","serverActions","bodySizeLimit","actionBodySizeLimitBytes","parse","maxTotalBodySize","fullBody","length","postponedState","subarray","toString","actionBody","Error","body","postponed","hasDebugStaticShellQuery","__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING","__nextppronly","hasDebugFallbackShellQuery","exposeTestingApi","exposeTestingApiInProductionBuild","isInstantNavigationTest","cookie","includes","isRoutePPREnabled","dynamicRoutes","renderingMode","experimentalTestProxy","isDebugStaticShell","isDebugDynamicAccesses","isDebugFallbackShell","minimalPostponed","undefined","hasPostponedState","staticPrefetchDataRoute","prefetchDataRoute","isDynamicRSCRequest","rawSegmentPrefetchHeader","segmentPrefetchHeader","serveStreamingMetadata","htmlLimitedBots","shouldForceDynamicPPRRender","isSSG","supportsRDCForNavigations","supportsDynamicResponse","hasOmittedConcreteFallbackParam","some","hasUnresolvedRootFallbackParams","fallback","fallbackRootParams","ssgCacheKey","usesCompletedShellCacheKey","source","partialPrefetching","fallbackRouteParams","completedShellCacheKey","staticPathKey","ComponentMod","tracer","activeSpan","getActiveScopeSpan","isWrappedByNextServer","remainingFallbackRouteParams","filter","prerenderableParam","render404","varyHeader","getVaryHeader","parentSpan","invokeRouteModule","span","context","nextReq","nextRes","render","finally","setAttributes","setStatus","code","ERROR","setAttribute","rootSpanAttributes","getRootSpanAttributes","handleRequest","console","warn","name","updateName","incrementalCache","getIncrementalCache","resetRequestCache","globalThis","__incrementalCache","doRender","forceStaticRender","allowEmptyStaticShell","sharedContext","serverComponentsHmrCache","renderOpts","App","Document","pageConfig","Component","setCacheStatus","setIsrStatus","setReactDebugChannel","sendErrorsToBrowser","dir","NEXT_RUNTIME","cwd","assetPrefix","nextConfigOutput","output","crossOrigin","trailingSlash","images","previewProps","preview","enableTainting","taint","reactMaxHeadersLength","prefetchHints","cacheLifeProfiles","cacheLife","staticPageGenerationTimeout","basePath","logServerFunctions","logging","serverFunctions","isBuildTimePrerendering","isStaticGeneration","isFallbackUpgradeable","validationLevel","instantInsights","expireTime","staleTimes","dynamicOnHover","optimisticRouting","inlineCss","prefetchInlining","authInterrupts","serverComponentsHmrCancellation","useCacheTimeout","cachedNavigations","clientTraceMetadata","clientParamParsingOrigins","onClose","cb","on","onAfterTaskError","onInstrumentationRequestError","error","_request","errorContext","silenceLog","onRequestError","err","result","metadata","cacheControl","fetchTags","cacheTags","fetchMetrics","revalidate","expire","staticBailoutInfo","description","stack","message","substring","indexOf","html","rscData","flightData","status","segmentData","responseGenerator","hasResolved","previousCacheEntry","previousIncrementalCacheEntry","isRevalidating","isProduction","didRespond","writableEnded","fallbackMode","PRERENDER","BLOCKING_STATIC_RENDER","isStale","NOT_FOUND","adapterPath","cacheKey","fallbackResponse","handleResponse","routeKind","isFallback","responseCache","getResponseCache","c","incrementalCacheEntry","fromStatic","placeholderFallbackRouteParams","fallbackRouteParamsForRender","hasPlaceholderFallbackRouteParams","effectiveFallbackRouteParams","resolvedKeys","size","has","fallbackParams","routerKind","routePath","routeType","revalidateReason","cacheEntry","cachedData","didPostpone","isMiss","getHeader","tags","matchedSegment","generateEtags","poweredByHeader","EMPTY","onCacheEntry","rawCacheEntryUrl","cacheEntryUrl","finished","key","Object","entries","v","appendHeader","contentType","isEmptyPrelude","isEmptyHTMLPrelude","recoveryHtml","push","ReadableStream","start","controller","enqueue","CLOSED","BODY_AND_HTML","close","__NEXT_TEST_MODE","unshift","createPPRBoundarySentinel","transformer","TransformStream","readable","then","pipeTo","writable","catch","abort","e","withPropagatedContext","trace","spanName","SERVER","attributes","headersSent","TextEncoder","encode"],"mappings":"AAIA,SACEA,kBAAkB,QAEb,2DAA2D;IAAE,wBAAwB;AAAW,EAAC;AAExG,SAASC,SAAS,QAAQ,+BAA+B;IAAE,wBAAwB;AAAsB,EAAC;AAE1G,SAASC,mBAAmB,QAAQ,0CAA0C;IAAE,wBAAwB;AAAsB,EAAC;AAC/H,SACEC,SAAS,EACTC,QAAQ,EACRC,cAAc,QAET,qCAAqC;IAAE,wBAAwB;AAAsB,EAA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