{"version":3,"sources":["../../../../src/build/templates/app-page.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  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 { interopDefault } from '../../server/app-render/interop-default' 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 {\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 {\n  isHtmlBotRequest,\n  shouldServeStreamingMetadata,\n} 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_INSTANT_PREFETCH_HEADER,\n  NEXT_INSTANT_TEST_COOKIE,\n  NEXT_IS_PRERENDER_HEADER,\n  NEXT_DID_POSTPONE_HEADER,\n  RSC_CONTENT_TYPE_HEADER,\n} from '../../client/components/app-router-headers' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n  getBotType,\n  isBot,\n} from '../../shared/lib/router/utils/is-bot' with { 'turbopack-transition': 'next-server-utility' }\nimport {\n  CachedRouteKind,\n  IncrementalCacheKind,\n  type CachedAppPageValue,\n  type CachedPageValue,\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 { createInstantTestScriptInsertionTransformStream } from '../../server/stream-utils/node-web-streams-helper' 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'\n\n// These are injected by the loader afterwards.\n\n/**\n * The tree created in next-app-loader that holds component segments and modules\n * and I've updated it.\n */\ndeclare const tree: LoaderTree\n\n// These are injected by the loader afterwards.\ndeclare const __next_app_require__: (id: string | number) => unknown\ndeclare const __next_app_load_chunk__: (id: string | number) => Promise<unknown>\n\n// We inject the tree and pages here so that we can use them in the route\n// module.\n// INJECT:tree\n// INJECT:__next_app_require__\n// INJECT:__next_app_load_chunk__\n\nexport const __next_app__ = {\n  require: __next_app_require__,\n  loadChunk: __next_app_load_chunk__,\n}\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\nexport * from '../../server/app-render/entry-base' with { 'turbopack-transition': 'next-server-utility' }\n\n// Create and export the route module that will be consumed.\nexport const routeModule = new AppPageRouteModule({\n  definition: {\n    kind: RouteKind.APP_PAGE,\n    page: 'VAR_DEFINITION_PAGE',\n    pathname: 'VAR_DEFINITION_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/**\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\nexport 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(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint())\n  }\n  const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode'))\n\n  let srcPage = 'VAR_DEFINITION_PAGE'\n\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  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    isDraftMode,\n    resolvedPathname,\n    revalidateOnlyGenerated,\n    routerServerContext,\n    nextConfig,\n    parsedUrl,\n    interceptionRoutePatterns,\n    deploymentId,\n    clientAssetToken,\n  } = prepareResult\n\n  const normalizedSrcPage = normalizeAppPath(srcPage)\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  const isHtmlBot = isHtmlBotRequest(req)\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  /**\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    !getRequestMeta(req, 'postponed') &&\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  // - Header: Used for client-side navigations where we can set request headers\n  // - Cookie: Used for MPA navigations (page reload, full page load) where we\n  //   can't set request headers. Only applies to document requests (no RSC\n  //   header) - RSC requests should proceed normally even during a locked scope,\n  //   with blocking happening on the client side.\n  const isInstantNavigationTest =\n    exposeTestingApi &&\n    (req.headers[NEXT_INSTANT_PREFETCH_HEADER] === '1' ||\n      (!isRSCRequestHeader(req.headers[RSC_HEADER]) &&\n        typeof req.headers.cookie === 'string' &&\n        req.headers.cookie.includes(NEXT_INSTANT_TEST_COOKIE + '=')))\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\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 we do not have the postponed data.\n  // We only attach the postponed data during a resume. If there's no postponed data, then it must be a revalidation.\n  // This is to ensure that we don't bypass the cache during a revalidation.\n  if (isMinimalMode) {\n    isDynamicRSCRequest = isDynamicRSCRequest && !!minimalPostponed\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 segmentPrefetchHeader = getRequestMeta(req, 'segmentPrefetchRSCRequest')\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 =\n    botType && isRoutePPREnabled\n      ? false\n      : !userAgent\n        ? true\n        : shouldServeStreamingMetadata(userAgent, nextConfig.htmlLimitedBots)\n\n  const isSSG = Boolean(\n    (prerenderInfo ||\n      isPrerendered ||\n      prerenderManifest.routes[normalizedSrcPage]) &&\n      // If this is a bot request and PPR is enabled, then we don't want\n      // to serve a static response. This applies to both DOM bots (like Googlebot)\n      // and HTML-limited bots.\n      !(botType && isRoutePPREnabled)\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 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    typeof minimalPostponed === 'string' ||\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  // When bots request PPR page, perform the full dynamic rendering.\n  // This applies to both DOM bots (like Googlebot) and HTML-limited bots.\n  const shouldWaitOnAllReady = Boolean(botType) && isRoutePPREnabled\n  const remainingPrerenderableParams =\n    prerenderInfo?.remainingPrerenderableParams ?? []\n  const hasUnresolvedRootFallbackParams =\n    prerenderInfo?.fallback === null &&\n    (prerenderInfo.fallbackRootParams?.length ?? 0) > 0\n\n  let ssgCacheKey: string | null = null\n  if (\n    !isDraftMode &&\n    isSSG &&\n    !supportsDynamicResponse &&\n    !isPossibleServerAction &&\n    !minimalPostponed &&\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    const fallbackPathname = prerenderMatch\n      ? typeof prerenderInfo?.fallback === 'string'\n        ? prerenderInfo.fallback\n        : prerenderMatch.source\n      : null\n\n    if (\n      nextConfig.experimental.partialFallbacks === true &&\n      fallbackPathname &&\n      prerenderInfo?.fallbackRouteParams &&\n      !hasUnresolvedRootFallbackParams\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        ssgCacheKey =\n          completedShellCacheKey !== fallbackPathname\n            ? completedShellCacheKey\n            : null\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 &&\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.experimental.partialFallbacks === true &&\n    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': false,\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 = rootSpanAttributes.get('next.route')\n        if (route) {\n          const name = `${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        } else {\n          span.updateName(`${method} ${srcPage}`)\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    }: {\n      span?: Span\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          shouldWaitOnAllReady,\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          incrementalCache,\n          cacheLifeProfiles: nextConfig.cacheLife,\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          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: nextConfig.experimental.prefetchInlining ?? false,\n            authInterrupts: Boolean(nextConfig.experimental.authInterrupts),\n            cachedNavigations: Boolean(\n              nextConfig.experimental.cachedNavigations\n            ),\n            clientTraceMetadata:\n              nextConfig.experimental.clientTraceMetadata || ([] as any),\n            clientParamParsingOrigins:\n              nextConfig.experimental.clientParamParsingOrigins,\n            maxPostponedStateSizeBytes: parseMaxPostponedStateSize(\n              nextConfig.experimental.maxPostponedStateSize\n            ),\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      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.experimental.partialFallbacks === true &&\n          prerenderInfo?.fallback === null &&\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 HTML bot request, we want to serve a blocking render and\n        // not the prerendered page. This ensures that the correct content is served\n        // to the bot in the head.\n        if (fallbackMode === FallbackMode.PRERENDER && isBot(userAgent)) {\n          if (!isRoutePPREnabled || isHtmlBot) {\n            fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER\n          }\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 ? !isDynamicRSCRequest : !isRSCRequest)\n          ) {\n            const cacheKey =\n              isProduction && typeof prerenderInfo?.fallback === 'string'\n                ? prerenderInfo.fallback\n                : normalizedSrcPage\n\n            const fallbackRouteParams =\n              // In production or when debugging the static shell (e.g. instant\n              // navigation testing), use the prerender manifest's fallback\n              // route params which correctly identifies which params are\n              // unknown. Note: in dev, this block is only entered for\n              // non-prerendered URLs (guarded by the outer condition).\n              (isProduction || isDebugStaticShell) &&\n              prerenderInfo?.fallbackRouteParams\n                ? createOpaqueFallbackRouteParams(\n                    prerenderInfo.fallbackRouteParams\n                  )\n                : // When debugging the fallback shell, treat all params as\n                  // fallback (simulating the worst-case shell).\n                  isDebugFallbackShell\n                  ? getFallbackRouteParams(normalizedSrcPage, routeModule)\n                  : null\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                }),\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                // Match the build-time contract: only fallback shells that can\n                // still be completed with prerenderable params should upgrade.\n                remainingPrerenderableParams.length > 0 &&\n                nextConfig.experimental.partialFallbacks === true &&\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                // Avoid background revalidate during prefetches; this can trigger\n                // static prerender errors that surface as 500s for the prefetch\n                // request itself.\n                !isPrefetchRSCRequest\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        // we should just return nothing instead of resuming the dynamic render.\n        if (\n          (isDebugStaticShell || isDebugDynamicAccesses) &&\n          typeof postponed !== 'undefined'\n        ) {\n          return {\n            cacheControl: { revalidate: 1, expire: undefined },\n            value: {\n              kind: CachedRouteKind.PAGES,\n              html: RenderResult.EMPTY,\n              pageData: {},\n              headers: undefined,\n              status: undefined,\n            } satisfies CachedPageValue,\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 (nextConfig.cacheComponents && prerenderInfo?.fallbackRouteParams) {\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        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              : 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        })\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      // In dev, we should not cache pages for any reason.\n      if (routeModule.isDev) {\n        res.setHeader('Cache-Control', 'no-cache, must-revalidate')\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 (minimalPostponed) {\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 ?? nextConfig.expireTime,\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 204 No Content (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(segmentPrefetchHeader)\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 204 No Content. We\n        // don't bother to respond with 404, because these requests are only\n        // issued as part of a prefetch.\n        res.statusCode = 204\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      if (onCacheEntry) {\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: serve the static shell with an\n      // injected script that sets self.__next_instant_test and kicks off a\n      // static RSC fetch for hydration. The transform stream also appends\n      // closing </body></html> tags so the browser can parse the full document.\n      // In dev mode, also inject self.__next_r so the HMR WebSocket and\n      // debug channel can initialize.\n      if (isInstantNavigationTest && isDebugStaticShell) {\n        const instantTestRequestId =\n          routeModule.isDev === true ? crypto.randomUUID() : null\n        body.pipeThrough(\n          await createInstantTestScriptInsertionTransformStream(\n            instantTestRequestId\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      // 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, so we don't need to\n        // set this.\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': req.url,\n              },\n            },\n            handleResponse\n          ),\n        undefined,\n        !isWrappedByNextServer\n      )\n    }\n  } catch (err) {\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// 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","addRequestMeta","getRequestMeta","setRequestMeta","BaseServerSpan","interopDefault","stripFlightHeaders","NodeNextRequest","NodeNextResponse","checkIsAppPPREnabled","isRSCRequestHeader","getFallbackRouteParams","getPlaceholderFallbackRouteParams","buildDynamicSegmentPlaceholder","createOpaqueFallbackRouteParams","setManifestsSingleton","isHtmlBotRequest","shouldServeStreamingMetadata","normalizeAppPath","getIsPossibleServerAction","RSC_HEADER","NEXT_ROUTER_PREFETCH_HEADER","NEXT_INSTANT_PREFETCH_HEADER","NEXT_INSTANT_TEST_COOKIE","NEXT_IS_PRERENDER_HEADER","NEXT_DID_POSTPONE_HEADER","RSC_CONTENT_TYPE_HEADER","getBotType","isBot","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","createInstantTestScriptInsertionTransformStream","sendRenderResult","NoFallbackError","parseMaxPostponedStateSize","getMaxPostponedStateSize","getPostponedStateExceededErrorMessage","readBodyWithSizeLimit","parseUrl","__next_app__","require","__next_app_require__","loadChunk","__next_app_load_chunk__","entryBase","RedirectStatusCode","InvariantError","scheduleOnNextTick","isInterceptionRouteAppPath","getSegmentParam","routeModule","definition","kind","APP_PAGE","page","pathname","bundlePath","filename","appPaths","userland","loaderTree","tree","distDir","process","env","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","buildCompletedShellCacheKey","fallbackPathname","remainingPrerenderableParams","params","prerenderableParamsByName","Map","map","param","paramName","split","segment","segmentParam","remainingParam","get","value","encodedValue","Array","isArray","item","encodeURIComponent","join","replace","handler","req","res","ctx","prerenderManifest","prerenderInfo","requestMeta","isDev","hrtime","bigint","isMinimalMode","Boolean","srcPage","TURBOPACK","multiZoneDraftMode","__NEXT_MULTI_ZONE_DRAFT_MODE","prepareResult","prepare","statusCode","end","waitUntil","Promise","resolve","buildId","query","pageIsDynamic","buildManifest","nextFontManifest","reactLoadableManifest","serverActionsManifest","clientReferenceManifest","subresourceIntegrityManifest","isDraftMode","resolvedPathname","revalidateOnlyGenerated","routerServerContext","nextConfig","parsedUrl","interceptionRoutePatterns","deploymentId","clientAssetToken","normalizedSrcPage","isOnDemandRevalidate","prerenderMatch","experimental","ppr","cacheComponents","match","route","isPrerendered","routes","userAgent","headers","botType","isHtmlBot","isPrefetchRSCRequest","isRSCRequest","isPossibleServerAction","couldSupportPPR","resumeStateLengthHeader","stateLength","parseInt","maxPostponedStateSize","maxPostponedStateSizeBytes","isNaN","defaultActionBodySizeLimit","actionBodySizeLimit","serverActions","bodySizeLimit","actionBodySizeLimitBytes","parse","maxTotalBodySize","fullBody","length","postponedState","subarray","toString","actionBody","Error","method","body","postponed","hasDebugStaticShellQuery","__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING","__nextppronly","hasDebugFallbackShellQuery","exposeTestingApi","exposeTestingApiInProductionBuild","isInstantNavigationTest","cookie","includes","isRoutePPREnabled","dynamicRoutes","renderingMode","experimentalTestProxy","isDebugStaticShell","isDebugDynamicAccesses","isDebugFallbackShell","minimalPostponed","undefined","staticPrefetchDataRoute","prefetchDataRoute","isDynamicRSCRequest","segmentPrefetchHeader","serveStreamingMetadata","htmlLimitedBots","isSSG","supportsRDCForNavigations","supportsDynamicResponse","shouldWaitOnAllReady","hasUnresolvedRootFallbackParams","fallback","fallbackRootParams","ssgCacheKey","source","partialFallbacks","fallbackRouteParams","completedShellCacheKey","staticPathKey","ComponentMod","tracer","activeSpan","getActiveScopeSpan","isWrappedByNextServer","remainingFallbackRouteParams","filter","some","prerenderableParam","render404","varyHeader","getVaryHeader","setHeader","parentSpan","invokeRouteModule","span","context","nextReq","nextRes","render","finally","setAttributes","rootSpanAttributes","getRootSpanAttributes","handleRequest","console","warn","name","updateName","setAttribute","incrementalCache","getIncrementalCache","resetRequestCache","globalThis","__incrementalCache","doRender","forceStaticRender","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","cacheLifeProfiles","cacheLife","basePath","logServerFunctions","logging","serverFunctions","isBuildTimePrerendering","isStaticGeneration","expireTime","staleTimes","dynamicOnHover","optimisticRouting","inlineCss","prefetchInlining","authInterrupts","cachedNavigations","clientTraceMetadata","clientParamParsingOrigins","onClose","cb","on","onAfterTaskError","onInstrumentationRequestError","error","_request","errorContext","silenceLog","onRequestError","err","result","metadata","cacheControl","fetchTags","cacheTags","fetchMetrics","revalidate","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","expire","PAGES","EMPTY","pageData","placeholderFallbackRouteParams","fallbackRouteParamsForRender","hasPlaceholderFallbackRouteParams","effectiveFallbackRouteParams","resolvedKeys","size","has","fallbackParams","routerKind","routePath","routeType","revalidateReason","cacheEntry","cachedData","didPostpone","isMiss","getHeader","tags","matchedSegment","generateEtags","poweredByHeader","fromStatic","onCacheEntry","rawCacheEntryUrl","url","cacheEntryUrl","finished","key","Object","entries","v","appendHeader","contentType","instantTestRequestId","crypto","randomUUID","pipeThrough","__NEXT_TEST_MODE","unshift","createPPRBoundarySentinel","push","ReadableStream","start","controller","enqueue","CLOSED","BODY_AND_HTML","close","transformer","TransformStream","readable","then","pipeTo","writable","catch","abort","e","withPropagatedContext","trace","spanName","SERVER","attributes","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,QAEH,qCAAqC;IAAE,wBAAwB;AAAsB,EAAC;AAE7F,SACEC,cAAc,EACdC,cAAc,EACdC,cAAc,QACT,iCAAiC;IAAE,wBAAwB;AAAsB,EAAC;AACzF,SAASC,cAAc,QAAQ,wCAAwC;IAAE,wBAAwB;AAAsB,EAAC;AACxH,SAASC,cAAc,QAAQ,+CAA+C;IAAE,wBAAwB;A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