| self.__BUILD_MANIFEST = { | ||
| "__rewrites": { | ||
| "afterFiles": [], | ||
| "beforeFiles": [], | ||
| "fallback": [] | ||
| }, | ||
| "sortedPages": [ | ||
| "/_app", | ||
| "/_error" | ||
| ] | ||
| };self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB() |
| self.__MIDDLEWARE_MATCHERS = [];self.__MIDDLEWARE_MATCHERS_CB && self.__MIDDLEWARE_MATCHERS_CB() |
| self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() |
| --- | ||
| title: prefetchInlining | ||
| description: Override how the App Router bundles small prefetch responses together. | ||
| version: experimental | ||
| related: | ||
| title: Related | ||
| description: View related API references and guides. | ||
| links: | ||
| - app/api-reference/components/link | ||
| - app/guides/prefetching | ||
| --- | ||
| When the App Router prefetches a route, it can bundle small segment responses into a single response instead of requesting each one separately. This reduces the number of prefetch requests at the cost of duplicating some shared segment data across routes. This behavior is on by default, and most apps should leave it that way. | ||
| The `experimental.prefetchInlining` option lets you override this behavior or disable inlining while debugging navigation issues or measuring request volume. For most applications, there is no need to change the default behavior. | ||
| > **Good to know**: The inlining behavior is a permanent part of the App Router. Only the `experimental.prefetchInlining` configuration is experimental, so its options may still change. | ||
| ## Usage | ||
| To turn off prefetch inlining, set `experimental.prefetchInlining` to `false`: | ||
| ```ts filename="next.config.ts" switcher | ||
| import type { NextConfig } from 'next' | ||
| const nextConfig: NextConfig = { | ||
| experimental: { | ||
| prefetchInlining: false, | ||
| }, | ||
| } | ||
| export default nextConfig | ||
| ``` | ||
| ```js filename="next.config.js" switcher | ||
| /** @type {import('next').NextConfig} */ | ||
| const nextConfig = { | ||
| experimental: { | ||
| prefetchInlining: false, | ||
| }, | ||
| } | ||
| module.exports = nextConfig | ||
| ``` | ||
| To override the thresholds instead of disabling inlining, pass an object. Any value you omit keeps its default: | ||
| ```ts filename="next.config.ts" switcher | ||
| import type { NextConfig } from 'next' | ||
| const nextConfig: NextConfig = { | ||
| experimental: { | ||
| prefetchInlining: { | ||
| maxSize: 2048, | ||
| maxBundleSize: 10240, | ||
| }, | ||
| }, | ||
| } | ||
| export default nextConfig | ||
| ``` | ||
| ```js filename="next.config.js" switcher | ||
| /** @type {import('next').NextConfig} */ | ||
| const nextConfig = { | ||
| experimental: { | ||
| prefetchInlining: { | ||
| maxSize: 2048, | ||
| maxBundleSize: 10240, | ||
| }, | ||
| }, | ||
| } | ||
| module.exports = nextConfig | ||
| ``` | ||
| ## Reference | ||
| | Value | Description | | ||
| | -------- | ---------------------------------------------------------------------------- | | ||
| | `true` | Inlines prefetch responses with the default thresholds. This is the default. | | ||
| | `false` | Disables prefetch inlining. Each segment is prefetched as its own request. | | ||
| | `object` | Inlines prefetch responses using the `maxSize` or `maxBundleSize` you set. | | ||
| When you pass an object, the following options control the thresholds. Both are measured in bytes of the gzip-compressed segment response: | ||
| | Option | Type | Default | Description | | ||
| | --------------- | -------- | ------- | --------------------------------------------------------------------------------------- | | ||
| | `maxSize` | `number` | `2048` | Largest a single segment response can be to still be eligible for inlining. | | ||
| | `maxBundleSize` | `number` | `10240` | Largest total size that can be inlined into one bundled prefetch response along a path. | | ||
| Lower thresholds keep more per-segment deduplication; higher thresholds inline more data and cut request count further. | ||
| ## Version History | ||
| | Version | Change | | ||
| | ------- | --------------------------------------------------- | | ||
| | 16.3.0 | `experimental.prefetchInlining` enabled by default. | | ||
| | 16.2.0 | `experimental.prefetchInlining` added. | |
@@ -41,3 +41,2 @@ // Time thresholds in seconds | ||
| const NANOSECONDS_PER_MILLISECOND = 1000000; | ||
| const NANOSECONDS_PER_MICROSECOND = 1000; | ||
| const NANOSECONDS_IN_MINUTE = 60000000000 // 60 * 1_000_000_000 | ||
@@ -71,3 +70,3 @@ ; | ||
| * - >= 2 milliseconds: show in whole milliseconds (e.g., "250ms") | ||
| * - < 2 milliseconds: show in whole microseconds (e.g., "500µs") | ||
| * - < 2 milliseconds: show in milliseconds with 1 decimal place (e.g., "0.5ms") | ||
| * | ||
@@ -87,3 +86,3 @@ * @param durationBigInt - Duration in nanoseconds as a BigInt | ||
| } else { | ||
| return `${(duration / NANOSECONDS_PER_MICROSECOND).toFixed(0)}µs`; | ||
| return `${(duration / NANOSECONDS_PER_MILLISECOND).toFixed(1)}ms`; | ||
| } | ||
@@ -90,0 +89,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../src/build/duration-to-string.ts"],"sourcesContent":["// Time thresholds in seconds\nconst SECONDS_IN_MINUTE = 60\nconst MINUTES_THRESHOLD_SECONDS = 120 // 2 minutes\nconst SECONDS_THRESHOLD_HIGH = 40\nconst SECONDS_THRESHOLD_LOW = 2\nconst MILLISECONDS_PER_SECOND = 1000\n\n// Time thresholds and conversion factors for nanoseconds\nconst NANOSECONDS_PER_SECOND = 1_000_000_000\nconst NANOSECONDS_PER_MILLISECOND = 1_000_000\nconst NANOSECONDS_PER_MICROSECOND = 1_000\nconst NANOSECONDS_IN_MINUTE = 60_000_000_000 // 60 * 1_000_000_000\nconst MINUTES_THRESHOLD_NANOSECONDS = 120_000_000_000 // 2 minutes in nanoseconds\nconst SECONDS_THRESHOLD_HIGH_NANOSECONDS = 40_000_000_000 // 40 seconds in nanoseconds\nconst SECONDS_THRESHOLD_LOW_NANOSECONDS = 2_000_000_000 // 2 seconds in nanoseconds\nconst MILLISECONDS_THRESHOLD_NANOSECONDS = 2_000_000 // 2 milliseconds in nanoseconds\n\n/**\n * Converts a duration in seconds to a human-readable string format.\n * Formats duration based on magnitude for optimal readability:\n * - >= 2 minutes: show in minutes with 1 decimal place (e.g., \"2.5min\")\n * - >= 40 seconds: show in whole seconds (e.g., \"45s\")\n * - >= 2 seconds: show in seconds with 1 decimal place (e.g., \"3.2s\")\n * - < 2 seconds: show in whole milliseconds (e.g., \"1500ms\")\n *\n * @deprecated Use durationToStringWithNanoseconds instead, collect time in nanoseconds using process.hrtime.bigint().\n * @param compilerDuration - Duration in seconds as a number\n * @returns Formatted duration string with appropriate unit and precision\n */\nexport function durationToString(compilerDuration: number) {\n if (compilerDuration > MINUTES_THRESHOLD_SECONDS) {\n return `${(compilerDuration / SECONDS_IN_MINUTE).toFixed(1)}min`\n } else if (compilerDuration > SECONDS_THRESHOLD_HIGH) {\n return `${compilerDuration.toFixed(0)}s`\n } else if (compilerDuration > SECONDS_THRESHOLD_LOW) {\n return `${compilerDuration.toFixed(1)}s`\n } else {\n return `${(compilerDuration * MILLISECONDS_PER_SECOND).toFixed(0)}ms`\n }\n}\n\n/**\n * Converts a nanosecond duration to a human-readable string format.\n * Formats duration based on magnitude for optimal readability:\n * - >= 2 minutes: show in minutes with 1 decimal place (e.g., \"2.5min\")\n * - >= 40 seconds: show in whole seconds (e.g., \"45s\")\n * - >= 2 seconds: show in seconds with 1 decimal place (e.g., \"3.2s\")\n * - >= 2 milliseconds: show in whole milliseconds (e.g., \"250ms\")\n * - < 2 milliseconds: show in whole microseconds (e.g., \"500µs\")\n *\n * @param durationBigInt - Duration in nanoseconds as a BigInt\n * @returns Formatted duration string with appropriate unit and precision\n */\nfunction durationToStringWithNanoseconds(durationBigInt: bigint): string {\n const duration = Number(durationBigInt)\n if (duration >= MINUTES_THRESHOLD_NANOSECONDS) {\n return `${(duration / NANOSECONDS_IN_MINUTE).toFixed(1)}min`\n } else if (duration >= SECONDS_THRESHOLD_HIGH_NANOSECONDS) {\n return `${(duration / NANOSECONDS_PER_SECOND).toFixed(0)}s`\n } else if (duration >= SECONDS_THRESHOLD_LOW_NANOSECONDS) {\n return `${(duration / NANOSECONDS_PER_SECOND).toFixed(1)}s`\n } else if (duration >= MILLISECONDS_THRESHOLD_NANOSECONDS) {\n return `${(duration / NANOSECONDS_PER_MILLISECOND).toFixed(0)}ms`\n } else {\n return `${(duration / NANOSECONDS_PER_MICROSECOND).toFixed(0)}µs`\n }\n}\n\n/**\n * Converts a high-resolution time tuple to seconds.\n *\n * @param hrtime - High-resolution time tuple of [seconds, nanoseconds]\n * @returns Duration in seconds as a floating-point number\n */\nexport function hrtimeToSeconds(hrtime: [number, number]): number {\n // hrtime is a tuple of [seconds, nanoseconds]\n return hrtime[0] + hrtime[1] / NANOSECONDS_PER_SECOND\n}\n\n/**\n * Converts a BigInt nanosecond duration to a human-readable string format.\n * This is the preferred method for formatting high-precision durations.\n *\n * @param hrtime - Duration in nanoseconds as a BigInt (typically from process.hrtime.bigint())\n * @returns Formatted duration string with appropriate unit and precision\n */\nexport function hrtimeBigIntDurationToString(hrtime: bigint) {\n return durationToStringWithNanoseconds(hrtime)\n}\n\n/**\n * Converts a high-resolution time tuple to a human-readable string format.\n *\n * @deprecated Use hrtimeBigIntDurationToString with process.hrtime.bigint() for better precision.\n * @param hrtime - High-resolution time tuple of [seconds, nanoseconds]\n * @returns Formatted duration string with appropriate unit and precision\n */\nexport function hrtimeDurationToString(hrtime: [number, number]): string {\n return durationToString(hrtimeToSeconds(hrtime))\n}\n"],"names":["durationToString","hrtimeBigIntDurationToString","hrtimeDurationToString","hrtimeToSeconds","SECONDS_IN_MINUTE","MINUTES_THRESHOLD_SECONDS","SECONDS_THRESHOLD_HIGH","SECONDS_THRESHOLD_LOW","MILLISECONDS_PER_SECOND","NANOSECONDS_PER_SECOND","NANOSECONDS_PER_MILLISECOND","NANOSECONDS_PER_MICROSECOND","NANOSECONDS_IN_MINUTE","MINUTES_THRESHOLD_NANOSECONDS","SECONDS_THRESHOLD_HIGH_NANOSECONDS","SECONDS_THRESHOLD_LOW_NANOSECONDS","MILLISECONDS_THRESHOLD_NANOSECONDS","compilerDuration","toFixed","durationToStringWithNanoseconds","durationBigInt","duration","Number","hrtime"],"mappings":"AAAA,6BAA6B;;;;;;;;;;;;;;;;;;IA6BbA,gBAAgB;eAAhBA;;IAyDAC,4BAA4B;eAA5BA;;IAWAC,sBAAsB;eAAtBA;;IAvBAC,eAAe;eAAfA;;;AAzEhB,MAAMC,oBAAoB;AAC1B,MAAMC,4BAA4B,IAAI,YAAY;;AAClD,MAAMC,yBAAyB;AAC/B,MAAMC,wBA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OAAO,GAAG,AAACK,CAAAA,WAAWX,2BAA0B,EAAGQ,OAAO,CAAC,GAAG,EAAE,CAAC;IACnE,OAAO;QACL,OAAO,GAAG,AAACG,CAAAA,WAAWV,2BAA0B,EAAGO,OAAO,CAAC,GAAG,EAAE,CAAC;IACnE;AACF;AAQO,SAASf,gBAAgBoB,MAAwB;IACtD,8CAA8C;IAC9C,OAAOA,MAAM,CAAC,EAAE,GAAGA,MAAM,CAAC,EAAE,GAAGd;AACjC;AASO,SAASR,6BAA6BsB,MAAc;IACzD,OAAOJ,gCAAgCI;AACzC;AASO,SAASrB,uBAAuBqB,MAAwB;IAC7D,OAAOvB,iBAAiBG,gBAAgBoB;AAC1C","ignoreList":[0]} | ||
| {"version":3,"sources":["../../src/build/duration-to-string.ts"],"sourcesContent":["// Time thresholds in seconds\nconst SECONDS_IN_MINUTE = 60\nconst MINUTES_THRESHOLD_SECONDS = 120 // 2 minutes\nconst SECONDS_THRESHOLD_HIGH = 40\nconst SECONDS_THRESHOLD_LOW = 2\nconst MILLISECONDS_PER_SECOND = 1000\n\n// Time thresholds and conversion factors for nanoseconds\nconst NANOSECONDS_PER_SECOND = 1_000_000_000\nconst NANOSECONDS_PER_MILLISECOND = 1_000_000\nconst NANOSECONDS_IN_MINUTE = 60_000_000_000 // 60 * 1_000_000_000\nconst MINUTES_THRESHOLD_NANOSECONDS = 120_000_000_000 // 2 minutes in nanoseconds\nconst SECONDS_THRESHOLD_HIGH_NANOSECONDS = 40_000_000_000 // 40 seconds in nanoseconds\nconst SECONDS_THRESHOLD_LOW_NANOSECONDS = 2_000_000_000 // 2 seconds in nanoseconds\nconst MILLISECONDS_THRESHOLD_NANOSECONDS = 2_000_000 // 2 milliseconds in nanoseconds\n\n/**\n * Converts a duration in seconds to a human-readable string format.\n * Formats duration based on magnitude for optimal readability:\n * - >= 2 minutes: show in minutes with 1 decimal place (e.g., \"2.5min\")\n * - >= 40 seconds: show in whole seconds (e.g., \"45s\")\n * - >= 2 seconds: show in seconds with 1 decimal place (e.g., \"3.2s\")\n * - < 2 seconds: show in whole milliseconds (e.g., \"1500ms\")\n *\n * @deprecated Use durationToStringWithNanoseconds instead, collect time in nanoseconds using process.hrtime.bigint().\n * @param compilerDuration - Duration in seconds as a number\n * @returns Formatted duration string with appropriate unit and precision\n */\nexport function durationToString(compilerDuration: number) {\n if (compilerDuration > MINUTES_THRESHOLD_SECONDS) {\n return `${(compilerDuration / SECONDS_IN_MINUTE).toFixed(1)}min`\n } else if (compilerDuration > SECONDS_THRESHOLD_HIGH) {\n return `${compilerDuration.toFixed(0)}s`\n } else if (compilerDuration > SECONDS_THRESHOLD_LOW) {\n return `${compilerDuration.toFixed(1)}s`\n } else {\n return `${(compilerDuration * MILLISECONDS_PER_SECOND).toFixed(0)}ms`\n }\n}\n\n/**\n * Converts a nanosecond duration to a human-readable string format.\n * Formats duration based on magnitude for optimal readability:\n * - >= 2 minutes: show in minutes with 1 decimal place (e.g., \"2.5min\")\n * - >= 40 seconds: show in whole seconds (e.g., \"45s\")\n * - >= 2 seconds: show in seconds with 1 decimal place (e.g., \"3.2s\")\n * - >= 2 milliseconds: show in whole milliseconds (e.g., \"250ms\")\n * - < 2 milliseconds: show in milliseconds with 1 decimal place (e.g., \"0.5ms\")\n *\n * @param durationBigInt - Duration in nanoseconds as a BigInt\n * @returns Formatted duration string with appropriate unit and precision\n */\nfunction durationToStringWithNanoseconds(durationBigInt: bigint): string {\n const duration = Number(durationBigInt)\n if (duration >= MINUTES_THRESHOLD_NANOSECONDS) {\n return `${(duration / NANOSECONDS_IN_MINUTE).toFixed(1)}min`\n } else if (duration >= SECONDS_THRESHOLD_HIGH_NANOSECONDS) {\n return `${(duration / NANOSECONDS_PER_SECOND).toFixed(0)}s`\n } else if (duration >= SECONDS_THRESHOLD_LOW_NANOSECONDS) {\n return `${(duration / NANOSECONDS_PER_SECOND).toFixed(1)}s`\n } else if (duration >= MILLISECONDS_THRESHOLD_NANOSECONDS) {\n return `${(duration / NANOSECONDS_PER_MILLISECOND).toFixed(0)}ms`\n } else {\n return `${(duration / NANOSECONDS_PER_MILLISECOND).toFixed(1)}ms`\n }\n}\n\n/**\n * Converts a high-resolution time tuple to seconds.\n *\n * @param hrtime - High-resolution time tuple of [seconds, nanoseconds]\n * @returns Duration in seconds as a floating-point number\n */\nexport function hrtimeToSeconds(hrtime: [number, number]): number {\n // hrtime is a tuple of [seconds, nanoseconds]\n return hrtime[0] + hrtime[1] / NANOSECONDS_PER_SECOND\n}\n\n/**\n * Converts a BigInt nanosecond duration to a human-readable string format.\n * This is the preferred method for formatting high-precision durations.\n *\n * @param hrtime - Duration in nanoseconds as a BigInt (typically from process.hrtime.bigint())\n * @returns Formatted duration string with appropriate unit and precision\n */\nexport function hrtimeBigIntDurationToString(hrtime: bigint) {\n return durationToStringWithNanoseconds(hrtime)\n}\n\n/**\n * Converts a high-resolution time tuple to a human-readable string format.\n *\n * @deprecated Use hrtimeBigIntDurationToString with process.hrtime.bigint() for better precision.\n * @param hrtime - High-resolution time tuple of [seconds, nanoseconds]\n * @returns Formatted duration string with appropriate unit and precision\n */\nexport function hrtimeDurationToString(hrtime: [number, number]): string {\n return durationToString(hrtimeToSeconds(hrtime))\n}\n"],"names":["durationToString","hrtimeBigIntDurationToString","hrtimeDurationToString","hrtimeToSeconds","SECONDS_IN_MINUTE","MINUTES_THRESHOLD_SECONDS","SECONDS_THRESHOLD_HIGH","SECONDS_THRESHOLD_LOW","MILLISECONDS_PER_SECOND","NANOSECONDS_PER_SECOND","NANOSECONDS_PER_MILLISECOND","NANOSECONDS_IN_MINUTE","MINUTES_THRESHOLD_NANOSECONDS","SECONDS_THRESHOLD_HIGH_NANOSECONDS","SECONDS_THRESHOLD_LOW_NANOSECONDS","MILLISECONDS_THRESHOLD_NANOSECONDS","compilerDuration","toFixed","durationToStringWithNanoseconds","durationBigInt","duration","Number","hrtime"],"mappings":"AAAA,6BAA6B;;;;;;;;;;;;;;;;;;IA4BbA,gBAAgB;eAAhBA;;IAyDAC,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,YAAYN,mCAAmC;QACxD,OAAO,GAAG,AAACM,CAAAA,WAAWX,sBAAqB,EAAGQ,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7D,OAAO,IAAIG,YAAYL,oCAAoC;QACzD,OAAO,GAAG,AAACK,CAAAA,WAAWV,2BAA0B,EAAGO,OAAO,CAAC,GAAG,EAAE,CAAC;IACnE,OAAO;QACL,OAAO,GAAG,AAACG,CAAAA,WAAWV,2BAA0B,EAAGO,OAAO,CAAC,GAAG,EAAE,CAAC;IACnE;AACF;AAQO,SAASd,gBAAgBmB,MAAwB;IACtD,8CAA8C;IAC9C,OAAOA,MAAM,CAAC,EAAE,GAAGA,MAAM,CAAC,EAAE,GAAGb;AACjC;AASO,SAASR,6BAA6BqB,MAAc;IACzD,OAAOJ,gCAAgCI;AACzC;AASO,SAASpB,uBAAuBoB,MAAwB;IAC7D,OAAOtB,iBAAiBG,gBAAgBmB;AAC1C","ignoreList":[0]} |
@@ -138,3 +138,3 @@ "use strict"; | ||
| }({}); | ||
| const nextVersion = "16.3.0-canary.51"; | ||
| const nextVersion = "16.3.0-canary.52"; | ||
| const ArchName = (0, _os.arch)(); | ||
@@ -141,0 +141,0 @@ const PlatformName = (0, _os.platform)(); |
@@ -96,3 +96,3 @@ "use strict"; | ||
| isPersistentCachingEnabled: persistentCaching, | ||
| nextVersion: "16.3.0-canary.51" | ||
| nextVersion: "16.3.0-canary.52" | ||
| }, { | ||
@@ -99,0 +99,0 @@ turbopackMemoryEviction: config.experimental.turbopackMemoryEvictionMode, |
@@ -118,3 +118,3 @@ // Import cpu-profile first to start profiling early if enabled | ||
| deferredEntries: config.experimental.deferredEntries, | ||
| nextVersion: "16.3.0-canary.51" | ||
| nextVersion: "16.3.0-canary.52" | ||
| }; | ||
@@ -121,0 +121,0 @@ const sharedTurboOptions = { |
@@ -102,3 +102,3 @@ import { webpack } from 'next/dist/compiled/webpack/webpack'; | ||
| export declare function hasExternalOtelApiPackage(): boolean; | ||
| export declare function getCacheDirectories(configs: webpack.Configuration[]): Set<string>; | ||
| export declare const getCacheDirectories: (configs: webpack.Configuration[]) => Set<string>; | ||
| export default function getBaseWebpackConfig(dir: string, { buildId, encryptionKey, config, compilerType, dev, entrypoints, deferredEntrypoints, isDevFallback, pagesDir, rewrites, originalRewrites, originalRedirects, runWebpackSpan, appDir, middlewareMatchers, noMangling, jsConfig, jsConfigPath, resolvedBaseUrl, supportedBrowsers, clientRouterFilters, fetchCacheKeyPrefix, isCompileMode, previewProps, }: { | ||
@@ -105,0 +105,0 @@ previewProps: NonNullable<(typeof NextBuildContext)['previewProps']>; |
@@ -6,5 +6,5 @@ 1:"$Sreact.fragment" | ||
| 7:"$Sreact.suspense" | ||
| 0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/14uzda.yuj~vn.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"_NxlAW5a8g4puXecS6vuL"} | ||
| 0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/14uzda.yuj~vn.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"6lwDwQJdRbU-gx-lLSkD4"} | ||
| 4:{} | ||
| 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" | ||
| 8:null |
@@ -12,3 +12,3 @@ 1:"$Sreact.fragment" | ||
| :HL["/_next/static/chunks/0i88bcw_h0tc6.css","style"] | ||
| 0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/17pjmhs~7~vuy.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/14uzda.yuj~vn.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lb",null,{"children":"$Lc"}],["$","div",null,{"hidden":true,"children":["$","$Ld",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$Le"}]}]}],null]}],false]],"m":"$undefined","G":["$f",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"_NxlAW5a8g4puXecS6vuL"} | ||
| 0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/17pjmhs~7~vuy.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/14uzda.yuj~vn.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lb",null,{"children":"$Lc"}],["$","div",null,{"hidden":true,"children":["$","$Ld",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$Le"}]}]}],null]}],false]],"m":"$undefined","G":["$f",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"6lwDwQJdRbU-gx-lLSkD4"} | ||
| 6:{} | ||
@@ -15,0 +15,0 @@ 7:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params" |
@@ -5,2 +5,2 @@ 1:"$Sreact.fragment" | ||
| 4:"$Sreact.suspense" | ||
| 0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Next.js Bundle Analyzer"}],["$","meta","1",{"name":"description","content":"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"}]]}]}]}],null]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"_NxlAW5a8g4puXecS6vuL"} | ||
| 0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Next.js Bundle Analyzer"}],["$","meta","1",{"name":"description","content":"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"}]]}]}]}],null]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"6lwDwQJdRbU-gx-lLSkD4"} |
@@ -5,2 +5,2 @@ 1:"$Sreact.fragment" | ||
| :HL["/_next/static/chunks/0i88bcw_h0tc6.css","style"] | ||
| 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/17pjmhs~7~vuy.js","async":true}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"_NxlAW5a8g4puXecS6vuL"} | ||
| 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/17pjmhs~7~vuy.js","async":true}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"6lwDwQJdRbU-gx-lLSkD4"} |
| :HL["/_next/static/chunks/0i88bcw_h0tc6.css","style"] | ||
| 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}},"staleTime":300,"buildId":"_NxlAW5a8g4puXecS6vuL"} | ||
| 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}},"staleTime":300,"buildId":"6lwDwQJdRbU-gx-lLSkD4"} |
@@ -10,2 +10,2 @@ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0i88bcw_h0tc6.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/03jpk8cp.v-fb.js"/><script src="/_next/static/chunks/0y5eiibg048qu.js" async=""></script><script src="/_next/static/chunks/07kjyv4ygq3ax.js" async=""></script><script src="/_next/static/chunks/turbopack-0sjo7y3khqr6a.js" async=""></script><script src="/_next/static/chunks/17pjmhs~7~vuy.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Next.js Bundle Analyzer</title><meta name="description" content="Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"/><script> | ||
| })(); | ||
| </script><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/03jpk8cp.v-fb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[7512,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\"]\n3:I[13537,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\"]\n4:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"ViewportBoundary\"]\na:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"MetadataBoundary\"]\nc:I[11480,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/17pjmhs~7~vuy.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n (function() {\\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\\n document.documentElement.classList.toggle('dark', theme === 'dark');\\n\\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) =\u003e {\\n document.documentElement.classList.toggle('dark', e.matches);\\n });\\n })();\\n \"}}]}],[\"$\",\"body\",null,{\"className\":\"font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"_NxlAW5a8g4puXecS6vuL\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"Next.js Bundle Analyzer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis\"}]]\n"])</script></body></html> | ||
| </script><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/03jpk8cp.v-fb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[7512,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\"]\n3:I[13537,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\"]\n4:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"ViewportBoundary\"]\na:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"MetadataBoundary\"]\nc:I[11480,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/17pjmhs~7~vuy.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n (function() {\\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\\n document.documentElement.classList.toggle('dark', theme === 'dark');\\n\\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) =\u003e {\\n document.documentElement.classList.toggle('dark', e.matches);\\n });\\n })();\\n \"}}]}],[\"$\",\"body\",null,{\"className\":\"font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"6lwDwQJdRbU-gx-lLSkD4\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"Next.js Bundle Analyzer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis\"}]]\n"])</script></body></html> |
@@ -10,3 +10,3 @@ 1:"$Sreact.fragment" | ||
| :HL["/_next/static/chunks/0i88bcw_h0tc6.css","style"] | ||
| 0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/17pjmhs~7~vuy.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,null]},null,false,"$@7"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],null]}],false]],"m":"$undefined","G":["$c",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"_NxlAW5a8g4puXecS6vuL"} | ||
| 0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/17pjmhs~7~vuy.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,null]},null,false,"$@7"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],null]}],false]],"m":"$undefined","G":["$c",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"6lwDwQJdRbU-gx-lLSkD4"} | ||
| d:[] | ||
@@ -13,0 +13,0 @@ 7:"$Wd" |
@@ -10,3 +10,3 @@ 1:"$Sreact.fragment" | ||
| :HL["/_next/static/chunks/0i88bcw_h0tc6.css","style"] | ||
| 0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/17pjmhs~7~vuy.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,null]},null,false,"$@7"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],null]}],false]],"m":"$undefined","G":["$c",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"_NxlAW5a8g4puXecS6vuL"} | ||
| 0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/17pjmhs~7~vuy.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,null]},null,false,"$@7"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],null]}],false]],"m":"$undefined","G":["$c",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"6lwDwQJdRbU-gx-lLSkD4"} | ||
| d:[] | ||
@@ -13,0 +13,0 @@ 7:"$Wd" |
@@ -5,2 +5,2 @@ 1:"$Sreact.fragment" | ||
| 4:"$Sreact.suspense" | ||
| 0:{"rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Next.js Bundle Analyzer"}],["$","meta","1",{"name":"description","content":"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"}]]}]}]}],null]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"_NxlAW5a8g4puXecS6vuL"} | ||
| 0:{"rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Next.js Bundle Analyzer"}],["$","meta","1",{"name":"description","content":"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"}]]}]}]}],null]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"6lwDwQJdRbU-gx-lLSkD4"} |
@@ -5,2 +5,2 @@ 1:"$Sreact.fragment" | ||
| :HL["/_next/static/chunks/0i88bcw_h0tc6.css","style"] | ||
| 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/17pjmhs~7~vuy.js","async":true}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"_NxlAW5a8g4puXecS6vuL"} | ||
| 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/17pjmhs~7~vuy.js","async":true}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"6lwDwQJdRbU-gx-lLSkD4"} |
| 1:"$Sreact.fragment" | ||
| 2:I[37998,["/_next/static/chunks/17pjmhs~7~vuy.js"],"OutletBoundary"] | ||
| 3:"$Sreact.suspense" | ||
| 0:{"rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"_NxlAW5a8g4puXecS6vuL"} | ||
| 0:{"rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"6lwDwQJdRbU-gx-lLSkD4"} | ||
| 4:null |
@@ -5,2 +5,2 @@ 1:"$Sreact.fragment" | ||
| 4:[] | ||
| 0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"_NxlAW5a8g4puXecS6vuL"} | ||
| 0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"6lwDwQJdRbU-gx-lLSkD4"} |
| :HL["/_next/static/chunks/0i88bcw_h0tc6.css","style"] | ||
| 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"/_not-found","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"_NxlAW5a8g4puXecS6vuL"} | ||
| 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"/_not-found","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"6lwDwQJdRbU-gx-lLSkD4"} |
@@ -10,2 +10,2 @@ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0i88bcw_h0tc6.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/03jpk8cp.v-fb.js"/><script src="/_next/static/chunks/0y5eiibg048qu.js" async=""></script><script src="/_next/static/chunks/07kjyv4ygq3ax.js" async=""></script><script src="/_next/static/chunks/turbopack-0sjo7y3khqr6a.js" async=""></script><script src="/_next/static/chunks/17pjmhs~7~vuy.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Next.js Bundle Analyzer</title><meta name="description" content="Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"/><script> | ||
| })(); | ||
| </script><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/03jpk8cp.v-fb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[7512,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\"]\n3:I[13537,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\"]\n4:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"ViewportBoundary\"]\na:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"MetadataBoundary\"]\nc:I[11480,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/17pjmhs~7~vuy.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n (function() {\\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\\n document.documentElement.classList.toggle('dark', theme === 'dark');\\n\\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) =\u003e {\\n document.documentElement.classList.toggle('dark', e.matches);\\n });\\n })();\\n \"}}]}],[\"$\",\"body\",null,{\"className\":\"font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"_NxlAW5a8g4puXecS6vuL\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"Next.js Bundle Analyzer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis\"}]]\n"])</script></body></html> | ||
| </script><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/03jpk8cp.v-fb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[7512,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\"]\n3:I[13537,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\"]\n4:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"ViewportBoundary\"]\na:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"MetadataBoundary\"]\nc:I[11480,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/17pjmhs~7~vuy.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n (function() {\\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\\n document.documentElement.classList.toggle('dark', theme === 'dark');\\n\\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) =\u003e {\\n document.documentElement.classList.toggle('dark', e.matches);\\n });\\n })();\\n \"}}]}],[\"$\",\"body\",null,{\"className\":\"font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"6lwDwQJdRbU-gx-lLSkD4\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"Next.js Bundle Analyzer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis\"}]]\n"])</script></body></html> |
@@ -10,2 +10,2 @@ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/0i88bcw_h0tc6.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/03jpk8cp.v-fb.js"/><script src="/_next/static/chunks/0y5eiibg048qu.js" async=""></script><script src="/_next/static/chunks/07kjyv4ygq3ax.js" async=""></script><script src="/_next/static/chunks/turbopack-0sjo7y3khqr6a.js" async=""></script><script src="/_next/static/chunks/17pjmhs~7~vuy.js" async=""></script><script src="/_next/static/chunks/14uzda.yuj~vn.js" async=""></script><title>Next.js Bundle Analyzer</title><meta name="description" content="Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"/><script> | ||
| })(); | ||
| </script><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><main class="h-screen flex flex-col bg-background"><div class="flex-none px-4 py-2 border-b border-border flex items-center gap-3"><div class="flex-1 flex"><div class="flex items-center gap-2 min-w-64 max-w-full"><button class="inline-flex items-center gap-2 whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2 flex-grow-1 w-full justify-between font-mono text-sm" role="combobox" aria-expanded="false" disabled="" type="button" aria-haspopup="dialog" aria-controls="radix-_R_lbtb_" data-state="closed"><div class="flex items-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-loader mr-2 inline animate-spin" aria-hidden="true"><path d="M12 2v4"></path><path d="m16.2 7.8 2.9-2.9"></path><path d="M18 12h4"></path><path d="m16.2 16.2 2.9 2.9"></path><path d="M12 18v4"></path><path d="m4.9 19.1 2.9-2.9"></path><path d="M2 12h4"></path><path d="m4.9 4.9 2.9 2.9"></path></svg>Loading routes...</div><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevrons-up-down h-4 w-4 shrink-0 opacity-50" aria-hidden="true"><path d="m7 15 5 5 5-5"></path><path d="m7 9 5-5 5 5"></path></svg></div></button></div></div><div class="flex items-center gap-2"></div></div><div class="flex-1 flex min-h-0"><div class="flex-1 min-w-0 p-4 bg-background"><div class="h-full w-full grid grid-cols-12 grid-rows-8 gap-2"><div class="animate-pulse rounded-md bg-muted col-span-5 row-span-4"></div><div class="animate-pulse rounded-md bg-muted col-span-4 row-span-3"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-3"></div><div class="animate-pulse rounded-md bg-muted col-span-4 row-span-1"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-4"></div><div class="animate-pulse rounded-md bg-muted col-span-2 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-2 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-4 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-2 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-2"></div></div></div><button type="button" class="flex-none w-1 bg-border cursor-col-resize transition-colors" disabled="" aria-label="Resize sidebar"></button><div class="flex-none bg-muted border-l border-border overflow-y-auto" style="width:20%"><div class="flex-1 p-3 space-y-4 overflow-y-auto"><div class="animate-pulse rounded-md bg-muted h-4 w-3/4"></div><div class="animate-pulse rounded-md bg-muted h-4 w-full"></div><div class="animate-pulse rounded-md bg-muted h-4 w-5/6"></div><div class="mt-4 space-y-2"><div class="animate-pulse rounded-md bg-muted h-3 w-full"></div><div class="animate-pulse rounded-md bg-muted h-3 w-full"></div><div class="animate-pulse rounded-md bg-muted h-3 w-4/5"></div></div></div></div></div></main><!--$--><!--/$--><script src="/_next/static/chunks/03jpk8cp.v-fb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[7512,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\"]\n3:I[13537,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\"]\n4:I[61160,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"ClientPageRoot\"]\n5:I[79331,[\"/_next/static/chunks/17pjmhs~7~vuy.js\",\"/_next/static/chunks/14uzda.yuj~vn.js\"],\"default\"]\n8:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"OutletBoundary\"]\n9:\"$Sreact.suspense\"\nb:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"ViewportBoundary\"]\nd:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"MetadataBoundary\"]\nf:I[11480,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/17pjmhs~7~vuy.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n (function() {\\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\\n document.documentElement.classList.toggle('dark', theme === 'dark');\\n\\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) =\u003e {\\n document.documentElement.classList.toggle('dark', e.matches);\\n });\\n })();\\n \"}}]}],[\"$\",\"body\",null,{\"className\":\"font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L4\",null,{\"Component\":\"$5\",\"serverProvidedParams\":{\"searchParams\":{},\"params\":{},\"promises\":[\"$@6\",\"$@7\"]}}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/14uzda.yuj~vn.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@a\"}]}]]}],{},null,false,null]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Le\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$f\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"_NxlAW5a8g4puXecS6vuL\"}\n"])</script><script>self.__next_f.push([1,"6:{}\n7:\"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params\"\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"a:null\ne:[[\"$\",\"title\",\"0\",{\"children\":\"Next.js Bundle Analyzer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis\"}]]\n"])</script></body></html> | ||
| </script><script src="/_next/static/chunks/03~yq9q893hmn.js" noModule=""></script></head><body class="font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><main class="h-screen flex flex-col bg-background"><div class="flex-none px-4 py-2 border-b border-border flex items-center gap-3"><div class="flex-1 flex"><div class="flex items-center gap-2 min-w-64 max-w-full"><button class="inline-flex items-center gap-2 whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2 flex-grow-1 w-full justify-between font-mono text-sm" role="combobox" aria-expanded="false" disabled="" type="button" aria-haspopup="dialog" aria-controls="radix-_R_lbtb_" data-state="closed"><div class="flex items-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-loader mr-2 inline animate-spin" aria-hidden="true"><path d="M12 2v4"></path><path d="m16.2 7.8 2.9-2.9"></path><path d="M18 12h4"></path><path d="m16.2 16.2 2.9 2.9"></path><path d="M12 18v4"></path><path d="m4.9 19.1 2.9-2.9"></path><path d="M2 12h4"></path><path d="m4.9 4.9 2.9 2.9"></path></svg>Loading routes...</div><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevrons-up-down h-4 w-4 shrink-0 opacity-50" aria-hidden="true"><path d="m7 15 5 5 5-5"></path><path d="m7 9 5-5 5 5"></path></svg></div></button></div></div><div class="flex items-center gap-2"></div></div><div class="flex-1 flex min-h-0"><div class="flex-1 min-w-0 p-4 bg-background"><div class="h-full w-full grid grid-cols-12 grid-rows-8 gap-2"><div class="animate-pulse rounded-md bg-muted col-span-5 row-span-4"></div><div class="animate-pulse rounded-md bg-muted col-span-4 row-span-3"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-3"></div><div class="animate-pulse rounded-md bg-muted col-span-4 row-span-1"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-4"></div><div class="animate-pulse rounded-md bg-muted col-span-2 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-2 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-4 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-2 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-2"></div></div></div><button type="button" class="flex-none w-1 bg-border cursor-col-resize transition-colors" disabled="" aria-label="Resize sidebar"></button><div class="flex-none bg-muted border-l border-border overflow-y-auto" style="width:20%"><div class="flex-1 p-3 space-y-4 overflow-y-auto"><div class="animate-pulse rounded-md bg-muted h-4 w-3/4"></div><div class="animate-pulse rounded-md bg-muted h-4 w-full"></div><div class="animate-pulse rounded-md bg-muted h-4 w-5/6"></div><div class="mt-4 space-y-2"><div class="animate-pulse rounded-md bg-muted h-3 w-full"></div><div class="animate-pulse rounded-md bg-muted h-3 w-full"></div><div class="animate-pulse rounded-md bg-muted h-3 w-4/5"></div></div></div></div></div></main><!--$--><!--/$--><script src="/_next/static/chunks/03jpk8cp.v-fb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[7512,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\"]\n3:I[13537,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\"]\n4:I[61160,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"ClientPageRoot\"]\n5:I[79331,[\"/_next/static/chunks/17pjmhs~7~vuy.js\",\"/_next/static/chunks/14uzda.yuj~vn.js\"],\"default\"]\n8:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"OutletBoundary\"]\n9:\"$Sreact.suspense\"\nb:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"ViewportBoundary\"]\nd:I[37998,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"MetadataBoundary\"]\nf:I[11480,[\"/_next/static/chunks/17pjmhs~7~vuy.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/17pjmhs~7~vuy.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n (function() {\\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\\n document.documentElement.classList.toggle('dark', theme === 'dark');\\n\\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) =\u003e {\\n document.documentElement.classList.toggle('dark', e.matches);\\n });\\n })();\\n \"}}]}],[\"$\",\"body\",null,{\"className\":\"font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L4\",null,{\"Component\":\"$5\",\"serverProvidedParams\":{\"searchParams\":{},\"params\":{},\"promises\":[\"$@6\",\"$@7\"]}}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/14uzda.yuj~vn.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@a\"}]}]]}],{},null,false,null]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Le\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$f\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/0i88bcw_h0tc6.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"6lwDwQJdRbU-gx-lLSkD4\"}\n"])</script><script>self.__next_f.push([1,"6:{}\n7:\"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params\"\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"a:null\ne:[[\"$\",\"title\",\"0\",{\"children\":\"Next.js Bundle Analyzer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis\"}]]\n"])</script></body></html> |
@@ -12,3 +12,3 @@ 1:"$Sreact.fragment" | ||
| :HL["/_next/static/chunks/0i88bcw_h0tc6.css","style"] | ||
| 0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/17pjmhs~7~vuy.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/14uzda.yuj~vn.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lb",null,{"children":"$Lc"}],["$","div",null,{"hidden":true,"children":["$","$Ld",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$Le"}]}]}],null]}],false]],"m":"$undefined","G":["$f",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"_NxlAW5a8g4puXecS6vuL"} | ||
| 0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/17pjmhs~7~vuy.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/14uzda.yuj~vn.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lb",null,{"children":"$Lc"}],["$","div",null,{"hidden":true,"children":["$","$Ld",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$Le"}]}]}],null]}],false]],"m":"$undefined","G":["$f",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0i88bcw_h0tc6.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"6lwDwQJdRbU-gx-lLSkD4"} | ||
| 6:{} | ||
@@ -15,0 +15,0 @@ 7:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params" |
@@ -42,3 +42,3 @@ #!/usr/bin/env node | ||
| const nextBuild = async (options, directory)=>{ | ||
| process.title = `next-build (v${"16.3.0-canary.51"})`; | ||
| process.title = `next-build (v${"16.3.0-canary.52"})`; | ||
| process.on('SIGTERM', ()=>{ | ||
@@ -45,0 +45,0 @@ (0, _cpuprofile.saveCpuProfile)(); |
@@ -43,3 +43,3 @@ #!/usr/bin/env node | ||
| const bindings = await (0, _swc.loadBindings)((_config_experimental1 = config.experimental) == null ? void 0 : _config_experimental1.useWasmBinary); | ||
| await bindings.turbo.databaseCompact(cachePath, "16.3.0-canary.51"); | ||
| await bindings.turbo.databaseCompact(cachePath, "16.3.0-canary.52"); | ||
| console.log('Turbopack database compaction complete.'); | ||
@@ -46,0 +46,0 @@ }; |
@@ -18,3 +18,3 @@ /** | ||
| const _setattributesfromprops = require("./set-attributes-from-props"); | ||
| const version = "16.3.0-canary.51"; | ||
| const version = "16.3.0-canary.52"; | ||
| window.next = { | ||
@@ -21,0 +21,0 @@ version, |
@@ -41,3 +41,2 @@ 'use client'; | ||
| const _addbasepath = require("../add-base-path"); | ||
| const _warnonce = require("../../shared/lib/utils/warn-once"); | ||
| const _routerreducertypes = require("../components/router-reducer/router-reducer-types"); | ||
@@ -47,3 +46,2 @@ const _links = require("../components/links"); | ||
| const _types = require("../components/segment-cache/types"); | ||
| const _erroronce = require("../../shared/lib/utils/error-once"); | ||
| function isModifiedEvent(event) { | ||
@@ -207,4 +205,5 @@ const eventTarget = event.currentTarget; | ||
| if (process.env.NODE_ENV !== 'production') { | ||
| const { warnOnce } = require('../../shared/lib/utils/warn-once'); | ||
| if (props.locale) { | ||
| (0, _warnonce.warnOnce)('The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'); | ||
| warnOnce('The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'); | ||
| } | ||
@@ -384,3 +383,4 @@ if (!asProp) { | ||
| if (process.env.NODE_ENV === 'development') { | ||
| (0, _erroronce.errorOnce)('`legacyBehavior` is deprecated and will be removed in a future ' + 'release. A codemod is available to upgrade your components:\n\n' + 'npx @next/codemod@latest new-link .\n\n' + 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'); | ||
| const { errorOnce } = require('../../shared/lib/utils/error-once'); | ||
| errorOnce('`legacyBehavior` is deprecated and will be removed in a future ' + 'release. A codemod is available to upgrade your components:\n\n' + 'npx @next/codemod@latest new-link .\n\n' + 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'); | ||
| } | ||
@@ -387,0 +387,0 @@ link = /*#__PURE__*/ _react.default.cloneElement(child, childProps); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../src/client/app-dir/link.tsx"],"sourcesContent":["'use client'\n\nimport React, { createContext, useContext, useOptimistic, useRef } from 'react'\nimport type { UrlObject } from 'url'\nimport { formatUrl } from '../../shared/lib/router/utils/format-url'\nimport { AppRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useMergedRef } from '../use-merged-ref'\nimport { isAbsoluteUrl } from '../../shared/lib/utils'\nimport { addBasePath } from '../add-base-path'\nimport { warnOnce } from '../../shared/lib/utils/warn-once'\nimport { ScrollBehavior } from '../components/router-reducer/router-reducer-types'\nimport type { PENDING_LINK_STATUS } from '../components/links'\nimport {\n IDLE_LINK_STATUS,\n mountLinkInstance,\n onNavigationIntent,\n unmountLinkForCurrentNavigation,\n unmountPrefetchableInstance,\n type LinkInstance,\n} from '../components/links'\nimport { isLocalURL } from '../../shared/lib/router/utils/is-local-url'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n} from '../components/segment-cache/types'\nimport { errorOnce } from '../../shared/lib/utils/error-once'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * **Required**. The path or URL to navigate to. It can also be an object (similar to `URL`).\n *\n * @example\n * ```tsx\n * // Navigate to /dashboard:\n * <Link href=\"/dashboard\">Dashboard</Link>\n *\n * // Navigate to /about?name=test:\n * <Link href={{ pathname: '/about', query: { name: 'test' } }}>\n * About\n * </Link>\n * ```\n *\n * @remarks\n * - For external URLs, use a fully qualified URL such as `https://...`.\n * - In the App Router, dynamic routes must not include bracketed segments in `href`.\n */\n href: Url\n\n /**\n * @deprecated v10.0.0: `href` props pointing to a dynamic route are\n * automatically resolved and no longer require the `as` prop.\n */\n as?: Url\n\n /**\n * Replace the current `history` state instead of adding a new URL into the stack.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" replace>\n * About (replaces the history state)\n * </Link>\n * ```\n */\n replace?: boolean\n\n /**\n * Whether to override the default scroll behavior. If `true`, Next.js attempts to maintain\n * the scroll position if the newly navigated page is still visible. If not, it scrolls to the top.\n *\n * If `false`, Next.js will not modify the scroll behavior at all.\n *\n * @defaultValue `true`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" scroll={false}>\n * No auto scroll\n * </Link>\n * ```\n */\n scroll?: boolean\n\n /**\n * Update the path of the current page without rerunning data fetching methods\n * like `getStaticProps`, `getServerSideProps`, or `getInitialProps`.\n *\n * @remarks\n * `shallow` only applies to the Pages Router. For the App Router, see the\n * [following documentation](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#using-the-native-history-api).\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/blog\" shallow>\n * Shallow navigation\n * </Link>\n * ```\n */\n shallow?: boolean\n\n /**\n * Forces `Link` to pass its `href` to the child component. Useful if the child is a custom\n * component that wraps an `<a>` tag, or if you're using certain styling libraries.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" passHref legacyBehavior>\n * <MyStyledAnchor>Dashboard</MyStyledAnchor>\n * </Link>\n * ```\n */\n passHref?: boolean\n\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`.\n *\n * @remarks\n * Prefetching is only enabled in production.\n *\n * - In the **App Router**:\n * - `\"auto\"`, `null`, `undefined` (default): Prefetch behavior depends on static vs dynamic routes:\n * - Static routes: fully prefetched\n * - Dynamic routes: partial prefetch to the nearest segment with a `loading.js`\n * - `true`: Always prefetch the full route and data.\n * - `false`: Disable prefetching on both viewport and hover.\n * - In the **Pages Router**:\n * - `true` (default): Prefetches the route and data in the background on viewport or hover.\n * - `false`: Prefetch only on hover, not on viewport.\n *\n * @defaultValue `true` (Pages Router) or `null` (App Router)\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" prefetch={false}>\n * Dashboard\n * </Link>\n * ```\n */\n prefetch?: boolean | 'auto' | null\n\n /**\n * (unstable) Switch to a full prefetch on hover. Effectively the same as\n * updating the prefetch prop to `true` in a mouse event.\n */\n unstable_dynamicOnHover?: boolean\n\n /**\n * The active locale is automatically prepended in the Pages Router. `locale` allows for providing\n * a different locale, or can be set to `false` to opt out of automatic locale behavior.\n *\n * @remarks\n * Note: locale only applies in the Pages Router and is ignored in the App Router.\n *\n * @example\n * ```tsx\n * // Use the 'fr' locale:\n * <Link href=\"/about\" locale=\"fr\">\n * About (French)\n * </Link>\n *\n * // Disable locale prefix:\n * <Link href=\"/about\" locale={false}>\n * About (no locale prefix)\n * </Link>\n * ```\n */\n locale?: string | false\n\n /**\n * Enable legacy link behavior.\n *\n * @deprecated This will be removed in a future version\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n\n /**\n * Optional event handler for when the mouse pointer is moved onto the `<Link>`.\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n\n /**\n * Transition types to apply when navigating. These types are passed to\n * [`React.addTransitionType`](https://react.dev/reference/react/addTransitionType)\n * inside the navigation transition, enabling\n * [`<ViewTransition>`](https://react.dev/reference/react/ViewTransition) components\n * to apply different animations based on the type of navigation.\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" transitionTypes={['slide-in']}>About</Link>\n * ```\n */\n transitionTypes?: string[]\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps<RouteInferType = any> = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<Omit<InternalLinkProps, 'locale'>>\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n href: string,\n linkInstanceRef: React.RefObject<LinkInstance | null>,\n replace?: boolean,\n scroll?: boolean,\n onNavigate?: OnNavigateEventHandler,\n transitionTypes?: string[]\n): void {\n if (typeof window !== 'undefined') {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n if (\n (isAnchorNodeName && isModifiedEvent(e)) ||\n e.currentTarget.hasAttribute('download')\n ) {\n // ignore click for browser’s default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n const { dispatchNavigateAction } =\n require('../components/app-router-instance') as typeof import('../components/app-router-instance')\n\n React.startTransition(() => {\n dispatchNavigateAction(\n href,\n replace ? 'replace' : 'push',\n scroll === false ? ScrollBehavior.NoScroll : ScrollBehavior.Default,\n linkInstanceRef.current,\n transitionTypes\n )\n })\n }\n}\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide\n * [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation. This is the primary way to navigate between routes in Next.js.\n *\n * @remarks\n * - Prefetching is only enabled in production.\n *\n * @see https://nextjs.org/docs/app/api-reference/components/link\n */\nexport default function LinkComponent(\n props: LinkProps & {\n children: React.ReactNode\n ref: React.Ref<HTMLAnchorElement>\n }\n) {\n const [linkStatus, setOptimisticLinkStatus] = useOptimistic(IDLE_LINK_STATUS)\n\n let children: React.ReactNode\n\n const linkInstanceRef = useRef<LinkInstance | null>(null)\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n onClick,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n onNavigate,\n transitionTypes,\n ref: forwardedRef,\n unstable_dynamicOnHover,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(AppRouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n const fetchStrategy =\n prefetchProp !== false\n ? getFetchStrategyFromPrefetchProp(prefetchProp)\n : // TODO: it makes no sense to assign a fetchStrategy when prefetching is disabled.\n FetchStrategy.PPR\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n unstable_dynamicOnHover: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n onNavigate: true,\n transitionTypes: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'legacyBehavior' ||\n key === 'unstable_dynamicOnHover'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\"`',\n actual: valType,\n })\n }\n } else if (key === 'transitionTypes') {\n if (props[key] != null && !Array.isArray(props[key])) {\n throw createPropError({\n key,\n expected: '`string[]`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n }\n\n const resolvedHref = asProp || hrefProp\n const formattedHref = formatStringOrUrl(resolvedHref)\n\n if (process.env.NODE_ENV !== 'production') {\n if (props.locale) {\n warnOnce(\n 'The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'\n )\n }\n if (!asProp) {\n let href: string | undefined\n if (typeof resolvedHref === 'string') {\n href = resolvedHref\n } else if (\n typeof resolvedHref === 'object' &&\n typeof resolvedHref.pathname === 'string'\n ) {\n href = resolvedHref.pathname\n }\n\n if (href) {\n const hasDynamicSegment = href\n .split('/')\n .some((segment) => segment.startsWith('[') && segment.endsWith(']'))\n\n if (hasDynamicSegment) {\n throw new Error(\n `Dynamic href \\`${href}\\` found in <Link> while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`\n )\n }\n }\n }\n }\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if ((children as any)?.$$typeof === Symbol.for('react.lazy')) {\n throw new Error(\n `\\`<Link legacyBehavior>\\` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n // Capture the Owner Stack during render so dev-only warnings emitted later\n // at navigation time can be associated with the JSX that created\n // this <Link>.\n const ownerStack =\n process.env.NODE_ENV !== 'production' && process.env.__NEXT_CACHE_COMPONENTS\n ? // eslint-disable-next-line react-hooks/rules-of-hooks -- build time variables\n React.useMemo(() => {\n // Only capture when a warning might actually need it. Otherwise leave\n // it `undefined` so consumers can detect the opt-out and degrade\n // gracefully.\n if (fetchStrategy === FetchStrategy.Full) {\n return React.captureOwnerStack()\n }\n return undefined\n }, [fetchStrategy])\n : undefined\n\n // Use a callback ref to attach an IntersectionObserver to the anchor tag on\n // mount. In the future we will also use this to keep track of all the\n // currently mounted <Link> instances, e.g. so we can re-prefetch them after\n // a revalidation or refresh.\n const observeLinkVisibilityOnMount = React.useCallback(\n (element: HTMLAnchorElement | SVGAElement) => {\n if (router !== null) {\n linkInstanceRef.current = mountLinkInstance(\n element,\n formattedHref,\n router,\n fetchStrategy,\n prefetchEnabled,\n setOptimisticLinkStatus,\n ownerStack\n )\n }\n\n return () => {\n if (linkInstanceRef.current) {\n unmountLinkForCurrentNavigation(linkInstanceRef.current)\n linkInstanceRef.current = null\n }\n unmountPrefetchableInstance(element)\n }\n },\n [\n prefetchEnabled,\n formattedHref,\n router,\n fetchStrategy,\n setOptimisticLinkStatus,\n ownerStack,\n ]\n )\n\n const mergedRef = useMergedRef(observeLinkVisibilityOnMount, childRef)\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: mergedRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n if (e.defaultPrevented) {\n return\n }\n linkClicked(\n e,\n formattedHref,\n linkInstanceRef,\n replace,\n scroll,\n onNavigate,\n transitionTypes\n )\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled || process.env.NODE_ENV === 'development') {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled) {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the basePath.\n if (isAbsoluteUrl(formattedHref)) {\n childProps.href = formattedHref\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n childProps.href = addBasePath(formattedHref)\n }\n\n let link: React.ReactNode\n\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n errorOnce(\n '`legacyBehavior` is deprecated and will be removed in a future ' +\n 'release. A codemod is available to upgrade your components:\\n\\n' +\n 'npx @next/codemod@latest new-link .\\n\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'\n )\n }\n link = React.cloneElement(child, childProps)\n } else {\n link = (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n\n return (\n <LinkStatusContext.Provider value={linkStatus}>\n {link}\n </LinkStatusContext.Provider>\n )\n}\n\nconst LinkStatusContext = createContext<\n typeof PENDING_LINK_STATUS | typeof IDLE_LINK_STATUS\n>(IDLE_LINK_STATUS)\n\nexport const useLinkStatus = () => {\n return useContext(LinkStatusContext)\n}\n\nfunction getFetchStrategyFromPrefetchProp(\n prefetchProp: Exclude<LinkProps['prefetch'], undefined | false>\n): PrefetchTaskFetchStrategy {\n if (process.env.__NEXT_CACHE_COMPONENTS) {\n if (prefetchProp === true) {\n return FetchStrategy.Full\n }\n\n // `null` or `\"auto\"`: this is the default \"auto\" mode, where we will prefetch partially if the link is in the viewport.\n // This will also include invalid prop values that don't match the types specified here.\n // (although those should've been filtered out by prop validation in dev)\n prefetchProp satisfies null | 'auto'\n return FetchStrategy.PPR\n } else {\n return prefetchProp === null || prefetchProp === 'auto'\n ? // We default to PPR, and we'll discover whether or not the route supports it with the initial prefetch.\n FetchStrategy.PPR\n : // In the old implementation without runtime prefetches, `prefetch={true}` forces all dynamic data to be prefetched.\n // To preserve backwards-compatibility, anything other than `false`, `null`, or `\"auto\"` results in a full prefetch.\n // (although invalid values should've been filtered out by prop validation in dev)\n FetchStrategy.Full\n }\n}\n"],"names":["LinkComponent","useLinkStatus","isModifiedEvent","event","eventTarget","currentTarget","target","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","href","linkInstanceRef","replace","scroll","onNavigate","transitionTypes","window","nodeName","isAnchorNodeName","toUpperCase","hasAttribute","isLocalURL","preventDefault","location","isDefaultPrevented","dispatchNavigateAction","require","React","startTransition","ScrollBehavior","NoScroll","Default","current","formatStringOrUrl","urlObjOrString","formatUrl","props","linkStatus","setOptimisticLinkStatus","useOptimistic","IDLE_LINK_STATUS","children","useRef","hrefProp","as","asProp","childrenProp","prefetch","prefetchProp","passHref","shallow","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","ref","forwardedRef","unstable_dynamicOnHover","restProps","a","router","useContext","AppRouterContext","prefetchEnabled","fetchStrategy","getFetchStrategyFromPrefetchProp","FetchStrategy","PPR","process","env","NODE_ENV","createPropError","args","Error","key","expected","actual","requiredPropsGuard","requiredProps","Object","keys","forEach","_","optionalPropsGuard","optionalProps","valType","Array","isArray","resolvedHref","formattedHref","locale","warnOnce","pathname","hasDynamicSegment","split","some","segment","startsWith","endsWith","child","$$typeof","Symbol","for","console","warn","Children","only","err","type","childRef","ownerStack","__NEXT_CACHE_COMPONENTS","useMemo","Full","captureOwnerStack","undefined","observeLinkVisibilityOnMount","useCallback","element","mountLinkInstance","unmountLinkForCurrentNavigation","unmountPrefetchableInstance","mergedRef","useMergedRef","childProps","defaultPrevented","upgradeToDynamicPrefetch","onNavigationIntent","__NEXT_LINK_NO_TOUCH_START","isAbsoluteUrl","addBasePath","link","errorOnce","cloneElement","LinkStatusContext","Provider","value","createContext"],"mappings":"AAAA;;;;;;;;;;;;;;;;IAsUA;;;;;;;;;CASC,GACD,OAqcC;eArcuBA;;IA2cXC,aAAa;eAAbA;;;;;iEAzxB2D;2BAE9C;+CACO;8BACJ;uBACC;6BACF;0BACH;oCACM;uBASxB;4BACoB;uBAIpB;2BACmB;AAuN1B,SAASC,gBAAgBC,KAAuB;IAC9C,MAAMC,cAAcD,MAAME,aAAa;IACvC,MAAMC,SAASF,YAAYG,YAAY,CAAC;IACxC,OACE,AAACD,UAAUA,WAAW,WACtBH,MAAMK,OAAO,IACbL,MAAMM,OAAO,IACbN,MAAMO,QAAQ,IACdP,MAAMQ,MAAM,IAAI,6BAA6B;IAC5CR,MAAMS,WAAW,IAAIT,MAAMS,WAAW,CAACC,KAAK,KAAK;AAEtD;AAEA,SAASC,YACPC,CAAmB,EACnBC,IAAY,EACZC,eAAqD,EACrDC,OAAiB,EACjBC,MAAgB,EAChBC,UAAmC,EACnCC,eAA0B;IAE1B,IAAI,OAAOC,WAAW,aAAa;QACjC,MAAM,EAAEC,QAAQ,EAAE,GAAGR,EAAEV,aAAa;QAEpC,kDAAkD;QAClD,MAAMmB,mBAAmBD,SAASE,WAAW,OAAO;QACpD,IACE,AAACD,oBAAoBtB,gBAAgBa,MACrCA,EAAEV,aAAa,CAACqB,YAAY,CAAC,aAC7B;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AQ;QAACC,OAAOrG;kBAChCgG;;AAGP;AAEA,MAAMG,kCAAoBG,IAAAA,oBAAa,EAErCnG,uBAAgB;AAEX,MAAM7C,gBAAgB;IAC3B,OAAOoE,IAAAA,iBAAU,EAACyE;AACpB;AAEA,SAASrE,iCACPnB,YAA+D;IAE/D,IAAIsB,QAAQC,GAAG,CAAC0C,uBAAuB,EAAE;QACvC,IAAIjE,iBAAiB,MAAM;YACzB,OAAOoB,oBAAa,CAAC+C,IAAI;QAC3B;QAEA,wHAAwH;QACxH,wFAAwF;QACxF,yEAAyE;QACzEnE;QACA,OAAOoB,oBAAa,CAACC,GAAG;IAC1B,OAAO;QACL,OAAOrB,iBAAiB,QAAQA,iBAAiB,SAE7CoB,oBAAa,CAACC,GAAG,GAEjB,oHAAoH;QACpH,kFAAkF;QAClFD,oBAAa,CAAC+C,IAAI;IACxB;AACF","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../src/client/app-dir/link.tsx"],"sourcesContent":["'use client'\n\nimport React, { createContext, useContext, useOptimistic, useRef } from 'react'\nimport type { UrlObject } from 'url'\nimport { formatUrl } from '../../shared/lib/router/utils/format-url'\nimport { AppRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useMergedRef } from '../use-merged-ref'\nimport { isAbsoluteUrl } from '../../shared/lib/utils'\nimport { addBasePath } from '../add-base-path'\nimport { ScrollBehavior } from '../components/router-reducer/router-reducer-types'\nimport type { PENDING_LINK_STATUS } from '../components/links'\nimport {\n IDLE_LINK_STATUS,\n mountLinkInstance,\n onNavigationIntent,\n unmountLinkForCurrentNavigation,\n unmountPrefetchableInstance,\n type LinkInstance,\n} from '../components/links'\nimport { isLocalURL } from '../../shared/lib/router/utils/is-local-url'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n} from '../components/segment-cache/types'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * **Required**. The path or URL to navigate to. It can also be an object (similar to `URL`).\n *\n * @example\n * ```tsx\n * // Navigate to /dashboard:\n * <Link href=\"/dashboard\">Dashboard</Link>\n *\n * // Navigate to /about?name=test:\n * <Link href={{ pathname: '/about', query: { name: 'test' } }}>\n * About\n * </Link>\n * ```\n *\n * @remarks\n * - For external URLs, use a fully qualified URL such as `https://...`.\n * - In the App Router, dynamic routes must not include bracketed segments in `href`.\n */\n href: Url\n\n /**\n * @deprecated v10.0.0: `href` props pointing to a dynamic route are\n * automatically resolved and no longer require the `as` prop.\n */\n as?: Url\n\n /**\n * Replace the current `history` state instead of adding a new URL into the stack.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" replace>\n * About (replaces the history state)\n * </Link>\n * ```\n */\n replace?: boolean\n\n /**\n * Whether to override the default scroll behavior. If `true`, Next.js attempts to maintain\n * the scroll position if the newly navigated page is still visible. If not, it scrolls to the top.\n *\n * If `false`, Next.js will not modify the scroll behavior at all.\n *\n * @defaultValue `true`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" scroll={false}>\n * No auto scroll\n * </Link>\n * ```\n */\n scroll?: boolean\n\n /**\n * Update the path of the current page without rerunning data fetching methods\n * like `getStaticProps`, `getServerSideProps`, or `getInitialProps`.\n *\n * @remarks\n * `shallow` only applies to the Pages Router. For the App Router, see the\n * [following documentation](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#using-the-native-history-api).\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/blog\" shallow>\n * Shallow navigation\n * </Link>\n * ```\n */\n shallow?: boolean\n\n /**\n * Forces `Link` to pass its `href` to the child component. Useful if the child is a custom\n * component that wraps an `<a>` tag, or if you're using certain styling libraries.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" passHref legacyBehavior>\n * <MyStyledAnchor>Dashboard</MyStyledAnchor>\n * </Link>\n * ```\n */\n passHref?: boolean\n\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`.\n *\n * @remarks\n * Prefetching is only enabled in production.\n *\n * - In the **App Router**:\n * - `\"auto\"`, `null`, `undefined` (default): Prefetch behavior depends on static vs dynamic routes:\n * - Static routes: fully prefetched\n * - Dynamic routes: partial prefetch to the nearest segment with a `loading.js`\n * - `true`: Always prefetch the full route and data.\n * - `false`: Disable prefetching on both viewport and hover.\n * - In the **Pages Router**:\n * - `true` (default): Prefetches the route and data in the background on viewport or hover.\n * - `false`: Prefetch only on hover, not on viewport.\n *\n * @defaultValue `true` (Pages Router) or `null` (App Router)\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" prefetch={false}>\n * Dashboard\n * </Link>\n * ```\n */\n prefetch?: boolean | 'auto' | null\n\n /**\n * (unstable) Switch to a full prefetch on hover. Effectively the same as\n * updating the prefetch prop to `true` in a mouse event.\n */\n unstable_dynamicOnHover?: boolean\n\n /**\n * The active locale is automatically prepended in the Pages Router. `locale` allows for providing\n * a different locale, or can be set to `false` to opt out of automatic locale behavior.\n *\n * @remarks\n * Note: locale only applies in the Pages Router and is ignored in the App Router.\n *\n * @example\n * ```tsx\n * // Use the 'fr' locale:\n * <Link href=\"/about\" locale=\"fr\">\n * About (French)\n * </Link>\n *\n * // Disable locale prefix:\n * <Link href=\"/about\" locale={false}>\n * About (no locale prefix)\n * </Link>\n * ```\n */\n locale?: string | false\n\n /**\n * Enable legacy link behavior.\n *\n * @deprecated This will be removed in a future version\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n\n /**\n * Optional event handler for when the mouse pointer is moved onto the `<Link>`.\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n\n /**\n * Transition types to apply when navigating. These types are passed to\n * [`React.addTransitionType`](https://react.dev/reference/react/addTransitionType)\n * inside the navigation transition, enabling\n * [`<ViewTransition>`](https://react.dev/reference/react/ViewTransition) components\n * to apply different animations based on the type of navigation.\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" transitionTypes={['slide-in']}>About</Link>\n * ```\n */\n transitionTypes?: string[]\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps<RouteInferType = any> = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<Omit<InternalLinkProps, 'locale'>>\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n href: string,\n linkInstanceRef: React.RefObject<LinkInstance | null>,\n replace?: boolean,\n scroll?: boolean,\n onNavigate?: OnNavigateEventHandler,\n transitionTypes?: string[]\n): void {\n if (typeof window !== 'undefined') {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n if (\n (isAnchorNodeName && isModifiedEvent(e)) ||\n e.currentTarget.hasAttribute('download')\n ) {\n // ignore click for browser’s default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n const { dispatchNavigateAction } =\n require('../components/app-router-instance') as typeof import('../components/app-router-instance')\n\n React.startTransition(() => {\n dispatchNavigateAction(\n href,\n replace ? 'replace' : 'push',\n scroll === false ? ScrollBehavior.NoScroll : ScrollBehavior.Default,\n linkInstanceRef.current,\n transitionTypes\n )\n })\n }\n}\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide\n * [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation. This is the primary way to navigate between routes in Next.js.\n *\n * @remarks\n * - Prefetching is only enabled in production.\n *\n * @see https://nextjs.org/docs/app/api-reference/components/link\n */\nexport default function LinkComponent(\n props: LinkProps & {\n children: React.ReactNode\n ref: React.Ref<HTMLAnchorElement>\n }\n) {\n const [linkStatus, setOptimisticLinkStatus] = useOptimistic(IDLE_LINK_STATUS)\n\n let children: React.ReactNode\n\n const linkInstanceRef = useRef<LinkInstance | null>(null)\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n onClick,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n onNavigate,\n transitionTypes,\n ref: forwardedRef,\n unstable_dynamicOnHover,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(AppRouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n const fetchStrategy =\n prefetchProp !== false\n ? getFetchStrategyFromPrefetchProp(prefetchProp)\n : // TODO: it makes no sense to assign a fetchStrategy when prefetching is disabled.\n FetchStrategy.PPR\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n unstable_dynamicOnHover: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n onNavigate: true,\n transitionTypes: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'legacyBehavior' ||\n key === 'unstable_dynamicOnHover'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\"`',\n actual: valType,\n })\n }\n } else if (key === 'transitionTypes') {\n if (props[key] != null && !Array.isArray(props[key])) {\n throw createPropError({\n key,\n expected: '`string[]`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n }\n\n const resolvedHref = asProp || hrefProp\n const formattedHref = formatStringOrUrl(resolvedHref)\n\n if (process.env.NODE_ENV !== 'production') {\n const { warnOnce } =\n require('../../shared/lib/utils/warn-once') as typeof import('../../shared/lib/utils/warn-once')\n if (props.locale) {\n warnOnce(\n 'The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'\n )\n }\n if (!asProp) {\n let href: string | undefined\n if (typeof resolvedHref === 'string') {\n href = resolvedHref\n } else if (\n typeof resolvedHref === 'object' &&\n typeof resolvedHref.pathname === 'string'\n ) {\n href = resolvedHref.pathname\n }\n\n if (href) {\n const hasDynamicSegment = href\n .split('/')\n .some((segment) => segment.startsWith('[') && segment.endsWith(']'))\n\n if (hasDynamicSegment) {\n throw new Error(\n `Dynamic href \\`${href}\\` found in <Link> while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`\n )\n }\n }\n }\n }\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if ((children as any)?.$$typeof === Symbol.for('react.lazy')) {\n throw new Error(\n `\\`<Link legacyBehavior>\\` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n // Capture the Owner Stack during render so dev-only warnings emitted later\n // at navigation time can be associated with the JSX that created\n // this <Link>.\n const ownerStack =\n process.env.NODE_ENV !== 'production' && process.env.__NEXT_CACHE_COMPONENTS\n ? // eslint-disable-next-line react-hooks/rules-of-hooks -- build time variables\n React.useMemo(() => {\n // Only capture when a warning might actually need it. Otherwise leave\n // it `undefined` so consumers can detect the opt-out and degrade\n // gracefully.\n if (fetchStrategy === FetchStrategy.Full) {\n return React.captureOwnerStack()\n }\n return undefined\n }, [fetchStrategy])\n : undefined\n\n // Use a callback ref to attach an IntersectionObserver to the anchor tag on\n // mount. In the future we will also use this to keep track of all the\n // currently mounted <Link> instances, e.g. so we can re-prefetch them after\n // a revalidation or refresh.\n const observeLinkVisibilityOnMount = React.useCallback(\n (element: HTMLAnchorElement | SVGAElement) => {\n if (router !== null) {\n linkInstanceRef.current = mountLinkInstance(\n element,\n formattedHref,\n router,\n fetchStrategy,\n prefetchEnabled,\n setOptimisticLinkStatus,\n ownerStack\n )\n }\n\n return () => {\n if (linkInstanceRef.current) {\n unmountLinkForCurrentNavigation(linkInstanceRef.current)\n linkInstanceRef.current = null\n }\n unmountPrefetchableInstance(element)\n }\n },\n [\n prefetchEnabled,\n formattedHref,\n router,\n fetchStrategy,\n setOptimisticLinkStatus,\n ownerStack,\n ]\n )\n\n const mergedRef = useMergedRef(observeLinkVisibilityOnMount, childRef)\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: mergedRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n if (e.defaultPrevented) {\n return\n }\n linkClicked(\n e,\n formattedHref,\n linkInstanceRef,\n replace,\n scroll,\n onNavigate,\n transitionTypes\n )\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled || process.env.NODE_ENV === 'development') {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled) {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the basePath.\n if (isAbsoluteUrl(formattedHref)) {\n childProps.href = formattedHref\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n childProps.href = addBasePath(formattedHref)\n }\n\n let link: React.ReactNode\n\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n const { errorOnce } =\n require('../../shared/lib/utils/error-once') as typeof import('../../shared/lib/utils/error-once')\n errorOnce(\n '`legacyBehavior` is deprecated and will be removed in a future ' +\n 'release. A codemod is available to upgrade your components:\\n\\n' +\n 'npx @next/codemod@latest new-link .\\n\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'\n )\n }\n link = React.cloneElement(child, childProps)\n } else {\n link = (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n\n return (\n <LinkStatusContext.Provider value={linkStatus}>\n {link}\n </LinkStatusContext.Provider>\n )\n}\n\nconst LinkStatusContext = createContext<\n typeof PENDING_LINK_STATUS | typeof IDLE_LINK_STATUS\n>(IDLE_LINK_STATUS)\n\nexport const useLinkStatus = () => {\n return useContext(LinkStatusContext)\n}\n\nfunction getFetchStrategyFromPrefetchProp(\n prefetchProp: Exclude<LinkProps['prefetch'], undefined | false>\n): PrefetchTaskFetchStrategy {\n if (process.env.__NEXT_CACHE_COMPONENTS) {\n if (prefetchProp === true) {\n return FetchStrategy.Full\n }\n\n // `null` or `\"auto\"`: this is the default \"auto\" mode, where we will prefetch partially if the link is in the viewport.\n // This will also include invalid prop values that don't match the types specified here.\n // (although those should've been filtered out by prop validation in dev)\n prefetchProp satisfies null | 'auto'\n return FetchStrategy.PPR\n } else {\n return prefetchProp === null || prefetchProp === 'auto'\n ? // We default to PPR, and we'll discover whether or not the route supports it with the initial prefetch.\n FetchStrategy.PPR\n : // In the old implementation without runtime prefetches, `prefetch={true}` forces all dynamic data to be prefetched.\n // To preserve backwards-compatibility, anything other than `false`, `null`, or `\"auto\"` results in a full prefetch.\n // (although invalid values should've been filtered out by prop validation in dev)\n FetchStrategy.Full\n }\n}\n"],"names":["LinkComponent","useLinkStatus","isModifiedEvent","event","eventTarget","currentTarget","target","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","href","linkInstanceRef","replace","scroll","onNavigate","transitionTypes","window","nodeName","isAnchorNodeName","toUpperCase","hasAttribute","isLocalURL","preventDefault","location","isDefaultPrevented","dispatchNavigateAction","require","React","startTransition","ScrollBehavior","NoScroll","Default","current","formatStringOrUrl","urlObjOrString","formatUrl","props","linkStatus","setOptimisticLinkStatus","useOptimistic","IDLE_LINK_STATUS","children","useRef","hrefProp","as","asProp","childrenProp","prefetch","prefetchProp","passHref","shallow","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","ref","forwardedRef","unstable_dynamicOnHover","restProps","a","router","useContext","AppRouterContext","prefetchEnabled","fetchStrategy","getFetchStrategyFromPrefetchProp","FetchStrategy","PPR","process","env","NODE_ENV","createPropError","args","Error","key","expected","actual","requiredPropsGuard","requiredProps","Object","keys","forEach","_","optionalPropsGuard","optionalProps","valType","Array","isArray","resolvedHref","formattedHref","warnOnce","locale","pathname","hasDynamicSegment","split","some","segment","startsWith","endsWith","child","$$typeof","Symbol","for","console","warn","Children","only","err","type","childRef","ownerStack","__NEXT_CACHE_COMPONENTS","useMemo","Full","captureOwnerStack","undefined","observeLinkVisibilityOnMount","useCallback","element","mountLinkInstance","unmountLinkForCurrentNavigation","unmountPrefetchableInstance","mergedRef","useMergedRef","childProps","defaultPrevented","upgradeToDynamicPrefetch","onNavigationIntent","__NEXT_LINK_NO_TOUCH_START","isAbsoluteUrl","addBasePath","link","errorOnce","cloneElement","LinkStatusContext","Provider","value","createContext"],"mappings":"AAAA;;;;;;;;;;;;;;;;IAoUA;;;;;;;;;CASC,GACD,OAycC;eAzcuBA;;IA+cXC,aAAa;eAAbA;;;;;iEA3xB2D;2BAE9C;+CACO;8BACJ;uBACC;6BACF;oCACG;uBASxB;4BACoB;uBAIpB;AAuNP,SAASC,gBAAgBC,KAAuB;IAC9C,MAAMC,cAAcD,MAAME,aAAa;IACvC,MAAMC,SAASF,YAAYG,YAAY,CAAC;IACxC,OACE,AAACD,UAAUA,WAAW,WACtBH,MAAMK,OAAO,IACbL,MAAMM,OAAO,IACbN,MAAMO,QAAQ,IACdP,MAAMQ,MAAM,IAAI,6BAA6B;IAC5CR,MAAMS,WAAW,IAAIT,MAAMS,WAAW,CAACC,KAAK,KAAK;AAEtD;AAEA,SAASC,YACPC,CAAmB,EACnBC,IAAY,EACZC,eAAqD,EACrDC,OAAiB,EACjBC,MAAgB,EAChBC,UAAmC,EACnCC,eAA0B;IAE1B,IAAI,OAAOC,WAAW,aAAa;QACjC,MAAM,EAAEC,QAAQ,EAAE,GAAGR,EAAE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Q;YACV4G,UACE,oEACE,oEACA,4CACA;QAEN;QACAD,qBAAO1G,cAAK,CAAC4G,YAAY,CAAClC,OAAOyB;IACnC,OAAO;QACLO,qBACE,qBAACxE;YAAG,GAAGD,SAAS;YAAG,GAAGkE,UAAU;sBAC7BrF;;IAGP;IAEA,qBACE,qBAAC+F,kBAAkBC,QAAQ;QAACC,OAAOrG;kBAChCgG;;AAGP;AAEA,MAAMG,kCAAoBG,IAAAA,oBAAa,EAErCnG,uBAAgB;AAEX,MAAM7C,gBAAgB;IAC3B,OAAOoE,IAAAA,iBAAU,EAACyE;AACpB;AAEA,SAASrE,iCACPnB,YAA+D;IAE/D,IAAIsB,QAAQC,GAAG,CAAC0C,uBAAuB,EAAE;QACvC,IAAIjE,iBAAiB,MAAM;YACzB,OAAOoB,oBAAa,CAAC+C,IAAI;QAC3B;QAEA,wHAAwH;QACxH,wFAAwF;QACxF,yEAAyE;QACzEnE;QACA,OAAOoB,oBAAa,CAACC,GAAG;IAC1B,OAAO;QACL,OAAOrB,iBAAiB,QAAQA,iBAAiB,SAE7CoB,oBAAa,CAACC,GAAG,GAEjB,oHAAoH;QACpH,kFAAkF;QAClFD,oBAAa,CAAC+C,IAAI;IACxB;AACF","ignoreList":[0]} |
@@ -17,3 +17,2 @@ 'use client'; | ||
| const _httpaccessfallback = require("./http-access-fallback"); | ||
| const _warnonce = require("../../../shared/lib/utils/warn-once"); | ||
| const _approutercontextsharedruntime = require("../../../shared/lib/app-router-context.shared-runtime"); | ||
@@ -31,6 +30,7 @@ class HTTPAccessFallbackErrorBoundary extends _react.default.Component { | ||
| !this.props.missingSlots.has('children')) { | ||
| const { warnOnce } = require('../../../shared/lib/utils/warn-once'); | ||
| let warningMessage = 'No default component was found for a parallel route rendered on this page. Falling back to nearest NotFound boundary.\n' + 'Learn more: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#defaultjs\n\n'; | ||
| const formattedSlots = Array.from(this.props.missingSlots).sort((a, b)=>a.localeCompare(b)).map((slot)=>`@${slot}`).join(', '); | ||
| warningMessage += 'Missing slots: ' + formattedSlots; | ||
| (0, _warnonce.warnOnce)(warningMessage); | ||
| warnOnce(warningMessage); | ||
| } | ||
@@ -37,0 +37,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../../src/client/components/http-access-fallback/error-boundary.tsx"],"sourcesContent":["'use client'\n\n/**\n * HTTPAccessFallbackBoundary is a boundary that catches errors and renders a\n * fallback component for HTTP errors.\n *\n * It receives the status code, and determine if it should render fallbacks for few HTTP 4xx errors.\n *\n * e.g. 404\n * 404 represents not found, and the fallback component pair contains the component and its styles.\n *\n */\n\nimport React, { useContext } from 'react'\nimport { useUntrackedPathname } from '../navigation-untracked'\nimport {\n HTTPAccessErrorStatus,\n getAccessFallbackHTTPStatus,\n getAccessFallbackErrorTypeByStatus,\n isHTTPAccessFallbackError,\n} from './http-access-fallback'\nimport { warnOnce } from '../../../shared/lib/utils/warn-once'\nimport { MissingSlotContext } from '../../../shared/lib/app-router-context.shared-runtime'\n\ninterface HTTPAccessFallbackBoundaryProps {\n notFound?: React.ReactNode\n forbidden?: React.ReactNode\n unauthorized?: React.ReactNode\n // TODO: Make this required once `React.createElement` understands that positional args go into children\n children?: React.ReactNode\n missingSlots?: Set<string>\n}\n\ninterface HTTPAccessFallbackErrorBoundaryProps\n extends HTTPAccessFallbackBoundaryProps {\n pathname: string | null\n missingSlots?: Set<string>\n}\n\ninterface HTTPAccessBoundaryState {\n triggeredStatus: number | undefined\n previousPathname: string | null\n}\n\nclass HTTPAccessFallbackErrorBoundary extends React.Component<\n HTTPAccessFallbackErrorBoundaryProps,\n HTTPAccessBoundaryState\n> {\n constructor(props: HTTPAccessFallbackErrorBoundaryProps) {\n super(props)\n this.state = {\n triggeredStatus: undefined,\n previousPathname: props.pathname,\n }\n }\n\n componentDidCatch(): void {\n if (\n process.env.NODE_ENV === 'development' &&\n this.props.missingSlots &&\n this.props.missingSlots.size > 0 &&\n // A missing children slot is the typical not-found case, so no need to warn\n !this.props.missingSlots.has('children')\n ) {\n let warningMessage =\n 'No default component was found for a parallel route rendered on this page. Falling back to nearest NotFound boundary.\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#defaultjs\\n\\n'\n\n const formattedSlots = Array.from(this.props.missingSlots)\n .sort((a, b) => a.localeCompare(b))\n .map((slot) => `@${slot}`)\n .join(', ')\n\n warningMessage += 'Missing slots: ' + formattedSlots\n\n warnOnce(warningMessage)\n }\n }\n\n static getDerivedStateFromError(error: unknown) {\n if (isHTTPAccessFallbackError(error)) {\n const httpStatus = getAccessFallbackHTTPStatus(error)\n return {\n triggeredStatus: httpStatus,\n }\n }\n // Re-throw if error is not for 404\n throw error\n }\n\n static getDerivedStateFromProps(\n props: HTTPAccessFallbackErrorBoundaryProps,\n state: HTTPAccessBoundaryState\n ): HTTPAccessBoundaryState | null {\n /**\n * Handles reset of the error boundary when a navigation happens.\n * Ensures the error boundary does not stay enabled when navigating to a new page.\n * Approach of setState in render is safe as it checks the previous pathname and then overrides\n * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\n if (props.pathname !== state.previousPathname && state.triggeredStatus) {\n return {\n triggeredStatus: undefined,\n previousPathname: props.pathname,\n }\n }\n return {\n triggeredStatus: state.triggeredStatus,\n previousPathname: props.pathname,\n }\n }\n\n render() {\n const { notFound, forbidden, unauthorized, children } = this.props\n const { triggeredStatus } = this.state\n const errorComponents = {\n [HTTPAccessErrorStatus.NOT_FOUND]: notFound,\n [HTTPAccessErrorStatus.FORBIDDEN]: forbidden,\n [HTTPAccessErrorStatus.UNAUTHORIZED]: unauthorized,\n }\n\n if (triggeredStatus) {\n const isNotFound =\n triggeredStatus === HTTPAccessErrorStatus.NOT_FOUND && notFound\n const isForbidden =\n triggeredStatus === HTTPAccessErrorStatus.FORBIDDEN && forbidden\n const isUnauthorized =\n triggeredStatus === HTTPAccessErrorStatus.UNAUTHORIZED && unauthorized\n\n // If there's no matched boundary in this layer, keep throwing the error by rendering the children\n if (!(isNotFound || isForbidden || isUnauthorized)) {\n return children\n }\n\n return (\n <>\n <meta name=\"robots\" content=\"noindex\" />\n {process.env.NODE_ENV === 'development' && (\n <meta\n name=\"boundary-next-error\"\n content={getAccessFallbackErrorTypeByStatus(triggeredStatus)}\n />\n )}\n {errorComponents[triggeredStatus]}\n </>\n )\n }\n\n return children\n }\n}\n\nexport function HTTPAccessFallbackBoundary({\n notFound,\n forbidden,\n unauthorized,\n children,\n}: HTTPAccessFallbackBoundaryProps) {\n // When we're rendering the missing params shell, this will return null. This\n // is because we won't be rendering any not found boundaries or error\n // boundaries for the missing params shell. When this runs on the client\n // (where these error can occur), we will get the correct pathname.\n const pathname = useUntrackedPathname()\n const missingSlots = useContext(MissingSlotContext)\n const hasErrorFallback = !!(notFound || forbidden || unauthorized)\n\n if (hasErrorFallback) {\n return (\n <HTTPAccessFallbackErrorBoundary\n pathname={pathname}\n notFound={notFound}\n forbidden={forbidden}\n unauthorized={unauthorized}\n missingSlots={missingSlots}\n >\n {children}\n </HTTPAccessFallbackErrorBoundary>\n )\n }\n\n return <>{children}</>\n}\n"],"names":["HTTPAccessFallbackBoundary","HTTPAccessFallbackErrorBoundary","React","Component","constructor","props","state","triggeredStatus","undefined","previousPathname","pathname","componentDidCatch","process","env","NODE_ENV","missingSlots","size","has","warningMessage","formattedSlots","Array","from","sort","a","b","localeCompare","map","slot","join","warnOnce","getDerivedStateFromError","error","isHTTPAccessFallbackError","httpStatus","getAccessFallbackHTTPStatus","getDerivedStateFromProps","render","notFound","forbidden","unauthorized","children","errorComponents","HTTPAccessErrorStatus","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","isNotFound","isForbidden","isUnauthorized","meta","name","content","getAccessFallbackErrorTypeByStatus","useUntrackedPathname","useContext","MissingSlotContext","hasErrorFallback"],"mappings":"AAAA;;;;;+BAwJgBA;;;eAAAA;;;;;iEA3IkB;qCACG;oCAM9B;0BACkB;+CACU;AAsBnC,MAAMC,wC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;IAEA,qBAAO;kBAAGA;;AACZ","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../../src/client/components/http-access-fallback/error-boundary.tsx"],"sourcesContent":["'use client'\n\n/**\n * HTTPAccessFallbackBoundary is a boundary that catches errors and renders a\n * fallback component for HTTP errors.\n *\n * It receives the status code, and determine if it should render fallbacks for few HTTP 4xx errors.\n *\n * e.g. 404\n * 404 represents not found, and the fallback component pair contains the component and its styles.\n *\n */\n\nimport React, { useContext } from 'react'\nimport { useUntrackedPathname } from '../navigation-untracked'\nimport {\n HTTPAccessErrorStatus,\n getAccessFallbackHTTPStatus,\n getAccessFallbackErrorTypeByStatus,\n isHTTPAccessFallbackError,\n} from './http-access-fallback'\nimport { MissingSlotContext } from '../../../shared/lib/app-router-context.shared-runtime'\n\ninterface HTTPAccessFallbackBoundaryProps {\n notFound?: React.ReactNode\n forbidden?: React.ReactNode\n unauthorized?: React.ReactNode\n // TODO: Make this required once `React.createElement` understands that positional args go into children\n children?: React.ReactNode\n missingSlots?: Set<string>\n}\n\ninterface HTTPAccessFallbackErrorBoundaryProps\n extends HTTPAccessFallbackBoundaryProps {\n pathname: string | null\n missingSlots?: Set<string>\n}\n\ninterface HTTPAccessBoundaryState {\n triggeredStatus: number | undefined\n previousPathname: string | null\n}\n\nclass HTTPAccessFallbackErrorBoundary extends React.Component<\n HTTPAccessFallbackErrorBoundaryProps,\n HTTPAccessBoundaryState\n> {\n constructor(props: HTTPAccessFallbackErrorBoundaryProps) {\n super(props)\n this.state = {\n triggeredStatus: undefined,\n previousPathname: props.pathname,\n }\n }\n\n componentDidCatch(): void {\n if (\n process.env.NODE_ENV === 'development' &&\n this.props.missingSlots &&\n this.props.missingSlots.size > 0 &&\n // A missing children slot is the typical not-found case, so no need to warn\n !this.props.missingSlots.has('children')\n ) {\n const { warnOnce } =\n require('../../../shared/lib/utils/warn-once') as typeof import('../../../shared/lib/utils/warn-once')\n let warningMessage =\n 'No default component was found for a parallel route rendered on this page. Falling back to nearest NotFound boundary.\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#defaultjs\\n\\n'\n\n const formattedSlots = Array.from(this.props.missingSlots)\n .sort((a, b) => a.localeCompare(b))\n .map((slot) => `@${slot}`)\n .join(', ')\n\n warningMessage += 'Missing slots: ' + formattedSlots\n\n warnOnce(warningMessage)\n }\n }\n\n static getDerivedStateFromError(error: unknown) {\n if (isHTTPAccessFallbackError(error)) {\n const httpStatus = getAccessFallbackHTTPStatus(error)\n return {\n triggeredStatus: httpStatus,\n }\n }\n // Re-throw if error is not for 404\n throw error\n }\n\n static getDerivedStateFromProps(\n props: HTTPAccessFallbackErrorBoundaryProps,\n state: HTTPAccessBoundaryState\n ): HTTPAccessBoundaryState | null {\n /**\n * Handles reset of the error boundary when a navigation happens.\n * Ensures the error boundary does not stay enabled when navigating to a new page.\n * Approach of setState in render is safe as it checks the previous pathname and then overrides\n * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\n if (props.pathname !== state.previousPathname && state.triggeredStatus) {\n return {\n triggeredStatus: undefined,\n previousPathname: props.pathname,\n }\n }\n return {\n triggeredStatus: state.triggeredStatus,\n previousPathname: props.pathname,\n }\n }\n\n render() {\n const { notFound, forbidden, unauthorized, children } = this.props\n const { triggeredStatus } = this.state\n const errorComponents = {\n [HTTPAccessErrorStatus.NOT_FOUND]: notFound,\n [HTTPAccessErrorStatus.FORBIDDEN]: forbidden,\n [HTTPAccessErrorStatus.UNAUTHORIZED]: unauthorized,\n }\n\n if (triggeredStatus) {\n const isNotFound =\n triggeredStatus === HTTPAccessErrorStatus.NOT_FOUND && notFound\n const isForbidden =\n triggeredStatus === HTTPAccessErrorStatus.FORBIDDEN && forbidden\n const isUnauthorized =\n triggeredStatus === HTTPAccessErrorStatus.UNAUTHORIZED && unauthorized\n\n // If there's no matched boundary in this layer, keep throwing the error by rendering the children\n if (!(isNotFound || isForbidden || isUnauthorized)) {\n return children\n }\n\n return (\n <>\n <meta name=\"robots\" content=\"noindex\" />\n {process.env.NODE_ENV === 'development' && (\n <meta\n name=\"boundary-next-error\"\n content={getAccessFallbackErrorTypeByStatus(triggeredStatus)}\n />\n )}\n {errorComponents[triggeredStatus]}\n </>\n )\n }\n\n return children\n }\n}\n\nexport function HTTPAccessFallbackBoundary({\n notFound,\n forbidden,\n unauthorized,\n children,\n}: HTTPAccessFallbackBoundaryProps) {\n // When we're rendering the missing params shell, this will return null. This\n // is because we won't be rendering any not found boundaries or error\n // boundaries for the missing params shell. When this runs on the client\n // (where these error can occur), we will get the correct pathname.\n const pathname = useUntrackedPathname()\n const missingSlots = useContext(MissingSlotContext)\n const hasErrorFallback = !!(notFound || forbidden || unauthorized)\n\n if (hasErrorFallback) {\n return (\n <HTTPAccessFallbackErrorBoundary\n pathname={pathname}\n notFound={notFound}\n forbidden={forbidden}\n unauthorized={unauthorized}\n missingSlots={missingSlots}\n >\n {children}\n </HTTPAccessFallbackErrorBoundary>\n )\n }\n\n return <>{children}</>\n}\n"],"names":["HTTPAccessFallbackBoundary","HTTPAccessFallbackErrorBoundary","React","Component","constructor","props","state","triggeredStatus","undefined","previousPathname","pathname","componentDidCatch","process","env","NODE_ENV","missingSlots","size","has","warnOnce","require","warningMessage","formattedSlots","Array","from","sort","a","b","localeCompare","map","slot","join","getDerivedStateFromError","error","isHTTPAccessFallbackError","httpStatus","getAccessFallbackHTTPStatus","getDerivedStateFromProps","render","notFound","forbidden","unauthorized","children","errorComponents","HTTPAccessErrorStatus","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","isNotFound","isForbidden","isUnauthorized","meta","name","content","getAccessFallbackErrorTypeByStatus","useUntrackedPathname","useContext","MissingSlotContext","hasErrorFallback"],"mappings":"AAAA;;;;;+BAyJgBA;;;eAAAA;;;;;iEA5IkB;qCACG;oCAM9B;+CAC4B;AAsBnC,MAAMC,wCAAwCC,cAAK,CAACC,SAAS;IAI3DC,YAAYC,KAA2C,CAAE;QACvD,KAAK,CAACA;QACN,IAAI,CAACC,KAA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 'use client'; | ||
| const _imageconfigcontextsharedruntime = require("../shared/lib/image-config-context.shared-runtime"); | ||
| const _warnonce = require("../shared/lib/utils/warn-once"); | ||
| const _routercontextsharedruntime = require("../shared/lib/router-context.shared-runtime"); | ||
@@ -86,2 +85,3 @@ const _imageloader = /*#__PURE__*/ _interop_require_default._(require("next/dist/shared/lib/image-loader")); | ||
| if (process.env.NODE_ENV !== 'production') { | ||
| const { warnOnce } = require('../shared/lib/utils/warn-once'); | ||
| const origSrc = new URL(src, 'http://n').searchParams.get('url') || src; | ||
@@ -93,5 +93,5 @@ if (img.getAttribute('data-nimg') === 'fill') { | ||
| if (sizesInput === '100vw') { | ||
| (0, _warnonce.warnOnce)(`Image with src "${origSrc}" has "fill" prop and "sizes" prop of "100vw", but image is not rendered at full viewport width. Please adjust "sizes" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`); | ||
| warnOnce(`Image with src "${origSrc}" has "fill" prop and "sizes" prop of "100vw", but image is not rendered at full viewport width. Please adjust "sizes" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`); | ||
| } else { | ||
| (0, _warnonce.warnOnce)(`Image with src "${origSrc}" has "fill" but is missing "sizes" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`); | ||
| warnOnce(`Image with src "${origSrc}" has "fill" but is missing "sizes" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`); | ||
| } | ||
@@ -108,7 +108,7 @@ } | ||
| if (!valid.includes(position)) { | ||
| (0, _warnonce.warnOnce)(`Image with src "${origSrc}" has "fill" and parent element with invalid "position". Provided "${position}" should be one of ${valid.map(String).join(',')}.`); | ||
| warnOnce(`Image with src "${origSrc}" has "fill" and parent element with invalid "position". Provided "${position}" should be one of ${valid.map(String).join(',')}.`); | ||
| } | ||
| } | ||
| if (img.height === 0) { | ||
| (0, _warnonce.warnOnce)(`Image with src "${origSrc}" has "fill" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.`); | ||
| warnOnce(`Image with src "${origSrc}" has "fill" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.`); | ||
| } | ||
@@ -119,3 +119,3 @@ } | ||
| if (heightModified && !widthModified || !heightModified && widthModified) { | ||
| (0, _warnonce.warnOnce)(`Image with src "${origSrc}" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: "auto"' or 'height: "auto"' to maintain the aspect ratio.`); | ||
| warnOnce(`Image with src "${origSrc}" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: "auto"' or 'height: "auto"' to maintain the aspect ratio.`); | ||
| } | ||
@@ -122,0 +122,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../src/client/image-component.tsx"],"sourcesContent":["'use client'\n\nimport React, {\n useRef,\n useEffect,\n useContext,\n useMemo,\n useState,\n forwardRef,\n use,\n useLayoutEffect,\n} from 'react'\nimport ReactDOM from 'react-dom'\nimport Head from '../shared/lib/head'\nimport { getImgProps } from '../shared/lib/get-img-props'\nimport type {\n ImageProps,\n ImgProps,\n OnLoad,\n OnLoadingComplete,\n PlaceholderValue,\n} from '../shared/lib/get-img-props'\nimport type {\n ImageConfigComplete,\n ImageLoaderProps,\n} from '../shared/lib/image-config'\nimport { imageConfigDefault } from '../shared/lib/image-config'\nimport { ImageConfigContext } from '../shared/lib/image-config-context.shared-runtime'\nimport { warnOnce } from '../shared/lib/utils/warn-once'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\n\n// This is replaced by webpack alias\nimport defaultLoader from 'next/dist/shared/lib/image-loader'\nimport { useMergedRef } from './use-merged-ref'\n\n// This is replaced by webpack define plugin\nconst configEnv = process.env.__NEXT_IMAGE_OPTS as any as ImageConfigComplete\n\nif (typeof window === 'undefined') {\n ;(globalThis as any).__NEXT_IMAGE_IMPORTED = true\n}\n\nexport type { ImageLoaderProps }\nexport type ImageLoader = (p: ImageLoaderProps) => string\n\ntype ImgElementWithDataProp = HTMLImageElement & {\n 'data-loaded-src'?: string | undefined\n}\n\ntype ImageElementProps = ImgProps & {\n unoptimized: boolean\n placeholder: PlaceholderValue\n onLoadRef: React.MutableRefObject<OnLoad | undefined>\n onLoadingCompleteRef: React.MutableRefObject<OnLoadingComplete | undefined>\n setBlurComplete: (b: boolean) => void\n setShowAltText: (b: boolean) => void\n sizesInput: string | undefined\n}\n\n// See https://stackoverflow.com/q/39777833/266535 for why we use this ref\n// handler instead of the img's onLoad attribute.\nfunction handleLoading(\n img: ImgElementWithDataProp,\n placeholder: PlaceholderValue,\n onLoadRef: React.MutableRefObject<OnLoad | undefined>,\n onLoadingCompleteRef: React.MutableRefObject<OnLoadingComplete | undefined>,\n setBlurComplete: (b: boolean) => void,\n unoptimized: boolean,\n sizesInput: string | undefined\n) {\n const src = img?.src\n if (!img || img['data-loaded-src'] === src) {\n return\n }\n img['data-loaded-src'] = src\n const p = 'decode' in img ? img.decode() : Promise.resolve()\n p.catch(() => {}).then(() => {\n if (!img.parentElement || !img.isConnected) {\n // Exit early in case of race condition:\n // - onload() is called\n // - decode() is called but incomplete\n // - unmount is called\n // - decode() completes\n return\n }\n if (placeholder !== 'empty') {\n setBlurComplete(true)\n }\n if (onLoadRef?.current) {\n // Since we don't have the SyntheticEvent here,\n // we must create one with the same shape.\n // See https://reactjs.org/docs/events.html\n const event = new Event('load')\n Object.defineProperty(event, 'target', { writable: false, value: img })\n let prevented = false\n let stopped = false\n onLoadRef.current({\n ...event,\n nativeEvent: event,\n currentTarget: img,\n target: img,\n isDefaultPrevented: () => prevented,\n isPropagationStopped: () => stopped,\n persist: () => {},\n preventDefault: () => {\n prevented = true\n event.preventDefault()\n },\n stopPropagation: () => {\n stopped = true\n event.stopPropagation()\n },\n })\n }\n if (onLoadingCompleteRef?.current) {\n onLoadingCompleteRef.current(img)\n }\n if (process.env.NODE_ENV !== 'production') {\n const origSrc = new URL(src, 'http://n').searchParams.get('url') || src\n if (img.getAttribute('data-nimg') === 'fill') {\n if (!unoptimized && (!sizesInput || sizesInput === '100vw')) {\n let widthViewportRatio =\n img.getBoundingClientRect().width / window.innerWidth\n if (widthViewportRatio < 0.6) {\n if (sizesInput === '100vw') {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" prop and \"sizes\" prop of \"100vw\", but image is not rendered at full viewport width. Please adjust \"sizes\" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`\n )\n } else {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" but is missing \"sizes\" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`\n )\n }\n }\n }\n if (img.parentElement) {\n const { position } = window.getComputedStyle(img.parentElement)\n const valid = ['absolute', 'fixed', 'relative']\n if (!valid.includes(position)) {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" and parent element with invalid \"position\". Provided \"${position}\" should be one of ${valid\n .map(String)\n .join(',')}.`\n )\n }\n }\n if (img.height === 0) {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.`\n )\n }\n }\n\n const heightModified =\n img.height.toString() !== img.getAttribute('height')\n const widthModified = img.width.toString() !== img.getAttribute('width')\n if (\n (heightModified && !widthModified) ||\n (!heightModified && widthModified)\n ) {\n warnOnce(\n `Image with src \"${origSrc}\" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: \"auto\"' or 'height: \"auto\"' to maintain the aspect ratio.`\n )\n }\n }\n })\n}\n\nfunction getDynamicProps(\n fetchPriority?: string\n): Record<string, string | undefined> {\n if (Boolean(use)) {\n // In React 19.0.0 or newer, we must use camelCase\n // prop to avoid \"Warning: Invalid DOM property\".\n // See https://github.com/facebook/react/pull/25927\n return { fetchPriority }\n }\n // In React 18.2.0 or older, we must use lowercase prop\n // to avoid \"Warning: Invalid DOM property\".\n return { fetchpriority: fetchPriority }\n}\n\n/**\n * A version of useLayoutEffect that doesn't warn during SSR.\n * TODO: Just useLayoutEffect once support for React 18 is dropped.\n * Do not rename this to \"isomorphic layout effect\". There is no such thing as\n * an isomorphic Layout Effect since there is no Layout on the server\n */\nconst useNonWarningLayoutEffect =\n typeof window === 'undefined' ? useEffect : useLayoutEffect\n\nconst ImageElement = forwardRef<HTMLImageElement | null, ImageElementProps>(\n (\n {\n src,\n srcSet,\n sizes,\n height,\n width,\n decoding,\n className,\n style,\n fetchPriority,\n placeholder,\n loading,\n unoptimized,\n fill,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n setShowAltText,\n sizesInput,\n onLoad,\n onError,\n ...rest\n },\n forwardedRef\n ) => {\n const didInsertRef = useRef(false)\n const insertedImgRef = useRef<HTMLImageElement>(null)\n\n useNonWarningLayoutEffect(() => {\n const { current: didInsert } = didInsertRef\n const { current: img } = insertedImgRef\n\n if (!didInsert && img !== null) {\n // Replay events from during hydration that React doesn't replay.\n if (onError) {\n // If the image has an error before react hydrates, then the error is lost.\n // The workaround is to wait until the image is mounted which is after hydration,\n // then we set the src again to trigger the error handler (if there was an error).\n // This doesn't just trigger the error handler but retries the whole request.\n // TODO: Consider dispatching a synthetic event instead.\n // eslint-disable-next-line no-self-assign\n img.src = img.src\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!src) {\n console.error(`Image is missing required \"src\" property:`, img)\n }\n if (img.getAttribute('alt') === null) {\n console.error(\n `Image is missing required \"alt\" property. Please add Alternative Text to describe the image for screen readers and search engines.`\n )\n }\n }\n if (img.complete) {\n handleLoading(\n img,\n placeholder,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n unoptimized,\n sizesInput\n )\n }\n didInsertRef.current = true\n }\n }, [\n src,\n placeholder,\n onLoadRef,\n onLoadingCompleteRef,\n onError,\n unoptimized,\n sizesInput,\n ])\n\n const ref = useMergedRef(forwardedRef, insertedImgRef)\n\n return (\n // If you move this element creation, also move the Layout Effect above\n // reading from the ref. Otherwise we might run the Layout Effect when\n // the current value isn't set to the HTMLImageElement instance.\n <img\n {...rest}\n {...getDynamicProps(fetchPriority)}\n // It's intended to keep `loading` before `src` because React updates\n // props in order which causes Safari/Firefox to not lazy load properly.\n // See https://github.com/facebook/react/issues/25883\n loading={loading}\n width={width}\n height={height}\n decoding={decoding}\n data-nimg={fill ? 'fill' : '1'}\n className={className}\n style={style}\n // It's intended to keep `src` the last attribute because React updates\n // attributes in order. If we keep `src` the first one, Safari will\n // immediately start to fetch `src`, before `sizes` and `srcSet` are even\n // updated by React. That causes multiple unnecessary requests if `srcSet`\n // and `sizes` are defined.\n // This bug cannot be reproduced in Chrome or Firefox.\n sizes={sizes}\n srcSet={srcSet}\n src={src}\n ref={ref}\n onLoad={(event) => {\n const currentImage = event.currentTarget\n handleLoading(\n currentImage,\n placeholder,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n unoptimized,\n sizesInput\n )\n }}\n onError={(event) => {\n // if the real image fails to load, this will ensure \"alt\" is visible\n setShowAltText(true)\n if (placeholder !== 'empty') {\n // If the real image fails to load, this will still remove the placeholder.\n setBlurComplete(true)\n }\n if (onError) {\n onError(event)\n }\n }}\n />\n )\n }\n)\n\nfunction ImagePreload({\n isAppRouter,\n imgAttributes,\n}: {\n isAppRouter: boolean\n imgAttributes: ImgProps\n}) {\n const opts: ReactDOM.PreloadOptions = {\n as: 'image',\n imageSrcSet: imgAttributes.srcSet,\n imageSizes: imgAttributes.sizes,\n crossOrigin: imgAttributes.crossOrigin,\n referrerPolicy: imgAttributes.referrerPolicy,\n ...getDynamicProps(imgAttributes.fetchPriority),\n }\n\n if (isAppRouter && ReactDOM.preload) {\n ReactDOM.preload(imgAttributes.src, opts)\n return null\n }\n\n return (\n <Head>\n <link\n key={\n '__nimg-' +\n imgAttributes.src +\n imgAttributes.srcSet +\n imgAttributes.sizes\n }\n rel=\"preload\"\n // Note how we omit the `href` attribute, as it would only be relevant\n // for browsers that do not support `imagesrcset`, and in those cases\n // it would cause the incorrect image to be preloaded.\n //\n // https://html.spec.whatwg.org/multipage/semantics.html#attr-link-imagesrcset\n href={imgAttributes.srcSet ? undefined : imgAttributes.src}\n {...opts}\n />\n </Head>\n )\n}\n\n/**\n * The `Image` component is used to optimize images.\n *\n * Read more: [Next.js docs: `Image`](https://nextjs.org/docs/app/api-reference/components/image)\n */\nexport const Image = forwardRef<HTMLImageElement | null, ImageProps>(\n (props, forwardedRef) => {\n const pagesRouter = useContext(RouterContext)\n // We're in the app directory if there is no pages router.\n const isAppRouter = !pagesRouter\n\n const configContext = useContext(ImageConfigContext)\n const config = useMemo(() => {\n const c = configEnv || configContext || imageConfigDefault\n\n const allSizes = [...c.deviceSizes, ...c.imageSizes].sort((a, b) => a - b)\n const deviceSizes = c.deviceSizes.sort((a, b) => a - b)\n const qualities = c.qualities?.sort((a, b) => a - b)\n return {\n ...c,\n allSizes,\n deviceSizes,\n qualities,\n // During the SSR, configEnv (__NEXT_IMAGE_OPTS) does not include\n // security sensitive configs like `localPatterns`, which is needed\n // during the server render to ensure it's validated. Therefore use\n // configContext, which holds the config from the server for validation.\n localPatterns:\n typeof window === 'undefined'\n ? configContext?.localPatterns\n : c.localPatterns,\n }\n }, [configContext])\n\n const { onLoad, onLoadingComplete } = props\n const onLoadRef = useRef(onLoad)\n\n useEffect(() => {\n onLoadRef.current = onLoad\n }, [onLoad])\n\n const onLoadingCompleteRef = useRef(onLoadingComplete)\n\n useEffect(() => {\n onLoadingCompleteRef.current = onLoadingComplete\n }, [onLoadingComplete])\n\n const [blurComplete, setBlurComplete] = useState(false)\n const [showAltText, setShowAltText] = useState(false)\n const { props: imgAttributes, meta: imgMeta } = getImgProps(props, {\n defaultLoader,\n imgConf: config,\n blurComplete,\n showAltText,\n })\n\n return (\n <>\n {\n <ImageElement\n {...imgAttributes}\n unoptimized={imgMeta.unoptimized}\n placeholder={imgMeta.placeholder}\n fill={imgMeta.fill}\n onLoadRef={onLoadRef}\n onLoadingCompleteRef={onLoadingCompleteRef}\n setBlurComplete={setBlurComplete}\n setShowAltText={setShowAltText}\n sizesInput={props.sizes}\n ref={forwardedRef}\n />\n }\n {imgMeta.preload ? (\n <ImagePreload\n isAppRouter={isAppRouter}\n imgAttributes={imgAttributes}\n />\n ) : null}\n </>\n )\n }\n)\n"],"names":["Image","configEnv","process","env","__NEXT_IMAGE_OPTS","window","globalThis","__NEXT_IMAGE_IMPORTED","handleLoading","img","placeholder","onLoadRef","onLoadingCompleteRef","setBlurComplete","unoptimized","sizesInput","src","p","decode","Promise","resolve","catch","then","parentElement","isConnected","current","event","Event","Object","defineProperty","writable","value","prevented","stopped","nativeEvent","currentTarget","target","isDefaultPrevented","isPropagationStopped","persist","preventDefault","stopPropagation","NODE_ENV","origSrc","URL","searchParams","get","getAttribute","widthViewportRatio","getBoundingClientRect","width","innerWidth","warnOnce","position","getComputedStyle","valid","includes","map","String","join","height","heightModified","toString","widthModified","getDynamicProps","fetchPriority","Boolean","use","fetchpriority","useNonWarningLayoutEffect","useEffect","useLayoutEffect","ImageElement","forwardRef","srcSet","sizes","decoding","className","style","loading","fill","setShowAltText","onLoad","onError","rest","forwardedRef","didInsertRef","useRef","insertedImgRef","didInsert","console","error","complete","ref","useMergedRef","data-nimg","currentImage","ImagePreload","isAppRouter","imgAttributes","opts","as","imageSrcSet","imageSizes","crossOrigin","referrerPolicy","ReactDOM","preload","Head","link","rel","href","undefined","props","pagesRouter","useContext","RouterContext","configContext","ImageConfigContext","config","useMemo","c","imageConfigDefault","allSizes","deviceSizes","sort","a","b","qualities","localPatterns","onLoadingComplete","blurComplete","useState","showAltText","meta","imgMeta","getImgProps","defaultLoader","imgConf"],"mappings":"AAAA;;;;;+BAuXaA;;;eAAAA;;;;;;iEA5WN;mEACc;+DACJ;6BACW;6BAYO;iDACA;0BACV;4CACK;sEAGJ;8BACG;AAE7B,4CAA4C;AAC5C,MAAMC,YAAYC,QAAQC,GAAG,CAACC,iBAAiB;AAE/C,IAAI,OAAOC,WAAW,aAAa;;IAC/BC,WAAmBC,qBAAqB,GAAG;AAC/C;AAmBA,0EAA0E;AAC1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Z;KAAc;IAElB,MAAM,EAAEnC,MAAM,EAAEgD,iBAAiB,EAAE,GAAGjB;IACtC,MAAMtG,YAAY4E,IAAAA,aAAM,EAACL;IAEzBZ,IAAAA,gBAAS,EAAC;QACR3D,UAAUc,OAAO,GAAGyD;IACtB,GAAG;QAACA;KAAO;IAEX,MAAMtE,uBAAuB2E,IAAAA,aAAM,EAAC2C;IAEpC5D,IAAAA,gBAAS,EAAC;QACR1D,qBAAqBa,OAAO,GAAGyG;IACjC,GAAG;QAACA;KAAkB;IAEtB,MAAM,CAACC,cAActH,gBAAgB,GAAGuH,IAAAA,eAAQ,EAAC;IACjD,MAAM,CAACC,aAAapD,eAAe,GAAGmD,IAAAA,eAAQ,EAAC;IAC/C,MAAM,EAAEnB,OAAOd,aAAa,EAAEmC,MAAMC,OAAO,EAAE,GAAGC,IAAAA,wBAAW,EAACvB,OAAO;QACjEwB,eAAAA,oBAAa;QACbC,SAASnB;QACTY;QACAE;IACF;IAEA,qBACE;;0BAEI,qBAAC7D;gBACE,GAAG2B,aAAa;gBACjBrF,aAAayH,QAAQzH,WAAW;gBAChCJ,aAAa6H,QAAQ7H,WAAW;gBAChCsE,MAAMuD,QAAQvD,IAAI;gBAClBrE,WAAWA;gBACXC,sBAAsBA;gBACtBC,iBAAiBA;gBACjBoE,gBAAgBA;gBAChBlE,YAAYkG,MAAMtC,KAAK;gBACvBkB,KAAKR;;YAGRkD,QAAQ5B,OAAO,iBACd,qBAACV;gBACCC,aAAaA;gBACbC,eAAeA;iBAEf;;;AAGV","ignoreList":[0]} | ||
| {"version":3,"sources":["../../src/client/image-component.tsx"],"sourcesContent":["'use client'\n\nimport React, {\n useRef,\n useEffect,\n useContext,\n useMemo,\n useState,\n forwardRef,\n use,\n useLayoutEffect,\n} from 'react'\nimport ReactDOM from 'react-dom'\nimport Head from '../shared/lib/head'\nimport { getImgProps } from '../shared/lib/get-img-props'\nimport type {\n ImageProps,\n ImgProps,\n OnLoad,\n OnLoadingComplete,\n PlaceholderValue,\n} from '../shared/lib/get-img-props'\nimport type {\n ImageConfigComplete,\n ImageLoaderProps,\n} from '../shared/lib/image-config'\nimport { imageConfigDefault } from '../shared/lib/image-config'\nimport { ImageConfigContext } from '../shared/lib/image-config-context.shared-runtime'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\n\n// This is replaced by webpack alias\nimport defaultLoader from 'next/dist/shared/lib/image-loader'\nimport { useMergedRef } from './use-merged-ref'\n\n// This is replaced by webpack define plugin\nconst configEnv = process.env.__NEXT_IMAGE_OPTS as any as ImageConfigComplete\n\nif (typeof window === 'undefined') {\n ;(globalThis as any).__NEXT_IMAGE_IMPORTED = true\n}\n\nexport type { ImageLoaderProps }\nexport type ImageLoader = (p: ImageLoaderProps) => string\n\ntype ImgElementWithDataProp = HTMLImageElement & {\n 'data-loaded-src'?: string | undefined\n}\n\ntype ImageElementProps = ImgProps & {\n unoptimized: boolean\n placeholder: PlaceholderValue\n onLoadRef: React.MutableRefObject<OnLoad | undefined>\n onLoadingCompleteRef: React.MutableRefObject<OnLoadingComplete | undefined>\n setBlurComplete: (b: boolean) => void\n setShowAltText: (b: boolean) => void\n sizesInput: string | undefined\n}\n\n// See https://stackoverflow.com/q/39777833/266535 for why we use this ref\n// handler instead of the img's onLoad attribute.\nfunction handleLoading(\n img: ImgElementWithDataProp,\n placeholder: PlaceholderValue,\n onLoadRef: React.MutableRefObject<OnLoad | undefined>,\n onLoadingCompleteRef: React.MutableRefObject<OnLoadingComplete | undefined>,\n setBlurComplete: (b: boolean) => void,\n unoptimized: boolean,\n sizesInput: string | undefined\n) {\n const src = img?.src\n if (!img || img['data-loaded-src'] === src) {\n return\n }\n img['data-loaded-src'] = src\n const p = 'decode' in img ? img.decode() : Promise.resolve()\n p.catch(() => {}).then(() => {\n if (!img.parentElement || !img.isConnected) {\n // Exit early in case of race condition:\n // - onload() is called\n // - decode() is called but incomplete\n // - unmount is called\n // - decode() completes\n return\n }\n if (placeholder !== 'empty') {\n setBlurComplete(true)\n }\n if (onLoadRef?.current) {\n // Since we don't have the SyntheticEvent here,\n // we must create one with the same shape.\n // See https://reactjs.org/docs/events.html\n const event = new Event('load')\n Object.defineProperty(event, 'target', { writable: false, value: img })\n let prevented = false\n let stopped = false\n onLoadRef.current({\n ...event,\n nativeEvent: event,\n currentTarget: img,\n target: img,\n isDefaultPrevented: () => prevented,\n isPropagationStopped: () => stopped,\n persist: () => {},\n preventDefault: () => {\n prevented = true\n event.preventDefault()\n },\n stopPropagation: () => {\n stopped = true\n event.stopPropagation()\n },\n })\n }\n if (onLoadingCompleteRef?.current) {\n onLoadingCompleteRef.current(img)\n }\n if (process.env.NODE_ENV !== 'production') {\n const { warnOnce } =\n require('../shared/lib/utils/warn-once') as typeof import('../shared/lib/utils/warn-once')\n const origSrc = new URL(src, 'http://n').searchParams.get('url') || src\n if (img.getAttribute('data-nimg') === 'fill') {\n if (!unoptimized && (!sizesInput || sizesInput === '100vw')) {\n let widthViewportRatio =\n img.getBoundingClientRect().width / window.innerWidth\n if (widthViewportRatio < 0.6) {\n if (sizesInput === '100vw') {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" prop and \"sizes\" prop of \"100vw\", but image is not rendered at full viewport width. Please adjust \"sizes\" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`\n )\n } else {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" but is missing \"sizes\" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`\n )\n }\n }\n }\n if (img.parentElement) {\n const { position } = window.getComputedStyle(img.parentElement)\n const valid = ['absolute', 'fixed', 'relative']\n if (!valid.includes(position)) {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" and parent element with invalid \"position\". Provided \"${position}\" should be one of ${valid\n .map(String)\n .join(',')}.`\n )\n }\n }\n if (img.height === 0) {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.`\n )\n }\n }\n\n const heightModified =\n img.height.toString() !== img.getAttribute('height')\n const widthModified = img.width.toString() !== img.getAttribute('width')\n if (\n (heightModified && !widthModified) ||\n (!heightModified && widthModified)\n ) {\n warnOnce(\n `Image with src \"${origSrc}\" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: \"auto\"' or 'height: \"auto\"' to maintain the aspect ratio.`\n )\n }\n }\n })\n}\n\nfunction getDynamicProps(\n fetchPriority?: string\n): Record<string, string | undefined> {\n if (Boolean(use)) {\n // In React 19.0.0 or newer, we must use camelCase\n // prop to avoid \"Warning: Invalid DOM property\".\n // See https://github.com/facebook/react/pull/25927\n return { fetchPriority }\n }\n // In React 18.2.0 or older, we must use lowercase prop\n // to avoid \"Warning: Invalid DOM property\".\n return { fetchpriority: fetchPriority }\n}\n\n/**\n * A version of useLayoutEffect that doesn't warn during SSR.\n * TODO: Just useLayoutEffect once support for React 18 is dropped.\n * Do not rename this to \"isomorphic layout effect\". There is no such thing as\n * an isomorphic Layout Effect since there is no Layout on the server\n */\nconst useNonWarningLayoutEffect =\n typeof window === 'undefined' ? useEffect : useLayoutEffect\n\nconst ImageElement = forwardRef<HTMLImageElement | null, ImageElementProps>(\n (\n {\n src,\n srcSet,\n sizes,\n height,\n width,\n decoding,\n className,\n style,\n fetchPriority,\n placeholder,\n loading,\n unoptimized,\n fill,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n setShowAltText,\n sizesInput,\n onLoad,\n onError,\n ...rest\n },\n forwardedRef\n ) => {\n const didInsertRef = useRef(false)\n const insertedImgRef = useRef<HTMLImageElement>(null)\n\n useNonWarningLayoutEffect(() => {\n const { current: didInsert } = didInsertRef\n const { current: img } = insertedImgRef\n\n if (!didInsert && img !== null) {\n // Replay events from during hydration that React doesn't replay.\n if (onError) {\n // If the image has an error before react hydrates, then the error is lost.\n // The workaround is to wait until the image is mounted which is after hydration,\n // then we set the src again to trigger the error handler (if there was an error).\n // This doesn't just trigger the error handler but retries the whole request.\n // TODO: Consider dispatching a synthetic event instead.\n // eslint-disable-next-line no-self-assign\n img.src = img.src\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!src) {\n console.error(`Image is missing required \"src\" property:`, img)\n }\n if (img.getAttribute('alt') === null) {\n console.error(\n `Image is missing required \"alt\" property. Please add Alternative Text to describe the image for screen readers and search engines.`\n )\n }\n }\n if (img.complete) {\n handleLoading(\n img,\n placeholder,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n unoptimized,\n sizesInput\n )\n }\n didInsertRef.current = true\n }\n }, [\n src,\n placeholder,\n onLoadRef,\n onLoadingCompleteRef,\n onError,\n unoptimized,\n sizesInput,\n ])\n\n const ref = useMergedRef(forwardedRef, insertedImgRef)\n\n return (\n // If you move this element creation, also move the Layout Effect above\n // reading from the ref. Otherwise we might run the Layout Effect when\n // the current value isn't set to the HTMLImageElement instance.\n <img\n {...rest}\n {...getDynamicProps(fetchPriority)}\n // It's intended to keep `loading` before `src` because React updates\n // props in order which causes Safari/Firefox to not lazy load properly.\n // See https://github.com/facebook/react/issues/25883\n loading={loading}\n width={width}\n height={height}\n decoding={decoding}\n data-nimg={fill ? 'fill' : '1'}\n className={className}\n style={style}\n // It's intended to keep `src` the last attribute because React updates\n // attributes in order. If we keep `src` the first one, Safari will\n // immediately start to fetch `src`, before `sizes` and `srcSet` are even\n // updated by React. That causes multiple unnecessary requests if `srcSet`\n // and `sizes` are defined.\n // This bug cannot be reproduced in Chrome or Firefox.\n sizes={sizes}\n srcSet={srcSet}\n src={src}\n ref={ref}\n onLoad={(event) => {\n const currentImage = event.currentTarget\n handleLoading(\n currentImage,\n placeholder,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n unoptimized,\n sizesInput\n )\n }}\n onError={(event) => {\n // if the real image fails to load, this will ensure \"alt\" is visible\n setShowAltText(true)\n if (placeholder !== 'empty') {\n // If the real image fails to load, this will still remove the placeholder.\n setBlurComplete(true)\n }\n if (onError) {\n onError(event)\n }\n }}\n />\n )\n }\n)\n\nfunction ImagePreload({\n isAppRouter,\n imgAttributes,\n}: {\n isAppRouter: boolean\n imgAttributes: ImgProps\n}) {\n const opts: ReactDOM.PreloadOptions = {\n as: 'image',\n imageSrcSet: imgAttributes.srcSet,\n imageSizes: imgAttributes.sizes,\n crossOrigin: imgAttributes.crossOrigin,\n referrerPolicy: imgAttributes.referrerPolicy,\n ...getDynamicProps(imgAttributes.fetchPriority),\n }\n\n if (isAppRouter && ReactDOM.preload) {\n ReactDOM.preload(imgAttributes.src, opts)\n return null\n }\n\n return (\n <Head>\n <link\n key={\n '__nimg-' +\n imgAttributes.src +\n imgAttributes.srcSet +\n imgAttributes.sizes\n }\n rel=\"preload\"\n // Note how we omit the `href` attribute, as it would only be relevant\n // for browsers that do not support `imagesrcset`, and in those cases\n // it would cause the incorrect image to be preloaded.\n //\n // https://html.spec.whatwg.org/multipage/semantics.html#attr-link-imagesrcset\n href={imgAttributes.srcSet ? undefined : imgAttributes.src}\n {...opts}\n />\n </Head>\n )\n}\n\n/**\n * The `Image` component is used to optimize images.\n *\n * Read more: [Next.js docs: `Image`](https://nextjs.org/docs/app/api-reference/components/image)\n */\nexport const Image = forwardRef<HTMLImageElement | null, ImageProps>(\n (props, forwardedRef) => {\n const pagesRouter = useContext(RouterContext)\n // We're in the app directory if there is no pages router.\n const isAppRouter = !pagesRouter\n\n const configContext = useContext(ImageConfigContext)\n const config = useMemo(() => {\n const c = configEnv || configContext || imageConfigDefault\n\n const allSizes = [...c.deviceSizes, ...c.imageSizes].sort((a, b) => a - b)\n const deviceSizes = c.deviceSizes.sort((a, b) => a - b)\n const qualities = c.qualities?.sort((a, b) => a - b)\n return {\n ...c,\n allSizes,\n deviceSizes,\n qualities,\n // During the SSR, configEnv (__NEXT_IMAGE_OPTS) does not include\n // security sensitive configs like `localPatterns`, which is needed\n // during the server render to ensure it's validated. Therefore use\n // configContext, which holds the config from the server for validation.\n localPatterns:\n typeof window === 'undefined'\n ? configContext?.localPatterns\n : c.localPatterns,\n }\n }, [configContext])\n\n const { onLoad, onLoadingComplete } = props\n const onLoadRef = useRef(onLoad)\n\n useEffect(() => {\n onLoadRef.current = onLoad\n }, [onLoad])\n\n const onLoadingCompleteRef = useRef(onLoadingComplete)\n\n useEffect(() => {\n onLoadingCompleteRef.current = onLoadingComplete\n }, [onLoadingComplete])\n\n const [blurComplete, setBlurComplete] = useState(false)\n const [showAltText, setShowAltText] = useState(false)\n const { props: imgAttributes, meta: imgMeta } = getImgProps(props, {\n defaultLoader,\n imgConf: config,\n blurComplete,\n showAltText,\n })\n\n return (\n <>\n {\n <ImageElement\n {...imgAttributes}\n unoptimized={imgMeta.unoptimized}\n placeholder={imgMeta.placeholder}\n fill={imgMeta.fill}\n onLoadRef={onLoadRef}\n onLoadingCompleteRef={onLoadingCompleteRef}\n setBlurComplete={setBlurComplete}\n setShowAltText={setShowAltText}\n sizesInput={props.sizes}\n ref={forwardedRef}\n />\n }\n {imgMeta.preload ? (\n <ImagePreload\n isAppRouter={isAppRouter}\n imgAttributes={imgAttributes}\n />\n ) : null}\n </>\n )\n }\n)\n"],"names":["Image","configEnv","process","env","__NEXT_IMAGE_OPTS","window","globalThis","__NEXT_IMAGE_IMPORTED","handleLoading","img","placeholder","onLoadRef","onLoadingCompleteRef","setBlurComplete","unoptimized","sizesInput","src","p","decode","Promise","resolve","catch","then","parentElement","isConnected","current","event","Event","Object","defineProperty","writable","value","prevented","stopped","nativeEvent","currentTarget","target","isDefaultPrevented","isPropagationStopped","persist","preventDefault","stopPropagation","NODE_ENV","warnOnce","require","origSrc","URL","searchParams","get","getAttribute","widthViewportRatio","getBoundingClientRect","width","innerWidth","position","getComputedStyle","valid","includes","map","String","join","height","heightModified","toString","widthModified","getDynamicProps","fetchPriority","Boolean","use","fetchpriority","useNonWarningLayoutEffect","useEffect","useLayoutEffect","ImageElement","forwardRef","srcSet","sizes","decoding","className","style","loading","fill","setShowAltText","onLoad","onError","rest","forwardedRef","didInsertRef","useRef","insertedImgRef","didInsert","console","error","complete","ref","useMergedRef","data-nimg","currentImage","ImagePreload","isAppRouter","imgAttributes","opts","as","imageSrcSet","imageSizes","crossOrigin","referrerPolicy","ReactDOM","preload","Head","link","rel","href","undefined","props","pagesRouter","useContext","RouterContext","configContext","ImageConfigContext","config","useMemo","c","imageConfigDefault","allSizes","deviceSizes","sort","a","b","qualities","localPatterns","onLoadingComplete","blurComplete","useState","showAltText","meta","imgMeta","getImgProps","defaultLoader","imgConf"],"mappings":"AAAA;;;;;+BAwXaA;;;eAAAA;;;;;;iEA7WN;mEACc;+DACJ;6BACW;6BAYO;iDACA;4CACL;sEAGJ;8BACG;AAE7B,4CAA4C;AAC5C,MAAMC,YAAYC,QAAQC,GAAG,CAACC,iBAAiB;AAE/C,IAAI,OAAOC,WAAW,aAAa;;IAC/BC,WAAmBC,qBAAqB,GAAG;AAC/C;AAmBA,0EAA0E;AAC1E,iDAAiD;AACjD,SAASC,cACPC,GAA2B,EAC3BC,WAA6B,EAC7BC,SAAqD,EACrDC,oBAA2E,EAC3EC,eAAqC,EACrCC,WAAoB,EACpBC,UAA8B;IAE9B,MAAMC,MAAMP,KAAKO;IACjB,IAAI,CAACP,OAAOA,GAAG,CAAC,kBAAkB,KAAKO,KAAK;QAC1C;IACF;IACAP,GAAG,CAAC,kBAAkB,GAAGO;IACzB,MAAMC,IAAI,YAAYR,MAAMA,IAAIS,MAAM,KAAKC,QAAQC,OAAO;IAC1DH,EAAEI,KAAK,CAAC,KAAO,GAAGC,IAAI,CAAC;QACrB,IAAI,CAACb,IAAIc,aAAa,IAAI,CAACd,IAAIe,WAAW,EAAE;YAC1C,wCAAwC;YACxC,uBAAuB;YACvB,sCAAsC;YACtC,sBAAsB;YACtB,uBAAuB;YACvB;QACF;QACA,IAAId,gBAAgB,SAAS;YAC3BG,gBAAgB;QAClB;QACA,IAAIF,WAAWc,SAAS;YACtB,+CAA+C;YAC/C,0CAA0C;YAC1C,2CAA2C;YAC3C,MAAMC,QAAQ,IAAIC,MAAM;YAC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9H,WAAW;gBAChCuE,MAAMuD,QAAQvD,IAAI;gBAClBtE,WAAWA;gBACXC,sBAAsBA;gBACtBC,iBAAiBA;gBACjBqE,gBAAgBA;gBAChBnE,YAAYmG,MAAMtC,KAAK;gBACvBkB,KAAKR;;YAGRkD,QAAQ5B,OAAO,iBACd,qBAACV;gBACCC,aAAaA;gBACbC,eAAeA;iBAEf;;;AAGV","ignoreList":[0]} |
@@ -63,3 +63,3 @@ /* global location */ // imports polyfill from `@next/polyfill-module` after build. | ||
| const _isnextroutererror = require("./components/is-next-router-error"); | ||
| const version = "16.3.0-canary.51"; | ||
| const version = "16.3.0-canary.52"; | ||
| let router; | ||
@@ -66,0 +66,0 @@ const emitter = (0, _mitt.default)(); |
@@ -37,3 +37,2 @@ 'use client'; | ||
| const _usemergedref = require("./use-merged-ref"); | ||
| const _erroronce = require("../shared/lib/utils/error-once"); | ||
| const prefetched = new Set(); | ||
@@ -428,3 +427,4 @@ function prefetch(router, href, as, options) { | ||
| if (process.env.NODE_ENV === 'development') { | ||
| (0, _erroronce.errorOnce)('`legacyBehavior` is deprecated and will be removed in a future ' + 'release. A codemod is available to upgrade your components:\n\n' + 'npx @next/codemod@latest new-link .\n\n' + 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'); | ||
| const { errorOnce } = require('../shared/lib/utils/error-once'); | ||
| errorOnce('`legacyBehavior` is deprecated and will be removed in a future ' + 'release. A codemod is available to upgrade your components:\n\n' + 'npx @next/codemod@latest new-link .\n\n' + 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'); | ||
| } | ||
@@ -431,0 +431,0 @@ return /*#__PURE__*/ _react.default.cloneElement(child, childProps); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../src/client/link.tsx"],"sourcesContent":["'use client'\n\nimport type {\n NextRouter,\n PrefetchOptions as RouterPrefetchOptions,\n} from '../shared/lib/router/router'\n\nimport React, { createContext, useContext } from 'react'\nimport type { UrlObject } from 'url'\nimport { resolveHref } from './resolve-href'\nimport { isLocalURL } from '../shared/lib/router/utils/is-local-url'\nimport { formatUrl } from '../shared/lib/router/utils/format-url'\nimport { isAbsoluteUrl } from '../shared/lib/utils'\nimport { addLocale } from './add-locale'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\nimport type { AppRouterInstance } from '../shared/lib/app-router-context.shared-runtime'\nimport { useIntersection } from './use-intersection'\nimport { getDomainLocale } from './get-domain-locale'\nimport { addBasePath } from './add-base-path'\nimport { useMergedRef } from './use-merged-ref'\nimport { errorOnce } from '../shared/lib/utils/error-once'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * The path or URL to navigate to. It can also be an object.\n *\n * @example https://nextjs.org/docs/api-reference/next/link#with-url-object\n */\n href: Url\n /**\n * Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes) to see how it worked. Note: when this path differs from the one provided in `href` the previous `href`/`as` behavior is used as shown in the [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes).\n */\n as?: Url\n /**\n * Replace the current `history` state instead of adding a new url into the stack.\n *\n * @defaultValue `false`\n */\n replace?: boolean\n /**\n * Whether to override the default scroll behavior\n *\n * @example https://nextjs.org/docs/api-reference/next/link#disable-scrolling-to-the-top-of-the-page\n *\n * @defaultValue `true`\n */\n scroll?: boolean\n /**\n * Update the path of the current page without rerunning [`getStaticProps`](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-props), [`getServerSideProps`](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-server-side-props) or [`getInitialProps`](/docs/pages/api-reference/functions/get-initial-props).\n *\n * @defaultValue `false`\n */\n shallow?: boolean\n /**\n * Forces `Link` to send the `href` property to its child.\n *\n * @defaultValue `false`\n */\n passHref?: boolean\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`. Prefetching is only enabled in production.\n *\n * In App Router:\n * - \"auto\", null, undefined (default): For statically generated pages, this will prefetch the full React Server Component data. For dynamic pages, this will prefetch up to the nearest route segment with a [`loading.js`](https://nextjs.org/docs/app/api-reference/file-conventions/loading) file. If there is no loading file, it will not fetch the full tree to avoid fetching too much data.\n * - `true`: This will prefetch the full React Server Component data for all route segments, regardless of whether they contain a segment with `loading.js`.\n * - `false`: This will not prefetch any data, even on hover.\n *\n * In Pages Router:\n * - `true` (default): The full route & its data will be prefetched.\n * - `false`: Prefetching will not happen when entering the viewport, but will still happen on hover.\n * @defaultValue `true` (pages router) or `null` (app router)\n */\n prefetch?: boolean | 'auto' | null\n /**\n * The active locale is automatically prepended. `locale` allows for providing a different locale.\n * When `false` `href` has to include the locale as the default behavior is disabled.\n * Note: This is only available in the Pages Router.\n */\n locale?: string | false\n /**\n * Enable legacy link behavior.\n *\n * @deprecated This will be removed in a future version\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n /**\n * Optional event handler for when the mouse pointer is moved onto Link\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n /**\n * Optional event handler for when Link is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n /**\n * Optional event handler for when Link is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n\n /**\n * Transition types to apply when navigating. These types are passed to\n * [`React.addTransitionType`](https://react.dev/reference/react/addTransitionType)\n * inside the navigation transition, enabling\n * [`<ViewTransition>`](https://react.dev/reference/react/ViewTransition) components\n * to apply different animations based on the type of navigation.\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" transitionTypes={['slide-in']}>About</Link>\n * ```\n */\n transitionTypes?: string[]\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// WARNING: This should be an interface to prevent TypeScript from inlining it\n// in declarations of libraries dependending on Next.js.\n// Not trivial to reproduce so only convert to an interface when needed.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport interface LinkProps<RouteInferType = any> extends InternalLinkProps {}\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<InternalLinkProps>\n\nconst prefetched = new Set<string>()\n\ntype PrefetchOptions = RouterPrefetchOptions & {\n /**\n * bypassPrefetchedCheck will bypass the check to see if the `href` has\n * already been fetched i.e. unconditionally prefetch the `href`.\n */\n bypassPrefetchedCheck: boolean\n}\n\nfunction prefetch(\n router: NextRouter,\n href: string,\n as: string,\n options: PrefetchOptions\n): void {\n if (typeof window === 'undefined') {\n return\n }\n\n if (!isLocalURL(href)) {\n return\n }\n\n // We should only dedupe requests when experimental.optimisticClientCache is\n // disabled.\n if (!options.bypassPrefetchedCheck) {\n const locale =\n // Let the link's locale prop override the default router locale.\n typeof options.locale !== 'undefined'\n ? options.locale\n : // Otherwise fallback to the router's locale.\n 'locale' in router\n ? router.locale\n : undefined\n\n const prefetchedKey = href + '%' + as + '%' + locale\n\n // If we've already fetched the key, then don't prefetch it again!\n if (prefetched.has(prefetchedKey)) {\n return\n }\n\n // Mark this URL as prefetched.\n prefetched.add(prefetchedKey)\n }\n\n // Prefetch the JSON page if asked (only in the client)\n // We need to handle a prefetch error here since we may be\n // loading with priority which can reject but we don't\n // want to force navigation since this is only a prefetch\n router.prefetch(href, as, options).catch((err) => {\n if (process.env.NODE_ENV !== 'production') {\n // rethrow to show invalid URL errors\n throw err\n }\n })\n}\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n router: NextRouter | AppRouterInstance,\n href: string,\n as: string,\n replace?: boolean,\n shallow?: boolean,\n scroll?: boolean,\n locale?: string | false,\n onNavigate?: OnNavigateEventHandler\n): void {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n\n if (\n (isAnchorNodeName && isModifiedEvent(e)) ||\n e.currentTarget.hasAttribute('download')\n ) {\n // ignore click for browser’s default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n const navigate = () => {\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n // If the router is an NextRouter instance it will have `beforePopState`\n const routerScroll = scroll ?? true\n if ('beforePopState' in router) {\n router[replace ? 'replace' : 'push'](href, as, {\n shallow,\n locale,\n scroll: routerScroll,\n })\n } else {\n router[replace ? 'replace' : 'push'](as || href, {\n scroll: routerScroll,\n })\n }\n }\n\n navigate()\n}\n\ntype LinkPropsReal = React.PropsWithChildren<\n Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof LinkProps> &\n LinkProps\n>\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation between routes.\n *\n * It is the primary way to navigate between routes in Next.js.\n *\n * Read more: [Next.js docs: `<Link>`](https://nextjs.org/docs/app/api-reference/components/link)\n */\nconst Link = React.forwardRef<HTMLAnchorElement, LinkPropsReal>(\n function LinkComponent(props, forwardedRef) {\n let children: React.ReactNode\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n locale,\n onClick,\n onNavigate,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n transitionTypes,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(RouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? // TODO: Remove this addendum if Owner Stacks are available\n \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n locale: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n onNavigate: true,\n transitionTypes: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (key === 'locale') {\n if (props[key] && valType !== 'string') {\n throw createPropError({\n key,\n expected: '`string`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'legacyBehavior'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\"`',\n actual: valType,\n })\n }\n } else if (key === 'transitionTypes') {\n if (props[key] != null && !Array.isArray(props[key])) {\n throw createPropError({\n key,\n expected: '`string[]`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n }\n\n const { href, as } = React.useMemo(() => {\n if (!router) {\n const resolvedHref = formatStringOrUrl(hrefProp)\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n }\n }\n\n const [resolvedHref, resolvedAs] = resolveHref(router, hrefProp, true)\n\n return {\n href: resolvedHref,\n as: asProp ? resolveHref(router, asProp) : resolvedAs || resolvedHref,\n }\n }, [router, hrefProp, asProp])\n\n const previousHref = React.useRef<string>(href)\n const previousAs = React.useRef<string>(as)\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n const [setIntersectionRef, isVisible, resetVisible] = useIntersection({\n rootMargin: '200px',\n })\n const setIntersectionWithResetRef = React.useCallback(\n (el: Element | null) => {\n // Before the link getting observed, check if visible state need to be reset\n if (previousAs.current !== as || previousHref.current !== href) {\n resetVisible()\n previousAs.current = as\n previousHref.current = href\n }\n\n setIntersectionRef(el)\n },\n [as, href, resetVisible, setIntersectionRef]\n )\n\n const setRef = useMergedRef(setIntersectionWithResetRef, childRef)\n\n // Prefetch the URL if we haven't already and it's visible.\n React.useEffect(() => {\n // in dev, we only prefetch on hover to avoid wasting resources as the prefetch will trigger compiling the page.\n if (process.env.NODE_ENV !== 'production') {\n return\n }\n\n if (!router) {\n return\n }\n\n // If we don't need to prefetch the URL, don't do prefetch.\n if (!isVisible || !prefetchEnabled) {\n return\n }\n\n // Prefetch the URL.\n prefetch(router, href, as, {\n // dedupe across appear/disappear of the Link.\n bypassPrefetchedCheck: false,\n locale,\n })\n }, [as, href, isVisible, locale, prefetchEnabled, router?.locale, router])\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: setRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n\n if (e.defaultPrevented) {\n return\n }\n\n linkClicked(\n e,\n router,\n href,\n as,\n replace,\n shallow,\n scroll,\n locale,\n onNavigate\n )\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n\n prefetch(router, href, as, {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true,\n })\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n\n prefetch(router, href, as, {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true,\n })\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the domain and locale.\n if (isAbsoluteUrl(as)) {\n childProps.href = as\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n const curLocale = typeof locale !== 'undefined' ? locale : router?.locale\n\n // we only render domain locales if we are currently on a domain locale\n // so that locale links are still visitable in development/preview envs\n const localeDomain =\n router?.isLocaleDomain &&\n getDomainLocale(as, curLocale, router?.locales, router?.domainLocales)\n\n childProps.href =\n localeDomain ||\n addBasePath(addLocale(as, curLocale, router?.defaultLocale))\n }\n\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n errorOnce(\n '`legacyBehavior` is deprecated and will be removed in a future ' +\n 'release. A codemod is available to upgrade your components:\\n\\n' +\n 'npx @next/codemod@latest new-link .\\n\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'\n )\n }\n return React.cloneElement(child, childProps)\n }\n\n return (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n)\n\nconst LinkStatusContext = createContext<{\n pending: boolean\n}>({\n // We do not support link status in the Pages Router, so we always return false\n pending: false,\n})\n\nexport const useLinkStatus = () => {\n // This behaviour is like React's useFormStatus. When the component is not under\n // a <form> tag, it will get the default value, instead of throwing an error.\n return useContext(LinkStatusContext)\n}\n\nexport default Link\n"],"names":["useLinkStatus","prefetched","Set","prefetch","router","href","as","options","window","isLocalURL","bypassPrefetchedCheck","locale","undefined","prefetchedKey","has","add","catch","err","process","env","NODE_ENV","isModifiedEvent","event","eventTarget","currentTarget","target","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","replace","shallow","scroll","onNavigate","nodeName","isAnchorNodeName","toUpperCase","hasAttribute","preventDefault","location","navigate","isDefaultPrevented","routerScroll","formatStringOrUrl","urlObjOrString","formatUrl","Link","React","forwardRef","LinkComponent","props","forwardedRef","children","hrefProp","asProp","childrenProp","prefetchProp","passHref","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","transitionTypes","restProps","a","useContext","RouterContext","prefetchEnabled","createPropError","args","Error","key","expected","actual","requiredPropsGuard","requiredProps","Object","keys","forEach","_","optionalPropsGuard","optionalProps","valType","Array","isArray","useMemo","resolvedHref","resolvedAs","resolveHref","previousHref","useRef","previousAs","child","console","warn","Children","only","type","childRef","ref","setIntersectionRef","isVisible","resetVisible","useIntersection","rootMargin","setIntersectionWithResetRef","useCallback","el","current","setRef","useMergedRef","useEffect","childProps","defaultPrevented","priority","__NEXT_LINK_NO_TOUCH_START","isAbsoluteUrl","curLocale","localeDomain","isLocaleDomain","getDomainLocale","locales","domainLocales","addBasePath","addLocale","defaultLocale","errorOnce","cloneElement","LinkStatusContext","createContext","pending"],"mappings":"AAAA;;;;;;;;;;;;;;;;IAouBA,OAAmB;eAAnB;;IANaA,aAAa;eAAbA;;;;;iEAvtBoC;6BAErB;4BACD;2BACD;uBACI;2BACJ;4CACI;iCAEE;iCACA;6BACJ;8BACC;2BACH;AA4H1B,MAAMC,aAAa,IAAIC;AAUvB,SAASC,SACPC,MAAkB,EAClBC,IAAY,EACZC,EAAU,EACVC,OAAwB;IAExB,IAAI,OAAOC,WAAW,aAAa;QACjC;IACF;IAEA,IAAI,CAACC,IAAAA,sBAAU,EAACJ,OAAO;QACrB;IACF;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esContent":["'use client'\n\nimport type {\n NextRouter,\n PrefetchOptions as RouterPrefetchOptions,\n} from '../shared/lib/router/router'\n\nimport React, { createContext, useContext } from 'react'\nimport type { UrlObject } from 'url'\nimport { resolveHref } from './resolve-href'\nimport { isLocalURL } from '../shared/lib/router/utils/is-local-url'\nimport { formatUrl } from '../shared/lib/router/utils/format-url'\nimport { isAbsoluteUrl } from '../shared/lib/utils'\nimport { addLocale } from './add-locale'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\nimport type { AppRouterInstance } from '../shared/lib/app-router-context.shared-runtime'\nimport { useIntersection } from './use-intersection'\nimport { getDomainLocale } from './get-domain-locale'\nimport { addBasePath } from './add-base-path'\nimport { useMergedRef } from './use-merged-ref'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * The path or URL to navigate to. It can also be an object.\n *\n * @example https://nextjs.org/docs/api-reference/next/link#with-url-object\n */\n href: Url\n /**\n * Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes) to see how it worked. Note: when this path differs from the one provided in `href` the previous `href`/`as` behavior is used as shown in the [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes).\n */\n as?: Url\n /**\n * Replace the current `history` state instead of adding a new url into the stack.\n *\n * @defaultValue `false`\n */\n replace?: boolean\n /**\n * Whether to override the default scroll behavior\n *\n * @example https://nextjs.org/docs/api-reference/next/link#disable-scrolling-to-the-top-of-the-page\n *\n * @defaultValue `true`\n */\n scroll?: boolean\n /**\n * Update the path of the current page without rerunning [`getStaticProps`](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-props), [`getServerSideProps`](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-server-side-props) or [`getInitialProps`](/docs/pages/api-reference/functions/get-initial-props).\n *\n * @defaultValue `false`\n */\n shallow?: boolean\n /**\n * Forces `Link` to send the `href` property to its child.\n *\n * @defaultValue `false`\n */\n passHref?: boolean\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`. Prefetching is only enabled in production.\n *\n * In App Router:\n * - \"auto\", null, undefined (default): For statically generated pages, this will prefetch the full React Server Component data. For dynamic pages, this will prefetch up to the nearest route segment with a [`loading.js`](https://nextjs.org/docs/app/api-reference/file-conventions/loading) file. If there is no loading file, it will not fetch the full tree to avoid fetching too much data.\n * - `true`: This will prefetch the full React Server Component data for all route segments, regardless of whether they contain a segment with `loading.js`.\n * - `false`: This will not prefetch any data, even on hover.\n *\n * In Pages Router:\n * - `true` (default): The full route & its data will be prefetched.\n * - `false`: Prefetching will not happen when entering the viewport, but will still happen on hover.\n * @defaultValue `true` (pages router) or `null` (app router)\n */\n prefetch?: boolean | 'auto' | null\n /**\n * The active locale is automatically prepended. `locale` allows for providing a different locale.\n * When `false` `href` has to include the locale as the default behavior is disabled.\n * Note: This is only available in the Pages Router.\n */\n locale?: string | false\n /**\n * Enable legacy link behavior.\n *\n * @deprecated This will be removed in a future version\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n /**\n * Optional event handler for when the mouse pointer is moved onto Link\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n /**\n * Optional event handler for when Link is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n /**\n * Optional event handler for when Link is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n\n /**\n * Transition types to apply when navigating. These types are passed to\n * [`React.addTransitionType`](https://react.dev/reference/react/addTransitionType)\n * inside the navigation transition, enabling\n * [`<ViewTransition>`](https://react.dev/reference/react/ViewTransition) components\n * to apply different animations based on the type of navigation.\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" transitionTypes={['slide-in']}>About</Link>\n * ```\n */\n transitionTypes?: string[]\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// WARNING: This should be an interface to prevent TypeScript from inlining it\n// in declarations of libraries dependending on Next.js.\n// Not trivial to reproduce so only convert to an interface when needed.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport interface LinkProps<RouteInferType = any> extends InternalLinkProps {}\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<InternalLinkProps>\n\nconst prefetched = new Set<string>()\n\ntype PrefetchOptions = RouterPrefetchOptions & {\n /**\n * bypassPrefetchedCheck will bypass the check to see if the `href` has\n * already been fetched i.e. unconditionally prefetch the `href`.\n */\n bypassPrefetchedCheck: boolean\n}\n\nfunction prefetch(\n router: NextRouter,\n href: string,\n as: string,\n options: PrefetchOptions\n): void {\n if (typeof window === 'undefined') {\n return\n }\n\n if (!isLocalURL(href)) {\n return\n }\n\n // We should only dedupe requests when experimental.optimisticClientCache is\n // disabled.\n if (!options.bypassPrefetchedCheck) {\n const locale =\n // Let the link's locale prop override the default router locale.\n typeof options.locale !== 'undefined'\n ? options.locale\n : // Otherwise fallback to the router's locale.\n 'locale' in router\n ? router.locale\n : undefined\n\n const prefetchedKey = href + '%' + as + '%' + locale\n\n // If we've already fetched the key, then don't prefetch it again!\n if (prefetched.has(prefetchedKey)) {\n return\n }\n\n // Mark this URL as prefetched.\n prefetched.add(prefetchedKey)\n }\n\n // Prefetch the JSON page if asked (only in the client)\n // We need to handle a prefetch error here since we may be\n // loading with priority which can reject but we don't\n // want to force navigation since this is only a prefetch\n router.prefetch(href, as, options).catch((err) => {\n if (process.env.NODE_ENV !== 'production') {\n // rethrow to show invalid URL errors\n throw err\n }\n })\n}\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n router: NextRouter | AppRouterInstance,\n href: string,\n as: string,\n replace?: boolean,\n shallow?: boolean,\n scroll?: boolean,\n locale?: string | false,\n onNavigate?: OnNavigateEventHandler\n): void {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n\n if (\n (isAnchorNodeName && isModifiedEvent(e)) ||\n e.currentTarget.hasAttribute('download')\n ) {\n // ignore click for browser’s default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n const navigate = () => {\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n // If the router is an NextRouter instance it will have `beforePopState`\n const routerScroll = scroll ?? true\n if ('beforePopState' in router) {\n router[replace ? 'replace' : 'push'](href, as, {\n shallow,\n locale,\n scroll: routerScroll,\n })\n } else {\n router[replace ? 'replace' : 'push'](as || href, {\n scroll: routerScroll,\n })\n }\n }\n\n navigate()\n}\n\ntype LinkPropsReal = React.PropsWithChildren<\n Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof LinkProps> &\n LinkProps\n>\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation between routes.\n *\n * It is the primary way to navigate between routes in Next.js.\n *\n * Read more: [Next.js docs: `<Link>`](https://nextjs.org/docs/app/api-reference/components/link)\n */\nconst Link = React.forwardRef<HTMLAnchorElement, LinkPropsReal>(\n function LinkComponent(props, forwardedRef) {\n let children: React.ReactNode\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n locale,\n onClick,\n onNavigate,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n transitionTypes,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(RouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? // TODO: Remove this addendum if Owner Stacks are available\n \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n locale: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n onNavigate: true,\n transitionTypes: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (key === 'locale') {\n if (props[key] && valType !== 'string') {\n throw createPropError({\n key,\n expected: '`string`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'legacyBehavior'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\"`',\n actual: valType,\n })\n }\n } else if (key === 'transitionTypes') {\n if (props[key] != null && !Array.isArray(props[key])) {\n throw createPropError({\n key,\n expected: '`string[]`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n }\n\n const { href, as } = React.useMemo(() => {\n if (!router) {\n const resolvedHref = formatStringOrUrl(hrefProp)\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n }\n }\n\n const [resolvedHref, resolvedAs] = resolveHref(router, hrefProp, true)\n\n return {\n href: resolvedHref,\n as: asProp ? resolveHref(router, asProp) : resolvedAs || resolvedHref,\n }\n }, [router, hrefProp, asProp])\n\n const previousHref = React.useRef<string>(href)\n const previousAs = React.useRef<string>(as)\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n const [setIntersectionRef, isVisible, resetVisible] = useIntersection({\n rootMargin: '200px',\n })\n const setIntersectionWithResetRef = React.useCallback(\n (el: Element | null) => {\n // Before the link getting observed, check if visible state need to be reset\n if (previousAs.current !== as || previousHref.current !== href) {\n resetVisible()\n previousAs.current = as\n previousHref.current = href\n }\n\n setIntersectionRef(el)\n },\n [as, href, resetVisible, setIntersectionRef]\n )\n\n const setRef = useMergedRef(setIntersectionWithResetRef, childRef)\n\n // Prefetch the URL if we haven't already and it's visible.\n React.useEffect(() => {\n // in dev, we only prefetch on hover to avoid wasting resources as the prefetch will trigger compiling the page.\n if (process.env.NODE_ENV !== 'production') {\n return\n }\n\n if (!router) {\n return\n }\n\n // If we don't need to prefetch the URL, don't do prefetch.\n if (!isVisible || !prefetchEnabled) {\n return\n }\n\n // Prefetch the URL.\n prefetch(router, href, as, {\n // dedupe across appear/disappear of the Link.\n bypassPrefetchedCheck: false,\n locale,\n })\n }, [as, href, isVisible, locale, prefetchEnabled, router?.locale, router])\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: setRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n\n if (e.defaultPrevented) {\n return\n }\n\n linkClicked(\n e,\n router,\n href,\n as,\n replace,\n shallow,\n scroll,\n locale,\n onNavigate\n )\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n\n prefetch(router, href, as, {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true,\n })\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n\n prefetch(router, href, as, {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true,\n })\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the domain and locale.\n if (isAbsoluteUrl(as)) {\n childProps.href = as\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n const curLocale = typeof locale !== 'undefined' ? locale : router?.locale\n\n // we only render domain locales if we are currently on a domain locale\n // so that locale links are still visitable in development/preview envs\n const localeDomain =\n router?.isLocaleDomain &&\n getDomainLocale(as, curLocale, router?.locales, router?.domainLocales)\n\n childProps.href =\n localeDomain ||\n addBasePath(addLocale(as, curLocale, router?.defaultLocale))\n }\n\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n const { errorOnce } =\n require('../shared/lib/utils/error-once') as typeof import('../shared/lib/utils/error-once')\n errorOnce(\n '`legacyBehavior` is deprecated and will be removed in a future ' +\n 'release. A codemod is available to upgrade your components:\\n\\n' +\n 'npx @next/codemod@latest new-link .\\n\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'\n )\n }\n return React.cloneElement(child, childProps)\n }\n\n return (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n)\n\nconst LinkStatusContext = createContext<{\n pending: boolean\n}>({\n // We do not support link status in the Pages Router, so we always return false\n pending: false,\n})\n\nexport const useLinkStatus = () => {\n // This behaviour is like React's useFormStatus. When the component is not under\n // a <form> tag, it will get the default value, instead of throwing an error.\n return useContext(LinkStatusContext)\n}\n\nexport default Link\n"],"names":["useLinkStatus","prefetched","Set","prefetch","router","href","as","options","window","isLocalURL","bypassPrefetchedCheck","locale","undefined","prefetchedKey","has","add","catch","err","process","env","NODE_ENV","isModifiedEvent","event","eventTarget","currentTarget","target","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","replace","shallow","scroll","onNavigate","nodeName","isAnchorNodeName","toUpperCase","hasAttribute","preventDefault","location","navigate","isDefaultPrevented","routerScroll","formatStringOrUrl","urlObjOrString","formatUrl","Link","React","forwardRef","LinkComponent","props","forwardedRef","children","hrefProp","asProp","childrenProp","prefetchProp","passHref","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","transitionTypes","restProps","a","useContext","RouterContext","prefetchEnabled","createPropError","args","Error","key","expected","actual","requiredPropsGuard","requiredProps","Object","keys","forEach","_","optionalPropsGuard","optionalProps","valType","Array","isArray","useMemo","resolvedHref","resolvedAs","resolveHref","previousHref","useRef","previousAs","child","console","warn","Children","only","type","childRef","ref","setIntersectionRef","isVisible","resetVisible","useIntersection","rootMargin","setIntersectionWithResetRef","useCallback","el","current","setRef","useMergedRef","useEffect","childProps","defaultPrevented","priority","__NEXT_LINK_NO_TOUCH_START","isAbsoluteUrl","curLocale","localeDomain","isLocaleDomain","getDomainLocale","locales","domainLocales","addBasePath","addLocale","defaultLocale","errorOnce","require","cloneElement","LinkStatusContext","createContext","pending"],"mappings":"AAAA;;;;;;;;;;;;;;;;IAquBA,OAAmB;eAAnB;;IANaA,aAAa;eAAbA;;;;;iEAxtBoC;6BAErB;4BACD;2BACD;uBACI;2BACJ;4CACI;iCAEE;iCACA;6BACJ;8BACC;AA4H7B,MAAMC,aAAa,IAAIC;AAUvB,SAASC,SACPC,MAAkB,EAClBC,IAAY,EACZC,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gBAAgB;IAC3B,gFAAgF;IAChF,6EAA6E;IAC7E,OAAOwE,IAAAA,iBAAU,EAACgE;AACpB;MAEA,WAAerF","ignoreList":[0]} |
@@ -315,2 +315,4 @@ --- | ||
| Most of these are permanent constraints of how root parameters work. The exception is [Route Handlers](/docs/app/api-reference/file-conventions/route), which are not supported yet but are planned for a future release. | ||
| ### Server Components only | ||
@@ -317,0 +319,0 @@ |
@@ -11,3 +11,2 @@ // Time thresholds in seconds | ||
| const NANOSECONDS_PER_MILLISECOND = 1000000; | ||
| const NANOSECONDS_PER_MICROSECOND = 1000; | ||
| const NANOSECONDS_IN_MINUTE = 60000000000 // 60 * 1_000_000_000 | ||
@@ -52,3 +51,3 @@ ; | ||
| * - >= 2 milliseconds: show in whole milliseconds (e.g., "250ms") | ||
| * - < 2 milliseconds: show in whole microseconds (e.g., "500µs") | ||
| * - < 2 milliseconds: show in milliseconds with 1 decimal place (e.g., "0.5ms") | ||
| * | ||
@@ -68,3 +67,3 @@ * @param durationBigInt - Duration in nanoseconds as a BigInt | ||
| } else { | ||
| return `${(duration / NANOSECONDS_PER_MICROSECOND).toFixed(0)}µs`; | ||
| return `${(duration / NANOSECONDS_PER_MILLISECOND).toFixed(1)}ms`; | ||
| } | ||
@@ -71,0 +70,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../src/build/duration-to-string.ts"],"sourcesContent":["// Time thresholds in seconds\nconst SECONDS_IN_MINUTE = 60\nconst MINUTES_THRESHOLD_SECONDS = 120 // 2 minutes\nconst SECONDS_THRESHOLD_HIGH = 40\nconst SECONDS_THRESHOLD_LOW = 2\nconst MILLISECONDS_PER_SECOND = 1000\n\n// Time thresholds and conversion factors for nanoseconds\nconst NANOSECONDS_PER_SECOND = 1_000_000_000\nconst NANOSECONDS_PER_MILLISECOND = 1_000_000\nconst NANOSECONDS_PER_MICROSECOND = 1_000\nconst NANOSECONDS_IN_MINUTE = 60_000_000_000 // 60 * 1_000_000_000\nconst MINUTES_THRESHOLD_NANOSECONDS = 120_000_000_000 // 2 minutes in nanoseconds\nconst SECONDS_THRESHOLD_HIGH_NANOSECONDS = 40_000_000_000 // 40 seconds in nanoseconds\nconst SECONDS_THRESHOLD_LOW_NANOSECONDS = 2_000_000_000 // 2 seconds in nanoseconds\nconst MILLISECONDS_THRESHOLD_NANOSECONDS = 2_000_000 // 2 milliseconds in nanoseconds\n\n/**\n * Converts a duration in seconds to a human-readable string format.\n * Formats duration based on magnitude for optimal readability:\n * - >= 2 minutes: show in minutes with 1 decimal place (e.g., \"2.5min\")\n * - >= 40 seconds: show in whole seconds (e.g., \"45s\")\n * - >= 2 seconds: show in seconds with 1 decimal place (e.g., \"3.2s\")\n * - < 2 seconds: show in whole milliseconds (e.g., \"1500ms\")\n *\n * @deprecated Use durationToStringWithNanoseconds instead, collect time in nanoseconds using process.hrtime.bigint().\n * @param compilerDuration - Duration in seconds as a number\n * @returns Formatted duration string with appropriate unit and precision\n */\nexport function durationToString(compilerDuration: number) {\n if (compilerDuration > MINUTES_THRESHOLD_SECONDS) {\n return `${(compilerDuration / SECONDS_IN_MINUTE).toFixed(1)}min`\n } else if (compilerDuration > SECONDS_THRESHOLD_HIGH) {\n return `${compilerDuration.toFixed(0)}s`\n } else if (compilerDuration > SECONDS_THRESHOLD_LOW) {\n return `${compilerDuration.toFixed(1)}s`\n } else {\n return `${(compilerDuration * MILLISECONDS_PER_SECOND).toFixed(0)}ms`\n }\n}\n\n/**\n * Converts a nanosecond duration to a human-readable string format.\n * Formats duration based on magnitude for optimal readability:\n * - >= 2 minutes: show in minutes with 1 decimal place (e.g., \"2.5min\")\n * - >= 40 seconds: show in whole seconds (e.g., \"45s\")\n * - >= 2 seconds: show in seconds with 1 decimal place (e.g., \"3.2s\")\n * - >= 2 milliseconds: show in whole milliseconds (e.g., \"250ms\")\n * - < 2 milliseconds: show in whole microseconds (e.g., \"500µs\")\n *\n * @param durationBigInt - Duration in nanoseconds as a BigInt\n * @returns Formatted duration string with appropriate unit and precision\n */\nfunction durationToStringWithNanoseconds(durationBigInt: bigint): string {\n const duration = Number(durationBigInt)\n if (duration >= MINUTES_THRESHOLD_NANOSECONDS) {\n return `${(duration / NANOSECONDS_IN_MINUTE).toFixed(1)}min`\n } else if (duration >= SECONDS_THRESHOLD_HIGH_NANOSECONDS) {\n return `${(duration / NANOSECONDS_PER_SECOND).toFixed(0)}s`\n } else if (duration >= SECONDS_THRESHOLD_LOW_NANOSECONDS) {\n return `${(duration / NANOSECONDS_PER_SECOND).toFixed(1)}s`\n } else if (duration >= MILLISECONDS_THRESHOLD_NANOSECONDS) {\n return `${(duration / NANOSECONDS_PER_MILLISECOND).toFixed(0)}ms`\n } else {\n return `${(duration / NANOSECONDS_PER_MICROSECOND).toFixed(0)}µs`\n }\n}\n\n/**\n * Converts a high-resolution time tuple to seconds.\n *\n * @param hrtime - High-resolution time tuple of [seconds, nanoseconds]\n * @returns Duration in seconds as a floating-point number\n */\nexport function hrtimeToSeconds(hrtime: [number, number]): number {\n // hrtime is a tuple of [seconds, nanoseconds]\n return hrtime[0] + hrtime[1] / NANOSECONDS_PER_SECOND\n}\n\n/**\n * Converts a BigInt nanosecond duration to a human-readable string format.\n * This is the preferred method for formatting high-precision durations.\n *\n * @param hrtime - Duration in nanoseconds as a BigInt (typically from process.hrtime.bigint())\n * @returns Formatted duration string with appropriate unit and precision\n */\nexport function hrtimeBigIntDurationToString(hrtime: bigint) {\n return durationToStringWithNanoseconds(hrtime)\n}\n\n/**\n * Converts a high-resolution time tuple to a human-readable string format.\n *\n * @deprecated Use hrtimeBigIntDurationToString with process.hrtime.bigint() for better precision.\n * @param hrtime - High-resolution time tuple of [seconds, nanoseconds]\n * @returns Formatted duration string with appropriate unit and precision\n */\nexport function hrtimeDurationToString(hrtime: [number, number]): string {\n return durationToString(hrtimeToSeconds(hrtime))\n}\n"],"names":["SECONDS_IN_MINUTE","MINUTES_THRESHOLD_SECONDS","SECONDS_THRESHOLD_HIGH","SECONDS_THRESHOLD_LOW","MILLISECONDS_PER_SECOND","NANOSECONDS_PER_SECOND","NANOSECONDS_PER_MILLISECOND","NANOSECONDS_PER_MICROSECOND","NANOSECONDS_IN_MINUTE","MINUTES_THRESHOLD_NANOSECONDS","SECONDS_THRESHOLD_HIGH_NANOSECONDS","SECONDS_THRESHOLD_LOW_NANOSECONDS","MILLISECONDS_THRESHOLD_NANOSECONDS","durationToString","compilerDuration","toFixed","durationToStringWithNanoseconds","durationBigInt","duration","Number","hrtimeToSeconds","hrtime","hrtimeBigIntDurationToString","hrtimeDurationToString"],"mappings":"AAAA,6BAA6B;AAC7B,MAAMA,oBAAoB;AAC1B,MAAMC,4BAA4B,IAAI,YAAY;;AAClD,MAAMC,yBAAyB;AAC/B,MAAMC,wBAAwB;AAC9B,MAAMC,0BAA0B;AAEhC,yDAAyD;AACzD,MAAMC,yBAAyB;AAC/B,MAAMC,8BAA8B;AACpC,MAAMC,8BAA8B;AACpC,MAAMC,wBAAwB,YAAe,qBAAqB;;AAClE,MAAMC,gCAAgC,aAAgB,2BAA2B;;AACjF,MAAMC,qCAAqC,YAAe,4BAA4B;;AACtF,MAAMC,oCAAoC,WAAc,2BAA2B;;AACnF,MAAMC,qCAAqC,QAAU,gCAAgC;;AAErF;;;;;;;;;;;CAWC,GACD,OAAO,SAASC,iBAAiBC,gBAAwB;IACvD,IAAIA,mBAAmBb,2BAA2B;QAChD,OAAO,GAAG,AAACa,CAAAA,mBAAmBd,iBAAgB,EAAGe,OAAO,CAAC,GAAG,GAAG,CAAC;IAClE,OAAO,IAAID,mBAAmBZ,wBAAwB;QACpD,OAAO,GAAGY,iBAAiBC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1C,OAAO,IAAID,mBAAmBX,uBAAuB;QACnD,OAAO,GAAGW,iBAAiBC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1C,OAAO;QACL,OAAO,GAAG,AAACD,CAAAA,mBAAmBV,uBAAsB,EAAGW,OAAO,CAAC,GAAG,EAAE,CAAC;IACvE;AACF;AAEA;;;;;;;;;;;CAWC,GACD,SAASC,gCAAgCC,cAAsB;IAC7D,MAAMC,WAAWC,OAAOF;IACxB,IAAIC,YAAYT,+BAA+B;QAC7C,OAAO,GAAG,AAACS,CAAAA,WAAWV,qBAAoB,EAAGO,OAAO,CAAC,GAAG,GAAG,CAAC;IAC9D,OAAO,IAAIG,YAAYR,oCAAoC;QACzD,OAAO,GAAG,AAACQ,CAAAA,WAAWb,sBAAqB,EAAGU,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7D,OAAO,IAAIG,YAAYP,mCAAmC;QACxD,OAAO,GAAG,AAACO,CAAAA,WAAWb,sBAAqB,EAAGU,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7D,OAAO,IAAIG,YAAYN,oCAAoC;QACzD,OAAO,GAAG,AAACM,CAAAA,WAAWZ,2BAA0B,EAAGS,OAAO,CAAC,GAAG,EAAE,CAAC;IACnE,OAAO;QACL,OAAO,GAAG,AAACG,CAAAA,WAAWX,2BAA0B,EAAGQ,OAAO,CAAC,GAAG,EAAE,CAAC;IACnE;AACF;AAEA;;;;;CAKC,GACD,OAAO,SAASK,gBAAgBC,MAAwB;IACtD,8CAA8C;IAC9C,OAAOA,MAAM,CAAC,EAAE,GAAGA,MAAM,CAAC,EAAE,GAAGhB;AACjC;AAEA;;;;;;CAMC,GACD,OAAO,SAASiB,6BAA6BD,MAAc;IACzD,OAAOL,gCAAgCK;AACzC;AAEA;;;;;;CAMC,GACD,OAAO,SAASE,uBAAuBF,MAAwB;IAC7D,OAAOR,iBAAiBO,gBAAgBC;AAC1C","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../src/build/duration-to-string.ts"],"sourcesContent":["// Time thresholds in seconds\nconst SECONDS_IN_MINUTE = 60\nconst MINUTES_THRESHOLD_SECONDS = 120 // 2 minutes\nconst SECONDS_THRESHOLD_HIGH = 40\nconst SECONDS_THRESHOLD_LOW = 2\nconst MILLISECONDS_PER_SECOND = 1000\n\n// Time thresholds and conversion factors for nanoseconds\nconst NANOSECONDS_PER_SECOND = 1_000_000_000\nconst NANOSECONDS_PER_MILLISECOND = 1_000_000\nconst NANOSECONDS_IN_MINUTE = 60_000_000_000 // 60 * 1_000_000_000\nconst MINUTES_THRESHOLD_NANOSECONDS = 120_000_000_000 // 2 minutes in nanoseconds\nconst SECONDS_THRESHOLD_HIGH_NANOSECONDS = 40_000_000_000 // 40 seconds in nanoseconds\nconst SECONDS_THRESHOLD_LOW_NANOSECONDS = 2_000_000_000 // 2 seconds in nanoseconds\nconst MILLISECONDS_THRESHOLD_NANOSECONDS = 2_000_000 // 2 milliseconds in nanoseconds\n\n/**\n * Converts a duration in seconds to a human-readable string format.\n * Formats duration based on magnitude for optimal readability:\n * - >= 2 minutes: show in minutes with 1 decimal place (e.g., \"2.5min\")\n * - >= 40 seconds: show in whole seconds (e.g., \"45s\")\n * - >= 2 seconds: show in seconds with 1 decimal place (e.g., \"3.2s\")\n * - < 2 seconds: show in whole milliseconds (e.g., \"1500ms\")\n *\n * @deprecated Use durationToStringWithNanoseconds instead, collect time in nanoseconds using process.hrtime.bigint().\n * @param compilerDuration - Duration in seconds as a number\n * @returns Formatted duration string with appropriate unit and precision\n */\nexport function durationToString(compilerDuration: number) {\n if (compilerDuration > MINUTES_THRESHOLD_SECONDS) {\n return `${(compilerDuration / SECONDS_IN_MINUTE).toFixed(1)}min`\n } else if (compilerDuration > SECONDS_THRESHOLD_HIGH) {\n return `${compilerDuration.toFixed(0)}s`\n } else if (compilerDuration > SECONDS_THRESHOLD_LOW) {\n return `${compilerDuration.toFixed(1)}s`\n } else {\n return `${(compilerDuration * MILLISECONDS_PER_SECOND).toFixed(0)}ms`\n }\n}\n\n/**\n * Converts a nanosecond duration to a human-readable string format.\n * Formats duration based on magnitude for optimal readability:\n * - >= 2 minutes: show in minutes with 1 decimal place (e.g., \"2.5min\")\n * - >= 40 seconds: show in whole seconds (e.g., \"45s\")\n * - >= 2 seconds: show in seconds with 1 decimal place (e.g., \"3.2s\")\n * - >= 2 milliseconds: show in whole milliseconds (e.g., \"250ms\")\n * - < 2 milliseconds: show in milliseconds with 1 decimal place (e.g., \"0.5ms\")\n *\n * @param durationBigInt - Duration in nanoseconds as a BigInt\n * @returns Formatted duration string with appropriate unit and precision\n */\nfunction durationToStringWithNanoseconds(durationBigInt: bigint): string {\n const duration = Number(durationBigInt)\n if (duration >= MINUTES_THRESHOLD_NANOSECONDS) {\n return `${(duration / NANOSECONDS_IN_MINUTE).toFixed(1)}min`\n } else if (duration >= SECONDS_THRESHOLD_HIGH_NANOSECONDS) {\n return `${(duration / NANOSECONDS_PER_SECOND).toFixed(0)}s`\n } else if (duration >= SECONDS_THRESHOLD_LOW_NANOSECONDS) {\n return `${(duration / NANOSECONDS_PER_SECOND).toFixed(1)}s`\n } else if (duration >= MILLISECONDS_THRESHOLD_NANOSECONDS) {\n return `${(duration / NANOSECONDS_PER_MILLISECOND).toFixed(0)}ms`\n } else {\n return `${(duration / NANOSECONDS_PER_MILLISECOND).toFixed(1)}ms`\n }\n}\n\n/**\n * Converts a high-resolution time tuple to seconds.\n *\n * @param hrtime - High-resolution time tuple of [seconds, nanoseconds]\n * @returns Duration in seconds as a floating-point number\n */\nexport function hrtimeToSeconds(hrtime: [number, number]): number {\n // hrtime is a tuple of [seconds, nanoseconds]\n return hrtime[0] + hrtime[1] / NANOSECONDS_PER_SECOND\n}\n\n/**\n * Converts a BigInt nanosecond duration to a human-readable string format.\n * This is the preferred method for formatting high-precision durations.\n *\n * @param hrtime - Duration in nanoseconds as a BigInt (typically from process.hrtime.bigint())\n * @returns Formatted duration string with appropriate unit and precision\n */\nexport function hrtimeBigIntDurationToString(hrtime: bigint) {\n return durationToStringWithNanoseconds(hrtime)\n}\n\n/**\n * Converts a high-resolution time tuple to a human-readable string format.\n *\n * @deprecated Use hrtimeBigIntDurationToString with process.hrtime.bigint() for better precision.\n * @param hrtime - High-resolution time tuple of [seconds, nanoseconds]\n * @returns Formatted duration string with appropriate unit and precision\n */\nexport function hrtimeDurationToString(hrtime: [number, number]): string {\n return durationToString(hrtimeToSeconds(hrtime))\n}\n"],"names":["SECONDS_IN_MINUTE","MINUTES_THRESHOLD_SECONDS","SECONDS_THRESHOLD_HIGH","SECONDS_THRESHOLD_LOW","MILLISECONDS_PER_SECOND","NANOSECONDS_PER_SECOND","NANOSECONDS_PER_MILLISECOND","NANOSECONDS_IN_MINUTE","MINUTES_THRESHOLD_NANOSECONDS","SECONDS_THRESHOLD_HIGH_NANOSECONDS","SECONDS_THRESHOLD_LOW_NANOSECONDS","MILLISECONDS_THRESHOLD_NANOSECONDS","durationToString","compilerDuration","toFixed","durationToStringWithNanoseconds","durationBigInt","duration","Number","hrtimeToSeconds","hrtime","hrtimeBigIntDurationToString","hrtimeDurationToString"],"mappings":"AAAA,6BAA6B;AAC7B,MAAMA,oBAAoB;AAC1B,MAAMC,4BAA4B,IAAI,YAAY;;AAClD,MAAMC,yBAAyB;AAC/B,MAAMC,wBAAwB;AAC9B,MAAMC,0BAA0B;AAEhC,yDAAyD;AACzD,MAAMC,yBAAyB;AAC/B,MAAMC,8BAA8B;AACpC,MAAMC,wBAAwB,YAAe,qBAAqB;;AAClE,MAAMC,gCAAgC,aAAgB,2BAA2B;;AACjF,MAAMC,qCAAqC,YAAe,4BAA4B;;AACtF,MAAMC,oCAAoC,WAAc,2BAA2B;;AACnF,MAAMC,qCAAqC,QAAU,gCAAgC;;AAErF;;;;;;;;;;;CAWC,GACD,OAAO,SAASC,iBAAiBC,gBAAwB;IACvD,IAAIA,mBAAmBZ,2BAA2B;QAChD,OAAO,GAAG,AAACY,CAAAA,mBAAmBb,iBAAgB,EAAGc,OAAO,CAAC,GAAG,GAAG,CAAC;IAClE,OAAO,IAAID,mBAAmBX,wBAAwB;QACpD,OAAO,GAAGW,iBAAiBC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1C,OAAO,IAAID,mBAAmBV,uBAAuB;QACnD,OAAO,GAAGU,iBAAiBC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1C,OAAO;QACL,OAAO,GAAG,AAACD,CAAAA,mBAAmBT,uBAAsB,EAAGU,OAAO,CAAC,GAAG,EAAE,CAAC;IACvE;AACF;AAEA;;;;;;;;;;;CAWC,GACD,SAASC,gCAAgCC,cAAsB;IAC7D,MAAMC,WAAWC,OAAOF;IACxB,IAAIC,YAAYT,+BAA+B;QAC7C,OAAO,GAAG,AAACS,CAAAA,WAAWV,qBAAoB,EAAGO,OAAO,CAAC,GAAG,GAAG,CAAC;IAC9D,OAAO,IAAIG,YAAYR,oCAAoC;QACzD,OAAO,GAAG,AAACQ,CAAAA,WAAWZ,sBAAqB,EAAGS,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7D,OAAO,IAAIG,YAAYP,mCAAmC;QACxD,OAAO,GAAG,AAACO,CAAAA,WAAWZ,sBAAqB,EAAGS,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7D,OAAO,IAAIG,YAAYN,oCAAoC;QACzD,OAAO,GAAG,AAACM,CAAAA,WAAWX,2BAA0B,EAAGQ,OAAO,CAAC,GAAG,EAAE,CAAC;IACnE,OAAO;QACL,OAAO,GAAG,AAACG,CAAAA,WAAWX,2BAA0B,EAAGQ,OAAO,CAAC,GAAG,EAAE,CAAC;IACnE;AACF;AAEA;;;;;CAKC,GACD,OAAO,SAASK,gBAAgBC,MAAwB;IACtD,8CAA8C;IAC9C,OAAOA,MAAM,CAAC,EAAE,GAAGA,MAAM,CAAC,EAAE,GAAGf;AACjC;AAEA;;;;;;CAMC,GACD,OAAO,SAASgB,6BAA6BD,MAAc;IACzD,OAAOL,gCAAgCK;AACzC;AAEA;;;;;;CAMC,GACD,OAAO,SAASE,uBAAuBF,MAAwB;IAC7D,OAAOR,iBAAiBO,gBAAgBC;AAC1C","ignoreList":[0]} |
@@ -14,3 +14,3 @@ import path from 'path'; | ||
| }({}); | ||
| const nextVersion = "16.3.0-canary.51"; | ||
| const nextVersion = "16.3.0-canary.52"; | ||
| const ArchName = arch(); | ||
@@ -17,0 +17,0 @@ const PlatformName = platform(); |
@@ -69,3 +69,3 @@ import path from 'path'; | ||
| isPersistentCachingEnabled: persistentCaching, | ||
| nextVersion: "16.3.0-canary.51" | ||
| nextVersion: "16.3.0-canary.52" | ||
| }, { | ||
@@ -72,0 +72,0 @@ turbopackMemoryEviction: config.experimental.turbopackMemoryEvictionMode, |
@@ -87,3 +87,3 @@ // Import cpu-profile first to start profiling early if enabled | ||
| deferredEntries: config.experimental.deferredEntries, | ||
| nextVersion: "16.3.0-canary.51" | ||
| nextVersion: "16.3.0-canary.52" | ||
| }; | ||
@@ -90,0 +90,0 @@ const sharedTurboOptions = { |
@@ -8,3 +8,3 @@ /** | ||
| import { setAttributesFromProps } from './set-attributes-from-props'; | ||
| const version = "16.3.0-canary.51"; | ||
| const version = "16.3.0-canary.52"; | ||
| window.next = { | ||
@@ -11,0 +11,0 @@ version, |
@@ -9,3 +9,2 @@ 'use client'; | ||
| import { addBasePath } from '../add-base-path'; | ||
| import { warnOnce } from '../../shared/lib/utils/warn-once'; | ||
| import { ScrollBehavior } from '../components/router-reducer/router-reducer-types'; | ||
@@ -15,3 +14,2 @@ import { IDLE_LINK_STATUS, mountLinkInstance, onNavigationIntent, unmountLinkForCurrentNavigation, unmountPrefetchableInstance } from '../components/links'; | ||
| import { FetchStrategy } from '../components/segment-cache/types'; | ||
| import { errorOnce } from '../../shared/lib/utils/error-once'; | ||
| function isModifiedEvent(event) { | ||
@@ -184,2 +182,3 @@ const eventTarget = event.currentTarget; | ||
| if (process.env.NODE_ENV !== 'production') { | ||
| const { warnOnce } = require('../../shared/lib/utils/warn-once'); | ||
| if (props.locale) { | ||
@@ -361,2 +360,3 @@ warnOnce('The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'); | ||
| if (process.env.NODE_ENV === 'development') { | ||
| const { errorOnce } = require('../../shared/lib/utils/error-once'); | ||
| errorOnce('`legacyBehavior` is deprecated and will be removed in a future ' + 'release. A codemod is available to upgrade your components:\n\n' + 'npx @next/codemod@latest new-link .\n\n' + 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'); | ||
@@ -363,0 +363,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../../src/client/app-dir/link.tsx"],"sourcesContent":["'use client'\n\nimport React, { createContext, useContext, useOptimistic, useRef } from 'react'\nimport type { UrlObject } from 'url'\nimport { formatUrl } from '../../shared/lib/router/utils/format-url'\nimport { AppRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useMergedRef } from '../use-merged-ref'\nimport { isAbsoluteUrl } from '../../shared/lib/utils'\nimport { addBasePath } from '../add-base-path'\nimport { warnOnce } from '../../shared/lib/utils/warn-once'\nimport { ScrollBehavior } from '../components/router-reducer/router-reducer-types'\nimport type { PENDING_LINK_STATUS } from '../components/links'\nimport {\n IDLE_LINK_STATUS,\n mountLinkInstance,\n onNavigationIntent,\n unmountLinkForCurrentNavigation,\n unmountPrefetchableInstance,\n type LinkInstance,\n} from '../components/links'\nimport { isLocalURL } from '../../shared/lib/router/utils/is-local-url'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n} from '../components/segment-cache/types'\nimport { errorOnce } from '../../shared/lib/utils/error-once'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * **Required**. The path or URL to navigate to. It can also be an object (similar to `URL`).\n *\n * @example\n * ```tsx\n * // Navigate to /dashboard:\n * <Link href=\"/dashboard\">Dashboard</Link>\n *\n * // Navigate to /about?name=test:\n * <Link href={{ pathname: '/about', query: { name: 'test' } }}>\n * About\n * </Link>\n * ```\n *\n * @remarks\n * - For external URLs, use a fully qualified URL such as `https://...`.\n * - In the App Router, dynamic routes must not include bracketed segments in `href`.\n */\n href: Url\n\n /**\n * @deprecated v10.0.0: `href` props pointing to a dynamic route are\n * automatically resolved and no longer require the `as` prop.\n */\n as?: Url\n\n /**\n * Replace the current `history` state instead of adding a new URL into the stack.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" replace>\n * About (replaces the history state)\n * </Link>\n * ```\n */\n replace?: boolean\n\n /**\n * Whether to override the default scroll behavior. If `true`, Next.js attempts to maintain\n * the scroll position if the newly navigated page is still visible. If not, it scrolls to the top.\n *\n * If `false`, Next.js will not modify the scroll behavior at all.\n *\n * @defaultValue `true`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" scroll={false}>\n * No auto scroll\n * </Link>\n * ```\n */\n scroll?: boolean\n\n /**\n * Update the path of the current page without rerunning data fetching methods\n * like `getStaticProps`, `getServerSideProps`, or `getInitialProps`.\n *\n * @remarks\n * `shallow` only applies to the Pages Router. For the App Router, see the\n * [following documentation](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#using-the-native-history-api).\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/blog\" shallow>\n * Shallow navigation\n * </Link>\n * ```\n */\n shallow?: boolean\n\n /**\n * Forces `Link` to pass its `href` to the child component. Useful if the child is a custom\n * component that wraps an `<a>` tag, or if you're using certain styling libraries.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" passHref legacyBehavior>\n * <MyStyledAnchor>Dashboard</MyStyledAnchor>\n * </Link>\n * ```\n */\n passHref?: boolean\n\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`.\n *\n * @remarks\n * Prefetching is only enabled in production.\n *\n * - In the **App Router**:\n * - `\"auto\"`, `null`, `undefined` (default): Prefetch behavior depends on static vs dynamic routes:\n * - Static routes: fully prefetched\n * - Dynamic routes: partial prefetch to the nearest segment with a `loading.js`\n * - `true`: Always prefetch the full route and data.\n * - `false`: Disable prefetching on both viewport and hover.\n * - In the **Pages Router**:\n * - `true` (default): Prefetches the route and data in the background on viewport or hover.\n * - `false`: Prefetch only on hover, not on viewport.\n *\n * @defaultValue `true` (Pages Router) or `null` (App Router)\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" prefetch={false}>\n * Dashboard\n * </Link>\n * ```\n */\n prefetch?: boolean | 'auto' | null\n\n /**\n * (unstable) Switch to a full prefetch on hover. Effectively the same as\n * updating the prefetch prop to `true` in a mouse event.\n */\n unstable_dynamicOnHover?: boolean\n\n /**\n * The active locale is automatically prepended in the Pages Router. `locale` allows for providing\n * a different locale, or can be set to `false` to opt out of automatic locale behavior.\n *\n * @remarks\n * Note: locale only applies in the Pages Router and is ignored in the App Router.\n *\n * @example\n * ```tsx\n * // Use the 'fr' locale:\n * <Link href=\"/about\" locale=\"fr\">\n * About (French)\n * </Link>\n *\n * // Disable locale prefix:\n * <Link href=\"/about\" locale={false}>\n * About (no locale prefix)\n * </Link>\n * ```\n */\n locale?: string | false\n\n /**\n * Enable legacy link behavior.\n *\n * @deprecated This will be removed in a future version\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n\n /**\n * Optional event handler for when the mouse pointer is moved onto the `<Link>`.\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n\n /**\n * Transition types to apply when navigating. These types are passed to\n * [`React.addTransitionType`](https://react.dev/reference/react/addTransitionType)\n * inside the navigation transition, enabling\n * [`<ViewTransition>`](https://react.dev/reference/react/ViewTransition) components\n * to apply different animations based on the type of navigation.\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" transitionTypes={['slide-in']}>About</Link>\n * ```\n */\n transitionTypes?: string[]\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps<RouteInferType = any> = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<Omit<InternalLinkProps, 'locale'>>\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n href: string,\n linkInstanceRef: React.RefObject<LinkInstance | null>,\n replace?: boolean,\n scroll?: boolean,\n onNavigate?: OnNavigateEventHandler,\n transitionTypes?: string[]\n): void {\n if (typeof window !== 'undefined') {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n if (\n (isAnchorNodeName && isModifiedEvent(e)) ||\n e.currentTarget.hasAttribute('download')\n ) {\n // ignore click for browser’s default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n const { dispatchNavigateAction } =\n require('../components/app-router-instance') as typeof import('../components/app-router-instance')\n\n React.startTransition(() => {\n dispatchNavigateAction(\n href,\n replace ? 'replace' : 'push',\n scroll === false ? ScrollBehavior.NoScroll : ScrollBehavior.Default,\n linkInstanceRef.current,\n transitionTypes\n )\n })\n }\n}\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide\n * [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation. This is the primary way to navigate between routes in Next.js.\n *\n * @remarks\n * - Prefetching is only enabled in production.\n *\n * @see https://nextjs.org/docs/app/api-reference/components/link\n */\nexport default function LinkComponent(\n props: LinkProps & {\n children: React.ReactNode\n ref: React.Ref<HTMLAnchorElement>\n }\n) {\n const [linkStatus, setOptimisticLinkStatus] = useOptimistic(IDLE_LINK_STATUS)\n\n let children: React.ReactNode\n\n const linkInstanceRef = useRef<LinkInstance | null>(null)\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n onClick,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n onNavigate,\n transitionTypes,\n ref: forwardedRef,\n unstable_dynamicOnHover,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(AppRouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n const fetchStrategy =\n prefetchProp !== false\n ? getFetchStrategyFromPrefetchProp(prefetchProp)\n : // TODO: it makes no sense to assign a fetchStrategy when prefetching is disabled.\n FetchStrategy.PPR\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n unstable_dynamicOnHover: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n onNavigate: true,\n transitionTypes: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'legacyBehavior' ||\n key === 'unstable_dynamicOnHover'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\"`',\n actual: valType,\n })\n }\n } else if (key === 'transitionTypes') {\n if (props[key] != null && !Array.isArray(props[key])) {\n throw createPropError({\n key,\n expected: '`string[]`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n }\n\n const resolvedHref = asProp || hrefProp\n const formattedHref = formatStringOrUrl(resolvedHref)\n\n if (process.env.NODE_ENV !== 'production') {\n if (props.locale) {\n warnOnce(\n 'The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'\n )\n }\n if (!asProp) {\n let href: string | undefined\n if (typeof resolvedHref === 'string') {\n href = resolvedHref\n } else if (\n typeof resolvedHref === 'object' &&\n typeof resolvedHref.pathname === 'string'\n ) {\n href = resolvedHref.pathname\n }\n\n if (href) {\n const hasDynamicSegment = href\n .split('/')\n .some((segment) => segment.startsWith('[') && segment.endsWith(']'))\n\n if (hasDynamicSegment) {\n throw new Error(\n `Dynamic href \\`${href}\\` found in <Link> while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`\n )\n }\n }\n }\n }\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if ((children as any)?.$$typeof === Symbol.for('react.lazy')) {\n throw new Error(\n `\\`<Link legacyBehavior>\\` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n // Capture the Owner Stack during render so dev-only warnings emitted later\n // at navigation time can be associated with the JSX that created\n // this <Link>.\n const ownerStack =\n process.env.NODE_ENV !== 'production' && process.env.__NEXT_CACHE_COMPONENTS\n ? // eslint-disable-next-line react-hooks/rules-of-hooks -- build time variables\n React.useMemo(() => {\n // Only capture when a warning might actually need it. Otherwise leave\n // it `undefined` so consumers can detect the opt-out and degrade\n // gracefully.\n if (fetchStrategy === FetchStrategy.Full) {\n return React.captureOwnerStack()\n }\n return undefined\n }, [fetchStrategy])\n : undefined\n\n // Use a callback ref to attach an IntersectionObserver to the anchor tag on\n // mount. In the future we will also use this to keep track of all the\n // currently mounted <Link> instances, e.g. so we can re-prefetch them after\n // a revalidation or refresh.\n const observeLinkVisibilityOnMount = React.useCallback(\n (element: HTMLAnchorElement | SVGAElement) => {\n if (router !== null) {\n linkInstanceRef.current = mountLinkInstance(\n element,\n formattedHref,\n router,\n fetchStrategy,\n prefetchEnabled,\n setOptimisticLinkStatus,\n ownerStack\n )\n }\n\n return () => {\n if (linkInstanceRef.current) {\n unmountLinkForCurrentNavigation(linkInstanceRef.current)\n linkInstanceRef.current = null\n }\n unmountPrefetchableInstance(element)\n }\n },\n [\n prefetchEnabled,\n formattedHref,\n router,\n fetchStrategy,\n setOptimisticLinkStatus,\n ownerStack,\n ]\n )\n\n const mergedRef = useMergedRef(observeLinkVisibilityOnMount, childRef)\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: mergedRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n if (e.defaultPrevented) {\n return\n }\n linkClicked(\n e,\n formattedHref,\n linkInstanceRef,\n replace,\n scroll,\n onNavigate,\n transitionTypes\n )\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled || process.env.NODE_ENV === 'development') {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled) {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the basePath.\n if (isAbsoluteUrl(formattedHref)) {\n childProps.href = formattedHref\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n childProps.href = addBasePath(formattedHref)\n }\n\n let link: React.ReactNode\n\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n errorOnce(\n '`legacyBehavior` is deprecated and will be removed in a future ' +\n 'release. A codemod is available to upgrade your components:\\n\\n' +\n 'npx @next/codemod@latest new-link .\\n\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'\n )\n }\n link = React.cloneElement(child, childProps)\n } else {\n link = (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n\n return (\n <LinkStatusContext.Provider value={linkStatus}>\n {link}\n </LinkStatusContext.Provider>\n )\n}\n\nconst LinkStatusContext = createContext<\n typeof PENDING_LINK_STATUS | typeof IDLE_LINK_STATUS\n>(IDLE_LINK_STATUS)\n\nexport const useLinkStatus = () => {\n return useContext(LinkStatusContext)\n}\n\nfunction getFetchStrategyFromPrefetchProp(\n prefetchProp: Exclude<LinkProps['prefetch'], undefined | false>\n): PrefetchTaskFetchStrategy {\n if (process.env.__NEXT_CACHE_COMPONENTS) {\n if (prefetchProp === true) {\n return FetchStrategy.Full\n }\n\n // `null` or `\"auto\"`: this is the default \"auto\" mode, where we will prefetch partially if the link is in the viewport.\n // This will also include invalid prop values that don't match the types specified here.\n // (although those should've been filtered out by prop validation in dev)\n prefetchProp satisfies null | 'auto'\n return FetchStrategy.PPR\n } else {\n return prefetchProp === null || prefetchProp === 'auto'\n ? // We default to PPR, and we'll discover whether or not the route supports it with the initial prefetch.\n FetchStrategy.PPR\n : // In the old implementation without runtime prefetches, `prefetch={true}` forces all dynamic data to be prefetched.\n // To preserve backwards-compatibility, anything other than `false`, `null`, or `\"auto\"` results in a full prefetch.\n // (although invalid values should've been filtered out by prop validation in dev)\n FetchStrategy.Full\n }\n}\n"],"names":["React","createContext","useContext","useOptimistic","useRef","formatUrl","AppRouterContext","useMergedRef","isAbsoluteUrl","addBasePath","warnOnce","ScrollBehavior","IDLE_LINK_STATUS","mountLinkInstance","onNavigationIntent","unmountLinkForCurrentNavigation","unmountPrefetchableInstance","isLocalURL","FetchStrategy","errorOnce","isModifiedEvent","event","eventTarget","currentTarget","target","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","href","linkInstanceRef","replace","scroll","onNavigate","transitionTypes","window","nodeName","isAnchorNodeName","toUpperCase","hasAttribute","preventDefault","location","isDefaultPrevented","dispatchNavigateAction","require","startTransition","NoScroll","Default","current","formatStringOrUrl","urlObjOrString","LinkComponent","props","linkStatus","setOptimisticLinkStatus","children","hrefProp","as","asProp","childrenProp","prefetch","prefetchProp","passHref","shallow","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","ref","forwardedRef","unstable_dynamicOnHover","restProps","a","router","prefetchEnabled","fetchStrategy","getFetchStrategyFromPrefetchProp","PPR","process","env","NODE_ENV","createPropError","args","Error","key","expected","actual","requiredPropsGuard","requiredProps","Object","keys","forEach","_","optionalPropsGuard","optionalProps","valType","Array","isArray","resolvedHref","formattedHref","locale","pathname","hasDynamicSegment","split","some","segment","startsWith","endsWith","child","$$typeof","Symbol","for","console","warn","Children","only","err","type","childRef","ownerStack","__NEXT_CACHE_COMPONENTS","useMemo","Full","captureOwnerStack","undefined","observeLinkVisibilityOnMount","useCallback","element","mergedRef","childProps","defaultPrevented","upgradeToDynamicPrefetch","__NEXT_LINK_NO_TOUCH_START","link","cloneElement","LinkStatusContext","Provider","value","useLinkStatus"],"mappings":"AAAA;;AAEA,OAAOA,SAASC,aAAa,EAAEC,UAAU,EAAEC,aAAa,EAAEC,MAAM,QAAQ,QAAO;AAE/E,SAASC,SAAS,QAAQ,2CAA0C;AACpE,SAASC,gBAAgB,QAAQ,qDAAoD;AACrF,SAASC,YAAY,QAAQ,oBAAmB;AAChD,SAASC,aAAa,QAAQ,yBAAwB;AACtD,SAASC,WAAW,QAAQ,mBAAkB;AAC9C,SAASC,QAAQ,QAAQ,mCAAkC;AAC3D,SAASC,cAAc,QAAQ,oDAAmD;AAElF,SACEC,gBAAgB,EAChBC,iBAAiB,EACjBC,kBAAkB,EAClBC,+BAA+B,EAC/BC,2BAA2B,QAEtB,sBAAqB;AAC5B,SAASC,UAAU,QAAQ,6CAA4C;AACvE,SACEC,aAAa,QAER,oCAAmC;AAC1C,SAASC,SAAS,QAAQ,oCAAmC;AAuN7D,SAASC,gBAAgBC,KAAuB;IAC9C,MAAMC,cAAcD,MAAME,aAAa;IACvC,MAAMC,SAASF,YAAYG,YAAY,CAAC;IACxC,OACE,AAACD,UAAUA,WAAW,WACtBH,MAAMK,OAAO,IACbL,MAAMM,OAAO,IACbN,MAAMO,QAAQ,IACdP,MAAMQ,MAAM,IAAI,6BAA6B;IAC5CR,MAAMS,WAAW,IAAIT,MAAMS,WAAW,CAACC,KAAK,KAAK;AAEtD;AAEA,SAASC,YACPC,CAAmB,EACnBC,IAAY,EACZC,eAAqD,EACrDC,OAAiB,EACjBC,MAAgB,EAChBC,UAAmC,EACnCC,eAA0B;IAE1B,IAAI,OAAOC,WAAW,aAAa;QACjC,MAAM,EAAEC,QAAQ,EAAE,GAAGR,EAAEV,aAAa;QAEpC,kDAAkD;QAClD,MAAMmB,mBAAmBD,SAASE,WAAW,OAAO;QACpD,IACE,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G,CAACyC,uBAAuB,EAAE;QACvC,IAAI7D,iBAAiB,MAAM;YACzB,OAAOhD,cAAc+G,IAAI;QAC3B;QAEA,wHAAwH;QACxH,wFAAwF;QACxF,yEAAyE;QACzE/D;QACA,OAAOhD,cAAckE,GAAG;IAC1B,OAAO;QACL,OAAOlB,iBAAiB,QAAQA,iBAAiB,SAE7ChD,cAAckE,GAAG,GAEjB,oHAAoH;QACpH,kFAAkF;QAClFlE,cAAc+G,IAAI;IACxB;AACF","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../../src/client/app-dir/link.tsx"],"sourcesContent":["'use client'\n\nimport React, { createContext, useContext, useOptimistic, useRef } from 'react'\nimport type { UrlObject } from 'url'\nimport { formatUrl } from '../../shared/lib/router/utils/format-url'\nimport { AppRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useMergedRef } from '../use-merged-ref'\nimport { isAbsoluteUrl } from '../../shared/lib/utils'\nimport { addBasePath } from '../add-base-path'\nimport { ScrollBehavior } from '../components/router-reducer/router-reducer-types'\nimport type { PENDING_LINK_STATUS } from '../components/links'\nimport {\n IDLE_LINK_STATUS,\n mountLinkInstance,\n onNavigationIntent,\n unmountLinkForCurrentNavigation,\n unmountPrefetchableInstance,\n type LinkInstance,\n} from '../components/links'\nimport { isLocalURL } from '../../shared/lib/router/utils/is-local-url'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n} from '../components/segment-cache/types'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * **Required**. The path or URL to navigate to. It can also be an object (similar to `URL`).\n *\n * @example\n * ```tsx\n * // Navigate to /dashboard:\n * <Link href=\"/dashboard\">Dashboard</Link>\n *\n * // Navigate to /about?name=test:\n * <Link href={{ pathname: '/about', query: { name: 'test' } }}>\n * About\n * </Link>\n * ```\n *\n * @remarks\n * - For external URLs, use a fully qualified URL such as `https://...`.\n * - In the App Router, dynamic routes must not include bracketed segments in `href`.\n */\n href: Url\n\n /**\n * @deprecated v10.0.0: `href` props pointing to a dynamic route are\n * automatically resolved and no longer require the `as` prop.\n */\n as?: Url\n\n /**\n * Replace the current `history` state instead of adding a new URL into the stack.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" replace>\n * About (replaces the history state)\n * </Link>\n * ```\n */\n replace?: boolean\n\n /**\n * Whether to override the default scroll behavior. If `true`, Next.js attempts to maintain\n * the scroll position if the newly navigated page is still visible. If not, it scrolls to the top.\n *\n * If `false`, Next.js will not modify the scroll behavior at all.\n *\n * @defaultValue `true`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" scroll={false}>\n * No auto scroll\n * </Link>\n * ```\n */\n scroll?: boolean\n\n /**\n * Update the path of the current page without rerunning data fetching methods\n * like `getStaticProps`, `getServerSideProps`, or `getInitialProps`.\n *\n * @remarks\n * `shallow` only applies to the Pages Router. For the App Router, see the\n * [following documentation](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#using-the-native-history-api).\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/blog\" shallow>\n * Shallow navigation\n * </Link>\n * ```\n */\n shallow?: boolean\n\n /**\n * Forces `Link` to pass its `href` to the child component. Useful if the child is a custom\n * component that wraps an `<a>` tag, or if you're using certain styling libraries.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" passHref legacyBehavior>\n * <MyStyledAnchor>Dashboard</MyStyledAnchor>\n * </Link>\n * ```\n */\n passHref?: boolean\n\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`.\n *\n * @remarks\n * Prefetching is only enabled in production.\n *\n * - In the **App Router**:\n * - `\"auto\"`, `null`, `undefined` (default): Prefetch behavior depends on static vs dynamic routes:\n * - Static routes: fully prefetched\n * - Dynamic routes: partial prefetch to the nearest segment with a `loading.js`\n * - `true`: Always prefetch the full route and data.\n * - `false`: Disable prefetching on both viewport and hover.\n * - In the **Pages Router**:\n * - `true` (default): Prefetches the route and data in the background on viewport or hover.\n * - `false`: Prefetch only on hover, not on viewport.\n *\n * @defaultValue `true` (Pages Router) or `null` (App Router)\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" prefetch={false}>\n * Dashboard\n * </Link>\n * ```\n */\n prefetch?: boolean | 'auto' | null\n\n /**\n * (unstable) Switch to a full prefetch on hover. Effectively the same as\n * updating the prefetch prop to `true` in a mouse event.\n */\n unstable_dynamicOnHover?: boolean\n\n /**\n * The active locale is automatically prepended in the Pages Router. `locale` allows for providing\n * a different locale, or can be set to `false` to opt out of automatic locale behavior.\n *\n * @remarks\n * Note: locale only applies in the Pages Router and is ignored in the App Router.\n *\n * @example\n * ```tsx\n * // Use the 'fr' locale:\n * <Link href=\"/about\" locale=\"fr\">\n * About (French)\n * </Link>\n *\n * // Disable locale prefix:\n * <Link href=\"/about\" locale={false}>\n * About (no locale prefix)\n * </Link>\n * ```\n */\n locale?: string | false\n\n /**\n * Enable legacy link behavior.\n *\n * @deprecated This will be removed in a future version\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n\n /**\n * Optional event handler for when the mouse pointer is moved onto the `<Link>`.\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n\n /**\n * Transition types to apply when navigating. These types are passed to\n * [`React.addTransitionType`](https://react.dev/reference/react/addTransitionType)\n * inside the navigation transition, enabling\n * [`<ViewTransition>`](https://react.dev/reference/react/ViewTransition) components\n * to apply different animations based on the type of navigation.\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" transitionTypes={['slide-in']}>About</Link>\n * ```\n */\n transitionTypes?: string[]\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps<RouteInferType = any> = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<Omit<InternalLinkProps, 'locale'>>\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n href: string,\n linkInstanceRef: React.RefObject<LinkInstance | null>,\n replace?: boolean,\n scroll?: boolean,\n onNavigate?: OnNavigateEventHandler,\n transitionTypes?: string[]\n): void {\n if (typeof window !== 'undefined') {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n if (\n (isAnchorNodeName && isModifiedEvent(e)) ||\n e.currentTarget.hasAttribute('download')\n ) {\n // ignore click for browser’s default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n const { dispatchNavigateAction } =\n require('../components/app-router-instance') as typeof import('../components/app-router-instance')\n\n React.startTransition(() => {\n dispatchNavigateAction(\n href,\n replace ? 'replace' : 'push',\n scroll === false ? ScrollBehavior.NoScroll : ScrollBehavior.Default,\n linkInstanceRef.current,\n transitionTypes\n )\n })\n }\n}\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide\n * [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation. This is the primary way to navigate between routes in Next.js.\n *\n * @remarks\n * - Prefetching is only enabled in production.\n *\n * @see https://nextjs.org/docs/app/api-reference/components/link\n */\nexport default function LinkComponent(\n props: LinkProps & {\n children: React.ReactNode\n ref: React.Ref<HTMLAnchorElement>\n }\n) {\n const [linkStatus, setOptimisticLinkStatus] = useOptimistic(IDLE_LINK_STATUS)\n\n let children: React.ReactNode\n\n const linkInstanceRef = useRef<LinkInstance | null>(null)\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n onClick,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n onNavigate,\n transitionTypes,\n ref: forwardedRef,\n unstable_dynamicOnHover,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(AppRouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n const fetchStrategy =\n prefetchProp !== false\n ? getFetchStrategyFromPrefetchProp(prefetchProp)\n : // TODO: it makes no sense to assign a fetchStrategy when prefetching is disabled.\n FetchStrategy.PPR\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n unstable_dynamicOnHover: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n onNavigate: true,\n transitionTypes: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'legacyBehavior' ||\n key === 'unstable_dynamicOnHover'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\"`',\n actual: valType,\n })\n }\n } else if (key === 'transitionTypes') {\n if (props[key] != null && !Array.isArray(props[key])) {\n throw createPropError({\n key,\n expected: '`string[]`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n }\n\n const resolvedHref = asProp || hrefProp\n const formattedHref = formatStringOrUrl(resolvedHref)\n\n if (process.env.NODE_ENV !== 'production') {\n const { warnOnce } =\n require('../../shared/lib/utils/warn-once') as typeof import('../../shared/lib/utils/warn-once')\n if (props.locale) {\n warnOnce(\n 'The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'\n )\n }\n if (!asProp) {\n let href: string | undefined\n if (typeof resolvedHref === 'string') {\n href = resolvedHref\n } else if (\n typeof resolvedHref === 'object' &&\n typeof resolvedHref.pathname === 'string'\n ) {\n href = resolvedHref.pathname\n }\n\n if (href) {\n const hasDynamicSegment = href\n .split('/')\n .some((segment) => segment.startsWith('[') && segment.endsWith(']'))\n\n if (hasDynamicSegment) {\n throw new Error(\n `Dynamic href \\`${href}\\` found in <Link> while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`\n )\n }\n }\n }\n }\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if ((children as any)?.$$typeof === Symbol.for('react.lazy')) {\n throw new Error(\n `\\`<Link legacyBehavior>\\` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${formattedHref}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n // Capture the Owner Stack during render so dev-only warnings emitted later\n // at navigation time can be associated with the JSX that created\n // this <Link>.\n const ownerStack =\n process.env.NODE_ENV !== 'production' && process.env.__NEXT_CACHE_COMPONENTS\n ? // eslint-disable-next-line react-hooks/rules-of-hooks -- build time variables\n React.useMemo(() => {\n // Only capture when a warning might actually need it. Otherwise leave\n // it `undefined` so consumers can detect the opt-out and degrade\n // gracefully.\n if (fetchStrategy === FetchStrategy.Full) {\n return React.captureOwnerStack()\n }\n return undefined\n }, [fetchStrategy])\n : undefined\n\n // Use a callback ref to attach an IntersectionObserver to the anchor tag on\n // mount. In the future we will also use this to keep track of all the\n // currently mounted <Link> instances, e.g. so we can re-prefetch them after\n // a revalidation or refresh.\n const observeLinkVisibilityOnMount = React.useCallback(\n (element: HTMLAnchorElement | SVGAElement) => {\n if (router !== null) {\n linkInstanceRef.current = mountLinkInstance(\n element,\n formattedHref,\n router,\n fetchStrategy,\n prefetchEnabled,\n setOptimisticLinkStatus,\n ownerStack\n )\n }\n\n return () => {\n if (linkInstanceRef.current) {\n unmountLinkForCurrentNavigation(linkInstanceRef.current)\n linkInstanceRef.current = null\n }\n unmountPrefetchableInstance(element)\n }\n },\n [\n prefetchEnabled,\n formattedHref,\n router,\n fetchStrategy,\n setOptimisticLinkStatus,\n ownerStack,\n ]\n )\n\n const mergedRef = useMergedRef(observeLinkVisibilityOnMount, childRef)\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: mergedRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n if (e.defaultPrevented) {\n return\n }\n linkClicked(\n e,\n formattedHref,\n linkInstanceRef,\n replace,\n scroll,\n onNavigate,\n transitionTypes\n )\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled || process.env.NODE_ENV === 'development') {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled) {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the basePath.\n if (isAbsoluteUrl(formattedHref)) {\n childProps.href = formattedHref\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n childProps.href = addBasePath(formattedHref)\n }\n\n let link: React.ReactNode\n\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n const { errorOnce } =\n require('../../shared/lib/utils/error-once') as typeof import('../../shared/lib/utils/error-once')\n errorOnce(\n '`legacyBehavior` is deprecated and will be removed in a future ' +\n 'release. A codemod is available to upgrade your components:\\n\\n' +\n 'npx @next/codemod@latest new-link .\\n\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'\n )\n }\n link = React.cloneElement(child, childProps)\n } else {\n link = (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n\n return (\n <LinkStatusContext.Provider value={linkStatus}>\n {link}\n </LinkStatusContext.Provider>\n )\n}\n\nconst LinkStatusContext = createContext<\n typeof PENDING_LINK_STATUS | typeof IDLE_LINK_STATUS\n>(IDLE_LINK_STATUS)\n\nexport const useLinkStatus = () => {\n return useContext(LinkStatusContext)\n}\n\nfunction getFetchStrategyFromPrefetchProp(\n prefetchProp: Exclude<LinkProps['prefetch'], undefined | false>\n): PrefetchTaskFetchStrategy {\n if (process.env.__NEXT_CACHE_COMPONENTS) {\n if (prefetchProp === true) {\n return FetchStrategy.Full\n }\n\n // `null` or `\"auto\"`: this is the default \"auto\" mode, where we will prefetch partially if the link is in the viewport.\n // This will also include invalid prop values that don't match the types specified here.\n // (although those should've been filtered out by prop validation in dev)\n prefetchProp satisfies null | 'auto'\n return FetchStrategy.PPR\n } else {\n return prefetchProp === null || prefetchProp === 'auto'\n ? // We default to PPR, and we'll discover whether or not the route supports it with the initial prefetch.\n FetchStrategy.PPR\n : // In the old implementation without runtime prefetches, `prefetch={true}` forces all dynamic data to be prefetched.\n // To preserve backwards-compatibility, anything other than `false`, `null`, or `\"auto\"` results in a full prefetch.\n // (although invalid values should've been filtered out by prop validation in dev)\n FetchStrategy.Full\n }\n}\n"],"names":["React","createContext","useContext","useOptimistic","useRef","formatUrl","AppRouterContext","useMergedRef","isAbsoluteUrl","addBasePath","ScrollBehavior","IDLE_LINK_STATUS","mountLinkInstance","onNavigationIntent","unmountLinkForCurrentNavigation","unmountPrefetchableInstance","isLocalURL","FetchStrategy","isModifiedEvent","event","eventTarget","currentTarget","target","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","href","linkInstanceRef","replace","scroll","onNavigate","transitionTypes","window","nodeName","isAnchorNodeName","toUpperCase","hasAttribute","preventDefault","location","isDefaultPrevented","dispatchNavigateAction","require","startTransition","NoScroll","Default","current","formatStringOrUrl","urlObjOrString","LinkComponent","props","linkStatus","setOptimisticLinkStatus","children","hrefProp","as","asProp","childrenProp","prefetch","prefetchProp","passHref","shallow","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","ref","forwardedRef","unstable_dynamicOnHover","restProps","a","router","prefetchEnabled","fetchStrategy","getFetchStrategyFromPrefetchProp","PPR","process","env","NODE_ENV","createPropError","args","Error","key","expected","actual","requiredPropsGuard","requiredProps","Object","keys","forEach","_","optionalPropsGuard","optionalProps","valType","Array","isArray","resolvedHref","formattedHref","warnOnce","locale","pathname","hasDynamicSegment","split","some","segment","startsWith","endsWith","child","$$typeof","Symbol","for","console","warn","Children","only","err","type","childRef","ownerStack","__NEXT_CACHE_COMPONENTS","useMemo","Full","captureOwnerStack","undefined","observeLinkVisibilityOnMount","useCallback","element","mergedRef","childProps","defaultPrevented","upgradeToDynamicPrefetch","__NEXT_LINK_NO_TOUCH_START","link","errorOnce","cloneElement","LinkStatusContext","Provider","value","useLinkStatus"],"mappings":"AAAA;;AAEA,OAAOA,SAASC,aAAa,EAAEC,UAAU,EAAEC,aAAa,EAAEC,MAAM,QAAQ,QAAO;AAE/E,SAASC,SAAS,QAAQ,2CAA0C;AACpE,SAASC,gBAAgB,QAAQ,qDAAoD;AACrF,SAASC,YAAY,QAAQ,oBAAmB;AAChD,SAASC,aAAa,QAAQ,yBAAwB;AACtD,SAASC,WAAW,QAAQ,mBAAkB;AAC9C,SAASC,cAAc,QAAQ,oDAAmD;AAElF,SACEC,gBAAgB,EAChBC,iBAAiB,EACjBC,kBAAkB,EAClBC,+BAA+B,EAC/BC,2BAA2B,QAEtB,sBAAqB;AAC5B,SAASC,UAAU,QAAQ,6CAA4C;AACvE,SACEC,aAAa,QAER,oCAAmC;AAuN1C,SAASC,gBAAgBC,KAAuB;IAC9C,MAAMC,cAAcD,MAAME,aAAa;IACvC,MAAMC,SAASF,YAAYG,YAAY,CAAC;IACxC,OACE,AAACD,UAAUA,WAAW,WACtBH,MAAMK,OAAO,IACbL,MAAMM,OAAO,IACbN,MAAMO,QAAQ,IACdP,MAAMQ,MAAM,IAAI,6BAA6B;IAC5CR,MAAMS,WAAW,IAAIT,MAAMS,WAAW,CAACC,KAAK,KAAK;AAEtD;AAEA,SAASC,YACPC,CAAmB,EACnBC,IAAY,EACZC,eAAqD,EACrDC,OAAiB,EACjBC,MAAgB,EAChBC,UAAmC,EACnCC,eAA0B;IAE1B,IAAI,OAAOC,W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C7B7E;;IAGP;IAEA,qBACE,KAACoF,kBAAkBC,QAAQ;QAACC,OAAOxF;kBAChCmF;;AAGP;AAEA,MAAMG,kCAAoB7I,cAExBU;AAEF,OAAO,MAAMsI,gBAAgB;IAC3B,OAAO/I,WAAW4I;AACpB,EAAC;AAED,SAAS7D,iCACPjB,YAA+D;IAE/D,IAAImB,QAAQC,GAAG,CAAC0C,uBAAuB,EAAE;QACvC,IAAI9D,iBAAiB,MAAM;YACzB,OAAO/C,cAAc+G,IAAI;QAC3B;QAEA,wHAAwH;QACxH,wFAAwF;QACxF,yEAAyE;QACzEhE;QACA,OAAO/C,cAAciE,GAAG;IAC1B,OAAO;QACL,OAAOlB,iBAAiB,QAAQA,iBAAiB,SAE7C/C,cAAciE,GAAG,GAEjB,oHAAoH;QACpH,kFAAkF;QAClFjE,cAAc+G,IAAI;IACxB;AACF","ignoreList":[0]} |
@@ -15,3 +15,2 @@ 'use client'; | ||
| import { HTTPAccessErrorStatus, getAccessFallbackHTTPStatus, getAccessFallbackErrorTypeByStatus, isHTTPAccessFallbackError } from './http-access-fallback'; | ||
| import { warnOnce } from '../../../shared/lib/utils/warn-once'; | ||
| import { MissingSlotContext } from '../../../shared/lib/app-router-context.shared-runtime'; | ||
@@ -29,2 +28,3 @@ class HTTPAccessFallbackErrorBoundary extends React.Component { | ||
| !this.props.missingSlots.has('children')) { | ||
| const { warnOnce } = require('../../../shared/lib/utils/warn-once'); | ||
| let warningMessage = 'No default component was found for a parallel route rendered on this page. Falling back to nearest NotFound boundary.\n' + 'Learn more: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#defaultjs\n\n'; | ||
@@ -31,0 +31,0 @@ const formattedSlots = Array.from(this.props.missingSlots).sort((a, b)=>a.localeCompare(b)).map((slot)=>`@${slot}`).join(', '); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../../../src/client/components/http-access-fallback/error-boundary.tsx"],"sourcesContent":["'use client'\n\n/**\n * HTTPAccessFallbackBoundary is a boundary that catches errors and renders a\n * fallback component for HTTP errors.\n *\n * It receives the status code, and determine if it should render fallbacks for few HTTP 4xx errors.\n *\n * e.g. 404\n * 404 represents not found, and the fallback component pair contains the component and its styles.\n *\n */\n\nimport React, { useContext } from 'react'\nimport { useUntrackedPathname } from '../navigation-untracked'\nimport {\n HTTPAccessErrorStatus,\n getAccessFallbackHTTPStatus,\n getAccessFallbackErrorTypeByStatus,\n isHTTPAccessFallbackError,\n} from './http-access-fallback'\nimport { warnOnce } from '../../../shared/lib/utils/warn-once'\nimport { MissingSlotContext } from '../../../shared/lib/app-router-context.shared-runtime'\n\ninterface HTTPAccessFallbackBoundaryProps {\n notFound?: React.ReactNode\n forbidden?: React.ReactNode\n unauthorized?: React.ReactNode\n // TODO: Make this required once `React.createElement` understands that positional args go into children\n children?: React.ReactNode\n missingSlots?: Set<string>\n}\n\ninterface HTTPAccessFallbackErrorBoundaryProps\n extends HTTPAccessFallbackBoundaryProps {\n pathname: string | null\n missingSlots?: Set<string>\n}\n\ninterface HTTPAccessBoundaryState {\n triggeredStatus: number | undefined\n previousPathname: string | null\n}\n\nclass HTTPAccessFallbackErrorBoundary extends React.Component<\n HTTPAccessFallbackErrorBoundaryProps,\n HTTPAccessBoundaryState\n> {\n constructor(props: HTTPAccessFallbackErrorBoundaryProps) {\n super(props)\n this.state = {\n triggeredStatus: undefined,\n previousPathname: props.pathname,\n }\n }\n\n componentDidCatch(): void {\n if (\n process.env.NODE_ENV === 'development' &&\n this.props.missingSlots &&\n this.props.missingSlots.size > 0 &&\n // A missing children slot is the typical not-found case, so no need to warn\n !this.props.missingSlots.has('children')\n ) {\n let warningMessage =\n 'No default component was found for a parallel route rendered on this page. Falling back to nearest NotFound boundary.\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#defaultjs\\n\\n'\n\n const formattedSlots = Array.from(this.props.missingSlots)\n .sort((a, b) => a.localeCompare(b))\n .map((slot) => `@${slot}`)\n .join(', ')\n\n warningMessage += 'Missing slots: ' + formattedSlots\n\n warnOnce(warningMessage)\n }\n }\n\n static getDerivedStateFromError(error: unknown) {\n if (isHTTPAccessFallbackError(error)) {\n const httpStatus = getAccessFallbackHTTPStatus(error)\n return {\n triggeredStatus: httpStatus,\n }\n }\n // Re-throw if error is not for 404\n throw error\n }\n\n static getDerivedStateFromProps(\n props: HTTPAccessFallbackErrorBoundaryProps,\n state: HTTPAccessBoundaryState\n ): HTTPAccessBoundaryState | null {\n /**\n * Handles reset of the error boundary when a navigation happens.\n * Ensures the error boundary does not stay enabled when navigating to a new page.\n * Approach of setState in render is safe as it checks the previous pathname and then overrides\n * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\n if (props.pathname !== state.previousPathname && state.triggeredStatus) {\n return {\n triggeredStatus: undefined,\n previousPathname: props.pathname,\n }\n }\n return {\n triggeredStatus: state.triggeredStatus,\n previousPathname: props.pathname,\n }\n }\n\n render() {\n const { notFound, forbidden, unauthorized, children } = this.props\n const { triggeredStatus } = this.state\n const errorComponents = {\n [HTTPAccessErrorStatus.NOT_FOUND]: notFound,\n [HTTPAccessErrorStatus.FORBIDDEN]: forbidden,\n [HTTPAccessErrorStatus.UNAUTHORIZED]: unauthorized,\n }\n\n if (triggeredStatus) {\n const isNotFound =\n triggeredStatus === HTTPAccessErrorStatus.NOT_FOUND && notFound\n const isForbidden =\n triggeredStatus === HTTPAccessErrorStatus.FORBIDDEN && forbidden\n const isUnauthorized =\n triggeredStatus === HTTPAccessErrorStatus.UNAUTHORIZED && unauthorized\n\n // If there's no matched boundary in this layer, keep throwing the error by rendering the children\n if (!(isNotFound || isForbidden || isUnauthorized)) {\n return children\n }\n\n return (\n <>\n <meta name=\"robots\" content=\"noindex\" />\n {process.env.NODE_ENV === 'development' && (\n <meta\n name=\"boundary-next-error\"\n content={getAccessFallbackErrorTypeByStatus(triggeredStatus)}\n />\n )}\n {errorComponents[triggeredStatus]}\n </>\n )\n }\n\n return children\n }\n}\n\nexport function HTTPAccessFallbackBoundary({\n notFound,\n forbidden,\n unauthorized,\n children,\n}: HTTPAccessFallbackBoundaryProps) {\n // When we're rendering the missing params shell, this will return null. This\n // is because we won't be rendering any not found boundaries or error\n // boundaries for the missing params shell. When this runs on the client\n // (where these error can occur), we will get the correct pathname.\n const pathname = useUntrackedPathname()\n const missingSlots = useContext(MissingSlotContext)\n const hasErrorFallback = !!(notFound || forbidden || unauthorized)\n\n if (hasErrorFallback) {\n return (\n <HTTPAccessFallbackErrorBoundary\n pathname={pathname}\n notFound={notFound}\n forbidden={forbidden}\n unauthorized={unauthorized}\n missingSlots={missingSlots}\n >\n {children}\n </HTTPAccessFallbackErrorBoundary>\n )\n }\n\n return <>{children}</>\n}\n"],"names":["React","useContext","useUntrackedPathname","HTTPAccessErrorStatus","getAccessFallbackHTTPStatus","getAccessFallbackErrorTypeByStatus","isHTTPAccessFallbackError","warnOnce","MissingSlotContext","HTTPAccessFallbackErrorBoundary","Component","constructor","props","state","triggeredStatus","undefined","previousPathname","pathname","componentDidCatch","process","env","NODE_ENV","missingSlots","size","has","warningMessage","formattedSlots","Array","from","sort","a","b","localeCompare","map","slot","join","getDerivedStateFromError","error","httpStatus","getDerivedStateFromProps","render","notFound","forbidden","unauthorized","children","errorComponents","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","isNotFound","isForbidden","isUnauthorized","meta","name","content","HTTPAccessFallbackBoundary","hasErrorFallback"],"mappings":"AAAA;;AAEA;;;;;;;;;CASC,GAED,OAAOA,SAASC,UAAU,QAAQ,QAAO;AACzC,SAASC,oBAAoB,QAAQ,0BAAyB;AAC9D,SACEC,qBAAqB,EACrBC,2BAA2B,EAC3BC,kCAAkC,EAClCC,yBAAyB,QACpB,yBAAwB;AAC/B,SAASC,QAAQ,QAAQ,sCAAqC;AAC9D,SAASC,kBAAkB,QAAQ,wDAAuD;AAsB1F,MAAMC,wCAAwCT,MAAMU,SAAS;IAI3DC,YAAYC,KAA2C,CAAE;QACvD,KAAK,CAACA;QACN,IAAI,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AAK;QACtC,MAAMgC,kBAAkB;YACtB,CAAC1C,sBAAsB2C,SAAS,CAAC,EAAEL;YACnC,CAACtC,sBAAsB4C,SAAS,CAAC,EAAEL;YACnC,CAACvC,sBAAsB6C,YAAY,CAAC,EAAEL;QACxC;QAEA,IAAI7B,iBAAiB;YACnB,MAAMmC,aACJnC,oBAAoBX,sBAAsB2C,SAAS,IAAIL;YACzD,MAAMS,cACJpC,oBAAoBX,sBAAsB4C,SAAS,IAAIL;YACzD,MAAMS,iBACJrC,oBAAoBX,sBAAsB6C,YAAY,IAAIL;YAE5D,kGAAkG;YAClG,IAAI,CAAEM,CAAAA,cAAcC,eAAeC,cAAa,GAAI;gBAClD,OAAOP;YACT;YAEA,qBACE;;kCACE,KAACQ;wBAAKC,MAAK;wBAASC,SAAQ;;oBAC3BnC,QAAQC,GAAG,CAACC,QAAQ,KAAK,+BACxB,KAAC+B;wBACCC,MAAK;wBACLC,SAASjD,mCAAmCS;;oBAG/C+B,eAAe,CAAC/B,gBAAgB;;;QAGvC;QAEA,OAAO8B;IACT;AACF;AAEA,OAAO,SAASW,2BAA2B,EACzCd,QAAQ,EACRC,SAAS,EACTC,YAAY,EACZC,QAAQ,EACwB;IAChC,6EAA6E;IAC7E,qEAAqE;IACrE,wEAAwE;IACxE,mEAAmE;IACnE,MAAM3B,WAAWf;IACjB,MAAMoB,eAAerB,WAAWO;IAChC,MAAMgD,mBAAmB,CAAC,CAAEf,CAAAA,YAAYC,aAAaC,YAAW;IAEhE,IAAIa,kBAAkB;QACpB,qBACE,KAAC/C;YACCQ,UAAUA;YACVwB,UAAUA;YACVC,WAAWA;YACXC,cAAcA;YACdrB,cAAcA;sBAEbsB;;IAGP;IAEA,qBAAO;kBAAGA;;AACZ","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../../../src/client/components/http-access-fallback/error-boundary.tsx"],"sourcesContent":["'use client'\n\n/**\n * HTTPAccessFallbackBoundary is a boundary that catches errors and renders a\n * fallback component for HTTP errors.\n *\n * It receives the status code, and determine if it should render fallbacks for few HTTP 4xx errors.\n *\n * e.g. 404\n * 404 represents not found, and the fallback component pair contains the component and its styles.\n *\n */\n\nimport React, { useContext } from 'react'\nimport { useUntrackedPathname } from '../navigation-untracked'\nimport {\n HTTPAccessErrorStatus,\n getAccessFallbackHTTPStatus,\n getAccessFallbackErrorTypeByStatus,\n isHTTPAccessFallbackError,\n} from './http-access-fallback'\nimport { MissingSlotContext } from '../../../shared/lib/app-router-context.shared-runtime'\n\ninterface HTTPAccessFallbackBoundaryProps {\n notFound?: React.ReactNode\n forbidden?: React.ReactNode\n unauthorized?: React.ReactNode\n // TODO: Make this required once `React.createElement` understands that positional args go into children\n children?: React.ReactNode\n missingSlots?: Set<string>\n}\n\ninterface HTTPAccessFallbackErrorBoundaryProps\n extends HTTPAccessFallbackBoundaryProps {\n pathname: string | null\n missingSlots?: Set<string>\n}\n\ninterface HTTPAccessBoundaryState {\n triggeredStatus: number | undefined\n previousPathname: string | null\n}\n\nclass HTTPAccessFallbackErrorBoundary extends React.Component<\n HTTPAccessFallbackErrorBoundaryProps,\n HTTPAccessBoundaryState\n> {\n constructor(props: HTTPAccessFallbackErrorBoundaryProps) {\n super(props)\n this.state = {\n triggeredStatus: undefined,\n previousPathname: props.pathname,\n }\n }\n\n componentDidCatch(): void {\n if (\n process.env.NODE_ENV === 'development' &&\n this.props.missingSlots &&\n this.props.missingSlots.size > 0 &&\n // A missing children slot is the typical not-found case, so no need to warn\n !this.props.missingSlots.has('children')\n ) {\n const { warnOnce } =\n require('../../../shared/lib/utils/warn-once') as typeof import('../../../shared/lib/utils/warn-once')\n let warningMessage =\n 'No default component was found for a parallel route rendered on this page. Falling back to nearest NotFound boundary.\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#defaultjs\\n\\n'\n\n const formattedSlots = Array.from(this.props.missingSlots)\n .sort((a, b) => a.localeCompare(b))\n .map((slot) => `@${slot}`)\n .join(', ')\n\n warningMessage += 'Missing slots: ' + formattedSlots\n\n warnOnce(warningMessage)\n }\n }\n\n static getDerivedStateFromError(error: unknown) {\n if (isHTTPAccessFallbackError(error)) {\n const httpStatus = getAccessFallbackHTTPStatus(error)\n return {\n triggeredStatus: httpStatus,\n }\n }\n // Re-throw if error is not for 404\n throw error\n }\n\n static getDerivedStateFromProps(\n props: HTTPAccessFallbackErrorBoundaryProps,\n state: HTTPAccessBoundaryState\n ): HTTPAccessBoundaryState | null {\n /**\n * Handles reset of the error boundary when a navigation happens.\n * Ensures the error boundary does not stay enabled when navigating to a new page.\n * Approach of setState in render is safe as it checks the previous pathname and then overrides\n * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\n if (props.pathname !== state.previousPathname && state.triggeredStatus) {\n return {\n triggeredStatus: undefined,\n previousPathname: props.pathname,\n }\n }\n return {\n triggeredStatus: state.triggeredStatus,\n previousPathname: props.pathname,\n }\n }\n\n render() {\n const { notFound, forbidden, unauthorized, children } = this.props\n const { triggeredStatus } = this.state\n const errorComponents = {\n [HTTPAccessErrorStatus.NOT_FOUND]: notFound,\n [HTTPAccessErrorStatus.FORBIDDEN]: forbidden,\n [HTTPAccessErrorStatus.UNAUTHORIZED]: unauthorized,\n }\n\n if (triggeredStatus) {\n const isNotFound =\n triggeredStatus === HTTPAccessErrorStatus.NOT_FOUND && notFound\n const isForbidden =\n triggeredStatus === HTTPAccessErrorStatus.FORBIDDEN && forbidden\n const isUnauthorized =\n triggeredStatus === HTTPAccessErrorStatus.UNAUTHORIZED && unauthorized\n\n // If there's no matched boundary in this layer, keep throwing the error by rendering the children\n if (!(isNotFound || isForbidden || isUnauthorized)) {\n return children\n }\n\n return (\n <>\n <meta name=\"robots\" content=\"noindex\" />\n {process.env.NODE_ENV === 'development' && (\n <meta\n name=\"boundary-next-error\"\n content={getAccessFallbackErrorTypeByStatus(triggeredStatus)}\n />\n )}\n {errorComponents[triggeredStatus]}\n </>\n )\n }\n\n return children\n }\n}\n\nexport function HTTPAccessFallbackBoundary({\n notFound,\n forbidden,\n unauthorized,\n children,\n}: HTTPAccessFallbackBoundaryProps) {\n // When we're rendering the missing params shell, this will return null. This\n // is because we won't be rendering any not found boundaries or error\n // boundaries for the missing params shell. When this runs on the client\n // (where these error can occur), we will get the correct pathname.\n const pathname = useUntrackedPathname()\n const missingSlots = useContext(MissingSlotContext)\n const hasErrorFallback = !!(notFound || forbidden || unauthorized)\n\n if (hasErrorFallback) {\n return (\n <HTTPAccessFallbackErrorBoundary\n pathname={pathname}\n notFound={notFound}\n forbidden={forbidden}\n unauthorized={unauthorized}\n missingSlots={missingSlots}\n >\n {children}\n </HTTPAccessFallbackErrorBoundary>\n )\n }\n\n return <>{children}</>\n}\n"],"names":["React","useContext","useUntrackedPathname","HTTPAccessErrorStatus","getAccessFallbackHTTPStatus","getAccessFallbackErrorTypeByStatus","isHTTPAccessFallbackError","MissingSlotContext","HTTPAccessFallbackErrorBoundary","Component","constructor","props","state","triggeredStatus","undefined","previousPathname","pathname","componentDidCatch","process","env","NODE_ENV","missingSlots","size","has","warnOnce","require","warningMessage","formattedSlots","Array","from","sort","a","b","localeCompare","map","slot","join","getDerivedStateFromError","error","httpStatus","getDerivedStateFromProps","render","notFound","forbidden","unauthorized","children","errorComponents","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","isNotFound","isForbidden","isUnauthorized","meta","name","content","HTTPAccessFallbackBoundary","hasErrorFallback"],"mappings":"AAAA;;AAEA;;;;;;;;;CASC,GAED,OAAOA,SAASC,UAAU,QAAQ,QAAO;AACzC,SAASC,oBAAoB,QAAQ,0BAAyB;AAC9D,SACEC,qBAAqB,EACrBC,2BAA2B,EAC3BC,kCAAkC,EAClCC,yBAAyB,QACpB,yBAAwB;AAC/B,SAASC,kBAAkB,QAAQ,wDAAuD;AAsB1F,MAAMC,wCAAwCR,MAAMS,SAAS;IAI3DC,YAAYC,KAA2C,CAAE;QACvD,KAAK,CAACA;QACN,IAAI,CAACC,KAAK,GAAG;YACXC,iBAAiBC;YACjBC,kB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AAK;QACtC,MAAMkC,kBAAkB;YACtB,CAAC3C,sBAAsB4C,SAAS,CAAC,EAAEL;YACnC,CAACvC,sBAAsB6C,SAAS,CAAC,EAAEL;YACnC,CAACxC,sBAAsB8C,YAAY,CAAC,EAAEL;QACxC;QAEA,IAAI/B,iBAAiB;YACnB,MAAMqC,aACJrC,oBAAoBV,sBAAsB4C,SAAS,IAAIL;YACzD,MAAMS,cACJtC,oBAAoBV,sBAAsB6C,SAAS,IAAIL;YACzD,MAAMS,iBACJvC,oBAAoBV,sBAAsB8C,YAAY,IAAIL;YAE5D,kGAAkG;YAClG,IAAI,CAAEM,CAAAA,cAAcC,eAAeC,cAAa,GAAI;gBAClD,OAAOP;YACT;YAEA,qBACE;;kCACE,KAACQ;wBAAKC,MAAK;wBAASC,SAAQ;;oBAC3BrC,QAAQC,GAAG,CAACC,QAAQ,KAAK,+BACxB,KAACiC;wBACCC,MAAK;wBACLC,SAASlD,mCAAmCQ;;oBAG/CiC,eAAe,CAACjC,gBAAgB;;;QAGvC;QAEA,OAAOgC;IACT;AACF;AAEA,OAAO,SAASW,2BAA2B,EACzCd,QAAQ,EACRC,SAAS,EACTC,YAAY,EACZC,QAAQ,EACwB;IAChC,6EAA6E;IAC7E,qEAAqE;IACrE,wEAAwE;IACxE,mEAAmE;IACnE,MAAM7B,WAAWd;IACjB,MAAMmB,eAAepB,WAAWM;IAChC,MAAMkD,mBAAmB,CAAC,CAAEf,CAAAA,YAAYC,aAAaC,YAAW;IAEhE,IAAIa,kBAAkB;QACpB,qBACE,KAACjD;YACCQ,UAAUA;YACV0B,UAAUA;YACVC,WAAWA;YACXC,cAAcA;YACdvB,cAAcA;sBAEbwB;;IAGP;IAEA,qBAAO;kBAAGA;;AACZ","ignoreList":[0]} |
@@ -9,3 +9,2 @@ 'use client'; | ||
| import { ImageConfigContext } from '../shared/lib/image-config-context.shared-runtime'; | ||
| import { warnOnce } from '../shared/lib/utils/warn-once'; | ||
| import { RouterContext } from '../shared/lib/router-context.shared-runtime'; | ||
@@ -75,2 +74,3 @@ // This is replaced by webpack alias | ||
| if (process.env.NODE_ENV !== 'production') { | ||
| const { warnOnce } = require('../shared/lib/utils/warn-once'); | ||
| const origSrc = new URL(src, 'http://n').searchParams.get('url') || src; | ||
@@ -77,0 +77,0 @@ if (img.getAttribute('data-nimg') === 'fill') { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../src/client/image-component.tsx"],"sourcesContent":["'use client'\n\nimport React, {\n useRef,\n useEffect,\n useContext,\n useMemo,\n useState,\n forwardRef,\n use,\n useLayoutEffect,\n} from 'react'\nimport ReactDOM from 'react-dom'\nimport Head from '../shared/lib/head'\nimport { getImgProps } from '../shared/lib/get-img-props'\nimport type {\n ImageProps,\n ImgProps,\n OnLoad,\n OnLoadingComplete,\n PlaceholderValue,\n} from '../shared/lib/get-img-props'\nimport type {\n ImageConfigComplete,\n ImageLoaderProps,\n} from '../shared/lib/image-config'\nimport { imageConfigDefault } from '../shared/lib/image-config'\nimport { ImageConfigContext } from '../shared/lib/image-config-context.shared-runtime'\nimport { warnOnce } from '../shared/lib/utils/warn-once'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\n\n// This is replaced by webpack alias\nimport defaultLoader from 'next/dist/shared/lib/image-loader'\nimport { useMergedRef } from './use-merged-ref'\n\n// This is replaced by webpack define plugin\nconst configEnv = process.env.__NEXT_IMAGE_OPTS as any as ImageConfigComplete\n\nif (typeof window === 'undefined') {\n ;(globalThis as any).__NEXT_IMAGE_IMPORTED = true\n}\n\nexport type { ImageLoaderProps }\nexport type ImageLoader = (p: ImageLoaderProps) => string\n\ntype ImgElementWithDataProp = HTMLImageElement & {\n 'data-loaded-src'?: string | undefined\n}\n\ntype ImageElementProps = ImgProps & {\n unoptimized: boolean\n placeholder: PlaceholderValue\n onLoadRef: React.MutableRefObject<OnLoad | undefined>\n onLoadingCompleteRef: React.MutableRefObject<OnLoadingComplete | undefined>\n setBlurComplete: (b: boolean) => void\n setShowAltText: (b: boolean) => void\n sizesInput: string | undefined\n}\n\n// See https://stackoverflow.com/q/39777833/266535 for why we use this ref\n// handler instead of the img's onLoad attribute.\nfunction handleLoading(\n img: ImgElementWithDataProp,\n placeholder: PlaceholderValue,\n onLoadRef: React.MutableRefObject<OnLoad | undefined>,\n onLoadingCompleteRef: React.MutableRefObject<OnLoadingComplete | undefined>,\n setBlurComplete: (b: boolean) => void,\n unoptimized: boolean,\n sizesInput: string | undefined\n) {\n const src = img?.src\n if (!img || img['data-loaded-src'] === src) {\n return\n }\n img['data-loaded-src'] = src\n const p = 'decode' in img ? img.decode() : Promise.resolve()\n p.catch(() => {}).then(() => {\n if (!img.parentElement || !img.isConnected) {\n // Exit early in case of race condition:\n // - onload() is called\n // - decode() is called but incomplete\n // - unmount is called\n // - decode() completes\n return\n }\n if (placeholder !== 'empty') {\n setBlurComplete(true)\n }\n if (onLoadRef?.current) {\n // Since we don't have the SyntheticEvent here,\n // we must create one with the same shape.\n // See https://reactjs.org/docs/events.html\n const event = new Event('load')\n Object.defineProperty(event, 'target', { writable: false, value: img })\n let prevented = false\n let stopped = false\n onLoadRef.current({\n ...event,\n nativeEvent: event,\n currentTarget: img,\n target: img,\n isDefaultPrevented: () => prevented,\n isPropagationStopped: () => stopped,\n persist: () => {},\n preventDefault: () => {\n prevented = true\n event.preventDefault()\n },\n stopPropagation: () => {\n stopped = true\n event.stopPropagation()\n },\n })\n }\n if (onLoadingCompleteRef?.current) {\n onLoadingCompleteRef.current(img)\n }\n if (process.env.NODE_ENV !== 'production') {\n const origSrc = new URL(src, 'http://n').searchParams.get('url') || src\n if (img.getAttribute('data-nimg') === 'fill') {\n if (!unoptimized && (!sizesInput || sizesInput === '100vw')) {\n let widthViewportRatio =\n img.getBoundingClientRect().width / window.innerWidth\n if (widthViewportRatio < 0.6) {\n if (sizesInput === '100vw') {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" prop and \"sizes\" prop of \"100vw\", but image is not rendered at full viewport width. Please adjust \"sizes\" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`\n )\n } else {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" but is missing \"sizes\" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`\n )\n }\n }\n }\n if (img.parentElement) {\n const { position } = window.getComputedStyle(img.parentElement)\n const valid = ['absolute', 'fixed', 'relative']\n if (!valid.includes(position)) {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" and parent element with invalid \"position\". Provided \"${position}\" should be one of ${valid\n .map(String)\n .join(',')}.`\n )\n }\n }\n if (img.height === 0) {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.`\n )\n }\n }\n\n const heightModified =\n img.height.toString() !== img.getAttribute('height')\n const widthModified = img.width.toString() !== img.getAttribute('width')\n if (\n (heightModified && !widthModified) ||\n (!heightModified && widthModified)\n ) {\n warnOnce(\n `Image with src \"${origSrc}\" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: \"auto\"' or 'height: \"auto\"' to maintain the aspect ratio.`\n )\n }\n }\n })\n}\n\nfunction getDynamicProps(\n fetchPriority?: string\n): Record<string, string | undefined> {\n if (Boolean(use)) {\n // In React 19.0.0 or newer, we must use camelCase\n // prop to avoid \"Warning: Invalid DOM property\".\n // See https://github.com/facebook/react/pull/25927\n return { fetchPriority }\n }\n // In React 18.2.0 or older, we must use lowercase prop\n // to avoid \"Warning: Invalid DOM property\".\n return { fetchpriority: fetchPriority }\n}\n\n/**\n * A version of useLayoutEffect that doesn't warn during SSR.\n * TODO: Just useLayoutEffect once support for React 18 is dropped.\n * Do not rename this to \"isomorphic layout effect\". There is no such thing as\n * an isomorphic Layout Effect since there is no Layout on the server\n */\nconst useNonWarningLayoutEffect =\n typeof window === 'undefined' ? useEffect : useLayoutEffect\n\nconst ImageElement = forwardRef<HTMLImageElement | null, ImageElementProps>(\n (\n {\n src,\n srcSet,\n sizes,\n height,\n width,\n decoding,\n className,\n style,\n fetchPriority,\n placeholder,\n loading,\n unoptimized,\n fill,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n setShowAltText,\n sizesInput,\n onLoad,\n onError,\n ...rest\n },\n forwardedRef\n ) => {\n const didInsertRef = useRef(false)\n const insertedImgRef = useRef<HTMLImageElement>(null)\n\n useNonWarningLayoutEffect(() => {\n const { current: didInsert } = didInsertRef\n const { current: img } = insertedImgRef\n\n if (!didInsert && img !== null) {\n // Replay events from during hydration that React doesn't replay.\n if (onError) {\n // If the image has an error before react hydrates, then the error is lost.\n // The workaround is to wait until the image is mounted which is after hydration,\n // then we set the src again to trigger the error handler (if there was an error).\n // This doesn't just trigger the error handler but retries the whole request.\n // TODO: Consider dispatching a synthetic event instead.\n // eslint-disable-next-line no-self-assign\n img.src = img.src\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!src) {\n console.error(`Image is missing required \"src\" property:`, img)\n }\n if (img.getAttribute('alt') === null) {\n console.error(\n `Image is missing required \"alt\" property. Please add Alternative Text to describe the image for screen readers and search engines.`\n )\n }\n }\n if (img.complete) {\n handleLoading(\n img,\n placeholder,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n unoptimized,\n sizesInput\n )\n }\n didInsertRef.current = true\n }\n }, [\n src,\n placeholder,\n onLoadRef,\n onLoadingCompleteRef,\n onError,\n unoptimized,\n sizesInput,\n ])\n\n const ref = useMergedRef(forwardedRef, insertedImgRef)\n\n return (\n // If you move this element creation, also move the Layout Effect above\n // reading from the ref. Otherwise we might run the Layout Effect when\n // the current value isn't set to the HTMLImageElement instance.\n <img\n {...rest}\n {...getDynamicProps(fetchPriority)}\n // It's intended to keep `loading` before `src` because React updates\n // props in order which causes Safari/Firefox to not lazy load properly.\n // See https://github.com/facebook/react/issues/25883\n loading={loading}\n width={width}\n height={height}\n decoding={decoding}\n data-nimg={fill ? 'fill' : '1'}\n className={className}\n style={style}\n // It's intended to keep `src` the last attribute because React updates\n // attributes in order. If we keep `src` the first one, Safari will\n // immediately start to fetch `src`, before `sizes` and `srcSet` are even\n // updated by React. That causes multiple unnecessary requests if `srcSet`\n // and `sizes` are defined.\n // This bug cannot be reproduced in Chrome or Firefox.\n sizes={sizes}\n srcSet={srcSet}\n src={src}\n ref={ref}\n onLoad={(event) => {\n const currentImage = event.currentTarget\n handleLoading(\n currentImage,\n placeholder,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n unoptimized,\n sizesInput\n )\n }}\n onError={(event) => {\n // if the real image fails to load, this will ensure \"alt\" is visible\n setShowAltText(true)\n if (placeholder !== 'empty') {\n // If the real image fails to load, this will still remove the placeholder.\n setBlurComplete(true)\n }\n if (onError) {\n onError(event)\n }\n }}\n />\n )\n }\n)\n\nfunction ImagePreload({\n isAppRouter,\n imgAttributes,\n}: {\n isAppRouter: boolean\n imgAttributes: ImgProps\n}) {\n const opts: ReactDOM.PreloadOptions = {\n as: 'image',\n imageSrcSet: imgAttributes.srcSet,\n imageSizes: imgAttributes.sizes,\n crossOrigin: imgAttributes.crossOrigin,\n referrerPolicy: imgAttributes.referrerPolicy,\n ...getDynamicProps(imgAttributes.fetchPriority),\n }\n\n if (isAppRouter && ReactDOM.preload) {\n ReactDOM.preload(imgAttributes.src, opts)\n return null\n }\n\n return (\n <Head>\n <link\n key={\n '__nimg-' +\n imgAttributes.src +\n imgAttributes.srcSet +\n imgAttributes.sizes\n }\n rel=\"preload\"\n // Note how we omit the `href` attribute, as it would only be relevant\n // for browsers that do not support `imagesrcset`, and in those cases\n // it would cause the incorrect image to be preloaded.\n //\n // https://html.spec.whatwg.org/multipage/semantics.html#attr-link-imagesrcset\n href={imgAttributes.srcSet ? undefined : imgAttributes.src}\n {...opts}\n />\n </Head>\n )\n}\n\n/**\n * The `Image` component is used to optimize images.\n *\n * Read more: [Next.js docs: `Image`](https://nextjs.org/docs/app/api-reference/components/image)\n */\nexport const Image = forwardRef<HTMLImageElement | null, ImageProps>(\n (props, forwardedRef) => {\n const pagesRouter = useContext(RouterContext)\n // We're in the app directory if there is no pages router.\n const isAppRouter = !pagesRouter\n\n const configContext = useContext(ImageConfigContext)\n const config = useMemo(() => {\n const c = configEnv || configContext || imageConfigDefault\n\n const allSizes = [...c.deviceSizes, ...c.imageSizes].sort((a, b) => a - b)\n const deviceSizes = c.deviceSizes.sort((a, b) => a - b)\n const qualities = c.qualities?.sort((a, b) => a - b)\n return {\n ...c,\n allSizes,\n deviceSizes,\n qualities,\n // During the SSR, configEnv (__NEXT_IMAGE_OPTS) does not include\n // security sensitive configs like `localPatterns`, which is needed\n // during the server render to ensure it's validated. Therefore use\n // configContext, which holds the config from the server for validation.\n localPatterns:\n typeof window === 'undefined'\n ? configContext?.localPatterns\n : c.localPatterns,\n }\n }, [configContext])\n\n const { onLoad, onLoadingComplete } = props\n const onLoadRef = useRef(onLoad)\n\n useEffect(() => {\n onLoadRef.current = onLoad\n }, [onLoad])\n\n const onLoadingCompleteRef = useRef(onLoadingComplete)\n\n useEffect(() => {\n onLoadingCompleteRef.current = onLoadingComplete\n }, [onLoadingComplete])\n\n const [blurComplete, setBlurComplete] = useState(false)\n const [showAltText, setShowAltText] = useState(false)\n const { props: imgAttributes, meta: imgMeta } = getImgProps(props, {\n defaultLoader,\n imgConf: config,\n blurComplete,\n showAltText,\n })\n\n return (\n <>\n {\n <ImageElement\n {...imgAttributes}\n unoptimized={imgMeta.unoptimized}\n placeholder={imgMeta.placeholder}\n fill={imgMeta.fill}\n onLoadRef={onLoadRef}\n onLoadingCompleteRef={onLoadingCompleteRef}\n setBlurComplete={setBlurComplete}\n setShowAltText={setShowAltText}\n sizesInput={props.sizes}\n ref={forwardedRef}\n />\n }\n {imgMeta.preload ? (\n <ImagePreload\n isAppRouter={isAppRouter}\n imgAttributes={imgAttributes}\n />\n ) : null}\n </>\n )\n }\n)\n"],"names":["React","useRef","useEffect","useContext","useMemo","useState","forwardRef","use","useLayoutEffect","ReactDOM","Head","getImgProps","imageConfigDefault","ImageConfigContext","warnOnce","RouterContext","defaultLoader","useMergedRef","configEnv","process","env","__NEXT_IMAGE_OPTS","window","globalThis","__NEXT_IMAGE_IMPORTED","handleLoading","img","placeholder","onLoadRef","onLoadingCompleteRef","setBlurComplete","unoptimized","sizesInput","src","p","decode","Promise","resolve","catch","then","parentElement","isConnected","current","event","Event","Object","defineProperty","writable","value","prevented","stopped","nativeEvent","currentTarget","target","isDefaultPrevented","isPropagationStopped","persist","preventDefault","stopPropagation","NODE_ENV","origSrc","URL","searchParams","get","getAttribute","widthViewportRatio","getBoundingClientRect","width","innerWidth","position","getComputedStyle","valid","includes","map","String","join","height","heightModified","toString","widthModified","getDynamicProps","fetchPriority","Boolean","fetchpriority","useNonWarningLayoutEffect","ImageElement","srcSet","sizes","decoding","className","style","loading","fill","setShowAltText","onLoad","onError","rest","forwardedRef","didInsertRef","insertedImgRef","didInsert","console","error","complete","ref","data-nimg","currentImage","ImagePreload","isAppRouter","imgAttributes","opts","as","imageSrcSet","imageSizes","crossOrigin","referrerPolicy","preload","link","rel","href","undefined","Image","props","pagesRouter","configContext","config","c","allSizes","deviceSizes","sort","a","b","qualities","localPatterns","onLoadingComplete","blurComplete","showAltText","meta","imgMeta","imgConf"],"mappings":"AAAA;;AAEA,OAAOA,SACLC,MAAM,EACNC,SAAS,EACTC,UAAU,EACVC,OAAO,EACPC,QAAQ,EACRC,UAAU,EACVC,GAAG,EACHC,eAAe,QACV,QAAO;AACd,OAAOC,cAAc,YAAW;AAChC,OAAOC,UAAU,qBAAoB;AACrC,SAASC,WAAW,QAAQ,8BAA6B;AAYzD,SAASC,kBAAkB,QAAQ,6BAA4B;AAC/D,SAASC,kBAAkB,QAAQ,oDAAmD;AACtF,SAASC,QAAQ,QAAQ,gCAA+B;AACxD,SAASC,aAAa,QAAQ,8CAA6C;AAE3E,oCAAoC;AACpC,OAAOC,mBAAmB,oCAAmC;AAC7D,SAASC,YAAY,QAAQ,mBAAkB;AAE/C,4CAA4C;AAC5C,MAA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IACtC,MAAM9F,YAAY3B,OAAO6F;IAEzB5F,UAAU;QACR0B,UAAUc,OAAO,GAAGoD;IACtB,GAAG;QAACA;KAAO;IAEX,MAAMjE,uBAAuB5B,OAAOqI;IAEpCpI,UAAU;QACR2B,qBAAqBa,OAAO,GAAG4F;IACjC,GAAG;QAACA;KAAkB;IAEtB,MAAM,CAACC,cAAczG,gBAAgB,GAAGzB,SAAS;IACjD,MAAM,CAACmI,aAAa3C,eAAe,GAAGxF,SAAS;IAC/C,MAAM,EAAEqH,OAAOb,aAAa,EAAE4B,MAAMC,OAAO,EAAE,GAAG/H,YAAY+G,OAAO;QACjE1G;QACA2H,SAASd;QACTU;QACAC;IACF;IAEA,qBACE;;0BAEI,KAACnD;gBACE,GAAGwB,aAAa;gBACjB9E,aAAa2G,QAAQ3G,WAAW;gBAChCJ,aAAa+G,QAAQ/G,WAAW;gBAChCiE,MAAM8C,QAAQ9C,IAAI;gBAClBhE,WAAWA;gBACXC,sBAAsBA;gBACtBC,iBAAiBA;gBACjB+D,gBAAgBA;gBAChB7D,YAAY0F,MAAMnC,KAAK;gBACvBiB,KAAKP;;YAGRyC,QAAQtB,OAAO,iBACd,KAACT;gBACCC,aAAaA;gBACbC,eAAeA;iBAEf;;;AAGV,GACD","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../src/client/image-component.tsx"],"sourcesContent":["'use client'\n\nimport React, {\n useRef,\n useEffect,\n useContext,\n useMemo,\n useState,\n forwardRef,\n use,\n useLayoutEffect,\n} from 'react'\nimport ReactDOM from 'react-dom'\nimport Head from '../shared/lib/head'\nimport { getImgProps } from '../shared/lib/get-img-props'\nimport type {\n ImageProps,\n ImgProps,\n OnLoad,\n OnLoadingComplete,\n PlaceholderValue,\n} from '../shared/lib/get-img-props'\nimport type {\n ImageConfigComplete,\n ImageLoaderProps,\n} from '../shared/lib/image-config'\nimport { imageConfigDefault } from '../shared/lib/image-config'\nimport { ImageConfigContext } from '../shared/lib/image-config-context.shared-runtime'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\n\n// This is replaced by webpack alias\nimport defaultLoader from 'next/dist/shared/lib/image-loader'\nimport { useMergedRef } from './use-merged-ref'\n\n// This is replaced by webpack define plugin\nconst configEnv = process.env.__NEXT_IMAGE_OPTS as any as ImageConfigComplete\n\nif (typeof window === 'undefined') {\n ;(globalThis as any).__NEXT_IMAGE_IMPORTED = true\n}\n\nexport type { ImageLoaderProps }\nexport type ImageLoader = (p: ImageLoaderProps) => string\n\ntype ImgElementWithDataProp = HTMLImageElement & {\n 'data-loaded-src'?: string | undefined\n}\n\ntype ImageElementProps = ImgProps & {\n unoptimized: boolean\n placeholder: PlaceholderValue\n onLoadRef: React.MutableRefObject<OnLoad | undefined>\n onLoadingCompleteRef: React.MutableRefObject<OnLoadingComplete | undefined>\n setBlurComplete: (b: boolean) => void\n setShowAltText: (b: boolean) => void\n sizesInput: string | undefined\n}\n\n// See https://stackoverflow.com/q/39777833/266535 for why we use this ref\n// handler instead of the img's onLoad attribute.\nfunction handleLoading(\n img: ImgElementWithDataProp,\n placeholder: PlaceholderValue,\n onLoadRef: React.MutableRefObject<OnLoad | undefined>,\n onLoadingCompleteRef: React.MutableRefObject<OnLoadingComplete | undefined>,\n setBlurComplete: (b: boolean) => void,\n unoptimized: boolean,\n sizesInput: string | undefined\n) {\n const src = img?.src\n if (!img || img['data-loaded-src'] === src) {\n return\n }\n img['data-loaded-src'] = src\n const p = 'decode' in img ? img.decode() : Promise.resolve()\n p.catch(() => {}).then(() => {\n if (!img.parentElement || !img.isConnected) {\n // Exit early in case of race condition:\n // - onload() is called\n // - decode() is called but incomplete\n // - unmount is called\n // - decode() completes\n return\n }\n if (placeholder !== 'empty') {\n setBlurComplete(true)\n }\n if (onLoadRef?.current) {\n // Since we don't have the SyntheticEvent here,\n // we must create one with the same shape.\n // See https://reactjs.org/docs/events.html\n const event = new Event('load')\n Object.defineProperty(event, 'target', { writable: false, value: img })\n let prevented = false\n let stopped = false\n onLoadRef.current({\n ...event,\n nativeEvent: event,\n currentTarget: img,\n target: img,\n isDefaultPrevented: () => prevented,\n isPropagationStopped: () => stopped,\n persist: () => {},\n preventDefault: () => {\n prevented = true\n event.preventDefault()\n },\n stopPropagation: () => {\n stopped = true\n event.stopPropagation()\n },\n })\n }\n if (onLoadingCompleteRef?.current) {\n onLoadingCompleteRef.current(img)\n }\n if (process.env.NODE_ENV !== 'production') {\n const { warnOnce } =\n require('../shared/lib/utils/warn-once') as typeof import('../shared/lib/utils/warn-once')\n const origSrc = new URL(src, 'http://n').searchParams.get('url') || src\n if (img.getAttribute('data-nimg') === 'fill') {\n if (!unoptimized && (!sizesInput || sizesInput === '100vw')) {\n let widthViewportRatio =\n img.getBoundingClientRect().width / window.innerWidth\n if (widthViewportRatio < 0.6) {\n if (sizesInput === '100vw') {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" prop and \"sizes\" prop of \"100vw\", but image is not rendered at full viewport width. Please adjust \"sizes\" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`\n )\n } else {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" but is missing \"sizes\" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`\n )\n }\n }\n }\n if (img.parentElement) {\n const { position } = window.getComputedStyle(img.parentElement)\n const valid = ['absolute', 'fixed', 'relative']\n if (!valid.includes(position)) {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" and parent element with invalid \"position\". Provided \"${position}\" should be one of ${valid\n .map(String)\n .join(',')}.`\n )\n }\n }\n if (img.height === 0) {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.`\n )\n }\n }\n\n const heightModified =\n img.height.toString() !== img.getAttribute('height')\n const widthModified = img.width.toString() !== img.getAttribute('width')\n if (\n (heightModified && !widthModified) ||\n (!heightModified && widthModified)\n ) {\n warnOnce(\n `Image with src \"${origSrc}\" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: \"auto\"' or 'height: \"auto\"' to maintain the aspect ratio.`\n )\n }\n }\n })\n}\n\nfunction getDynamicProps(\n fetchPriority?: string\n): Record<string, string | undefined> {\n if (Boolean(use)) {\n // In React 19.0.0 or newer, we must use camelCase\n // prop to avoid \"Warning: Invalid DOM property\".\n // See https://github.com/facebook/react/pull/25927\n return { fetchPriority }\n }\n // In React 18.2.0 or older, we must use lowercase prop\n // to avoid \"Warning: Invalid DOM property\".\n return { fetchpriority: fetchPriority }\n}\n\n/**\n * A version of useLayoutEffect that doesn't warn during SSR.\n * TODO: Just useLayoutEffect once support for React 18 is dropped.\n * Do not rename this to \"isomorphic layout effect\". There is no such thing as\n * an isomorphic Layout Effect since there is no Layout on the server\n */\nconst useNonWarningLayoutEffect =\n typeof window === 'undefined' ? useEffect : useLayoutEffect\n\nconst ImageElement = forwardRef<HTMLImageElement | null, ImageElementProps>(\n (\n {\n src,\n srcSet,\n sizes,\n height,\n width,\n decoding,\n className,\n style,\n fetchPriority,\n placeholder,\n loading,\n unoptimized,\n fill,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n setShowAltText,\n sizesInput,\n onLoad,\n onError,\n ...rest\n },\n forwardedRef\n ) => {\n const didInsertRef = useRef(false)\n const insertedImgRef = useRef<HTMLImageElement>(null)\n\n useNonWarningLayoutEffect(() => {\n const { current: didInsert } = didInsertRef\n const { current: img } = insertedImgRef\n\n if (!didInsert && img !== null) {\n // Replay events from during hydration that React doesn't replay.\n if (onError) {\n // If the image has an error before react hydrates, then the error is lost.\n // The workaround is to wait until the image is mounted which is after hydration,\n // then we set the src again to trigger the error handler (if there was an error).\n // This doesn't just trigger the error handler but retries the whole request.\n // TODO: Consider dispatching a synthetic event instead.\n // eslint-disable-next-line no-self-assign\n img.src = img.src\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!src) {\n console.error(`Image is missing required \"src\" property:`, img)\n }\n if (img.getAttribute('alt') === null) {\n console.error(\n `Image is missing required \"alt\" property. Please add Alternative Text to describe the image for screen readers and search engines.`\n )\n }\n }\n if (img.complete) {\n handleLoading(\n img,\n placeholder,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n unoptimized,\n sizesInput\n )\n }\n didInsertRef.current = true\n }\n }, [\n src,\n placeholder,\n onLoadRef,\n onLoadingCompleteRef,\n onError,\n unoptimized,\n sizesInput,\n ])\n\n const ref = useMergedRef(forwardedRef, insertedImgRef)\n\n return (\n // If you move this element creation, also move the Layout Effect above\n // reading from the ref. Otherwise we might run the Layout Effect when\n // the current value isn't set to the HTMLImageElement instance.\n <img\n {...rest}\n {...getDynamicProps(fetchPriority)}\n // It's intended to keep `loading` before `src` because React updates\n // props in order which causes Safari/Firefox to not lazy load properly.\n // See https://github.com/facebook/react/issues/25883\n loading={loading}\n width={width}\n height={height}\n decoding={decoding}\n data-nimg={fill ? 'fill' : '1'}\n className={className}\n style={style}\n // It's intended to keep `src` the last attribute because React updates\n // attributes in order. If we keep `src` the first one, Safari will\n // immediately start to fetch `src`, before `sizes` and `srcSet` are even\n // updated by React. That causes multiple unnecessary requests if `srcSet`\n // and `sizes` are defined.\n // This bug cannot be reproduced in Chrome or Firefox.\n sizes={sizes}\n srcSet={srcSet}\n src={src}\n ref={ref}\n onLoad={(event) => {\n const currentImage = event.currentTarget\n handleLoading(\n currentImage,\n placeholder,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n unoptimized,\n sizesInput\n )\n }}\n onError={(event) => {\n // if the real image fails to load, this will ensure \"alt\" is visible\n setShowAltText(true)\n if (placeholder !== 'empty') {\n // If the real image fails to load, this will still remove the placeholder.\n setBlurComplete(true)\n }\n if (onError) {\n onError(event)\n }\n }}\n />\n )\n }\n)\n\nfunction ImagePreload({\n isAppRouter,\n imgAttributes,\n}: {\n isAppRouter: boolean\n imgAttributes: ImgProps\n}) {\n const opts: ReactDOM.PreloadOptions = {\n as: 'image',\n imageSrcSet: imgAttributes.srcSet,\n imageSizes: imgAttributes.sizes,\n crossOrigin: imgAttributes.crossOrigin,\n referrerPolicy: imgAttributes.referrerPolicy,\n ...getDynamicProps(imgAttributes.fetchPriority),\n }\n\n if (isAppRouter && ReactDOM.preload) {\n ReactDOM.preload(imgAttributes.src, opts)\n return null\n }\n\n return (\n <Head>\n <link\n key={\n '__nimg-' +\n imgAttributes.src +\n imgAttributes.srcSet +\n imgAttributes.sizes\n }\n rel=\"preload\"\n // Note how we omit the `href` attribute, as it would only be relevant\n // for browsers that do not support `imagesrcset`, and in those cases\n // it would cause the incorrect image to be preloaded.\n //\n // https://html.spec.whatwg.org/multipage/semantics.html#attr-link-imagesrcset\n href={imgAttributes.srcSet ? undefined : imgAttributes.src}\n {...opts}\n />\n </Head>\n )\n}\n\n/**\n * The `Image` component is used to optimize images.\n *\n * Read more: [Next.js docs: `Image`](https://nextjs.org/docs/app/api-reference/components/image)\n */\nexport const Image = forwardRef<HTMLImageElement | null, ImageProps>(\n (props, forwardedRef) => {\n const pagesRouter = useContext(RouterContext)\n // We're in the app directory if there is no pages router.\n const isAppRouter = !pagesRouter\n\n const configContext = useContext(ImageConfigContext)\n const config = useMemo(() => {\n const c = configEnv || configContext || imageConfigDefault\n\n const allSizes = [...c.deviceSizes, ...c.imageSizes].sort((a, b) => a - b)\n const deviceSizes = c.deviceSizes.sort((a, b) => a - b)\n const qualities = c.qualities?.sort((a, b) => a - b)\n return {\n ...c,\n allSizes,\n deviceSizes,\n qualities,\n // During the SSR, configEnv (__NEXT_IMAGE_OPTS) does not include\n // security sensitive configs like `localPatterns`, which is needed\n // during the server render to ensure it's validated. Therefore use\n // configContext, which holds the config from the server for validation.\n localPatterns:\n typeof window === 'undefined'\n ? configContext?.localPatterns\n : c.localPatterns,\n }\n }, [configContext])\n\n const { onLoad, onLoadingComplete } = props\n const onLoadRef = useRef(onLoad)\n\n useEffect(() => {\n onLoadRef.current = onLoad\n }, [onLoad])\n\n const onLoadingCompleteRef = useRef(onLoadingComplete)\n\n useEffect(() => {\n onLoadingCompleteRef.current = onLoadingComplete\n }, [onLoadingComplete])\n\n const [blurComplete, setBlurComplete] = useState(false)\n const [showAltText, setShowAltText] = useState(false)\n const { props: imgAttributes, meta: imgMeta } = getImgProps(props, {\n defaultLoader,\n imgConf: config,\n blurComplete,\n showAltText,\n })\n\n return (\n <>\n {\n <ImageElement\n {...imgAttributes}\n unoptimized={imgMeta.unoptimized}\n placeholder={imgMeta.placeholder}\n fill={imgMeta.fill}\n onLoadRef={onLoadRef}\n onLoadingCompleteRef={onLoadingCompleteRef}\n setBlurComplete={setBlurComplete}\n setShowAltText={setShowAltText}\n sizesInput={props.sizes}\n ref={forwardedRef}\n />\n }\n {imgMeta.preload ? (\n <ImagePreload\n isAppRouter={isAppRouter}\n imgAttributes={imgAttributes}\n />\n ) : null}\n </>\n )\n }\n)\n"],"names":["React","useRef","useEffect","useContext","useMemo","useState","forwardRef","use","useLayoutEffect","ReactDOM","Head","getImgProps","imageConfigDefault","ImageConfigContext","RouterContext","defaultLoader","useMergedRef","configEnv","process","env","__NEXT_IMAGE_OPTS","window","globalThis","__NEXT_IMAGE_IMPORTED","handleLoading","img","placeholder","onLoadRef","onLoadingCompleteRef","setBlurComplete","unoptimized","sizesInput","src","p","decode","Promise","resolve","catch","then","parentElement","isConnected","current","event","Event","Object","defineProperty","writable","value","prevented","stopped","nativeEvent","currentTarget","target","isDefaultPrevented","isPropagationStopped","persist","preventDefault","stopPropagation","NODE_ENV","warnOnce","require","origSrc","URL","searchParams","get","getAttribute","widthViewportRatio","getBoundingClientRect","width","innerWidth","position","getComputedStyle","valid","includes","map","String","join","height","heightModified","toString","widthModified","getDynamicProps","fetchPriority","Boolean","fetchpriority","useNonWarningLayoutEffect","ImageElement","srcSet","sizes","decoding","className","style","loading","fill","setShowAltText","onLoad","onError","rest","forwardedRef","didInsertRef","insertedImgRef","didInsert","console","error","complete","ref","data-nimg","currentImage","ImagePreload","isAppRouter","imgAttributes","opts","as","imageSrcSet","imageSizes","crossOrigin","referrerPolicy","preload","link","rel","href","undefined","Image","props","pagesRouter","configContext","config","c","allSizes","deviceSizes","sort","a","b","qualities","localPatterns","onLoadingComplete","blurComplete","showAltText","meta","imgMeta","imgConf"],"mappings":"AAAA;;AAEA,OAAOA,SACLC,MAAM,EACNC,SAAS,EACTC,UAAU,EACVC,OAAO,EACPC,QAAQ,EACRC,UAAU,EACVC,GAAG,EACHC,eAAe,QACV,QAAO;AACd,OAAOC,cAAc,YAAW;AAChC,OAAOC,UAAU,qBAAoB;AACrC,SAASC,WAAW,QAAQ,8BAA6B;AAYzD,SAASC,kBAAkB,QAAQ,6BAA4B;AAC/D,SAASC,kBAAkB,QAAQ,oDAAmD;AACtF,SAASC,aAAa,QAAQ,8CAA6C;AAE3E,oCAAoC;AACpC,OAAOC,mBAAmB,oCAAmC;AAC7D,SAASC,YAAY,QAAQ,mBAAkB;AAE/C,4CAA4C;AAC5C,MAAMC,YAAYC,QAAQC,GAAG,CAACC,iBAAiB;AAE/C,IAAI,OAAOC,WAAW,aAAa;;IAC/BC,WAAmBC,qBAAqB,GAAG;AAC/C;AAmBA,0EAA0E;AAC1E,iDAAiD;AACjD,SAASC,cACPC,GAA2B,EAC3BC,WAA6B,EAC7BC,SAAqD,EACrDC,oBAA2E,EAC3EC,eAAqC,EACrCC,WAAoB,EACpBC,UAA8B;IAE9B,MAAMC,MAAMP,KAAKO;IACjB,IAAI,CAACP,OAAOA,GAAG,CAAC,kBAAkB,KAAKO,KAAK;QAC1C;IACF;IACAP,GAAG,CAAC,kBAAkB,GAAGO;IACzB,MAAMC,IAAI,YAAYR,MAAMA,IAAIS,MAAM,KAAKC,QAAQC,OAAO;IAC1DH,EAAEI,KAAK,CAAC,KAAO,GAAGC,IAAI,CAAC;QACrB,IAAI,CAACb,IAAIc,aAAa,IAAI,CAACd,IAAIe,WAAW,EAAE;YAC1C,wCAAwC;YACxC,uBAAuB;YACvB,sCAAsC;YACtC,sBAAsB;YACtB,uBAAuB;YACvB;QACF;QACA,IAAId,gBAA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BA;gBAChB/D,YAAY4F,MAAMnC,KAAK;gBACvBiB,KAAKP;;YAGRyC,QAAQtB,OAAO,iBACd,KAACT;gBACCC,aAAaA;gBACbC,eAAeA;iBAEf;;;AAGV,GACD","ignoreList":[0]} |
@@ -28,3 +28,3 @@ /* global location */ // imports polyfill from `@next/polyfill-module` after build. | ||
| import { isNextRouterError } from './components/is-next-router-error'; | ||
| export const version = "16.3.0-canary.51"; | ||
| export const version = "16.3.0-canary.52"; | ||
| export let router; | ||
@@ -31,0 +31,0 @@ export const emitter = mitt(); |
@@ -14,3 +14,2 @@ 'use client'; | ||
| import { useMergedRef } from './use-merged-ref'; | ||
| import { errorOnce } from '../shared/lib/utils/error-once'; | ||
| const prefetched = new Set(); | ||
@@ -405,2 +404,3 @@ function prefetch(router, href, as, options) { | ||
| if (process.env.NODE_ENV === 'development') { | ||
| const { errorOnce } = require('../shared/lib/utils/error-once'); | ||
| errorOnce('`legacyBehavior` is deprecated and will be removed in a future ' + 'release. A codemod is available to upgrade your components:\n\n' + 'npx @next/codemod@latest new-link .\n\n' + 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'); | ||
@@ -407,0 +407,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../src/client/link.tsx"],"sourcesContent":["'use client'\n\nimport type {\n NextRouter,\n PrefetchOptions as RouterPrefetchOptions,\n} from '../shared/lib/router/router'\n\nimport React, { createContext, useContext } from 'react'\nimport type { UrlObject } from 'url'\nimport { resolveHref } from './resolve-href'\nimport { isLocalURL } from '../shared/lib/router/utils/is-local-url'\nimport { formatUrl } from '../shared/lib/router/utils/format-url'\nimport { isAbsoluteUrl } from '../shared/lib/utils'\nimport { addLocale } from './add-locale'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\nimport type { AppRouterInstance } from '../shared/lib/app-router-context.shared-runtime'\nimport { useIntersection } from './use-intersection'\nimport { getDomainLocale } from './get-domain-locale'\nimport { addBasePath } from './add-base-path'\nimport { useMergedRef } from './use-merged-ref'\nimport { errorOnce } from '../shared/lib/utils/error-once'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * The path or URL to navigate to. It can also be an object.\n *\n * @example https://nextjs.org/docs/api-reference/next/link#with-url-object\n */\n href: Url\n /**\n * Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes) to see how it worked. Note: when this path differs from the one provided in `href` the previous `href`/`as` behavior is used as shown in the [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes).\n */\n as?: Url\n /**\n * Replace the current `history` state instead of adding a new url into the stack.\n *\n * @defaultValue `false`\n */\n replace?: boolean\n /**\n * Whether to override the default scroll behavior\n *\n * @example https://nextjs.org/docs/api-reference/next/link#disable-scrolling-to-the-top-of-the-page\n *\n * @defaultValue `true`\n */\n scroll?: boolean\n /**\n * Update the path of the current page without rerunning [`getStaticProps`](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-props), [`getServerSideProps`](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-server-side-props) or [`getInitialProps`](/docs/pages/api-reference/functions/get-initial-props).\n *\n * @defaultValue `false`\n */\n shallow?: boolean\n /**\n * Forces `Link` to send the `href` property to its child.\n *\n * @defaultValue `false`\n */\n passHref?: boolean\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`. Prefetching is only enabled in production.\n *\n * In App Router:\n * - \"auto\", null, undefined (default): For statically generated pages, this will prefetch the full React Server Component data. For dynamic pages, this will prefetch up to the nearest route segment with a [`loading.js`](https://nextjs.org/docs/app/api-reference/file-conventions/loading) file. If there is no loading file, it will not fetch the full tree to avoid fetching too much data.\n * - `true`: This will prefetch the full React Server Component data for all route segments, regardless of whether they contain a segment with `loading.js`.\n * - `false`: This will not prefetch any data, even on hover.\n *\n * In Pages Router:\n * - `true` (default): The full route & its data will be prefetched.\n * - `false`: Prefetching will not happen when entering the viewport, but will still happen on hover.\n * @defaultValue `true` (pages router) or `null` (app router)\n */\n prefetch?: boolean | 'auto' | null\n /**\n * The active locale is automatically prepended. `locale` allows for providing a different locale.\n * When `false` `href` has to include the locale as the default behavior is disabled.\n * Note: This is only available in the Pages Router.\n */\n locale?: string | false\n /**\n * Enable legacy link behavior.\n *\n * @deprecated This will be removed in a future version\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n /**\n * Optional event handler for when the mouse pointer is moved onto Link\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n /**\n * Optional event handler for when Link is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n /**\n * Optional event handler for when Link is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n\n /**\n * Transition types to apply when navigating. These types are passed to\n * [`React.addTransitionType`](https://react.dev/reference/react/addTransitionType)\n * inside the navigation transition, enabling\n * [`<ViewTransition>`](https://react.dev/reference/react/ViewTransition) components\n * to apply different animations based on the type of navigation.\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" transitionTypes={['slide-in']}>About</Link>\n * ```\n */\n transitionTypes?: string[]\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// WARNING: This should be an interface to prevent TypeScript from inlining it\n// in declarations of libraries dependending on Next.js.\n// Not trivial to reproduce so only convert to an interface when needed.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport interface LinkProps<RouteInferType = any> extends InternalLinkProps {}\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<InternalLinkProps>\n\nconst prefetched = new Set<string>()\n\ntype PrefetchOptions = RouterPrefetchOptions & {\n /**\n * bypassPrefetchedCheck will bypass the check to see if the `href` has\n * already been fetched i.e. unconditionally prefetch the `href`.\n */\n bypassPrefetchedCheck: boolean\n}\n\nfunction prefetch(\n router: NextRouter,\n href: string,\n as: string,\n options: PrefetchOptions\n): void {\n if (typeof window === 'undefined') {\n return\n }\n\n if (!isLocalURL(href)) {\n return\n }\n\n // We should only dedupe requests when experimental.optimisticClientCache is\n // disabled.\n if (!options.bypassPrefetchedCheck) {\n const locale =\n // Let the link's locale prop override the default router locale.\n typeof options.locale !== 'undefined'\n ? options.locale\n : // Otherwise fallback to the router's locale.\n 'locale' in router\n ? router.locale\n : undefined\n\n const prefetchedKey = href + '%' + as + '%' + locale\n\n // If we've already fetched the key, then don't prefetch it again!\n if (prefetched.has(prefetchedKey)) {\n return\n }\n\n // Mark this URL as prefetched.\n prefetched.add(prefetchedKey)\n }\n\n // Prefetch the JSON page if asked (only in the client)\n // We need to handle a prefetch error here since we may be\n // loading with priority which can reject but we don't\n // want to force navigation since this is only a prefetch\n router.prefetch(href, as, options).catch((err) => {\n if (process.env.NODE_ENV !== 'production') {\n // rethrow to show invalid URL errors\n throw err\n }\n })\n}\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n router: NextRouter | AppRouterInstance,\n href: string,\n as: string,\n replace?: boolean,\n shallow?: boolean,\n scroll?: boolean,\n locale?: string | false,\n onNavigate?: OnNavigateEventHandler\n): void {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n\n if (\n (isAnchorNodeName && isModifiedEvent(e)) ||\n e.currentTarget.hasAttribute('download')\n ) {\n // ignore click for browser’s default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n const navigate = () => {\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n // If the router is an NextRouter instance it will have `beforePopState`\n const routerScroll = scroll ?? true\n if ('beforePopState' in router) {\n router[replace ? 'replace' : 'push'](href, as, {\n shallow,\n locale,\n scroll: routerScroll,\n })\n } else {\n router[replace ? 'replace' : 'push'](as || href, {\n scroll: routerScroll,\n })\n }\n }\n\n navigate()\n}\n\ntype LinkPropsReal = React.PropsWithChildren<\n Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof LinkProps> &\n LinkProps\n>\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation between routes.\n *\n * It is the primary way to navigate between routes in Next.js.\n *\n * Read more: [Next.js docs: `<Link>`](https://nextjs.org/docs/app/api-reference/components/link)\n */\nconst Link = React.forwardRef<HTMLAnchorElement, LinkPropsReal>(\n function LinkComponent(props, forwardedRef) {\n let children: React.ReactNode\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n locale,\n onClick,\n onNavigate,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n transitionTypes,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(RouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? // TODO: Remove this addendum if Owner Stacks are available\n \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n locale: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n onNavigate: true,\n transitionTypes: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (key === 'locale') {\n if (props[key] && valType !== 'string') {\n throw createPropError({\n key,\n expected: '`string`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'legacyBehavior'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\"`',\n actual: valType,\n })\n }\n } else if (key === 'transitionTypes') {\n if (props[key] != null && !Array.isArray(props[key])) {\n throw createPropError({\n key,\n expected: '`string[]`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n }\n\n const { href, as } = React.useMemo(() => {\n if (!router) {\n const resolvedHref = formatStringOrUrl(hrefProp)\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n }\n }\n\n const [resolvedHref, resolvedAs] = resolveHref(router, hrefProp, true)\n\n return {\n href: resolvedHref,\n as: asProp ? resolveHref(router, asProp) : resolvedAs || resolvedHref,\n }\n }, [router, hrefProp, asProp])\n\n const previousHref = React.useRef<string>(href)\n const previousAs = React.useRef<string>(as)\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n const [setIntersectionRef, isVisible, resetVisible] = useIntersection({\n rootMargin: '200px',\n })\n const setIntersectionWithResetRef = React.useCallback(\n (el: Element | null) => {\n // Before the link getting observed, check if visible state need to be reset\n if (previousAs.current !== as || previousHref.current !== href) {\n resetVisible()\n previousAs.current = as\n previousHref.current = href\n }\n\n setIntersectionRef(el)\n },\n [as, href, resetVisible, setIntersectionRef]\n )\n\n const setRef = useMergedRef(setIntersectionWithResetRef, childRef)\n\n // Prefetch the URL if we haven't already and it's visible.\n React.useEffect(() => {\n // in dev, we only prefetch on hover to avoid wasting resources as the prefetch will trigger compiling the page.\n if (process.env.NODE_ENV !== 'production') {\n return\n }\n\n if (!router) {\n return\n }\n\n // If we don't need to prefetch the URL, don't do prefetch.\n if (!isVisible || !prefetchEnabled) {\n return\n }\n\n // Prefetch the URL.\n prefetch(router, href, as, {\n // dedupe across appear/disappear of the Link.\n bypassPrefetchedCheck: false,\n locale,\n })\n }, [as, href, isVisible, locale, prefetchEnabled, router?.locale, router])\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: setRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n\n if (e.defaultPrevented) {\n return\n }\n\n linkClicked(\n e,\n router,\n href,\n as,\n replace,\n shallow,\n scroll,\n locale,\n onNavigate\n )\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n\n prefetch(router, href, as, {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true,\n })\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n\n prefetch(router, href, as, {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true,\n })\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the domain and locale.\n if (isAbsoluteUrl(as)) {\n childProps.href = as\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n const curLocale = typeof locale !== 'undefined' ? locale : router?.locale\n\n // we only render domain locales if we are currently on a domain locale\n // so that locale links are still visitable in development/preview envs\n const localeDomain =\n router?.isLocaleDomain &&\n getDomainLocale(as, curLocale, router?.locales, router?.domainLocales)\n\n childProps.href =\n localeDomain ||\n addBasePath(addLocale(as, curLocale, router?.defaultLocale))\n }\n\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n errorOnce(\n '`legacyBehavior` is deprecated and will be removed in a future ' +\n 'release. A codemod is available to upgrade your components:\\n\\n' +\n 'npx @next/codemod@latest new-link .\\n\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'\n )\n }\n return React.cloneElement(child, childProps)\n }\n\n return (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n)\n\nconst LinkStatusContext = createContext<{\n pending: boolean\n}>({\n // We do not support link status in the Pages Router, so we always return false\n pending: false,\n})\n\nexport const useLinkStatus = () => {\n // This behaviour is like React's useFormStatus. When the component is not under\n // a <form> tag, it will get the default value, instead of throwing an error.\n return useContext(LinkStatusContext)\n}\n\nexport default Link\n"],"names":["React","createContext","useContext","resolveHref","isLocalURL","formatUrl","isAbsoluteUrl","addLocale","RouterContext","useIntersection","getDomainLocale","addBasePath","useMergedRef","errorOnce","prefetched","Set","prefetch","router","href","as","options","window","bypassPrefetchedCheck","locale","undefined","prefetchedKey","has","add","catch","err","process","env","NODE_ENV","isModifiedEvent","event","eventTarget","currentTarget","target","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","replace","shallow","scroll","onNavigate","nodeName","isAnchorNodeName","toUpperCase","hasAttribute","preventDefault","location","navigate","isDefaultPrevented","routerScroll","formatStringOrUrl","urlObjOrString","Link","forwardRef","LinkComponent","props","forwardedRef","children","hrefProp","asProp","childrenProp","prefetchProp","passHref","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","transitionTypes","restProps","a","prefetchEnabled","createPropError","args","Error","key","expected","actual","requiredPropsGuard","requiredProps","Object","keys","forEach","_","optionalPropsGuard","optionalProps","valType","Array","isArray","useMemo","resolvedHref","resolvedAs","previousHref","useRef","previousAs","child","console","warn","Children","only","type","childRef","ref","setIntersectionRef","isVisible","resetVisible","rootMargin","setIntersectionWithResetRef","useCallback","el","current","setRef","useEffect","childProps","defaultPrevented","priority","__NEXT_LINK_NO_TOUCH_START","curLocale","localeDomain","isLocaleDomain","locales","domainLocales","defaultLocale","cloneElement","LinkStatusContext","pending","useLinkStatus"],"mappings":"AAAA;;AAOA,OAAOA,SAASC,aAAa,EAAEC,UAAU,QAAQ,QAAO;AAExD,SAASC,WAAW,QAAQ,iBAAgB;AAC5C,SAASC,UAAU,QAAQ,0CAAyC;AACpE,SAASC,SAAS,QAAQ,wCAAuC;AACjE,SAASC,aAAa,QAAQ,sBAAqB;AACnD,SAASC,SAAS,QAAQ,eAAc;AACxC,SAASC,aAAa,QAAQ,8CAA6C;AAE3E,SAASC,eAAe,QAAQ,qBAAoB;AACpD,SAASC,eAAe,QAAQ,sBAAqB;AACrD,SAASC,WAAW,QAAQ,kBAAiB;AAC7C,SAASC,YAAY,QAAQ,mBAAkB;AAC/C,SAASC,SAAS,QAAQ,iCAAgC;AA4H1D,MAAMC,aAAa,IAAIC;AAUvB,SAASC,SACPC,MAAkB,EAClBC,IAAY,EACZC,EAAU,EACVC,OAAwB;IAExB,IAAI,OAAOC,WAAW,aAAa;QACjC;IACF;IAEA,IAAI,CAACjB,WAAWc,OAAO;QACrB;IACF;IAEA,4EAA4E;IAC5E,YAAY;IACZ,IAAI,CAACE,QAAQE,qBAAq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gBAChGxG,uBAAuB;YACzB;QACF;IACN;IAEA,oFAAoF;IACpF,IAAIhB,cAAca,KAAK;QACrByG,WAAW1G,IAAI,GAAGC;IACpB,OAAO,IACL,CAAC2D,kBACDN,YACCkC,MAAMK,IAAI,KAAK,OAAO,CAAE,CAAA,UAAUL,MAAMzC,KAAK,AAAD,GAC7C;QACA,MAAM+D,YAAY,OAAOzG,WAAW,cAAcA,SAASN,QAAQM;QAEnE,uEAAuE;QACvE,uEAAuE;QACvE,MAAM0G,eACJhH,QAAQiH,kBACRxH,gBAAgBS,IAAI6G,WAAW/G,QAAQkH,SAASlH,QAAQmH;QAE1DR,WAAW1G,IAAI,GACb+G,gBACAtH,YAAYJ,UAAUY,IAAI6G,WAAW/G,QAAQoH;IACjD;IAEA,IAAIvD,gBAAgB;QAClB,IAAIhD,QAAQC,GAAG,CAACC,QAAQ,KAAK,eAAe;YAC1CnB,UACE,oEACE,oEACA,4CACA;QAEN;QACA,qBAAOb,MAAMsI,YAAY,CAAC5B,OAAOkB;IACnC;IAEA,qBACE,KAAC3C;QAAG,GAAGD,SAAS;QAAG,GAAG4C,UAAU;kBAC7BzD;;AAGP;AAGF,MAAMoE,kCAAoBtI,cAEvB;IACD,+EAA+E;IAC/EuI,SAAS;AACX;AAEA,OAAO,MAAMC,gBAAgB;IAC3B,gFAAgF;IAChF,6EAA6E;IAC7E,OAAOvI,WAAWqI;AACpB,EAAC;AAED,eAAezE,KAAI","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../src/client/link.tsx"],"sourcesContent":["'use client'\n\nimport type {\n NextRouter,\n PrefetchOptions as RouterPrefetchOptions,\n} from '../shared/lib/router/router'\n\nimport React, { createContext, useContext } from 'react'\nimport type { UrlObject } from 'url'\nimport { resolveHref } from './resolve-href'\nimport { isLocalURL } from '../shared/lib/router/utils/is-local-url'\nimport { formatUrl } from '../shared/lib/router/utils/format-url'\nimport { isAbsoluteUrl } from '../shared/lib/utils'\nimport { addLocale } from './add-locale'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\nimport type { AppRouterInstance } from '../shared/lib/app-router-context.shared-runtime'\nimport { useIntersection } from './use-intersection'\nimport { getDomainLocale } from './get-domain-locale'\nimport { addBasePath } from './add-base-path'\nimport { useMergedRef } from './use-merged-ref'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * The path or URL to navigate to. It can also be an object.\n *\n * @example https://nextjs.org/docs/api-reference/next/link#with-url-object\n */\n href: Url\n /**\n * Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes) to see how it worked. Note: when this path differs from the one provided in `href` the previous `href`/`as` behavior is used as shown in the [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes).\n */\n as?: Url\n /**\n * Replace the current `history` state instead of adding a new url into the stack.\n *\n * @defaultValue `false`\n */\n replace?: boolean\n /**\n * Whether to override the default scroll behavior\n *\n * @example https://nextjs.org/docs/api-reference/next/link#disable-scrolling-to-the-top-of-the-page\n *\n * @defaultValue `true`\n */\n scroll?: boolean\n /**\n * Update the path of the current page without rerunning [`getStaticProps`](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-props), [`getServerSideProps`](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-server-side-props) or [`getInitialProps`](/docs/pages/api-reference/functions/get-initial-props).\n *\n * @defaultValue `false`\n */\n shallow?: boolean\n /**\n * Forces `Link` to send the `href` property to its child.\n *\n * @defaultValue `false`\n */\n passHref?: boolean\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`. Prefetching is only enabled in production.\n *\n * In App Router:\n * - \"auto\", null, undefined (default): For statically generated pages, this will prefetch the full React Server Component data. For dynamic pages, this will prefetch up to the nearest route segment with a [`loading.js`](https://nextjs.org/docs/app/api-reference/file-conventions/loading) file. If there is no loading file, it will not fetch the full tree to avoid fetching too much data.\n * - `true`: This will prefetch the full React Server Component data for all route segments, regardless of whether they contain a segment with `loading.js`.\n * - `false`: This will not prefetch any data, even on hover.\n *\n * In Pages Router:\n * - `true` (default): The full route & its data will be prefetched.\n * - `false`: Prefetching will not happen when entering the viewport, but will still happen on hover.\n * @defaultValue `true` (pages router) or `null` (app router)\n */\n prefetch?: boolean | 'auto' | null\n /**\n * The active locale is automatically prepended. `locale` allows for providing a different locale.\n * When `false` `href` has to include the locale as the default behavior is disabled.\n * Note: This is only available in the Pages Router.\n */\n locale?: string | false\n /**\n * Enable legacy link behavior.\n *\n * @deprecated This will be removed in a future version\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n /**\n * Optional event handler for when the mouse pointer is moved onto Link\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n /**\n * Optional event handler for when Link is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n /**\n * Optional event handler for when Link is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n\n /**\n * Transition types to apply when navigating. These types are passed to\n * [`React.addTransitionType`](https://react.dev/reference/react/addTransitionType)\n * inside the navigation transition, enabling\n * [`<ViewTransition>`](https://react.dev/reference/react/ViewTransition) components\n * to apply different animations based on the type of navigation.\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" transitionTypes={['slide-in']}>About</Link>\n * ```\n */\n transitionTypes?: string[]\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// WARNING: This should be an interface to prevent TypeScript from inlining it\n// in declarations of libraries dependending on Next.js.\n// Not trivial to reproduce so only convert to an interface when needed.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport interface LinkProps<RouteInferType = any> extends InternalLinkProps {}\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<InternalLinkProps>\n\nconst prefetched = new Set<string>()\n\ntype PrefetchOptions = RouterPrefetchOptions & {\n /**\n * bypassPrefetchedCheck will bypass the check to see if the `href` has\n * already been fetched i.e. unconditionally prefetch the `href`.\n */\n bypassPrefetchedCheck: boolean\n}\n\nfunction prefetch(\n router: NextRouter,\n href: string,\n as: string,\n options: PrefetchOptions\n): void {\n if (typeof window === 'undefined') {\n return\n }\n\n if (!isLocalURL(href)) {\n return\n }\n\n // We should only dedupe requests when experimental.optimisticClientCache is\n // disabled.\n if (!options.bypassPrefetchedCheck) {\n const locale =\n // Let the link's locale prop override the default router locale.\n typeof options.locale !== 'undefined'\n ? options.locale\n : // Otherwise fallback to the router's locale.\n 'locale' in router\n ? router.locale\n : undefined\n\n const prefetchedKey = href + '%' + as + '%' + locale\n\n // If we've already fetched the key, then don't prefetch it again!\n if (prefetched.has(prefetchedKey)) {\n return\n }\n\n // Mark this URL as prefetched.\n prefetched.add(prefetchedKey)\n }\n\n // Prefetch the JSON page if asked (only in the client)\n // We need to handle a prefetch error here since we may be\n // loading with priority which can reject but we don't\n // want to force navigation since this is only a prefetch\n router.prefetch(href, as, options).catch((err) => {\n if (process.env.NODE_ENV !== 'production') {\n // rethrow to show invalid URL errors\n throw err\n }\n })\n}\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n router: NextRouter | AppRouterInstance,\n href: string,\n as: string,\n replace?: boolean,\n shallow?: boolean,\n scroll?: boolean,\n locale?: string | false,\n onNavigate?: OnNavigateEventHandler\n): void {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n\n if (\n (isAnchorNodeName && isModifiedEvent(e)) ||\n e.currentTarget.hasAttribute('download')\n ) {\n // ignore click for browser’s default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n const navigate = () => {\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n // If the router is an NextRouter instance it will have `beforePopState`\n const routerScroll = scroll ?? true\n if ('beforePopState' in router) {\n router[replace ? 'replace' : 'push'](href, as, {\n shallow,\n locale,\n scroll: routerScroll,\n })\n } else {\n router[replace ? 'replace' : 'push'](as || href, {\n scroll: routerScroll,\n })\n }\n }\n\n navigate()\n}\n\ntype LinkPropsReal = React.PropsWithChildren<\n Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof LinkProps> &\n LinkProps\n>\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation between routes.\n *\n * It is the primary way to navigate between routes in Next.js.\n *\n * Read more: [Next.js docs: `<Link>`](https://nextjs.org/docs/app/api-reference/components/link)\n */\nconst Link = React.forwardRef<HTMLAnchorElement, LinkPropsReal>(\n function LinkComponent(props, forwardedRef) {\n let children: React.ReactNode\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n locale,\n onClick,\n onNavigate,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n transitionTypes,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(RouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? // TODO: Remove this addendum if Owner Stacks are available\n \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n locale: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n onNavigate: true,\n transitionTypes: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (key === 'locale') {\n if (props[key] && valType !== 'string') {\n throw createPropError({\n key,\n expected: '`string`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'legacyBehavior'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\"`',\n actual: valType,\n })\n }\n } else if (key === 'transitionTypes') {\n if (props[key] != null && !Array.isArray(props[key])) {\n throw createPropError({\n key,\n expected: '`string[]`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n }\n\n const { href, as } = React.useMemo(() => {\n if (!router) {\n const resolvedHref = formatStringOrUrl(hrefProp)\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n }\n }\n\n const [resolvedHref, resolvedAs] = resolveHref(router, hrefProp, true)\n\n return {\n href: resolvedHref,\n as: asProp ? resolveHref(router, asProp) : resolvedAs || resolvedHref,\n }\n }, [router, hrefProp, asProp])\n\n const previousHref = React.useRef<string>(href)\n const previousAs = React.useRef<string>(as)\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n const [setIntersectionRef, isVisible, resetVisible] = useIntersection({\n rootMargin: '200px',\n })\n const setIntersectionWithResetRef = React.useCallback(\n (el: Element | null) => {\n // Before the link getting observed, check if visible state need to be reset\n if (previousAs.current !== as || previousHref.current !== href) {\n resetVisible()\n previousAs.current = as\n previousHref.current = href\n }\n\n setIntersectionRef(el)\n },\n [as, href, resetVisible, setIntersectionRef]\n )\n\n const setRef = useMergedRef(setIntersectionWithResetRef, childRef)\n\n // Prefetch the URL if we haven't already and it's visible.\n React.useEffect(() => {\n // in dev, we only prefetch on hover to avoid wasting resources as the prefetch will trigger compiling the page.\n if (process.env.NODE_ENV !== 'production') {\n return\n }\n\n if (!router) {\n return\n }\n\n // If we don't need to prefetch the URL, don't do prefetch.\n if (!isVisible || !prefetchEnabled) {\n return\n }\n\n // Prefetch the URL.\n prefetch(router, href, as, {\n // dedupe across appear/disappear of the Link.\n bypassPrefetchedCheck: false,\n locale,\n })\n }, [as, href, isVisible, locale, prefetchEnabled, router?.locale, router])\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: setRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n\n if (e.defaultPrevented) {\n return\n }\n\n linkClicked(\n e,\n router,\n href,\n as,\n replace,\n shallow,\n scroll,\n locale,\n onNavigate\n )\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n\n prefetch(router, href, as, {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true,\n })\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n\n prefetch(router, href, as, {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true,\n })\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the domain and locale.\n if (isAbsoluteUrl(as)) {\n childProps.href = as\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n const curLocale = typeof locale !== 'undefined' ? locale : router?.locale\n\n // we only render domain locales if we are currently on a domain locale\n // so that locale links are still visitable in development/preview envs\n const localeDomain =\n router?.isLocaleDomain &&\n getDomainLocale(as, curLocale, router?.locales, router?.domainLocales)\n\n childProps.href =\n localeDomain ||\n addBasePath(addLocale(as, curLocale, router?.defaultLocale))\n }\n\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n const { errorOnce } =\n require('../shared/lib/utils/error-once') as typeof import('../shared/lib/utils/error-once')\n errorOnce(\n '`legacyBehavior` is deprecated and will be removed in a future ' +\n 'release. A codemod is available to upgrade your components:\\n\\n' +\n 'npx @next/codemod@latest new-link .\\n\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'\n )\n }\n return React.cloneElement(child, childProps)\n }\n\n return (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n)\n\nconst LinkStatusContext = createContext<{\n pending: boolean\n}>({\n // We do not support link status in the Pages Router, so we always return false\n pending: false,\n})\n\nexport const useLinkStatus = () => {\n // This behaviour is like React's useFormStatus. When the component is not under\n // a <form> tag, it will get the default value, instead of throwing an error.\n return useContext(LinkStatusContext)\n}\n\nexport default Link\n"],"names":["React","createContext","useContext","resolveHref","isLocalURL","formatUrl","isAbsoluteUrl","addLocale","RouterContext","useIntersection","getDomainLocale","addBasePath","useMergedRef","prefetched","Set","prefetch","router","href","as","options","window","bypassPrefetchedCheck","locale","undefined","prefetchedKey","has","add","catch","err","process","env","NODE_ENV","isModifiedEvent","event","eventTarget","currentTarget","target","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","replace","shallow","scroll","onNavigate","nodeName","isAnchorNodeName","toUpperCase","hasAttribute","preventDefault","location","navigate","isDefaultPrevented","routerScroll","formatStringOrUrl","urlObjOrString","Link","forwardRef","LinkComponent","props","forwardedRef","children","hrefProp","asProp","childrenProp","prefetchProp","passHref","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","transitionTypes","restProps","a","prefetchEnabled","createPropError","args","Error","key","expected","actual","requiredPropsGuard","requiredProps","Object","keys","forEach","_","optionalPropsGuard","optionalProps","valType","Array","isArray","useMemo","resolvedHref","resolvedAs","previousHref","useRef","previousAs","child","console","warn","Children","only","type","childRef","ref","setIntersectionRef","isVisible","resetVisible","rootMargin","setIntersectionWithResetRef","useCallback","el","current","setRef","useEffect","childProps","defaultPrevented","priority","__NEXT_LINK_NO_TOUCH_START","curLocale","localeDomain","isLocaleDomain","locales","domainLocales","defaultLocale","errorOnce","require","cloneElement","LinkStatusContext","pending","useLinkStatus"],"mappings":"AAAA;;AAOA,OAAOA,SAASC,aAAa,EAAEC,UAAU,QAAQ,QAAO;AAExD,SAASC,WAAW,QAAQ,iBAAgB;AAC5C,SAASC,UAAU,QAAQ,0CAAyC;AACpE,SAASC,SAAS,QAAQ,wCAAuC;AACjE,SAASC,aAAa,QAAQ,sBAAqB;AACnD,SAASC,SAAS,QAAQ,eAAc;AACxC,SAASC,aAAa,QAAQ,8CAA6C;AAE3E,SAASC,eAAe,QAAQ,qBAAoB;AACpD,SAASC,eAAe,QAAQ,sBAAqB;AACrD,SAASC,WAAW,QAAQ,kBAAiB;AAC7C,SAASC,YAAY,QAAQ,mBAAkB;AA4H/C,MAAMC,aAAa,IAAIC;AAUvB,SAASC,SACPC,MAAkB,EAClBC,IAAY,EACZC,EAAU,EACVC,OAAwB;IAExB,IAAI,OA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Y,CAAC9B;YAC3B;YAEA,IAAI,CAAC7B,QAAQ;gBACX;YACF;YAEAD,SAASC,QAAQC,MAAMC,IAAI;gBACzBI;gBACAuG,UAAU;gBACV,gGAAgG;gBAChGxG,uBAAuB;YACzB;QACF;IACN;IAEA,oFAAoF;IACpF,IAAIf,cAAcY,KAAK;QACrByG,WAAW1G,IAAI,GAAGC;IACpB,OAAO,IACL,CAAC2D,kBACDN,YACCkC,MAAMK,IAAI,KAAK,OAAO,CAAE,CAAA,UAAUL,MAAMzC,KAAK,AAAD,GAC7C;QACA,MAAM+D,YAAY,OAAOzG,WAAW,cAAcA,SAASN,QAAQM;QAEnE,uEAAuE;QACvE,uEAAuE;QACvE,MAAM0G,eACJhH,QAAQiH,kBACRvH,gBAAgBQ,IAAI6G,WAAW/G,QAAQkH,SAASlH,QAAQmH;QAE1DR,WAAW1G,IAAI,GACb+G,gBACArH,YAAYJ,UAAUW,IAAI6G,WAAW/G,QAAQoH;IACjD;IAEA,IAAIvD,gBAAgB;QAClB,IAAIhD,QAAQC,GAAG,CAACC,QAAQ,KAAK,eAAe;YAC1C,MAAM,EAAEsG,SAAS,EAAE,GACjBC,QAAQ;YACVD,UACE,oEACE,oEACA,4CACA;QAEN;QACA,qBAAOrI,MAAMuI,YAAY,CAAC9B,OAAOkB;IACnC;IAEA,qBACE,KAAC3C;QAAG,GAAGD,SAAS;QAAG,GAAG4C,UAAU;kBAC7BzD;;AAGP;AAGF,MAAMsE,kCAAoBvI,cAEvB;IACD,+EAA+E;IAC/EwI,SAAS;AACX;AAEA,OAAO,MAAMC,gBAAgB;IAC3B,gFAAgF;IAChF,6EAA6E;IAC7E,OAAOxI,WAAWsI;AACpB,EAAC;AAED,eAAe3E,KAAI","ignoreList":[0]} |
@@ -20,3 +20,3 @@ import { readFileSync, writeFileSync } from 'fs'; | ||
| const data = await res.json(); | ||
| const versionData = data.versions["16.3.0-canary.51"]; | ||
| const versionData = data.versions["16.3.0-canary.52"]; | ||
| return { | ||
@@ -54,3 +54,3 @@ os: versionData.os, | ||
| lockfileParsed.dependencies[pkg] = { | ||
| version: "16.3.0-canary.51", | ||
| version: "16.3.0-canary.52", | ||
| resolved: pkgData.tarball, | ||
@@ -63,3 +63,3 @@ integrity: pkgData.integrity, | ||
| lockfileParsed.packages[pkg] = { | ||
| version: "16.3.0-canary.51", | ||
| version: "16.3.0-canary.52", | ||
| resolved: pkgData.tarball, | ||
@@ -66,0 +66,0 @@ integrity: pkgData.integrity, |
@@ -134,3 +134,3 @@ import { InvariantError } from '../../shared/lib/invariant-error'; | ||
| } else { | ||
| if (process.env.__NEXT_BUNDLER === 'Webpack') { | ||
| if (process.env.__NEXT_BUNDLER === 'Webpack' || process.env.__NEXT_BUNDLER === 'Rspack') { | ||
| ReadableCtor = __non_webpack_require__('node:stream').Readable; | ||
@@ -137,0 +137,0 @@ } else { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../../src/server/app-render/app-render-prerender-utils.ts"],"sourcesContent":["import type { Readable } from 'node:stream'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nexport type AnyStream = ReadableStream<Uint8Array> | Readable\n\nfunction isWebStream(stream: AnyStream): stream is ReadableStream<Uint8Array> {\n return typeof (stream as ReadableStream).tee === 'function'\n}\n\n// React's RSC prerender function will emit an incomplete flight stream when using `prerender`. If the connection\n// closes then whatever hanging chunks exist will be errored. This is because prerender (an experimental feature)\n// has not yet implemented a concept of resume. For now we will simulate a paused connection by wrapping the stream\n// in one that doesn't close even when the underlying is complete.\nexport class ReactServerResult {\n private _stream: null | AnyStream\n private _replayable: ReplayableNodeStream | null\n\n constructor(stream: AnyStream) {\n if (process.env.__NEXT_USE_NODE_STREAMS && !isWebStream(stream)) {\n this._stream = null\n this._replayable = new ReplayableNodeStream(stream as Readable)\n } else {\n this._stream = stream\n this._replayable = null\n }\n }\n\n tee(): AnyStream {\n if (this._replayable) {\n return this._replayable.createReplayStream()\n }\n\n if (this._stream === null) {\n throw new Error(\n 'Cannot tee a ReactServerResult that has already been consumed'\n )\n }\n if (isWebStream(this._stream)) {\n const tee = this._stream.tee()\n this._stream = tee[0]\n return tee[1]\n }\n\n if (process.env.NEXT_RUNTIME === 'edge') {\n throw new InvariantError(\n 'Node.js Readable cannot be teed in the edge runtime'\n )\n } else {\n let Readable: typeof import('node:stream').Readable\n if (process.env.TURBOPACK) {\n Readable = (require('node:stream') as typeof import('node:stream'))\n .Readable\n } else {\n Readable = (\n __non_webpack_require__('node:stream') as typeof import('node:stream')\n ).Readable\n }\n const webStream = Readable.toWeb(\n this._stream\n ) as ReadableStream<Uint8Array>\n const tee = webStream.tee()\n this._stream = Readable.fromWeb(\n tee[0] as import('stream/web').ReadableStream\n )\n return Readable.fromWeb(tee[1] as import('stream/web').ReadableStream)\n }\n }\n\n consume(): AnyStream {\n if (this._replayable) {\n const stream = this._replayable.createReplayStream()\n this._replayable.dispose()\n this._replayable = null\n return stream\n }\n\n if (this._stream === null) {\n throw new Error(\n 'Cannot consume a ReactServerResult that has already been consumed'\n )\n }\n const stream = this._stream\n this._stream = null\n return stream\n }\n}\n\ntype ReplayableStreamSubscriber = {\n onChunk: (chunk: Uint8Array) => void\n onEnd: () => void\n onError: (err: Error) => void\n}\n\n/**\n * Buffers all chunks from a Node.js Readable stream and allows creating new\n * Readable streams that replay the buffered chunks plus any subsequent chunks\n * from the source. Multiple replay streams can be created independently.\n */\nexport class ReplayableNodeStream {\n private _chunks: Array<Uint8Array> | null\n private _done: boolean\n private _error: Error | null\n private _subscribers: Set<ReplayableStreamSubscriber>\n\n constructor(stream: Readable) {\n this._chunks = []\n this._done = false\n this._error = null\n this._subscribers = new Set()\n\n stream.on('data', (chunk: Buffer | Uint8Array) => {\n const buf = chunk instanceof Uint8Array ? chunk : new Uint8Array(chunk)\n if (this._chunks !== null) {\n this._chunks.push(buf)\n }\n for (const sub of this._subscribers) {\n sub.onChunk(buf)\n }\n })\n\n stream.on('end', () => {\n this._done = true\n for (const sub of this._subscribers) {\n sub.onEnd()\n }\n this._subscribers.clear()\n })\n\n stream.on('error', (err: Error) => {\n this._error = err\n for (const sub of this._subscribers) {\n sub.onError(err)\n }\n this._subscribers.clear()\n })\n }\n\n /**\n * Creates a new Node.js Readable stream that first emits all buffered chunks,\n * then forwards any new chunks from the source as they arrive.\n *\n * Buffered chunks are delivered via _read() (pull-based) rather than pushed\n * eagerly. This is critical because createReplayStream() is called outside\n * of AsyncLocalStorage context, and eagerly pushing chunks triggers internal\n * Node.js stream scheduling (process.nextTick for maybeReadMore) that\n * captures the empty ALS context. By deferring to _read(), chunks are only\n * delivered when the consumer reads, which happens inside the correct ALS\n * scope (e.g. during Fizz's performWork).\n */\n createReplayStream(): Readable {\n if (this._chunks === null) {\n throw new InvariantError(\n 'Cannot create a replay stream after the ReplayableNodeStream has been disposed.'\n )\n }\n\n let ReadableCtor: typeof import('node:stream').Readable\n if (process.env.NEXT_RUNTIME === 'edge') {\n throw new InvariantError(\n 'Node.js Readable cannot be teed in the edge runtime'\n )\n } else {\n if (process.env.__NEXT_BUNDLER === 'Webpack') {\n ReadableCtor = (\n __non_webpack_require__('node:stream') as typeof import('node:stream')\n ).Readable\n } else {\n ReadableCtor = (require('node:stream') as typeof import('node:stream'))\n .Readable\n }\n }\n\n const bufferedChunks = this._chunks.slice()\n let bufferIndex = 0\n let bufferDrained = false\n const isDone = this._done\n const sourceError = this._error\n\n const stream = new ReadableCtor({\n read() {\n if (!bufferDrained) {\n bufferDrained = true\n for (let i = bufferIndex; i < bufferedChunks.length; i++) {\n this.push(bufferedChunks[i])\n }\n bufferIndex = bufferedChunks.length\n if (isDone) {\n this.push(null)\n }\n }\n },\n })\n\n if (sourceError) {\n stream.destroy(sourceError)\n return stream\n }\n\n if (isDone) {\n return stream\n }\n\n const subscriber: ReplayableStreamSubscriber = {\n onChunk: (chunk) => {\n stream.push(chunk)\n },\n onEnd: () => {\n stream.push(null)\n },\n onError: (err) => {\n stream.destroy(err)\n },\n }\n this._subscribers.add(subscriber)\n\n stream.on('close', () => {\n this._subscribers.delete(subscriber)\n })\n\n return stream\n }\n\n /**\n * Clears the buffered chunks and all subscriber references. After calling\n * this, no new replay streams can be created.\n */\n dispose(): void {\n this._chunks = null\n }\n}\n\nexport type ReactServerPrerenderResolveToType = {\n prelude: ReadableStream<Uint8Array>\n}\n\nexport async function createReactServerPrerenderResult(\n underlying: Promise<ReactServerPrerenderResolveToType>\n): Promise<ReactServerPrerenderResult> {\n const chunks: Array<Uint8Array> = []\n const { prelude } = await underlying\n const reader = prelude.getReader()\n while (true) {\n const { done, value } = await reader.read()\n if (done) {\n return new ReactServerPrerenderResult(chunks)\n } else {\n chunks.push(value)\n }\n }\n}\n\nexport async function createReactServerPrerenderResultFromRender(\n underlying: AnyStream\n): Promise<ReactServerPrerenderResult> {\n const chunks: Array<Uint8Array> = []\n\n if (isWebStream(underlying)) {\n const reader = underlying.getReader()\n while (true) {\n const { done, value } = await reader.read()\n if (done) {\n break\n } else {\n chunks.push(value)\n }\n }\n } else {\n for await (const chunk of underlying) {\n chunks.push(chunk instanceof Uint8Array ? chunk : new Uint8Array(chunk))\n }\n }\n\n return new ReactServerPrerenderResult(chunks)\n}\nexport class ReactServerPrerenderResult {\n private _chunks: null | Array<Uint8Array>\n\n private assertChunks(expression: string): Array<Uint8Array> {\n if (this._chunks === null) {\n throw new InvariantError(\n `Cannot \\`${expression}\\` on a ReactServerPrerenderResult that has already been consumed.`\n )\n }\n return this._chunks\n }\n\n private consumeChunks(expression: string): Array<Uint8Array> {\n const chunks = this.assertChunks(expression)\n this.consume()\n return chunks\n }\n\n consume(): void {\n this._chunks = null\n }\n\n constructor(chunks: Array<Uint8Array>) {\n this._chunks = chunks\n }\n\n asChunks(): Array<Uint8Array> {\n const chunks = this.assertChunks('asChunks()')\n return chunks\n }\n\n asUnclosingStream(): ReadableStream<Uint8Array> {\n const chunks = this.assertChunks('asUnclosingStream()')\n return createUnclosingStream(chunks)\n }\n\n consumeAsUnclosingStream(): ReadableStream<Uint8Array> {\n const chunks = this.consumeChunks('consumeAsUnclosingStream()')\n return createUnclosingStream(chunks)\n }\n\n asStream(): ReadableStream<Uint8Array> {\n const chunks = this.assertChunks('asStream()')\n return createClosingStream(chunks)\n }\n\n consumeAsStream(): ReadableStream<Uint8Array> {\n const chunks = this.consumeChunks('consumeAsStream()')\n return createClosingStream(chunks)\n }\n}\n\nfunction createUnclosingStream(\n chunks: Array<Uint8Array>\n): ReadableStream<Uint8Array> {\n let i = 0\n return new ReadableStream({\n async pull(controller) {\n if (i < chunks.length) {\n controller.enqueue(chunks[i++])\n }\n // we intentionally keep the stream open. The consumer will clear\n // out chunks once finished and the remaining memory will be GC'd\n // when this object goes out of scope\n },\n })\n}\n\nfunction createClosingStream(\n chunks: Array<Uint8Array>\n): ReadableStream<Uint8Array> {\n let i = 0\n return new ReadableStream({\n async pull(controller) {\n if (i < chunks.length) {\n controller.enqueue(chunks[i++])\n } else {\n controller.close()\n }\n },\n })\n}\n\nexport async function processPrelude(\n unprocessedPrelude: ReadableStream<Uint8Array>\n) {\n const [prelude, peek] = unprocessedPrelude.tee()\n\n const reader = peek.getReader()\n const firstResult = await reader.read()\n reader.cancel()\n\n const preludeIsEmpty = firstResult.done === true\n\n return { prelude, preludeIsEmpty }\n}\n"],"names":["InvariantError","isWebStream","stream","tee","ReactServerResult","constructor","process","env","__NEXT_USE_NODE_STREAMS","_stream","_replayable","ReplayableNodeStream","createReplayStream","Error","NEXT_RUNTIME","Readable","TURBOPACK","require","__non_webpack_require__","webStream","toWeb","fromWeb","consume","dispose","_chunks","_done","_error","_subscribers","Set","on","chunk","buf","Uint8Array","push","sub","onChunk","onEnd","clear","err","onError","ReadableCtor","__NEXT_BUNDLER","bufferedChunks","slice","bufferIndex","bufferDrained","isDone","sourceError","read","i","length","destroy","subscriber","add","delete","createReactServerPrerenderResult","underlying","chunks","prelude","reader","getReader","done","value","ReactServerPrerenderResult","createReactServerPrerenderResultFromRender","assertChunks","expression","consumeChunks","asChunks","asUnclosingStream","createUnclosingStream","consumeAsUnclosingStream","asStream","createClosingStream","consumeAsStream","ReadableStream","pull","controller","enqueue","close","processPrelude","unprocessedPrelude","peek","firstResult","cancel","preludeIsEmpty"],"mappings":"AACA,SAASA,cAAc,QAAQ,mCAAkC;AAIjE,SAASC,YAAYC,MAAiB;IACpC,OAAO,OAAO,AAACA,OAA0BC,GAAG,KAAK;AACnD;AAEA,iHAAiH;AACjH,iHAAiH;AACjH,mHAAmH;AACnH,kEAAkE;AAClE,OAAO,MAAMC;IAIXC,YAAYH,MAAiB,CAAE;QAC7B,IAAII,QAAQC,GAAG,CAACC,uBAAuB,IAAI,CAACP,YAAYC,SAAS;YAC/D,IAAI,CAACO,OAAO,GAAG;YACf,IAAI,CAACC,WAAW,GAAG,IAAIC,qBAAqBT;QAC9C,OAAO;YACL,IAAI,CAACO,OAAO,GAAGP;YACf,IAAI,CAACQ,WAAW,GAAG;QACrB;IACF;IAEAP,MAAiB;QACf,IAAI,IAAI,CAACO,WAAW,EAAE;YACpB,OAAO,IAAI,CAACA,WAAW,CAACE,kBAAkB;QAC5C;QAEA,IAAI,IAAI,CAACH,OAAO,KAAK,MAAM;YACzB,MAAM,qBAEL,CAFK,IAAII,MACR,kEADI,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QACF;QACA,IAAIZ,YAAY,IAAI,CAACQ,OAAO,GAAG;YAC7B,MAAMN,MAAM,IAAI,CAACM,OAAO,CAACN,GAAG;YAC5B,IAAI,CAACM,OAAO,GAAGN,GAAG,CAAC,EAAE;YACrB,OAAOA,GAAG,CAAC,EAAE;QACf;QAEA,IAAIG,QAAQC,GAAG,CAACO,YAAY,KAAK,QAAQ;YACvC,MAAM,qBAEL,CAFK,IAAId,eACR,wDADI,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QACF,OAAO;YACL,IAAIe;YACJ,IAAIT,QAAQC,GAAG,CAACS,SAAS,EAAE;gBACzBD,WAAW,AAACE,QAAQ,eACjBF,QAAQ;YACb,OAAO;gBACLA,WAAW,AAC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AiE;QACjE,iEAAiE;QACjE,qCAAqC;QACvC;IACF;AACF;AAEA,SAASwB,oBACPhB,MAAyB;IAEzB,IAAIR,IAAI;IACR,OAAO,IAAI0B,eAAe;QACxB,MAAMC,MAAKC,UAAU;YACnB,IAAI5B,IAAIQ,OAAOP,MAAM,EAAE;gBACrB2B,WAAWC,OAAO,CAACrB,MAAM,CAACR,IAAI;YAChC,OAAO;gBACL4B,WAAWE,KAAK;YAClB;QACF;IACF;AACF;AAEA,OAAO,eAAeC,eACpBC,kBAA8C;IAE9C,MAAM,CAACvB,SAASwB,KAAK,GAAGD,mBAAmB9E,GAAG;IAE9C,MAAMwD,SAASuB,KAAKtB,SAAS;IAC7B,MAAMuB,cAAc,MAAMxB,OAAOX,IAAI;IACrCW,OAAOyB,MAAM;IAEb,MAAMC,iBAAiBF,YAAYtB,IAAI,KAAK;IAE5C,OAAO;QAAEH;QAAS2B;IAAe;AACnC","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../../src/server/app-render/app-render-prerender-utils.ts"],"sourcesContent":["import type { Readable } from 'node:stream'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nexport type AnyStream = ReadableStream<Uint8Array> | Readable\n\nfunction isWebStream(stream: AnyStream): stream is ReadableStream<Uint8Array> {\n return typeof (stream as ReadableStream).tee === 'function'\n}\n\n// React's RSC prerender function will emit an incomplete flight stream when using `prerender`. If the connection\n// closes then whatever hanging chunks exist will be errored. This is because prerender (an experimental feature)\n// has not yet implemented a concept of resume. For now we will simulate a paused connection by wrapping the stream\n// in one that doesn't close even when the underlying is complete.\nexport class ReactServerResult {\n private _stream: null | AnyStream\n private _replayable: ReplayableNodeStream | null\n\n constructor(stream: AnyStream) {\n if (process.env.__NEXT_USE_NODE_STREAMS && !isWebStream(stream)) {\n this._stream = null\n this._replayable = new ReplayableNodeStream(stream as Readable)\n } else {\n this._stream = stream\n this._replayable = null\n }\n }\n\n tee(): AnyStream {\n if (this._replayable) {\n return this._replayable.createReplayStream()\n }\n\n if (this._stream === null) {\n throw new Error(\n 'Cannot tee a ReactServerResult that has already been consumed'\n )\n }\n if (isWebStream(this._stream)) {\n const tee = this._stream.tee()\n this._stream = tee[0]\n return tee[1]\n }\n\n if (process.env.NEXT_RUNTIME === 'edge') {\n throw new InvariantError(\n 'Node.js Readable cannot be teed in the edge runtime'\n )\n } else {\n let Readable: typeof import('node:stream').Readable\n if (process.env.TURBOPACK) {\n Readable = (require('node:stream') as typeof import('node:stream'))\n .Readable\n } else {\n Readable = (\n __non_webpack_require__('node:stream') as typeof import('node:stream')\n ).Readable\n }\n const webStream = Readable.toWeb(\n this._stream\n ) as ReadableStream<Uint8Array>\n const tee = webStream.tee()\n this._stream = Readable.fromWeb(\n tee[0] as import('stream/web').ReadableStream\n )\n return Readable.fromWeb(tee[1] as import('stream/web').ReadableStream)\n }\n }\n\n consume(): AnyStream {\n if (this._replayable) {\n const stream = this._replayable.createReplayStream()\n this._replayable.dispose()\n this._replayable = null\n return stream\n }\n\n if (this._stream === null) {\n throw new Error(\n 'Cannot consume a ReactServerResult that has already been consumed'\n )\n }\n const stream = this._stream\n this._stream = null\n return stream\n }\n}\n\ntype ReplayableStreamSubscriber = {\n onChunk: (chunk: Uint8Array) => void\n onEnd: () => void\n onError: (err: Error) => void\n}\n\n/**\n * Buffers all chunks from a Node.js Readable stream and allows creating new\n * Readable streams that replay the buffered chunks plus any subsequent chunks\n * from the source. Multiple replay streams can be created independently.\n */\nexport class ReplayableNodeStream {\n private _chunks: Array<Uint8Array> | null\n private _done: boolean\n private _error: Error | null\n private _subscribers: Set<ReplayableStreamSubscriber>\n\n constructor(stream: Readable) {\n this._chunks = []\n this._done = false\n this._error = null\n this._subscribers = new Set()\n\n stream.on('data', (chunk: Buffer | Uint8Array) => {\n const buf = chunk instanceof Uint8Array ? chunk : new Uint8Array(chunk)\n if (this._chunks !== null) {\n this._chunks.push(buf)\n }\n for (const sub of this._subscribers) {\n sub.onChunk(buf)\n }\n })\n\n stream.on('end', () => {\n this._done = true\n for (const sub of this._subscribers) {\n sub.onEnd()\n }\n this._subscribers.clear()\n })\n\n stream.on('error', (err: Error) => {\n this._error = err\n for (const sub of this._subscribers) {\n sub.onError(err)\n }\n this._subscribers.clear()\n })\n }\n\n /**\n * Creates a new Node.js Readable stream that first emits all buffered chunks,\n * then forwards any new chunks from the source as they arrive.\n *\n * Buffered chunks are delivered via _read() (pull-based) rather than pushed\n * eagerly. This is critical because createReplayStream() is called outside\n * of AsyncLocalStorage context, and eagerly pushing chunks triggers internal\n * Node.js stream scheduling (process.nextTick for maybeReadMore) that\n * captures the empty ALS context. By deferring to _read(), chunks are only\n * delivered when the consumer reads, which happens inside the correct ALS\n * scope (e.g. during Fizz's performWork).\n */\n createReplayStream(): Readable {\n if (this._chunks === null) {\n throw new InvariantError(\n 'Cannot create a replay stream after the ReplayableNodeStream has been disposed.'\n )\n }\n\n let ReadableCtor: typeof import('node:stream').Readable\n if (process.env.NEXT_RUNTIME === 'edge') {\n throw new InvariantError(\n 'Node.js Readable cannot be teed in the edge runtime'\n )\n } else {\n if (\n process.env.__NEXT_BUNDLER === 'Webpack' ||\n process.env.__NEXT_BUNDLER === 'Rspack'\n ) {\n ReadableCtor = (\n __non_webpack_require__('node:stream') as typeof import('node:stream')\n ).Readable\n } else {\n ReadableCtor = (require('node:stream') as typeof import('node:stream'))\n .Readable\n }\n }\n\n const bufferedChunks = this._chunks.slice()\n let bufferIndex = 0\n let bufferDrained = false\n const isDone = this._done\n const sourceError = this._error\n\n const stream = new ReadableCtor({\n read() {\n if (!bufferDrained) {\n bufferDrained = true\n for (let i = bufferIndex; i < bufferedChunks.length; i++) {\n this.push(bufferedChunks[i])\n }\n bufferIndex = bufferedChunks.length\n if (isDone) {\n this.push(null)\n }\n }\n },\n })\n\n if (sourceError) {\n stream.destroy(sourceError)\n return stream\n }\n\n if (isDone) {\n return stream\n }\n\n const subscriber: ReplayableStreamSubscriber = {\n onChunk: (chunk) => {\n stream.push(chunk)\n },\n onEnd: () => {\n stream.push(null)\n },\n onError: (err) => {\n stream.destroy(err)\n },\n }\n this._subscribers.add(subscriber)\n\n stream.on('close', () => {\n this._subscribers.delete(subscriber)\n })\n\n return stream\n }\n\n /**\n * Clears the buffered chunks and all subscriber references. After calling\n * this, no new replay streams can be created.\n */\n dispose(): void {\n this._chunks = null\n }\n}\n\nexport type ReactServerPrerenderResolveToType = {\n prelude: ReadableStream<Uint8Array>\n}\n\nexport async function createReactServerPrerenderResult(\n underlying: Promise<ReactServerPrerenderResolveToType>\n): Promise<ReactServerPrerenderResult> {\n const chunks: Array<Uint8Array> = []\n const { prelude } = await underlying\n const reader = prelude.getReader()\n while (true) {\n const { done, value } = await reader.read()\n if (done) {\n return new ReactServerPrerenderResult(chunks)\n } else {\n chunks.push(value)\n }\n }\n}\n\nexport async function createReactServerPrerenderResultFromRender(\n underlying: AnyStream\n): Promise<ReactServerPrerenderResult> {\n const chunks: Array<Uint8Array> = []\n\n if (isWebStream(underlying)) {\n const reader = underlying.getReader()\n while (true) {\n const { done, value } = await reader.read()\n if (done) {\n break\n } else {\n chunks.push(value)\n }\n }\n } else {\n for await (const chunk of underlying) {\n chunks.push(chunk instanceof Uint8Array ? chunk : new Uint8Array(chunk))\n }\n }\n\n return new ReactServerPrerenderResult(chunks)\n}\nexport class ReactServerPrerenderResult {\n private _chunks: null | Array<Uint8Array>\n\n private assertChunks(expression: string): Array<Uint8Array> {\n if (this._chunks === null) {\n throw new InvariantError(\n `Cannot \\`${expression}\\` on a ReactServerPrerenderResult that has already been consumed.`\n )\n }\n return this._chunks\n }\n\n private consumeChunks(expression: string): Array<Uint8Array> {\n const chunks = this.assertChunks(expression)\n this.consume()\n return chunks\n }\n\n consume(): void {\n this._chunks = null\n }\n\n constructor(chunks: Array<Uint8Array>) {\n this._chunks = chunks\n }\n\n asChunks(): Array<Uint8Array> {\n const chunks = this.assertChunks('asChunks()')\n return chunks\n }\n\n asUnclosingStream(): ReadableStream<Uint8Array> {\n const chunks = this.assertChunks('asUnclosingStream()')\n return createUnclosingStream(chunks)\n }\n\n consumeAsUnclosingStream(): ReadableStream<Uint8Array> {\n const chunks = this.consumeChunks('consumeAsUnclosingStream()')\n return createUnclosingStream(chunks)\n }\n\n asStream(): ReadableStream<Uint8Array> {\n const chunks = this.assertChunks('asStream()')\n return createClosingStream(chunks)\n }\n\n consumeAsStream(): ReadableStream<Uint8Array> {\n const chunks = this.consumeChunks('consumeAsStream()')\n return createClosingStream(chunks)\n }\n}\n\nfunction createUnclosingStream(\n chunks: Array<Uint8Array>\n): ReadableStream<Uint8Array> {\n let i = 0\n return new ReadableStream({\n async pull(controller) {\n if (i < chunks.length) {\n controller.enqueue(chunks[i++])\n }\n // we intentionally keep the stream open. The consumer will clear\n // out chunks once finished and the remaining memory will be GC'd\n // when this object goes out of scope\n },\n })\n}\n\nfunction createClosingStream(\n chunks: Array<Uint8Array>\n): ReadableStream<Uint8Array> {\n let i = 0\n return new ReadableStream({\n async pull(controller) {\n if (i < chunks.length) {\n controller.enqueue(chunks[i++])\n } else {\n controller.close()\n }\n },\n })\n}\n\nexport async function processPrelude(\n unprocessedPrelude: ReadableStream<Uint8Array>\n) {\n const [prelude, peek] = unprocessedPrelude.tee()\n\n const reader = peek.getReader()\n const firstResult = await reader.read()\n reader.cancel()\n\n const preludeIsEmpty = firstResult.done === true\n\n return { prelude, preludeIsEmpty }\n}\n"],"names":["InvariantError","isWebStream","stream","tee","ReactServerResult","constructor","process","env","__NEXT_USE_NODE_STREAMS","_stream","_replayable","ReplayableNodeStream","createReplayStream","Error","NEXT_RUNTIME","Readable","TURBOPACK","require","__non_webpack_require__","webStream","toWeb","fromWeb","consume","dispose","_chunks","_done","_error","_subscribers","Set","on","chunk","buf","Uint8Array","push","sub","onChunk","onEnd","clear","err","onError","ReadableCtor","__NEXT_BUNDLER","bufferedChunks","slice","bufferIndex","bufferDrained","isDone","sourceError","read","i","length","destroy","subscriber","add","delete","createReactServerPrerenderResult","underlying","chunks","prelude","reader","getReader","done","value","ReactServerPrerenderResult","createReactServerPrerenderResultFromRender","assertChunks","expression","consumeChunks","asChunks","asUnclosingStream","createUnclosingStream","consumeAsUnclosingStream","asStream","createClosingStream","consumeAsStream","ReadableStream","pull","controller","enqueue","close","processPrelude","unprocessedPrelude","peek","firstResult","cancel","preludeIsEmpty"],"mappings":"AACA,SAASA,cAAc,QAAQ,mCAAkC;AAIjE,SAASC,YAAYC,MAAiB;IACpC,OAAO,OAAO,AAACA,OAA0BC,GAAG,KAAK;AACnD;AAEA,iHAAiH;AACjH,iHAAiH;AACjH,mHAAmH;AACnH,kEAAkE;AAClE,OAAO,MAAMC;IAIXC,YAAYH,MAAiB,CAAE;QAC7B,IAAII,QAAQC,GAAG,CAACC,uBAAuB,IAAI,CAACP,YAAYC,SAAS;YAC/D,IAAI,CAACO,OAAO,GAAG;YACf,IAAI,CAACC,WAAW,GAAG,IAAIC,qBAAqBT;QAC9C,OAAO;YACL,IAAI,CAACO,OAAO,GAAGP;YACf,IAAI,CAACQ,WAAW,GAAG;QACrB;IACF;IAEAP,MAAiB;QACf,IAAI,IAAI,CAACO,WAAW,EAAE;YACpB,OAAO,IAAI,CAACA,WAAW,CAACE,kBAAkB;QAC5C;QAEA,IAAI,IAAI,CAACH,OAAO,KAAK,MAAM;YACzB,MAAM,qBAEL,CAFK,IAAII,MACR,kEADI,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QACF;QACA,IAAIZ,YAAY,IAAI,CAACQ,OAAO,GAAG;YAC7B,MAAMN,MAAM,IAAI,CAACM,OAAO,CAACN,GAAG;YAC5B,IAAI,CAACM,OAAO,GAAGN,GAAG,CAAC,EAAE;YACrB,OAAOA,GAAG,CAAC,EAAE;QACf;QAEA,IAAIG,QAAQC,GAAG,CAACO,YAAY,KAAK,QAAQ;YACvC,MAAM,qBAEL,CAFK,IAAId,eACR,wDADI,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QACF,OAAO;YACL,IAAIe;YACJ,IAAIT,QAAQC,GAAG,CAACS,SAA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AAKC,UAAU;YACnB,IAAI5B,IAAIQ,OAAOP,MAAM,EAAE;gBACrB2B,WAAWC,OAAO,CAACrB,MAAM,CAACR,IAAI;YAChC;QACA,iEAAiE;QACjE,iEAAiE;QACjE,qCAAqC;QACvC;IACF;AACF;AAEA,SAASwB,oBACPhB,MAAyB;IAEzB,IAAIR,IAAI;IACR,OAAO,IAAI0B,eAAe;QACxB,MAAMC,MAAKC,UAAU;YACnB,IAAI5B,IAAIQ,OAAOP,MAAM,EAAE;gBACrB2B,WAAWC,OAAO,CAACrB,MAAM,CAACR,IAAI;YAChC,OAAO;gBACL4B,WAAWE,KAAK;YAClB;QACF;IACF;AACF;AAEA,OAAO,eAAeC,eACpBC,kBAA8C;IAE9C,MAAM,CAACvB,SAASwB,KAAK,GAAGD,mBAAmB9E,GAAG;IAE9C,MAAMwD,SAASuB,KAAKtB,SAAS;IAC7B,MAAMuB,cAAc,MAAMxB,OAAOX,IAAI;IACrCW,OAAOyB,MAAM;IAEb,MAAMC,iBAAiBF,YAAYtB,IAAI,KAAK;IAE5C,OAAO;QAAEH;QAAS2B;IAAe;AACnC","ignoreList":[0]} |
@@ -422,2 +422,3 @@ import { VALID_LOADERS } from '../shared/lib/image-config'; | ||
| globalNotFound: z.boolean().optional(), | ||
| turbopackRustReactCompiler: z.boolean().optional(), | ||
| browserDebugInfoInTerminal: z.union([ | ||
@@ -424,0 +425,0 @@ z.boolean(), |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../src/server/config-schema.ts"],"sourcesContent":["import type { NextConfig } from './config'\nimport { VALID_LOADERS } from '../shared/lib/image-config'\n\nimport { z } from 'next/dist/compiled/zod'\nimport type zod from 'next/dist/compiled/zod'\n\nimport type { SizeLimit } from '../types'\nimport {\n LIGHTNINGCSS_FEATURE_NAMES,\n type ExportPathMap,\n type TurbopackLoaderItem,\n type TurbopackOptions,\n type TurbopackRuleConfigItem,\n type TurbopackRuleConfigCollection,\n type TurbopackRuleCondition,\n type TurbopackLoaderBuiltinCondition,\n} from './config-shared'\nimport type {\n Header,\n Rewrite,\n RouteHas,\n Redirect,\n} from '../lib/load-custom-routes'\nimport { SUPPORTED_TEST_RUNNERS_LIST } from '../cli/next-test'\n\n// A custom zod schema for the SizeLimit type\nconst zSizeLimit = z.custom<SizeLimit>((val) => {\n if (typeof val === 'number' || typeof val === 'string') {\n return true\n }\n return false\n})\n\nconst zExportMap: zod.ZodType<ExportPathMap> = z.record(\n z.string(),\n z.object({\n page: z.string(),\n query: z.any(), // NextParsedUrlQuery\n\n // private optional properties\n _fallbackRouteParams: z.array(z.any()).optional(),\n _isAppDir: z.boolean().optional(),\n _isDynamicError: z.boolean().optional(),\n _isRoutePPREnabled: z.boolean().optional(),\n _allowEmptyStaticShell: z.boolean().optional(),\n })\n)\n\nconst zRouteHas: zod.ZodType<RouteHas> = z.union([\n z.object({\n type: z.enum(['header', 'query', 'cookie']),\n key: z.string(),\n value: z.string().optional(),\n }),\n z.object({\n type: z.literal('host'),\n key: z.undefined().optional(),\n value: z.string(),\n }),\n])\n\nconst zRewrite: zod.ZodType<Rewrite> = z.object({\n source: z.string(),\n destination: z.string(),\n basePath: z.literal(false).optional(),\n locale: z.literal(false).optional(),\n has: z.array(zRouteHas).optional(),\n missing: z.array(zRouteHas).optional(),\n internal: z.boolean().optional(),\n})\n\nconst zRedirect: zod.ZodType<Redirect> = z\n .object({\n source: z.string(),\n destination: z.string(),\n basePath: z.literal(false).optional(),\n locale: z.literal(false).optional(),\n has: z.array(zRouteHas).optional(),\n missing: z.array(zRouteHas).optional(),\n internal: z.boolean().optional(),\n })\n .and(\n z.union([\n z.object({\n statusCode: z.never().optional(),\n permanent: z.boolean(),\n }),\n z.object({\n statusCode: z.number(),\n permanent: z.never().optional(),\n }),\n ])\n )\n\nconst zHeader: zod.ZodType<Header> = z.object({\n source: z.string(),\n basePath: z.literal(false).optional(),\n locale: z.literal(false).optional(),\n headers: z.array(z.object({ key: z.string(), value: z.string() })),\n has: z.array(zRouteHas).optional(),\n missing: z.array(zRouteHas).optional(),\n\n internal: z.boolean().optional(),\n})\n\nconst zTurbopackLoaderItem: zod.ZodType<TurbopackLoaderItem> = z.union([\n z.string(),\n z.strictObject({\n loader: z.string(),\n // Any JSON value can be used as turbo loader options, so use z.any() here\n options: z.record(z.string(), z.any()).optional(),\n }),\n])\n\nconst zTurbopackLoaderBuiltinCondition: zod.ZodType<TurbopackLoaderBuiltinCondition> =\n z.union([\n z.literal('browser'),\n z.literal('foreign'),\n z.literal('development'),\n z.literal('production'),\n z.literal('node'),\n z.literal('edge-light'),\n ])\n\nconst zTurbopackCondition: zod.ZodType<TurbopackRuleCondition> = z.union([\n z.strictObject({ all: z.lazy(() => z.array(zTurbopackCondition)) }),\n z.strictObject({ any: z.lazy(() => z.array(zTurbopackCondition)) }),\n z.strictObject({ not: z.lazy(() => zTurbopackCondition) }),\n zTurbopackLoaderBuiltinCondition,\n z.strictObject({\n path: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n content: z.instanceof(RegExp).optional(),\n query: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n contentType: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n }),\n])\n\nconst zTurbopackModuleType = z.enum([\n 'asset',\n 'ecmascript',\n 'typescript',\n 'css',\n 'css-module',\n 'wasm',\n 'raw',\n 'node',\n 'bytes',\n])\n\nconst zTurbopackRuleConfigItem: zod.ZodType<TurbopackRuleConfigItem> =\n z.strictObject({\n loaders: z.array(zTurbopackLoaderItem).optional(),\n as: z.string().optional(),\n condition: zTurbopackCondition.optional(),\n type: zTurbopackModuleType.optional(),\n })\n\nconst zTurbopackRuleConfigCollection: zod.ZodType<TurbopackRuleConfigCollection> =\n z.union([\n zTurbopackRuleConfigItem,\n z.array(z.union([zTurbopackLoaderItem, zTurbopackRuleConfigItem])),\n ])\n\nconst zTurbopackConfig: zod.ZodType<TurbopackOptions> = z.strictObject({\n rules: z.record(z.string(), zTurbopackRuleConfigCollection).optional(),\n resolveAlias: z\n .record(\n z.string(),\n z.union([\n z.string(),\n z.array(z.string()),\n z.record(z.string(), z.union([z.string(), z.array(z.string())])),\n ])\n )\n .optional(),\n resolveExtensions: z.array(z.string()).optional(),\n root: z.string().optional(),\n debugIds: z.boolean().optional(),\n chunkLoadingGlobal: z.string().optional(),\n ignoreIssue: z\n .array(\n z.object({\n path: z.union([z.string(), z.instanceof(RegExp)]),\n title: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n description: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n })\n )\n .optional(),\n})\n\nexport const experimentalSchema = {\n outputHashSalt: z.string().optional(),\n useSkewCookie: z.boolean().optional(),\n after: z.boolean().optional(),\n appNavFailHandling: z.boolean().optional(),\n appNewScrollHandler: z.boolean().optional(),\n preloadEntriesOnStart: z.boolean().optional(),\n allowedRevalidateHeaderKeys: z.array(z.string()).optional(),\n staleTimes: z\n .object({\n dynamic: z.number().optional(),\n static: z.number().gte(30).optional(),\n })\n .optional(),\n cacheLife: z\n .record(\n z.object({\n stale: z.number().optional(),\n revalidate: z.number().optional(),\n expire: z.number().optional(),\n })\n )\n .optional(),\n cacheHandlers: z.record(z.string(), z.string().optional()).optional(),\n clientRouterFilter: z.boolean().optional(),\n clientRouterFilterRedirects: z.boolean().optional(),\n clientRouterFilterAllowedRate: z.number().optional(),\n cpus: z.number().optional(),\n memoryBasedWorkersCount: z.boolean().optional(),\n craCompat: z.boolean().optional(),\n caseSensitiveRoutes: z.boolean().optional(),\n clientParamParsingOrigins: z.array(z.string()).optional(),\n cachedNavigations: z.boolean().optional(),\n dynamicOnHover: z.boolean().optional(),\n useOffline: z.boolean().optional(),\n optimisticRouting: z.boolean().optional(),\n appShells: z.boolean().optional(),\n varyParams: z.boolean().optional(),\n prefetchInlining: z\n .union([\n z.boolean(),\n z.object({\n maxSize: z.number().optional(),\n maxBundleSize: z.number().optional(),\n }),\n ])\n .optional(),\n disableOptimizedLoading: z.boolean().optional(),\n disablePostcssPresetEnv: z.boolean().optional(),\n cacheComponents: z.boolean().optional(),\n inlineCss: z.boolean().optional(),\n esmExternals: z.union([z.boolean(), z.literal('loose')]).optional(),\n serverActions: z\n .object({\n bodySizeLimit: zSizeLimit.optional(),\n allowedOrigins: z.array(z.string()).optional(),\n })\n .optional(),\n maxPostponedStateSize: zSizeLimit.optional(),\n // The original type was Record<string, any>\n extensionAlias: z.record(z.string(), z.any()).optional(),\n externalDir: z.boolean().optional(),\n externalMiddlewareRewritesResolve: z.boolean().optional(),\n externalProxyRewritesResolve: z.boolean().optional(),\n exposeTestingApiInProductionBuild: z.boolean().optional(),\n fallbackNodePolyfills: z.literal(false).optional(),\n fetchCacheKeyPrefix: z.string().optional(),\n forceSwcTransforms: z.boolean().optional(),\n fullySpecified: z.boolean().optional(),\n gzipSize: z.boolean().optional(),\n imgOptConcurrency: z.number().int().optional().nullable(),\n imgOptOperationCache: z.boolean().optional().nullable(),\n imgOptTimeoutInSeconds: z.number().int().optional(),\n imgOptMaxInputPixels: z.number().int().optional(),\n imgOptSequentialRead: z.boolean().optional().nullable(),\n imgOptSkipMetadata: z.boolean().optional().nullable(),\n isrFlushToDisk: z.boolean().optional(),\n largePageDataBytes: z.number().optional(),\n linkNoTouchStart: z.boolean().optional(),\n manualClientBasePath: z.boolean().optional(),\n middlewarePrefetch: z.enum(['strict', 'flexible']).optional(),\n proxyPrefetch: z.enum(['strict', 'flexible']).optional(),\n middlewareClientMaxBodySize: zSizeLimit.optional(),\n proxyClientMaxBodySize: zSizeLimit.optional(),\n multiZoneDraftMode: z.boolean().optional(),\n cssChunking: z\n .union([\n z.boolean(),\n z.literal('strict'),\n z.literal('loose'),\n z.literal('graph'),\n z.strictObject({ type: z.literal('strict') }),\n z.strictObject({ type: z.literal('loose') }),\n z.strictObject({\n type: z.literal('graph'),\n requestCost: z.number().nonnegative().finite().optional(),\n moduleFactorCost: z.number().nonnegative().finite().optional(),\n }),\n ])\n .optional(),\n nextScriptWorkers: z.boolean().optional(),\n // The critter option is unknown, use z.any() here\n optimizeCss: z.union([z.boolean(), z.any()]).optional(),\n optimisticClientCache: z.boolean().optional(),\n parallelServerCompiles: z.boolean().optional(),\n parallelServerBuildTraces: z.boolean().optional(),\n ppr: z\n .union([z.boolean(), z.literal('incremental')])\n .readonly()\n .optional(),\n taint: z.boolean().optional(),\n prerenderEarlyExit: z.boolean().optional(),\n proxyTimeout: z.number().gte(0).optional(),\n rootParams: z.boolean().optional(),\n mcpServer: z.boolean().optional(),\n removeUncaughtErrorAndRejectionListeners: z.boolean().optional(),\n validateRSCRequestHeaders: z.boolean().optional(),\n scrollRestoration: z.boolean().optional(),\n sri: z\n .object({\n algorithm: z.enum(['sha256', 'sha384', 'sha512']).optional(),\n })\n .optional(),\n swcPlugins: z\n // The specific swc plugin's option is unknown, use z.any() here\n .array(z.tuple([z.string(), z.record(z.string(), z.any())]))\n .optional(),\n swcEnvOptions: z\n .object({\n mode: z.enum(['usage', 'entry']).optional(),\n coreJs: z.string().optional(),\n skip: z.array(z.string()).optional(),\n include: z.array(z.string()).optional(),\n exclude: z.array(z.string()).optional(),\n shippedProposals: z.boolean().optional(),\n forceAllTransforms: z.boolean().optional(),\n debug: z.boolean().optional(),\n loose: z.boolean().optional(),\n })\n .optional(),\n swcTraceProfiling: z.boolean().optional(),\n // NonNullable<webpack.Configuration['experiments']>['buildHttp']\n urlImports: z.any().optional(),\n viewTransition: z.boolean().optional(),\n workerThreads: z.boolean().optional(),\n webVitalsAttribution: z\n .array(\n z.union([\n z.literal('CLS'),\n z.literal('FCP'),\n z.literal('FID'),\n z.literal('INP'),\n z.literal('LCP'),\n z.literal('TTFB'),\n ])\n )\n .optional(),\n // This is partial set of mdx-rs transform options we support, aligned\n // with next_core::next_config::MdxRsOptions. Ensure both types are kept in sync.\n mdxRs: z\n .union([\n z.boolean(),\n z.object({\n development: z.boolean().optional(),\n jsxRuntime: z.string().optional(),\n jsxImportSource: z.string().optional(),\n providerImportSource: z.string().optional(),\n mdxType: z.enum(['gfm', 'commonmark']).optional(),\n }),\n ])\n .optional(),\n transitionIndicator: z.boolean().optional(),\n gestureTransition: z.boolean().optional(),\n typedRoutes: z.boolean().optional(),\n webpackBuildWorker: z.boolean().optional(),\n webpackMemoryOptimizations: z.boolean().optional(),\n turbopackMemoryEviction: z\n .union([z.literal(false), z.literal('full')])\n .optional(),\n turbopackPluginRuntimeStrategy: z\n .enum(['workerThreads', 'childProcesses', 'forceWorkerThreads'])\n .optional(),\n turbopackMinify: z.boolean().optional(),\n turbopackFileSystemCacheForDev: z.boolean().optional(),\n turbopackFileSystemCacheForBuild: z.boolean().optional(),\n turbopackSourceMaps: z.boolean().optional(),\n turbopackInputSourceMaps: z.boolean().optional(),\n turbopackTreeShaking: z.boolean().optional(),\n turbopackRemoveUnusedImports: z.boolean().optional(),\n turbopackRemoveUnusedExports: z.boolean().optional(),\n turbopackScopeHoisting: z.boolean().optional(),\n turbopackWorkerAssetPrefix: z.string().optional(),\n turbopackClientSideNestedAsyncChunking: z.boolean().optional(),\n turbopackServerSideNestedAsyncChunking: z.boolean().optional(),\n turbopackImportTypeBytes: z.boolean().optional(),\n turbopackImportTypeText: z.boolean().optional(),\n turbopackUseBuiltinBabel: z.boolean().optional(),\n turbopackUseBuiltinSass: z.boolean().optional(),\n turbopackLocalPostcssConfig: z.boolean().optional(),\n turbopackModuleIds: z.enum(['named', 'deterministic']).optional(),\n turbopackInferModuleSideEffects: z.boolean().optional(),\n turbopackServerFastRefresh: z.boolean().optional(),\n optimizePackageImports: z.array(z.string()).optional(),\n optimizeServerReact: z.boolean().optional(),\n strictRouteTypes: z.boolean().optional(),\n clientTraceMetadata: z.array(z.string()).optional(),\n serverMinification: z.boolean().optional(),\n serverSourceMaps: z.boolean().optional(),\n useWasmBinary: z.boolean().optional(),\n useLightningcss: z.boolean().optional(),\n lightningCssFeatures: z\n .object({\n include: z.array(z.enum(LIGHTNINGCSS_FEATURE_NAMES)).optional(),\n exclude: z.array(z.enum(LIGHTNINGCSS_FEATURE_NAMES)).optional(),\n })\n .optional(),\n testProxy: z.boolean().optional(),\n defaultTestRunner: z.enum(SUPPORTED_TEST_RUNNERS_LIST).optional(),\n allowDevelopmentBuild: z.literal(true).optional(),\n\n reactDebugChannel: z.boolean().optional(),\n instantInsights: z\n .object({\n validationLevel: z\n .enum([\n 'warning',\n 'manual-warning',\n 'experimental-error',\n 'experimental-manual-error',\n ])\n .optional(),\n })\n .optional(),\n staticGenerationRetryCount: z.number().int().optional(),\n staticGenerationMaxConcurrency: z.number().int().optional(),\n staticGenerationMinPagesPerWorker: z.number().int().optional(),\n typedEnv: z.boolean().optional(),\n serverComponentsHmrCache: z.boolean().optional(),\n authInterrupts: z.boolean().optional(),\n useCache: z.boolean().optional(),\n useCacheTimeout: z.number().positive().optional(),\n slowModuleDetection: z\n .object({\n buildTimeThresholdMs: z.number().int(),\n })\n .optional(),\n globalNotFound: z.boolean().optional(),\n browserDebugInfoInTerminal: z\n .union([\n z.boolean(),\n z.enum(['error', 'warn', 'verbose']),\n z.object({\n level: z.enum(['error', 'warn', 'verbose']).optional(),\n depthLimit: z.number().int().positive().optional(),\n edgeLimit: z.number().int().positive().optional(),\n showSourceLocation: z.boolean().optional(),\n }),\n ])\n .optional(),\n lockDistDir: z.boolean().optional(),\n hideLogsAfterAbort: z.boolean().optional(),\n runtimeServerDeploymentId: z.boolean().optional(),\n supportsImmutableAssets: z.boolean().optional(),\n deferredEntries: z.array(z.string()).optional(),\n onBeforeDeferredEntries: z.function().returns(z.promise(z.void())).optional(),\n reportSystemEnvInlining: z.enum(['warn', 'error']).optional(),\n}\n\nexport const configSchema: zod.ZodType<NextConfig> = z.lazy(() =>\n z.strictObject({\n adapterPath: z.string().optional(),\n agentRules: z.boolean().optional(),\n allowedDevOrigins: z.array(z.string()).optional(),\n assetPrefix: z.string().optional(),\n basePath: z.string().optional(),\n bundlePagesRouterDependencies: z.boolean().optional(),\n cacheComponents: z.boolean().optional(),\n cacheHandler: z.string().min(1).optional(),\n cacheHandlers: z.record(z.string(), z.string().optional()).optional(),\n cacheLife: z\n .record(\n z.object({\n stale: z.number().optional(),\n revalidate: z.number().optional(),\n expire: z.number().optional(),\n })\n )\n .optional(),\n cacheMaxMemorySize: z.number().optional(),\n cleanDistDir: z.boolean().optional(),\n compiler: z\n .strictObject({\n emotion: z\n .union([\n z.boolean(),\n z.object({\n sourceMap: z.boolean().optional(),\n autoLabel: z\n .union([\n z.literal('always'),\n z.literal('dev-only'),\n z.literal('never'),\n ])\n .optional(),\n labelFormat: z.string().min(1).optional(),\n importMap: z\n .record(\n z.string(),\n z.record(\n z.string(),\n z.object({\n canonicalImport: z\n .tuple([z.string(), z.string()])\n .optional(),\n styledBaseImport: z\n .tuple([z.string(), z.string()])\n .optional(),\n })\n )\n )\n .optional(),\n }),\n ])\n .optional(),\n reactRemoveProperties: z\n .union([\n z.boolean().optional(),\n z.object({\n properties: z.array(z.string()).optional(),\n }),\n ])\n .optional(),\n relay: z\n .object({\n src: z.string(),\n artifactDirectory: z.string().optional(),\n language: z.enum(['javascript', 'typescript', 'flow']).optional(),\n eagerEsModules: z.boolean().optional(),\n })\n .optional(),\n removeConsole: z\n .union([\n z.boolean().optional(),\n z.object({\n exclude: z.array(z.string()).min(1).optional(),\n }),\n ])\n .optional(),\n styledComponents: z.union([\n z.boolean().optional(),\n z.object({\n displayName: z.boolean().optional(),\n topLevelImportPaths: z.array(z.string()).optional(),\n ssr: z.boolean().optional(),\n fileName: z.boolean().optional(),\n meaninglessFileNames: z.array(z.string()).optional(),\n minify: z.boolean().optional(),\n transpileTemplateLiterals: z.boolean().optional(),\n namespace: z.string().min(1).optional(),\n pure: z.boolean().optional(),\n cssProp: z.boolean().optional(),\n }),\n ]),\n styledJsx: z.union([\n z.boolean().optional(),\n z.object({\n useLightningcss: z.boolean().optional(),\n }),\n ]),\n define: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional(),\n defineServer: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional(),\n runAfterProductionCompile: z\n .function()\n .returns(z.promise(z.void()))\n .optional(),\n })\n .optional(),\n compress: z.boolean().optional(),\n configOrigin: z.string().optional(),\n crossOrigin: z\n .union([z.literal('anonymous'), z.literal('use-credentials')])\n .optional(),\n deploymentId: z.string().optional(),\n devIndicators: z\n .union([\n z.object({\n position: z\n .union([\n z.literal('bottom-left'),\n z.literal('bottom-right'),\n z.literal('top-left'),\n z.literal('top-right'),\n ])\n .optional(),\n }),\n z.literal(false),\n ])\n .optional(),\n distDir: z.string().min(1).optional(),\n env: z.record(z.string(), z.union([z.string(), z.undefined()])).optional(),\n enablePrerenderSourceMaps: z.boolean().optional(),\n excludeDefaultMomentLocales: z.boolean().optional(),\n experimental: z.strictObject(experimentalSchema).optional(),\n exportPathMap: z\n .function()\n .args(\n zExportMap,\n z.object({\n dev: z.boolean(),\n dir: z.string(),\n outDir: z.string().nullable(),\n distDir: z.string(),\n buildId: z.string(),\n })\n )\n .returns(z.union([zExportMap, z.promise(zExportMap)]))\n .optional(),\n generateBuildId: z\n .function()\n .args()\n .returns(\n z.union([\n z.string(),\n z.null(),\n z.promise(z.union([z.string(), z.null()])),\n ])\n )\n .optional(),\n generateEtags: z.boolean().optional(),\n headers: z\n .function()\n .args()\n .returns(z.promise(z.array(zHeader)))\n .optional(),\n htmlLimitedBots: z.instanceof(RegExp).optional(),\n httpAgentOptions: z\n .strictObject({ keepAlive: z.boolean().optional() })\n .optional(),\n i18n: z\n .strictObject({\n defaultLocale: z.string().min(1),\n domains: z\n .array(\n z.strictObject({\n defaultLocale: z.string().min(1),\n domain: z.string().min(1),\n http: z.literal(true).optional(),\n locales: z.array(z.string().min(1)).optional(),\n })\n )\n .optional(),\n localeDetection: z.literal(false).optional(),\n locales: z.array(z.string().min(1)),\n })\n .nullable()\n .optional(),\n images: z\n .strictObject({\n localPatterns: z\n .array(\n z.strictObject({\n pathname: z.string().optional(),\n search: z.string().optional(),\n })\n )\n .max(25)\n .optional(),\n remotePatterns: z\n .array(\n z.union([\n z.instanceof(URL),\n z.strictObject({\n hostname: z.string(),\n pathname: z.string().optional(),\n port: z.string().max(5).optional(),\n protocol: z.enum(['http', 'https']).optional(),\n search: z.string().optional(),\n }),\n ])\n )\n .max(50)\n .optional(),\n unoptimized: z.boolean().optional(),\n customCacheHandler: z.boolean().optional(),\n contentSecurityPolicy: z.string().optional(),\n contentDispositionType: z.enum(['inline', 'attachment']).optional(),\n dangerouslyAllowSVG: z.boolean().optional(),\n dangerouslyAllowLocalIP: z.boolean().optional(),\n deviceSizes: z\n .array(z.number().int().gte(1).lte(10000))\n .max(25)\n .optional(),\n disableStaticImages: z.boolean().optional(),\n domains: z.array(z.string()).max(50).optional(),\n formats: z\n .array(z.enum(['image/avif', 'image/webp']))\n .max(4)\n .optional(),\n imageSizes: z\n .array(z.number().int().gte(1).lte(10000))\n .min(0)\n .max(25)\n .optional(),\n loader: z.enum(VALID_LOADERS).optional(),\n loaderFile: z.string().optional(),\n maximumDiskCacheSize: z.number().int().min(0).optional(),\n maximumRedirects: z.number().int().min(0).max(20).optional(),\n maximumResponseBody: z\n .number()\n .int()\n .min(1)\n .max(Number.MAX_SAFE_INTEGER)\n .optional(),\n minimumCacheTTL: z.number().int().gte(0).optional(),\n path: z.string().optional(),\n qualities: z\n .array(z.number().int().gte(1).lte(100))\n .min(1)\n .max(20)\n .optional(),\n })\n .optional(),\n logging: z\n .union([\n z.object({\n fetches: z\n .object({\n fullUrl: z.boolean().optional(),\n hmrRefreshes: z.boolean().optional(),\n })\n .optional(),\n incomingRequests: z\n .union([\n z.boolean(),\n z.object({\n ignore: z.array(z.instanceof(RegExp)),\n }),\n ])\n .optional(),\n serverFunctions: z.boolean().optional(),\n browserToTerminal: z\n .union([z.boolean(), z.enum(['error', 'warn'])])\n .optional(),\n }),\n z.literal(false),\n ])\n .optional(),\n modularizeImports: z\n .record(\n z.string(),\n z.object({\n transform: z.union([z.string(), z.record(z.string(), z.string())]),\n preventFullImport: z.boolean().optional(),\n skipDefaultConversion: z.boolean().optional(),\n })\n )\n .optional(),\n onDemandEntries: z\n .strictObject({\n maxInactiveAge: z.number().optional(),\n pagesBufferLength: z.number().optional(),\n })\n .optional(),\n output: z.enum(['standalone', 'export']).optional(),\n outputFileTracingRoot: z.string().optional(),\n outputFileTracingExcludes: z\n .record(z.string(), z.array(z.string()))\n .optional(),\n outputFileTracingIncludes: z\n .record(z.string(), z.array(z.string()))\n .optional(),\n pageExtensions: z.array(z.string()).min(1).optional(),\n instrumentationClientInject: z.array(z.string()).optional(),\n partialPrefetching: z\n .union([z.boolean(), z.literal('unstable_eager')])\n .optional(),\n poweredByHeader: z.boolean().optional(),\n productionBrowserSourceMaps: z.boolean().optional(),\n reactCompiler: z.union([\n z.boolean(),\n z\n .object({\n compilationMode: z.enum(['infer', 'annotation', 'all']).optional(),\n panicThreshold: z\n .enum(['none', 'critical_errors', 'all_errors'])\n .optional(),\n })\n .optional(),\n ]),\n reactProductionProfiling: z.boolean().optional(),\n reactStrictMode: z.boolean().nullable().optional(),\n reactMaxHeadersLength: z.number().nonnegative().int().optional(),\n redirects: z\n .function()\n .args()\n .returns(z.promise(z.array(zRedirect)))\n .optional(),\n rewrites: z\n .function()\n .args()\n .returns(\n z.promise(\n z.union([\n z.array(zRewrite),\n z.object({\n beforeFiles: z.array(zRewrite),\n afterFiles: z.array(zRewrite),\n fallback: z.array(zRewrite),\n }),\n ])\n )\n )\n .optional(),\n // sassOptions properties are unknown besides implementation, use z.any() here\n sassOptions: z\n .object({\n implementation: z.string().optional(),\n })\n .catchall(z.any())\n .optional(),\n serverExternalPackages: z.array(z.string()).optional(),\n skipMiddlewareUrlNormalize: z.boolean().optional(),\n skipProxyUrlNormalize: z.boolean().optional(),\n skipTrailingSlashRedirect: z.boolean().optional(),\n staticPageGenerationTimeout: z.number().optional(),\n expireTime: z.number().optional(),\n target: z.string().optional(),\n trailingSlash: z.boolean().optional(),\n transpilePackages: z.array(z.string()).optional(),\n turbopack: zTurbopackConfig.optional(),\n typescript: z\n .strictObject({\n ignoreBuildErrors: z.boolean().optional(),\n tsconfigPath: z.string().min(1).optional(),\n })\n .optional(),\n typedRoutes: z.boolean().optional(),\n useFileSystemPublicRoutes: z.boolean().optional(),\n // The webpack config type is unknown, use z.any() here\n webpack: z.any().nullable().optional(),\n watchOptions: z\n .strictObject({\n pollIntervalMs: z.number().positive().finite().optional(),\n })\n .optional(),\n })\n)\n"],"names":["VALID_LOADERS","z","LIGHTNINGCSS_FEATURE_NAMES","SUPPORTED_TEST_RUNNERS_LIST","zSizeLimit","custom","val","zExportMap","record","string","object","page","query","any","_fallbackRouteParams","array","optional","_isAppDir","boolean","_isDynamicError","_isRoutePPREnabled","_allowEmptyStaticShell","zRouteHas","union","type","enum","key","value","literal","undefined","zRewrite","source","destination","basePath","locale","has","missing","internal","zRedirect","and","statusCode","never","permanent","number","zHeader","headers","zTurbopackLoaderItem","strictObject","loader","options","zTurbopackLoaderBuiltinCondition","zTurbopackCondition","all","lazy","not","path","instanceof","RegExp","content","contentType","zTurbopackModuleType","zTurbopackRuleConfigItem","loaders","as","condition","zTurbopackRuleConfigCollection","zTurbopackConfig","rules","resolveAlias","resolveExtensions","root","debugIds","chunkLoadingGlobal","ignoreIssue","title","description","experimentalSchema","outputHashSalt","useSkewCookie","after","appNavFailHandling","appNewScrollHandler","preloadEntriesOnStart","allowedRevalidateHeaderKeys","staleTimes","dynamic","static","gte","cacheLife","stale","revalidate","expire","cacheHandlers","clientRouterFilter","clientRouterFilterRedirects","clientRouterFilterAllowedRate","cpus","memoryBasedWorkersCount","craCompat","caseSensitiveRoutes","clientParamParsingOrigins","cachedNavigations","dynamicOnHover","useOffline","optimisticRouting","appShells","varyParams","prefetchInlining","maxSize","maxBundleSize","disableOptimizedLoading","disablePostcssPresetEnv","cacheComponents","inlineCss","esmExternals","serverActions","bodySizeLimit","allowedOrigins","maxPostponedStateSize","extensionAlias","externalDir","externalMiddlewareRewritesResolve","externalProxyRewritesResolve","exposeTestingApiInProductionBuild","fallbackNodePolyfills","fetchCacheKeyPrefix","forceSwcTransforms","fullySpecified","gzipSize","imgOptConcurrency","int","nullable","imgOptOperationCache","imgOptTimeoutInSeconds","imgOptMaxInputPixels","imgOptSequentialRead","imgOptSkipMetadata","isrFlushToDisk","largePageDataBytes","linkNoTouchStart","manualClientBasePath","middlewarePrefetch","proxyPrefetch","middlewareClientMaxBodySize","proxyClientMaxBodySize","multiZoneDraftMode","cssChunking","requestCost","nonnegative","finite","moduleFactorCost","nextScriptWorkers","optimizeCss","optimisticClientCache","parallelServerCompiles","parallelServerBuildTraces","ppr","readonly","taint","prerenderEarlyExit","proxyTimeout","rootParams","mcpServer","removeUncaughtErrorAndRejectionListeners","validateRSCRequestHeaders","scrollRestoration","sri","algorithm","swcPlugins","tuple","swcEnvOptions","mode","coreJs","skip","include","exclude","shippedProposals","forceAllTransforms","debug","loose","swcTraceProfiling","urlImports","viewTransition","workerThreads","webVitalsAttribution","mdxRs","development","jsxRuntime","jsxImportSource","providerImportSource","mdxType","transitionIndicator","gestureTransition","typedRoutes","webpackBuildWorker","webpackMemoryOptimizations","turbopackMemoryEviction","turbopackPluginRuntimeStrategy","turbopackMinify","turbopackFileSystemCacheForDev","turbopackFileSystemCacheForBuild","turbopackSourceMaps","turbopackInputSourceMaps","turbopackTreeShaking","turbopackRemoveUnusedImports","turbopackRemoveUnusedExports","turbopackScopeHoisting","turbopackWorkerAssetPrefix","turbopackClientSideNestedAsyncChunking","turbopackServerSideNestedAsyncChunking","turbopackImportTypeBytes","turbopackImportTypeText","turbopackUseBuiltinBabel","turbopackUseBuiltinSass","turbopackLocalPostcssConfig","turbopackModuleIds","turbopackInferModuleSideEffects","turbopackServerFastRefresh","optimizePackageImports","optimizeServerReact","strictRouteTypes","clientTraceMetadata","serverMinification","serverSourceMaps","useWasmBinary","useLightningcss","lightningCssFeatures","testProxy","defaultTestRunner","allowDevelopmentBuild","reactDebugChannel","instantInsights","validationLevel","staticGenerationRetryCount","staticGenerationMaxConcurrency","staticGenerationMinPagesPerWorker","typedEnv","serverComponentsHmrCache","authInterrupts","useCache","useCacheTimeout","positive","slowModuleDetection","buildTimeThresholdMs","globalNotFound","browserDebugInfoInTerminal","level","depthLimit","edgeLimit","showSourceLocation","lockDistDir","hideLogsAfterAbort","runtimeServerDeploymentId","supportsImmutableAssets","deferredEntries","onBeforeDeferredEntries","function","returns","promise","void","reportSystemEnvInlining","configSchema","adapterPath","agentRules","allowedDevOrigins","assetPrefix","bundlePagesRouterDependencies","cacheHandler","min","cacheMaxMemorySize","cleanDistDir","compiler","emotion","sourceMap","autoLabel","labelFormat","importMap","canonicalImport","styledBaseImport","reactRemoveProperties","properties","relay","src","artifactDirectory","language","eagerEsModules","removeConsole","styledComponents","displayName","topLevelImportPaths","ssr","fileName","meaninglessFileNames","minify","transpileTemplateLiterals","namespace","pure","cssProp","styledJsx","define","defineServer","runAfterProductionCompile","compress","configOrigin","crossOrigin","deploymentId","devIndicators","position","distDir","env","enablePrerenderSourceMaps","excludeDefaultMomentLocales","experimental","exportPathMap","args","dev","dir","outDir","buildId","generateBuildId","null","generateEtags","htmlLimitedBots","httpAgentOptions","keepAlive","i18n","defaultLocale","domains","domain","http","locales","localeDetection","images","localPatterns","pathname","search","max","remotePatterns","URL","hostname","port","protocol","unoptimized","customCacheHandler","contentSecurityPolicy","contentDispositionType","dangerouslyAllowSVG","dangerouslyAllowLocalIP","deviceSizes","lte","disableStaticImages","formats","imageSizes","loaderFile","maximumDiskCacheSize","maximumRedirects","maximumResponseBody","Number","MAX_SAFE_INTEGER","minimumCacheTTL","qualities","logging","fetches","fullUrl","hmrRefreshes","incomingRequests","ignore","serverFunctions","browserToTerminal","modularizeImports","transform","preventFullImport","skipDefaultConversion","onDemandEntries","maxInactiveAge","pagesBufferLength","output","outputFileTracingRoot","outputFileTracingExcludes","outputFileTracingIncludes","pageExtensions","instrumentationClientInject","partialPrefetching","poweredByHeader","productionBrowserSourceMaps","reactCompiler","compilationMode","panicThreshold","reactProductionProfiling","reactStrictMode","reactMaxHeadersLength","redirects","rewrites","beforeFiles","afterFiles","fallback","sassOptions","implementation","catchall","serverExternalPackages","skipMiddlewareUrlNormalize","skipProxyUrlNormalize","skipTrailingSlashRedirect","staticPageGenerationTimeout","expireTime","target","trailingSlash","transpilePackages","turbopack","typescript","ignoreBuildErrors","tsconfigPath","useFileSystemPublicRoutes","webpack","watchOptions","pollIntervalMs"],"mappings":"AACA,SAASA,aAAa,QAAQ,6BAA4B;AAE1D,SAASC,CAAC,QAAQ,yBAAwB;AAI1C,SACEC,0BAA0B,QAQrB,kBAAiB;AAOxB,SAASC,2BAA2B,QAAQ,mBAAkB;AAE9D,6CAA6C;AAC7C,MAAMC,aAAaH,EAAEI,MAAM,CAAY,CAACC;IACtC,IAAI,OAAOA,QAAQ,YAAY,OAAOA,QAAQ,UAAU;QACtD,OAAO;IACT;IACA,OAAO;AACT;AAEA,MAAMC,aAAyCN,EAAEO,MAAM,CACrDP,EAAEQ,MAAM,IACRR,EAAES,MAAM,CAAC;IACPC,MAAMV,EAAEQ,MAAM;IACdG,OAAOX,EAAEY,GAAG;IAEZ,8BAA8B;IAC9BC,sBAAsBb,EAAEc,KAAK,CAACd,EAAEY,GAAG,IAAIG,QAAQ;IAC/CC,WAAWhB,EAAEiB,OAAO,GAAGF,QAAQ;IAC/BG,iBAAiBlB,EAAEiB,OAAO,GAAGF,QAAQ;IACrCI,oBAAoBnB,EAAEiB,OAAO,GAAGF,QAAQ;IACxCK,wBAAwBpB,EAAEiB,OAAO,GAAGF,QAAQ;AAC9C;AAGF,MAAMM,YAAmCrB,EAAEsB,KAAK,CAAC;IAC/CtB,EAAES,MAAM,CAAC;QACPc,MAAMvB,EAAEwB,IAAI,CAAC;YAAC;YAAU;YAAS;SAAS;QAC1CC,KAAKzB,EAAEQ,MAAM;QACbkB,OAAO1B,EAAEQ,MAAM,GAAGO,QAAQ;IAC5B;IACAf,EAAES,MAAM,CAAC;QACPc,MAAMvB,EAAE2B,OAAO,CAAC;QAChBF,KAAKzB,EAAE4B,SAAS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7Y,EAAEY,GAAG,IACdG,QAAQ;QACX+X,wBAAwB9Y,EAAEc,KAAK,CAACd,EAAEQ,MAAM,IAAIO,QAAQ;QACpDgY,4BAA4B/Y,EAAEiB,OAAO,GAAGF,QAAQ;QAChDiY,uBAAuBhZ,EAAEiB,OAAO,GAAGF,QAAQ;QAC3CkY,2BAA2BjZ,EAAEiB,OAAO,GAAGF,QAAQ;QAC/CmY,6BAA6BlZ,EAAE0C,MAAM,GAAG3B,QAAQ;QAChDoY,YAAYnZ,EAAE0C,MAAM,GAAG3B,QAAQ;QAC/BqY,QAAQpZ,EAAEQ,MAAM,GAAGO,QAAQ;QAC3BsY,eAAerZ,EAAEiB,OAAO,GAAGF,QAAQ;QACnCuY,mBAAmBtZ,EAAEc,KAAK,CAACd,EAAEQ,MAAM,IAAIO,QAAQ;QAC/CwY,WAAWtV,iBAAiBlD,QAAQ;QACpCyY,YAAYxZ,EACT8C,YAAY,CAAC;YACZ2W,mBAAmBzZ,EAAEiB,OAAO,GAAGF,QAAQ;YACvC2Y,cAAc1Z,EAAEQ,MAAM,GAAGmQ,GAAG,CAAC,GAAG5P,QAAQ;QAC1C,GACCA,QAAQ;QACXiL,aAAahM,EAAEiB,OAAO,GAAGF,QAAQ;QACjC4Y,2BAA2B3Z,EAAEiB,OAAO,GAAGF,QAAQ;QAC/C,uDAAuD;QACvD6Y,SAAS5Z,EAAEY,GAAG,GAAGsH,QAAQ,GAAGnH,QAAQ;QACpC8Y,cAAc7Z,EACX8C,YAAY,CAAC;YACZgX,gBAAgB9Z,EAAE0C,MAAM,GAAGsM,QAAQ,GAAG5F,MAAM,GAAGrI,QAAQ;QACzD,GACCA,QAAQ;IACb,IACD","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../src/server/config-schema.ts"],"sourcesContent":["import type { NextConfig } from './config'\nimport { VALID_LOADERS } from '../shared/lib/image-config'\n\nimport { z } from 'next/dist/compiled/zod'\nimport type zod from 'next/dist/compiled/zod'\n\nimport type { SizeLimit } from '../types'\nimport {\n LIGHTNINGCSS_FEATURE_NAMES,\n type ExportPathMap,\n type TurbopackLoaderItem,\n type TurbopackOptions,\n type TurbopackRuleConfigItem,\n type TurbopackRuleConfigCollection,\n type TurbopackRuleCondition,\n type TurbopackLoaderBuiltinCondition,\n} from './config-shared'\nimport type {\n Header,\n Rewrite,\n RouteHas,\n Redirect,\n} from '../lib/load-custom-routes'\nimport { SUPPORTED_TEST_RUNNERS_LIST } from '../cli/next-test'\n\n// A custom zod schema for the SizeLimit type\nconst zSizeLimit = z.custom<SizeLimit>((val) => {\n if (typeof val === 'number' || typeof val === 'string') {\n return true\n }\n return false\n})\n\nconst zExportMap: zod.ZodType<ExportPathMap> = z.record(\n z.string(),\n z.object({\n page: z.string(),\n query: z.any(), // NextParsedUrlQuery\n\n // private optional properties\n _fallbackRouteParams: z.array(z.any()).optional(),\n _isAppDir: z.boolean().optional(),\n _isDynamicError: z.boolean().optional(),\n _isRoutePPREnabled: z.boolean().optional(),\n _allowEmptyStaticShell: z.boolean().optional(),\n })\n)\n\nconst zRouteHas: zod.ZodType<RouteHas> = z.union([\n z.object({\n type: z.enum(['header', 'query', 'cookie']),\n key: z.string(),\n value: z.string().optional(),\n }),\n z.object({\n type: z.literal('host'),\n key: z.undefined().optional(),\n value: z.string(),\n }),\n])\n\nconst zRewrite: zod.ZodType<Rewrite> = z.object({\n source: z.string(),\n destination: z.string(),\n basePath: z.literal(false).optional(),\n locale: z.literal(false).optional(),\n has: z.array(zRouteHas).optional(),\n missing: z.array(zRouteHas).optional(),\n internal: z.boolean().optional(),\n})\n\nconst zRedirect: zod.ZodType<Redirect> = z\n .object({\n source: z.string(),\n destination: z.string(),\n basePath: z.literal(false).optional(),\n locale: z.literal(false).optional(),\n has: z.array(zRouteHas).optional(),\n missing: z.array(zRouteHas).optional(),\n internal: z.boolean().optional(),\n })\n .and(\n z.union([\n z.object({\n statusCode: z.never().optional(),\n permanent: z.boolean(),\n }),\n z.object({\n statusCode: z.number(),\n permanent: z.never().optional(),\n }),\n ])\n )\n\nconst zHeader: zod.ZodType<Header> = z.object({\n source: z.string(),\n basePath: z.literal(false).optional(),\n locale: z.literal(false).optional(),\n headers: z.array(z.object({ key: z.string(), value: z.string() })),\n has: z.array(zRouteHas).optional(),\n missing: z.array(zRouteHas).optional(),\n\n internal: z.boolean().optional(),\n})\n\nconst zTurbopackLoaderItem: zod.ZodType<TurbopackLoaderItem> = z.union([\n z.string(),\n z.strictObject({\n loader: z.string(),\n // Any JSON value can be used as turbo loader options, so use z.any() here\n options: z.record(z.string(), z.any()).optional(),\n }),\n])\n\nconst zTurbopackLoaderBuiltinCondition: zod.ZodType<TurbopackLoaderBuiltinCondition> =\n z.union([\n z.literal('browser'),\n z.literal('foreign'),\n z.literal('development'),\n z.literal('production'),\n z.literal('node'),\n z.literal('edge-light'),\n ])\n\nconst zTurbopackCondition: zod.ZodType<TurbopackRuleCondition> = z.union([\n z.strictObject({ all: z.lazy(() => z.array(zTurbopackCondition)) }),\n z.strictObject({ any: z.lazy(() => z.array(zTurbopackCondition)) }),\n z.strictObject({ not: z.lazy(() => zTurbopackCondition) }),\n zTurbopackLoaderBuiltinCondition,\n z.strictObject({\n path: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n content: z.instanceof(RegExp).optional(),\n query: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n contentType: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n }),\n])\n\nconst zTurbopackModuleType = z.enum([\n 'asset',\n 'ecmascript',\n 'typescript',\n 'css',\n 'css-module',\n 'wasm',\n 'raw',\n 'node',\n 'bytes',\n])\n\nconst zTurbopackRuleConfigItem: zod.ZodType<TurbopackRuleConfigItem> =\n z.strictObject({\n loaders: z.array(zTurbopackLoaderItem).optional(),\n as: z.string().optional(),\n condition: zTurbopackCondition.optional(),\n type: zTurbopackModuleType.optional(),\n })\n\nconst zTurbopackRuleConfigCollection: zod.ZodType<TurbopackRuleConfigCollection> =\n z.union([\n zTurbopackRuleConfigItem,\n z.array(z.union([zTurbopackLoaderItem, zTurbopackRuleConfigItem])),\n ])\n\nconst zTurbopackConfig: zod.ZodType<TurbopackOptions> = z.strictObject({\n rules: z.record(z.string(), zTurbopackRuleConfigCollection).optional(),\n resolveAlias: z\n .record(\n z.string(),\n z.union([\n z.string(),\n z.array(z.string()),\n z.record(z.string(), z.union([z.string(), z.array(z.string())])),\n ])\n )\n .optional(),\n resolveExtensions: z.array(z.string()).optional(),\n root: z.string().optional(),\n debugIds: z.boolean().optional(),\n chunkLoadingGlobal: z.string().optional(),\n ignoreIssue: z\n .array(\n z.object({\n path: z.union([z.string(), z.instanceof(RegExp)]),\n title: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n description: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n })\n )\n .optional(),\n})\n\nexport const experimentalSchema = {\n outputHashSalt: z.string().optional(),\n useSkewCookie: z.boolean().optional(),\n after: z.boolean().optional(),\n appNavFailHandling: z.boolean().optional(),\n appNewScrollHandler: z.boolean().optional(),\n preloadEntriesOnStart: z.boolean().optional(),\n allowedRevalidateHeaderKeys: z.array(z.string()).optional(),\n staleTimes: z\n .object({\n dynamic: z.number().optional(),\n static: z.number().gte(30).optional(),\n })\n .optional(),\n cacheLife: z\n .record(\n z.object({\n stale: z.number().optional(),\n revalidate: z.number().optional(),\n expire: z.number().optional(),\n })\n )\n .optional(),\n cacheHandlers: z.record(z.string(), z.string().optional()).optional(),\n clientRouterFilter: z.boolean().optional(),\n clientRouterFilterRedirects: z.boolean().optional(),\n clientRouterFilterAllowedRate: z.number().optional(),\n cpus: z.number().optional(),\n memoryBasedWorkersCount: z.boolean().optional(),\n craCompat: z.boolean().optional(),\n caseSensitiveRoutes: z.boolean().optional(),\n clientParamParsingOrigins: z.array(z.string()).optional(),\n cachedNavigations: z.boolean().optional(),\n dynamicOnHover: z.boolean().optional(),\n useOffline: z.boolean().optional(),\n optimisticRouting: z.boolean().optional(),\n appShells: z.boolean().optional(),\n varyParams: z.boolean().optional(),\n prefetchInlining: z\n .union([\n z.boolean(),\n z.object({\n maxSize: z.number().optional(),\n maxBundleSize: z.number().optional(),\n }),\n ])\n .optional(),\n disableOptimizedLoading: z.boolean().optional(),\n disablePostcssPresetEnv: z.boolean().optional(),\n cacheComponents: z.boolean().optional(),\n inlineCss: z.boolean().optional(),\n esmExternals: z.union([z.boolean(), z.literal('loose')]).optional(),\n serverActions: z\n .object({\n bodySizeLimit: zSizeLimit.optional(),\n allowedOrigins: z.array(z.string()).optional(),\n })\n .optional(),\n maxPostponedStateSize: zSizeLimit.optional(),\n // The original type was Record<string, any>\n extensionAlias: z.record(z.string(), z.any()).optional(),\n externalDir: z.boolean().optional(),\n externalMiddlewareRewritesResolve: z.boolean().optional(),\n externalProxyRewritesResolve: z.boolean().optional(),\n exposeTestingApiInProductionBuild: z.boolean().optional(),\n fallbackNodePolyfills: z.literal(false).optional(),\n fetchCacheKeyPrefix: z.string().optional(),\n forceSwcTransforms: z.boolean().optional(),\n fullySpecified: z.boolean().optional(),\n gzipSize: z.boolean().optional(),\n imgOptConcurrency: z.number().int().optional().nullable(),\n imgOptOperationCache: z.boolean().optional().nullable(),\n imgOptTimeoutInSeconds: z.number().int().optional(),\n imgOptMaxInputPixels: z.number().int().optional(),\n imgOptSequentialRead: z.boolean().optional().nullable(),\n imgOptSkipMetadata: z.boolean().optional().nullable(),\n isrFlushToDisk: z.boolean().optional(),\n largePageDataBytes: z.number().optional(),\n linkNoTouchStart: z.boolean().optional(),\n manualClientBasePath: z.boolean().optional(),\n middlewarePrefetch: z.enum(['strict', 'flexible']).optional(),\n proxyPrefetch: z.enum(['strict', 'flexible']).optional(),\n middlewareClientMaxBodySize: zSizeLimit.optional(),\n proxyClientMaxBodySize: zSizeLimit.optional(),\n multiZoneDraftMode: z.boolean().optional(),\n cssChunking: z\n .union([\n z.boolean(),\n z.literal('strict'),\n z.literal('loose'),\n z.literal('graph'),\n z.strictObject({ type: z.literal('strict') }),\n z.strictObject({ type: z.literal('loose') }),\n z.strictObject({\n type: z.literal('graph'),\n requestCost: z.number().nonnegative().finite().optional(),\n moduleFactorCost: z.number().nonnegative().finite().optional(),\n }),\n ])\n .optional(),\n nextScriptWorkers: z.boolean().optional(),\n // The critter option is unknown, use z.any() here\n optimizeCss: z.union([z.boolean(), z.any()]).optional(),\n optimisticClientCache: z.boolean().optional(),\n parallelServerCompiles: z.boolean().optional(),\n parallelServerBuildTraces: z.boolean().optional(),\n ppr: z\n .union([z.boolean(), z.literal('incremental')])\n .readonly()\n .optional(),\n taint: z.boolean().optional(),\n prerenderEarlyExit: z.boolean().optional(),\n proxyTimeout: z.number().gte(0).optional(),\n rootParams: z.boolean().optional(),\n mcpServer: z.boolean().optional(),\n removeUncaughtErrorAndRejectionListeners: z.boolean().optional(),\n validateRSCRequestHeaders: z.boolean().optional(),\n scrollRestoration: z.boolean().optional(),\n sri: z\n .object({\n algorithm: z.enum(['sha256', 'sha384', 'sha512']).optional(),\n })\n .optional(),\n swcPlugins: z\n // The specific swc plugin's option is unknown, use z.any() here\n .array(z.tuple([z.string(), z.record(z.string(), z.any())]))\n .optional(),\n swcEnvOptions: z\n .object({\n mode: z.enum(['usage', 'entry']).optional(),\n coreJs: z.string().optional(),\n skip: z.array(z.string()).optional(),\n include: z.array(z.string()).optional(),\n exclude: z.array(z.string()).optional(),\n shippedProposals: z.boolean().optional(),\n forceAllTransforms: z.boolean().optional(),\n debug: z.boolean().optional(),\n loose: z.boolean().optional(),\n })\n .optional(),\n swcTraceProfiling: z.boolean().optional(),\n // NonNullable<webpack.Configuration['experiments']>['buildHttp']\n urlImports: z.any().optional(),\n viewTransition: z.boolean().optional(),\n workerThreads: z.boolean().optional(),\n webVitalsAttribution: z\n .array(\n z.union([\n z.literal('CLS'),\n z.literal('FCP'),\n z.literal('FID'),\n z.literal('INP'),\n z.literal('LCP'),\n z.literal('TTFB'),\n ])\n )\n .optional(),\n // This is partial set of mdx-rs transform options we support, aligned\n // with next_core::next_config::MdxRsOptions. Ensure both types are kept in sync.\n mdxRs: z\n .union([\n z.boolean(),\n z.object({\n development: z.boolean().optional(),\n jsxRuntime: z.string().optional(),\n jsxImportSource: z.string().optional(),\n providerImportSource: z.string().optional(),\n mdxType: z.enum(['gfm', 'commonmark']).optional(),\n }),\n ])\n .optional(),\n transitionIndicator: z.boolean().optional(),\n gestureTransition: z.boolean().optional(),\n typedRoutes: z.boolean().optional(),\n webpackBuildWorker: z.boolean().optional(),\n webpackMemoryOptimizations: z.boolean().optional(),\n turbopackMemoryEviction: z\n .union([z.literal(false), z.literal('full')])\n .optional(),\n turbopackPluginRuntimeStrategy: z\n .enum(['workerThreads', 'childProcesses', 'forceWorkerThreads'])\n .optional(),\n turbopackMinify: z.boolean().optional(),\n turbopackFileSystemCacheForDev: z.boolean().optional(),\n turbopackFileSystemCacheForBuild: z.boolean().optional(),\n turbopackSourceMaps: z.boolean().optional(),\n turbopackInputSourceMaps: z.boolean().optional(),\n turbopackTreeShaking: z.boolean().optional(),\n turbopackRemoveUnusedImports: z.boolean().optional(),\n turbopackRemoveUnusedExports: z.boolean().optional(),\n turbopackScopeHoisting: z.boolean().optional(),\n turbopackWorkerAssetPrefix: z.string().optional(),\n turbopackClientSideNestedAsyncChunking: z.boolean().optional(),\n turbopackServerSideNestedAsyncChunking: z.boolean().optional(),\n turbopackImportTypeBytes: z.boolean().optional(),\n turbopackImportTypeText: z.boolean().optional(),\n turbopackUseBuiltinBabel: z.boolean().optional(),\n turbopackUseBuiltinSass: z.boolean().optional(),\n turbopackLocalPostcssConfig: z.boolean().optional(),\n turbopackModuleIds: z.enum(['named', 'deterministic']).optional(),\n turbopackInferModuleSideEffects: z.boolean().optional(),\n turbopackServerFastRefresh: z.boolean().optional(),\n optimizePackageImports: z.array(z.string()).optional(),\n optimizeServerReact: z.boolean().optional(),\n strictRouteTypes: z.boolean().optional(),\n clientTraceMetadata: z.array(z.string()).optional(),\n serverMinification: z.boolean().optional(),\n serverSourceMaps: z.boolean().optional(),\n useWasmBinary: z.boolean().optional(),\n useLightningcss: z.boolean().optional(),\n lightningCssFeatures: z\n .object({\n include: z.array(z.enum(LIGHTNINGCSS_FEATURE_NAMES)).optional(),\n exclude: z.array(z.enum(LIGHTNINGCSS_FEATURE_NAMES)).optional(),\n })\n .optional(),\n testProxy: z.boolean().optional(),\n defaultTestRunner: z.enum(SUPPORTED_TEST_RUNNERS_LIST).optional(),\n allowDevelopmentBuild: z.literal(true).optional(),\n\n reactDebugChannel: z.boolean().optional(),\n instantInsights: z\n .object({\n validationLevel: z\n .enum([\n 'warning',\n 'manual-warning',\n 'experimental-error',\n 'experimental-manual-error',\n ])\n .optional(),\n })\n .optional(),\n staticGenerationRetryCount: z.number().int().optional(),\n staticGenerationMaxConcurrency: z.number().int().optional(),\n staticGenerationMinPagesPerWorker: z.number().int().optional(),\n typedEnv: z.boolean().optional(),\n serverComponentsHmrCache: z.boolean().optional(),\n authInterrupts: z.boolean().optional(),\n useCache: z.boolean().optional(),\n useCacheTimeout: z.number().positive().optional(),\n slowModuleDetection: z\n .object({\n buildTimeThresholdMs: z.number().int(),\n })\n .optional(),\n globalNotFound: z.boolean().optional(),\n turbopackRustReactCompiler: z.boolean().optional(),\n browserDebugInfoInTerminal: z\n .union([\n z.boolean(),\n z.enum(['error', 'warn', 'verbose']),\n z.object({\n level: z.enum(['error', 'warn', 'verbose']).optional(),\n depthLimit: z.number().int().positive().optional(),\n edgeLimit: z.number().int().positive().optional(),\n showSourceLocation: z.boolean().optional(),\n }),\n ])\n .optional(),\n lockDistDir: z.boolean().optional(),\n hideLogsAfterAbort: z.boolean().optional(),\n runtimeServerDeploymentId: z.boolean().optional(),\n supportsImmutableAssets: z.boolean().optional(),\n deferredEntries: z.array(z.string()).optional(),\n onBeforeDeferredEntries: z.function().returns(z.promise(z.void())).optional(),\n reportSystemEnvInlining: z.enum(['warn', 'error']).optional(),\n}\n\nexport const configSchema: zod.ZodType<NextConfig> = z.lazy(() =>\n z.strictObject({\n adapterPath: z.string().optional(),\n agentRules: z.boolean().optional(),\n allowedDevOrigins: z.array(z.string()).optional(),\n assetPrefix: z.string().optional(),\n basePath: z.string().optional(),\n bundlePagesRouterDependencies: z.boolean().optional(),\n cacheComponents: z.boolean().optional(),\n cacheHandler: z.string().min(1).optional(),\n cacheHandlers: z.record(z.string(), z.string().optional()).optional(),\n cacheLife: z\n .record(\n z.object({\n stale: z.number().optional(),\n revalidate: z.number().optional(),\n expire: z.number().optional(),\n })\n )\n .optional(),\n cacheMaxMemorySize: z.number().optional(),\n cleanDistDir: z.boolean().optional(),\n compiler: z\n .strictObject({\n emotion: z\n .union([\n z.boolean(),\n z.object({\n sourceMap: z.boolean().optional(),\n autoLabel: z\n .union([\n z.literal('always'),\n z.literal('dev-only'),\n z.literal('never'),\n ])\n .optional(),\n labelFormat: z.string().min(1).optional(),\n importMap: z\n .record(\n z.string(),\n z.record(\n z.string(),\n z.object({\n canonicalImport: z\n .tuple([z.string(), z.string()])\n .optional(),\n styledBaseImport: z\n .tuple([z.string(), z.string()])\n .optional(),\n })\n )\n )\n .optional(),\n }),\n ])\n .optional(),\n reactRemoveProperties: z\n .union([\n z.boolean().optional(),\n z.object({\n properties: z.array(z.string()).optional(),\n }),\n ])\n .optional(),\n relay: z\n .object({\n src: z.string(),\n artifactDirectory: z.string().optional(),\n language: z.enum(['javascript', 'typescript', 'flow']).optional(),\n eagerEsModules: z.boolean().optional(),\n })\n .optional(),\n removeConsole: z\n .union([\n z.boolean().optional(),\n z.object({\n exclude: z.array(z.string()).min(1).optional(),\n }),\n ])\n .optional(),\n styledComponents: z.union([\n z.boolean().optional(),\n z.object({\n displayName: z.boolean().optional(),\n topLevelImportPaths: z.array(z.string()).optional(),\n ssr: z.boolean().optional(),\n fileName: z.boolean().optional(),\n meaninglessFileNames: z.array(z.string()).optional(),\n minify: z.boolean().optional(),\n transpileTemplateLiterals: z.boolean().optional(),\n namespace: z.string().min(1).optional(),\n pure: z.boolean().optional(),\n cssProp: z.boolean().optional(),\n }),\n ]),\n styledJsx: z.union([\n z.boolean().optional(),\n z.object({\n useLightningcss: z.boolean().optional(),\n }),\n ]),\n define: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional(),\n defineServer: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional(),\n runAfterProductionCompile: z\n .function()\n .returns(z.promise(z.void()))\n .optional(),\n })\n .optional(),\n compress: z.boolean().optional(),\n configOrigin: z.string().optional(),\n crossOrigin: z\n .union([z.literal('anonymous'), z.literal('use-credentials')])\n .optional(),\n deploymentId: z.string().optional(),\n devIndicators: z\n .union([\n z.object({\n position: z\n .union([\n z.literal('bottom-left'),\n z.literal('bottom-right'),\n z.literal('top-left'),\n z.literal('top-right'),\n ])\n .optional(),\n }),\n z.literal(false),\n ])\n .optional(),\n distDir: z.string().min(1).optional(),\n env: z.record(z.string(), z.union([z.string(), z.undefined()])).optional(),\n enablePrerenderSourceMaps: z.boolean().optional(),\n excludeDefaultMomentLocales: z.boolean().optional(),\n experimental: z.strictObject(experimentalSchema).optional(),\n exportPathMap: z\n .function()\n .args(\n zExportMap,\n z.object({\n dev: z.boolean(),\n dir: z.string(),\n outDir: z.string().nullable(),\n distDir: z.string(),\n buildId: z.string(),\n })\n )\n .returns(z.union([zExportMap, z.promise(zExportMap)]))\n .optional(),\n generateBuildId: z\n .function()\n .args()\n .returns(\n z.union([\n z.string(),\n z.null(),\n z.promise(z.union([z.string(), z.null()])),\n ])\n )\n .optional(),\n generateEtags: z.boolean().optional(),\n headers: z\n .function()\n .args()\n .returns(z.promise(z.array(zHeader)))\n .optional(),\n htmlLimitedBots: z.instanceof(RegExp).optional(),\n httpAgentOptions: z\n .strictObject({ keepAlive: z.boolean().optional() })\n .optional(),\n i18n: z\n .strictObject({\n defaultLocale: z.string().min(1),\n domains: z\n .array(\n z.strictObject({\n defaultLocale: z.string().min(1),\n domain: z.string().min(1),\n http: z.literal(true).optional(),\n locales: z.array(z.string().min(1)).optional(),\n })\n )\n .optional(),\n localeDetection: z.literal(false).optional(),\n locales: z.array(z.string().min(1)),\n })\n .nullable()\n .optional(),\n images: z\n .strictObject({\n localPatterns: z\n .array(\n z.strictObject({\n pathname: z.string().optional(),\n search: z.string().optional(),\n })\n )\n .max(25)\n .optional(),\n remotePatterns: z\n .array(\n z.union([\n z.instanceof(URL),\n z.strictObject({\n hostname: z.string(),\n pathname: z.string().optional(),\n port: z.string().max(5).optional(),\n protocol: z.enum(['http', 'https']).optional(),\n search: z.string().optional(),\n }),\n ])\n )\n .max(50)\n .optional(),\n unoptimized: z.boolean().optional(),\n customCacheHandler: z.boolean().optional(),\n contentSecurityPolicy: z.string().optional(),\n contentDispositionType: z.enum(['inline', 'attachment']).optional(),\n dangerouslyAllowSVG: z.boolean().optional(),\n dangerouslyAllowLocalIP: z.boolean().optional(),\n deviceSizes: z\n .array(z.number().int().gte(1).lte(10000))\n .max(25)\n .optional(),\n disableStaticImages: z.boolean().optional(),\n domains: z.array(z.string()).max(50).optional(),\n formats: z\n .array(z.enum(['image/avif', 'image/webp']))\n .max(4)\n .optional(),\n imageSizes: z\n .array(z.number().int().gte(1).lte(10000))\n .min(0)\n .max(25)\n .optional(),\n loader: z.enum(VALID_LOADERS).optional(),\n loaderFile: z.string().optional(),\n maximumDiskCacheSize: z.number().int().min(0).optional(),\n maximumRedirects: z.number().int().min(0).max(20).optional(),\n maximumResponseBody: z\n .number()\n .int()\n .min(1)\n .max(Number.MAX_SAFE_INTEGER)\n .optional(),\n minimumCacheTTL: z.number().int().gte(0).optional(),\n path: z.string().optional(),\n qualities: z\n .array(z.number().int().gte(1).lte(100))\n .min(1)\n .max(20)\n .optional(),\n })\n .optional(),\n logging: z\n .union([\n z.object({\n fetches: z\n .object({\n fullUrl: z.boolean().optional(),\n hmrRefreshes: z.boolean().optional(),\n })\n .optional(),\n incomingRequests: z\n .union([\n z.boolean(),\n z.object({\n ignore: z.array(z.instanceof(RegExp)),\n }),\n ])\n .optional(),\n serverFunctions: z.boolean().optional(),\n browserToTerminal: z\n .union([z.boolean(), z.enum(['error', 'warn'])])\n .optional(),\n }),\n z.literal(false),\n ])\n .optional(),\n modularizeImports: z\n .record(\n z.string(),\n z.object({\n transform: z.union([z.string(), z.record(z.string(), z.string())]),\n preventFullImport: z.boolean().optional(),\n skipDefaultConversion: z.boolean().optional(),\n })\n )\n .optional(),\n onDemandEntries: z\n .strictObject({\n maxInactiveAge: z.number().optional(),\n pagesBufferLength: z.number().optional(),\n })\n .optional(),\n output: z.enum(['standalone', 'export']).optional(),\n outputFileTracingRoot: z.string().optional(),\n outputFileTracingExcludes: z\n .record(z.string(), z.array(z.string()))\n .optional(),\n outputFileTracingIncludes: z\n .record(z.string(), z.array(z.string()))\n .optional(),\n pageExtensions: z.array(z.string()).min(1).optional(),\n instrumentationClientInject: z.array(z.string()).optional(),\n partialPrefetching: z\n .union([z.boolean(), z.literal('unstable_eager')])\n .optional(),\n poweredByHeader: z.boolean().optional(),\n productionBrowserSourceMaps: z.boolean().optional(),\n reactCompiler: z.union([\n z.boolean(),\n z\n .object({\n compilationMode: z.enum(['infer', 'annotation', 'all']).optional(),\n panicThreshold: z\n .enum(['none', 'critical_errors', 'all_errors'])\n .optional(),\n })\n .optional(),\n ]),\n reactProductionProfiling: z.boolean().optional(),\n reactStrictMode: z.boolean().nullable().optional(),\n reactMaxHeadersLength: z.number().nonnegative().int().optional(),\n redirects: z\n .function()\n .args()\n .returns(z.promise(z.array(zRedirect)))\n .optional(),\n rewrites: z\n .function()\n .args()\n .returns(\n z.promise(\n z.union([\n z.array(zRewrite),\n z.object({\n beforeFiles: z.array(zRewrite),\n afterFiles: z.array(zRewrite),\n fallback: z.array(zRewrite),\n }),\n ])\n )\n )\n .optional(),\n // sassOptions properties are unknown besides implementation, use z.any() here\n sassOptions: z\n .object({\n implementation: z.string().optional(),\n })\n .catchall(z.any())\n .optional(),\n serverExternalPackages: z.array(z.string()).optional(),\n skipMiddlewareUrlNormalize: z.boolean().optional(),\n skipProxyUrlNormalize: z.boolean().optional(),\n skipTrailingSlashRedirect: z.boolean().optional(),\n staticPageGenerationTimeout: z.number().optional(),\n expireTime: z.number().optional(),\n target: z.string().optional(),\n trailingSlash: z.boolean().optional(),\n transpilePackages: z.array(z.string()).optional(),\n turbopack: zTurbopackConfig.optional(),\n typescript: z\n .strictObject({\n ignoreBuildErrors: z.boolean().optional(),\n tsconfigPath: z.string().min(1).optional(),\n })\n .optional(),\n typedRoutes: z.boolean().optional(),\n useFileSystemPublicRoutes: z.boolean().optional(),\n // The webpack config type is unknown, use z.any() here\n webpack: z.any().nullable().optional(),\n watchOptions: z\n .strictObject({\n pollIntervalMs: z.number().positive().finite().optional(),\n })\n .optional(),\n })\n)\n"],"names":["VALID_LOADERS","z","LIGHTNINGCSS_FEATURE_NAMES","SUPPORTED_TEST_RUNNERS_LIST","zSizeLimit","custom","val","zExportMap","record","string","object","page","query","any","_fallbackRouteParams","array","optional","_isAppDir","boolean","_isDynamicError","_isRoutePPREnabled","_allowEmptyStaticShell","zRouteHas","union","type","enum","key","value","literal","undefined","zRewrite","source","destination","basePath","locale","has","missing","internal","zRedirect","and","statusCode","never","permanent","number","zHeader","headers","zTurbopackLoaderItem","strictObject","loader","options","zTurbopackLoaderBuiltinCondition","zTurbopackCondition","all","lazy","not","path","instanceof","RegExp","content","contentType","zTurbopackModuleType","zTurbopackRuleConfigItem","loaders","as","condition","zTurbopackRuleConfigCollection","zTurbopackConfig","rules","resolveAlias","resolveExtensions","root","debugIds","chunkLoadingGlobal","ignoreIssue","title","description","experimentalSchema","outputHashSalt","useSkewCookie","after","appNavFailHandling","appNewScrollHandler","preloadEntriesOnStart","allowedRevalidateHeaderKeys","staleTimes","dynamic","static","gte","cacheLife","stale","revalidate","expire","cacheHandlers","clientRouterFilter","clientRouterFilterRedirects","clientRouterFilterAllowedRate","cpus","memoryBasedWorkersCount","craCompat","caseSensitiveRoutes","clientParamParsingOrigins","cachedNavigations","dynamicOnHover","useOffline","optimisticRouting","appShells","varyParams","prefetchInlining","maxSize","maxBundleSize","disableOptimizedLoading","disablePostcssPresetEnv","cacheComponents","inlineCss","esmExternals","serverActions","bodySizeLimit","allowedOrigins","maxPostponedStateSize","extensionAlias","externalDir","externalMiddlewareRewritesResolve","externalProxyRewritesResolve","exposeTestingApiInProductionBuild","fallbackNodePolyfills","fetchCacheKeyPrefix","forceSwcTransforms","fullySpecified","gzipSize","imgOptConcurrency","int","nullable","imgOptOperationCache","imgOptTimeoutInSeconds","imgOptMaxInputPixels","imgOptSequentialRead","imgOptSkipMetadata","isrFlushToDisk","largePageDataBytes","linkNoTouchStart","manualClientBasePath","middlewarePrefetch","proxyPrefetch","middlewareClientMaxBodySize","proxyClientMaxBodySize","multiZoneDraftMode","cssChunking","requestCost","nonnegative","finite","moduleFactorCost","nextScriptWorkers","optimizeCss","optimisticClientCache","parallelServerCompiles","parallelServerBuildTraces","ppr","readonly","taint","prerenderEarlyExit","proxyTimeout","rootParams","mcpServer","removeUncaughtErrorAndRejectionListeners","validateRSCRequestHeaders","scrollRestoration","sri","algorithm","swcPlugins","tuple","swcEnvOptions","mode","coreJs","skip","include","exclude","shippedProposals","forceAllTransforms","debug","loose","swcTraceProfiling","urlImports","viewTransition","workerThreads","webVitalsAttribution","mdxRs","development","jsxRuntime","jsxImportSource","providerImportSource","mdxType","transitionIndicator","gestureTransition","typedRoutes","webpackBuildWorker","webpackMemoryOptimizations","turbopackMemoryEviction","turbopackPluginRuntimeStrategy","turbopackMinify","turbopackFileSystemCacheForDev","turbopackFileSystemCacheForBuild","turbopackSourceMaps","turbopackInputSourceMaps","turbopackTreeShaking","turbopackRemoveUnusedImports","turbopackRemoveUnusedExports","turbopackScopeHoisting","turbopackWorkerAssetPrefix","turbopackClientSideNestedAsyncChunking","turbopackServerSideNestedAsyncChunking","turbopackImportTypeBytes","turbopackImportTypeText","turbopackUseBuiltinBabel","turbopackUseBuiltinSass","turbopackLocalPostcssConfig","turbopackModuleIds","turbopackInferModuleSideEffects","turbopackServerFastRefresh","optimizePackageImports","optimizeServerReact","strictRouteTypes","clientTraceMetadata","serverMinification","serverSourceMaps","useWasmBinary","useLightningcss","lightningCssFeatures","testProxy","defaultTestRunner","allowDevelopmentBuild","reactDebugChannel","instantInsights","validationLevel","staticGenerationRetryCount","staticGenerationMaxConcurrency","staticGenerationMinPagesPerWorker","typedEnv","serverComponentsHmrCache","authInterrupts","useCache","useCacheTimeout","positive","slowModuleDetection","buildTimeThresholdMs","globalNotFound","turbopackRustReactCompiler","browserDebugInfoInTerminal","level","depthLimit","edgeLimit","showSourceLocation","lockDistDir","hideLogsAfterAbort","runtimeServerDeploymentId","supportsImmutableAssets","deferredEntries","onBeforeDeferredEntries","function","returns","promise","void","reportSystemEnvInlining","configSchema","adapterPath","agentRules","allowedDevOrigins","assetPrefix","bundlePagesRouterDependencies","cacheHandler","min","cacheMaxMemorySize","cleanDistDir","compiler","emotion","sourceMap","autoLabel","labelFormat","importMap","canonicalImport","styledBaseImport","reactRemoveProperties","properties","relay","src","artifactDirectory","language","eagerEsModules","removeConsole","styledComponents","displayName","topLevelImportPaths","ssr","fileName","meaninglessFileNames","minify","transpileTemplateLiterals","namespace","pure","cssProp","styledJsx","define","defineServer","runAfterProductionCompile","compress","configOrigin","crossOrigin","deploymentId","devIndicators","position","distDir","env","enablePrerenderSourceMaps","excludeDefaultMomentLocales","experimental","exportPathMap","args","dev","dir","outDir","buildId","generateBuildId","null","generateEtags","htmlLimitedBots","httpAgentOptions","keepAlive","i18n","defaultLocale","domains","domain","http","locales","localeDetection","images","localPatterns","pathname","search","max","remotePatterns","URL","hostname","port","protocol","unoptimized","customCacheHandler","contentSecurityPolicy","contentDispositionType","dangerouslyAllowSVG","dangerouslyAllowLocalIP","deviceSizes","lte","disableStaticImages","formats","imageSizes","loaderFile","maximumDiskCacheSize","maximumRedirects","maximumResponseBody","Number","MAX_SAFE_INTEGER","minimumCacheTTL","qualities","logging","fetches","fullUrl","hmrRefreshes","incomingRequests","ignore","serverFunctions","browserToTerminal","modularizeImports","transform","preventFullImport","skipDefaultConversion","onDemandEntries","maxInactiveAge","pagesBufferLength","output","outputFileTracingRoot","outputFileTracingExcludes","outputFileTracingIncludes","pageExtensions","instrumentationClientInject","partialPrefetching","poweredByHeader","productionBrowserSourceMaps","reactCompiler","compilationMode","panicThreshold","reactProductionProfiling","reactStrictMode","reactMaxHeadersLength","redirects","rewrites","beforeFiles","afterFiles","fallback","sassOptions","implementation","catchall","serverExternalPackages","skipMiddlewareUrlNormalize","skipProxyUrlNormalize","skipTrailingSlashRedirect","staticPageGenerationTimeout","expireTime","target","trailingSlash","transpilePackages","turbopack","typescript","ignoreBuildErrors","tsconfigPath","useFileSystemPublicRoutes","webpack","watchOptions","pollIntervalMs"],"mappings":"AACA,SAASA,aAAa,QAAQ,6BAA4B;AAE1D,SAASC,CAAC,QAAQ,yBAAwB;AAI1C,SACEC,0BAA0B,QAQrB,kBAAiB;AAOxB,SAASC,2BAA2B,QAAQ,mBAAkB;AAE9D,6CAA6C;AAC7C,MAAMC,aAAaH,EAAEI,MAAM,CAAY,CAACC;IACtC,IAAI,OAAOA,QAAQ,YAAY,OAAOA,QAAQ,UAAU;QACtD,OAAO;IACT;IACA,OAAO;AACT;AAEA,MAAMC,aAAyCN,EAAEO,MAAM,CACrDP,EAAEQ,MAAM,IACRR,EAAES,MAAM,CAAC;IACPC,MAAMV,EAAEQ,MAAM;IACdG,OAAOX,EAAEY,GAAG;IAEZ,8BAA8B;IAC9BC,sBAAsBb,EAAEc,KAAK,CAACd,EAAEY,GAAG,IAAIG,QAAQ;IAC/CC,WAAWhB,EAAEiB,OAAO,GAAGF,QAAQ;IAC/BG,iBAAiBlB,EAAEiB,OAAO,GAAGF,QAAQ;IACrCI,oBAAoBnB,EAAEiB,OAAO,GAAGF,QAAQ;IACxCK,wBAAwBpB,EAAEiB,OAAO,GAAGF,QAAQ;AAC9C;AAGF,MAAMM,YAAmCrB,EAAEsB,KAAK,CAAC;IAC/CtB,EAAES,MAAM,CAAC;QACPc,MAAMvB,EAAEwB,IA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M,GAAGsM,QAAQ,GAAG5F,MAAM,GAAGrI,QAAQ;QACzD,GACCA,QAAQ;IACb,IACD","ignoreList":[0]} |
@@ -26,3 +26,3 @@ import { loadEnvConfig } from '@next/env'; | ||
| } | ||
| Log.bootstrap(`${bold(purple(`${Log.prefixes.ready} Next.js ${"16.3.0-canary.51"}`))}${versionSuffix}`); | ||
| Log.bootstrap(`${bold(purple(`${Log.prefixes.ready} Next.js ${"16.3.0-canary.52"}`))}${versionSuffix}`); | ||
| if (appUrl) { | ||
@@ -29,0 +29,0 @@ Log.bootstrap(`- Local: ${appUrl}`); |
@@ -23,2 +23,4 @@ /** | ||
| This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in \`node_modules/next/dist/docs/\` before writing any code. Heed deprecation notices. | ||
| **Keep this block, including in commits.** It is part of the project's agent setup, maintained by \`next dev\` for every agent that works here. If it appears as an uncommitted change, that is intentional — commit it as-is. Do not remove it to clean up a diff; it will be regenerated. | ||
| ${AGENT_RULES_END_MARKER}`; | ||
@@ -25,0 +27,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../../src/server/lib/generate-agent-files.ts"],"sourcesContent":["/**\n * Auto-generate AGENTS.md / CLAUDE.md with the managed Next.js agent-rules\n * block when `next dev` detects an AI coding agent but the block is missing.\n *\n * Keep the marker and block content in sync with:\n * - packages/create-next-app/helpers/generate-agent-files.ts\n * - packages/next-codemod/lib/agents-md.ts\n */\n\nimport fs from 'fs'\nimport path from 'path'\n\nexport const AGENT_RULES_START_MARKER = '<!-- BEGIN:nextjs-agent-rules -->'\nexport const AGENT_RULES_END_MARKER = '<!-- END:nextjs-agent-rules -->'\n\n/**\n * Markers written by the pre-bundled-docs version of `agents-md`.\n * Stripped on upsert so projects that ran the old codemod end up with\n * a single current block instead of two stale-and-current blocks.\n */\nconst LEGACY_AGENT_RULES_START_MARKER = '<!-- NEXT-AGENTS-MD-START -->'\nconst LEGACY_AGENT_RULES_END_MARKER = '<!-- NEXT-AGENTS-MD-END -->'\n\nfunction buildAgentRulesBlock(): string {\n return `${AGENT_RULES_START_MARKER}\n# This is NOT the Next.js you know\n\nThis version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in \\`node_modules/next/dist/docs/\\` before writing any code. Heed deprecation notices.\n${AGENT_RULES_END_MARKER}`\n}\n\nconst CLAUDE_MD_CONTENT = `@AGENTS.md\\n`\n\nexport type AgentFileAction = 'created' | 'updated' | 'unchanged' | 'skipped'\n\nexport interface AgentFilesResult {\n agentsMd: AgentFileAction\n claudeMd: AgentFileAction\n}\n\n/**\n * Returns true when `AGENTS.md` or `CLAUDE.md` at `dir` contains the\n * managed agent-rules marker.\n */\nexport function hasAgentRulesInstalled(dir: string): boolean {\n const agentsContent = tryReadFile(path.join(dir, 'AGENTS.md'))\n if (agentsContent?.includes(AGENT_RULES_START_MARKER)) return true\n\n const claudeContent = tryReadFile(path.join(dir, 'CLAUDE.md'))\n if (claudeContent?.includes(AGENT_RULES_START_MARKER)) return true\n\n return false\n}\n\n/**\n * Write the agent-rules block into `projectDir`, respecting whichever\n * file the user already uses:\n *\n * - `AGENTS.md` exists → upsert into it, leave `CLAUDE.md` alone.\n * - `CLAUDE.md` exists (but not `AGENTS.md`) → upsert into it.\n * - Neither exists → create both (`AGENTS.md` + `CLAUDE.md` with\n * `@AGENTS.md` import), matching `create-next-app`.\n *\n * Idempotent: a file already containing the canonical block is\n * reported as `unchanged`.\n */\nexport function writeAgentFiles(projectDir: string): AgentFilesResult {\n const agentsMdPath = path.join(projectDir, 'AGENTS.md')\n const claudeMdPath = path.join(projectDir, 'CLAUDE.md')\n const block = buildAgentRulesBlock()\n\n const agentsMdExists = fs.existsSync(agentsMdPath)\n const claudeMdExists = fs.existsSync(claudeMdPath)\n\n if (agentsMdExists) {\n return {\n agentsMd: upsertFile(agentsMdPath, block),\n claudeMd: 'skipped',\n }\n }\n\n if (claudeMdExists) {\n return {\n agentsMd: 'skipped',\n claudeMd: upsertFile(claudeMdPath, block),\n }\n }\n\n // Neither file exists — scaffold both, matching create-next-app.\n fs.writeFileSync(agentsMdPath, block + '\\n', 'utf-8')\n fs.writeFileSync(claudeMdPath, CLAUDE_MD_CONTENT, 'utf-8')\n return { agentsMd: 'created', claudeMd: 'created' }\n}\n\n// ---------------------------------------------------------------------------\n// Internal helpers\n// ---------------------------------------------------------------------------\n\nfunction tryReadFile(filePath: string): string | null {\n try {\n return fs.readFileSync(filePath, 'utf-8')\n } catch {\n return null\n }\n}\n\nfunction upsertFile(filePath: string, block: string): AgentFileAction {\n const existing = fs.readFileSync(filePath, 'utf-8')\n const updated = upsertAgentRulesBlock(existing, block)\n if (updated === existing) return 'unchanged'\n fs.writeFileSync(filePath, updated, 'utf-8')\n return 'updated'\n}\n\n/**\n * Detect the predominant line-ending style. Returns `'\\r\\n'` if any\n * CRLF is present, `'\\n'` otherwise — avoids mixed EOLs on Windows.\n */\nfunction detectEol(content: string): '\\r\\n' | '\\n' {\n return /\\r\\n/.test(content) ? '\\r\\n' : '\\n'\n}\n\nfunction normalizeEol(s: string, eol: '\\r\\n' | '\\n'): string {\n return s.replace(/\\r?\\n/g, eol)\n}\n\nfunction upsertAgentRulesBlock(existing: string, block: string): string {\n const eol = detectEol(existing)\n const normalizedBlock = normalizeEol(block, eol)\n\n existing = stripLegacyAgentRulesBlock(existing, eol)\n\n const startIdx = existing.indexOf(AGENT_RULES_START_MARKER)\n const endIdx = existing.indexOf(AGENT_RULES_END_MARKER)\n\n if (startIdx !== -1 && endIdx !== -1 && endIdx > startIdx) {\n const before = existing.slice(0, startIdx)\n const after = existing.slice(endIdx + AGENT_RULES_END_MARKER.length)\n const replaced = before + normalizedBlock + after\n return replaced === existing ? existing : replaced\n }\n\n const separator =\n existing.length === 0 || /\\r?\\n$/.test(existing) ? eol : eol + eol\n return existing + separator + normalizedBlock + eol\n}\n\nfunction stripLegacyAgentRulesBlock(\n existing: string,\n eol: '\\r\\n' | '\\n' = '\\n'\n): string {\n while (true) {\n const startIdx = existing.indexOf(LEGACY_AGENT_RULES_START_MARKER)\n if (startIdx === -1) return existing\n const endIdx = existing.indexOf(LEGACY_AGENT_RULES_END_MARKER, startIdx)\n if (endIdx === -1) return existing\n\n let cutStart = startIdx\n while (cutStart > 0 && /\\s/.test(existing[cutStart - 1])) {\n cutStart--\n }\n let cutEnd = endIdx + LEGACY_AGENT_RULES_END_MARKER.length\n while (cutEnd < existing.length && /\\s/.test(existing[cutEnd])) {\n cutEnd++\n }\n\n const before = existing.slice(0, cutStart)\n const after = existing.slice(cutEnd)\n\n existing =\n before.length > 0 && after.length > 0\n ? before + eol + eol + after\n : before + after\n }\n}\n"],"names":["fs","path","AGENT_RULES_START_MARKER","AGENT_RULES_END_MARKER","LEGACY_AGENT_RULES_START_MARKER","LEGACY_AGENT_RULES_END_MARKER","buildAgentRulesBlock","CLAUDE_MD_CONTENT","hasAgentRulesInstalled","dir","agentsContent","tryReadFile","join","includes","claudeContent","writeAgentFiles","projectDir","agentsMdPath","claudeMdPath","block","agentsMdExists","existsSync","claudeMdExists","agentsMd","upsertFile","claudeMd","writeFileSync","filePath","readFileSync","existing","updated","upsertAgentRulesBlock","detectEol","content","test","normalizeEol","s","eol","replace","normalizedBlock","stripLegacyAgentRulesBlock","startIdx","indexOf","endIdx","before","slice","after","length","replaced","separator","cutStart","cutEnd"],"mappings":"AAAA;;;;;;;CAOC,GAED,OAAOA,QAAQ,KAAI;AACnB,OAAOC,UAAU,OAAM;AAEvB,OAAO,MAAMC,2BAA2B,oCAAmC;AAC3E,OAAO,MAAMC,yBAAyB,kCAAiC;AAEvE;;;;CAIC,GACD,MAAMC,kCAAkC;AACxC,MAAMC,gCAAgC;AAEtC,SAASC;IACP,OAAO,GAAGJ,yBAAyB;;;;AAIrC,EAAEC,wBAAwB;AAC1B;AAEA,MAAMI,oBAAoB,CAAC,YAAY,CAAC;AASxC;;;CAGC,GACD,OAAO,SAASC,uBAAuBC,GAAW;IAChD,MAAMC,gBAAgBC,YAAY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A;QACF;QAEA,MAAMP,SAASf,SAASgB,KAAK,CAAC,GAAGK;QACjC,MAAMJ,QAAQjB,SAASgB,KAAK,CAACM;QAE7BtB,WACEe,OAAOG,MAAM,GAAG,KAAKD,MAAMC,MAAM,GAAG,IAChCH,SAASP,MAAMA,MAAMS,QACrBF,SAASE;IACjB;AACF","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../../src/server/lib/generate-agent-files.ts"],"sourcesContent":["/**\n * Auto-generate AGENTS.md / CLAUDE.md with the managed Next.js agent-rules\n * block when `next dev` detects an AI coding agent but the block is missing.\n *\n * Keep the marker and block content in sync with:\n * - packages/create-next-app/helpers/generate-agent-files.ts\n * - packages/next-codemod/lib/agents-md.ts\n */\n\nimport fs from 'fs'\nimport path from 'path'\n\nexport const AGENT_RULES_START_MARKER = '<!-- BEGIN:nextjs-agent-rules -->'\nexport const AGENT_RULES_END_MARKER = '<!-- END:nextjs-agent-rules -->'\n\n/**\n * Markers written by the pre-bundled-docs version of `agents-md`.\n * Stripped on upsert so projects that ran the old codemod end up with\n * a single current block instead of two stale-and-current blocks.\n */\nconst LEGACY_AGENT_RULES_START_MARKER = '<!-- NEXT-AGENTS-MD-START -->'\nconst LEGACY_AGENT_RULES_END_MARKER = '<!-- NEXT-AGENTS-MD-END -->'\n\nfunction buildAgentRulesBlock(): string {\n return `${AGENT_RULES_START_MARKER}\n# This is NOT the Next.js you know\n\nThis version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in \\`node_modules/next/dist/docs/\\` before writing any code. Heed deprecation notices.\n\n**Keep this block, including in commits.** It is part of the project's agent setup, maintained by \\`next dev\\` for every agent that works here. If it appears as an uncommitted change, that is intentional — commit it as-is. Do not remove it to clean up a diff; it will be regenerated.\n${AGENT_RULES_END_MARKER}`\n}\n\nconst CLAUDE_MD_CONTENT = `@AGENTS.md\\n`\n\nexport type AgentFileAction = 'created' | 'updated' | 'unchanged' | 'skipped'\n\nexport interface AgentFilesResult {\n agentsMd: AgentFileAction\n claudeMd: AgentFileAction\n}\n\n/**\n * Returns true when `AGENTS.md` or `CLAUDE.md` at `dir` contains the\n * managed agent-rules marker.\n */\nexport function hasAgentRulesInstalled(dir: string): boolean {\n const agentsContent = tryReadFile(path.join(dir, 'AGENTS.md'))\n if (agentsContent?.includes(AGENT_RULES_START_MARKER)) return true\n\n const claudeContent = tryReadFile(path.join(dir, 'CLAUDE.md'))\n if (claudeContent?.includes(AGENT_RULES_START_MARKER)) return true\n\n return false\n}\n\n/**\n * Write the agent-rules block into `projectDir`, respecting whichever\n * file the user already uses:\n *\n * - `AGENTS.md` exists → upsert into it, leave `CLAUDE.md` alone.\n * - `CLAUDE.md` exists (but not `AGENTS.md`) → upsert into it.\n * - Neither exists → create both (`AGENTS.md` + `CLAUDE.md` with\n * `@AGENTS.md` import), matching `create-next-app`.\n *\n * Idempotent: a file already containing the canonical block is\n * reported as `unchanged`.\n */\nexport function writeAgentFiles(projectDir: string): AgentFilesResult {\n const agentsMdPath = path.join(projectDir, 'AGENTS.md')\n const claudeMdPath = path.join(projectDir, 'CLAUDE.md')\n const block = buildAgentRulesBlock()\n\n const agentsMdExists = fs.existsSync(agentsMdPath)\n const claudeMdExists = fs.existsSync(claudeMdPath)\n\n if (agentsMdExists) {\n return {\n agentsMd: upsertFile(agentsMdPath, block),\n claudeMd: 'skipped',\n }\n }\n\n if (claudeMdExists) {\n return {\n agentsMd: 'skipped',\n claudeMd: upsertFile(claudeMdPath, block),\n }\n }\n\n // Neither file exists — scaffold both, matching create-next-app.\n fs.writeFileSync(agentsMdPath, block + '\\n', 'utf-8')\n fs.writeFileSync(claudeMdPath, CLAUDE_MD_CONTENT, 'utf-8')\n return { agentsMd: 'created', claudeMd: 'created' }\n}\n\n// ---------------------------------------------------------------------------\n// Internal helpers\n// ---------------------------------------------------------------------------\n\nfunction tryReadFile(filePath: string): string | null {\n try {\n return fs.readFileSync(filePath, 'utf-8')\n } catch {\n return null\n }\n}\n\nfunction upsertFile(filePath: string, block: string): AgentFileAction {\n const existing = fs.readFileSync(filePath, 'utf-8')\n const updated = upsertAgentRulesBlock(existing, block)\n if (updated === existing) return 'unchanged'\n fs.writeFileSync(filePath, updated, 'utf-8')\n return 'updated'\n}\n\n/**\n * Detect the predominant line-ending style. Returns `'\\r\\n'` if any\n * CRLF is present, `'\\n'` otherwise — avoids mixed EOLs on Windows.\n */\nfunction detectEol(content: string): '\\r\\n' | '\\n' {\n return /\\r\\n/.test(content) ? '\\r\\n' : '\\n'\n}\n\nfunction normalizeEol(s: string, eol: '\\r\\n' | '\\n'): string {\n return s.replace(/\\r?\\n/g, eol)\n}\n\nfunction upsertAgentRulesBlock(existing: string, block: string): string {\n const eol = detectEol(existing)\n const normalizedBlock = normalizeEol(block, eol)\n\n existing = stripLegacyAgentRulesBlock(existing, eol)\n\n const startIdx = existing.indexOf(AGENT_RULES_START_MARKER)\n const endIdx = existing.indexOf(AGENT_RULES_END_MARKER)\n\n if (startIdx !== -1 && endIdx !== -1 && endIdx > startIdx) {\n const before = existing.slice(0, startIdx)\n const after = existing.slice(endIdx + AGENT_RULES_END_MARKER.length)\n const replaced = before + normalizedBlock + after\n return replaced === existing ? existing : replaced\n }\n\n const separator =\n existing.length === 0 || /\\r?\\n$/.test(existing) ? eol : eol + eol\n return existing + separator + normalizedBlock + eol\n}\n\nfunction stripLegacyAgentRulesBlock(\n existing: string,\n eol: '\\r\\n' | '\\n' = '\\n'\n): string {\n while (true) {\n const startIdx = existing.indexOf(LEGACY_AGENT_RULES_START_MARKER)\n if (startIdx === -1) return existing\n const endIdx = existing.indexOf(LEGACY_AGENT_RULES_END_MARKER, startIdx)\n if (endIdx === -1) return existing\n\n let cutStart = startIdx\n while (cutStart > 0 && /\\s/.test(existing[cutStart - 1])) {\n cutStart--\n }\n let cutEnd = endIdx + LEGACY_AGENT_RULES_END_MARKER.length\n while (cutEnd < existing.length && /\\s/.test(existing[cutEnd])) {\n cutEnd++\n }\n\n const before = existing.slice(0, cutStart)\n const after = existing.slice(cutEnd)\n\n existing =\n before.length > 0 && after.length > 0\n ? before + eol + eol + after\n : before + after\n }\n}\n"],"names":["fs","path","AGENT_RULES_START_MARKER","AGENT_RULES_END_MARKER","LEGACY_AGENT_RULES_START_MARKER","LEGACY_AGENT_RULES_END_MARKER","buildAgentRulesBlock","CLAUDE_MD_CONTENT","hasAgentRulesInstalled","dir","agentsContent","tryReadFile","join","includes","claudeContent","writeAgentFiles","projectDir","agentsMdPath","claudeMdPath","block","agentsMdExists","existsSync","claudeMdExists","agentsMd","upsertFile","claudeMd","writeFileSync","filePath","readFileSync","existing","updated","upsertAgentRulesBlock","detectEol","content","test","normalizeEol","s","eol","replace","normalizedBlock","stripLegacyAgentRulesBlock","startIdx","indexOf","endIdx","before","slice","after","length","replaced","separator","cutStart","cutEnd"],"mappings":"AAAA;;;;;;;CAOC,GAED,OAAOA,QAAQ,KAAI;AACnB,OAAOC,UAAU,OAAM;AAEvB,OAAO,MAAMC,2BAA2B,oCAAmC;AAC3E,OAAO,MAAMC,yBAAyB,kCAAiC;AAEvE;;;;CAIC,GACD,MAAMC,kCAAkC;AACxC,MAAMC,gCAAgC;AAEtC,SAASC;IACP,OAAO,GAAGJ,yBAAyB;;;;;;AAMrC,EAAEC,wBAAwB;AAC1B;AAEA,MAAMI,oBAAoB,CAAC,YAAY,CAAC;AASxC;;;CAGC,GACD,OAAO,SAASC,uBAAuBC,GAAW;IAChD,MAAMC,gBAAgBC,YAAYV,KAAKW,IAAI,CAACH,KAAK;IACjD,IAAIC,iCAAAA,cAAeG,QAAQ,CAACX,2BAA2B,OAAO;IAE9D,MAAMY,gBAAgBH,YAAYV,KAAKW,IAAI,CAACH,KAAK;IACjD,IAAIK,iCAAAA,cAAeD,QAAQ,CAACX,2BAA2B,OAAO;IAE9D,OAAO;AACT;AAEA;;;;;;;;;;;CAWC,GACD,OAAO,SAASa,gBAAgBC,UAAkB;IAChD,MAAMC,eAAehB,KAAKW,IAAI,CAACI,YAAY;IAC3C,MAAME,eAAejB,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ASa,OAAO,CAACvC;IAEhC,IAAIsC,aAAa,CAAC,KAAKE,WAAW,CAAC,KAAKA,SAASF,UAAU;QACzD,MAAMG,SAASf,SAASgB,KAAK,CAAC,GAAGJ;QACjC,MAAMK,QAAQjB,SAASgB,KAAK,CAACF,SAASxC,uBAAuB4C,MAAM;QACnE,MAAMC,WAAWJ,SAASL,kBAAkBO;QAC5C,OAAOE,aAAanB,WAAWA,WAAWmB;IAC5C;IAEA,MAAMC,YACJpB,SAASkB,MAAM,KAAK,KAAK,SAASb,IAAI,CAACL,YAAYQ,MAAMA,MAAMA;IACjE,OAAOR,WAAWoB,YAAYV,kBAAkBF;AAClD;AAEA,SAASG,2BACPX,QAAgB,EAChBQ,MAAqB,IAAI;IAEzB,MAAO,KAAM;QACX,MAAMI,WAAWZ,SAASa,OAAO,CAACtC;QAClC,IAAIqC,aAAa,CAAC,GAAG,OAAOZ;QAC5B,MAAMc,SAASd,SAASa,OAAO,CAACrC,+BAA+BoC;QAC/D,IAAIE,WAAW,CAAC,GAAG,OAAOd;QAE1B,IAAIqB,WAAWT;QACf,MAAOS,WAAW,KAAK,KAAKhB,IAAI,CAACL,QAAQ,CAACqB,WAAW,EAAE,EAAG;YACxDA;QACF;QACA,IAAIC,SAASR,SAAStC,8BAA8B0C,MAAM;QAC1D,MAAOI,SAAStB,SAASkB,MAAM,IAAI,KAAKb,IAAI,CAACL,QAAQ,CAACsB,OAAO,EAAG;YAC9DA;QACF;QAEA,MAAMP,SAASf,SAASgB,KAAK,CAAC,GAAGK;QACjC,MAAMJ,QAAQjB,SAASgB,KAAK,CAACM;QAE7BtB,WACEe,OAAOG,MAAM,GAAG,KAAKD,MAAMC,MAAM,GAAG,IAChCH,SAASP,MAAMA,MAAMS,QACrBF,SAASE;IACjB;AACF","ignoreList":[0]} |
@@ -112,3 +112,3 @@ // Start CPU profile if it wasn't already started. | ||
| let { port } = serverOptions; | ||
| process.title = `next-server (v${"16.3.0-canary.51"})`; | ||
| process.title = `next-server (v${"16.3.0-canary.52"})`; | ||
| let handlersReady = ()=>{}; | ||
@@ -115,0 +115,0 @@ let handlersError = ()=>{}; |
@@ -355,3 +355,6 @@ import './require-hook'; | ||
| const selectWebpack = options && (options.webpack || process.env.IS_WEBPACK_TEST); | ||
| if (selectTurbopack && selectWebpack) { | ||
| // Rspack is selected through env/config side effects instead of a custom | ||
| // server option, so don't fall back to the default Turbopack auto mode. | ||
| const selectRspack = !!process.env.NEXT_RSPACK; | ||
| if (selectTurbopack && selectWebpack && selectRspack) { | ||
| throw Object.defineProperty(new Error('Pass either `webpack` or `turbopack`, not both.'), "__NEXT_ERROR_CODE", { | ||
@@ -363,4 +366,6 @@ value: "E851", | ||
| } | ||
| if (selectTurbopack || !selectWebpack) { | ||
| process.env.TURBOPACK ??= selectTurbopack ? '1' : 'auto'; | ||
| if (selectTurbopack) { | ||
| process.env.TURBOPACK ??= '1'; | ||
| } else if (!selectWebpack && !selectRspack) { | ||
| process.env.TURBOPACK ??= 'auto'; | ||
| } | ||
@@ -367,0 +372,0 @@ } else { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../src/server/next.ts"],"sourcesContent":["import type { Options as DevServerOptions } from './dev/next-dev-server'\nimport type {\n NodeRequestHandler,\n Options as ServerOptions,\n} from './next-server'\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type { Duplex } from 'stream'\nimport type { NextUrlWithParsedQuery, RequestMeta } from './request-meta'\n\nimport './require-hook'\nimport './node-polyfill-crypto'\n\nimport type { default as NextNodeServer } from './next-server'\nimport * as log from '../build/output/log'\nimport loadConfig from './config'\nimport path from 'node:path'\nimport { NON_STANDARD_NODE_ENV } from '../lib/constants'\nimport {\n PHASE_DEVELOPMENT_SERVER,\n SERVER_FILES_MANIFEST,\n} from '../shared/lib/constants'\nimport { PHASE_PRODUCTION_SERVER } from '../shared/lib/constants'\nimport { getTracer } from './lib/trace/tracer'\nimport { NextServerSpan } from './lib/trace/constants'\nimport { formatUrl } from '../shared/lib/router/utils/format-url'\nimport type { ServerFields } from './lib/router-utils/setup-dev-bundler'\nimport type { ServerInitResult } from './lib/render-server'\nimport { AsyncCallbackSet } from './lib/async-callback-set'\nimport {\n RouterServerContextSymbol,\n routerServerGlobal,\n} from './lib/router-utils/router-server-context'\n\nlet ServerImpl: typeof NextNodeServer\n\nconst getServerImpl = async () => {\n if (ServerImpl === undefined) {\n ServerImpl = (\n await Promise.resolve(\n require('./next-server') as typeof import('./next-server')\n )\n ).default\n }\n return ServerImpl\n}\n\nexport type NextServerOptions = Omit<\n ServerOptions | DevServerOptions,\n // This is assigned in this server abstraction.\n 'conf'\n> &\n Partial<Pick<ServerOptions | DevServerOptions, 'conf'>>\n\nexport type NextBundlerOptions = {\n /** @deprecated Use `turbopack` instead */\n turbo?: boolean\n /** Selects Turbopack as the bundler */\n turbopack?: boolean\n /** Selects Webpack as the bundler */\n webpack?: boolean\n}\n\nexport type RequestHandler = (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery | undefined\n) => Promise<void>\n\nexport type UpgradeHandler = (\n req: IncomingMessage,\n socket: Duplex,\n head: Buffer\n) => Promise<void>\n\nconst SYMBOL_LOAD_CONFIG = Symbol('next.load_config')\n\ntype DeprecatedCustomServerMethod =\n | 'setAssetPrefix'\n | 'logError'\n | 'logErrorWithOriginalStack'\n | 'revalidate'\n | 'render'\n | 'renderToHTML'\n | 'renderError'\n | 'renderErrorToHTML'\n | 'render404'\n\nconst DEPRECATED_CUSTOM_SERVER_METHOD_GUIDANCE: Record<\n DeprecatedCustomServerMethod,\n string\n> = {\n setAssetPrefix: 'Please configure `assetPrefix` in `next.config.js` instead.',\n logError: 'Please use application logging instead.',\n logErrorWithOriginalStack: 'Please use application logging instead.',\n revalidate: 'Please use documented application revalidation APIs instead.',\n render:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n renderToHTML:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n renderError:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n renderErrorToHTML:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n render404:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n}\n\nfunction warnDeprecatedCustomServerMethod(\n method: DeprecatedCustomServerMethod\n) {\n log.warnOnce(\n `The \\`app.${method}()\\` method is deprecated in custom servers. ${DEPRECATED_CUSTOM_SERVER_METHOD_GUIDANCE[method]}`\n )\n}\n\ninterface NextWrapperServer {\n // NOTE: the methods/properties here are the public API for custom servers.\n // Consider backwards compatibilty when changing something here!\n\n options: NextServerOptions\n hostname: string | undefined\n port: number | undefined\n\n getRequestHandler(): RequestHandler\n prepare(serverFields?: ServerFields): Promise<void>\n /** @deprecated Configure `assetPrefix` in `next.config.js` instead. */\n setAssetPrefix(assetPrefix: string): void\n close(): Promise<void>\n\n // used internally\n getUpgradeHandler(): UpgradeHandler\n\n // legacy methods that we left exposed in the past\n\n /** @deprecated Use application logging instead. */\n logError(...args: Parameters<NextNodeServer['logError']>): void\n\n /** @deprecated Use documented application revalidation APIs instead. */\n revalidate(\n ...args: Parameters<NextNodeServer['revalidate']>\n ): ReturnType<NextNodeServer['revalidate']>\n\n /** @deprecated Use application logging instead. */\n logErrorWithOriginalStack(err: unknown, type: string): void\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n render(\n ...args: Parameters<NextNodeServer['render']>\n ): ReturnType<NextNodeServer['render']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n renderToHTML(\n ...args: Parameters<NextNodeServer['renderToHTML']>\n ): ReturnType<NextNodeServer['renderToHTML']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n renderError(\n ...args: Parameters<NextNodeServer['renderError']>\n ): ReturnType<NextNodeServer['renderError']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n renderErrorToHTML(\n ...args: Parameters<NextNodeServer['renderErrorToHTML']>\n ): ReturnType<NextNodeServer['renderErrorToHTML']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n render404(\n ...args: Parameters<NextNodeServer['render404']>\n ): ReturnType<NextNodeServer['render404']>\n}\n\n/** The wrapper server used by `next start` */\nexport class NextServer implements NextWrapperServer {\n private serverPromise?: Promise<NextNodeServer>\n private server?: NextNodeServer\n private reqHandler?: NodeRequestHandler\n private reqHandlerPromise?: Promise<NodeRequestHandler>\n private preparedAssetPrefix?: string\n\n public options: NextServerOptions\n\n constructor(options: NextServerOptions) {\n this.options = options\n }\n\n get hostname() {\n return this.options.hostname\n }\n\n get port() {\n return this.options.port\n }\n\n getRequestHandler(): RequestHandler {\n return async (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery\n ) => {\n const tracer = getTracer()\n return tracer.withPropagatedContext(req.headers, () =>\n tracer.trace(NextServerSpan.getRequestHandler, async () => {\n const requestHandler = await this.getServerRequestHandler()\n return requestHandler(req, res, parsedUrl)\n })\n )\n }\n }\n\n /**\n * @internal - this method is internal to Next.js and should not be used\n * directly by end-users, only used in testing\n */\n getRequestHandlerWithMetadata(meta: RequestMeta): RequestHandler {\n return async (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery\n ) => {\n const tracer = getTracer()\n return tracer.withPropagatedContext(req.headers, () =>\n tracer.trace(NextServerSpan.getRequestHandlerWithMetadata, async () => {\n const server = await this.getServer()\n const handler = server.getRequestHandlerWithMetadata(meta)\n return handler(req, res, parsedUrl)\n })\n )\n }\n }\n\n getUpgradeHandler(): UpgradeHandler {\n return async (req: IncomingMessage, socket: any, head: any) => {\n const server = await this.getServer()\n // @ts-expect-error we mark this as protected so it\n // causes an error here\n return server.handleUpgrade.apply(server, [req, socket, head])\n }\n }\n\n setAssetPrefix(assetPrefix: string) {\n if (this.server) {\n this.server.setAssetPrefix(assetPrefix)\n } else {\n this.preparedAssetPrefix = assetPrefix\n }\n }\n\n logError(...args: Parameters<NextWrapperServer['logError']>) {\n if (this.server) {\n this.server.logError(...args)\n }\n }\n\n async logErrorWithOriginalStack(err: unknown, type: string) {\n const server = await this.getServer()\n // this is only available on dev server\n if ((server as any).logErrorWithOriginalStack) {\n return (server as any).logErrorWithOriginalStack(err, type)\n }\n }\n\n async revalidate(...args: Parameters<NextWrapperServer['revalidate']>) {\n const server = await this.getServer()\n return server.revalidate(...args)\n }\n\n async render(...args: Parameters<NextWrapperServer['render']>) {\n const server = await this.getServer()\n return server.render(...args)\n }\n\n async renderToHTML(...args: Parameters<NextWrapperServer['renderToHTML']>) {\n const server = await this.getServer()\n return server.renderToHTML(...args)\n }\n\n async renderError(...args: Parameters<NextWrapperServer['renderError']>) {\n const server = await this.getServer()\n return server.renderError(...args)\n }\n\n async renderErrorToHTML(\n ...args: Parameters<NextWrapperServer['renderErrorToHTML']>\n ) {\n const server = await this.getServer()\n return server.renderErrorToHTML(...args)\n }\n\n async render404(...args: Parameters<NextWrapperServer['render404']>) {\n const server = await this.getServer()\n return server.render404(...args)\n }\n\n async prepare(serverFields?: ServerFields) {\n const server = await this.getServer()\n\n if (serverFields) {\n Object.assign(server, serverFields)\n }\n // We shouldn't prepare the server in production,\n // because this code won't be executed when deployed\n if (this.options.dev) {\n await server.prepare()\n }\n }\n\n async close() {\n if (this.server) {\n await this.server.close()\n }\n }\n\n private async createServer(\n options: ServerOptions | DevServerOptions\n ): Promise<NextNodeServer> {\n let ServerImplementation: typeof NextNodeServer\n if (options.dev) {\n ServerImplementation = (\n require('./dev/next-dev-server') as typeof import('./dev/next-dev-server')\n ).default as typeof import('./dev/next-dev-server').default\n } else {\n ServerImplementation = await getServerImpl()\n }\n const server = new ServerImplementation(options)\n\n return server\n }\n\n private async [SYMBOL_LOAD_CONFIG]() {\n const dir = path.resolve(\n /* turbopackIgnore: true */ this.options.dir || '.'\n )\n\n const config = await loadConfig(\n this.options.dev ? PHASE_DEVELOPMENT_SERVER : PHASE_PRODUCTION_SERVER,\n dir,\n {\n customConfig: this.options.conf,\n silent: true,\n }\n )\n\n // check serialized build config when available\n if (!this.options.dev) {\n try {\n const serializedConfig = require(\n /* turbopackIgnore: true */\n path.join(\n /* turbopackIgnore: true */ dir,\n config.distDir,\n SERVER_FILES_MANIFEST + '.json'\n )\n ).config\n\n config.experimental.isExperimentalCompile =\n serializedConfig.experimental.isExperimentalCompile\n } catch (_) {\n // if distDir is customized we don't know until we\n // load the config so fallback to loading the config\n // from next.config.js\n }\n }\n\n return config\n }\n\n private async getServer() {\n if (!this.serverPromise) {\n this.serverPromise = this[SYMBOL_LOAD_CONFIG]().then(async (conf) => {\n if (!this.options.dev) {\n if (conf.output === 'standalone') {\n if (!process.env.__NEXT_PRIVATE_STANDALONE_CONFIG) {\n log.warn(\n `\"next start\" does not work with \"output: standalone\" configuration. Use \"node .next/standalone/server.js\" instead.`\n )\n }\n } else if (conf.output === 'export') {\n throw new Error(\n `\"next start\" does not work with \"output: export\" configuration. Use \"npx serve@latest out\" instead.`\n )\n }\n }\n\n this.server = await this.createServer({\n ...this.options,\n conf,\n })\n if (this.preparedAssetPrefix) {\n this.server.setAssetPrefix(this.preparedAssetPrefix)\n }\n return this.server\n })\n }\n return this.serverPromise\n }\n\n private async getServerRequestHandler() {\n if (this.reqHandler) return this.reqHandler\n\n // Memoize request handler creation\n if (!this.reqHandlerPromise) {\n this.reqHandlerPromise = this.getServer().then((server) => {\n this.reqHandler = getTracer().wrap(\n NextServerSpan.getServerRequestHandler,\n server.getRequestHandler().bind(server)\n )\n delete this.reqHandlerPromise\n return this.reqHandler\n })\n }\n return this.reqHandlerPromise\n }\n}\n\n/** The wrapper server used for `import next from \"next\" (in a custom server)` */\nclass NextCustomServer implements NextWrapperServer {\n private didWebSocketSetup: boolean = false\n protected cleanupListeners?: AsyncCallbackSet\n\n protected init?: ServerInitResult\n\n public options: NextServerOptions\n\n constructor(options: NextServerOptions) {\n this.options = options\n }\n\n protected getInit() {\n if (!this.init) {\n throw new Error(\n 'prepare() must be called before performing this operation'\n )\n }\n return this.init\n }\n\n protected get requestHandler() {\n return this.getInit().requestHandler\n }\n protected get upgradeHandler() {\n return this.getInit().upgradeHandler\n }\n protected get server() {\n return this.getInit().server\n }\n\n get hostname() {\n return this.options.hostname\n }\n\n get port() {\n return this.options.port\n }\n\n async prepare() {\n if (this.options.dev) {\n process.env.__NEXT_DEV_SERVER = '1'\n }\n\n const { getRequestHandlers } =\n require('./lib/start-server') as typeof import('./lib/start-server')\n\n let onDevServerCleanup: AsyncCallbackSet['add'] | undefined\n if (this.options.dev) {\n this.cleanupListeners = new AsyncCallbackSet()\n onDevServerCleanup = this.cleanupListeners.add.bind(this.cleanupListeners)\n }\n\n const initResult = await getRequestHandlers({\n dir: this.options.dir!,\n port: this.options.port || 3000,\n isDev: !!this.options.dev,\n onDevServerCleanup,\n hostname: this.options.hostname || 'localhost',\n minimalMode: this.options.minimalMode,\n quiet: this.options.quiet,\n })\n this.init = initResult\n }\n\n private setupWebSocketHandler(\n customServer?: import('http').Server,\n _req?: IncomingMessage\n ) {\n if (!this.didWebSocketSetup) {\n this.didWebSocketSetup = true\n customServer = customServer || (_req?.socket as any)?.server\n\n if (customServer) {\n customServer.on('upgrade', async (req, socket, head) => {\n this.upgradeHandler(req, socket, head)\n })\n }\n }\n }\n\n getRequestHandler(): RequestHandler {\n return async (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery\n ) => {\n this.setupWebSocketHandler(this.options.httpServer, req)\n\n if (parsedUrl) {\n req.url = formatUrl(parsedUrl)\n }\n\n return this.requestHandler(req, res)\n }\n }\n\n async render(...args: Parameters<NextWrapperServer['render']>) {\n warnDeprecatedCustomServerMethod('render')\n let [req, res, pathname, query, parsedUrl] = args\n this.setupWebSocketHandler(this.options.httpServer, req as IncomingMessage)\n\n if (!pathname.startsWith('/')) {\n console.error(`Cannot render page with path \"${pathname}\"`)\n pathname = `/${pathname}`\n }\n pathname = pathname === '/index' ? '/' : pathname\n\n req.url = formatUrl({\n ...parsedUrl,\n pathname,\n query,\n })\n\n await this.requestHandler(req as IncomingMessage, res as ServerResponse)\n return\n }\n\n setAssetPrefix(assetPrefix: string): void {\n warnDeprecatedCustomServerMethod('setAssetPrefix')\n this.server.setAssetPrefix(assetPrefix)\n\n // update the router-server nextConfig instance as\n // this is the source of truth for \"handler\" in serverful\n const relativeProjectDir = path.relative(\n process.cwd(),\n this.options.dir || ''\n )\n\n if (\n routerServerGlobal[RouterServerContextSymbol]?.[relativeProjectDir]\n ?.nextConfig\n ) {\n routerServerGlobal[RouterServerContextSymbol][\n relativeProjectDir\n ].nextConfig.assetPrefix = assetPrefix\n }\n }\n\n getUpgradeHandler(): UpgradeHandler {\n return this.server.getUpgradeHandler()\n }\n\n logError(...args: Parameters<NextWrapperServer['logError']>) {\n warnDeprecatedCustomServerMethod('logError')\n this.server.logError(...args)\n }\n\n logErrorWithOriginalStack(err: unknown, type: string) {\n warnDeprecatedCustomServerMethod('logErrorWithOriginalStack')\n return this.server.logErrorWithOriginalStack(err, type)\n }\n\n async revalidate(...args: Parameters<NextWrapperServer['revalidate']>) {\n warnDeprecatedCustomServerMethod('revalidate')\n return this.server.revalidate(...args)\n }\n\n async renderToHTML(...args: Parameters<NextWrapperServer['renderToHTML']>) {\n warnDeprecatedCustomServerMethod('renderToHTML')\n return this.server.renderToHTML(...args)\n }\n\n async renderError(...args: Parameters<NextWrapperServer['renderError']>) {\n warnDeprecatedCustomServerMethod('renderError')\n return this.server.renderError(...args)\n }\n\n async renderErrorToHTML(\n ...args: Parameters<NextWrapperServer['renderErrorToHTML']>\n ) {\n warnDeprecatedCustomServerMethod('renderErrorToHTML')\n return this.server.renderErrorToHTML(...args)\n }\n\n async render404(...args: Parameters<NextWrapperServer['render404']>) {\n warnDeprecatedCustomServerMethod('render404')\n return this.server.render404(...args)\n }\n\n async close() {\n await Promise.allSettled([\n this.init?.server.close(),\n this.cleanupListeners?.runAll(),\n ])\n }\n}\n\n// This file is used for when users run `require('next')`\nfunction createServer(\n options: NextServerOptions & NextBundlerOptions\n): NextWrapperServer {\n // next sets customServer to false when calling this function, in that case we don't want to modify the environment variables\n const isCustomServer = options?.customServer ?? true\n if (isCustomServer) {\n const selectTurbopack =\n options &&\n (options.turbo || options.turbopack || process.env.IS_TURBOPACK_TEST)\n const selectWebpack =\n options && (options.webpack || process.env.IS_WEBPACK_TEST)\n if (selectTurbopack && selectWebpack) {\n throw new Error('Pass either `webpack` or `turbopack`, not both.')\n }\n if (selectTurbopack || !selectWebpack) {\n process.env.TURBOPACK ??= selectTurbopack ? '1' : 'auto'\n }\n } else {\n if (options && (options.webpack || options.turbo || options.turbopack)) {\n throw new Error(\n 'Only custom servers can pass `webpack`, `turbo`, or `turbopack`.'\n )\n }\n }\n\n // The package is used as a TypeScript plugin.\n if (\n options &&\n 'typescript' in options &&\n 'version' in (options as any).typescript\n ) {\n const pluginMod: typeof import('./next-typescript') =\n require('./next-typescript') as typeof import('./next-typescript')\n return pluginMod.createTSPlugin(\n options as any\n ) as unknown as NextWrapperServer\n }\n\n if (options == null) {\n throw new Error(\n 'The server has not been instantiated properly. https://nextjs.org/docs/messages/invalid-server-options'\n )\n }\n\n if (\n !('isNextDevCommand' in options) &&\n process.env.NODE_ENV &&\n !['production', 'development', 'test'].includes(process.env.NODE_ENV)\n ) {\n log.warn(NON_STANDARD_NODE_ENV)\n }\n\n if (options.dev && typeof options.dev !== 'boolean') {\n console.warn(\n \"Warning: 'dev' is not a boolean which could introduce unexpected behavior. https://nextjs.org/docs/messages/invalid-server-options\"\n )\n }\n\n // When the caller is a custom server (using next()).\n if (options.customServer !== false) {\n const dir = path.resolve(/* turbopackIgnore: true */ options.dir || '.')\n\n return new NextCustomServer({\n ...options,\n dir,\n })\n }\n\n // When the caller is Next.js internals (i.e. render worker, start server, etc)\n return new NextServer(options)\n}\n\n// Support commonjs `require('next')`\nmodule.exports = createServer\n// exports = module.exports\n\n// Support `import next from 'next'`\nexport default createServer\n"],"names":["log","loadConfig","path","NON_STANDARD_NODE_ENV","PHASE_DEVELOPMENT_SERVER","SERVER_FILES_MANIFEST","PHASE_PRODUCTION_SERVER","getTracer","NextServerSpan","formatUrl","AsyncCallbackSet","RouterServerContextSymbol","routerServerGlobal","ServerImpl","getServerImpl","undefined","Promise","resolve","require","default","SYMBOL_LOAD_CONFIG","Symbol","DEPRECATED_CUSTOM_SERVER_METHOD_GUIDANCE","setAssetPrefix","logError","logErrorWithOriginalStack","revalidate","render","renderToHTML","renderError","renderErrorToHTML","render404","warnDeprecatedCustomServerMethod","method","warnOnce","NextServer","constructor","options","hostname","port","getRequestHandler","req","res","parsedUrl","tracer","withPropagatedContext","headers","trace","requestHandler","getServerRequestHandler","getRequestHandlerWithMetadata","meta","server","getServer","handler","getUpgradeHandler","socket","head","handleUpgrade","apply","assetPrefix","preparedAssetPrefix","args","err","type","prepare","serverFields","Object","assign","dev","close","createServer","ServerImplementation","dir","config","customConfig","conf","silent","serializedConfig","join","distDir","experimental","isExperimentalCompile","_","serverPromise","then","output","process","env","__NEXT_PRIVATE_STANDALONE_CONFIG","warn","Error","reqHandler","reqHandlerPromise","wrap","bind","NextCustomServer","didWebSocketSetup","getInit","init","upgradeHandler","__NEXT_DEV_SERVER","getRequestHandlers","onDevServerCleanup","cleanupListeners","add","initResult","isDev","minimalMode","quiet","setupWebSocketHandler","customServer","_req","on","httpServer","url","pathname","query","startsWith","console","error","relativeProjectDir","relative","cwd","nextConfig","allSettled","runAll","isCustomServer","selectTurbopack","turbo","turbopack","IS_TURBOPACK_TEST","selectWebpack","webpack","IS_WEBPACK_TEST","TURBOPACK","typescript","pluginMod","createTSPlugin","NODE_ENV","includes","module","exports"],"mappings":"AASA,OAAO,iBAAgB;AACvB,OAAO,yBAAwB;AAG/B,YAAYA,SAAS,sBAAqB;AAC1C,OAAOC,gBAAgB,WAAU;AACjC,OAAOC,UAAU,YAAW;AAC5B,SAASC,qBAAqB,QAAQ,m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nDkD,QAAQ7B,IAAI,CACV;IAEJ;IAEA,qDAAqD;IACrD,IAAIrD,QAAQ0E,YAAY,KAAK,OAAO;QAClC,MAAMtC,MAAMvE,KAAKe,OAAO,CAAC,yBAAyB,GAAGoB,QAAQoC,GAAG,IAAI;QAEpE,OAAO,IAAIuB,iBAAiB;YAC1B,GAAG3D,OAAO;YACVoC;QACF;IACF;IAEA,+EAA+E;IAC/E,OAAO,IAAItC,WAAWE;AACxB;AAEA,qCAAqC;AACrCwG,OAAOC,OAAO,GAAGvE;AACjB,2BAA2B;AAE3B,oCAAoC;AACpC,eAAeA,aAAY","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../src/server/next.ts"],"sourcesContent":["import type { Options as DevServerOptions } from './dev/next-dev-server'\nimport type {\n NodeRequestHandler,\n Options as ServerOptions,\n} from './next-server'\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type { Duplex } from 'stream'\nimport type { NextUrlWithParsedQuery, RequestMeta } from './request-meta'\n\nimport './require-hook'\nimport './node-polyfill-crypto'\n\nimport type { default as NextNodeServer } from './next-server'\nimport * as log from '../build/output/log'\nimport loadConfig from './config'\nimport path from 'node:path'\nimport { NON_STANDARD_NODE_ENV } from '../lib/constants'\nimport {\n PHASE_DEVELOPMENT_SERVER,\n SERVER_FILES_MANIFEST,\n} from '../shared/lib/constants'\nimport { PHASE_PRODUCTION_SERVER } from '../shared/lib/constants'\nimport { getTracer } from './lib/trace/tracer'\nimport { NextServerSpan } from './lib/trace/constants'\nimport { formatUrl } from '../shared/lib/router/utils/format-url'\nimport type { ServerFields } from './lib/router-utils/setup-dev-bundler'\nimport type { ServerInitResult } from './lib/render-server'\nimport { AsyncCallbackSet } from './lib/async-callback-set'\nimport {\n RouterServerContextSymbol,\n routerServerGlobal,\n} from './lib/router-utils/router-server-context'\n\nlet ServerImpl: typeof NextNodeServer\n\nconst getServerImpl = async () => {\n if (ServerImpl === undefined) {\n ServerImpl = (\n await Promise.resolve(\n require('./next-server') as typeof import('./next-server')\n )\n ).default\n }\n return ServerImpl\n}\n\nexport type NextServerOptions = Omit<\n ServerOptions | DevServerOptions,\n // This is assigned in this server abstraction.\n 'conf'\n> &\n Partial<Pick<ServerOptions | DevServerOptions, 'conf'>>\n\nexport type NextBundlerOptions = {\n /** @deprecated Use `turbopack` instead */\n turbo?: boolean\n /** Selects Turbopack as the bundler */\n turbopack?: boolean\n /** Selects Webpack as the bundler */\n webpack?: boolean\n}\n\nexport type RequestHandler = (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery | undefined\n) => Promise<void>\n\nexport type UpgradeHandler = (\n req: IncomingMessage,\n socket: Duplex,\n head: Buffer\n) => Promise<void>\n\nconst SYMBOL_LOAD_CONFIG = Symbol('next.load_config')\n\ntype DeprecatedCustomServerMethod =\n | 'setAssetPrefix'\n | 'logError'\n | 'logErrorWithOriginalStack'\n | 'revalidate'\n | 'render'\n | 'renderToHTML'\n | 'renderError'\n | 'renderErrorToHTML'\n | 'render404'\n\nconst DEPRECATED_CUSTOM_SERVER_METHOD_GUIDANCE: Record<\n DeprecatedCustomServerMethod,\n string\n> = {\n setAssetPrefix: 'Please configure `assetPrefix` in `next.config.js` instead.',\n logError: 'Please use application logging instead.',\n logErrorWithOriginalStack: 'Please use application logging instead.',\n revalidate: 'Please use documented application revalidation APIs instead.',\n render:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n renderToHTML:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n renderError:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n renderErrorToHTML:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n render404:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n}\n\nfunction warnDeprecatedCustomServerMethod(\n method: DeprecatedCustomServerMethod\n) {\n log.warnOnce(\n `The \\`app.${method}()\\` method is deprecated in custom servers. ${DEPRECATED_CUSTOM_SERVER_METHOD_GUIDANCE[method]}`\n )\n}\n\ninterface NextWrapperServer {\n // NOTE: the methods/properties here are the public API for custom servers.\n // Consider backwards compatibilty when changing something here!\n\n options: NextServerOptions\n hostname: string | undefined\n port: number | undefined\n\n getRequestHandler(): RequestHandler\n prepare(serverFields?: ServerFields): Promise<void>\n /** @deprecated Configure `assetPrefix` in `next.config.js` instead. */\n setAssetPrefix(assetPrefix: string): void\n close(): Promise<void>\n\n // used internally\n getUpgradeHandler(): UpgradeHandler\n\n // legacy methods that we left exposed in the past\n\n /** @deprecated Use application logging instead. */\n logError(...args: Parameters<NextNodeServer['logError']>): void\n\n /** @deprecated Use documented application revalidation APIs instead. */\n revalidate(\n ...args: Parameters<NextNodeServer['revalidate']>\n ): ReturnType<NextNodeServer['revalidate']>\n\n /** @deprecated Use application logging instead. */\n logErrorWithOriginalStack(err: unknown, type: string): void\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n render(\n ...args: Parameters<NextNodeServer['render']>\n ): ReturnType<NextNodeServer['render']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n renderToHTML(\n ...args: Parameters<NextNodeServer['renderToHTML']>\n ): ReturnType<NextNodeServer['renderToHTML']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n renderError(\n ...args: Parameters<NextNodeServer['renderError']>\n ): ReturnType<NextNodeServer['renderError']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n renderErrorToHTML(\n ...args: Parameters<NextNodeServer['renderErrorToHTML']>\n ): ReturnType<NextNodeServer['renderErrorToHTML']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n render404(\n ...args: Parameters<NextNodeServer['render404']>\n ): ReturnType<NextNodeServer['render404']>\n}\n\n/** The wrapper server used by `next start` */\nexport class NextServer implements NextWrapperServer {\n private serverPromise?: Promise<NextNodeServer>\n private server?: NextNodeServer\n private reqHandler?: NodeRequestHandler\n private reqHandlerPromise?: Promise<NodeRequestHandler>\n private preparedAssetPrefix?: string\n\n public options: NextServerOptions\n\n constructor(options: NextServerOptions) {\n this.options = options\n }\n\n get hostname() {\n return this.options.hostname\n }\n\n get port() {\n return this.options.port\n }\n\n getRequestHandler(): RequestHandler {\n return async (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery\n ) => {\n const tracer = getTracer()\n return tracer.withPropagatedContext(req.headers, () =>\n tracer.trace(NextServerSpan.getRequestHandler, async () => {\n const requestHandler = await this.getServerRequestHandler()\n return requestHandler(req, res, parsedUrl)\n })\n )\n }\n }\n\n /**\n * @internal - this method is internal to Next.js and should not be used\n * directly by end-users, only used in testing\n */\n getRequestHandlerWithMetadata(meta: RequestMeta): RequestHandler {\n return async (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery\n ) => {\n const tracer = getTracer()\n return tracer.withPropagatedContext(req.headers, () =>\n tracer.trace(NextServerSpan.getRequestHandlerWithMetadata, async () => {\n const server = await this.getServer()\n const handler = server.getRequestHandlerWithMetadata(meta)\n return handler(req, res, parsedUrl)\n })\n )\n }\n }\n\n getUpgradeHandler(): UpgradeHandler {\n return async (req: IncomingMessage, socket: any, head: any) => {\n const server = await this.getServer()\n // @ts-expect-error we mark this as protected so it\n // causes an error here\n return server.handleUpgrade.apply(server, [req, socket, head])\n }\n }\n\n setAssetPrefix(assetPrefix: string) {\n if (this.server) {\n this.server.setAssetPrefix(assetPrefix)\n } else {\n this.preparedAssetPrefix = assetPrefix\n }\n }\n\n logError(...args: Parameters<NextWrapperServer['logError']>) {\n if (this.server) {\n this.server.logError(...args)\n }\n }\n\n async logErrorWithOriginalStack(err: unknown, type: string) {\n const server = await this.getServer()\n // this is only available on dev server\n if ((server as any).logErrorWithOriginalStack) {\n return (server as any).logErrorWithOriginalStack(err, type)\n }\n }\n\n async revalidate(...args: Parameters<NextWrapperServer['revalidate']>) {\n const server = await this.getServer()\n return server.revalidate(...args)\n }\n\n async render(...args: Parameters<NextWrapperServer['render']>) {\n const server = await this.getServer()\n return server.render(...args)\n }\n\n async renderToHTML(...args: Parameters<NextWrapperServer['renderToHTML']>) {\n const server = await this.getServer()\n return server.renderToHTML(...args)\n }\n\n async renderError(...args: Parameters<NextWrapperServer['renderError']>) {\n const server = await this.getServer()\n return server.renderError(...args)\n }\n\n async renderErrorToHTML(\n ...args: Parameters<NextWrapperServer['renderErrorToHTML']>\n ) {\n const server = await this.getServer()\n return server.renderErrorToHTML(...args)\n }\n\n async render404(...args: Parameters<NextWrapperServer['render404']>) {\n const server = await this.getServer()\n return server.render404(...args)\n }\n\n async prepare(serverFields?: ServerFields) {\n const server = await this.getServer()\n\n if (serverFields) {\n Object.assign(server, serverFields)\n }\n // We shouldn't prepare the server in production,\n // because this code won't be executed when deployed\n if (this.options.dev) {\n await server.prepare()\n }\n }\n\n async close() {\n if (this.server) {\n await this.server.close()\n }\n }\n\n private async createServer(\n options: ServerOptions | DevServerOptions\n ): Promise<NextNodeServer> {\n let ServerImplementation: typeof NextNodeServer\n if (options.dev) {\n ServerImplementation = (\n require('./dev/next-dev-server') as typeof import('./dev/next-dev-server')\n ).default as typeof import('./dev/next-dev-server').default\n } else {\n ServerImplementation = await getServerImpl()\n }\n const server = new ServerImplementation(options)\n\n return server\n }\n\n private async [SYMBOL_LOAD_CONFIG]() {\n const dir = path.resolve(\n /* turbopackIgnore: true */ this.options.dir || '.'\n )\n\n const config = await loadConfig(\n this.options.dev ? PHASE_DEVELOPMENT_SERVER : PHASE_PRODUCTION_SERVER,\n dir,\n {\n customConfig: this.options.conf,\n silent: true,\n }\n )\n\n // check serialized build config when available\n if (!this.options.dev) {\n try {\n const serializedConfig = require(\n /* turbopackIgnore: true */\n path.join(\n /* turbopackIgnore: true */ dir,\n config.distDir,\n SERVER_FILES_MANIFEST + '.json'\n )\n ).config\n\n config.experimental.isExperimentalCompile =\n serializedConfig.experimental.isExperimentalCompile\n } catch (_) {\n // if distDir is customized we don't know until we\n // load the config so fallback to loading the config\n // from next.config.js\n }\n }\n\n return config\n }\n\n private async getServer() {\n if (!this.serverPromise) {\n this.serverPromise = this[SYMBOL_LOAD_CONFIG]().then(async (conf) => {\n if (!this.options.dev) {\n if (conf.output === 'standalone') {\n if (!process.env.__NEXT_PRIVATE_STANDALONE_CONFIG) {\n log.warn(\n `\"next start\" does not work with \"output: standalone\" configuration. Use \"node .next/standalone/server.js\" instead.`\n )\n }\n } else if (conf.output === 'export') {\n throw new Error(\n `\"next start\" does not work with \"output: export\" configuration. Use \"npx serve@latest out\" instead.`\n )\n }\n }\n\n this.server = await this.createServer({\n ...this.options,\n conf,\n })\n if (this.preparedAssetPrefix) {\n this.server.setAssetPrefix(this.preparedAssetPrefix)\n }\n return this.server\n })\n }\n return this.serverPromise\n }\n\n private async getServerRequestHandler() {\n if (this.reqHandler) return this.reqHandler\n\n // Memoize request handler creation\n if (!this.reqHandlerPromise) {\n this.reqHandlerPromise = this.getServer().then((server) => {\n this.reqHandler = getTracer().wrap(\n NextServerSpan.getServerRequestHandler,\n server.getRequestHandler().bind(server)\n )\n delete this.reqHandlerPromise\n return this.reqHandler\n })\n }\n return this.reqHandlerPromise\n }\n}\n\n/** The wrapper server used for `import next from \"next\" (in a custom server)` */\nclass NextCustomServer implements NextWrapperServer {\n private didWebSocketSetup: boolean = false\n protected cleanupListeners?: AsyncCallbackSet\n\n protected init?: ServerInitResult\n\n public options: NextServerOptions\n\n constructor(options: NextServerOptions) {\n this.options = options\n }\n\n protected getInit() {\n if (!this.init) {\n throw new Error(\n 'prepare() must be called before performing this operation'\n )\n }\n return this.init\n }\n\n protected get requestHandler() {\n return this.getInit().requestHandler\n }\n protected get upgradeHandler() {\n return this.getInit().upgradeHandler\n }\n protected get server() {\n return this.getInit().server\n }\n\n get hostname() {\n return this.options.hostname\n }\n\n get port() {\n return this.options.port\n }\n\n async prepare() {\n if (this.options.dev) {\n process.env.__NEXT_DEV_SERVER = '1'\n }\n\n const { getRequestHandlers } =\n require('./lib/start-server') as typeof import('./lib/start-server')\n\n let onDevServerCleanup: AsyncCallbackSet['add'] | undefined\n if (this.options.dev) {\n this.cleanupListeners = new AsyncCallbackSet()\n onDevServerCleanup = this.cleanupListeners.add.bind(this.cleanupListeners)\n }\n\n const initResult = await getRequestHandlers({\n dir: this.options.dir!,\n port: this.options.port || 3000,\n isDev: !!this.options.dev,\n onDevServerCleanup,\n hostname: this.options.hostname || 'localhost',\n minimalMode: this.options.minimalMode,\n quiet: this.options.quiet,\n })\n this.init = initResult\n }\n\n private setupWebSocketHandler(\n customServer?: import('http').Server,\n _req?: IncomingMessage\n ) {\n if (!this.didWebSocketSetup) {\n this.didWebSocketSetup = true\n customServer = customServer || (_req?.socket as any)?.server\n\n if (customServer) {\n customServer.on('upgrade', async (req, socket, head) => {\n this.upgradeHandler(req, socket, head)\n })\n }\n }\n }\n\n getRequestHandler(): RequestHandler {\n return async (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery\n ) => {\n this.setupWebSocketHandler(this.options.httpServer, req)\n\n if (parsedUrl) {\n req.url = formatUrl(parsedUrl)\n }\n\n return this.requestHandler(req, res)\n }\n }\n\n async render(...args: Parameters<NextWrapperServer['render']>) {\n warnDeprecatedCustomServerMethod('render')\n let [req, res, pathname, query, parsedUrl] = args\n this.setupWebSocketHandler(this.options.httpServer, req as IncomingMessage)\n\n if (!pathname.startsWith('/')) {\n console.error(`Cannot render page with path \"${pathname}\"`)\n pathname = `/${pathname}`\n }\n pathname = pathname === '/index' ? '/' : pathname\n\n req.url = formatUrl({\n ...parsedUrl,\n pathname,\n query,\n })\n\n await this.requestHandler(req as IncomingMessage, res as ServerResponse)\n return\n }\n\n setAssetPrefix(assetPrefix: string): void {\n warnDeprecatedCustomServerMethod('setAssetPrefix')\n this.server.setAssetPrefix(assetPrefix)\n\n // update the router-server nextConfig instance as\n // this is the source of truth for \"handler\" in serverful\n const relativeProjectDir = path.relative(\n process.cwd(),\n this.options.dir || ''\n )\n\n if (\n routerServerGlobal[RouterServerContextSymbol]?.[relativeProjectDir]\n ?.nextConfig\n ) {\n routerServerGlobal[RouterServerContextSymbol][\n relativeProjectDir\n ].nextConfig.assetPrefix = assetPrefix\n }\n }\n\n getUpgradeHandler(): UpgradeHandler {\n return this.server.getUpgradeHandler()\n }\n\n logError(...args: Parameters<NextWrapperServer['logError']>) {\n warnDeprecatedCustomServerMethod('logError')\n this.server.logError(...args)\n }\n\n logErrorWithOriginalStack(err: unknown, type: string) {\n warnDeprecatedCustomServerMethod('logErrorWithOriginalStack')\n return this.server.logErrorWithOriginalStack(err, type)\n }\n\n async revalidate(...args: Parameters<NextWrapperServer['revalidate']>) {\n warnDeprecatedCustomServerMethod('revalidate')\n return this.server.revalidate(...args)\n }\n\n async renderToHTML(...args: Parameters<NextWrapperServer['renderToHTML']>) {\n warnDeprecatedCustomServerMethod('renderToHTML')\n return this.server.renderToHTML(...args)\n }\n\n async renderError(...args: Parameters<NextWrapperServer['renderError']>) {\n warnDeprecatedCustomServerMethod('renderError')\n return this.server.renderError(...args)\n }\n\n async renderErrorToHTML(\n ...args: Parameters<NextWrapperServer['renderErrorToHTML']>\n ) {\n warnDeprecatedCustomServerMethod('renderErrorToHTML')\n return this.server.renderErrorToHTML(...args)\n }\n\n async render404(...args: Parameters<NextWrapperServer['render404']>) {\n warnDeprecatedCustomServerMethod('render404')\n return this.server.render404(...args)\n }\n\n async close() {\n await Promise.allSettled([\n this.init?.server.close(),\n this.cleanupListeners?.runAll(),\n ])\n }\n}\n\n// This file is used for when users run `require('next')`\nfunction createServer(\n options: NextServerOptions & NextBundlerOptions\n): NextWrapperServer {\n // next sets customServer to false when calling this function, in that case we don't want to modify the environment variables\n const isCustomServer = options?.customServer ?? true\n if (isCustomServer) {\n const selectTurbopack =\n options &&\n (options.turbo || options.turbopack || process.env.IS_TURBOPACK_TEST)\n const selectWebpack =\n options && (options.webpack || process.env.IS_WEBPACK_TEST)\n // Rspack is selected through env/config side effects instead of a custom\n // server option, so don't fall back to the default Turbopack auto mode.\n const selectRspack = !!process.env.NEXT_RSPACK\n if (selectTurbopack && selectWebpack && selectRspack) {\n throw new Error('Pass either `webpack` or `turbopack`, not both.')\n }\n if (selectTurbopack) {\n process.env.TURBOPACK ??= '1'\n } else if (!selectWebpack && !selectRspack) {\n process.env.TURBOPACK ??= 'auto'\n }\n } else {\n if (options && (options.webpack || options.turbo || options.turbopack)) {\n throw new Error(\n 'Only custom servers can pass `webpack`, `turbo`, or `turbopack`.'\n )\n }\n }\n\n // The package is used as a TypeScript plugin.\n if (\n options &&\n 'typescript' in options &&\n 'version' in (options as any).typescript\n ) {\n const pluginMod: typeof import('./next-typescript') =\n require('./next-typescript') as typeof import('./next-typescript')\n return pluginMod.createTSPlugin(\n options as any\n ) as unknown as NextWrapperServer\n }\n\n if (options == null) {\n throw new Error(\n 'The server has not been instantiated properly. https://nextjs.org/docs/messages/invalid-server-options'\n )\n }\n\n if (\n !('isNextDevCommand' in options) &&\n process.env.NODE_ENV &&\n !['production', 'development', 'test'].includes(process.env.NODE_ENV)\n ) {\n log.warn(NON_STANDARD_NODE_ENV)\n }\n\n if (options.dev && typeof options.dev !== 'boolean') {\n console.warn(\n \"Warning: 'dev' is not a boolean which could introduce unexpected behavior. https://nextjs.org/docs/messages/invalid-server-options\"\n )\n }\n\n // When the caller is a custom server (using next()).\n if (options.customServer !== false) {\n const dir = path.resolve(/* turbopackIgnore: true */ options.dir || '.')\n\n return new NextCustomServer({\n ...options,\n dir,\n })\n }\n\n // When the caller is Next.js internals (i.e. render worker, start server, etc)\n return new NextServer(options)\n}\n\n// Support commonjs `require('next')`\nmodule.exports = createServer\n// exports = module.exports\n\n// Support `import next from 'next'`\nexport default createServer\n"],"names":["log","loadConfig","path","NON_STANDARD_NODE_ENV","PHASE_DEVELOPMENT_SERVER","SERVER_FILES_MANIFEST","PHASE_PRODUCTION_SERVER","getTracer","NextServerSpan","formatUrl","AsyncCallbackSet","RouterServerContextSymbol","routerServerGlobal","ServerImpl","getServerImpl","undefined","Promise","resolve","require","default","SYMBOL_LOAD_CONFIG","Symbol","DEPRECATED_CUSTOM_SERVER_METHOD_GUIDANCE","setAssetPrefix","logError","logErrorWithOriginalStack","revalidate","render","renderToHTML","renderError","renderErrorToHTML","render404","warnDeprecatedCustomServerMethod","method","warnOnce","NextServer","constructor","options","hostname","port","getRequestHandler","req","res","parsedUrl","tracer","withPropagatedContext","headers","trace","requestHandler","getServerRequestHandler","getRequestHandlerWithMetadata","meta","server","getServer","handler","getUpgradeHandler","socket","head","handleUpgrade","apply","assetPrefix","preparedAssetPrefix","args","err","type","prepare","serverFields","Object","assign","dev","close","createServer","ServerImplementation","dir","config","customConfig","conf","silent","serializedConfig","join","distDir","experimental","isExperimentalCompile","_","serverPromise","then","output","process","env","__NEXT_PRIVATE_STANDALONE_CONFIG","warn","Error","reqHandler","reqHandlerPromise","wrap","bind","NextCustomServer","didWebSocketSetup","getInit","init","upgradeHandler","__NEXT_DEV_SERVER","getRequestHandlers","onDevServerCleanup","cleanupListeners","add","initResult","isDev","minimalMode","quiet","setupWebSocketHandler","customServer","_req","on","httpServer","url","pathname","query","startsWith","console","error","relativeProjectDir","relative","cwd","nextConfig","allSettled","runAll","isCustomServer","selectTurbopack","turbo","turbopack","IS_TURBOPACK_TEST","selectWebpack","webpack","IS_WEBPACK_TEST","selectRspack","NEXT_RSPACK","TURBOPACK","typescript","pluginMod","createTSPlugin","NODE_ENV","includes","module","exports"],"mappings":"AASA,OAAO,iBAAgB;AACvB,OAAO,yBAAwB;AAG/B,YAAYA,SAAS,sBAAqB;AAC1C,OAAOC,gBAAgB,WAAU;AACjC,OAAOC,UAAU,YAAW;AAC5B,SAASC,qBAAqB,QAAQ,mBAAkB;AACxD,SACEC,wBAAwB,EACxBC,qBAAqB,QAChB,0BAAyB;AAChC,SAASC,uBAAuB,QAAQ,0BAAyB;AACjE,SAASC,SAAS,QAAQ,qBAAoB;AAC9C,SA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,GAAG,KAAK,WAAW;QACnDkD,QAAQ7B,IAAI,CACV;IAEJ;IAEA,qDAAqD;IACrD,IAAIrD,QAAQ0E,YAAY,KAAK,OAAO;QAClC,MAAMtC,MAAMvE,KAAKe,OAAO,CAAC,yBAAyB,GAAGoB,QAAQoC,GAAG,IAAI;QAEpE,OAAO,IAAIuB,iBAAiB;YAC1B,GAAG3D,OAAO;YACVoC;QACF;IACF;IAEA,+EAA+E;IAC/E,OAAO,IAAItC,WAAWE;AACxB;AAEA,qCAAqC;AACrC0G,OAAOC,OAAO,GAAGzE;AACjB,2BAA2B;AAE3B,oCAAoC;AACpC,eAAeA,aAAY","ignoreList":[0]} |
@@ -107,3 +107,3 @@ import { getTracer } from '../lib/trace/tracer'; | ||
| Readable = require('node:stream').Readable; | ||
| } else if (process.env.__NEXT_BUNDLER === 'Webpack') { | ||
| } else if (process.env.__NEXT_BUNDLER === 'Webpack' || process.env.__NEXT_BUNDLER === 'Rspack') { | ||
| Readable = __non_webpack_require__('node:stream').Readable; | ||
@@ -134,3 +134,3 @@ } else { | ||
| Readable = require('node:stream').Readable; | ||
| } else if (process.env.__NEXT_BUNDLER === 'Webpack') { | ||
| } else if (process.env.__NEXT_BUNDLER === 'Webpack' || process.env.__NEXT_BUNDLER === 'Rspack') { | ||
| Readable = __non_webpack_require__('node:stream').Readable; | ||
@@ -137,0 +137,0 @@ } else { |
| export function isStableBuild() { | ||
| return !"16.3.0-canary.51"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV; | ||
| return !"16.3.0-canary.52"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV; | ||
| } | ||
@@ -4,0 +4,0 @@ export class CanaryOnlyConfigError extends Error { |
@@ -36,3 +36,3 @@ /** | ||
| if (typeof message === 'object' && message.message) { | ||
| const filteredModuleTrace = message.moduleTrace && message.moduleTrace.filter((trace)=>!/next-(middleware|client-pages|route|edge-function)-loader\.js/.test(trace.originName)); | ||
| let filteredModuleTrace = message.moduleTrace && message.moduleTrace.filter((trace)=>!/next-(middleware|client-pages|route|edge-function)-loader\.js/.test(trace.originName)); | ||
| let body = message.message; | ||
@@ -39,0 +39,0 @@ const breakingChangeIndex = body.indexOf(WEBPACK_BREAKING_CHANGE_POLYFILLS); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../../src/shared/lib/format-webpack-messages.ts"],"sourcesContent":["/**\nMIT License\n\nCopyright (c) 2015-present, Facebook, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\nimport stripAnsi from 'next/dist/compiled/strip-ansi'\n// This file is based on https://github.com/facebook/create-react-app/blob/7b1a32be6ec9f99a6c9a3c66813f3ac09c4736b9/packages/react-dev-utils/formatWebpackMessages.js\n// It's been edited to remove chalk and CRA-specific logic\n\nconst friendlySyntaxErrorLabel = 'Syntax error:'\n\nconst WEBPACK_BREAKING_CHANGE_POLYFILLS =\n '\\n\\nBREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.'\n\nfunction isLikelyASyntaxError(message: string) {\n return stripAnsi(message).includes(friendlySyntaxErrorLabel)\n}\n\nlet hadMissingSassError = false\n\n// Cleans up webpack error messages.\nfunction formatMessage(\n message: any,\n verbose?: boolean,\n importTraceNote?: boolean\n) {\n // TODO: Replace this once webpack 5 is stable\n if (typeof message === 'object' && message.message) {\n const filteredModuleTrace =\n message.moduleTrace &&\n message.moduleTrace.filter(\n (trace: any) =>\n !/next-(middleware|client-pages|route|edge-function)-loader\\.js/.test(\n trace.originName\n )\n )\n\n let body = message.message\n const breakingChangeIndex = body.indexOf(WEBPACK_BREAKING_CHANGE_POLYFILLS)\n if (breakingChangeIndex >= 0) {\n body = body.slice(0, breakingChangeIndex)\n }\n\n // TODO: Rspack currently doesn't populate moduleName correctly in some cases,\n // fall back to moduleIdentifier as a workaround\n if (\n process.env.NEXT_RSPACK &&\n !message.moduleName &&\n !message.file &&\n message.moduleIdentifier\n ) {\n const parts = message.moduleIdentifier.split('!')\n message.moduleName = parts[parts.length - 1]\n }\n\n message =\n (message.moduleName ? stripAnsi(message.moduleName) + '\\n' : '') +\n (message.file ? stripAnsi(message.file) + '\\n' : '') +\n body +\n (message.details && verbose ? '\\n' + message.details : '') +\n (filteredModuleTrace && filteredModuleTrace.length\n ? (importTraceNote || '\\n\\nImport trace for requested module:') +\n filteredModuleTrace\n .map((trace: any) => `\\n${trace.moduleName}`)\n .join('')\n : '') +\n (message.stack && verbose ? '\\n' + message.stack : '')\n }\n let lines = message.split('\\n')\n\n // Extract loader paths from Webpack-added headers and move them to end.\n // Original format: \"Module build failed (from ./loaders/foo-loader.js):\"\n // The header line is removed and the path is appended at the end as:\n // \" (from ./loaders/foo-loader.js)\"\n // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n const loaderPaths: string[] = []\n lines = lines.filter((line: string) => {\n const match = /Module [A-z ]+\\(from (.+)\\):?\\s*$/.exec(line)\n if (match) {\n loaderPaths.push(match[1])\n return false\n }\n return true\n })\n\n // Transform parsing error into syntax error\n // TODO: move this to our ESLint formatter?\n lines = lines.map((line: string) => {\n const parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(\n line\n )\n if (!parsingError) {\n return line\n }\n const [, errorLine, errorColumn, errorMessage] = parsingError\n return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`\n })\n\n message = lines.join('\\n')\n // Smoosh syntax errors (commonly found in CSS)\n message = message.replace(\n /SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g,\n `${friendlySyntaxErrorLabel} $3 ($1:$2)\\n`\n )\n // Clean up export errors\n message = message.replace(\n /^.*export '(.+?)' was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$2'.`\n )\n message = message.replace(\n /^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$2' does not contain a default export (imported as '$1').`\n )\n message = message.replace(\n /^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$3' (imported as '$2').`\n )\n lines = message.split('\\n')\n\n // Remove leading newline\n if (lines.length > 2 && lines[1].trim() === '') {\n lines.splice(1, 1)\n }\n\n // Cleans up verbose \"module not found\" messages for files and packages.\n if (lines[1] && lines[1].startsWith('Module not found: ')) {\n lines = [\n lines[0],\n lines[1]\n .replace('Error: ', '')\n .replace('Module not found: Cannot find file:', 'Cannot find file:'),\n ...lines.slice(2),\n ]\n }\n\n // Add helpful message for users trying to use Sass for the first time\n if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {\n // ./file.module.scss (<<loader info>>) => ./file.module.scss\n const firstLine = lines[0].split('!')\n lines[0] = firstLine[firstLine.length - 1]\n\n lines[1] =\n \"To use Next.js' built-in Sass support, you first need to install `sass`.\\n\"\n lines[1] += 'Run `npm i sass` or `yarn add sass` inside your workspace.\\n'\n lines[1] += '\\nLearn more: https://nextjs.org/docs/messages/install-sass'\n\n // dispose of unhelpful stack trace\n lines = lines.slice(0, 2)\n hadMissingSassError = true\n } else if (\n hadMissingSassError &&\n message.match(/(sass-loader|resolve-url-loader: CSS error)/)\n ) {\n // dispose of unhelpful stack trace following missing sass module\n lines = []\n }\n\n if (!verbose) {\n message = lines.join('\\n')\n // Internal stacks are generally useless so we strip them... with the\n // exception of stacks containing `webpack:` because they're normally\n // from user code generated by Webpack. For more information see\n // https://github.com/facebook/create-react-app/pull/1050\n message = message.replace(\n /^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm,\n ''\n ) // at ... ...:x:y\n message = message.replace(/^\\s*at\\s<anonymous>(\\n|$)/gm, '') // at <anonymous>\n\n message = message.replace(\n /File was processed with these loaders:\\n(.+[\\\\/](next[\\\\/]dist[\\\\/].+|@next[\\\\/]react-refresh-utils[\\\\/]loader)\\.js\\n)*You may need an additional loader to handle the result of these loaders.\\n/g,\n ''\n )\n\n lines = message.split('\\n')\n }\n\n // Append loader paths at the end (before any remaining stack trace)\n if (loaderPaths.length > 0) {\n for (const loaderPath of loaderPaths) {\n // Don't show internal Next.js loader paths — they're noise for users\n if (!/[/\\\\]next[/\\\\]dist[/\\\\]/.test(loaderPath)) {\n lines.push(` (from ${loaderPath})`)\n }\n }\n }\n\n // Remove duplicated newlines\n lines = (lines as string[]).filter(\n (line, index, arr) =>\n index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()\n )\n\n // Reassemble the message\n message = lines.join('\\n')\n return message.trim()\n}\n\nexport default function formatWebpackMessages(json: any, verbose?: boolean) {\n const formattedErrors = json.errors.map((message: any) => {\n const isUnknownNextFontError = message.message.includes(\n 'An error occurred in `next/font`.'\n )\n return formatMessage(message, isUnknownNextFontError || verbose)\n })\n const formattedWarnings = json.warnings.map((message: any) => {\n return formatMessage(message, verbose)\n })\n\n // Reorder errors to put the most relevant ones first.\n let reactServerComponentsError = -1\n\n for (let i = 0; i < formattedErrors.length; i++) {\n const error = formattedErrors[i]\n if (error.includes('ReactServerComponentsError')) {\n reactServerComponentsError = i\n break\n }\n }\n\n // Move the reactServerComponentsError to the top if it exists\n if (reactServerComponentsError !== -1) {\n const error = formattedErrors.splice(reactServerComponentsError, 1)\n formattedErrors.unshift(error[0])\n }\n\n const result = {\n ...json,\n errors: formattedErrors,\n warnings: formattedWarnings,\n }\n if (!verbose && result.errors.some(isLikelyASyntaxError)) {\n // If there are any syntax errors, show just them.\n result.errors = result.errors.filter(isLikelyASyntaxError)\n result.warnings = []\n }\n return result\n}\n"],"names":["stripAnsi","friendlySyntaxErrorLabel","WEBPACK_BREAKING_CHANGE_POLYFILLS","isLikelyASyntaxError","message","includes","hadMissingSassError","formatMessage","verbose","importTraceNote","filteredModuleTrace","moduleTrace","filter","trace","test","originName","body","breakingChangeIndex","indexOf","slice","process","env","NEXT_RSPACK","moduleName","file","moduleIdentifier","parts","split","length","details","map","join","stack","lines","loaderPaths","line","match","exec","push","parsingError","errorLine","errorColumn","errorMessage","replace","trim","splice","startsWith","firstLine","loaderPath","index","arr","formatWebpackMessages","json","formattedErrors","errors","isUnknownNextFontError","formattedWarnings","warnings","reactServerComponentsError","i","error","unshift","result","some"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;AAsBA,GACA,OAAOA,eAAe,gCAA+B;AACrD,qKAAqK;AACrK,0DAA0D;AAE1D,MAAMC,2BAA2B;AAEjC,MAAMC,oCACJ;AAEF,SAASC,qBAAqBC,OAAe;IAC3C,OAAOJ,UAAUI,SAASC,QAAQ,CAACJ;AACrC;AAEA,IAAIK,sBAAsB;AAE1B,oCAAoC;AACpC,SAASC,cACPH,OAAY,EACZI,OAAiB,EACjBC,eAAyB;IAEzB,8CAA8C;IAC9C,IAAI,OAAOL,YAAY,YAAYA,QAAQA,OAAO,EAAE;QAClD,MAAMM,sBACJN,QAAQO,WAAW,IACnBP,QAAQO,WAAW,CAACC,MAAM,CACxB,CAACC,QACC,CAAC,gEAAgEC,IAAI,CACnED,MA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Ae,SAASO,sBAAsBC,IAAS,EAAE5C,OAAiB;IACxE,MAAM6C,kBAAkBD,KAAKE,MAAM,CAACxB,GAAG,CAAC,CAAC1B;QACvC,MAAMmD,yBAAyBnD,QAAQA,OAAO,CAACC,QAAQ,CACrD;QAEF,OAAOE,cAAcH,SAASmD,0BAA0B/C;IAC1D;IACA,MAAMgD,oBAAoBJ,KAAKK,QAAQ,CAAC3B,GAAG,CAAC,CAAC1B;QAC3C,OAAOG,cAAcH,SAASI;IAChC;IAEA,sDAAsD;IACtD,IAAIkD,6BAA6B,CAAC;IAElC,IAAK,IAAIC,IAAI,GAAGA,IAAIN,gBAAgBzB,MAAM,EAAE+B,IAAK;QAC/C,MAAMC,QAAQP,eAAe,CAACM,EAAE;QAChC,IAAIC,MAAMvD,QAAQ,CAAC,+BAA+B;YAChDqD,6BAA6BC;YAC7B;QACF;IACF;IAEA,8DAA8D;IAC9D,IAAID,+BAA+B,CAAC,GAAG;QACrC,MAAME,QAAQP,gBAAgBR,MAAM,CAACa,4BAA4B;QACjEL,gBAAgBQ,OAAO,CAACD,KAAK,CAAC,EAAE;IAClC;IAEA,MAAME,SAAS;QACb,GAAGV,IAAI;QACPE,QAAQD;QACRI,UAAUD;IACZ;IACA,IAAI,CAAChD,WAAWsD,OAAOR,MAAM,CAACS,IAAI,CAAC5D,uBAAuB;QACxD,kDAAkD;QAClD2D,OAAOR,MAAM,GAAGQ,OAAOR,MAAM,CAAC1C,MAAM,CAACT;QACrC2D,OAAOL,QAAQ,GAAG,EAAE;IACtB;IACA,OAAOK;AACT","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../../src/shared/lib/format-webpack-messages.ts"],"sourcesContent":["/**\nMIT License\n\nCopyright (c) 2015-present, Facebook, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\nimport stripAnsi from 'next/dist/compiled/strip-ansi'\n// This file is based on https://github.com/facebook/create-react-app/blob/7b1a32be6ec9f99a6c9a3c66813f3ac09c4736b9/packages/react-dev-utils/formatWebpackMessages.js\n// It's been edited to remove chalk and CRA-specific logic\n\nconst friendlySyntaxErrorLabel = 'Syntax error:'\n\nconst WEBPACK_BREAKING_CHANGE_POLYFILLS =\n '\\n\\nBREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.'\n\nfunction isLikelyASyntaxError(message: string) {\n return stripAnsi(message).includes(friendlySyntaxErrorLabel)\n}\n\nlet hadMissingSassError = false\n\n// Cleans up webpack error messages.\nfunction formatMessage(\n message: any,\n verbose?: boolean,\n importTraceNote?: boolean\n) {\n // TODO: Replace this once webpack 5 is stable\n if (typeof message === 'object' && message.message) {\n let filteredModuleTrace =\n message.moduleTrace &&\n message.moduleTrace.filter(\n (trace: any) =>\n !/next-(middleware|client-pages|route|edge-function)-loader\\.js/.test(\n trace.originName\n )\n )\n\n let body = message.message\n const breakingChangeIndex = body.indexOf(WEBPACK_BREAKING_CHANGE_POLYFILLS)\n if (breakingChangeIndex >= 0) {\n body = body.slice(0, breakingChangeIndex)\n }\n\n // TODO: Rspack currently doesn't populate moduleName correctly in some cases,\n // fall back to moduleIdentifier as a workaround\n if (\n process.env.NEXT_RSPACK &&\n !message.moduleName &&\n !message.file &&\n message.moduleIdentifier\n ) {\n const parts = message.moduleIdentifier.split('!')\n message.moduleName = parts[parts.length - 1]\n }\n\n message =\n (message.moduleName ? stripAnsi(message.moduleName) + '\\n' : '') +\n (message.file ? stripAnsi(message.file) + '\\n' : '') +\n body +\n (message.details && verbose ? '\\n' + message.details : '') +\n (filteredModuleTrace && filteredModuleTrace.length\n ? (importTraceNote || '\\n\\nImport trace for requested module:') +\n filteredModuleTrace\n .map((trace: any) => `\\n${trace.moduleName}`)\n .join('')\n : '') +\n (message.stack && verbose ? '\\n' + message.stack : '')\n }\n let lines = message.split('\\n')\n\n // Extract loader paths from Webpack-added headers and move them to end.\n // Original format: \"Module build failed (from ./loaders/foo-loader.js):\"\n // The header line is removed and the path is appended at the end as:\n // \" (from ./loaders/foo-loader.js)\"\n // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n const loaderPaths: string[] = []\n lines = lines.filter((line: string) => {\n const match = /Module [A-z ]+\\(from (.+)\\):?\\s*$/.exec(line)\n if (match) {\n loaderPaths.push(match[1])\n return false\n }\n return true\n })\n\n // Transform parsing error into syntax error\n // TODO: move this to our ESLint formatter?\n lines = lines.map((line: string) => {\n const parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(\n line\n )\n if (!parsingError) {\n return line\n }\n const [, errorLine, errorColumn, errorMessage] = parsingError\n return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`\n })\n\n message = lines.join('\\n')\n // Smoosh syntax errors (commonly found in CSS)\n message = message.replace(\n /SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g,\n `${friendlySyntaxErrorLabel} $3 ($1:$2)\\n`\n )\n // Clean up export errors\n message = message.replace(\n /^.*export '(.+?)' was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$2'.`\n )\n message = message.replace(\n /^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$2' does not contain a default export (imported as '$1').`\n )\n message = message.replace(\n /^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$3' (imported as '$2').`\n )\n lines = message.split('\\n')\n\n // Remove leading newline\n if (lines.length > 2 && lines[1].trim() === '') {\n lines.splice(1, 1)\n }\n\n // Cleans up verbose \"module not found\" messages for files and packages.\n if (lines[1] && lines[1].startsWith('Module not found: ')) {\n lines = [\n lines[0],\n lines[1]\n .replace('Error: ', '')\n .replace('Module not found: Cannot find file:', 'Cannot find file:'),\n ...lines.slice(2),\n ]\n }\n\n // Add helpful message for users trying to use Sass for the first time\n if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {\n // ./file.module.scss (<<loader info>>) => ./file.module.scss\n const firstLine = lines[0].split('!')\n lines[0] = firstLine[firstLine.length - 1]\n\n lines[1] =\n \"To use Next.js' built-in Sass support, you first need to install `sass`.\\n\"\n lines[1] += 'Run `npm i sass` or `yarn add sass` inside your workspace.\\n'\n lines[1] += '\\nLearn more: https://nextjs.org/docs/messages/install-sass'\n\n // dispose of unhelpful stack trace\n lines = lines.slice(0, 2)\n hadMissingSassError = true\n } else if (\n hadMissingSassError &&\n message.match(/(sass-loader|resolve-url-loader: CSS error)/)\n ) {\n // dispose of unhelpful stack trace following missing sass module\n lines = []\n }\n\n if (!verbose) {\n message = lines.join('\\n')\n // Internal stacks are generally useless so we strip them... with the\n // exception of stacks containing `webpack:` because they're normally\n // from user code generated by Webpack. For more information see\n // https://github.com/facebook/create-react-app/pull/1050\n message = message.replace(\n /^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm,\n ''\n ) // at ... ...:x:y\n message = message.replace(/^\\s*at\\s<anonymous>(\\n|$)/gm, '') // at <anonymous>\n\n message = message.replace(\n /File was processed with these loaders:\\n(.+[\\\\/](next[\\\\/]dist[\\\\/].+|@next[\\\\/]react-refresh-utils[\\\\/]loader)\\.js\\n)*You may need an additional loader to handle the result of these loaders.\\n/g,\n ''\n )\n\n lines = message.split('\\n')\n }\n\n // Append loader paths at the end (before any remaining stack trace)\n if (loaderPaths.length > 0) {\n for (const loaderPath of loaderPaths) {\n // Don't show internal Next.js loader paths — they're noise for users\n if (!/[/\\\\]next[/\\\\]dist[/\\\\]/.test(loaderPath)) {\n lines.push(` (from ${loaderPath})`)\n }\n }\n }\n\n // Remove duplicated newlines\n lines = (lines as string[]).filter(\n (line, index, arr) =>\n index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()\n )\n\n // Reassemble the message\n message = lines.join('\\n')\n return message.trim()\n}\n\nexport default function formatWebpackMessages(json: any, verbose?: boolean) {\n const formattedErrors = json.errors.map((message: any) => {\n const isUnknownNextFontError = message.message.includes(\n 'An error occurred in `next/font`.'\n )\n return formatMessage(message, isUnknownNextFontError || verbose)\n })\n const formattedWarnings = json.warnings.map((message: any) => {\n return formatMessage(message, verbose)\n })\n\n // Reorder errors to put the most relevant ones first.\n let reactServerComponentsError = -1\n\n for (let i = 0; i < formattedErrors.length; i++) {\n const error = formattedErrors[i]\n if (error.includes('ReactServerComponentsError')) {\n reactServerComponentsError = i\n break\n }\n }\n\n // Move the reactServerComponentsError to the top if it exists\n if (reactServerComponentsError !== -1) {\n const error = formattedErrors.splice(reactServerComponentsError, 1)\n formattedErrors.unshift(error[0])\n }\n\n const result = {\n ...json,\n errors: formattedErrors,\n warnings: formattedWarnings,\n }\n if (!verbose && result.errors.some(isLikelyASyntaxError)) {\n // If there are any syntax errors, show just them.\n result.errors = result.errors.filter(isLikelyASyntaxError)\n result.warnings = []\n }\n return result\n}\n"],"names":["stripAnsi","friendlySyntaxErrorLabel","WEBPACK_BREAKING_CHANGE_POLYFILLS","isLikelyASyntaxError","message","includes","hadMissingSassError","formatMessage","verbose","importTraceNote","filteredModuleTrace","moduleTrace","filter","trace","test","originName","body","breakingChangeIndex","indexOf","slice","process","env","NEXT_RSPACK","moduleName","file","moduleIdentifier","parts","split","length","details","map","join","stack","lines","loaderPaths","line","match","exec","push","parsingError","errorLine","errorColumn","errorMessage","replace","trim","splice","startsWith","firstLine","loaderPath","index","arr","formatWebpackMessages","json","formattedErrors","errors","isUnknownNextFontError","formattedWarnings","warnings","reactServerComponentsError","i","error","unshift","result","some"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;AAsBA,GACA,OAAOA,eAAe,gCAA+B;AACrD,qKAAqK;AACrK,0DAA0D;AAE1D,MAAMC,2BAA2B;AAEjC,MAAMC,oCACJ;AAEF,SAASC,qBAAqBC,OAAe;IAC3C,OAAOJ,UAAUI,SAASC,QAAQ,CAACJ;AACrC;AAEA,IAAIK,sBAAsB;AAE1B,oCAAoC;AACpC,SAASC,cACPH,OAAY,EACZI,OAAiB,EACjBC,eAAyB;IAEzB,8CAA8C;IAC9C,IAAI,OAAOL,YAAY,YAAYA,QAAQA,OAAO,EAAE;QAClD,IAAIM,sBACFN,QAAQO,WAAW,IACnBP,QAAQO,WAAW,CAACC,MAAM,CACxB,CAACC,QACC,CAAC,gEAAgEC,IAAI,CACnED,MAAME,UAAU;QAIxB,IAAIC,OAAOZ,QAAQA,OAAO;QAC1B,MAAMa,sBAAsBD,KAAKE,OAAO,CAAChB;QACzC,IAAIe,uBAAuB,GAAG;YAC5BD,OAAOA,KAAKG,KAAK,CAAC,GAAGF;QACvB;QAEA,8EAA8E;QAC9E,gDAAgD;QAChD,IACEG,QAAQC,GAAG,CAACC,WAAW,IACvB,CAAClB,QAAQmB,UAAU,IACnB,CAACnB,QAAQoB,IAAI,IACbpB,QAAQqB,gBAAgB,EACxB;YACA,MAAMC,QAAQtB,QAAQqB,gBAAgB,CAACE,KAAK,CAAC;YAC7CvB,QAAQmB,UAAU,GAAGG,KAAK,CAACA,MAAME,MAAM,GAAG,EAAE;QAC9C;QAEAxB,UACE,AAACA,CAAAA,QAAQm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MvD,QAAQ,CAAC,+BAA+B;YAChDqD,6BAA6BC;YAC7B;QACF;IACF;IAEA,8DAA8D;IAC9D,IAAID,+BAA+B,CAAC,GAAG;QACrC,MAAME,QAAQP,gBAAgBR,MAAM,CAACa,4BAA4B;QACjEL,gBAAgBQ,OAAO,CAACD,KAAK,CAAC,EAAE;IAClC;IAEA,MAAME,SAAS;QACb,GAAGV,IAAI;QACPE,QAAQD;QACRI,UAAUD;IACZ;IACA,IAAI,CAAChD,WAAWsD,OAAOR,MAAM,CAACS,IAAI,CAAC5D,uBAAuB;QACxD,kDAAkD;QAClD2D,OAAOR,MAAM,GAAGQ,OAAOR,MAAM,CAAC1C,MAAM,CAACT;QACrC2D,OAAOL,QAAQ,GAAG,EAAE;IACtB;IACA,OAAOK;AACT","ignoreList":[0]} |
@@ -1,2 +0,1 @@ | ||
| import { warnOnce } from './utils/warn-once'; | ||
| import { getAssetToken, getDeploymentId } from './deployment-id'; | ||
@@ -280,2 +279,3 @@ import { getImageBlurSvg } from './image-blur-svg'; | ||
| if (process.env.NODE_ENV !== 'production') { | ||
| const { warnOnce } = require('./utils/warn-once'); | ||
| if (config.output === 'export' && isDefaultLoader && !unoptimized) { | ||
@@ -282,0 +282,0 @@ throw Object.defineProperty(new Error(`Image Optimization using the default loader is not compatible with \`{ output: 'export' }\`. |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../../src/shared/lib/get-img-props.ts"],"sourcesContent":["import { warnOnce } from './utils/warn-once'\nimport { getAssetToken, getDeploymentId } from './deployment-id'\nimport { getImageBlurSvg } from './image-blur-svg'\nimport { imageConfigDefault } from './image-config'\nimport type {\n ImageConfigComplete,\n ImageLoaderProps,\n ImageLoaderPropsWithConfig,\n} from './image-config'\n\nimport type { CSSProperties, JSX } from 'react'\n\nexport interface StaticImageData {\n src: string\n height: number\n width: number\n blurDataURL?: string\n blurWidth?: number\n blurHeight?: number\n}\n\nexport interface StaticRequire {\n default: StaticImageData\n}\n\nexport type StaticImport = StaticRequire | StaticImageData\n\nexport type ImageProps = Omit<\n JSX.IntrinsicElements['img'],\n 'src' | 'srcSet' | 'ref' | 'alt' | 'width' | 'height' | 'loading'\n> & {\n src: string | StaticImport\n alt: string\n width?: number | `${number}`\n height?: number | `${number}`\n fill?: boolean\n loader?: ImageLoader\n quality?: number | `${number}`\n preload?: boolean\n /**\n * @deprecated Use `preload` prop instead.\n * See https://nextjs.org/docs/app/api-reference/components/image#preload\n */\n priority?: boolean\n loading?: LoadingValue\n placeholder?: PlaceholderValue\n blurDataURL?: string\n unoptimized?: boolean\n overrideSrc?: string\n /**\n * @deprecated Use `onLoad` instead.\n * @see https://nextjs.org/docs/app/api-reference/components/image#onload\n */\n onLoadingComplete?: OnLoadingComplete\n /**\n * @deprecated Use `fill` prop instead of `layout=\"fill\"` or change import to `next/legacy/image`.\n * @see https://nextjs.org/docs/api-reference/next/legacy/image\n */\n layout?: string\n /**\n * @deprecated Use `style` prop instead.\n */\n objectFit?: string\n /**\n * @deprecated Use `style` prop instead.\n */\n objectPosition?: string\n /**\n * @deprecated This prop does not do anything.\n */\n lazyBoundary?: string\n /**\n * @deprecated This prop does not do anything.\n */\n lazyRoot?: string\n}\n\nexport type ImgProps = Omit<ImageProps, 'src' | 'loader'> & {\n loading: LoadingValue\n width: number | undefined\n height: number | undefined\n style: NonNullable<JSX.IntrinsicElements['img']['style']>\n sizes: string | undefined\n srcSet: string | undefined\n src: string\n}\n\nconst VALID_LOADING_VALUES = ['lazy', 'eager', undefined] as const\n\n// Object-fit values that are not valid background-size values\nconst INVALID_BACKGROUND_SIZE_VALUES = [\n '-moz-initial',\n 'fill',\n 'none',\n 'scale-down',\n undefined,\n]\ntype LoadingValue = (typeof VALID_LOADING_VALUES)[number]\ntype ImageConfig = ImageConfigComplete & {\n allSizes: number[]\n output?: 'standalone' | 'export'\n}\n\nexport type ImageLoader = (p: ImageLoaderProps) => string\n\n// Do not export - this is an internal type only\n// because `next.config.js` is only meant for the\n// built-in loaders, not for a custom loader() prop.\ntype ImageLoaderWithConfig = (p: ImageLoaderPropsWithConfig) => string\n\nexport type PlaceholderValue = 'blur' | 'empty' | `data:image/${string}`\nexport type OnLoad = React.ReactEventHandler<HTMLImageElement> | undefined\nexport type OnLoadingComplete = (img: HTMLImageElement) => void\n\nexport type PlaceholderStyle = Partial<\n Pick<\n CSSProperties,\n | 'backgroundSize'\n | 'backgroundPosition'\n | 'backgroundRepeat'\n | 'backgroundImage'\n >\n>\n\nfunction isStaticRequire(\n src: StaticRequire | StaticImageData\n): src is StaticRequire {\n return (src as StaticRequire).default !== undefined\n}\n\nfunction isStaticImageData(\n src: StaticRequire | StaticImageData\n): src is StaticImageData {\n return (src as StaticImageData).src !== undefined\n}\n\nfunction isStaticImport(src: string | StaticImport): src is StaticImport {\n return (\n !!src &&\n typeof src === 'object' &&\n (isStaticRequire(src as StaticImport) ||\n isStaticImageData(src as StaticImport))\n )\n}\n\nconst allImgs = new Map<\n string,\n { src: string; loading: LoadingValue; placeholder: PlaceholderValue }\n>()\nlet perfObserver: PerformanceObserver | undefined\n\nfunction getInt(x: unknown): number | undefined {\n if (typeof x === 'undefined') {\n return x\n }\n if (typeof x === 'number') {\n return Number.isFinite(x) ? x : NaN\n }\n if (typeof x === 'string' && /^[0-9]+$/.test(x)) {\n return parseInt(x, 10)\n }\n return NaN\n}\n\nfunction getWidths(\n { deviceSizes, allSizes }: ImageConfig,\n width: number | undefined,\n sizes: string | undefined\n): { widths: number[]; kind: 'w' | 'x' } {\n if (sizes) {\n // Find all the \"vw\" percent sizes used in the sizes prop\n const viewportWidthRe = /(^|\\s)(1?\\d?\\d)vw/g\n const percentSizes = []\n for (let match; (match = viewportWidthRe.exec(sizes)); match) {\n percentSizes.push(parseInt(match[2]))\n }\n if (percentSizes.length) {\n const smallestRatio = Math.min(...percentSizes) * 0.01\n return {\n widths: allSizes.filter((s) => s >= deviceSizes[0] * smallestRatio),\n kind: 'w',\n }\n }\n return { widths: allSizes, kind: 'w' }\n }\n if (typeof width !== 'number') {\n return { widths: deviceSizes, kind: 'w' }\n }\n\n const widths = [\n ...new Set(\n // > This means that most OLED screens that say they are 3x resolution,\n // > are actually 3x in the green color, but only 1.5x in the red and\n // > blue colors. Showing a 3x resolution image in the app vs a 2x\n // > resolution image will be visually the same, though the 3x image\n // > takes significantly more data. Even true 3x resolution screens are\n // > wasteful as the human eye cannot see that level of detail without\n // > something like a magnifying glass.\n // https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html\n [width, width * 2 /*, width * 3*/].map(\n (w) => allSizes.find((p) => p >= w) || allSizes[allSizes.length - 1]\n )\n ),\n ]\n return { widths, kind: 'x' }\n}\n\ntype GenImgAttrsData = {\n config: ImageConfig\n src: string\n unoptimized: boolean\n loader: ImageLoaderWithConfig\n width?: number\n quality?: number\n sizes?: string\n}\n\ntype GenImgAttrsResult = {\n src: string\n srcSet: string | undefined\n sizes: string | undefined\n}\n\nfunction generateImgAttrs({\n config,\n src,\n unoptimized,\n width,\n quality,\n sizes,\n loader,\n}: GenImgAttrsData): GenImgAttrsResult {\n if (unoptimized) {\n if (src.startsWith('/') && !src.startsWith('//')) {\n let deploymentId = getDeploymentId()\n if (src.includes('/_next/static/immutable') && !getAssetToken()) {\n // immutable static asset and supported by platform, don't add `?dpl=`\n deploymentId = undefined\n } else if (deploymentId) {\n // We unfortunately can't easily use `new URL()` here, because it normalizes the URL which causes\n // double-encoding with the `encodeURIComponent(src)` below\n const qIndex = src.indexOf('?')\n if (qIndex !== -1) {\n const params = new URLSearchParams(src.slice(qIndex + 1))\n const srcDpl = params.get('dpl')\n if (!srcDpl) {\n // src is missing the dpl parameter, but we have a deploymentId, so add it to the src URL\n params.append('dpl', deploymentId)\n src = src.slice(0, qIndex) + '?' + params.toString()\n }\n } else {\n // src is missing the dpl parameter, but we have a deploymentId, so add it to the src URL\n src = src + `?dpl=${deploymentId}`\n }\n }\n }\n return { src, srcSet: undefined, sizes: undefined }\n }\n\n const { widths, kind } = getWidths(config, width, sizes)\n const last = widths.length - 1\n\n return {\n sizes: !sizes && kind === 'w' ? '100vw' : sizes,\n srcSet: widths\n .map(\n (w, i) =>\n `${loader({ config, src, quality, width: w })} ${\n kind === 'w' ? w : i + 1\n }${kind}`\n )\n .join(', '),\n\n // It's intended to keep `src` the last attribute because React updates\n // attributes in order. If we keep `src` the first one, Safari will\n // immediately start to fetch `src`, before `sizes` and `srcSet` are even\n // updated by React. That causes multiple unnecessary requests if `srcSet`\n // and `sizes` are defined.\n // This bug cannot be reproduced in Chrome or Firefox.\n src: loader({ config, src, quality, width: widths[last] }),\n }\n}\n\n/**\n * A shared function, used on both client and server, to generate the props for <img>.\n */\nexport function getImgProps(\n {\n src,\n sizes,\n unoptimized = false,\n priority = false,\n preload = false,\n loading,\n className,\n quality,\n width,\n height,\n fill = false,\n style,\n overrideSrc,\n onLoad,\n onLoadingComplete,\n placeholder = 'empty',\n blurDataURL,\n fetchPriority,\n decoding = 'async',\n layout,\n objectFit,\n objectPosition,\n lazyBoundary,\n lazyRoot,\n ...rest\n }: ImageProps,\n _state: {\n defaultLoader: ImageLoaderWithConfig\n imgConf: ImageConfigComplete\n showAltText?: boolean\n blurComplete?: boolean\n }\n): {\n props: ImgProps\n meta: {\n unoptimized: boolean\n preload: boolean\n placeholder: NonNullable<ImageProps['placeholder']>\n fill: boolean\n }\n} {\n const { imgConf, showAltText, blurComplete, defaultLoader } = _state\n let config: ImageConfig\n let c = imgConf || imageConfigDefault\n if ('allSizes' in c) {\n config = c as ImageConfig\n } else {\n const allSizes = [...c.deviceSizes, ...c.imageSizes].sort((a, b) => a - b)\n const deviceSizes = c.deviceSizes.sort((a, b) => a - b)\n const qualities = c.qualities?.sort((a, b) => a - b)\n config = { ...c, allSizes, deviceSizes, qualities }\n }\n\n if (typeof defaultLoader === 'undefined') {\n throw new Error(\n 'images.loaderFile detected but the file is missing default export.\\nRead more: https://nextjs.org/docs/messages/invalid-images-config'\n )\n }\n let loader: ImageLoaderWithConfig = rest.loader || defaultLoader\n\n // Remove property so it's not spread on <img> element\n delete rest.loader\n delete (rest as any).srcSet\n\n // This special value indicates that the user\n // didn't define a \"loader\" prop or \"loader\" config.\n const isDefaultLoader = '__next_img_default' in loader\n\n if (isDefaultLoader) {\n if (config.loader === 'custom') {\n throw new Error(\n `Image with src \"${src}\" is missing \"loader\" prop.` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader`\n )\n }\n } else {\n // The user defined a \"loader\" prop or config.\n // Since the config object is internal only, we\n // must not pass it to the user-defined \"loader\".\n const customImageLoader = loader as ImageLoader\n loader = (obj) => {\n const { config: _, ...opts } = obj\n return customImageLoader(opts)\n }\n }\n\n if (layout) {\n if (layout === 'fill') {\n fill = true\n }\n const layoutToStyle: Record<string, Record<string, string> | undefined> = {\n intrinsic: { maxWidth: '100%', height: 'auto' },\n responsive: { width: '100%', height: 'auto' },\n }\n const layoutToSizes: Record<string, string | undefined> = {\n responsive: '100vw',\n fill: '100vw',\n }\n const layoutStyle = layoutToStyle[layout]\n if (layoutStyle) {\n style = { ...style, ...layoutStyle }\n }\n const layoutSizes = layoutToSizes[layout]\n if (layoutSizes && !sizes) {\n sizes = layoutSizes\n }\n }\n\n let staticSrc = ''\n let widthInt = getInt(width)\n let heightInt = getInt(height)\n let blurWidth: number | undefined\n let blurHeight: number | undefined\n if (isStaticImport(src)) {\n const staticImageData = isStaticRequire(src) ? src.default : src\n\n if (!staticImageData.src) {\n throw new Error(\n `An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(\n staticImageData\n )}`\n )\n }\n if (!staticImageData.height || !staticImageData.width) {\n throw new Error(\n `An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(\n staticImageData\n )}`\n )\n }\n\n blurWidth = staticImageData.blurWidth\n blurHeight = staticImageData.blurHeight\n blurDataURL = blurDataURL || staticImageData.blurDataURL\n staticSrc = staticImageData.src\n\n if (!fill) {\n if (!widthInt && !heightInt) {\n widthInt = staticImageData.width\n heightInt = staticImageData.height\n } else if (widthInt && !heightInt) {\n const ratio = widthInt / staticImageData.width\n heightInt = Math.round(staticImageData.height * ratio)\n } else if (!widthInt && heightInt) {\n const ratio = heightInt / staticImageData.height\n widthInt = Math.round(staticImageData.width * ratio)\n }\n }\n }\n src = typeof src === 'string' ? src : staticSrc\n\n let isLazy =\n !priority &&\n !preload &&\n (loading === 'lazy' || typeof loading === 'undefined')\n if (!src || src.startsWith('data:') || src.startsWith('blob:')) {\n // https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n unoptimized = true\n isLazy = false\n }\n if (config.unoptimized) {\n unoptimized = true\n }\n if (\n isDefaultLoader &&\n !config.dangerouslyAllowSVG &&\n src.split('?', 1)[0].endsWith('.svg')\n ) {\n // Special case to make svg serve as-is to avoid proxying\n // through the built-in Image Optimization API.\n unoptimized = true\n }\n\n const qualityInt = getInt(quality)\n\n if (process.env.NODE_ENV !== 'production') {\n if (config.output === 'export' && isDefaultLoader && !unoptimized) {\n throw new Error(\n `Image Optimization using the default loader is not compatible with \\`{ output: 'export' }\\`.\n Possible solutions:\n - Remove \\`{ output: 'export' }\\` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure \\`{ images: { unoptimized: true } }\\` in \\`next.config.js\\` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api`\n )\n }\n if (!src) {\n // React doesn't show the stack trace and there's\n // no `src` to help identify which image, so we\n // instead console.error(ref) during mount.\n unoptimized = true\n } else {\n if (fill) {\n if (width) {\n throw new Error(\n `Image with src \"${src}\" has both \"width\" and \"fill\" properties. Only one should be used.`\n )\n }\n if (height) {\n throw new Error(\n `Image with src \"${src}\" has both \"height\" and \"fill\" properties. Only one should be used.`\n )\n }\n if (style?.position && style.position !== 'absolute') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.position\" properties. Images with \"fill\" always use position absolute - it cannot be modified.`\n )\n }\n if (style?.width && style.width !== '100%') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.width\" properties. Images with \"fill\" always use width 100% - it cannot be modified.`\n )\n }\n if (style?.height && style.height !== '100%') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.height\" properties. Images with \"fill\" always use height 100% - it cannot be modified.`\n )\n }\n } else {\n if (typeof widthInt === 'undefined') {\n throw new Error(\n `Image with src \"${src}\" is missing required \"width\" property.`\n )\n } else if (isNaN(widthInt)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"width\" property. Expected a numeric value in pixels but received \"${width}\".`\n )\n }\n if (typeof heightInt === 'undefined') {\n throw new Error(\n `Image with src \"${src}\" is missing required \"height\" property.`\n )\n } else if (isNaN(heightInt)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"height\" property. Expected a numeric value in pixels but received \"${height}\".`\n )\n }\n // eslint-disable-next-line no-control-regex\n if (/^[\\x00-\\x20]/.test(src)) {\n throw new Error(\n `Image with src \"${src}\" cannot start with a space or control character. Use src.trimStart() to remove it or encodeURIComponent(src) to keep it.`\n )\n }\n // eslint-disable-next-line no-control-regex\n if (/[\\x00-\\x20]$/.test(src)) {\n throw new Error(\n `Image with src \"${src}\" cannot end with a space or control character. Use src.trimEnd() to remove it or encodeURIComponent(src) to keep it.`\n )\n }\n }\n }\n if (!VALID_LOADING_VALUES.includes(loading)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"loading\" property. Provided \"${loading}\" should be one of ${VALID_LOADING_VALUES.map(\n String\n ).join(',')}.`\n )\n }\n if (priority && loading === 'lazy') {\n throw new Error(\n `Image with src \"${src}\" has both \"priority\" and \"loading='lazy'\" properties. Only one should be used.`\n )\n }\n if (preload && loading === 'lazy') {\n throw new Error(\n `Image with src \"${src}\" has both \"preload\" and \"loading='lazy'\" properties. Only one should be used.`\n )\n }\n if (preload && priority) {\n throw new Error(\n `Image with src \"${src}\" has both \"preload\" and \"priority\" properties. Only \"preload\" should be used.`\n )\n }\n if (\n placeholder !== 'empty' &&\n placeholder !== 'blur' &&\n !placeholder.startsWith('data:image/')\n ) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"placeholder\" property \"${placeholder}\".`\n )\n }\n if (placeholder !== 'empty') {\n if (widthInt && heightInt && widthInt * heightInt < 1600) {\n warnOnce(\n `Image with src \"${src}\" is smaller than 40x40. Consider removing the \"placeholder\" property to improve performance.`\n )\n }\n }\n if (\n qualityInt &&\n config.qualities &&\n !config.qualities.includes(qualityInt)\n ) {\n warnOnce(\n `Image with src \"${src}\" is using quality \"${qualityInt}\" which is not configured in images.qualities [${config.qualities.join(', ')}]. Please update your config to [${[...config.qualities, qualityInt].sort().join(', ')}].` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-unconfigured-qualities`\n )\n }\n if (placeholder === 'blur' && !blurDataURL) {\n const VALID_BLUR_EXT = ['jpeg', 'png', 'webp', 'avif'] // should match next-image-loader\n\n throw new Error(\n `Image with src \"${src}\" has \"placeholder='blur'\" property but is missing the \"blurDataURL\" property.\n Possible solutions:\n - Add a \"blurDataURL\" property, the contents should be a small Data URL to represent the image\n - Change the \"src\" property to a static import with one of the supported file types: ${VALID_BLUR_EXT.join(\n ','\n )} (animated images not supported)\n - Remove the \"placeholder\" property, effectively no blur effect\n Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`\n )\n }\n if ('ref' in rest) {\n warnOnce(\n `Image with src \"${src}\" is using unsupported \"ref\" property. Consider using the \"onLoad\" property instead.`\n )\n }\n\n if (!unoptimized && !isDefaultLoader) {\n const urlStr = loader({\n config,\n src,\n width: widthInt || 400,\n quality: qualityInt || 75,\n })\n let url: URL | undefined\n try {\n url = new URL(urlStr)\n } catch (err) {}\n if (urlStr === src || (url && url.pathname === src && !url.search)) {\n warnOnce(\n `Image with src \"${src}\" has a \"loader\" property that does not implement width. Please implement it or use the \"unoptimized\" property instead.` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader-width`\n )\n }\n }\n\n if (onLoadingComplete) {\n warnOnce(\n `Image with src \"${src}\" is using deprecated \"onLoadingComplete\" property. Please use the \"onLoad\" property instead.`\n )\n }\n\n for (const [legacyKey, legacyValue] of Object.entries({\n layout,\n objectFit,\n objectPosition,\n lazyBoundary,\n lazyRoot,\n })) {\n if (legacyValue) {\n warnOnce(\n `Image with src \"${src}\" has legacy prop \"${legacyKey}\". Did you forget to run the codemod?` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`\n )\n }\n }\n\n if (\n typeof window !== 'undefined' &&\n !perfObserver &&\n window.PerformanceObserver\n ) {\n perfObserver = new PerformanceObserver((entryList) => {\n for (const entry of entryList.getEntries()) {\n // @ts-ignore - missing \"LargestContentfulPaint\" class with \"element\" prop\n const imgSrc = entry?.element?.src || ''\n const lcpImage = allImgs.get(imgSrc)\n if (\n lcpImage &&\n lcpImage.loading === 'lazy' &&\n lcpImage.placeholder === 'empty' &&\n !lcpImage.src.startsWith('data:') &&\n !lcpImage.src.startsWith('blob:')\n ) {\n // https://web.dev/lcp/#measure-lcp-in-javascript\n warnOnce(\n `Image with src \"${lcpImage.src}\" was detected as the Largest Contentful Paint (LCP). Please add the \\`loading=\"eager\"\\` property if this image is above the fold.` +\n `\\nRead more: https://nextjs.org/docs/app/api-reference/components/image#loading`\n )\n }\n }\n })\n try {\n perfObserver.observe({\n type: 'largest-contentful-paint',\n buffered: true,\n })\n } catch (err) {\n // Log error but don't crash the app\n console.error(err)\n }\n }\n }\n const imgStyle = Object.assign(\n fill\n ? {\n position: 'absolute',\n height: '100%',\n width: '100%',\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n objectFit,\n objectPosition,\n }\n : {},\n showAltText ? {} : { color: 'transparent' },\n style\n )\n\n const backgroundImage =\n !blurComplete && placeholder !== 'empty'\n ? placeholder === 'blur'\n ? `url(\"data:image/svg+xml;charset=utf-8,${getImageBlurSvg({\n widthInt,\n heightInt,\n blurWidth,\n blurHeight,\n blurDataURL: blurDataURL || '', // assume not undefined\n objectFit: imgStyle.objectFit,\n })}\")`\n : `url(\"${placeholder}\")` // assume `data:image/`\n : null\n\n const backgroundSize = !INVALID_BACKGROUND_SIZE_VALUES.includes(\n imgStyle.objectFit\n )\n ? imgStyle.objectFit\n : imgStyle.objectFit === 'fill'\n ? '100% 100%' // the background-size equivalent of `fill`\n : 'cover'\n\n let placeholderStyle: PlaceholderStyle = backgroundImage\n ? {\n backgroundSize,\n backgroundPosition: imgStyle.objectPosition || '50% 50%',\n backgroundRepeat: 'no-repeat',\n backgroundImage,\n }\n : {}\n\n if (process.env.NODE_ENV === 'development') {\n if (\n placeholderStyle.backgroundImage &&\n placeholder === 'blur' &&\n blurDataURL?.startsWith('/')\n ) {\n // During `next dev`, we don't want to generate blur placeholders with webpack\n // because it can delay starting the dev server. Instead, `next-image-loader.js`\n // will inline a special url to lazily generate the blur placeholder at request time.\n placeholderStyle.backgroundImage = `url(\"${blurDataURL}\")`\n }\n }\n\n const imgAttributes = generateImgAttrs({\n config,\n src,\n unoptimized,\n width: widthInt,\n quality: qualityInt,\n sizes,\n loader,\n })\n\n const loadingFinal = isLazy ? 'lazy' : loading\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined') {\n let fullUrl: URL\n try {\n fullUrl = new URL(imgAttributes.src)\n } catch (e) {\n fullUrl = new URL(imgAttributes.src, window.location.href)\n }\n allImgs.set(fullUrl.href, { src, loading: loadingFinal, placeholder })\n }\n }\n\n const props: ImgProps = {\n ...rest,\n loading: loadingFinal,\n fetchPriority,\n width: widthInt,\n height: heightInt,\n decoding,\n className,\n style: { ...imgStyle, ...placeholderStyle },\n sizes: imgAttributes.sizes,\n srcSet: imgAttributes.srcSet,\n src: overrideSrc || imgAttributes.src,\n }\n const meta = { unoptimized, preload: preload || priority, placeholder, fill }\n return { props, meta }\n}\n"],"names":["warnOnce","getAssetToken","getDeploymentId","getImageBlurSvg","imageConfigDefault","VALID_LOADING_VALUES","undefined","INVALID_BACKGROUND_SIZE_VALUES","isStaticRequire","src","default","isStaticImageData","isStaticImport","allImgs","Map","perfObserver","getInt","x","Number","isFinite","NaN","test","parseInt","getWidths","deviceSizes","allSizes","width","sizes","viewportWidthRe","percentSizes","match","exec","push","length","smallestRatio","Math","min","widths","filter","s","kind","Set","map","w","find","p","generateImgAttrs","config","unoptimized","quality","loader","startsWith","deploymentId","includes","qIndex","indexOf","params","URLSearchParams","slice","srcDpl","get","append","toString","srcSet","last","i","join","getImgProps","priority","preload","loading","className","height","fill","style","overrideSrc","onLoad","onLoadingComplete","placeholder","blurDataURL","fetchPriority","decoding","layout","objectFit","objectPosition","lazyBoundary","lazyRoot","rest","_state","imgConf","showAltText","blurComplete","defaultLoader","c","imageSizes","sort","a","b","qualities","Error","isDefaultLoader","customImageLoader","obj","_","opts","layoutToStyle","intrinsic","maxWidth","responsive","layoutToSizes","layoutStyle","layoutSizes","staticSrc","widthInt","heightInt","blurWidth","blurHeight","staticImageData","JSON","stringify","ratio","round","isLazy","dangerouslyAllowSVG","split","endsWith","qualityInt","process","env","NODE_ENV","output","position","isNaN","String","VALID_BLUR_EXT","urlStr","url","URL","err","pathname","search","legacyKey","legacyValue","Object","entries","window","PerformanceObserver","entryList","entry","getEntries","imgSrc","element","lcpImage","observe","type","buffered","console","error","imgStyle","assign","left","top","right","bottom","color","backgroundImage","backgroundSize","placeholderStyle","backgroundPosition","backgroundRepeat","imgAttributes","loadingFinal","fullUrl","e","location","href","set","props","meta"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,oBAAmB;AAC5C,SAASC,aAAa,EAAEC,eAAe,QAAQ,kBAAiB;AAChE,SAASC,eAAe,QAAQ,mBAAkB;AAClD,SAASC,kBAAkB,QAAQ,iBAAgB;AAoFnD,MAAMC,uBAAuB;IAAC;IAAQ;IAASC;CAAU;AAEzD,8DAA8D;AAC9D,MAAMC,iCAAiC;IACrC;IACA;IACA;IACA;IACAD;CACD;AA4BD,SAASE,gBACPC,GAAoC;IAEpC,OAAO,AAACA,IAAsBC,OAAO,KAA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AAW,aAAa;YACjC,IAAI2B;YACJ,IAAI;gBACFA,UAAU,IAAInC,IAAIiC,cAAcjK,GAAG;YACrC,EAAE,OAAOoK,GAAG;gBACVD,UAAU,IAAInC,IAAIiC,cAAcjK,GAAG,EAAEwI,OAAO6B,QAAQ,CAACC,IAAI;YAC3D;YACAlK,QAAQmK,GAAG,CAACJ,QAAQG,IAAI,EAAE;gBAAEtK;gBAAK6D,SAASqG;gBAAc7F;YAAY;QACtE;IACF;IAEA,MAAMmG,QAAkB;QACtB,GAAG1F,IAAI;QACPjB,SAASqG;QACT3F;QACAtD,OAAOuF;QACPzC,QAAQ0C;QACRjC;QACAV;QACAG,OAAO;YAAE,GAAGoF,QAAQ;YAAE,GAAGS,gBAAgB;QAAC;QAC1C5I,OAAO+I,cAAc/I,KAAK;QAC1BoC,QAAQ2G,cAAc3G,MAAM;QAC5BtD,KAAKkE,eAAe+F,cAAcjK,GAAG;IACvC;IACA,MAAMyK,OAAO;QAAElI;QAAaqB,SAASA,WAAWD;QAAUU;QAAaL;IAAK;IAC5E,OAAO;QAAEwG;QAAOC;IAAK;AACvB","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../../src/shared/lib/get-img-props.ts"],"sourcesContent":["import { getAssetToken, getDeploymentId } from './deployment-id'\nimport { getImageBlurSvg } from './image-blur-svg'\nimport { imageConfigDefault } from './image-config'\nimport type {\n ImageConfigComplete,\n ImageLoaderProps,\n ImageLoaderPropsWithConfig,\n} from './image-config'\n\nimport type { CSSProperties, JSX } from 'react'\n\nexport interface StaticImageData {\n src: string\n height: number\n width: number\n blurDataURL?: string\n blurWidth?: number\n blurHeight?: number\n}\n\nexport interface StaticRequire {\n default: StaticImageData\n}\n\nexport type StaticImport = StaticRequire | StaticImageData\n\nexport type ImageProps = Omit<\n JSX.IntrinsicElements['img'],\n 'src' | 'srcSet' | 'ref' | 'alt' | 'width' | 'height' | 'loading'\n> & {\n src: string | StaticImport\n alt: string\n width?: number | `${number}`\n height?: number | `${number}`\n fill?: boolean\n loader?: ImageLoader\n quality?: number | `${number}`\n preload?: boolean\n /**\n * @deprecated Use `preload` prop instead.\n * See https://nextjs.org/docs/app/api-reference/components/image#preload\n */\n priority?: boolean\n loading?: LoadingValue\n placeholder?: PlaceholderValue\n blurDataURL?: string\n unoptimized?: boolean\n overrideSrc?: string\n /**\n * @deprecated Use `onLoad` instead.\n * @see https://nextjs.org/docs/app/api-reference/components/image#onload\n */\n onLoadingComplete?: OnLoadingComplete\n /**\n * @deprecated Use `fill` prop instead of `layout=\"fill\"` or change import to `next/legacy/image`.\n * @see https://nextjs.org/docs/api-reference/next/legacy/image\n */\n layout?: string\n /**\n * @deprecated Use `style` prop instead.\n */\n objectFit?: string\n /**\n * @deprecated Use `style` prop instead.\n */\n objectPosition?: string\n /**\n * @deprecated This prop does not do anything.\n */\n lazyBoundary?: string\n /**\n * @deprecated This prop does not do anything.\n */\n lazyRoot?: string\n}\n\nexport type ImgProps = Omit<ImageProps, 'src' | 'loader'> & {\n loading: LoadingValue\n width: number | undefined\n height: number | undefined\n style: NonNullable<JSX.IntrinsicElements['img']['style']>\n sizes: string | undefined\n srcSet: string | undefined\n src: string\n}\n\nconst VALID_LOADING_VALUES = ['lazy', 'eager', undefined] as const\n\n// Object-fit values that are not valid background-size values\nconst INVALID_BACKGROUND_SIZE_VALUES = [\n '-moz-initial',\n 'fill',\n 'none',\n 'scale-down',\n undefined,\n]\ntype LoadingValue = (typeof VALID_LOADING_VALUES)[number]\ntype ImageConfig = ImageConfigComplete & {\n allSizes: number[]\n output?: 'standalone' | 'export'\n}\n\nexport type ImageLoader = (p: ImageLoaderProps) => string\n\n// Do not export - this is an internal type only\n// because `next.config.js` is only meant for the\n// built-in loaders, not for a custom loader() prop.\ntype ImageLoaderWithConfig = (p: ImageLoaderPropsWithConfig) => string\n\nexport type PlaceholderValue = 'blur' | 'empty' | `data:image/${string}`\nexport type OnLoad = React.ReactEventHandler<HTMLImageElement> | undefined\nexport type OnLoadingComplete = (img: HTMLImageElement) => void\n\nexport type PlaceholderStyle = Partial<\n Pick<\n CSSProperties,\n | 'backgroundSize'\n | 'backgroundPosition'\n | 'backgroundRepeat'\n | 'backgroundImage'\n >\n>\n\nfunction isStaticRequire(\n src: StaticRequire | StaticImageData\n): src is StaticRequire {\n return (src as StaticRequire).default !== undefined\n}\n\nfunction isStaticImageData(\n src: StaticRequire | StaticImageData\n): src is StaticImageData {\n return (src as StaticImageData).src !== undefined\n}\n\nfunction isStaticImport(src: string | StaticImport): src is StaticImport {\n return (\n !!src &&\n typeof src === 'object' &&\n (isStaticRequire(src as StaticImport) ||\n isStaticImageData(src as StaticImport))\n )\n}\n\nconst allImgs = new Map<\n string,\n { src: string; loading: LoadingValue; placeholder: PlaceholderValue }\n>()\nlet perfObserver: PerformanceObserver | undefined\n\nfunction getInt(x: unknown): number | undefined {\n if (typeof x === 'undefined') {\n return x\n }\n if (typeof x === 'number') {\n return Number.isFinite(x) ? x : NaN\n }\n if (typeof x === 'string' && /^[0-9]+$/.test(x)) {\n return parseInt(x, 10)\n }\n return NaN\n}\n\nfunction getWidths(\n { deviceSizes, allSizes }: ImageConfig,\n width: number | undefined,\n sizes: string | undefined\n): { widths: number[]; kind: 'w' | 'x' } {\n if (sizes) {\n // Find all the \"vw\" percent sizes used in the sizes prop\n const viewportWidthRe = /(^|\\s)(1?\\d?\\d)vw/g\n const percentSizes = []\n for (let match; (match = viewportWidthRe.exec(sizes)); match) {\n percentSizes.push(parseInt(match[2]))\n }\n if (percentSizes.length) {\n const smallestRatio = Math.min(...percentSizes) * 0.01\n return {\n widths: allSizes.filter((s) => s >= deviceSizes[0] * smallestRatio),\n kind: 'w',\n }\n }\n return { widths: allSizes, kind: 'w' }\n }\n if (typeof width !== 'number') {\n return { widths: deviceSizes, kind: 'w' }\n }\n\n const widths = [\n ...new Set(\n // > This means that most OLED screens that say they are 3x resolution,\n // > are actually 3x in the green color, but only 1.5x in the red and\n // > blue colors. Showing a 3x resolution image in the app vs a 2x\n // > resolution image will be visually the same, though the 3x image\n // > takes significantly more data. Even true 3x resolution screens are\n // > wasteful as the human eye cannot see that level of detail without\n // > something like a magnifying glass.\n // https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html\n [width, width * 2 /*, width * 3*/].map(\n (w) => allSizes.find((p) => p >= w) || allSizes[allSizes.length - 1]\n )\n ),\n ]\n return { widths, kind: 'x' }\n}\n\ntype GenImgAttrsData = {\n config: ImageConfig\n src: string\n unoptimized: boolean\n loader: ImageLoaderWithConfig\n width?: number\n quality?: number\n sizes?: string\n}\n\ntype GenImgAttrsResult = {\n src: string\n srcSet: string | undefined\n sizes: string | undefined\n}\n\nfunction generateImgAttrs({\n config,\n src,\n unoptimized,\n width,\n quality,\n sizes,\n loader,\n}: GenImgAttrsData): GenImgAttrsResult {\n if (unoptimized) {\n if (src.startsWith('/') && !src.startsWith('//')) {\n let deploymentId = getDeploymentId()\n if (src.includes('/_next/static/immutable') && !getAssetToken()) {\n // immutable static asset and supported by platform, don't add `?dpl=`\n deploymentId = undefined\n } else if (deploymentId) {\n // We unfortunately can't easily use `new URL()` here, because it normalizes the URL which causes\n // double-encoding with the `encodeURIComponent(src)` below\n const qIndex = src.indexOf('?')\n if (qIndex !== -1) {\n const params = new URLSearchParams(src.slice(qIndex + 1))\n const srcDpl = params.get('dpl')\n if (!srcDpl) {\n // src is missing the dpl parameter, but we have a deploymentId, so add it to the src URL\n params.append('dpl', deploymentId)\n src = src.slice(0, qIndex) + '?' + params.toString()\n }\n } else {\n // src is missing the dpl parameter, but we have a deploymentId, so add it to the src URL\n src = src + `?dpl=${deploymentId}`\n }\n }\n }\n return { src, srcSet: undefined, sizes: undefined }\n }\n\n const { widths, kind } = getWidths(config, width, sizes)\n const last = widths.length - 1\n\n return {\n sizes: !sizes && kind === 'w' ? '100vw' : sizes,\n srcSet: widths\n .map(\n (w, i) =>\n `${loader({ config, src, quality, width: w })} ${\n kind === 'w' ? w : i + 1\n }${kind}`\n )\n .join(', '),\n\n // It's intended to keep `src` the last attribute because React updates\n // attributes in order. If we keep `src` the first one, Safari will\n // immediately start to fetch `src`, before `sizes` and `srcSet` are even\n // updated by React. That causes multiple unnecessary requests if `srcSet`\n // and `sizes` are defined.\n // This bug cannot be reproduced in Chrome or Firefox.\n src: loader({ config, src, quality, width: widths[last] }),\n }\n}\n\n/**\n * A shared function, used on both client and server, to generate the props for <img>.\n */\nexport function getImgProps(\n {\n src,\n sizes,\n unoptimized = false,\n priority = false,\n preload = false,\n loading,\n className,\n quality,\n width,\n height,\n fill = false,\n style,\n overrideSrc,\n onLoad,\n onLoadingComplete,\n placeholder = 'empty',\n blurDataURL,\n fetchPriority,\n decoding = 'async',\n layout,\n objectFit,\n objectPosition,\n lazyBoundary,\n lazyRoot,\n ...rest\n }: ImageProps,\n _state: {\n defaultLoader: ImageLoaderWithConfig\n imgConf: ImageConfigComplete\n showAltText?: boolean\n blurComplete?: boolean\n }\n): {\n props: ImgProps\n meta: {\n unoptimized: boolean\n preload: boolean\n placeholder: NonNullable<ImageProps['placeholder']>\n fill: boolean\n }\n} {\n const { imgConf, showAltText, blurComplete, defaultLoader } = _state\n let config: ImageConfig\n let c = imgConf || imageConfigDefault\n if ('allSizes' in c) {\n config = c as ImageConfig\n } else {\n const allSizes = [...c.deviceSizes, ...c.imageSizes].sort((a, b) => a - b)\n const deviceSizes = c.deviceSizes.sort((a, b) => a - b)\n const qualities = c.qualities?.sort((a, b) => a - b)\n config = { ...c, allSizes, deviceSizes, qualities }\n }\n\n if (typeof defaultLoader === 'undefined') {\n throw new Error(\n 'images.loaderFile detected but the file is missing default export.\\nRead more: https://nextjs.org/docs/messages/invalid-images-config'\n )\n }\n let loader: ImageLoaderWithConfig = rest.loader || defaultLoader\n\n // Remove property so it's not spread on <img> element\n delete rest.loader\n delete (rest as any).srcSet\n\n // This special value indicates that the user\n // didn't define a \"loader\" prop or \"loader\" config.\n const isDefaultLoader = '__next_img_default' in loader\n\n if (isDefaultLoader) {\n if (config.loader === 'custom') {\n throw new Error(\n `Image with src \"${src}\" is missing \"loader\" prop.` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader`\n )\n }\n } else {\n // The user defined a \"loader\" prop or config.\n // Since the config object is internal only, we\n // must not pass it to the user-defined \"loader\".\n const customImageLoader = loader as ImageLoader\n loader = (obj) => {\n const { config: _, ...opts } = obj\n return customImageLoader(opts)\n }\n }\n\n if (layout) {\n if (layout === 'fill') {\n fill = true\n }\n const layoutToStyle: Record<string, Record<string, string> | undefined> = {\n intrinsic: { maxWidth: '100%', height: 'auto' },\n responsive: { width: '100%', height: 'auto' },\n }\n const layoutToSizes: Record<string, string | undefined> = {\n responsive: '100vw',\n fill: '100vw',\n }\n const layoutStyle = layoutToStyle[layout]\n if (layoutStyle) {\n style = { ...style, ...layoutStyle }\n }\n const layoutSizes = layoutToSizes[layout]\n if (layoutSizes && !sizes) {\n sizes = layoutSizes\n }\n }\n\n let staticSrc = ''\n let widthInt = getInt(width)\n let heightInt = getInt(height)\n let blurWidth: number | undefined\n let blurHeight: number | undefined\n if (isStaticImport(src)) {\n const staticImageData = isStaticRequire(src) ? src.default : src\n\n if (!staticImageData.src) {\n throw new Error(\n `An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(\n staticImageData\n )}`\n )\n }\n if (!staticImageData.height || !staticImageData.width) {\n throw new Error(\n `An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(\n staticImageData\n )}`\n )\n }\n\n blurWidth = staticImageData.blurWidth\n blurHeight = staticImageData.blurHeight\n blurDataURL = blurDataURL || staticImageData.blurDataURL\n staticSrc = staticImageData.src\n\n if (!fill) {\n if (!widthInt && !heightInt) {\n widthInt = staticImageData.width\n heightInt = staticImageData.height\n } else if (widthInt && !heightInt) {\n const ratio = widthInt / staticImageData.width\n heightInt = Math.round(staticImageData.height * ratio)\n } else if (!widthInt && heightInt) {\n const ratio = heightInt / staticImageData.height\n widthInt = Math.round(staticImageData.width * ratio)\n }\n }\n }\n src = typeof src === 'string' ? src : staticSrc\n\n let isLazy =\n !priority &&\n !preload &&\n (loading === 'lazy' || typeof loading === 'undefined')\n if (!src || src.startsWith('data:') || src.startsWith('blob:')) {\n // https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n unoptimized = true\n isLazy = false\n }\n if (config.unoptimized) {\n unoptimized = true\n }\n if (\n isDefaultLoader &&\n !config.dangerouslyAllowSVG &&\n src.split('?', 1)[0].endsWith('.svg')\n ) {\n // Special case to make svg serve as-is to avoid proxying\n // through the built-in Image Optimization API.\n unoptimized = true\n }\n\n const qualityInt = getInt(quality)\n\n if (process.env.NODE_ENV !== 'production') {\n const { warnOnce } =\n require('./utils/warn-once') as typeof import('./utils/warn-once')\n if (config.output === 'export' && isDefaultLoader && !unoptimized) {\n throw new Error(\n `Image Optimization using the default loader is not compatible with \\`{ output: 'export' }\\`.\n Possible solutions:\n - Remove \\`{ output: 'export' }\\` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure \\`{ images: { unoptimized: true } }\\` in \\`next.config.js\\` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api`\n )\n }\n if (!src) {\n // React doesn't show the stack trace and there's\n // no `src` to help identify which image, so we\n // instead console.error(ref) during mount.\n unoptimized = true\n } else {\n if (fill) {\n if (width) {\n throw new Error(\n `Image with src \"${src}\" has both \"width\" and \"fill\" properties. Only one should be used.`\n )\n }\n if (height) {\n throw new Error(\n `Image with src \"${src}\" has both \"height\" and \"fill\" properties. Only one should be used.`\n )\n }\n if (style?.position && style.position !== 'absolute') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.position\" properties. Images with \"fill\" always use position absolute - it cannot be modified.`\n )\n }\n if (style?.width && style.width !== '100%') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.width\" properties. Images with \"fill\" always use width 100% - it cannot be modified.`\n )\n }\n if (style?.height && style.height !== '100%') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.height\" properties. Images with \"fill\" always use height 100% - it cannot be modified.`\n )\n }\n } else {\n if (typeof widthInt === 'undefined') {\n throw new Error(\n `Image with src \"${src}\" is missing required \"width\" property.`\n )\n } else if (isNaN(widthInt)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"width\" property. Expected a numeric value in pixels but received \"${width}\".`\n )\n }\n if (typeof heightInt === 'undefined') {\n throw new Error(\n `Image with src \"${src}\" is missing required \"height\" property.`\n )\n } else if (isNaN(heightInt)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"height\" property. Expected a numeric value in pixels but received \"${height}\".`\n )\n }\n // eslint-disable-next-line no-control-regex\n if (/^[\\x00-\\x20]/.test(src)) {\n throw new Error(\n `Image with src \"${src}\" cannot start with a space or control character. Use src.trimStart() to remove it or encodeURIComponent(src) to keep it.`\n )\n }\n // eslint-disable-next-line no-control-regex\n if (/[\\x00-\\x20]$/.test(src)) {\n throw new Error(\n `Image with src \"${src}\" cannot end with a space or control character. Use src.trimEnd() to remove it or encodeURIComponent(src) to keep it.`\n )\n }\n }\n }\n if (!VALID_LOADING_VALUES.includes(loading)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"loading\" property. Provided \"${loading}\" should be one of ${VALID_LOADING_VALUES.map(\n String\n ).join(',')}.`\n )\n }\n if (priority && loading === 'lazy') {\n throw new Error(\n `Image with src \"${src}\" has both \"priority\" and \"loading='lazy'\" properties. Only one should be used.`\n )\n }\n if (preload && loading === 'lazy') {\n throw new Error(\n `Image with src \"${src}\" has both \"preload\" and \"loading='lazy'\" properties. Only one should be used.`\n )\n }\n if (preload && priority) {\n throw new Error(\n `Image with src \"${src}\" has both \"preload\" and \"priority\" properties. Only \"preload\" should be used.`\n )\n }\n if (\n placeholder !== 'empty' &&\n placeholder !== 'blur' &&\n !placeholder.startsWith('data:image/')\n ) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"placeholder\" property \"${placeholder}\".`\n )\n }\n if (placeholder !== 'empty') {\n if (widthInt && heightInt && widthInt * heightInt < 1600) {\n warnOnce(\n `Image with src \"${src}\" is smaller than 40x40. Consider removing the \"placeholder\" property to improve performance.`\n )\n }\n }\n if (\n qualityInt &&\n config.qualities &&\n !config.qualities.includes(qualityInt)\n ) {\n warnOnce(\n `Image with src \"${src}\" is using quality \"${qualityInt}\" which is not configured in images.qualities [${config.qualities.join(', ')}]. Please update your config to [${[...config.qualities, qualityInt].sort().join(', ')}].` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-unconfigured-qualities`\n )\n }\n if (placeholder === 'blur' && !blurDataURL) {\n const VALID_BLUR_EXT = ['jpeg', 'png', 'webp', 'avif'] // should match next-image-loader\n\n throw new Error(\n `Image with src \"${src}\" has \"placeholder='blur'\" property but is missing the \"blurDataURL\" property.\n Possible solutions:\n - Add a \"blurDataURL\" property, the contents should be a small Data URL to represent the image\n - Change the \"src\" property to a static import with one of the supported file types: ${VALID_BLUR_EXT.join(\n ','\n )} (animated images not supported)\n - Remove the \"placeholder\" property, effectively no blur effect\n Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`\n )\n }\n if ('ref' in rest) {\n warnOnce(\n `Image with src \"${src}\" is using unsupported \"ref\" property. Consider using the \"onLoad\" property instead.`\n )\n }\n\n if (!unoptimized && !isDefaultLoader) {\n const urlStr = loader({\n config,\n src,\n width: widthInt || 400,\n quality: qualityInt || 75,\n })\n let url: URL | undefined\n try {\n url = new URL(urlStr)\n } catch (err) {}\n if (urlStr === src || (url && url.pathname === src && !url.search)) {\n warnOnce(\n `Image with src \"${src}\" has a \"loader\" property that does not implement width. Please implement it or use the \"unoptimized\" property instead.` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader-width`\n )\n }\n }\n\n if (onLoadingComplete) {\n warnOnce(\n `Image with src \"${src}\" is using deprecated \"onLoadingComplete\" property. Please use the \"onLoad\" property instead.`\n )\n }\n\n for (const [legacyKey, legacyValue] of Object.entries({\n layout,\n objectFit,\n objectPosition,\n lazyBoundary,\n lazyRoot,\n })) {\n if (legacyValue) {\n warnOnce(\n `Image with src \"${src}\" has legacy prop \"${legacyKey}\". Did you forget to run the codemod?` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`\n )\n }\n }\n\n if (\n typeof window !== 'undefined' &&\n !perfObserver &&\n window.PerformanceObserver\n ) {\n perfObserver = new PerformanceObserver((entryList) => {\n for (const entry of entryList.getEntries()) {\n // @ts-ignore - missing \"LargestContentfulPaint\" class with \"element\" prop\n const imgSrc = entry?.element?.src || ''\n const lcpImage = allImgs.get(imgSrc)\n if (\n lcpImage &&\n lcpImage.loading === 'lazy' &&\n lcpImage.placeholder === 'empty' &&\n !lcpImage.src.startsWith('data:') &&\n !lcpImage.src.startsWith('blob:')\n ) {\n // https://web.dev/lcp/#measure-lcp-in-javascript\n warnOnce(\n `Image with src \"${lcpImage.src}\" was detected as the Largest Contentful Paint (LCP). Please add the \\`loading=\"eager\"\\` property if this image is above the fold.` +\n `\\nRead more: https://nextjs.org/docs/app/api-reference/components/image#loading`\n )\n }\n }\n })\n try {\n perfObserver.observe({\n type: 'largest-contentful-paint',\n buffered: true,\n })\n } catch (err) {\n // Log error but don't crash the app\n console.error(err)\n }\n }\n }\n const imgStyle = Object.assign(\n fill\n ? {\n position: 'absolute',\n height: '100%',\n width: '100%',\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n objectFit,\n objectPosition,\n }\n : {},\n showAltText ? {} : { color: 'transparent' },\n style\n )\n\n const backgroundImage =\n !blurComplete && placeholder !== 'empty'\n ? placeholder === 'blur'\n ? `url(\"data:image/svg+xml;charset=utf-8,${getImageBlurSvg({\n widthInt,\n heightInt,\n blurWidth,\n blurHeight,\n blurDataURL: blurDataURL || '', // assume not undefined\n objectFit: imgStyle.objectFit,\n })}\")`\n : `url(\"${placeholder}\")` // assume `data:image/`\n : null\n\n const backgroundSize = !INVALID_BACKGROUND_SIZE_VALUES.includes(\n imgStyle.objectFit\n )\n ? imgStyle.objectFit\n : imgStyle.objectFit === 'fill'\n ? '100% 100%' // the background-size equivalent of `fill`\n : 'cover'\n\n let placeholderStyle: PlaceholderStyle = backgroundImage\n ? {\n backgroundSize,\n backgroundPosition: imgStyle.objectPosition || '50% 50%',\n backgroundRepeat: 'no-repeat',\n backgroundImage,\n }\n : {}\n\n if (process.env.NODE_ENV === 'development') {\n if (\n placeholderStyle.backgroundImage &&\n placeholder === 'blur' &&\n blurDataURL?.startsWith('/')\n ) {\n // During `next dev`, we don't want to generate blur placeholders with webpack\n // because it can delay starting the dev server. Instead, `next-image-loader.js`\n // will inline a special url to lazily generate the blur placeholder at request time.\n placeholderStyle.backgroundImage = `url(\"${blurDataURL}\")`\n }\n }\n\n const imgAttributes = generateImgAttrs({\n config,\n src,\n unoptimized,\n width: widthInt,\n quality: qualityInt,\n sizes,\n loader,\n })\n\n const loadingFinal = isLazy ? 'lazy' : loading\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined') {\n let fullUrl: URL\n try {\n fullUrl = new URL(imgAttributes.src)\n } catch (e) {\n fullUrl = new URL(imgAttributes.src, window.location.href)\n }\n allImgs.set(fullUrl.href, { src, loading: loadingFinal, placeholder })\n }\n }\n\n const props: ImgProps = {\n ...rest,\n loading: loadingFinal,\n fetchPriority,\n width: widthInt,\n height: heightInt,\n decoding,\n className,\n style: { ...imgStyle, ...placeholderStyle },\n sizes: imgAttributes.sizes,\n srcSet: imgAttributes.srcSet,\n src: overrideSrc || imgAttributes.src,\n }\n const meta = { unoptimized, preload: preload || priority, placeholder, fill }\n return { props, meta }\n}\n"],"names":["getAssetToken","getDeploymentId","getImageBlurSvg","imageConfigDefault","VALID_LOADING_VALUES","undefined","INVALID_BACKGROUND_SIZE_VALUES","isStaticRequire","src","default","isStaticImageData","isStaticImport","allImgs","Map","perfObserver","getInt","x","Number","isFinite","NaN","test","parseInt","getWidths","deviceSizes","allSizes","width","sizes","viewportWidthRe","percentSizes","match","exec","push","length","smallestRatio","Math","min","widths","filter","s","kind","Set","map","w","find","p","generateImgAttrs","config","unoptimized","quality","loader","startsWith","deploymentId","includes","qIndex","indexOf","params","URLSearchParams","slice","srcDpl","get","append","toString","srcSet","last","i","join","getImgProps","priority","preload","loading","className","height","fill","style","overrideSrc","onLoad","onLoadingComplete","placeholder","blurDataURL","fetchPriority","decoding","layout","objectFit","objectPosition","lazyBoundary","lazyRoot","rest","_state","imgConf","showAltText","blurComplete","defaultLoader","c","imageSizes","sort","a","b","qualities","Error","isDefaultLoader","customImageLoader","obj","_","opts","layoutToStyle","intrinsic","maxWidth","responsive","layoutToSizes","layoutStyle","layoutSizes","staticSrc","widthInt","heightInt","blurWidth","blurHeight","staticImageData","JSON","stringify","ratio","round","isLazy","dangerouslyAllowSVG","split","endsWith","qualityInt","process","env","NODE_ENV","warnOnce","require","output","position","isNaN","String","VALID_BLUR_EXT","urlStr","url","URL","err","pathname","search","legacyKey","legacyValue","Object","entries","window","PerformanceObserver","entryList","entry","getEntries","imgSrc","element","lcpImage","observe","type","buffered","console","error","imgStyle","assign","left","top","right","bottom","color","backgroundImage","backgroundSize","placeholderStyle","backgroundPosition","backgroundRepeat","imgAttributes","loadingFinal","fullUrl","e","location","href","set","props","meta"],"mappings":"AAAA,SAASA,aAAa,EAAEC,eAAe,QAAQ,kBAAiB;AAChE,SAASC,eAAe,QAAQ,mBAAkB;AAClD,SAASC,kBAAkB,QAAQ,iBAAgB;AAoFnD,MAAMC,uBAAuB;IAAC;IAAQ;IAASC;CAAU;AAEzD,8DAA8D;AAC9D,MAAMC,iCAAiC;IACrC;IACA;IACA;IACA;IACAD;CACD;AA4BD,SAASE,gBACPC,GAAoC;IAEpC,OAAO,AAACA,IAAsBC,OAAO,KAAKJ;AAC5C;AAEA,SAASK,kBACPF,GAAoC;IAEpC,OAAO,AAACA,IAAwBA,GAAG,KAAKH;AAC1C;AAEA,SAASM,eAAeH,GAA0B;IAChD,OACE,CAAC,CAACA,OACF,OAAOA,QAAQ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K,GAAG;gBACVD,UAAU,IAAInC,IAAIiC,cAAcnK,GAAG,EAAE0I,OAAO6B,QAAQ,CAACC,IAAI;YAC3D;YACApK,QAAQqK,GAAG,CAACJ,QAAQG,IAAI,EAAE;gBAAExK;gBAAK6D,SAASuG;gBAAc/F;YAAY;QACtE;IACF;IAEA,MAAMqG,QAAkB;QACtB,GAAG5F,IAAI;QACPjB,SAASuG;QACT7F;QACAtD,OAAOuF;QACPzC,QAAQ0C;QACRjC;QACAV;QACAG,OAAO;YAAE,GAAGsF,QAAQ;YAAE,GAAGS,gBAAgB;QAAC;QAC1C9I,OAAOiJ,cAAcjJ,KAAK;QAC1BoC,QAAQ6G,cAAc7G,MAAM;QAC5BtD,KAAKkE,eAAeiG,cAAcnK,GAAG;IACvC;IACA,MAAM2K,OAAO;QAAEpI;QAAaqB,SAASA,WAAWD;QAAUU;QAAaL;IAAK;IAC5E,OAAO;QAAE0G;QAAOC;IAAK;AACvB","ignoreList":[0]} |
@@ -6,3 +6,2 @@ 'use client'; | ||
| import { HeadManagerContext } from './head-manager-context.shared-runtime'; | ||
| import { warnOnce } from './utils/warn-once'; | ||
| export function defaultHead() { | ||
@@ -109,2 +108,3 @@ const head = [ | ||
| if (process.env.NODE_ENV === 'development') { | ||
| const { warnOnce } = require('./utils/warn-once'); | ||
| // omit JSON-LD structured data snippets from the warning | ||
@@ -111,0 +111,0 @@ if (c.type === 'script' && c.props['type'] !== 'application/ld+json') { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../../src/shared/lib/head.tsx"],"sourcesContent":["'use client'\n\nimport React, { useContext, type JSX } from 'react'\nimport Effect from './side-effect'\nimport { HeadManagerContext } from './head-manager-context.shared-runtime'\nimport { warnOnce } from './utils/warn-once'\n\nexport function defaultHead(): JSX.Element[] {\n const head = [\n <meta charSet=\"utf-8\" key=\"charset\" />,\n <meta name=\"viewport\" content=\"width=device-width\" key=\"viewport\" />,\n ]\n return head\n}\n\nfunction onlyReactElement(\n list: Array<React.ReactElement<any>>,\n child: React.ReactElement | number | string\n): Array<React.ReactElement<any>> {\n // React children can be \"string\" or \"number\" in this case we ignore them for backwards compat\n if (typeof child === 'string' || typeof child === 'number') {\n return list\n }\n // Adds support for React.Fragment\n if (child.type === React.Fragment) {\n return list.concat(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n React.Children.toArray(child.props.children).reduce(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n (\n fragmentList: Array<React.ReactElement<any>>,\n fragmentChild: React.ReactElement | number | string\n ): Array<React.ReactElement<any>> => {\n if (\n typeof fragmentChild === 'string' ||\n typeof fragmentChild === 'number'\n ) {\n return fragmentList\n }\n return fragmentList.concat(fragmentChild)\n },\n []\n )\n )\n }\n return list.concat(child)\n}\n\nconst METATYPES = ['name', 'httpEquiv', 'charSet', 'itemProp']\n\n/*\n returns a function for filtering head child elements\n which shouldn't be duplicated, like <title/>\n Also adds support for deduplicated `key` properties\n*/\nfunction unique() {\n const keys = new Set()\n const tags = new Set()\n const metaTypes = new Set()\n const metaCategories: { [metatype: string]: Set<string> } = {}\n\n return (h: React.ReactElement<any>) => {\n let isUnique = true\n let hasKey = false\n\n if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {\n hasKey = true\n const key = h.key.slice(h.key.indexOf('$') + 1)\n if (keys.has(key)) {\n isUnique = false\n } else {\n keys.add(key)\n }\n }\n\n switch (h.type) {\n case 'title':\n case 'base':\n if (tags.has(h.type)) {\n isUnique = false\n } else {\n tags.add(h.type)\n }\n break\n case 'meta':\n for (let i = 0, len = METATYPES.length; i < len; i++) {\n const metatype = METATYPES[i]\n if (!h.props.hasOwnProperty(metatype)) continue\n\n if (metatype === 'charSet') {\n if (metaTypes.has(metatype)) {\n isUnique = false\n } else {\n metaTypes.add(metatype)\n }\n } else {\n const category = h.props[metatype]\n const categories = metaCategories[metatype] || new Set()\n if ((metatype !== 'name' || !hasKey) && categories.has(category)) {\n isUnique = false\n } else {\n categories.add(category)\n metaCategories[metatype] = categories\n }\n }\n }\n break\n default:\n break\n }\n\n return isUnique\n }\n}\n\n/**\n *\n * @param headChildrenElements List of children of <Head>\n */\nfunction reduceComponents(\n headChildrenElements: Array<React.ReactElement<any>>\n) {\n return headChildrenElements\n .reduce(onlyReactElement, [])\n .reverse()\n .concat(defaultHead().reverse())\n .filter(unique())\n .reverse()\n .map((c: React.ReactElement<any>, i: number) => {\n const key = c.key || i\n if (process.env.NODE_ENV === 'development') {\n // omit JSON-LD structured data snippets from the warning\n if (c.type === 'script' && c.props['type'] !== 'application/ld+json') {\n const srcMessage = c.props['src']\n ? `<script> tag with src=\"${c.props['src']}\"`\n : `inline <script>`\n warnOnce(\n `Do not add <script> tags using next/head (see ${srcMessage}). Use next/script instead. \\nSee more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`\n )\n } else if (c.type === 'link' && c.props['rel'] === 'stylesheet') {\n warnOnce(\n `Do not add stylesheets using next/head (see <link rel=\"stylesheet\"> tag with href=\"${c.props['href']}\"). Use Document instead. \\nSee more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`\n )\n }\n }\n return React.cloneElement(c, { key })\n })\n}\n\n/**\n * This component injects elements to `<head>` of your page.\n * To avoid duplicated `tags` in `<head>` you can use the `key` property, which will make sure every tag is only rendered once.\n */\nfunction Head({ children }: { children: React.ReactNode }) {\n const headManager = useContext(HeadManagerContext)\n return (\n <Effect\n reduceComponentsToState={reduceComponents}\n headManager={headManager}\n >\n {children}\n </Effect>\n )\n}\n\nexport default Head\n"],"names":["React","useContext","Effect","HeadManagerContext","warnOnce","defaultHead","head","meta","charSet","name","content","onlyReactElement","list","child","type","Fragment","concat","Children","toArray","props","children","reduce","fragmentList","fragmentChild","METATYPES","unique","keys","Set","tags","metaTypes","metaCategories","h","isUnique","hasKey","key","indexOf","slice","has","add","i","len","length","metatype","hasOwnProperty","category","categories","reduceComponents","headChildrenElements","reverse","filter","map","c","process","env","NODE_ENV","srcMessage","cloneElement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,MAAMiB,EAAEjB,GAAG,IAAIK;QACrB,IAAIa,QAAQC,GAAG,CAACC,QAAQ,KAAK,eAAe;YAC1C,yDAAyD;YACzD,IAAIH,EAAErC,IAAI,KAAK,YAAYqC,EAAEhC,KAAK,CAAC,OAAO,KAAK,uBAAuB;gBACpE,MAAMoC,aAAaJ,EAAEhC,KAAK,CAAC,MAAM,GAC7B,CAAC,uBAAuB,EAAEgC,EAAEhC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAC3C,CAAC,eAAe,CAAC;gBACrBf,SACE,CAAC,8CAA8C,EAAEmD,WAAW,mHAAmH,CAAC;YAEpL,OAAO,IAAIJ,EAAErC,IAAI,KAAK,UAAUqC,EAAEhC,KAAK,CAAC,MAAM,KAAK,cAAc;gBAC/Df,SACE,CAAC,mFAAmF,EAAE+C,EAAEhC,KAAK,CAAC,OAAO,CAAC,iHAAiH,CAAC;YAE5N;QACF;QACA,qBAAOnB,MAAMwD,YAAY,CAACL,GAAG;YAAEjB;QAAI;IACrC;AACJ;AAEA;;;CAGC,GACD,SAASuB,KAAK,EAAErC,QAAQ,EAAiC;IACvD,MAAMsC,cAAczD,WAAWE;IAC/B,qBACE,KAACD;QACCyD,yBAAyBb;QACzBY,aAAaA;kBAEZtC;;AAGP;AAEA,eAAeqC,KAAI","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../../src/shared/lib/head.tsx"],"sourcesContent":["'use client'\n\nimport React, { useContext, type JSX } from 'react'\nimport Effect from './side-effect'\nimport { HeadManagerContext } from './head-manager-context.shared-runtime'\n\nexport function defaultHead(): JSX.Element[] {\n const head = [\n <meta charSet=\"utf-8\" key=\"charset\" />,\n <meta name=\"viewport\" content=\"width=device-width\" key=\"viewport\" />,\n ]\n return head\n}\n\nfunction onlyReactElement(\n list: Array<React.ReactElement<any>>,\n child: React.ReactElement | number | string\n): Array<React.ReactElement<any>> {\n // React children can be \"string\" or \"number\" in this case we ignore them for backwards compat\n if (typeof child === 'string' || typeof child === 'number') {\n return list\n }\n // Adds support for React.Fragment\n if (child.type === React.Fragment) {\n return list.concat(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n React.Children.toArray(child.props.children).reduce(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n (\n fragmentList: Array<React.ReactElement<any>>,\n fragmentChild: React.ReactElement | number | string\n ): Array<React.ReactElement<any>> => {\n if (\n typeof fragmentChild === 'string' ||\n typeof fragmentChild === 'number'\n ) {\n return fragmentList\n }\n return fragmentList.concat(fragmentChild)\n },\n []\n )\n )\n }\n return list.concat(child)\n}\n\nconst METATYPES = ['name', 'httpEquiv', 'charSet', 'itemProp']\n\n/*\n returns a function for filtering head child elements\n which shouldn't be duplicated, like <title/>\n Also adds support for deduplicated `key` properties\n*/\nfunction unique() {\n const keys = new Set()\n const tags = new Set()\n const metaTypes = new Set()\n const metaCategories: { [metatype: string]: Set<string> } = {}\n\n return (h: React.ReactElement<any>) => {\n let isUnique = true\n let hasKey = false\n\n if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {\n hasKey = true\n const key = h.key.slice(h.key.indexOf('$') + 1)\n if (keys.has(key)) {\n isUnique = false\n } else {\n keys.add(key)\n }\n }\n\n switch (h.type) {\n case 'title':\n case 'base':\n if (tags.has(h.type)) {\n isUnique = false\n } else {\n tags.add(h.type)\n }\n break\n case 'meta':\n for (let i = 0, len = METATYPES.length; i < len; i++) {\n const metatype = METATYPES[i]\n if (!h.props.hasOwnProperty(metatype)) continue\n\n if (metatype === 'charSet') {\n if (metaTypes.has(metatype)) {\n isUnique = false\n } else {\n metaTypes.add(metatype)\n }\n } else {\n const category = h.props[metatype]\n const categories = metaCategories[metatype] || new Set()\n if ((metatype !== 'name' || !hasKey) && categories.has(category)) {\n isUnique = false\n } else {\n categories.add(category)\n metaCategories[metatype] = categories\n }\n }\n }\n break\n default:\n break\n }\n\n return isUnique\n }\n}\n\n/**\n *\n * @param headChildrenElements List of children of <Head>\n */\nfunction reduceComponents(\n headChildrenElements: Array<React.ReactElement<any>>\n) {\n return headChildrenElements\n .reduce(onlyReactElement, [])\n .reverse()\n .concat(defaultHead().reverse())\n .filter(unique())\n .reverse()\n .map((c: React.ReactElement<any>, i: number) => {\n const key = c.key || i\n if (process.env.NODE_ENV === 'development') {\n const { warnOnce } =\n require('./utils/warn-once') as typeof import('./utils/warn-once')\n // omit JSON-LD structured data snippets from the warning\n if (c.type === 'script' && c.props['type'] !== 'application/ld+json') {\n const srcMessage = c.props['src']\n ? `<script> tag with src=\"${c.props['src']}\"`\n : `inline <script>`\n warnOnce(\n `Do not add <script> tags using next/head (see ${srcMessage}). Use next/script instead. \\nSee more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`\n )\n } else if (c.type === 'link' && c.props['rel'] === 'stylesheet') {\n warnOnce(\n `Do not add stylesheets using next/head (see <link rel=\"stylesheet\"> tag with href=\"${c.props['href']}\"). Use Document instead. \\nSee more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`\n )\n }\n }\n return React.cloneElement(c, { key })\n })\n}\n\n/**\n * This component injects elements to `<head>` of your page.\n * To avoid duplicated `tags` in `<head>` you can use the `key` property, which will make sure every tag is only rendered once.\n */\nfunction Head({ children }: { children: React.ReactNode }) {\n const headManager = useContext(HeadManagerContext)\n return (\n <Effect\n reduceComponentsToState={reduceComponents}\n headManager={headManager}\n >\n {children}\n </Effect>\n )\n}\n\nexport default Head\n"],"names":["React","useContext","Effect","HeadManagerContext","defaultHead","head","meta","charSet","name","content","onlyReactElement","list","child","type","Fragment","concat","Children","toArray","props","children","reduce","fragmentList","fragmentChild","METATYPES","unique","keys","Set","tags","metaTypes","metaCategories","h","isUnique","hasKey","key","indexOf","slice","has","add","i","len","length","metatype","hasOwnProperty","category","categories","reduceComponents","headChildrenElements","reverse","filter","map","c","process","env","NODE_ENV","warnOnce","require","srcMessage","cloneElement","Head","headManager","reduceComponentsToState"],"mappings":"AAAA;;AAEA,OAAOA,SAASC,UAAU,QAAkB,QA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,EAAE,GAChBC,QAAQ;YACV,yDAAyD;YACzD,IAAIL,EAAErC,IAAI,KAAK,YAAYqC,EAAEhC,KAAK,CAAC,OAAO,KAAK,uBAAuB;gBACpE,MAAMsC,aAAaN,EAAEhC,KAAK,CAAC,MAAM,GAC7B,CAAC,uBAAuB,EAAEgC,EAAEhC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAC3C,CAAC,eAAe,CAAC;gBACrBoC,SACE,CAAC,8CAA8C,EAAEE,WAAW,mHAAmH,CAAC;YAEpL,OAAO,IAAIN,EAAErC,IAAI,KAAK,UAAUqC,EAAEhC,KAAK,CAAC,MAAM,KAAK,cAAc;gBAC/DoC,SACE,CAAC,mFAAmF,EAAEJ,EAAEhC,KAAK,CAAC,OAAO,CAAC,iHAAiH,CAAC;YAE5N;QACF;QACA,qBAAOlB,MAAMyD,YAAY,CAACP,GAAG;YAAEjB;QAAI;IACrC;AACJ;AAEA;;;CAGC,GACD,SAASyB,KAAK,EAAEvC,QAAQ,EAAiC;IACvD,MAAMwC,cAAc1D,WAAWE;IAC/B,qBACE,KAACD;QACC0D,yBAAyBf;QACzBc,aAAaA;kBAEZxC;;AAGP;AAEA,eAAeuC,KAAI","ignoreList":[0]} |
@@ -1,2 +0,1 @@ | ||
| import { warnOnce } from '../../utils/warn-once'; | ||
| /** | ||
@@ -17,2 +16,3 @@ * Run function with `scroll-behavior: auto` applied to `<html/>`. | ||
| if (process.env.NODE_ENV === 'development' && getComputedStyle(htmlElement).scrollBehavior === 'smooth') { | ||
| const { warnOnce } = require('../../utils/warn-once'); | ||
| warnOnce('Detected `scroll-behavior: smooth` on the `<html>` element. To disable smooth scrolling during route transitions, ' + 'add `data-scroll-behavior="smooth"` to your <html> element. ' + 'Learn more: https://nextjs.org/docs/messages/missing-data-scroll-behavior'); | ||
@@ -19,0 +19,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../../../../src/shared/lib/router/utils/disable-smooth-scroll.ts"],"sourcesContent":["import { warnOnce } from '../../utils/warn-once'\n\n/**\n * Run function with `scroll-behavior: auto` applied to `<html/>`.\n * This css change will be reverted after the function finishes.\n */\nexport function disableSmoothScrollDuringRouteTransition(\n fn: () => void,\n options: { dontForceLayout?: boolean; onlyHashChange?: boolean } = {}\n) {\n // if only the hash is changed, we don't need to disable smooth scrolling\n // we only care to prevent smooth scrolling when navigating to a new page to avoid jarring UX\n if (options.onlyHashChange) {\n fn()\n return\n }\n\n const htmlElement = document.documentElement\n const hasDataAttribute = htmlElement.dataset.scrollBehavior === 'smooth'\n\n if (!hasDataAttribute) {\n // Warn if smooth scrolling is detected but no data attribute is present\n if (\n process.env.NODE_ENV === 'development' &&\n getComputedStyle(htmlElement).scrollBehavior === 'smooth'\n ) {\n warnOnce(\n 'Detected `scroll-behavior: smooth` on the `<html>` element. To disable smooth scrolling during route transitions, ' +\n 'add `data-scroll-behavior=\"smooth\"` to your <html> element. ' +\n 'Learn more: https://nextjs.org/docs/messages/missing-data-scroll-behavior'\n )\n }\n // No smooth scrolling configured, run directly without style manipulation\n fn()\n return\n }\n\n // Proceed with temporarily disabling smooth scrolling\n const existing = htmlElement.style.scrollBehavior\n htmlElement.style.scrollBehavior = 'auto'\n if (!options.dontForceLayout) {\n // In Chrome-based browsers we need to force reflow before calling `scrollTo`.\n // Otherwise it will not pickup the change in scrollBehavior\n // More info here: https://github.com/vercel/next.js/issues/40719#issuecomment-1336248042\n htmlElement.getClientRects()\n }\n fn()\n htmlElement.style.scrollBehavior = existing\n}\n"],"names":["warnOnce","disableSmoothScrollDuringRouteTransition","fn","options","onlyHashChange","htmlElement","document","documentElement","hasDataAttribute","dataset","scrollBehavior","process","env","NODE_ENV","getComputedStyle","existing","style","dontForceLayout","getClientRects"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,wBAAuB;AAEhD;;;CAGC,GACD,OAAO,SAASC,yCACdC,EAAc,EACdC,UAAmE,CAAC,CAAC;IAErE,yEAAyE;IACzE,6FAA6F;IAC7F,IAAIA,QAAQC,cAAc,EAAE;QAC1BF;QACA;IACF;IAEA,MAAMG,cAAcC,SAASC,eAAe;IAC5C,MAAMC,mBAAmBH,YAAYI,OAAO,CAACC,cAAc,KAAK;IAEhE,IAAI,CAACF,kBAAkB;QACrB,wEAAwE;QACxE,IACEG,QAAQC,GAAG,CAACC,QAAQ,KAAK,iBACzBC,iBAAiBT,aAAaK,cAAc,KAAK,UACjD;YACAV,SACE,uHACE,iEACA;QAEN;QACA,0EAA0E;QAC1EE;QACA;IACF;IAEA,sDAAsD;IACtD,MAAMa,WAAWV,YAAYW,KAAK,CAACN,cAAc;IACjDL,YAAYW,KAAK,CAACN,cAAc,GAAG;IACnC,IAAI,CAACP,QAAQc,eAAe,EAAE;QAC5B,8EAA8E;QAC9E,4DAA4D;QAC5D,yFAAyF;QACzFZ,YAAYa,cAAc;IAC5B;IACAhB;IACAG,YAAYW,KAAK,CAACN,cAAc,GAAGK;AACrC","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../../../../src/shared/lib/router/utils/disable-smooth-scroll.ts"],"sourcesContent":["/**\n * Run function with `scroll-behavior: auto` applied to `<html/>`.\n * This css change will be reverted after the function finishes.\n */\nexport function disableSmoothScrollDuringRouteTransition(\n fn: () => void,\n options: { dontForceLayout?: boolean; onlyHashChange?: boolean } = {}\n) {\n // if only the hash is changed, we don't need to disable smooth scrolling\n // we only care to prevent smooth scrolling when navigating to a new page to avoid jarring UX\n if (options.onlyHashChange) {\n fn()\n return\n }\n\n const htmlElement = document.documentElement\n const hasDataAttribute = htmlElement.dataset.scrollBehavior === 'smooth'\n\n if (!hasDataAttribute) {\n // Warn if smooth scrolling is detected but no data attribute is present\n if (\n process.env.NODE_ENV === 'development' &&\n getComputedStyle(htmlElement).scrollBehavior === 'smooth'\n ) {\n const { warnOnce } =\n require('../../utils/warn-once') as typeof import('../../utils/warn-once')\n warnOnce(\n 'Detected `scroll-behavior: smooth` on the `<html>` element. To disable smooth scrolling during route transitions, ' +\n 'add `data-scroll-behavior=\"smooth\"` to your <html> element. ' +\n 'Learn more: https://nextjs.org/docs/messages/missing-data-scroll-behavior'\n )\n }\n // No smooth scrolling configured, run directly without style manipulation\n fn()\n return\n }\n\n // Proceed with temporarily disabling smooth scrolling\n const existing = htmlElement.style.scrollBehavior\n htmlElement.style.scrollBehavior = 'auto'\n if (!options.dontForceLayout) {\n // In Chrome-based browsers we need to force reflow before calling `scrollTo`.\n // Otherwise it will not pickup the change in scrollBehavior\n // More info here: https://github.com/vercel/next.js/issues/40719#issuecomment-1336248042\n htmlElement.getClientRects()\n }\n fn()\n htmlElement.style.scrollBehavior = existing\n}\n"],"names":["disableSmoothScrollDuringRouteTransition","fn","options","onlyHashChange","htmlElement","document","documentElement","hasDataAttribute","dataset","scrollBehavior","process","env","NODE_ENV","getComputedStyle","warnOnce","require","existing","style","dontForceLayout","getClientRects"],"mappings":"AAAA;;;CAGC,GACD,OAAO,SAASA,yCACdC,EAAc,EACdC,UAAmE,CAAC,CAAC;IAErE,yEAAyE;IACzE,6FAA6F;IAC7F,IAAIA,QAAQC,cAAc,EAAE;QAC1BF;QACA;IACF;IAEA,MAAMG,cAAcC,SAASC,eAAe;IAC5C,MAAMC,mBAAmBH,YAAYI,OAAO,CAACC,cAAc,KAAK;IAEhE,IAAI,CAACF,kBAAkB;QACrB,wEAAwE;QACxE,IACEG,QAAQC,GAAG,CAACC,QAAQ,KAAK,iBACzBC,iBAAiBT,aAAaK,cAAc,KAAK,UACjD;YACA,MAAM,EAAEK,QAAQ,EAAE,GAChBC,QAAQ;YACVD,SACE,uHACE,iEACA;QAEN;QACA,0EAA0E;QAC1Eb;QACA;IACF;IAEA,sDAAsD;IACtD,MAAMe,WAAWZ,YAAYa,KAAK,CAACR,cAAc;IACjDL,YAAYa,KAAK,CAACR,cAAc,GAAG;IACnC,IAAI,CAACP,QAAQgB,eAAe,EAAE;QAC5B,8EAA8E;QAC9E,4DAA4D;QAC5D,yFAAyF;QACzFd,YAAYe,cAAc;IAC5B;IACAlB;IACAG,YAAYa,KAAK,CAACR,cAAc,GAAGO;AACrC","ignoreList":[0]} |
@@ -75,3 +75,3 @@ "use strict"; | ||
| const data = await res.json(); | ||
| const versionData = data.versions["16.3.0-canary.51"]; | ||
| const versionData = data.versions["16.3.0-canary.52"]; | ||
| return { | ||
@@ -104,3 +104,3 @@ os: versionData.os, | ||
| lockfileParsed.dependencies[pkg] = { | ||
| version: "16.3.0-canary.51", | ||
| version: "16.3.0-canary.52", | ||
| resolved: pkgData.tarball, | ||
@@ -113,3 +113,3 @@ integrity: pkgData.integrity, | ||
| lockfileParsed.packages[pkg] = { | ||
| version: "16.3.0-canary.51", | ||
| version: "16.3.0-canary.52", | ||
| resolved: pkgData.tarball, | ||
@@ -116,0 +116,0 @@ integrity: pkgData.integrity, |
@@ -164,3 +164,3 @@ "use strict"; | ||
| } else { | ||
| if (process.env.__NEXT_BUNDLER === 'Webpack') { | ||
| if (process.env.__NEXT_BUNDLER === 'Webpack' || process.env.__NEXT_BUNDLER === 'Rspack') { | ||
| ReadableCtor = __non_webpack_require__('node:stream').Readable; | ||
@@ -167,0 +167,0 @@ } else { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../src/server/app-render/app-render-prerender-utils.ts"],"sourcesContent":["import type { Readable } from 'node:stream'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nexport type AnyStream = ReadableStream<Uint8Array> | Readable\n\nfunction isWebStream(stream: AnyStream): stream is ReadableStream<Uint8Array> {\n return typeof (stream as ReadableStream).tee === 'function'\n}\n\n// React's RSC prerender function will emit an incomplete flight stream when using `prerender`. If the connection\n// closes then whatever hanging chunks exist will be errored. This is because prerender (an experimental feature)\n// has not yet implemented a concept of resume. For now we will simulate a paused connection by wrapping the stream\n// in one that doesn't close even when the underlying is complete.\nexport class ReactServerResult {\n private _stream: null | AnyStream\n private _replayable: ReplayableNodeStream | null\n\n constructor(stream: AnyStream) {\n if (process.env.__NEXT_USE_NODE_STREAMS && !isWebStream(stream)) {\n this._stream = null\n this._replayable = new ReplayableNodeStream(stream as Readable)\n } else {\n this._stream = stream\n this._replayable = null\n }\n }\n\n tee(): AnyStream {\n if (this._replayable) {\n return this._replayable.createReplayStream()\n }\n\n if (this._stream === null) {\n throw new Error(\n 'Cannot tee a ReactServerResult that has already been consumed'\n )\n }\n if (isWebStream(this._stream)) {\n const tee = this._stream.tee()\n this._stream = tee[0]\n return tee[1]\n }\n\n if (process.env.NEXT_RUNTIME === 'edge') {\n throw new InvariantError(\n 'Node.js Readable cannot be teed in the edge runtime'\n )\n } else {\n let Readable: typeof import('node:stream').Readable\n if (process.env.TURBOPACK) {\n Readable = (require('node:stream') as typeof import('node:stream'))\n .Readable\n } else {\n Readable = (\n __non_webpack_require__('node:stream') as typeof import('node:stream')\n ).Readable\n }\n const webStream = Readable.toWeb(\n this._stream\n ) as ReadableStream<Uint8Array>\n const tee = webStream.tee()\n this._stream = Readable.fromWeb(\n tee[0] as import('stream/web').ReadableStream\n )\n return Readable.fromWeb(tee[1] as import('stream/web').ReadableStream)\n }\n }\n\n consume(): AnyStream {\n if (this._replayable) {\n const stream = this._replayable.createReplayStream()\n this._replayable.dispose()\n this._replayable = null\n return stream\n }\n\n if (this._stream === null) {\n throw new Error(\n 'Cannot consume a ReactServerResult that has already been consumed'\n )\n }\n const stream = this._stream\n this._stream = null\n return stream\n }\n}\n\ntype ReplayableStreamSubscriber = {\n onChunk: (chunk: Uint8Array) => void\n onEnd: () => void\n onError: (err: Error) => void\n}\n\n/**\n * Buffers all chunks from a Node.js Readable stream and allows creating new\n * Readable streams that replay the buffered chunks plus any subsequent chunks\n * from the source. Multiple replay streams can be created independently.\n */\nexport class ReplayableNodeStream {\n private _chunks: Array<Uint8Array> | null\n private _done: boolean\n private _error: Error | null\n private _subscribers: Set<ReplayableStreamSubscriber>\n\n constructor(stream: Readable) {\n this._chunks = []\n this._done = false\n this._error = null\n this._subscribers = new Set()\n\n stream.on('data', (chunk: Buffer | Uint8Array) => {\n const buf = chunk instanceof Uint8Array ? chunk : new Uint8Array(chunk)\n if (this._chunks !== null) {\n this._chunks.push(buf)\n }\n for (const sub of this._subscribers) {\n sub.onChunk(buf)\n }\n })\n\n stream.on('end', () => {\n this._done = true\n for (const sub of this._subscribers) {\n sub.onEnd()\n }\n this._subscribers.clear()\n })\n\n stream.on('error', (err: Error) => {\n this._error = err\n for (const sub of this._subscribers) {\n sub.onError(err)\n }\n this._subscribers.clear()\n })\n }\n\n /**\n * Creates a new Node.js Readable stream that first emits all buffered chunks,\n * then forwards any new chunks from the source as they arrive.\n *\n * Buffered chunks are delivered via _read() (pull-based) rather than pushed\n * eagerly. This is critical because createReplayStream() is called outside\n * of AsyncLocalStorage context, and eagerly pushing chunks triggers internal\n * Node.js stream scheduling (process.nextTick for maybeReadMore) that\n * captures the empty ALS context. By deferring to _read(), chunks are only\n * delivered when the consumer reads, which happens inside the correct ALS\n * scope (e.g. during Fizz's performWork).\n */\n createReplayStream(): Readable {\n if (this._chunks === null) {\n throw new InvariantError(\n 'Cannot create a replay stream after the ReplayableNodeStream has been disposed.'\n )\n }\n\n let ReadableCtor: typeof import('node:stream').Readable\n if (process.env.NEXT_RUNTIME === 'edge') {\n throw new InvariantError(\n 'Node.js Readable cannot be teed in the edge runtime'\n )\n } else {\n if (process.env.__NEXT_BUNDLER === 'Webpack') {\n ReadableCtor = (\n __non_webpack_require__('node:stream') as typeof import('node:stream')\n ).Readable\n } else {\n ReadableCtor = (require('node:stream') as typeof import('node:stream'))\n .Readable\n }\n }\n\n const bufferedChunks = this._chunks.slice()\n let bufferIndex = 0\n let bufferDrained = false\n const isDone = this._done\n const sourceError = this._error\n\n const stream = new ReadableCtor({\n read() {\n if (!bufferDrained) {\n bufferDrained = true\n for (let i = bufferIndex; i < bufferedChunks.length; i++) {\n this.push(bufferedChunks[i])\n }\n bufferIndex = bufferedChunks.length\n if (isDone) {\n this.push(null)\n }\n }\n },\n })\n\n if (sourceError) {\n stream.destroy(sourceError)\n return stream\n }\n\n if (isDone) {\n return stream\n }\n\n const subscriber: ReplayableStreamSubscriber = {\n onChunk: (chunk) => {\n stream.push(chunk)\n },\n onEnd: () => {\n stream.push(null)\n },\n onError: (err) => {\n stream.destroy(err)\n },\n }\n this._subscribers.add(subscriber)\n\n stream.on('close', () => {\n this._subscribers.delete(subscriber)\n })\n\n return stream\n }\n\n /**\n * Clears the buffered chunks and all subscriber references. After calling\n * this, no new replay streams can be created.\n */\n dispose(): void {\n this._chunks = null\n }\n}\n\nexport type ReactServerPrerenderResolveToType = {\n prelude: ReadableStream<Uint8Array>\n}\n\nexport async function createReactServerPrerenderResult(\n underlying: Promise<ReactServerPrerenderResolveToType>\n): Promise<ReactServerPrerenderResult> {\n const chunks: Array<Uint8Array> = []\n const { prelude } = await underlying\n const reader = prelude.getReader()\n while (true) {\n const { done, value } = await reader.read()\n if (done) {\n return new ReactServerPrerenderResult(chunks)\n } else {\n chunks.push(value)\n }\n }\n}\n\nexport async function createReactServerPrerenderResultFromRender(\n underlying: AnyStream\n): Promise<ReactServerPrerenderResult> {\n const chunks: Array<Uint8Array> = []\n\n if (isWebStream(underlying)) {\n const reader = underlying.getReader()\n while (true) {\n const { done, value } = await reader.read()\n if (done) {\n break\n } else {\n chunks.push(value)\n }\n }\n } else {\n for await (const chunk of underlying) {\n chunks.push(chunk instanceof Uint8Array ? chunk : new Uint8Array(chunk))\n }\n }\n\n return new ReactServerPrerenderResult(chunks)\n}\nexport class ReactServerPrerenderResult {\n private _chunks: null | Array<Uint8Array>\n\n private assertChunks(expression: string): Array<Uint8Array> {\n if (this._chunks === null) {\n throw new InvariantError(\n `Cannot \\`${expression}\\` on a ReactServerPrerenderResult that has already been consumed.`\n )\n }\n return this._chunks\n }\n\n private consumeChunks(expression: string): Array<Uint8Array> {\n const chunks = this.assertChunks(expression)\n this.consume()\n return chunks\n }\n\n consume(): void {\n this._chunks = null\n }\n\n constructor(chunks: Array<Uint8Array>) {\n this._chunks = chunks\n }\n\n asChunks(): Array<Uint8Array> {\n const chunks = this.assertChunks('asChunks()')\n return chunks\n }\n\n asUnclosingStream(): ReadableStream<Uint8Array> {\n const chunks = this.assertChunks('asUnclosingStream()')\n return createUnclosingStream(chunks)\n }\n\n consumeAsUnclosingStream(): ReadableStream<Uint8Array> {\n const chunks = this.consumeChunks('consumeAsUnclosingStream()')\n return createUnclosingStream(chunks)\n }\n\n asStream(): ReadableStream<Uint8Array> {\n const chunks = this.assertChunks('asStream()')\n return createClosingStream(chunks)\n }\n\n consumeAsStream(): ReadableStream<Uint8Array> {\n const chunks = this.consumeChunks('consumeAsStream()')\n return createClosingStream(chunks)\n }\n}\n\nfunction createUnclosingStream(\n chunks: Array<Uint8Array>\n): ReadableStream<Uint8Array> {\n let i = 0\n return new ReadableStream({\n async pull(controller) {\n if (i < chunks.length) {\n controller.enqueue(chunks[i++])\n }\n // we intentionally keep the stream open. The consumer will clear\n // out chunks once finished and the remaining memory will be GC'd\n // when this object goes out of scope\n },\n })\n}\n\nfunction createClosingStream(\n chunks: Array<Uint8Array>\n): ReadableStream<Uint8Array> {\n let i = 0\n return new ReadableStream({\n async pull(controller) {\n if (i < chunks.length) {\n controller.enqueue(chunks[i++])\n } else {\n controller.close()\n }\n },\n })\n}\n\nexport async function processPrelude(\n unprocessedPrelude: ReadableStream<Uint8Array>\n) {\n const [prelude, peek] = unprocessedPrelude.tee()\n\n const reader = peek.getReader()\n const firstResult = await reader.read()\n reader.cancel()\n\n const preludeIsEmpty = firstResult.done === true\n\n return { prelude, preludeIsEmpty }\n}\n"],"names":["ReactServerPrerenderResult","ReactServerResult","ReplayableNodeStream","createReactServerPrerenderResult","createReactServerPrerenderResultFromRender","processPrelude","isWebStream","stream","tee","constructor","process","env","__NEXT_USE_NODE_STREAMS","_stream","_replayable","createReplayStream","Error","NEXT_RUNTIME","InvariantError","Readable","TURBOPACK","require","__non_webpack_require__","webStream","toWeb","fromWeb","consume","dispose","_chunks","_done","_error","_subscribers","Set","on","chunk","buf","Uint8Array","push","sub","onChunk","onEnd","clear","err","onError","ReadableCtor","__NEXT_BUNDLER","bufferedChunks","slice","bufferIndex","bufferDrained","isDone","sourceError","read","i","length","destroy","subscriber","add","delete","underlying","chunks","prelude","reader","getReader","done","value","assertChunks","expression","consumeChunks","asChunks","asUnclosingStream","createUnclosingStream","consumeAsUnclosingStream","asStream","createClosingStream","consumeAsStream","ReadableStream","pull","controller","enqueue","close","unprocessedPrelude","peek","firstResult","cancel","preludeIsEmpty"],"mappings":";;;;;;;;;;;;;;;;;;;IAkRaA,0BAA0B;eAA1BA;;IArQAC,iBAAiB;eAAjBA;;IAqFAC,oBAAoB;eAApBA;;IAyISC,gCAAgC;eAAhCA;;IAgBAC,0CAA0C;eAA1CA;;IA0GAC,cAAc;eAAdA;;;gCApWS;AAI/B,SAASC,YAAYC,MAAiB;IACpC,OAAO,OAAO,AAACA,OAA0BC,GAAG,KAAK;AACnD;AAMO,MAAMP;IAIXQ,YAAYF,MAAiB,CAAE;QAC7B,IAAIG,QAAQC,GAAG,CAACC,uBAAuB,IAAI,CAACN,YAAYC,SAAS;YAC/D,IAAI,CAACM,OAAO,GAAG;YACf,IAAI,CAACC,WAAW,GAAG,IAAIZ,qBAAqBK;QAC9C,OAAO;YACL,IAAI,CAACM,OAAO,GAAGN;YACf,IAAI,CAACO,WAAW,GAAG;QACrB;IACF;IAEAN,MAAiB;QACf,IAAI,IAAI,CAACM,WAAW,EAAE;YACpB,OAAO,IAAI,CAACA,WAAW,CAACC,kBAAkB;QAC5C;QAEA,IAAI,IAAI,CAACF,OAAO,KAAK,MAAM;YACzB,MAAM,qBAEL,CAFK,IAAIG,MACR,kEADI,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QACF;QACA,IAAIV,YAAY,IAAI,CAACO,OAAO,GAAG;YAC7B,MAAML,MAAM,IAAI,CAACK,OAAO,CAACL,GAAG;YAC5B,IAAI,CAACK,OAAO,GAAGL,GAAG,CAAC,EAAE;YACrB,OAAOA,GAAG,CAAC,EAAE;QACf;QAEA,IAAI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ClC,OAAOM,oBAAoBd;IAC7B;AACF;AAEA,SAASW,sBACPX,MAAyB;IAEzB,IAAIP,IAAI;IACR,OAAO,IAAIuB,eAAe;QACxB,MAAMC,MAAKC,UAAU;YACnB,IAAIzB,IAAIO,OAAON,MAAM,EAAE;gBACrBwB,WAAWC,OAAO,CAACnB,MAAM,CAACP,IAAI;YAChC;QACA,iEAAiE;QACjE,iEAAiE;QACjE,qCAAqC;QACvC;IACF;AACF;AAEA,SAASqB,oBACPd,MAAyB;IAEzB,IAAIP,IAAI;IACR,OAAO,IAAIuB,eAAe;QACxB,MAAMC,MAAKC,UAAU;YACnB,IAAIzB,IAAIO,OAAON,MAAM,EAAE;gBACrBwB,WAAWC,OAAO,CAACnB,MAAM,CAACP,IAAI;YAChC,OAAO;gBACLyB,WAAWE,KAAK;YAClB;QACF;IACF;AACF;AAEO,eAAe3E,eACpB4E,kBAA8C;IAE9C,MAAM,CAACpB,SAASqB,KAAK,GAAGD,mBAAmBzE,GAAG;IAE9C,MAAMsD,SAASoB,KAAKnB,SAAS;IAC7B,MAAMoB,cAAc,MAAMrB,OAAOV,IAAI;IACrCU,OAAOsB,MAAM;IAEb,MAAMC,iBAAiBF,YAAYnB,IAAI,KAAK;IAE5C,OAAO;QAAEH;QAASwB;IAAe;AACnC","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../src/server/app-render/app-render-prerender-utils.ts"],"sourcesContent":["import type { Readable } from 'node:stream'\nimport { InvariantError } from '../../shared/lib/invariant-error'\n\nexport type AnyStream = ReadableStream<Uint8Array> | Readable\n\nfunction isWebStream(stream: AnyStream): stream is ReadableStream<Uint8Array> {\n return typeof (stream as ReadableStream).tee === 'function'\n}\n\n// React's RSC prerender function will emit an incomplete flight stream when using `prerender`. If the connection\n// closes then whatever hanging chunks exist will be errored. This is because prerender (an experimental feature)\n// has not yet implemented a concept of resume. For now we will simulate a paused connection by wrapping the stream\n// in one that doesn't close even when the underlying is complete.\nexport class ReactServerResult {\n private _stream: null | AnyStream\n private _replayable: ReplayableNodeStream | null\n\n constructor(stream: AnyStream) {\n if (process.env.__NEXT_USE_NODE_STREAMS && !isWebStream(stream)) {\n this._stream = null\n this._replayable = new ReplayableNodeStream(stream as Readable)\n } else {\n this._stream = stream\n this._replayable = null\n }\n }\n\n tee(): AnyStream {\n if (this._replayable) {\n return this._replayable.createReplayStream()\n }\n\n if (this._stream === null) {\n throw new Error(\n 'Cannot tee a ReactServerResult that has already been consumed'\n )\n }\n if (isWebStream(this._stream)) {\n const tee = this._stream.tee()\n this._stream = tee[0]\n return tee[1]\n }\n\n if (process.env.NEXT_RUNTIME === 'edge') {\n throw new InvariantError(\n 'Node.js Readable cannot be teed in the edge runtime'\n )\n } else {\n let Readable: typeof import('node:stream').Readable\n if (process.env.TURBOPACK) {\n Readable = (require('node:stream') as typeof import('node:stream'))\n .Readable\n } else {\n Readable = (\n __non_webpack_require__('node:stream') as typeof import('node:stream')\n ).Readable\n }\n const webStream = Readable.toWeb(\n this._stream\n ) as ReadableStream<Uint8Array>\n const tee = webStream.tee()\n this._stream = Readable.fromWeb(\n tee[0] as import('stream/web').ReadableStream\n )\n return Readable.fromWeb(tee[1] as import('stream/web').ReadableStream)\n }\n }\n\n consume(): AnyStream {\n if (this._replayable) {\n const stream = this._replayable.createReplayStream()\n this._replayable.dispose()\n this._replayable = null\n return stream\n }\n\n if (this._stream === null) {\n throw new Error(\n 'Cannot consume a ReactServerResult that has already been consumed'\n )\n }\n const stream = this._stream\n this._stream = null\n return stream\n }\n}\n\ntype ReplayableStreamSubscriber = {\n onChunk: (chunk: Uint8Array) => void\n onEnd: () => void\n onError: (err: Error) => void\n}\n\n/**\n * Buffers all chunks from a Node.js Readable stream and allows creating new\n * Readable streams that replay the buffered chunks plus any subsequent chunks\n * from the source. Multiple replay streams can be created independently.\n */\nexport class ReplayableNodeStream {\n private _chunks: Array<Uint8Array> | null\n private _done: boolean\n private _error: Error | null\n private _subscribers: Set<ReplayableStreamSubscriber>\n\n constructor(stream: Readable) {\n this._chunks = []\n this._done = false\n this._error = null\n this._subscribers = new Set()\n\n stream.on('data', (chunk: Buffer | Uint8Array) => {\n const buf = chunk instanceof Uint8Array ? chunk : new Uint8Array(chunk)\n if (this._chunks !== null) {\n this._chunks.push(buf)\n }\n for (const sub of this._subscribers) {\n sub.onChunk(buf)\n }\n })\n\n stream.on('end', () => {\n this._done = true\n for (const sub of this._subscribers) {\n sub.onEnd()\n }\n this._subscribers.clear()\n })\n\n stream.on('error', (err: Error) => {\n this._error = err\n for (const sub of this._subscribers) {\n sub.onError(err)\n }\n this._subscribers.clear()\n })\n }\n\n /**\n * Creates a new Node.js Readable stream that first emits all buffered chunks,\n * then forwards any new chunks from the source as they arrive.\n *\n * Buffered chunks are delivered via _read() (pull-based) rather than pushed\n * eagerly. This is critical because createReplayStream() is called outside\n * of AsyncLocalStorage context, and eagerly pushing chunks triggers internal\n * Node.js stream scheduling (process.nextTick for maybeReadMore) that\n * captures the empty ALS context. By deferring to _read(), chunks are only\n * delivered when the consumer reads, which happens inside the correct ALS\n * scope (e.g. during Fizz's performWork).\n */\n createReplayStream(): Readable {\n if (this._chunks === null) {\n throw new InvariantError(\n 'Cannot create a replay stream after the ReplayableNodeStream has been disposed.'\n )\n }\n\n let ReadableCtor: typeof import('node:stream').Readable\n if (process.env.NEXT_RUNTIME === 'edge') {\n throw new InvariantError(\n 'Node.js Readable cannot be teed in the edge runtime'\n )\n } else {\n if (\n process.env.__NEXT_BUNDLER === 'Webpack' ||\n process.env.__NEXT_BUNDLER === 'Rspack'\n ) {\n ReadableCtor = (\n __non_webpack_require__('node:stream') as typeof import('node:stream')\n ).Readable\n } else {\n ReadableCtor = (require('node:stream') as typeof import('node:stream'))\n .Readable\n }\n }\n\n const bufferedChunks = this._chunks.slice()\n let bufferIndex = 0\n let bufferDrained = false\n const isDone = this._done\n const sourceError = this._error\n\n const stream = new ReadableCtor({\n read() {\n if (!bufferDrained) {\n bufferDrained = true\n for (let i = bufferIndex; i < bufferedChunks.length; i++) {\n this.push(bufferedChunks[i])\n }\n bufferIndex = bufferedChunks.length\n if (isDone) {\n this.push(null)\n }\n }\n },\n })\n\n if (sourceError) {\n stream.destroy(sourceError)\n return stream\n }\n\n if (isDone) {\n return stream\n }\n\n const subscriber: ReplayableStreamSubscriber = {\n onChunk: (chunk) => {\n stream.push(chunk)\n },\n onEnd: () => {\n stream.push(null)\n },\n onError: (err) => {\n stream.destroy(err)\n },\n }\n this._subscribers.add(subscriber)\n\n stream.on('close', () => {\n this._subscribers.delete(subscriber)\n })\n\n return stream\n }\n\n /**\n * Clears the buffered chunks and all subscriber references. After calling\n * this, no new replay streams can be created.\n */\n dispose(): void {\n this._chunks = null\n }\n}\n\nexport type ReactServerPrerenderResolveToType = {\n prelude: ReadableStream<Uint8Array>\n}\n\nexport async function createReactServerPrerenderResult(\n underlying: Promise<ReactServerPrerenderResolveToType>\n): Promise<ReactServerPrerenderResult> {\n const chunks: Array<Uint8Array> = []\n const { prelude } = await underlying\n const reader = prelude.getReader()\n while (true) {\n const { done, value } = await reader.read()\n if (done) {\n return new ReactServerPrerenderResult(chunks)\n } else {\n chunks.push(value)\n }\n }\n}\n\nexport async function createReactServerPrerenderResultFromRender(\n underlying: AnyStream\n): Promise<ReactServerPrerenderResult> {\n const chunks: Array<Uint8Array> = []\n\n if (isWebStream(underlying)) {\n const reader = underlying.getReader()\n while (true) {\n const { done, value } = await reader.read()\n if (done) {\n break\n } else {\n chunks.push(value)\n }\n }\n } else {\n for await (const chunk of underlying) {\n chunks.push(chunk instanceof Uint8Array ? chunk : new Uint8Array(chunk))\n }\n }\n\n return new ReactServerPrerenderResult(chunks)\n}\nexport class ReactServerPrerenderResult {\n private _chunks: null | Array<Uint8Array>\n\n private assertChunks(expression: string): Array<Uint8Array> {\n if (this._chunks === null) {\n throw new InvariantError(\n `Cannot \\`${expression}\\` on a ReactServerPrerenderResult that has already been consumed.`\n )\n }\n return this._chunks\n }\n\n private consumeChunks(expression: string): Array<Uint8Array> {\n const chunks = this.assertChunks(expression)\n this.consume()\n return chunks\n }\n\n consume(): void {\n this._chunks = null\n }\n\n constructor(chunks: Array<Uint8Array>) {\n this._chunks = chunks\n }\n\n asChunks(): Array<Uint8Array> {\n const chunks = this.assertChunks('asChunks()')\n return chunks\n }\n\n asUnclosingStream(): ReadableStream<Uint8Array> {\n const chunks = this.assertChunks('asUnclosingStream()')\n return createUnclosingStream(chunks)\n }\n\n consumeAsUnclosingStream(): ReadableStream<Uint8Array> {\n const chunks = this.consumeChunks('consumeAsUnclosingStream()')\n return createUnclosingStream(chunks)\n }\n\n asStream(): ReadableStream<Uint8Array> {\n const chunks = this.assertChunks('asStream()')\n return createClosingStream(chunks)\n }\n\n consumeAsStream(): ReadableStream<Uint8Array> {\n const chunks = this.consumeChunks('consumeAsStream()')\n return createClosingStream(chunks)\n }\n}\n\nfunction createUnclosingStream(\n chunks: Array<Uint8Array>\n): ReadableStream<Uint8Array> {\n let i = 0\n return new ReadableStream({\n async pull(controller) {\n if (i < chunks.length) {\n controller.enqueue(chunks[i++])\n }\n // we intentionally keep the stream open. The consumer will clear\n // out chunks once finished and the remaining memory will be GC'd\n // when this object goes out of scope\n },\n })\n}\n\nfunction createClosingStream(\n chunks: Array<Uint8Array>\n): ReadableStream<Uint8Array> {\n let i = 0\n return new ReadableStream({\n async pull(controller) {\n if (i < chunks.length) {\n controller.enqueue(chunks[i++])\n } else {\n controller.close()\n }\n },\n })\n}\n\nexport async function processPrelude(\n unprocessedPrelude: ReadableStream<Uint8Array>\n) {\n const [prelude, peek] = unprocessedPrelude.tee()\n\n const reader = peek.getReader()\n const firstResult = await reader.read()\n reader.cancel()\n\n const preludeIsEmpty = firstResult.done === true\n\n return { prelude, preludeIsEmpty }\n}\n"],"names":["ReactServerPrerenderResult","ReactServerResult","ReplayableNodeStream","createReactServerPrerenderResult","createReactServerPrerenderResultFromRender","processPrelude","isWebStream","stream","tee","constructor","process","env","__NEXT_USE_NODE_STREAMS","_stream","_replayable","createReplayStream","Error","NEXT_RUNTIME","InvariantError","Readable","TURBOPACK","require","__non_webpack_require__","webStream","toWeb","fromWeb","consume","dispose","_chunks","_done","_error","_subscribers","Set","on","chunk","buf","Uint8Array","push","sub","onChunk","onEnd","clear","err","onError","ReadableCtor","__NEXT_BUNDLER","bufferedChunks","slice","bufferIndex","bufferDrained","isDone","sourceError","read","i","length","destroy","subscriber","add","delete","underlying","chunks","prelude","reader","getReader","done","value","assertChunks","expression","consumeChunks","asChunks","asUnclosingStream","createUnclosingStream","consumeAsUnclosingStream","asStream","createClosingStream","consumeAsStream","ReadableStream","pull","controller","enqueue","close","unprocessedPrelude","peek","firstResult","cancel","preludeIsEmpty"],"mappings":";;;;;;;;;;;;;;;;;;;IAqRaA,0BAA0B;eAA1BA;;IAxQAC,iBAAiB;eAAjBA;;IAqFAC,oBAAoB;eAApBA;;IA4ISC,gCAAgC;eAAhCA;;IAgBAC,0CAA0C;eAA1CA;;IA0GAC,cAAc;eAAdA;;;gCAvWS;AAI/B,SAASC,YAAYC,MAAiB;IACpC,OAAO,OAAO,AAACA,OAA0BC,GAAG,KAAK;AACnD;AAMO,MAAMP;IAIXQ,YAAYF,MAAiB,CAAE;QAC7B,IAAIG,QAAQC,GAAG,CAACC,uBAAuB,IAAI,CAACN,YAAYC,SAAS;YAC/D,IAAI,CAACM,OAAO,GAAG;YACf,IAAI,CAACC,WAAW,GAAG,IAAIZ,qBAAqBK;QAC9C,OAAO;YACL,IAAI,CAACM,OAAO,GAAGN;YACf,IAAI,CAACO,WAAW,GAAG;QACrB;IACF;IAEAN,MAAiB;QACf,IAAI,IAAI,CAACM,WAAW,EAAE;YACpB,OAAO,IAAI,CAACA,WAAW,CAACC,kBAAkB;QAC5C;QAEA,IAAI,IAAI,CAACF,OAAO,KAAK,MAAM;YACzB,MAAM,qBAEL,CAFK,IAAIG,MACR,kEADI,qBAAA;uBAAA;4BAAA;8BAAA;YAEN;QACF;QACA,IAAIV,YAAY,IAAI,CAACO,OAAO,GAAG;YAC7B,MAA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AOG,sBAAsBX;IAC/B;IAEAa,WAAuC;QACrC,MAAMb,SAAS,IAAI,CAACM,YAAY,CAAC;QACjC,OAAOQ,oBAAoBd;IAC7B;IAEAe,kBAA8C;QAC5C,MAAMf,SAAS,IAAI,CAACQ,aAAa,CAAC;QAClC,OAAOM,oBAAoBd;IAC7B;AACF;AAEA,SAASW,sBACPX,MAAyB;IAEzB,IAAIP,IAAI;IACR,OAAO,IAAIuB,eAAe;QACxB,MAAMC,MAAKC,UAAU;YACnB,IAAIzB,IAAIO,OAAON,MAAM,EAAE;gBACrBwB,WAAWC,OAAO,CAACnB,MAAM,CAACP,IAAI;YAChC;QACA,iEAAiE;QACjE,iEAAiE;QACjE,qCAAqC;QACvC;IACF;AACF;AAEA,SAASqB,oBACPd,MAAyB;IAEzB,IAAIP,IAAI;IACR,OAAO,IAAIuB,eAAe;QACxB,MAAMC,MAAKC,UAAU;YACnB,IAAIzB,IAAIO,OAAON,MAAM,EAAE;gBACrBwB,WAAWC,OAAO,CAACnB,MAAM,CAACP,IAAI;YAChC,OAAO;gBACLyB,WAAWE,KAAK;YAClB;QACF;IACF;AACF;AAEO,eAAe3E,eACpB4E,kBAA8C;IAE9C,MAAM,CAACpB,SAASqB,KAAK,GAAGD,mBAAmBzE,GAAG;IAE9C,MAAMsD,SAASoB,KAAKnB,SAAS;IAC7B,MAAMoB,cAAc,MAAMrB,OAAOV,IAAI;IACrCU,OAAOsB,MAAM;IAEb,MAAMC,iBAAiBF,YAAYnB,IAAI,KAAK;IAE5C,OAAO;QAAEH;QAASwB;IAAe;AACnC","ignoreList":[0]} |
@@ -276,2 +276,3 @@ import type { NextConfig } from './config'; | ||
| globalNotFound: z.ZodOptional<z.ZodBoolean>; | ||
| turbopackRustReactCompiler: z.ZodOptional<z.ZodBoolean>; | ||
| browserDebugInfoInTerminal: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodEnum<["error", "warn", "verbose"]>, z.ZodObject<{ | ||
@@ -278,0 +279,0 @@ level: z.ZodOptional<z.ZodEnum<["error", "warn", "verbose"]>>; |
@@ -444,2 +444,3 @@ "use strict"; | ||
| globalNotFound: _zod.z.boolean().optional(), | ||
| turbopackRustReactCompiler: _zod.z.boolean().optional(), | ||
| browserDebugInfoInTerminal: _zod.z.union([ | ||
@@ -446,0 +447,0 @@ _zod.z.boolean(), |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../src/server/config-schema.ts"],"sourcesContent":["import type { NextConfig } from './config'\nimport { VALID_LOADERS } from '../shared/lib/image-config'\n\nimport { z } from 'next/dist/compiled/zod'\nimport type zod from 'next/dist/compiled/zod'\n\nimport type { SizeLimit } from '../types'\nimport {\n LIGHTNINGCSS_FEATURE_NAMES,\n type ExportPathMap,\n type TurbopackLoaderItem,\n type TurbopackOptions,\n type TurbopackRuleConfigItem,\n type TurbopackRuleConfigCollection,\n type TurbopackRuleCondition,\n type TurbopackLoaderBuiltinCondition,\n} from './config-shared'\nimport type {\n Header,\n Rewrite,\n RouteHas,\n Redirect,\n} from '../lib/load-custom-routes'\nimport { SUPPORTED_TEST_RUNNERS_LIST } from '../cli/next-test'\n\n// A custom zod schema for the SizeLimit type\nconst zSizeLimit = z.custom<SizeLimit>((val) => {\n if (typeof val === 'number' || typeof val === 'string') {\n return true\n }\n return false\n})\n\nconst zExportMap: zod.ZodType<ExportPathMap> = z.record(\n z.string(),\n z.object({\n page: z.string(),\n query: z.any(), // NextParsedUrlQuery\n\n // private optional properties\n _fallbackRouteParams: z.array(z.any()).optional(),\n _isAppDir: z.boolean().optional(),\n _isDynamicError: z.boolean().optional(),\n _isRoutePPREnabled: z.boolean().optional(),\n _allowEmptyStaticShell: z.boolean().optional(),\n })\n)\n\nconst zRouteHas: zod.ZodType<RouteHas> = z.union([\n z.object({\n type: z.enum(['header', 'query', 'cookie']),\n key: z.string(),\n value: z.string().optional(),\n }),\n z.object({\n type: z.literal('host'),\n key: z.undefined().optional(),\n value: z.string(),\n }),\n])\n\nconst zRewrite: zod.ZodType<Rewrite> = z.object({\n source: z.string(),\n destination: z.string(),\n basePath: z.literal(false).optional(),\n locale: z.literal(false).optional(),\n has: z.array(zRouteHas).optional(),\n missing: z.array(zRouteHas).optional(),\n internal: z.boolean().optional(),\n})\n\nconst zRedirect: zod.ZodType<Redirect> = z\n .object({\n source: z.string(),\n destination: z.string(),\n basePath: z.literal(false).optional(),\n locale: z.literal(false).optional(),\n has: z.array(zRouteHas).optional(),\n missing: z.array(zRouteHas).optional(),\n internal: z.boolean().optional(),\n })\n .and(\n z.union([\n z.object({\n statusCode: z.never().optional(),\n permanent: z.boolean(),\n }),\n z.object({\n statusCode: z.number(),\n permanent: z.never().optional(),\n }),\n ])\n )\n\nconst zHeader: zod.ZodType<Header> = z.object({\n source: z.string(),\n basePath: z.literal(false).optional(),\n locale: z.literal(false).optional(),\n headers: z.array(z.object({ key: z.string(), value: z.string() })),\n has: z.array(zRouteHas).optional(),\n missing: z.array(zRouteHas).optional(),\n\n internal: z.boolean().optional(),\n})\n\nconst zTurbopackLoaderItem: zod.ZodType<TurbopackLoaderItem> = z.union([\n z.string(),\n z.strictObject({\n loader: z.string(),\n // Any JSON value can be used as turbo loader options, so use z.any() here\n options: z.record(z.string(), z.any()).optional(),\n }),\n])\n\nconst zTurbopackLoaderBuiltinCondition: zod.ZodType<TurbopackLoaderBuiltinCondition> =\n z.union([\n z.literal('browser'),\n z.literal('foreign'),\n z.literal('development'),\n z.literal('production'),\n z.literal('node'),\n z.literal('edge-light'),\n ])\n\nconst zTurbopackCondition: zod.ZodType<TurbopackRuleCondition> = z.union([\n z.strictObject({ all: z.lazy(() => z.array(zTurbopackCondition)) }),\n z.strictObject({ any: z.lazy(() => z.array(zTurbopackCondition)) }),\n z.strictObject({ not: z.lazy(() => zTurbopackCondition) }),\n zTurbopackLoaderBuiltinCondition,\n z.strictObject({\n path: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n content: z.instanceof(RegExp).optional(),\n query: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n contentType: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n }),\n])\n\nconst zTurbopackModuleType = z.enum([\n 'asset',\n 'ecmascript',\n 'typescript',\n 'css',\n 'css-module',\n 'wasm',\n 'raw',\n 'node',\n 'bytes',\n])\n\nconst zTurbopackRuleConfigItem: zod.ZodType<TurbopackRuleConfigItem> =\n z.strictObject({\n loaders: z.array(zTurbopackLoaderItem).optional(),\n as: z.string().optional(),\n condition: zTurbopackCondition.optional(),\n type: zTurbopackModuleType.optional(),\n })\n\nconst zTurbopackRuleConfigCollection: zod.ZodType<TurbopackRuleConfigCollection> =\n z.union([\n zTurbopackRuleConfigItem,\n z.array(z.union([zTurbopackLoaderItem, zTurbopackRuleConfigItem])),\n ])\n\nconst zTurbopackConfig: zod.ZodType<TurbopackOptions> = z.strictObject({\n rules: z.record(z.string(), zTurbopackRuleConfigCollection).optional(),\n resolveAlias: z\n .record(\n z.string(),\n z.union([\n z.string(),\n z.array(z.string()),\n z.record(z.string(), z.union([z.string(), z.array(z.string())])),\n ])\n )\n .optional(),\n resolveExtensions: z.array(z.string()).optional(),\n root: z.string().optional(),\n debugIds: z.boolean().optional(),\n chunkLoadingGlobal: z.string().optional(),\n ignoreIssue: z\n .array(\n z.object({\n path: z.union([z.string(), z.instanceof(RegExp)]),\n title: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n description: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n })\n )\n .optional(),\n})\n\nexport const experimentalSchema = {\n outputHashSalt: z.string().optional(),\n useSkewCookie: z.boolean().optional(),\n after: z.boolean().optional(),\n appNavFailHandling: z.boolean().optional(),\n appNewScrollHandler: z.boolean().optional(),\n preloadEntriesOnStart: z.boolean().optional(),\n allowedRevalidateHeaderKeys: z.array(z.string()).optional(),\n staleTimes: z\n .object({\n dynamic: z.number().optional(),\n static: z.number().gte(30).optional(),\n })\n .optional(),\n cacheLife: z\n .record(\n z.object({\n stale: z.number().optional(),\n revalidate: z.number().optional(),\n expire: z.number().optional(),\n })\n )\n .optional(),\n cacheHandlers: z.record(z.string(), z.string().optional()).optional(),\n clientRouterFilter: z.boolean().optional(),\n clientRouterFilterRedirects: z.boolean().optional(),\n clientRouterFilterAllowedRate: z.number().optional(),\n cpus: z.number().optional(),\n memoryBasedWorkersCount: z.boolean().optional(),\n craCompat: z.boolean().optional(),\n caseSensitiveRoutes: z.boolean().optional(),\n clientParamParsingOrigins: z.array(z.string()).optional(),\n cachedNavigations: z.boolean().optional(),\n dynamicOnHover: z.boolean().optional(),\n useOffline: z.boolean().optional(),\n optimisticRouting: z.boolean().optional(),\n appShells: z.boolean().optional(),\n varyParams: z.boolean().optional(),\n prefetchInlining: z\n .union([\n z.boolean(),\n z.object({\n maxSize: z.number().optional(),\n maxBundleSize: z.number().optional(),\n }),\n ])\n .optional(),\n disableOptimizedLoading: z.boolean().optional(),\n disablePostcssPresetEnv: z.boolean().optional(),\n cacheComponents: z.boolean().optional(),\n inlineCss: z.boolean().optional(),\n esmExternals: z.union([z.boolean(), z.literal('loose')]).optional(),\n serverActions: z\n .object({\n bodySizeLimit: zSizeLimit.optional(),\n allowedOrigins: z.array(z.string()).optional(),\n })\n .optional(),\n maxPostponedStateSize: zSizeLimit.optional(),\n // The original type was Record<string, any>\n extensionAlias: z.record(z.string(), z.any()).optional(),\n externalDir: z.boolean().optional(),\n externalMiddlewareRewritesResolve: z.boolean().optional(),\n externalProxyRewritesResolve: z.boolean().optional(),\n exposeTestingApiInProductionBuild: z.boolean().optional(),\n fallbackNodePolyfills: z.literal(false).optional(),\n fetchCacheKeyPrefix: z.string().optional(),\n forceSwcTransforms: z.boolean().optional(),\n fullySpecified: z.boolean().optional(),\n gzipSize: z.boolean().optional(),\n imgOptConcurrency: z.number().int().optional().nullable(),\n imgOptOperationCache: z.boolean().optional().nullable(),\n imgOptTimeoutInSeconds: z.number().int().optional(),\n imgOptMaxInputPixels: z.number().int().optional(),\n imgOptSequentialRead: z.boolean().optional().nullable(),\n imgOptSkipMetadata: z.boolean().optional().nullable(),\n isrFlushToDisk: z.boolean().optional(),\n largePageDataBytes: z.number().optional(),\n linkNoTouchStart: z.boolean().optional(),\n manualClientBasePath: z.boolean().optional(),\n middlewarePrefetch: z.enum(['strict', 'flexible']).optional(),\n proxyPrefetch: z.enum(['strict', 'flexible']).optional(),\n middlewareClientMaxBodySize: zSizeLimit.optional(),\n proxyClientMaxBodySize: zSizeLimit.optional(),\n multiZoneDraftMode: z.boolean().optional(),\n cssChunking: z\n .union([\n z.boolean(),\n z.literal('strict'),\n z.literal('loose'),\n z.literal('graph'),\n z.strictObject({ type: z.literal('strict') }),\n z.strictObject({ type: z.literal('loose') }),\n z.strictObject({\n type: z.literal('graph'),\n requestCost: z.number().nonnegative().finite().optional(),\n moduleFactorCost: z.number().nonnegative().finite().optional(),\n }),\n ])\n .optional(),\n nextScriptWorkers: z.boolean().optional(),\n // The critter option is unknown, use z.any() here\n optimizeCss: z.union([z.boolean(), z.any()]).optional(),\n optimisticClientCache: z.boolean().optional(),\n parallelServerCompiles: z.boolean().optional(),\n parallelServerBuildTraces: z.boolean().optional(),\n ppr: z\n .union([z.boolean(), z.literal('incremental')])\n .readonly()\n .optional(),\n taint: z.boolean().optional(),\n prerenderEarlyExit: z.boolean().optional(),\n proxyTimeout: z.number().gte(0).optional(),\n rootParams: z.boolean().optional(),\n mcpServer: z.boolean().optional(),\n removeUncaughtErrorAndRejectionListeners: z.boolean().optional(),\n validateRSCRequestHeaders: z.boolean().optional(),\n scrollRestoration: z.boolean().optional(),\n sri: z\n .object({\n algorithm: z.enum(['sha256', 'sha384', 'sha512']).optional(),\n })\n .optional(),\n swcPlugins: z\n // The specific swc plugin's option is unknown, use z.any() here\n .array(z.tuple([z.string(), z.record(z.string(), z.any())]))\n .optional(),\n swcEnvOptions: z\n .object({\n mode: z.enum(['usage', 'entry']).optional(),\n coreJs: z.string().optional(),\n skip: z.array(z.string()).optional(),\n include: z.array(z.string()).optional(),\n exclude: z.array(z.string()).optional(),\n shippedProposals: z.boolean().optional(),\n forceAllTransforms: z.boolean().optional(),\n debug: z.boolean().optional(),\n loose: z.boolean().optional(),\n })\n .optional(),\n swcTraceProfiling: z.boolean().optional(),\n // NonNullable<webpack.Configuration['experiments']>['buildHttp']\n urlImports: z.any().optional(),\n viewTransition: z.boolean().optional(),\n workerThreads: z.boolean().optional(),\n webVitalsAttribution: z\n .array(\n z.union([\n z.literal('CLS'),\n z.literal('FCP'),\n z.literal('FID'),\n z.literal('INP'),\n z.literal('LCP'),\n z.literal('TTFB'),\n ])\n )\n .optional(),\n // This is partial set of mdx-rs transform options we support, aligned\n // with next_core::next_config::MdxRsOptions. Ensure both types are kept in sync.\n mdxRs: z\n .union([\n z.boolean(),\n z.object({\n development: z.boolean().optional(),\n jsxRuntime: z.string().optional(),\n jsxImportSource: z.string().optional(),\n providerImportSource: z.string().optional(),\n mdxType: z.enum(['gfm', 'commonmark']).optional(),\n }),\n ])\n .optional(),\n transitionIndicator: z.boolean().optional(),\n gestureTransition: z.boolean().optional(),\n typedRoutes: z.boolean().optional(),\n webpackBuildWorker: z.boolean().optional(),\n webpackMemoryOptimizations: z.boolean().optional(),\n turbopackMemoryEviction: z\n .union([z.literal(false), z.literal('full')])\n .optional(),\n turbopackPluginRuntimeStrategy: z\n .enum(['workerThreads', 'childProcesses', 'forceWorkerThreads'])\n .optional(),\n turbopackMinify: z.boolean().optional(),\n turbopackFileSystemCacheForDev: z.boolean().optional(),\n turbopackFileSystemCacheForBuild: z.boolean().optional(),\n turbopackSourceMaps: z.boolean().optional(),\n turbopackInputSourceMaps: z.boolean().optional(),\n turbopackTreeShaking: z.boolean().optional(),\n turbopackRemoveUnusedImports: z.boolean().optional(),\n turbopackRemoveUnusedExports: z.boolean().optional(),\n turbopackScopeHoisting: z.boolean().optional(),\n turbopackWorkerAssetPrefix: z.string().optional(),\n turbopackClientSideNestedAsyncChunking: z.boolean().optional(),\n turbopackServerSideNestedAsyncChunking: z.boolean().optional(),\n turbopackImportTypeBytes: z.boolean().optional(),\n turbopackImportTypeText: z.boolean().optional(),\n turbopackUseBuiltinBabel: z.boolean().optional(),\n turbopackUseBuiltinSass: z.boolean().optional(),\n turbopackLocalPostcssConfig: z.boolean().optional(),\n turbopackModuleIds: z.enum(['named', 'deterministic']).optional(),\n turbopackInferModuleSideEffects: z.boolean().optional(),\n turbopackServerFastRefresh: z.boolean().optional(),\n optimizePackageImports: z.array(z.string()).optional(),\n optimizeServerReact: z.boolean().optional(),\n strictRouteTypes: z.boolean().optional(),\n clientTraceMetadata: z.array(z.string()).optional(),\n serverMinification: z.boolean().optional(),\n serverSourceMaps: z.boolean().optional(),\n useWasmBinary: z.boolean().optional(),\n useLightningcss: z.boolean().optional(),\n lightningCssFeatures: z\n .object({\n include: z.array(z.enum(LIGHTNINGCSS_FEATURE_NAMES)).optional(),\n exclude: z.array(z.enum(LIGHTNINGCSS_FEATURE_NAMES)).optional(),\n })\n .optional(),\n testProxy: z.boolean().optional(),\n defaultTestRunner: z.enum(SUPPORTED_TEST_RUNNERS_LIST).optional(),\n allowDevelopmentBuild: z.literal(true).optional(),\n\n reactDebugChannel: z.boolean().optional(),\n instantInsights: z\n .object({\n validationLevel: z\n .enum([\n 'warning',\n 'manual-warning',\n 'experimental-error',\n 'experimental-manual-error',\n ])\n .optional(),\n })\n .optional(),\n staticGenerationRetryCount: z.number().int().optional(),\n staticGenerationMaxConcurrency: z.number().int().optional(),\n staticGenerationMinPagesPerWorker: z.number().int().optional(),\n typedEnv: z.boolean().optional(),\n serverComponentsHmrCache: z.boolean().optional(),\n authInterrupts: z.boolean().optional(),\n useCache: z.boolean().optional(),\n useCacheTimeout: z.number().positive().optional(),\n slowModuleDetection: z\n .object({\n buildTimeThresholdMs: z.number().int(),\n })\n .optional(),\n globalNotFound: z.boolean().optional(),\n browserDebugInfoInTerminal: z\n .union([\n z.boolean(),\n z.enum(['error', 'warn', 'verbose']),\n z.object({\n level: z.enum(['error', 'warn', 'verbose']).optional(),\n depthLimit: z.number().int().positive().optional(),\n edgeLimit: z.number().int().positive().optional(),\n showSourceLocation: z.boolean().optional(),\n }),\n ])\n .optional(),\n lockDistDir: z.boolean().optional(),\n hideLogsAfterAbort: z.boolean().optional(),\n runtimeServerDeploymentId: z.boolean().optional(),\n supportsImmutableAssets: z.boolean().optional(),\n deferredEntries: z.array(z.string()).optional(),\n onBeforeDeferredEntries: z.function().returns(z.promise(z.void())).optional(),\n reportSystemEnvInlining: z.enum(['warn', 'error']).optional(),\n}\n\nexport const configSchema: zod.ZodType<NextConfig> = z.lazy(() =>\n z.strictObject({\n adapterPath: z.string().optional(),\n agentRules: z.boolean().optional(),\n allowedDevOrigins: z.array(z.string()).optional(),\n assetPrefix: z.string().optional(),\n basePath: z.string().optional(),\n bundlePagesRouterDependencies: z.boolean().optional(),\n cacheComponents: z.boolean().optional(),\n cacheHandler: z.string().min(1).optional(),\n cacheHandlers: z.record(z.string(), z.string().optional()).optional(),\n cacheLife: z\n .record(\n z.object({\n stale: z.number().optional(),\n revalidate: z.number().optional(),\n expire: z.number().optional(),\n })\n )\n .optional(),\n cacheMaxMemorySize: z.number().optional(),\n cleanDistDir: z.boolean().optional(),\n compiler: z\n .strictObject({\n emotion: z\n .union([\n z.boolean(),\n z.object({\n sourceMap: z.boolean().optional(),\n autoLabel: z\n .union([\n z.literal('always'),\n z.literal('dev-only'),\n z.literal('never'),\n ])\n .optional(),\n labelFormat: z.string().min(1).optional(),\n importMap: z\n .record(\n z.string(),\n z.record(\n z.string(),\n z.object({\n canonicalImport: z\n .tuple([z.string(), z.string()])\n .optional(),\n styledBaseImport: z\n .tuple([z.string(), z.string()])\n .optional(),\n })\n )\n )\n .optional(),\n }),\n ])\n .optional(),\n reactRemoveProperties: z\n .union([\n z.boolean().optional(),\n z.object({\n properties: z.array(z.string()).optional(),\n }),\n ])\n .optional(),\n relay: z\n .object({\n src: z.string(),\n artifactDirectory: z.string().optional(),\n language: z.enum(['javascript', 'typescript', 'flow']).optional(),\n eagerEsModules: z.boolean().optional(),\n })\n .optional(),\n removeConsole: z\n .union([\n z.boolean().optional(),\n z.object({\n exclude: z.array(z.string()).min(1).optional(),\n }),\n ])\n .optional(),\n styledComponents: z.union([\n z.boolean().optional(),\n z.object({\n displayName: z.boolean().optional(),\n topLevelImportPaths: z.array(z.string()).optional(),\n ssr: z.boolean().optional(),\n fileName: z.boolean().optional(),\n meaninglessFileNames: z.array(z.string()).optional(),\n minify: z.boolean().optional(),\n transpileTemplateLiterals: z.boolean().optional(),\n namespace: z.string().min(1).optional(),\n pure: z.boolean().optional(),\n cssProp: z.boolean().optional(),\n }),\n ]),\n styledJsx: z.union([\n z.boolean().optional(),\n z.object({\n useLightningcss: z.boolean().optional(),\n }),\n ]),\n define: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional(),\n defineServer: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional(),\n runAfterProductionCompile: z\n .function()\n .returns(z.promise(z.void()))\n .optional(),\n })\n .optional(),\n compress: z.boolean().optional(),\n configOrigin: z.string().optional(),\n crossOrigin: z\n .union([z.literal('anonymous'), z.literal('use-credentials')])\n .optional(),\n deploymentId: z.string().optional(),\n devIndicators: z\n .union([\n z.object({\n position: z\n .union([\n z.literal('bottom-left'),\n z.literal('bottom-right'),\n z.literal('top-left'),\n z.literal('top-right'),\n ])\n .optional(),\n }),\n z.literal(false),\n ])\n .optional(),\n distDir: z.string().min(1).optional(),\n env: z.record(z.string(), z.union([z.string(), z.undefined()])).optional(),\n enablePrerenderSourceMaps: z.boolean().optional(),\n excludeDefaultMomentLocales: z.boolean().optional(),\n experimental: z.strictObject(experimentalSchema).optional(),\n exportPathMap: z\n .function()\n .args(\n zExportMap,\n z.object({\n dev: z.boolean(),\n dir: z.string(),\n outDir: z.string().nullable(),\n distDir: z.string(),\n buildId: z.string(),\n })\n )\n .returns(z.union([zExportMap, z.promise(zExportMap)]))\n .optional(),\n generateBuildId: z\n .function()\n .args()\n .returns(\n z.union([\n z.string(),\n z.null(),\n z.promise(z.union([z.string(), z.null()])),\n ])\n )\n .optional(),\n generateEtags: z.boolean().optional(),\n headers: z\n .function()\n .args()\n .returns(z.promise(z.array(zHeader)))\n .optional(),\n htmlLimitedBots: z.instanceof(RegExp).optional(),\n httpAgentOptions: z\n .strictObject({ keepAlive: z.boolean().optional() })\n .optional(),\n i18n: z\n .strictObject({\n defaultLocale: z.string().min(1),\n domains: z\n .array(\n z.strictObject({\n defaultLocale: z.string().min(1),\n domain: z.string().min(1),\n http: z.literal(true).optional(),\n locales: z.array(z.string().min(1)).optional(),\n })\n )\n .optional(),\n localeDetection: z.literal(false).optional(),\n locales: z.array(z.string().min(1)),\n })\n .nullable()\n .optional(),\n images: z\n .strictObject({\n localPatterns: z\n .array(\n z.strictObject({\n pathname: z.string().optional(),\n search: z.string().optional(),\n })\n )\n .max(25)\n .optional(),\n remotePatterns: z\n .array(\n z.union([\n z.instanceof(URL),\n z.strictObject({\n hostname: z.string(),\n pathname: z.string().optional(),\n port: z.string().max(5).optional(),\n protocol: z.enum(['http', 'https']).optional(),\n search: z.string().optional(),\n }),\n ])\n )\n .max(50)\n .optional(),\n unoptimized: z.boolean().optional(),\n customCacheHandler: z.boolean().optional(),\n contentSecurityPolicy: z.string().optional(),\n contentDispositionType: z.enum(['inline', 'attachment']).optional(),\n dangerouslyAllowSVG: z.boolean().optional(),\n dangerouslyAllowLocalIP: z.boolean().optional(),\n deviceSizes: z\n .array(z.number().int().gte(1).lte(10000))\n .max(25)\n .optional(),\n disableStaticImages: z.boolean().optional(),\n domains: z.array(z.string()).max(50).optional(),\n formats: z\n .array(z.enum(['image/avif', 'image/webp']))\n .max(4)\n .optional(),\n imageSizes: z\n .array(z.number().int().gte(1).lte(10000))\n .min(0)\n .max(25)\n .optional(),\n loader: z.enum(VALID_LOADERS).optional(),\n loaderFile: z.string().optional(),\n maximumDiskCacheSize: z.number().int().min(0).optional(),\n maximumRedirects: z.number().int().min(0).max(20).optional(),\n maximumResponseBody: z\n .number()\n .int()\n .min(1)\n .max(Number.MAX_SAFE_INTEGER)\n .optional(),\n minimumCacheTTL: z.number().int().gte(0).optional(),\n path: z.string().optional(),\n qualities: z\n .array(z.number().int().gte(1).lte(100))\n .min(1)\n .max(20)\n .optional(),\n })\n .optional(),\n logging: z\n .union([\n z.object({\n fetches: z\n .object({\n fullUrl: z.boolean().optional(),\n hmrRefreshes: z.boolean().optional(),\n })\n .optional(),\n incomingRequests: z\n .union([\n z.boolean(),\n z.object({\n ignore: z.array(z.instanceof(RegExp)),\n }),\n ])\n .optional(),\n serverFunctions: z.boolean().optional(),\n browserToTerminal: z\n .union([z.boolean(), z.enum(['error', 'warn'])])\n .optional(),\n }),\n z.literal(false),\n ])\n .optional(),\n modularizeImports: z\n .record(\n z.string(),\n z.object({\n transform: z.union([z.string(), z.record(z.string(), z.string())]),\n preventFullImport: z.boolean().optional(),\n skipDefaultConversion: z.boolean().optional(),\n })\n )\n .optional(),\n onDemandEntries: z\n .strictObject({\n maxInactiveAge: z.number().optional(),\n pagesBufferLength: z.number().optional(),\n })\n .optional(),\n output: z.enum(['standalone', 'export']).optional(),\n outputFileTracingRoot: z.string().optional(),\n outputFileTracingExcludes: z\n .record(z.string(), z.array(z.string()))\n .optional(),\n outputFileTracingIncludes: z\n .record(z.string(), z.array(z.string()))\n .optional(),\n pageExtensions: z.array(z.string()).min(1).optional(),\n instrumentationClientInject: z.array(z.string()).optional(),\n partialPrefetching: z\n .union([z.boolean(), z.literal('unstable_eager')])\n .optional(),\n poweredByHeader: z.boolean().optional(),\n productionBrowserSourceMaps: z.boolean().optional(),\n reactCompiler: z.union([\n z.boolean(),\n z\n .object({\n compilationMode: z.enum(['infer', 'annotation', 'all']).optional(),\n panicThreshold: z\n .enum(['none', 'critical_errors', 'all_errors'])\n .optional(),\n })\n .optional(),\n ]),\n reactProductionProfiling: z.boolean().optional(),\n reactStrictMode: z.boolean().nullable().optional(),\n reactMaxHeadersLength: z.number().nonnegative().int().optional(),\n redirects: z\n .function()\n .args()\n .returns(z.promise(z.array(zRedirect)))\n .optional(),\n rewrites: z\n .function()\n .args()\n .returns(\n z.promise(\n z.union([\n z.array(zRewrite),\n z.object({\n beforeFiles: z.array(zRewrite),\n afterFiles: z.array(zRewrite),\n fallback: z.array(zRewrite),\n }),\n ])\n )\n )\n .optional(),\n // sassOptions properties are unknown besides implementation, use z.any() here\n sassOptions: z\n .object({\n implementation: z.string().optional(),\n })\n .catchall(z.any())\n .optional(),\n serverExternalPackages: z.array(z.string()).optional(),\n skipMiddlewareUrlNormalize: z.boolean().optional(),\n skipProxyUrlNormalize: z.boolean().optional(),\n skipTrailingSlashRedirect: z.boolean().optional(),\n staticPageGenerationTimeout: z.number().optional(),\n expireTime: z.number().optional(),\n target: z.string().optional(),\n trailingSlash: z.boolean().optional(),\n transpilePackages: z.array(z.string()).optional(),\n turbopack: zTurbopackConfig.optional(),\n typescript: z\n .strictObject({\n ignoreBuildErrors: z.boolean().optional(),\n tsconfigPath: z.string().min(1).optional(),\n })\n .optional(),\n typedRoutes: z.boolean().optional(),\n useFileSystemPublicRoutes: z.boolean().optional(),\n // The webpack config type is unknown, use z.any() here\n webpack: z.any().nullable().optional(),\n watchOptions: z\n .strictObject({\n pollIntervalMs: z.number().positive().finite().optional(),\n })\n .optional(),\n })\n)\n"],"names":["configSchema","experimentalSchema","zSizeLimit","z","custom","val","zExportMap","record","string","object","page","query","any","_fallbackRouteParams","array","optional","_isAppDir","boolean","_isDynamicError","_isRoutePPREnabled","_allowEmptyStaticShell","zRouteHas","union","type","enum","key","value","literal","undefined","zRewrite","source","destination","basePath","locale","has","missing","internal","zRedirect","and","statusCode","never","permanent","number","zHeader","headers","zTurbopackLoaderItem","strictObject","loader","options","zTurbopackLoaderBuiltinCondition","zTurbopackCondition","all","lazy","not","path","instanceof","RegExp","content","contentType","zTurbopackModuleType","zTurbopackRuleConfigItem","loaders","as","condition","zTurbopackRuleConfigCollection","zTurbopackConfig","rules","resolveAlias","resolveExtensions","root","debugIds","chunkLoadingGlobal","ignoreIssue","title","description","outputHashSalt","useSkewCookie","after","appNavFailHandling","appNewScrollHandler","preloadEntriesOnStart","allowedRevalidateHeaderKeys","staleTimes","dynamic","static","gte","cacheLife","stale","revalidate","expire","cacheHandlers","clientRouterFilter","clientRouterFilterRedirects","clientRouterFilterAllowedRate","cpus","memoryBasedWorkersCount","craCompat","caseSensitiveRoutes","clientParamParsingOrigins","cachedNavigations","dynamicOnHover","useOffline","optimisticRouting","appShells","varyParams","prefetchInlining","maxSize","maxBundleSize","disableOptimizedLoading","disablePostcssPresetEnv","cacheComponents","inlineCss","esmExternals","serverActions","bodySizeLimit","allowedOrigins","maxPostponedStateSize","extensionAlias","externalDir","externalMiddlewareRewritesResolve","externalProxyRewritesResolve","exposeTestingApiInProductionBuild","fallbackNodePolyfills","fetchCacheKeyPrefix","forceSwcTransforms","fullySpecified","gzipSize","imgOptConcurrency","int","nullable","imgOptOperationCache","imgOptTimeoutInSeconds","imgOptMaxInputPixels","imgOptSequentialRead","imgOptSkipMetadata","isrFlushToDisk","largePageDataBytes","linkNoTouchStart","manualClientBasePath","middlewarePrefetch","proxyPrefetch","middlewareClientMaxBodySize","proxyClientMaxBodySize","multiZoneDraftMode","cssChunking","requestCost","nonnegative","finite","moduleFactorCost","nextScriptWorkers","optimizeCss","optimisticClientCache","parallelServerCompiles","parallelServerBuildTraces","ppr","readonly","taint","prerenderEarlyExit","proxyTimeout","rootParams","mcpServer","removeUncaughtErrorAndRejectionListeners","validateRSCRequestHeaders","scrollRestoration","sri","algorithm","swcPlugins","tuple","swcEnvOptions","mode","coreJs","skip","include","exclude","shippedProposals","forceAllTransforms","debug","loose","swcTraceProfiling","urlImports","viewTransition","workerThreads","webVitalsAttribution","mdxRs","development","jsxRuntime","jsxImportSource","providerImportSource","mdxType","transitionIndicator","gestureTransition","typedRoutes","webpackBuildWorker","webpackMemoryOptimizations","turbopackMemoryEviction","turbopackPluginRuntimeStrategy","turbopackMinify","turbopackFileSystemCacheForDev","turbopackFileSystemCacheForBuild","turbopackSourceMaps","turbopackInputSourceMaps","turbopackTreeShaking","turbopackRemoveUnusedImports","turbopackRemoveUnusedExports","turbopackScopeHoisting","turbopackWorkerAssetPrefix","turbopackClientSideNestedAsyncChunking","turbopackServerSideNestedAsyncChunking","turbopackImportTypeBytes","turbopackImportTypeText","turbopackUseBuiltinBabel","turbopackUseBuiltinSass","turbopackLocalPostcssConfig","turbopackModuleIds","turbopackInferModuleSideEffects","turbopackServerFastRefresh","optimizePackageImports","optimizeServerReact","strictRouteTypes","clientTraceMetadata","serverMinification","serverSourceMaps","useWasmBinary","useLightningcss","lightningCssFeatures","LIGHTNINGCSS_FEATURE_NAMES","testProxy","defaultTestRunner","SUPPORTED_TEST_RUNNERS_LIST","allowDevelopmentBuild","reactDebugChannel","instantInsights","validationLevel","staticGenerationRetryCount","staticGenerationMaxConcurrency","staticGenerationMinPagesPerWorker","typedEnv","serverComponentsHmrCache","authInterrupts","useCache","useCacheTimeout","positive","slowModuleDetection","buildTimeThresholdMs","globalNotFound","browserDebugInfoInTerminal","level","depthLimit","edgeLimit","showSourceLocation","lockDistDir","hideLogsAfterAbort","runtimeServerDeploymentId","supportsImmutableAssets","deferredEntries","onBeforeDeferredEntries","function","returns","promise","void","reportSystemEnvInlining","adapterPath","agentRules","allowedDevOrigins","assetPrefix","bundlePagesRouterDependencies","cacheHandler","min","cacheMaxMemorySize","cleanDistDir","compiler","emotion","sourceMap","autoLabel","labelFormat","importMap","canonicalImport","styledBaseImport","reactRemoveProperties","properties","relay","src","artifactDirectory","language","eagerEsModules","removeConsole","styledComponents","displayName","topLevelImportPaths","ssr","fileName","meaninglessFileNames","minify","transpileTemplateLiterals","namespace","pure","cssProp","styledJsx","define","defineServer","runAfterProductionCompile","compress","configOrigin","crossOrigin","deploymentId","devIndicators","position","distDir","env","enablePrerenderSourceMaps","excludeDefaultMomentLocales","experimental","exportPathMap","args","dev","dir","outDir","buildId","generateBuildId","null","generateEtags","htmlLimitedBots","httpAgentOptions","keepAlive","i18n","defaultLocale","domains","domain","http","locales","localeDetection","images","localPatterns","pathname","search","max","remotePatterns","URL","hostname","port","protocol","unoptimized","customCacheHandler","contentSecurityPolicy","contentDispositionType","dangerouslyAllowSVG","dangerouslyAllowLocalIP","deviceSizes","lte","disableStaticImages","formats","imageSizes","VALID_LOADERS","loaderFile","maximumDiskCacheSize","maximumRedirects","maximumResponseBody","Number","MAX_SAFE_INTEGER","minimumCacheTTL","qualities","logging","fetches","fullUrl","hmrRefreshes","incomingRequests","ignore","serverFunctions","browserToTerminal","modularizeImports","transform","preventFullImport","skipDefaultConversion","onDemandEntries","maxInactiveAge","pagesBufferLength","output","outputFileTracingRoot","outputFileTracingExcludes","outputFileTracingIncludes","pageExtensions","instrumentationClientInject","partialPrefetching","poweredByHeader","productionBrowserSourceMaps","reactCompiler","compilationMode","panicThreshold","reactProductionProfiling","reactStrictMode","reactMaxHeadersLength","redirects","rewrites","beforeFiles","afterFiles","fallback","sassOptions","implementation","catchall","serverExternalPackages","skipMiddlewareUrlNormalize","skipProxyUrlNormalize","skipTrailingSlashRedirect","staticPageGenerationTimeout","expireTime","target","trailingSlash","transpilePackages","turbopack","typescript","ignoreBuildErrors","tsconfigPath","useFileSystemPublicRoutes","webpack","watchOptions","pollIntervalMs"],"mappings":";;;;;;;;;;;;;;;IA0caA,YAAY;eAAZA;;IA5QAC,kBAAkB;eAAlBA;;;6BA7LiB;qBAEZ;8BAaX;0BAOqC;AAE5C,6CAA6C;AAC7C,MAAMC,aAAaC,MAAC,CAACC,MAAM,CAAY,CAACC;IACtC,IAAI,OAAOA,QAAQ,YAAY,OAAOA,QAAQ,UAAU;QACtD,OAAO;IACT;IACA,OAAO;AACT;AAEA,MAAMC,aAAyCH,MAAC,CAACI,MAAM,CACrDJ,MAAC,CAACK,MAAM,IACRL,MAAC,CAACM,MAAM,CAAC;IACPC,MAAMP,MAAC,CAACK,MAAM;IACdG,OAAOR,MAAC,CAACS,GAAG;IAEZ,8BAA8B;IAC9BC,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enZ,MAAC,CAACc,OAAO,GAAGF,QAAQ;QACnCwY,mBAAmBpZ,MAAC,CAACW,KAAK,CAACX,MAAC,CAACK,MAAM,IAAIO,QAAQ;QAC/CyY,WAAWvV,iBAAiBlD,QAAQ;QACpC0Y,YAAYtZ,MAAC,CACV2C,YAAY,CAAC;YACZ4W,mBAAmBvZ,MAAC,CAACc,OAAO,GAAGF,QAAQ;YACvC4Y,cAAcxZ,MAAC,CAACK,MAAM,GAAGmQ,GAAG,CAAC,GAAG5P,QAAQ;QAC1C,GACCA,QAAQ;QACXgL,aAAa5L,MAAC,CAACc,OAAO,GAAGF,QAAQ;QACjC6Y,2BAA2BzZ,MAAC,CAACc,OAAO,GAAGF,QAAQ;QAC/C,uDAAuD;QACvD8Y,SAAS1Z,MAAC,CAACS,GAAG,GAAGqH,QAAQ,GAAGlH,QAAQ;QACpC+Y,cAAc3Z,MAAC,CACZ2C,YAAY,CAAC;YACZiX,gBAAgB5Z,MAAC,CAACuC,MAAM,GAAGuM,QAAQ,GAAG9F,MAAM,GAAGpI,QAAQ;QACzD,GACCA,QAAQ;IACb","ignoreList":[0]} | ||
| {"version":3,"sources":["../../src/server/config-schema.ts"],"sourcesContent":["import type { NextConfig } from './config'\nimport { VALID_LOADERS } from '../shared/lib/image-config'\n\nimport { z } from 'next/dist/compiled/zod'\nimport type zod from 'next/dist/compiled/zod'\n\nimport type { SizeLimit } from '../types'\nimport {\n LIGHTNINGCSS_FEATURE_NAMES,\n type ExportPathMap,\n type TurbopackLoaderItem,\n type TurbopackOptions,\n type TurbopackRuleConfigItem,\n type TurbopackRuleConfigCollection,\n type TurbopackRuleCondition,\n type TurbopackLoaderBuiltinCondition,\n} from './config-shared'\nimport type {\n Header,\n Rewrite,\n RouteHas,\n Redirect,\n} from '../lib/load-custom-routes'\nimport { SUPPORTED_TEST_RUNNERS_LIST } from '../cli/next-test'\n\n// A custom zod schema for the SizeLimit type\nconst zSizeLimit = z.custom<SizeLimit>((val) => {\n if (typeof val === 'number' || typeof val === 'string') {\n return true\n }\n return false\n})\n\nconst zExportMap: zod.ZodType<ExportPathMap> = z.record(\n z.string(),\n z.object({\n page: z.string(),\n query: z.any(), // NextParsedUrlQuery\n\n // private optional properties\n _fallbackRouteParams: z.array(z.any()).optional(),\n _isAppDir: z.boolean().optional(),\n _isDynamicError: z.boolean().optional(),\n _isRoutePPREnabled: z.boolean().optional(),\n _allowEmptyStaticShell: z.boolean().optional(),\n })\n)\n\nconst zRouteHas: zod.ZodType<RouteHas> = z.union([\n z.object({\n type: z.enum(['header', 'query', 'cookie']),\n key: z.string(),\n value: z.string().optional(),\n }),\n z.object({\n type: z.literal('host'),\n key: z.undefined().optional(),\n value: z.string(),\n }),\n])\n\nconst zRewrite: zod.ZodType<Rewrite> = z.object({\n source: z.string(),\n destination: z.string(),\n basePath: z.literal(false).optional(),\n locale: z.literal(false).optional(),\n has: z.array(zRouteHas).optional(),\n missing: z.array(zRouteHas).optional(),\n internal: z.boolean().optional(),\n})\n\nconst zRedirect: zod.ZodType<Redirect> = z\n .object({\n source: z.string(),\n destination: z.string(),\n basePath: z.literal(false).optional(),\n locale: z.literal(false).optional(),\n has: z.array(zRouteHas).optional(),\n missing: z.array(zRouteHas).optional(),\n internal: z.boolean().optional(),\n })\n .and(\n z.union([\n z.object({\n statusCode: z.never().optional(),\n permanent: z.boolean(),\n }),\n z.object({\n statusCode: z.number(),\n permanent: z.never().optional(),\n }),\n ])\n )\n\nconst zHeader: zod.ZodType<Header> = z.object({\n source: z.string(),\n basePath: z.literal(false).optional(),\n locale: z.literal(false).optional(),\n headers: z.array(z.object({ key: z.string(), value: z.string() })),\n has: z.array(zRouteHas).optional(),\n missing: z.array(zRouteHas).optional(),\n\n internal: z.boolean().optional(),\n})\n\nconst zTurbopackLoaderItem: zod.ZodType<TurbopackLoaderItem> = z.union([\n z.string(),\n z.strictObject({\n loader: z.string(),\n // Any JSON value can be used as turbo loader options, so use z.any() here\n options: z.record(z.string(), z.any()).optional(),\n }),\n])\n\nconst zTurbopackLoaderBuiltinCondition: zod.ZodType<TurbopackLoaderBuiltinCondition> =\n z.union([\n z.literal('browser'),\n z.literal('foreign'),\n z.literal('development'),\n z.literal('production'),\n z.literal('node'),\n z.literal('edge-light'),\n ])\n\nconst zTurbopackCondition: zod.ZodType<TurbopackRuleCondition> = z.union([\n z.strictObject({ all: z.lazy(() => z.array(zTurbopackCondition)) }),\n z.strictObject({ any: z.lazy(() => z.array(zTurbopackCondition)) }),\n z.strictObject({ not: z.lazy(() => zTurbopackCondition) }),\n zTurbopackLoaderBuiltinCondition,\n z.strictObject({\n path: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n content: z.instanceof(RegExp).optional(),\n query: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n contentType: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n }),\n])\n\nconst zTurbopackModuleType = z.enum([\n 'asset',\n 'ecmascript',\n 'typescript',\n 'css',\n 'css-module',\n 'wasm',\n 'raw',\n 'node',\n 'bytes',\n])\n\nconst zTurbopackRuleConfigItem: zod.ZodType<TurbopackRuleConfigItem> =\n z.strictObject({\n loaders: z.array(zTurbopackLoaderItem).optional(),\n as: z.string().optional(),\n condition: zTurbopackCondition.optional(),\n type: zTurbopackModuleType.optional(),\n })\n\nconst zTurbopackRuleConfigCollection: zod.ZodType<TurbopackRuleConfigCollection> =\n z.union([\n zTurbopackRuleConfigItem,\n z.array(z.union([zTurbopackLoaderItem, zTurbopackRuleConfigItem])),\n ])\n\nconst zTurbopackConfig: zod.ZodType<TurbopackOptions> = z.strictObject({\n rules: z.record(z.string(), zTurbopackRuleConfigCollection).optional(),\n resolveAlias: z\n .record(\n z.string(),\n z.union([\n z.string(),\n z.array(z.string()),\n z.record(z.string(), z.union([z.string(), z.array(z.string())])),\n ])\n )\n .optional(),\n resolveExtensions: z.array(z.string()).optional(),\n root: z.string().optional(),\n debugIds: z.boolean().optional(),\n chunkLoadingGlobal: z.string().optional(),\n ignoreIssue: z\n .array(\n z.object({\n path: z.union([z.string(), z.instanceof(RegExp)]),\n title: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n description: z.union([z.string(), z.instanceof(RegExp)]).optional(),\n })\n )\n .optional(),\n})\n\nexport const experimentalSchema = {\n outputHashSalt: z.string().optional(),\n useSkewCookie: z.boolean().optional(),\n after: z.boolean().optional(),\n appNavFailHandling: z.boolean().optional(),\n appNewScrollHandler: z.boolean().optional(),\n preloadEntriesOnStart: z.boolean().optional(),\n allowedRevalidateHeaderKeys: z.array(z.string()).optional(),\n staleTimes: z\n .object({\n dynamic: z.number().optional(),\n static: z.number().gte(30).optional(),\n })\n .optional(),\n cacheLife: z\n .record(\n z.object({\n stale: z.number().optional(),\n revalidate: z.number().optional(),\n expire: z.number().optional(),\n })\n )\n .optional(),\n cacheHandlers: z.record(z.string(), z.string().optional()).optional(),\n clientRouterFilter: z.boolean().optional(),\n clientRouterFilterRedirects: z.boolean().optional(),\n clientRouterFilterAllowedRate: z.number().optional(),\n cpus: z.number().optional(),\n memoryBasedWorkersCount: z.boolean().optional(),\n craCompat: z.boolean().optional(),\n caseSensitiveRoutes: z.boolean().optional(),\n clientParamParsingOrigins: z.array(z.string()).optional(),\n cachedNavigations: z.boolean().optional(),\n dynamicOnHover: z.boolean().optional(),\n useOffline: z.boolean().optional(),\n optimisticRouting: z.boolean().optional(),\n appShells: z.boolean().optional(),\n varyParams: z.boolean().optional(),\n prefetchInlining: z\n .union([\n z.boolean(),\n z.object({\n maxSize: z.number().optional(),\n maxBundleSize: z.number().optional(),\n }),\n ])\n .optional(),\n disableOptimizedLoading: z.boolean().optional(),\n disablePostcssPresetEnv: z.boolean().optional(),\n cacheComponents: z.boolean().optional(),\n inlineCss: z.boolean().optional(),\n esmExternals: z.union([z.boolean(), z.literal('loose')]).optional(),\n serverActions: z\n .object({\n bodySizeLimit: zSizeLimit.optional(),\n allowedOrigins: z.array(z.string()).optional(),\n })\n .optional(),\n maxPostponedStateSize: zSizeLimit.optional(),\n // The original type was Record<string, any>\n extensionAlias: z.record(z.string(), z.any()).optional(),\n externalDir: z.boolean().optional(),\n externalMiddlewareRewritesResolve: z.boolean().optional(),\n externalProxyRewritesResolve: z.boolean().optional(),\n exposeTestingApiInProductionBuild: z.boolean().optional(),\n fallbackNodePolyfills: z.literal(false).optional(),\n fetchCacheKeyPrefix: z.string().optional(),\n forceSwcTransforms: z.boolean().optional(),\n fullySpecified: z.boolean().optional(),\n gzipSize: z.boolean().optional(),\n imgOptConcurrency: z.number().int().optional().nullable(),\n imgOptOperationCache: z.boolean().optional().nullable(),\n imgOptTimeoutInSeconds: z.number().int().optional(),\n imgOptMaxInputPixels: z.number().int().optional(),\n imgOptSequentialRead: z.boolean().optional().nullable(),\n imgOptSkipMetadata: z.boolean().optional().nullable(),\n isrFlushToDisk: z.boolean().optional(),\n largePageDataBytes: z.number().optional(),\n linkNoTouchStart: z.boolean().optional(),\n manualClientBasePath: z.boolean().optional(),\n middlewarePrefetch: z.enum(['strict', 'flexible']).optional(),\n proxyPrefetch: z.enum(['strict', 'flexible']).optional(),\n middlewareClientMaxBodySize: zSizeLimit.optional(),\n proxyClientMaxBodySize: zSizeLimit.optional(),\n multiZoneDraftMode: z.boolean().optional(),\n cssChunking: z\n .union([\n z.boolean(),\n z.literal('strict'),\n z.literal('loose'),\n z.literal('graph'),\n z.strictObject({ type: z.literal('strict') }),\n z.strictObject({ type: z.literal('loose') }),\n z.strictObject({\n type: z.literal('graph'),\n requestCost: z.number().nonnegative().finite().optional(),\n moduleFactorCost: z.number().nonnegative().finite().optional(),\n }),\n ])\n .optional(),\n nextScriptWorkers: z.boolean().optional(),\n // The critter option is unknown, use z.any() here\n optimizeCss: z.union([z.boolean(), z.any()]).optional(),\n optimisticClientCache: z.boolean().optional(),\n parallelServerCompiles: z.boolean().optional(),\n parallelServerBuildTraces: z.boolean().optional(),\n ppr: z\n .union([z.boolean(), z.literal('incremental')])\n .readonly()\n .optional(),\n taint: z.boolean().optional(),\n prerenderEarlyExit: z.boolean().optional(),\n proxyTimeout: z.number().gte(0).optional(),\n rootParams: z.boolean().optional(),\n mcpServer: z.boolean().optional(),\n removeUncaughtErrorAndRejectionListeners: z.boolean().optional(),\n validateRSCRequestHeaders: z.boolean().optional(),\n scrollRestoration: z.boolean().optional(),\n sri: z\n .object({\n algorithm: z.enum(['sha256', 'sha384', 'sha512']).optional(),\n })\n .optional(),\n swcPlugins: z\n // The specific swc plugin's option is unknown, use z.any() here\n .array(z.tuple([z.string(), z.record(z.string(), z.any())]))\n .optional(),\n swcEnvOptions: z\n .object({\n mode: z.enum(['usage', 'entry']).optional(),\n coreJs: z.string().optional(),\n skip: z.array(z.string()).optional(),\n include: z.array(z.string()).optional(),\n exclude: z.array(z.string()).optional(),\n shippedProposals: z.boolean().optional(),\n forceAllTransforms: z.boolean().optional(),\n debug: z.boolean().optional(),\n loose: z.boolean().optional(),\n })\n .optional(),\n swcTraceProfiling: z.boolean().optional(),\n // NonNullable<webpack.Configuration['experiments']>['buildHttp']\n urlImports: z.any().optional(),\n viewTransition: z.boolean().optional(),\n workerThreads: z.boolean().optional(),\n webVitalsAttribution: z\n .array(\n z.union([\n z.literal('CLS'),\n z.literal('FCP'),\n z.literal('FID'),\n z.literal('INP'),\n z.literal('LCP'),\n z.literal('TTFB'),\n ])\n )\n .optional(),\n // This is partial set of mdx-rs transform options we support, aligned\n // with next_core::next_config::MdxRsOptions. Ensure both types are kept in sync.\n mdxRs: z\n .union([\n z.boolean(),\n z.object({\n development: z.boolean().optional(),\n jsxRuntime: z.string().optional(),\n jsxImportSource: z.string().optional(),\n providerImportSource: z.string().optional(),\n mdxType: z.enum(['gfm', 'commonmark']).optional(),\n }),\n ])\n .optional(),\n transitionIndicator: z.boolean().optional(),\n gestureTransition: z.boolean().optional(),\n typedRoutes: z.boolean().optional(),\n webpackBuildWorker: z.boolean().optional(),\n webpackMemoryOptimizations: z.boolean().optional(),\n turbopackMemoryEviction: z\n .union([z.literal(false), z.literal('full')])\n .optional(),\n turbopackPluginRuntimeStrategy: z\n .enum(['workerThreads', 'childProcesses', 'forceWorkerThreads'])\n .optional(),\n turbopackMinify: z.boolean().optional(),\n turbopackFileSystemCacheForDev: z.boolean().optional(),\n turbopackFileSystemCacheForBuild: z.boolean().optional(),\n turbopackSourceMaps: z.boolean().optional(),\n turbopackInputSourceMaps: z.boolean().optional(),\n turbopackTreeShaking: z.boolean().optional(),\n turbopackRemoveUnusedImports: z.boolean().optional(),\n turbopackRemoveUnusedExports: z.boolean().optional(),\n turbopackScopeHoisting: z.boolean().optional(),\n turbopackWorkerAssetPrefix: z.string().optional(),\n turbopackClientSideNestedAsyncChunking: z.boolean().optional(),\n turbopackServerSideNestedAsyncChunking: z.boolean().optional(),\n turbopackImportTypeBytes: z.boolean().optional(),\n turbopackImportTypeText: z.boolean().optional(),\n turbopackUseBuiltinBabel: z.boolean().optional(),\n turbopackUseBuiltinSass: z.boolean().optional(),\n turbopackLocalPostcssConfig: z.boolean().optional(),\n turbopackModuleIds: z.enum(['named', 'deterministic']).optional(),\n turbopackInferModuleSideEffects: z.boolean().optional(),\n turbopackServerFastRefresh: z.boolean().optional(),\n optimizePackageImports: z.array(z.string()).optional(),\n optimizeServerReact: z.boolean().optional(),\n strictRouteTypes: z.boolean().optional(),\n clientTraceMetadata: z.array(z.string()).optional(),\n serverMinification: z.boolean().optional(),\n serverSourceMaps: z.boolean().optional(),\n useWasmBinary: z.boolean().optional(),\n useLightningcss: z.boolean().optional(),\n lightningCssFeatures: z\n .object({\n include: z.array(z.enum(LIGHTNINGCSS_FEATURE_NAMES)).optional(),\n exclude: z.array(z.enum(LIGHTNINGCSS_FEATURE_NAMES)).optional(),\n })\n .optional(),\n testProxy: z.boolean().optional(),\n defaultTestRunner: z.enum(SUPPORTED_TEST_RUNNERS_LIST).optional(),\n allowDevelopmentBuild: z.literal(true).optional(),\n\n reactDebugChannel: z.boolean().optional(),\n instantInsights: z\n .object({\n validationLevel: z\n .enum([\n 'warning',\n 'manual-warning',\n 'experimental-error',\n 'experimental-manual-error',\n ])\n .optional(),\n })\n .optional(),\n staticGenerationRetryCount: z.number().int().optional(),\n staticGenerationMaxConcurrency: z.number().int().optional(),\n staticGenerationMinPagesPerWorker: z.number().int().optional(),\n typedEnv: z.boolean().optional(),\n serverComponentsHmrCache: z.boolean().optional(),\n authInterrupts: z.boolean().optional(),\n useCache: z.boolean().optional(),\n useCacheTimeout: z.number().positive().optional(),\n slowModuleDetection: z\n .object({\n buildTimeThresholdMs: z.number().int(),\n })\n .optional(),\n globalNotFound: z.boolean().optional(),\n turbopackRustReactCompiler: z.boolean().optional(),\n browserDebugInfoInTerminal: z\n .union([\n z.boolean(),\n z.enum(['error', 'warn', 'verbose']),\n z.object({\n level: z.enum(['error', 'warn', 'verbose']).optional(),\n depthLimit: z.number().int().positive().optional(),\n edgeLimit: z.number().int().positive().optional(),\n showSourceLocation: z.boolean().optional(),\n }),\n ])\n .optional(),\n lockDistDir: z.boolean().optional(),\n hideLogsAfterAbort: z.boolean().optional(),\n runtimeServerDeploymentId: z.boolean().optional(),\n supportsImmutableAssets: z.boolean().optional(),\n deferredEntries: z.array(z.string()).optional(),\n onBeforeDeferredEntries: z.function().returns(z.promise(z.void())).optional(),\n reportSystemEnvInlining: z.enum(['warn', 'error']).optional(),\n}\n\nexport const configSchema: zod.ZodType<NextConfig> = z.lazy(() =>\n z.strictObject({\n adapterPath: z.string().optional(),\n agentRules: z.boolean().optional(),\n allowedDevOrigins: z.array(z.string()).optional(),\n assetPrefix: z.string().optional(),\n basePath: z.string().optional(),\n bundlePagesRouterDependencies: z.boolean().optional(),\n cacheComponents: z.boolean().optional(),\n cacheHandler: z.string().min(1).optional(),\n cacheHandlers: z.record(z.string(), z.string().optional()).optional(),\n cacheLife: z\n .record(\n z.object({\n stale: z.number().optional(),\n revalidate: z.number().optional(),\n expire: z.number().optional(),\n })\n )\n .optional(),\n cacheMaxMemorySize: z.number().optional(),\n cleanDistDir: z.boolean().optional(),\n compiler: z\n .strictObject({\n emotion: z\n .union([\n z.boolean(),\n z.object({\n sourceMap: z.boolean().optional(),\n autoLabel: z\n .union([\n z.literal('always'),\n z.literal('dev-only'),\n z.literal('never'),\n ])\n .optional(),\n labelFormat: z.string().min(1).optional(),\n importMap: z\n .record(\n z.string(),\n z.record(\n z.string(),\n z.object({\n canonicalImport: z\n .tuple([z.string(), z.string()])\n .optional(),\n styledBaseImport: z\n .tuple([z.string(), z.string()])\n .optional(),\n })\n )\n )\n .optional(),\n }),\n ])\n .optional(),\n reactRemoveProperties: z\n .union([\n z.boolean().optional(),\n z.object({\n properties: z.array(z.string()).optional(),\n }),\n ])\n .optional(),\n relay: z\n .object({\n src: z.string(),\n artifactDirectory: z.string().optional(),\n language: z.enum(['javascript', 'typescript', 'flow']).optional(),\n eagerEsModules: z.boolean().optional(),\n })\n .optional(),\n removeConsole: z\n .union([\n z.boolean().optional(),\n z.object({\n exclude: z.array(z.string()).min(1).optional(),\n }),\n ])\n .optional(),\n styledComponents: z.union([\n z.boolean().optional(),\n z.object({\n displayName: z.boolean().optional(),\n topLevelImportPaths: z.array(z.string()).optional(),\n ssr: z.boolean().optional(),\n fileName: z.boolean().optional(),\n meaninglessFileNames: z.array(z.string()).optional(),\n minify: z.boolean().optional(),\n transpileTemplateLiterals: z.boolean().optional(),\n namespace: z.string().min(1).optional(),\n pure: z.boolean().optional(),\n cssProp: z.boolean().optional(),\n }),\n ]),\n styledJsx: z.union([\n z.boolean().optional(),\n z.object({\n useLightningcss: z.boolean().optional(),\n }),\n ]),\n define: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional(),\n defineServer: z\n .record(z.string(), z.union([z.string(), z.number(), z.boolean()]))\n .optional(),\n runAfterProductionCompile: z\n .function()\n .returns(z.promise(z.void()))\n .optional(),\n })\n .optional(),\n compress: z.boolean().optional(),\n configOrigin: z.string().optional(),\n crossOrigin: z\n .union([z.literal('anonymous'), z.literal('use-credentials')])\n .optional(),\n deploymentId: z.string().optional(),\n devIndicators: z\n .union([\n z.object({\n position: z\n .union([\n z.literal('bottom-left'),\n z.literal('bottom-right'),\n z.literal('top-left'),\n z.literal('top-right'),\n ])\n .optional(),\n }),\n z.literal(false),\n ])\n .optional(),\n distDir: z.string().min(1).optional(),\n env: z.record(z.string(), z.union([z.string(), z.undefined()])).optional(),\n enablePrerenderSourceMaps: z.boolean().optional(),\n excludeDefaultMomentLocales: z.boolean().optional(),\n experimental: z.strictObject(experimentalSchema).optional(),\n exportPathMap: z\n .function()\n .args(\n zExportMap,\n z.object({\n dev: z.boolean(),\n dir: z.string(),\n outDir: z.string().nullable(),\n distDir: z.string(),\n buildId: z.string(),\n })\n )\n .returns(z.union([zExportMap, z.promise(zExportMap)]))\n .optional(),\n generateBuildId: z\n .function()\n .args()\n .returns(\n z.union([\n z.string(),\n z.null(),\n z.promise(z.union([z.string(), z.null()])),\n ])\n )\n .optional(),\n generateEtags: z.boolean().optional(),\n headers: z\n .function()\n .args()\n .returns(z.promise(z.array(zHeader)))\n .optional(),\n htmlLimitedBots: z.instanceof(RegExp).optional(),\n httpAgentOptions: z\n .strictObject({ keepAlive: z.boolean().optional() })\n .optional(),\n i18n: z\n .strictObject({\n defaultLocale: z.string().min(1),\n domains: z\n .array(\n z.strictObject({\n defaultLocale: z.string().min(1),\n domain: z.string().min(1),\n http: z.literal(true).optional(),\n locales: z.array(z.string().min(1)).optional(),\n })\n )\n .optional(),\n localeDetection: z.literal(false).optional(),\n locales: z.array(z.string().min(1)),\n })\n .nullable()\n .optional(),\n images: z\n .strictObject({\n localPatterns: z\n .array(\n z.strictObject({\n pathname: z.string().optional(),\n search: z.string().optional(),\n })\n )\n .max(25)\n .optional(),\n remotePatterns: z\n .array(\n z.union([\n z.instanceof(URL),\n z.strictObject({\n hostname: z.string(),\n pathname: z.string().optional(),\n port: z.string().max(5).optional(),\n protocol: z.enum(['http', 'https']).optional(),\n search: z.string().optional(),\n }),\n ])\n )\n .max(50)\n .optional(),\n unoptimized: z.boolean().optional(),\n customCacheHandler: z.boolean().optional(),\n contentSecurityPolicy: z.string().optional(),\n contentDispositionType: z.enum(['inline', 'attachment']).optional(),\n dangerouslyAllowSVG: z.boolean().optional(),\n dangerouslyAllowLocalIP: z.boolean().optional(),\n deviceSizes: z\n .array(z.number().int().gte(1).lte(10000))\n .max(25)\n .optional(),\n disableStaticImages: z.boolean().optional(),\n domains: z.array(z.string()).max(50).optional(),\n formats: z\n .array(z.enum(['image/avif', 'image/webp']))\n .max(4)\n .optional(),\n imageSizes: z\n .array(z.number().int().gte(1).lte(10000))\n .min(0)\n .max(25)\n .optional(),\n loader: z.enum(VALID_LOADERS).optional(),\n loaderFile: z.string().optional(),\n maximumDiskCacheSize: z.number().int().min(0).optional(),\n maximumRedirects: z.number().int().min(0).max(20).optional(),\n maximumResponseBody: z\n .number()\n .int()\n .min(1)\n .max(Number.MAX_SAFE_INTEGER)\n .optional(),\n minimumCacheTTL: z.number().int().gte(0).optional(),\n path: z.string().optional(),\n qualities: z\n .array(z.number().int().gte(1).lte(100))\n .min(1)\n .max(20)\n .optional(),\n })\n .optional(),\n logging: z\n .union([\n z.object({\n fetches: z\n .object({\n fullUrl: z.boolean().optional(),\n hmrRefreshes: z.boolean().optional(),\n })\n .optional(),\n incomingRequests: z\n .union([\n z.boolean(),\n z.object({\n ignore: z.array(z.instanceof(RegExp)),\n }),\n ])\n .optional(),\n serverFunctions: z.boolean().optional(),\n browserToTerminal: z\n .union([z.boolean(), z.enum(['error', 'warn'])])\n .optional(),\n }),\n z.literal(false),\n ])\n .optional(),\n modularizeImports: z\n .record(\n z.string(),\n z.object({\n transform: z.union([z.string(), z.record(z.string(), z.string())]),\n preventFullImport: z.boolean().optional(),\n skipDefaultConversion: z.boolean().optional(),\n })\n )\n .optional(),\n onDemandEntries: z\n .strictObject({\n maxInactiveAge: z.number().optional(),\n pagesBufferLength: z.number().optional(),\n })\n .optional(),\n output: z.enum(['standalone', 'export']).optional(),\n outputFileTracingRoot: z.string().optional(),\n outputFileTracingExcludes: z\n .record(z.string(), z.array(z.string()))\n .optional(),\n outputFileTracingIncludes: z\n .record(z.string(), z.array(z.string()))\n .optional(),\n pageExtensions: z.array(z.string()).min(1).optional(),\n instrumentationClientInject: z.array(z.string()).optional(),\n partialPrefetching: z\n .union([z.boolean(), z.literal('unstable_eager')])\n .optional(),\n poweredByHeader: z.boolean().optional(),\n productionBrowserSourceMaps: z.boolean().optional(),\n reactCompiler: z.union([\n z.boolean(),\n z\n .object({\n compilationMode: z.enum(['infer', 'annotation', 'all']).optional(),\n panicThreshold: z\n .enum(['none', 'critical_errors', 'all_errors'])\n .optional(),\n })\n .optional(),\n ]),\n reactProductionProfiling: z.boolean().optional(),\n reactStrictMode: z.boolean().nullable().optional(),\n reactMaxHeadersLength: z.number().nonnegative().int().optional(),\n redirects: z\n .function()\n .args()\n .returns(z.promise(z.array(zRedirect)))\n .optional(),\n rewrites: z\n .function()\n .args()\n .returns(\n z.promise(\n z.union([\n z.array(zRewrite),\n z.object({\n beforeFiles: z.array(zRewrite),\n afterFiles: z.array(zRewrite),\n fallback: z.array(zRewrite),\n }),\n ])\n )\n )\n .optional(),\n // sassOptions properties are unknown besides implementation, use z.any() here\n sassOptions: z\n .object({\n implementation: z.string().optional(),\n })\n .catchall(z.any())\n .optional(),\n serverExternalPackages: z.array(z.string()).optional(),\n skipMiddlewareUrlNormalize: z.boolean().optional(),\n skipProxyUrlNormalize: z.boolean().optional(),\n skipTrailingSlashRedirect: z.boolean().optional(),\n staticPageGenerationTimeout: z.number().optional(),\n expireTime: z.number().optional(),\n target: z.string().optional(),\n trailingSlash: z.boolean().optional(),\n transpilePackages: z.array(z.string()).optional(),\n turbopack: zTurbopackConfig.optional(),\n typescript: z\n .strictObject({\n ignoreBuildErrors: z.boolean().optional(),\n tsconfigPath: z.string().min(1).optional(),\n })\n .optional(),\n typedRoutes: z.boolean().optional(),\n useFileSystemPublicRoutes: z.boolean().optional(),\n // The webpack config type is unknown, use z.any() here\n webpack: z.any().nullable().optional(),\n watchOptions: z\n .strictObject({\n pollIntervalMs: z.number().positive().finite().optional(),\n })\n .optional(),\n })\n)\n"],"names":["configSchema","experimentalSchema","zSizeLimit","z","custom","val","zExportMap","record","string","object","page","query","any","_fallbackRouteParams","array","optional","_isAppDir","boolean","_isDynamicError","_isRoutePPREnabled","_allowEmptyStaticShell","zRouteHas","union","type","enum","key","value","literal","undefined","zRewrite","source","destination","basePath","locale","has","missing","internal","zRedirect","and","statusCode","never","permanent","number","zHeader","headers","zTurbopackLoaderItem","strictObject","loader","options","zTurbopackLoaderBuiltinCondition","zTurbopackCondition","all","lazy","not","path","instanceof","RegExp","content","contentType","zTurbopackModuleType","zTurbopackRuleConfigItem","loaders","as","condition","zTurbopackRuleConfigCollection","zTurbopackConfig","rules","resolveAlias","resolveExtensions","root","debugIds","chunkLoadingGlobal","ignoreIssue","title","description","outputHashSalt","useSkewCookie","after","appNavFailHandling","appNewScrollHandler","preloadEntriesOnStart","allowedRevalidateHeaderKeys","staleTimes","dynamic","static","gte","cacheLife","stale","revalidate","expire","cacheHandlers","clientRouterFilter","clientRouterFilterRedirects","clientRouterFilterAllowedRate","cpus","memoryBasedWorkersCount","craCompat","caseSensitiveRoutes","clientParamParsingOrigins","cachedNavigations","dynamicOnHover","useOffline","optimisticRouting","appShells","varyParams","prefetchInlining","maxSize","maxBundleSize","disableOptimizedLoading","disablePostcssPresetEnv","cacheComponents","inlineCss","esmExternals","serverActions","bodySizeLimit","allowedOrigins","maxPostponedStateSize","extensionAlias","externalDir","externalMiddlewareRewritesResolve","externalProxyRewritesResolve","exposeTestingApiInProductionBuild","fallbackNodePolyfills","fetchCacheKeyPrefix","forceSwcTransforms","fullySpecified","gzipSize","imgOptConcurrency","int","nullable","imgOptOperationCache","imgOptTimeoutInSeconds","imgOptMaxInputPixels","imgOptSequentialRead","imgOptSkipMetadata","isrFlushToDisk","largePageDataBytes","linkNoTouchStart","manualClientBasePath","middlewarePrefetch","proxyPrefetch","middlewareClientMaxBodySize","proxyClientMaxBodySize","multiZoneDraftMode","cssChunking","requestCost","nonnegative","finite","moduleFactorCost","nextScriptWorkers","optimizeCss","optimisticClientCache","parallelServerCompiles","parallelServerBuildTraces","ppr","readonly","taint","prerenderEarlyExit","proxyTimeout","rootParams","mcpServer","removeUncaughtErrorAndRejectionListeners","validateRSCRequestHeaders","scrollRestoration","sri","algorithm","swcPlugins","tuple","swcEnvOptions","mode","coreJs","skip","include","exclude","shippedProposals","forceAllTransforms","debug","loose","swcTraceProfiling","urlImports","viewTransition","workerThreads","webVitalsAttribution","mdxRs","development","jsxRuntime","jsxImportSource","providerImportSource","mdxType","transitionIndicator","gestureTransition","typedRoutes","webpackBuildWorker","webpackMemoryOptimizations","turbopackMemoryEviction","turbopackPluginRuntimeStrategy","turbopackMinify","turbopackFileSystemCacheForDev","turbopackFileSystemCacheForBuild","turbopackSourceMaps","turbopackInputSourceMaps","turbopackTreeShaking","turbopackRemoveUnusedImports","turbopackRemoveUnusedExports","turbopackScopeHoisting","turbopackWorkerAssetPrefix","turbopackClientSideNestedAsyncChunking","turbopackServerSideNestedAsyncChunking","turbopackImportTypeBytes","turbopackImportTypeText","turbopackUseBuiltinBabel","turbopackUseBuiltinSass","turbopackLocalPostcssConfig","turbopackModuleIds","turbopackInferModuleSideEffects","turbopackServerFastRefresh","optimizePackageImports","optimizeServerReact","strictRouteTypes","clientTraceMetadata","serverMinification","serverSourceMaps","useWasmBinary","useLightningcss","lightningCssFeatures","LIGHTNINGCSS_FEATURE_NAMES","testProxy","defaultTestRunner","SUPPORTED_TEST_RUNNERS_LIST","allowDevelopmentBuild","reactDebugChannel","instantInsights","validationLevel","staticGenerationRetryCount","staticGenerationMaxConcurrency","staticGenerationMinPagesPerWorker","typedEnv","serverComponentsHmrCache","authInterrupts","useCache","useCacheTimeout","positive","slowModuleDetection","buildTimeThresholdMs","globalNotFound","turbopackRustReactCompiler","browserDebugInfoInTerminal","level","depthLimit","edgeLimit","showSourceLocation","lockDistDir","hideLogsAfterAbort","runtimeServerDeploymentId","supportsImmutableAssets","deferredEntries","onBeforeDeferredEntries","function","returns","promise","void","reportSystemEnvInlining","adapterPath","agentRules","allowedDevOrigins","assetPrefix","bundlePagesRouterDependencies","cacheHandler","min","cacheMaxMemorySize","cleanDistDir","compiler","emotion","sourceMap","autoLabel","labelFormat","importMap","canonicalImport","styledBaseImport","reactRemoveProperties","properties","relay","src","artifactDirectory","language","eagerEsModules","removeConsole","styledComponents","displayName","topLevelImportPaths","ssr","fileName","meaninglessFileNames","minify","transpileTemplateLiterals","namespace","pure","cssProp","styledJsx","define","defineServer","runAfterProductionCompile","compress","configOrigin","crossOrigin","deploymentId","devIndicators","position","distDir","env","enablePrerenderSourceMaps","excludeDefaultMomentLocales","experimental","exportPathMap","args","dev","dir","outDir","buildId","generateBuildId","null","generateEtags","htmlLimitedBots","httpAgentOptions","keepAlive","i18n","defaultLocale","domains","domain","http","locales","localeDetection","images","localPatterns","pathname","search","max","remotePatterns","URL","hostname","port","protocol","unoptimized","customCacheHandler","contentSecurityPolicy","contentDispositionType","dangerouslyAllowSVG","dangerouslyAllowLocalIP","deviceSizes","lte","disableStaticImages","formats","imageSizes","VALID_LOADERS","loaderFile","maximumDiskCacheSize","maximumRedirects","maximumResponseBody","Number","MAX_SAFE_INTEGER","minimumCacheTTL","qualities","logging","fetches","fullUrl","hmrRefreshes","incomingRequests","ignore","serverFunctions","browserToTerminal","modularizeImports","transform","preventFullImport","skipDefaultConversion","onDemandEntries","maxInactiveAge","pagesBufferLength","output","outputFileTracingRoot","outputFileTracingExcludes","outputFileTracingIncludes","pageExtensions","instrumentationClientInject","partialPrefetching","poweredByHeader","productionBrowserSourceMaps","reactCompiler","compilationMode","panicThreshold","reactProductionProfiling","reactStrictMode","reactMaxHeadersLength","redirects","rewrites","beforeFiles","afterFiles","fallback","sassOptions","implementation","catchall","serverExternalPackages","skipMiddlewareUrlNormalize","skipProxyUrlNormalize","skipTrailingSlashRedirect","staticPageGenerationTimeout","expireTime","target","trailingSlash","transpilePackages","turbopack","typescript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GACCA,QAAQ;IACb","ignoreList":[0]} |
@@ -94,3 +94,3 @@ "use strict"; | ||
| } | ||
| _log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"16.3.0-canary.51"}`))}${versionSuffix}`); | ||
| _log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"16.3.0-canary.52"}`))}${versionSuffix}`); | ||
| if (appUrl) { | ||
@@ -97,0 +97,0 @@ _log.bootstrap(`- Local: ${appUrl}`); |
@@ -58,2 +58,4 @@ /** | ||
| This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in \`node_modules/next/dist/docs/\` before writing any code. Heed deprecation notices. | ||
| **Keep this block, including in commits.** It is part of the project's agent setup, maintained by \`next dev\` for every agent that works here. If it appears as an uncommitted change, that is intentional — commit it as-is. Do not remove it to clean up a diff; it will be regenerated. | ||
| ${AGENT_RULES_END_MARKER}`; | ||
@@ -60,0 +62,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../src/server/lib/generate-agent-files.ts"],"sourcesContent":["/**\n * Auto-generate AGENTS.md / CLAUDE.md with the managed Next.js agent-rules\n * block when `next dev` detects an AI coding agent but the block is missing.\n *\n * Keep the marker and block content in sync with:\n * - packages/create-next-app/helpers/generate-agent-files.ts\n * - packages/next-codemod/lib/agents-md.ts\n */\n\nimport fs from 'fs'\nimport path from 'path'\n\nexport const AGENT_RULES_START_MARKER = '<!-- BEGIN:nextjs-agent-rules -->'\nexport const AGENT_RULES_END_MARKER = '<!-- END:nextjs-agent-rules -->'\n\n/**\n * Markers written by the pre-bundled-docs version of `agents-md`.\n * Stripped on upsert so projects that ran the old codemod end up with\n * a single current block instead of two stale-and-current blocks.\n */\nconst LEGACY_AGENT_RULES_START_MARKER = '<!-- NEXT-AGENTS-MD-START -->'\nconst LEGACY_AGENT_RULES_END_MARKER = '<!-- NEXT-AGENTS-MD-END -->'\n\nfunction buildAgentRulesBlock(): string {\n return `${AGENT_RULES_START_MARKER}\n# This is NOT the Next.js you know\n\nThis version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in \\`node_modules/next/dist/docs/\\` before writing any code. Heed deprecation notices.\n${AGENT_RULES_END_MARKER}`\n}\n\nconst CLAUDE_MD_CONTENT = `@AGENTS.md\\n`\n\nexport type AgentFileAction = 'created' | 'updated' | 'unchanged' | 'skipped'\n\nexport interface AgentFilesResult {\n agentsMd: AgentFileAction\n claudeMd: AgentFileAction\n}\n\n/**\n * Returns true when `AGENTS.md` or `CLAUDE.md` at `dir` contains the\n * managed agent-rules marker.\n */\nexport function hasAgentRulesInstalled(dir: string): boolean {\n const agentsContent = tryReadFile(path.join(dir, 'AGENTS.md'))\n if (agentsContent?.includes(AGENT_RULES_START_MARKER)) return true\n\n const claudeContent = tryReadFile(path.join(dir, 'CLAUDE.md'))\n if (claudeContent?.includes(AGENT_RULES_START_MARKER)) return true\n\n return false\n}\n\n/**\n * Write the agent-rules block into `projectDir`, respecting whichever\n * file the user already uses:\n *\n * - `AGENTS.md` exists → upsert into it, leave `CLAUDE.md` alone.\n * - `CLAUDE.md` exists (but not `AGENTS.md`) → upsert into it.\n * - Neither exists → create both (`AGENTS.md` + `CLAUDE.md` with\n * `@AGENTS.md` import), matching `create-next-app`.\n *\n * Idempotent: a file already containing the canonical block is\n * reported as `unchanged`.\n */\nexport function writeAgentFiles(projectDir: string): AgentFilesResult {\n const agentsMdPath = path.join(projectDir, 'AGENTS.md')\n const claudeMdPath = path.join(projectDir, 'CLAUDE.md')\n const block = buildAgentRulesBlock()\n\n const agentsMdExists = fs.existsSync(agentsMdPath)\n const claudeMdExists = fs.existsSync(claudeMdPath)\n\n if (agentsMdExists) {\n return {\n agentsMd: upsertFile(agentsMdPath, block),\n claudeMd: 'skipped',\n }\n }\n\n if (claudeMdExists) {\n return {\n agentsMd: 'skipped',\n claudeMd: upsertFile(claudeMdPath, block),\n }\n }\n\n // Neither file exists — scaffold both, matching create-next-app.\n fs.writeFileSync(agentsMdPath, block + '\\n', 'utf-8')\n fs.writeFileSync(claudeMdPath, CLAUDE_MD_CONTENT, 'utf-8')\n return { agentsMd: 'created', claudeMd: 'created' }\n}\n\n// ---------------------------------------------------------------------------\n// Internal helpers\n// ---------------------------------------------------------------------------\n\nfunction tryReadFile(filePath: string): string | null {\n try {\n return fs.readFileSync(filePath, 'utf-8')\n } catch {\n return null\n }\n}\n\nfunction upsertFile(filePath: string, block: string): AgentFileAction {\n const existing = fs.readFileSync(filePath, 'utf-8')\n const updated = upsertAgentRulesBlock(existing, block)\n if (updated === existing) return 'unchanged'\n fs.writeFileSync(filePath, updated, 'utf-8')\n return 'updated'\n}\n\n/**\n * Detect the predominant line-ending style. Returns `'\\r\\n'` if any\n * CRLF is present, `'\\n'` otherwise — avoids mixed EOLs on Windows.\n */\nfunction detectEol(content: string): '\\r\\n' | '\\n' {\n return /\\r\\n/.test(content) ? '\\r\\n' : '\\n'\n}\n\nfunction normalizeEol(s: string, eol: '\\r\\n' | '\\n'): string {\n return s.replace(/\\r?\\n/g, eol)\n}\n\nfunction upsertAgentRulesBlock(existing: string, block: string): string {\n const eol = detectEol(existing)\n const normalizedBlock = normalizeEol(block, eol)\n\n existing = stripLegacyAgentRulesBlock(existing, eol)\n\n const startIdx = existing.indexOf(AGENT_RULES_START_MARKER)\n const endIdx = existing.indexOf(AGENT_RULES_END_MARKER)\n\n if (startIdx !== -1 && endIdx !== -1 && endIdx > startIdx) {\n const before = existing.slice(0, startIdx)\n const after = existing.slice(endIdx + AGENT_RULES_END_MARKER.length)\n const replaced = before + normalizedBlock + after\n return replaced === existing ? existing : replaced\n }\n\n const separator =\n existing.length === 0 || /\\r?\\n$/.test(existing) ? eol : eol + eol\n return existing + separator + normalizedBlock + eol\n}\n\nfunction stripLegacyAgentRulesBlock(\n existing: string,\n eol: '\\r\\n' | '\\n' = '\\n'\n): string {\n while (true) {\n const startIdx = existing.indexOf(LEGACY_AGENT_RULES_START_MARKER)\n if (startIdx === -1) return existing\n const endIdx = existing.indexOf(LEGACY_AGENT_RULES_END_MARKER, startIdx)\n if (endIdx === -1) return existing\n\n let cutStart = startIdx\n while (cutStart > 0 && /\\s/.test(existing[cutStart - 1])) {\n cutStart--\n }\n let cutEnd = endIdx + LEGACY_AGENT_RULES_END_MARKER.length\n while (cutEnd < existing.length && /\\s/.test(existing[cutEnd])) {\n cutEnd++\n }\n\n const before = existing.slice(0, cutStart)\n const after = existing.slice(cutEnd)\n\n existing =\n before.length > 0 && after.length > 0\n ? before + eol + eol + after\n : before + after\n }\n}\n"],"names":["AGENT_RULES_END_MARKER","AGENT_RULES_START_MARKER","hasAgentRulesInstalled","writeAgentFiles","LEGACY_AGENT_RULES_START_MARKER","LEGACY_AGENT_RULES_END_MARKER","buildAgentRulesBlock","CLAUDE_MD_CONTENT","dir","agentsContent","tryReadFile","path","join","includes","claudeContent","projectDir","agentsMdPath","claudeMdPath","block","agentsMdExists","fs","existsSync","claudeMdExists","agentsMd","upsertFile","claudeMd","writeFileSync","filePath","readFileSync","existing","updated","upsertAgentRulesBlock","detectEol","content","test","normalizeEol","s","eol","replace","normalizedBlock","stripLegacyAgentRulesBlock","startIdx","indexOf","endIdx","before","slice","after","length","replaced","separator","cutStart","cutEnd"],"mappings":"AAAA;;;;;;;CAOC;;;;;;;;;;;;;;;;;IAMYA,sBAAsB;eAAtBA;;IADAC,wBAAwB;eAAxBA;;IAgCGC,sBAAsB;eAAtBA;;IAsBAC,eAAe;eAAfA;;;2DAzDD;6DACE;;;;;;AAEV,MAAMF,2BAA2B;AACjC,MAAMD,yBAAyB;AAEtC;;;;CAIC,GACD,MAAMI,kCAAkC;AACxC,MAAMC,gCAAgC;AAEtC,SAASC;IACP,OAAO,GAAGL,yBAAyB;;;;AAIrC,EAAED,wBAAwB;AAC1B;AAEA,MAAMO,oBAAoB,CAAC,YAAY,CAAC;AAajC,SAASL,uBAAuBM,GAAW;IAChD,MAAMC,gBAAgBC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CAACsB,OAAO,EAAG;YAC9DA;QACF;QAEA,MAAMP,SAASf,SAASgB,KAAK,CAAC,GAAGK;QACjC,MAAMJ,QAAQjB,SAASgB,KAAK,CAACM;QAE7BtB,WACEe,OAAOG,MAAM,GAAG,KAAKD,MAAMC,MAAM,GAAG,IAChCH,SAASP,MAAMA,MAAMS,QACrBF,SAASE;IACjB;AACF","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../src/server/lib/generate-agent-files.ts"],"sourcesContent":["/**\n * Auto-generate AGENTS.md / CLAUDE.md with the managed Next.js agent-rules\n * block when `next dev` detects an AI coding agent but the block is missing.\n *\n * Keep the marker and block content in sync with:\n * - packages/create-next-app/helpers/generate-agent-files.ts\n * - packages/next-codemod/lib/agents-md.ts\n */\n\nimport fs from 'fs'\nimport path from 'path'\n\nexport const AGENT_RULES_START_MARKER = '<!-- BEGIN:nextjs-agent-rules -->'\nexport const AGENT_RULES_END_MARKER = '<!-- END:nextjs-agent-rules -->'\n\n/**\n * Markers written by the pre-bundled-docs version of `agents-md`.\n * Stripped on upsert so projects that ran the old codemod end up with\n * a single current block instead of two stale-and-current blocks.\n */\nconst LEGACY_AGENT_RULES_START_MARKER = '<!-- NEXT-AGENTS-MD-START -->'\nconst LEGACY_AGENT_RULES_END_MARKER = '<!-- NEXT-AGENTS-MD-END -->'\n\nfunction buildAgentRulesBlock(): string {\n return `${AGENT_RULES_START_MARKER}\n# This is NOT the Next.js you know\n\nThis version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in \\`node_modules/next/dist/docs/\\` before writing any code. Heed deprecation notices.\n\n**Keep this block, including in commits.** It is part of the project's agent setup, maintained by \\`next dev\\` for every agent that works here. If it appears as an uncommitted change, that is intentional — commit it as-is. Do not remove it to clean up a diff; it will be regenerated.\n${AGENT_RULES_END_MARKER}`\n}\n\nconst CLAUDE_MD_CONTENT = `@AGENTS.md\\n`\n\nexport type AgentFileAction = 'created' | 'updated' | 'unchanged' | 'skipped'\n\nexport interface AgentFilesResult {\n agentsMd: AgentFileAction\n claudeMd: AgentFileAction\n}\n\n/**\n * Returns true when `AGENTS.md` or `CLAUDE.md` at `dir` contains the\n * managed agent-rules marker.\n */\nexport function hasAgentRulesInstalled(dir: string): boolean {\n const agentsContent = tryReadFile(path.join(dir, 'AGENTS.md'))\n if (agentsContent?.includes(AGENT_RULES_START_MARKER)) return true\n\n const claudeContent = tryReadFile(path.join(dir, 'CLAUDE.md'))\n if (claudeContent?.includes(AGENT_RULES_START_MARKER)) return true\n\n return false\n}\n\n/**\n * Write the agent-rules block into `projectDir`, respecting whichever\n * file the user already uses:\n *\n * - `AGENTS.md` exists → upsert into it, leave `CLAUDE.md` alone.\n * - `CLAUDE.md` exists (but not `AGENTS.md`) → upsert into it.\n * - Neither exists → create both (`AGENTS.md` + `CLAUDE.md` with\n * `@AGENTS.md` import), matching `create-next-app`.\n *\n * Idempotent: a file already containing the canonical block is\n * reported as `unchanged`.\n */\nexport function writeAgentFiles(projectDir: string): AgentFilesResult {\n const agentsMdPath = path.join(projectDir, 'AGENTS.md')\n const claudeMdPath = path.join(projectDir, 'CLAUDE.md')\n const block = buildAgentRulesBlock()\n\n const agentsMdExists = fs.existsSync(agentsMdPath)\n const claudeMdExists = fs.existsSync(claudeMdPath)\n\n if (agentsMdExists) {\n return {\n agentsMd: upsertFile(agentsMdPath, block),\n claudeMd: 'skipped',\n }\n }\n\n if (claudeMdExists) {\n return {\n agentsMd: 'skipped',\n claudeMd: upsertFile(claudeMdPath, block),\n }\n }\n\n // Neither file exists — scaffold both, matching create-next-app.\n fs.writeFileSync(agentsMdPath, block + '\\n', 'utf-8')\n fs.writeFileSync(claudeMdPath, CLAUDE_MD_CONTENT, 'utf-8')\n return { agentsMd: 'created', claudeMd: 'created' }\n}\n\n// ---------------------------------------------------------------------------\n// Internal helpers\n// ---------------------------------------------------------------------------\n\nfunction tryReadFile(filePath: string): string | null {\n try {\n return fs.readFileSync(filePath, 'utf-8')\n } catch {\n return null\n }\n}\n\nfunction upsertFile(filePath: string, block: string): AgentFileAction {\n const existing = fs.readFileSync(filePath, 'utf-8')\n const updated = upsertAgentRulesBlock(existing, block)\n if (updated === existing) return 'unchanged'\n fs.writeFileSync(filePath, updated, 'utf-8')\n return 'updated'\n}\n\n/**\n * Detect the predominant line-ending style. Returns `'\\r\\n'` if any\n * CRLF is present, `'\\n'` otherwise — avoids mixed EOLs on Windows.\n */\nfunction detectEol(content: string): '\\r\\n' | '\\n' {\n return /\\r\\n/.test(content) ? '\\r\\n' : '\\n'\n}\n\nfunction normalizeEol(s: string, eol: '\\r\\n' | '\\n'): string {\n return s.replace(/\\r?\\n/g, eol)\n}\n\nfunction upsertAgentRulesBlock(existing: string, block: string): string {\n const eol = detectEol(existing)\n const normalizedBlock = normalizeEol(block, eol)\n\n existing = stripLegacyAgentRulesBlock(existing, eol)\n\n const startIdx = existing.indexOf(AGENT_RULES_START_MARKER)\n const endIdx = existing.indexOf(AGENT_RULES_END_MARKER)\n\n if (startIdx !== -1 && endIdx !== -1 && endIdx > startIdx) {\n const before = existing.slice(0, startIdx)\n const after = existing.slice(endIdx + AGENT_RULES_END_MARKER.length)\n const replaced = before + normalizedBlock + after\n return replaced === existing ? existing : replaced\n }\n\n const separator =\n existing.length === 0 || /\\r?\\n$/.test(existing) ? eol : eol + eol\n return existing + separator + normalizedBlock + eol\n}\n\nfunction stripLegacyAgentRulesBlock(\n existing: string,\n eol: '\\r\\n' | '\\n' = '\\n'\n): string {\n while (true) {\n const startIdx = existing.indexOf(LEGACY_AGENT_RULES_START_MARKER)\n if (startIdx === -1) return existing\n const endIdx = existing.indexOf(LEGACY_AGENT_RULES_END_MARKER, startIdx)\n if (endIdx === -1) return existing\n\n let cutStart = startIdx\n while (cutStart > 0 && /\\s/.test(existing[cutStart - 1])) {\n cutStart--\n }\n let cutEnd = endIdx + LEGACY_AGENT_RULES_END_MARKER.length\n while (cutEnd < existing.length && /\\s/.test(existing[cutEnd])) {\n cutEnd++\n }\n\n const before = existing.slice(0, cutStart)\n const after = existing.slice(cutEnd)\n\n existing =\n before.length > 0 && after.length > 0\n ? before + eol + eol + after\n : before + after\n }\n}\n"],"names":["AGENT_RULES_END_MARKER","AGENT_RULES_START_MARKER","hasAgentRulesInstalled","writeAgentFiles","LEGACY_AGENT_RULES_START_MARKER","LEGACY_AGENT_RULES_END_MARKER","buildAgentRulesBlock","CLAUDE_MD_CONTENT","dir","agentsContent","tryReadFile","path","join","includes","claudeContent","projectDir","agentsMdPath","claudeMdPath","block","agentsMdExists","fs","existsSync","claudeMdExists","agentsMd","upsertFile","claudeMd","writeFileSync","filePath","readFileSync","existing","updated","upsertAgentRulesBlock","detectEol","content","test","normalizeEol","s","eol","replace","normalizedBlock","stripLegacyAgentRulesBlock","startIdx","indexOf","endIdx","before","slice","after","length","replaced","separator","cutStart","cutEnd"],"mappings":"AAAA;;;;;;;CAOC;;;;;;;;;;;;;;;;;IAMYA,sBAAsB;eAAtBA;;IADAC,wBAAwB;eAAxBA;;IAkCGC,sBAAsB;eAAtBA;;IAsBAC,eAAe;eAAfA;;;2DA3DD;6DACE;;;;;;AAEV,MAAMF,2BAA2B;AACjC,MAAMD,yBAAyB;AAEtC;;;;CAIC,GACD,MAAMI,kCAAkC;AACxC,MAAMC,gCAAgC;AAEtC,SAASC;IACP,OAAO,GAAGL,yBAAyB;;;;;;AAMrC,EAAED,wBAAwB;AAC1B;AAEA,MAAMO,oBAAoB,CAAC,YAAY,CAAC;AAajC,SAASL,uBAAuBM,GAAW;IAChD,MAAMC,gBAAgBC,YAAYC,aAAI,CAACC,IAAI,CAACJ,KAAK;IACjD,IAAIC,iCAAAA,cAAeI,QAAQ,CAACZ,2BAA2B,OAAO;IAE9D,MAAMa,gBAAgBJ,YAAYC,aAAI,CAACC,IAAI,CAACJ,KAAK;IACjD,IAAIM,iCAAAA,cAAeD,QAAQ,CAACZ,2BAA2B,OAAO;IAE9D,OAAO;AACT;AAcO,SAASE,gBAAgBY,UAAkB;IAChD,MAAMC,eAAeL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started. | ||
| let { port } = serverOptions; | ||
| process.title = `next-server (v${"16.3.0-canary.51"})`; | ||
| process.title = `next-server (v${"16.3.0-canary.52"})`; | ||
| let handlersReady = ()=>{}; | ||
@@ -183,0 +183,0 @@ let handlersError = ()=>{}; |
@@ -424,3 +424,6 @@ "use strict"; | ||
| const selectWebpack = options && (options.webpack || process.env.IS_WEBPACK_TEST); | ||
| if (selectTurbopack && selectWebpack) { | ||
| // Rspack is selected through env/config side effects instead of a custom | ||
| // server option, so don't fall back to the default Turbopack auto mode. | ||
| const selectRspack = !!process.env.NEXT_RSPACK; | ||
| if (selectTurbopack && selectWebpack && selectRspack) { | ||
| throw Object.defineProperty(new Error('Pass either `webpack` or `turbopack`, not both.'), "__NEXT_ERROR_CODE", { | ||
@@ -432,4 +435,6 @@ value: "E851", | ||
| } | ||
| if (selectTurbopack || !selectWebpack) { | ||
| process.env.TURBOPACK ??= selectTurbopack ? '1' : 'auto'; | ||
| if (selectTurbopack) { | ||
| process.env.TURBOPACK ??= '1'; | ||
| } else if (!selectWebpack && !selectRspack) { | ||
| process.env.TURBOPACK ??= 'auto'; | ||
| } | ||
@@ -436,0 +441,0 @@ } else { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../src/server/next.ts"],"sourcesContent":["import type { Options as DevServerOptions } from './dev/next-dev-server'\nimport type {\n NodeRequestHandler,\n Options as ServerOptions,\n} from './next-server'\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type { Duplex } from 'stream'\nimport type { NextUrlWithParsedQuery, RequestMeta } from './request-meta'\n\nimport './require-hook'\nimport './node-polyfill-crypto'\n\nimport type { default as NextNodeServer } from './next-server'\nimport * as log from '../build/output/log'\nimport loadConfig from './config'\nimport path from 'node:path'\nimport { NON_STANDARD_NODE_ENV } from '../lib/constants'\nimport {\n PHASE_DEVELOPMENT_SERVER,\n SERVER_FILES_MANIFEST,\n} from '../shared/lib/constants'\nimport { PHASE_PRODUCTION_SERVER } from '../shared/lib/constants'\nimport { getTracer } from './lib/trace/tracer'\nimport { NextServerSpan } from './lib/trace/constants'\nimport { formatUrl } from '../shared/lib/router/utils/format-url'\nimport type { ServerFields } from './lib/router-utils/setup-dev-bundler'\nimport type { ServerInitResult } from './lib/render-server'\nimport { AsyncCallbackSet } from './lib/async-callback-set'\nimport {\n RouterServerContextSymbol,\n routerServerGlobal,\n} from './lib/router-utils/router-server-context'\n\nlet ServerImpl: typeof NextNodeServer\n\nconst getServerImpl = async () => {\n if (ServerImpl === undefined) {\n ServerImpl = (\n await Promise.resolve(\n require('./next-server') as typeof import('./next-server')\n )\n ).default\n }\n return ServerImpl\n}\n\nexport type NextServerOptions = Omit<\n ServerOptions | DevServerOptions,\n // This is assigned in this server abstraction.\n 'conf'\n> &\n Partial<Pick<ServerOptions | DevServerOptions, 'conf'>>\n\nexport type NextBundlerOptions = {\n /** @deprecated Use `turbopack` instead */\n turbo?: boolean\n /** Selects Turbopack as the bundler */\n turbopack?: boolean\n /** Selects Webpack as the bundler */\n webpack?: boolean\n}\n\nexport type RequestHandler = (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery | undefined\n) => Promise<void>\n\nexport type UpgradeHandler = (\n req: IncomingMessage,\n socket: Duplex,\n head: Buffer\n) => Promise<void>\n\nconst SYMBOL_LOAD_CONFIG = Symbol('next.load_config')\n\ntype DeprecatedCustomServerMethod =\n | 'setAssetPrefix'\n | 'logError'\n | 'logErrorWithOriginalStack'\n | 'revalidate'\n | 'render'\n | 'renderToHTML'\n | 'renderError'\n | 'renderErrorToHTML'\n | 'render404'\n\nconst DEPRECATED_CUSTOM_SERVER_METHOD_GUIDANCE: Record<\n DeprecatedCustomServerMethod,\n string\n> = {\n setAssetPrefix: 'Please configure `assetPrefix` in `next.config.js` instead.',\n logError: 'Please use application logging instead.',\n logErrorWithOriginalStack: 'Please use application logging instead.',\n revalidate: 'Please use documented application revalidation APIs instead.',\n render:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n renderToHTML:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n renderError:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n renderErrorToHTML:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n render404:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n}\n\nfunction warnDeprecatedCustomServerMethod(\n method: DeprecatedCustomServerMethod\n) {\n log.warnOnce(\n `The \\`app.${method}()\\` method is deprecated in custom servers. ${DEPRECATED_CUSTOM_SERVER_METHOD_GUIDANCE[method]}`\n )\n}\n\ninterface NextWrapperServer {\n // NOTE: the methods/properties here are the public API for custom servers.\n // Consider backwards compatibilty when changing something here!\n\n options: NextServerOptions\n hostname: string | undefined\n port: number | undefined\n\n getRequestHandler(): RequestHandler\n prepare(serverFields?: ServerFields): Promise<void>\n /** @deprecated Configure `assetPrefix` in `next.config.js` instead. */\n setAssetPrefix(assetPrefix: string): void\n close(): Promise<void>\n\n // used internally\n getUpgradeHandler(): UpgradeHandler\n\n // legacy methods that we left exposed in the past\n\n /** @deprecated Use application logging instead. */\n logError(...args: Parameters<NextNodeServer['logError']>): void\n\n /** @deprecated Use documented application revalidation APIs instead. */\n revalidate(\n ...args: Parameters<NextNodeServer['revalidate']>\n ): ReturnType<NextNodeServer['revalidate']>\n\n /** @deprecated Use application logging instead. */\n logErrorWithOriginalStack(err: unknown, type: string): void\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n render(\n ...args: Parameters<NextNodeServer['render']>\n ): ReturnType<NextNodeServer['render']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n renderToHTML(\n ...args: Parameters<NextNodeServer['renderToHTML']>\n ): ReturnType<NextNodeServer['renderToHTML']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n renderError(\n ...args: Parameters<NextNodeServer['renderError']>\n ): ReturnType<NextNodeServer['renderError']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n renderErrorToHTML(\n ...args: Parameters<NextNodeServer['renderErrorToHTML']>\n ): ReturnType<NextNodeServer['renderErrorToHTML']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n render404(\n ...args: Parameters<NextNodeServer['render404']>\n ): ReturnType<NextNodeServer['render404']>\n}\n\n/** The wrapper server used by `next start` */\nexport class NextServer implements NextWrapperServer {\n private serverPromise?: Promise<NextNodeServer>\n private server?: NextNodeServer\n private reqHandler?: NodeRequestHandler\n private reqHandlerPromise?: Promise<NodeRequestHandler>\n private preparedAssetPrefix?: string\n\n public options: NextServerOptions\n\n constructor(options: NextServerOptions) {\n this.options = options\n }\n\n get hostname() {\n return this.options.hostname\n }\n\n get port() {\n return this.options.port\n }\n\n getRequestHandler(): RequestHandler {\n return async (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery\n ) => {\n const tracer = getTracer()\n return tracer.withPropagatedContext(req.headers, () =>\n tracer.trace(NextServerSpan.getRequestHandler, async () => {\n const requestHandler = await this.getServerRequestHandler()\n return requestHandler(req, res, parsedUrl)\n })\n )\n }\n }\n\n /**\n * @internal - this method is internal to Next.js and should not be used\n * directly by end-users, only used in testing\n */\n getRequestHandlerWithMetadata(meta: RequestMeta): RequestHandler {\n return async (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery\n ) => {\n const tracer = getTracer()\n return tracer.withPropagatedContext(req.headers, () =>\n tracer.trace(NextServerSpan.getRequestHandlerWithMetadata, async () => {\n const server = await this.getServer()\n const handler = server.getRequestHandlerWithMetadata(meta)\n return handler(req, res, parsedUrl)\n })\n )\n }\n }\n\n getUpgradeHandler(): UpgradeHandler {\n return async (req: IncomingMessage, socket: any, head: any) => {\n const server = await this.getServer()\n // @ts-expect-error we mark this as protected so it\n // causes an error here\n return server.handleUpgrade.apply(server, [req, socket, head])\n }\n }\n\n setAssetPrefix(assetPrefix: string) {\n if (this.server) {\n this.server.setAssetPrefix(assetPrefix)\n } else {\n this.preparedAssetPrefix = assetPrefix\n }\n }\n\n logError(...args: Parameters<NextWrapperServer['logError']>) {\n if (this.server) {\n this.server.logError(...args)\n }\n }\n\n async logErrorWithOriginalStack(err: unknown, type: string) {\n const server = await this.getServer()\n // this is only available on dev server\n if ((server as any).logErrorWithOriginalStack) {\n return (server as any).logErrorWithOriginalStack(err, type)\n }\n }\n\n async revalidate(...args: Parameters<NextWrapperServer['revalidate']>) {\n const server = await this.getServer()\n return server.revalidate(...args)\n }\n\n async render(...args: Parameters<NextWrapperServer['render']>) {\n const server = await this.getServer()\n return server.render(...args)\n }\n\n async renderToHTML(...args: Parameters<NextWrapperServer['renderToHTML']>) {\n const server = await this.getServer()\n return server.renderToHTML(...args)\n }\n\n async renderError(...args: Parameters<NextWrapperServer['renderError']>) {\n const server = await this.getServer()\n return server.renderError(...args)\n }\n\n async renderErrorToHTML(\n ...args: Parameters<NextWrapperServer['renderErrorToHTML']>\n ) {\n const server = await this.getServer()\n return server.renderErrorToHTML(...args)\n }\n\n async render404(...args: Parameters<NextWrapperServer['render404']>) {\n const server = await this.getServer()\n return server.render404(...args)\n }\n\n async prepare(serverFields?: ServerFields) {\n const server = await this.getServer()\n\n if (serverFields) {\n Object.assign(server, serverFields)\n }\n // We shouldn't prepare the server in production,\n // because this code won't be executed when deployed\n if (this.options.dev) {\n await server.prepare()\n }\n }\n\n async close() {\n if (this.server) {\n await this.server.close()\n }\n }\n\n private async createServer(\n options: ServerOptions | DevServerOptions\n ): Promise<NextNodeServer> {\n let ServerImplementation: typeof NextNodeServer\n if (options.dev) {\n ServerImplementation = (\n require('./dev/next-dev-server') as typeof import('./dev/next-dev-server')\n ).default as typeof import('./dev/next-dev-server').default\n } else {\n ServerImplementation = await getServerImpl()\n }\n const server = new ServerImplementation(options)\n\n return server\n }\n\n private async [SYMBOL_LOAD_CONFIG]() {\n const dir = path.resolve(\n /* turbopackIgnore: true */ this.options.dir || '.'\n )\n\n const config = await loadConfig(\n this.options.dev ? PHASE_DEVELOPMENT_SERVER : PHASE_PRODUCTION_SERVER,\n dir,\n {\n customConfig: this.options.conf,\n silent: true,\n }\n )\n\n // check serialized build config when available\n if (!this.options.dev) {\n try {\n const serializedConfig = require(\n /* turbopackIgnore: true */\n path.join(\n /* turbopackIgnore: true */ dir,\n config.distDir,\n SERVER_FILES_MANIFEST + '.json'\n )\n ).config\n\n config.experimental.isExperimentalCompile =\n serializedConfig.experimental.isExperimentalCompile\n } catch (_) {\n // if distDir is customized we don't know until we\n // load the config so fallback to loading the config\n // from next.config.js\n }\n }\n\n return config\n }\n\n private async getServer() {\n if (!this.serverPromise) {\n this.serverPromise = this[SYMBOL_LOAD_CONFIG]().then(async (conf) => {\n if (!this.options.dev) {\n if (conf.output === 'standalone') {\n if (!process.env.__NEXT_PRIVATE_STANDALONE_CONFIG) {\n log.warn(\n `\"next start\" does not work with \"output: standalone\" configuration. Use \"node .next/standalone/server.js\" instead.`\n )\n }\n } else if (conf.output === 'export') {\n throw new Error(\n `\"next start\" does not work with \"output: export\" configuration. Use \"npx serve@latest out\" instead.`\n )\n }\n }\n\n this.server = await this.createServer({\n ...this.options,\n conf,\n })\n if (this.preparedAssetPrefix) {\n this.server.setAssetPrefix(this.preparedAssetPrefix)\n }\n return this.server\n })\n }\n return this.serverPromise\n }\n\n private async getServerRequestHandler() {\n if (this.reqHandler) return this.reqHandler\n\n // Memoize request handler creation\n if (!this.reqHandlerPromise) {\n this.reqHandlerPromise = this.getServer().then((server) => {\n this.reqHandler = getTracer().wrap(\n NextServerSpan.getServerRequestHandler,\n server.getRequestHandler().bind(server)\n )\n delete this.reqHandlerPromise\n return this.reqHandler\n })\n }\n return this.reqHandlerPromise\n }\n}\n\n/** The wrapper server used for `import next from \"next\" (in a custom server)` */\nclass NextCustomServer implements NextWrapperServer {\n private didWebSocketSetup: boolean = false\n protected cleanupListeners?: AsyncCallbackSet\n\n protected init?: ServerInitResult\n\n public options: NextServerOptions\n\n constructor(options: NextServerOptions) {\n this.options = options\n }\n\n protected getInit() {\n if (!this.init) {\n throw new Error(\n 'prepare() must be called before performing this operation'\n )\n }\n return this.init\n }\n\n protected get requestHandler() {\n return this.getInit().requestHandler\n }\n protected get upgradeHandler() {\n return this.getInit().upgradeHandler\n }\n protected get server() {\n return this.getInit().server\n }\n\n get hostname() {\n return this.options.hostname\n }\n\n get port() {\n return this.options.port\n }\n\n async prepare() {\n if (this.options.dev) {\n process.env.__NEXT_DEV_SERVER = '1'\n }\n\n const { getRequestHandlers } =\n require('./lib/start-server') as typeof import('./lib/start-server')\n\n let onDevServerCleanup: AsyncCallbackSet['add'] | undefined\n if (this.options.dev) {\n this.cleanupListeners = new AsyncCallbackSet()\n onDevServerCleanup = this.cleanupListeners.add.bind(this.cleanupListeners)\n }\n\n const initResult = await getRequestHandlers({\n dir: this.options.dir!,\n port: this.options.port || 3000,\n isDev: !!this.options.dev,\n onDevServerCleanup,\n hostname: this.options.hostname || 'localhost',\n minimalMode: this.options.minimalMode,\n quiet: this.options.quiet,\n })\n this.init = initResult\n }\n\n private setupWebSocketHandler(\n customServer?: import('http').Server,\n _req?: IncomingMessage\n ) {\n if (!this.didWebSocketSetup) {\n this.didWebSocketSetup = true\n customServer = customServer || (_req?.socket as any)?.server\n\n if (customServer) {\n customServer.on('upgrade', async (req, socket, head) => {\n this.upgradeHandler(req, socket, head)\n })\n }\n }\n }\n\n getRequestHandler(): RequestHandler {\n return async (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery\n ) => {\n this.setupWebSocketHandler(this.options.httpServer, req)\n\n if (parsedUrl) {\n req.url = formatUrl(parsedUrl)\n }\n\n return this.requestHandler(req, res)\n }\n }\n\n async render(...args: Parameters<NextWrapperServer['render']>) {\n warnDeprecatedCustomServerMethod('render')\n let [req, res, pathname, query, parsedUrl] = args\n this.setupWebSocketHandler(this.options.httpServer, req as IncomingMessage)\n\n if (!pathname.startsWith('/')) {\n console.error(`Cannot render page with path \"${pathname}\"`)\n pathname = `/${pathname}`\n }\n pathname = pathname === '/index' ? '/' : pathname\n\n req.url = formatUrl({\n ...parsedUrl,\n pathname,\n query,\n })\n\n await this.requestHandler(req as IncomingMessage, res as ServerResponse)\n return\n }\n\n setAssetPrefix(assetPrefix: string): void {\n warnDeprecatedCustomServerMethod('setAssetPrefix')\n this.server.setAssetPrefix(assetPrefix)\n\n // update the router-server nextConfig instance as\n // this is the source of truth for \"handler\" in serverful\n const relativeProjectDir = path.relative(\n process.cwd(),\n this.options.dir || ''\n )\n\n if (\n routerServerGlobal[RouterServerContextSymbol]?.[relativeProjectDir]\n ?.nextConfig\n ) {\n routerServerGlobal[RouterServerContextSymbol][\n relativeProjectDir\n ].nextConfig.assetPrefix = assetPrefix\n }\n }\n\n getUpgradeHandler(): UpgradeHandler {\n return this.server.getUpgradeHandler()\n }\n\n logError(...args: Parameters<NextWrapperServer['logError']>) {\n warnDeprecatedCustomServerMethod('logError')\n this.server.logError(...args)\n }\n\n logErrorWithOriginalStack(err: unknown, type: string) {\n warnDeprecatedCustomServerMethod('logErrorWithOriginalStack')\n return this.server.logErrorWithOriginalStack(err, type)\n }\n\n async revalidate(...args: Parameters<NextWrapperServer['revalidate']>) {\n warnDeprecatedCustomServerMethod('revalidate')\n return this.server.revalidate(...args)\n }\n\n async renderToHTML(...args: Parameters<NextWrapperServer['renderToHTML']>) {\n warnDeprecatedCustomServerMethod('renderToHTML')\n return this.server.renderToHTML(...args)\n }\n\n async renderError(...args: Parameters<NextWrapperServer['renderError']>) {\n warnDeprecatedCustomServerMethod('renderError')\n return this.server.renderError(...args)\n }\n\n async renderErrorToHTML(\n ...args: Parameters<NextWrapperServer['renderErrorToHTML']>\n ) {\n warnDeprecatedCustomServerMethod('renderErrorToHTML')\n return this.server.renderErrorToHTML(...args)\n }\n\n async render404(...args: Parameters<NextWrapperServer['render404']>) {\n warnDeprecatedCustomServerMethod('render404')\n return this.server.render404(...args)\n }\n\n async close() {\n await Promise.allSettled([\n this.init?.server.close(),\n this.cleanupListeners?.runAll(),\n ])\n }\n}\n\n// This file is used for when users run `require('next')`\nfunction createServer(\n options: NextServerOptions & NextBundlerOptions\n): NextWrapperServer {\n // next sets customServer to false when calling this function, in that case we don't want to modify the environment variables\n const isCustomServer = options?.customServer ?? true\n if (isCustomServer) {\n const selectTurbopack =\n options &&\n (options.turbo || options.turbopack || process.env.IS_TURBOPACK_TEST)\n const selectWebpack =\n options && (options.webpack || process.env.IS_WEBPACK_TEST)\n if (selectTurbopack && selectWebpack) {\n throw new Error('Pass either `webpack` or `turbopack`, not both.')\n }\n if (selectTurbopack || !selectWebpack) {\n process.env.TURBOPACK ??= selectTurbopack ? '1' : 'auto'\n }\n } else {\n if (options && (options.webpack || options.turbo || options.turbopack)) {\n throw new Error(\n 'Only custom servers can pass `webpack`, `turbo`, or `turbopack`.'\n )\n }\n }\n\n // The package is used as a TypeScript plugin.\n if (\n options &&\n 'typescript' in options &&\n 'version' in (options as any).typescript\n ) {\n const pluginMod: typeof import('./next-typescript') =\n require('./next-typescript') as typeof import('./next-typescript')\n return pluginMod.createTSPlugin(\n options as any\n ) as unknown as NextWrapperServer\n }\n\n if (options == null) {\n throw new Error(\n 'The server has not been instantiated properly. https://nextjs.org/docs/messages/invalid-server-options'\n )\n }\n\n if (\n !('isNextDevCommand' in options) &&\n process.env.NODE_ENV &&\n !['production', 'development', 'test'].includes(process.env.NODE_ENV)\n ) {\n log.warn(NON_STANDARD_NODE_ENV)\n }\n\n if (options.dev && typeof options.dev !== 'boolean') {\n console.warn(\n \"Warning: 'dev' is not a boolean which could introduce unexpected behavior. https://nextjs.org/docs/messages/invalid-server-options\"\n )\n }\n\n // When the caller is a custom server (using next()).\n if (options.customServer !== false) {\n const dir = path.resolve(/* turbopackIgnore: true */ options.dir || '.')\n\n return new NextCustomServer({\n ...options,\n dir,\n })\n }\n\n // When the caller is Next.js internals (i.e. render worker, start server, etc)\n return new NextServer(options)\n}\n\n// Support commonjs `require('next')`\nmodule.exports = createServer\n// exports = module.exports\n\n// Support `import next from 'next'`\nexport default createServer\n"],"names":["NextServer","ServerImpl","getServerImpl","undefined","Promise","resolve","require","default","SYMBOL_LOAD_CONFIG","Symbol","DEPRECATED_CUSTOM_SERVER_METHOD_GUIDANCE","setAssetPrefix","logError","logErrorWithOriginalStack","revalidate","render","renderToHTML","renderError","renderErrorToHTML","render404","warnDeprecatedCustomServerMethod","method","log","warnOnce","constructor","options","hostname","port","getRequestHandler","req","res","parsedUrl","tracer","getTracer","withPropagatedContext","headers","trace","NextServerSpan","requestHandler","getServerRequestHandler","getRequestHandlerWithMetadata","meta","server","getServer","handler","getUpgradeHandler","socket","head","handleUpgrade","apply","assetPrefix","preparedAssetPrefix","args","err","type","prepare","serverFields","Object","assign","dev","close","createServer","ServerImplementation","dir","path","config","loadConfig","PHASE_DEVELOPMENT_SERVER","PHASE_PRODUCTION_SERVER","customConfig","conf","silent","serializedConfig","join","distDir","SERVER_FILES_MANIFEST","experimental","isExperimentalCompile","_","serverPromise","then","output","process","env","__NEXT_PRIVATE_STANDALONE_CONFIG","warn","Error","reqHandler","reqHandlerPromise","wrap","bind","NextCustomServer","didWebSocketSetup","getInit","init","upgradeHandler","__NEXT_DEV_SERVER","getRequestHandlers","onDevServerCleanup","cleanupListeners","AsyncCallbackSet","add","initResult","isDev","minimalMode","quiet","setupWebSocketHandler","customServer","_req","on","httpServer","url","formatUrl","pathname","query","startsWith","console","error","routerServerGlobal","relativeProjectDir","relative","cwd","RouterServerContextSymbol","nextConfig","allSettled","runAll","isCustomServer","selectTurbopack","turbo","turbopack","IS_TURBOPACK_TEST","selectWebpack","webpack","IS_WEBPACK_TEST","TURBOPACK","typescript","pluginMod","createTSPlugin","NODE_ENV","includes","NON_STANDARD_NODE_ENV","module","exports"],"mappings":";;;;;;;;;;;;;;;IAsLaA,UAAU;eAAVA;;IA0fb,2BAA2B;IAE3B,oCAAoC;IACpC,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ACnDyD,QAAQ/B,IAAI,CACV;IAEJ;IAEA,qDAAqD;IACrD,IAAI5D,QAAQkF,YAAY,KAAK,OAAO;QAClC,MAAM5C,MAAMC,iBAAI,CAAC3D,OAAO,CAAC,yBAAyB,GAAGoB,QAAQsC,GAAG,IAAI;QAEpE,OAAO,IAAI4B,iBAAiB;YAC1B,GAAGlE,OAAO;YACVsC;QACF;IACF;IAEA,+EAA+E;IAC/E,OAAO,IAAI/D,WAAWyB;AACxB;AAEA,qCAAqC;AACrCoH,OAAOC,OAAO,GAAGjF;MAIjB,WAAeA","ignoreList":[0]} | ||
| {"version":3,"sources":["../../src/server/next.ts"],"sourcesContent":["import type { Options as DevServerOptions } from './dev/next-dev-server'\nimport type {\n NodeRequestHandler,\n Options as ServerOptions,\n} from './next-server'\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type { Duplex } from 'stream'\nimport type { NextUrlWithParsedQuery, RequestMeta } from './request-meta'\n\nimport './require-hook'\nimport './node-polyfill-crypto'\n\nimport type { default as NextNodeServer } from './next-server'\nimport * as log from '../build/output/log'\nimport loadConfig from './config'\nimport path from 'node:path'\nimport { NON_STANDARD_NODE_ENV } from '../lib/constants'\nimport {\n PHASE_DEVELOPMENT_SERVER,\n SERVER_FILES_MANIFEST,\n} from '../shared/lib/constants'\nimport { PHASE_PRODUCTION_SERVER } from '../shared/lib/constants'\nimport { getTracer } from './lib/trace/tracer'\nimport { NextServerSpan } from './lib/trace/constants'\nimport { formatUrl } from '../shared/lib/router/utils/format-url'\nimport type { ServerFields } from './lib/router-utils/setup-dev-bundler'\nimport type { ServerInitResult } from './lib/render-server'\nimport { AsyncCallbackSet } from './lib/async-callback-set'\nimport {\n RouterServerContextSymbol,\n routerServerGlobal,\n} from './lib/router-utils/router-server-context'\n\nlet ServerImpl: typeof NextNodeServer\n\nconst getServerImpl = async () => {\n if (ServerImpl === undefined) {\n ServerImpl = (\n await Promise.resolve(\n require('./next-server') as typeof import('./next-server')\n )\n ).default\n }\n return ServerImpl\n}\n\nexport type NextServerOptions = Omit<\n ServerOptions | DevServerOptions,\n // This is assigned in this server abstraction.\n 'conf'\n> &\n Partial<Pick<ServerOptions | DevServerOptions, 'conf'>>\n\nexport type NextBundlerOptions = {\n /** @deprecated Use `turbopack` instead */\n turbo?: boolean\n /** Selects Turbopack as the bundler */\n turbopack?: boolean\n /** Selects Webpack as the bundler */\n webpack?: boolean\n}\n\nexport type RequestHandler = (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery | undefined\n) => Promise<void>\n\nexport type UpgradeHandler = (\n req: IncomingMessage,\n socket: Duplex,\n head: Buffer\n) => Promise<void>\n\nconst SYMBOL_LOAD_CONFIG = Symbol('next.load_config')\n\ntype DeprecatedCustomServerMethod =\n | 'setAssetPrefix'\n | 'logError'\n | 'logErrorWithOriginalStack'\n | 'revalidate'\n | 'render'\n | 'renderToHTML'\n | 'renderError'\n | 'renderErrorToHTML'\n | 'render404'\n\nconst DEPRECATED_CUSTOM_SERVER_METHOD_GUIDANCE: Record<\n DeprecatedCustomServerMethod,\n string\n> = {\n setAssetPrefix: 'Please configure `assetPrefix` in `next.config.js` instead.',\n logError: 'Please use application logging instead.',\n logErrorWithOriginalStack: 'Please use application logging instead.',\n revalidate: 'Please use documented application revalidation APIs instead.',\n render:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n renderToHTML:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n renderError:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n renderErrorToHTML:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n render404:\n 'Please use `app.getRequestHandler()` with an adjusted parsed URL instead.',\n}\n\nfunction warnDeprecatedCustomServerMethod(\n method: DeprecatedCustomServerMethod\n) {\n log.warnOnce(\n `The \\`app.${method}()\\` method is deprecated in custom servers. ${DEPRECATED_CUSTOM_SERVER_METHOD_GUIDANCE[method]}`\n )\n}\n\ninterface NextWrapperServer {\n // NOTE: the methods/properties here are the public API for custom servers.\n // Consider backwards compatibilty when changing something here!\n\n options: NextServerOptions\n hostname: string | undefined\n port: number | undefined\n\n getRequestHandler(): RequestHandler\n prepare(serverFields?: ServerFields): Promise<void>\n /** @deprecated Configure `assetPrefix` in `next.config.js` instead. */\n setAssetPrefix(assetPrefix: string): void\n close(): Promise<void>\n\n // used internally\n getUpgradeHandler(): UpgradeHandler\n\n // legacy methods that we left exposed in the past\n\n /** @deprecated Use application logging instead. */\n logError(...args: Parameters<NextNodeServer['logError']>): void\n\n /** @deprecated Use documented application revalidation APIs instead. */\n revalidate(\n ...args: Parameters<NextNodeServer['revalidate']>\n ): ReturnType<NextNodeServer['revalidate']>\n\n /** @deprecated Use application logging instead. */\n logErrorWithOriginalStack(err: unknown, type: string): void\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n render(\n ...args: Parameters<NextNodeServer['render']>\n ): ReturnType<NextNodeServer['render']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n renderToHTML(\n ...args: Parameters<NextNodeServer['renderToHTML']>\n ): ReturnType<NextNodeServer['renderToHTML']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n renderError(\n ...args: Parameters<NextNodeServer['renderError']>\n ): ReturnType<NextNodeServer['renderError']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n renderErrorToHTML(\n ...args: Parameters<NextNodeServer['renderErrorToHTML']>\n ): ReturnType<NextNodeServer['renderErrorToHTML']>\n\n /**\n * @deprecated Use `app.getRequestHandler()` with an adjusted parsed URL instead.\n */\n render404(\n ...args: Parameters<NextNodeServer['render404']>\n ): ReturnType<NextNodeServer['render404']>\n}\n\n/** The wrapper server used by `next start` */\nexport class NextServer implements NextWrapperServer {\n private serverPromise?: Promise<NextNodeServer>\n private server?: NextNodeServer\n private reqHandler?: NodeRequestHandler\n private reqHandlerPromise?: Promise<NodeRequestHandler>\n private preparedAssetPrefix?: string\n\n public options: NextServerOptions\n\n constructor(options: NextServerOptions) {\n this.options = options\n }\n\n get hostname() {\n return this.options.hostname\n }\n\n get port() {\n return this.options.port\n }\n\n getRequestHandler(): RequestHandler {\n return async (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery\n ) => {\n const tracer = getTracer()\n return tracer.withPropagatedContext(req.headers, () =>\n tracer.trace(NextServerSpan.getRequestHandler, async () => {\n const requestHandler = await this.getServerRequestHandler()\n return requestHandler(req, res, parsedUrl)\n })\n )\n }\n }\n\n /**\n * @internal - this method is internal to Next.js and should not be used\n * directly by end-users, only used in testing\n */\n getRequestHandlerWithMetadata(meta: RequestMeta): RequestHandler {\n return async (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery\n ) => {\n const tracer = getTracer()\n return tracer.withPropagatedContext(req.headers, () =>\n tracer.trace(NextServerSpan.getRequestHandlerWithMetadata, async () => {\n const server = await this.getServer()\n const handler = server.getRequestHandlerWithMetadata(meta)\n return handler(req, res, parsedUrl)\n })\n )\n }\n }\n\n getUpgradeHandler(): UpgradeHandler {\n return async (req: IncomingMessage, socket: any, head: any) => {\n const server = await this.getServer()\n // @ts-expect-error we mark this as protected so it\n // causes an error here\n return server.handleUpgrade.apply(server, [req, socket, head])\n }\n }\n\n setAssetPrefix(assetPrefix: string) {\n if (this.server) {\n this.server.setAssetPrefix(assetPrefix)\n } else {\n this.preparedAssetPrefix = assetPrefix\n }\n }\n\n logError(...args: Parameters<NextWrapperServer['logError']>) {\n if (this.server) {\n this.server.logError(...args)\n }\n }\n\n async logErrorWithOriginalStack(err: unknown, type: string) {\n const server = await this.getServer()\n // this is only available on dev server\n if ((server as any).logErrorWithOriginalStack) {\n return (server as any).logErrorWithOriginalStack(err, type)\n }\n }\n\n async revalidate(...args: Parameters<NextWrapperServer['revalidate']>) {\n const server = await this.getServer()\n return server.revalidate(...args)\n }\n\n async render(...args: Parameters<NextWrapperServer['render']>) {\n const server = await this.getServer()\n return server.render(...args)\n }\n\n async renderToHTML(...args: Parameters<NextWrapperServer['renderToHTML']>) {\n const server = await this.getServer()\n return server.renderToHTML(...args)\n }\n\n async renderError(...args: Parameters<NextWrapperServer['renderError']>) {\n const server = await this.getServer()\n return server.renderError(...args)\n }\n\n async renderErrorToHTML(\n ...args: Parameters<NextWrapperServer['renderErrorToHTML']>\n ) {\n const server = await this.getServer()\n return server.renderErrorToHTML(...args)\n }\n\n async render404(...args: Parameters<NextWrapperServer['render404']>) {\n const server = await this.getServer()\n return server.render404(...args)\n }\n\n async prepare(serverFields?: ServerFields) {\n const server = await this.getServer()\n\n if (serverFields) {\n Object.assign(server, serverFields)\n }\n // We shouldn't prepare the server in production,\n // because this code won't be executed when deployed\n if (this.options.dev) {\n await server.prepare()\n }\n }\n\n async close() {\n if (this.server) {\n await this.server.close()\n }\n }\n\n private async createServer(\n options: ServerOptions | DevServerOptions\n ): Promise<NextNodeServer> {\n let ServerImplementation: typeof NextNodeServer\n if (options.dev) {\n ServerImplementation = (\n require('./dev/next-dev-server') as typeof import('./dev/next-dev-server')\n ).default as typeof import('./dev/next-dev-server').default\n } else {\n ServerImplementation = await getServerImpl()\n }\n const server = new ServerImplementation(options)\n\n return server\n }\n\n private async [SYMBOL_LOAD_CONFIG]() {\n const dir = path.resolve(\n /* turbopackIgnore: true */ this.options.dir || '.'\n )\n\n const config = await loadConfig(\n this.options.dev ? PHASE_DEVELOPMENT_SERVER : PHASE_PRODUCTION_SERVER,\n dir,\n {\n customConfig: this.options.conf,\n silent: true,\n }\n )\n\n // check serialized build config when available\n if (!this.options.dev) {\n try {\n const serializedConfig = require(\n /* turbopackIgnore: true */\n path.join(\n /* turbopackIgnore: true */ dir,\n config.distDir,\n SERVER_FILES_MANIFEST + '.json'\n )\n ).config\n\n config.experimental.isExperimentalCompile =\n serializedConfig.experimental.isExperimentalCompile\n } catch (_) {\n // if distDir is customized we don't know until we\n // load the config so fallback to loading the config\n // from next.config.js\n }\n }\n\n return config\n }\n\n private async getServer() {\n if (!this.serverPromise) {\n this.serverPromise = this[SYMBOL_LOAD_CONFIG]().then(async (conf) => {\n if (!this.options.dev) {\n if (conf.output === 'standalone') {\n if (!process.env.__NEXT_PRIVATE_STANDALONE_CONFIG) {\n log.warn(\n `\"next start\" does not work with \"output: standalone\" configuration. Use \"node .next/standalone/server.js\" instead.`\n )\n }\n } else if (conf.output === 'export') {\n throw new Error(\n `\"next start\" does not work with \"output: export\" configuration. Use \"npx serve@latest out\" instead.`\n )\n }\n }\n\n this.server = await this.createServer({\n ...this.options,\n conf,\n })\n if (this.preparedAssetPrefix) {\n this.server.setAssetPrefix(this.preparedAssetPrefix)\n }\n return this.server\n })\n }\n return this.serverPromise\n }\n\n private async getServerRequestHandler() {\n if (this.reqHandler) return this.reqHandler\n\n // Memoize request handler creation\n if (!this.reqHandlerPromise) {\n this.reqHandlerPromise = this.getServer().then((server) => {\n this.reqHandler = getTracer().wrap(\n NextServerSpan.getServerRequestHandler,\n server.getRequestHandler().bind(server)\n )\n delete this.reqHandlerPromise\n return this.reqHandler\n })\n }\n return this.reqHandlerPromise\n }\n}\n\n/** The wrapper server used for `import next from \"next\" (in a custom server)` */\nclass NextCustomServer implements NextWrapperServer {\n private didWebSocketSetup: boolean = false\n protected cleanupListeners?: AsyncCallbackSet\n\n protected init?: ServerInitResult\n\n public options: NextServerOptions\n\n constructor(options: NextServerOptions) {\n this.options = options\n }\n\n protected getInit() {\n if (!this.init) {\n throw new Error(\n 'prepare() must be called before performing this operation'\n )\n }\n return this.init\n }\n\n protected get requestHandler() {\n return this.getInit().requestHandler\n }\n protected get upgradeHandler() {\n return this.getInit().upgradeHandler\n }\n protected get server() {\n return this.getInit().server\n }\n\n get hostname() {\n return this.options.hostname\n }\n\n get port() {\n return this.options.port\n }\n\n async prepare() {\n if (this.options.dev) {\n process.env.__NEXT_DEV_SERVER = '1'\n }\n\n const { getRequestHandlers } =\n require('./lib/start-server') as typeof import('./lib/start-server')\n\n let onDevServerCleanup: AsyncCallbackSet['add'] | undefined\n if (this.options.dev) {\n this.cleanupListeners = new AsyncCallbackSet()\n onDevServerCleanup = this.cleanupListeners.add.bind(this.cleanupListeners)\n }\n\n const initResult = await getRequestHandlers({\n dir: this.options.dir!,\n port: this.options.port || 3000,\n isDev: !!this.options.dev,\n onDevServerCleanup,\n hostname: this.options.hostname || 'localhost',\n minimalMode: this.options.minimalMode,\n quiet: this.options.quiet,\n })\n this.init = initResult\n }\n\n private setupWebSocketHandler(\n customServer?: import('http').Server,\n _req?: IncomingMessage\n ) {\n if (!this.didWebSocketSetup) {\n this.didWebSocketSetup = true\n customServer = customServer || (_req?.socket as any)?.server\n\n if (customServer) {\n customServer.on('upgrade', async (req, socket, head) => {\n this.upgradeHandler(req, socket, head)\n })\n }\n }\n }\n\n getRequestHandler(): RequestHandler {\n return async (\n req: IncomingMessage,\n res: ServerResponse,\n parsedUrl?: NextUrlWithParsedQuery\n ) => {\n this.setupWebSocketHandler(this.options.httpServer, req)\n\n if (parsedUrl) {\n req.url = formatUrl(parsedUrl)\n }\n\n return this.requestHandler(req, res)\n }\n }\n\n async render(...args: Parameters<NextWrapperServer['render']>) {\n warnDeprecatedCustomServerMethod('render')\n let [req, res, pathname, query, parsedUrl] = args\n this.setupWebSocketHandler(this.options.httpServer, req as IncomingMessage)\n\n if (!pathname.startsWith('/')) {\n console.error(`Cannot render page with path \"${pathname}\"`)\n pathname = `/${pathname}`\n }\n pathname = pathname === '/index' ? '/' : pathname\n\n req.url = formatUrl({\n ...parsedUrl,\n pathname,\n query,\n })\n\n await this.requestHandler(req as IncomingMessage, res as ServerResponse)\n return\n }\n\n setAssetPrefix(assetPrefix: string): void {\n warnDeprecatedCustomServerMethod('setAssetPrefix')\n this.server.setAssetPrefix(assetPrefix)\n\n // update the router-server nextConfig instance as\n // this is the source of truth for \"handler\" in serverful\n const relativeProjectDir = path.relative(\n process.cwd(),\n this.options.dir || ''\n )\n\n if (\n routerServerGlobal[RouterServerContextSymbol]?.[relativeProjectDir]\n ?.nextConfig\n ) {\n routerServerGlobal[RouterServerContextSymbol][\n relativeProjectDir\n ].nextConfig.assetPrefix = assetPrefix\n }\n }\n\n getUpgradeHandler(): UpgradeHandler {\n return this.server.getUpgradeHandler()\n }\n\n logError(...args: Parameters<NextWrapperServer['logError']>) {\n warnDeprecatedCustomServerMethod('logError')\n this.server.logError(...args)\n }\n\n logErrorWithOriginalStack(err: unknown, type: string) {\n warnDeprecatedCustomServerMethod('logErrorWithOriginalStack')\n return this.server.logErrorWithOriginalStack(err, type)\n }\n\n async revalidate(...args: Parameters<NextWrapperServer['revalidate']>) {\n warnDeprecatedCustomServerMethod('revalidate')\n return this.server.revalidate(...args)\n }\n\n async renderToHTML(...args: Parameters<NextWrapperServer['renderToHTML']>) {\n warnDeprecatedCustomServerMethod('renderToHTML')\n return this.server.renderToHTML(...args)\n }\n\n async renderError(...args: Parameters<NextWrapperServer['renderError']>) {\n warnDeprecatedCustomServerMethod('renderError')\n return this.server.renderError(...args)\n }\n\n async renderErrorToHTML(\n ...args: Parameters<NextWrapperServer['renderErrorToHTML']>\n ) {\n warnDeprecatedCustomServerMethod('renderErrorToHTML')\n return this.server.renderErrorToHTML(...args)\n }\n\n async render404(...args: Parameters<NextWrapperServer['render404']>) {\n warnDeprecatedCustomServerMethod('render404')\n return this.server.render404(...args)\n }\n\n async close() {\n await Promise.allSettled([\n this.init?.server.close(),\n this.cleanupListeners?.runAll(),\n ])\n }\n}\n\n// This file is used for when users run `require('next')`\nfunction createServer(\n options: NextServerOptions & NextBundlerOptions\n): NextWrapperServer {\n // next sets customServer to false when calling this function, in that case we don't want to modify the environment variables\n const isCustomServer = options?.customServer ?? true\n if (isCustomServer) {\n const selectTurbopack =\n options &&\n (options.turbo || options.turbopack || process.env.IS_TURBOPACK_TEST)\n const selectWebpack =\n options && (options.webpack || process.env.IS_WEBPACK_TEST)\n // Rspack is selected through env/config side effects instead of a custom\n // server option, so don't fall back to the default Turbopack auto mode.\n const selectRspack = !!process.env.NEXT_RSPACK\n if (selectTurbopack && selectWebpack && selectRspack) {\n throw new Error('Pass either `webpack` or `turbopack`, not both.')\n }\n if (selectTurbopack) {\n process.env.TURBOPACK ??= '1'\n } else if (!selectWebpack && !selectRspack) {\n process.env.TURBOPACK ??= 'auto'\n }\n } else {\n if (options && (options.webpack || options.turbo || options.turbopack)) {\n throw new Error(\n 'Only custom servers can pass `webpack`, `turbo`, or `turbopack`.'\n )\n }\n }\n\n // The package is used as a TypeScript plugin.\n if (\n options &&\n 'typescript' in options &&\n 'version' in (options as any).typescript\n ) {\n const pluginMod: typeof import('./next-typescript') =\n require('./next-typescript') as typeof import('./next-typescript')\n return pluginMod.createTSPlugin(\n options as any\n ) as unknown as NextWrapperServer\n }\n\n if (options == null) {\n throw new Error(\n 'The server has not been instantiated properly. https://nextjs.org/docs/messages/invalid-server-options'\n )\n }\n\n if (\n !('isNextDevCommand' in options) &&\n process.env.NODE_ENV &&\n !['production', 'development', 'test'].includes(process.env.NODE_ENV)\n ) {\n log.warn(NON_STANDARD_NODE_ENV)\n }\n\n if (options.dev && typeof options.dev !== 'boolean') {\n console.warn(\n \"Warning: 'dev' is not a boolean which could introduce unexpected behavior. https://nextjs.org/docs/messages/invalid-server-options\"\n )\n }\n\n // When the caller is a custom server (using next()).\n if (options.customServer !== false) {\n const dir = path.resolve(/* turbopackIgnore: true */ options.dir || '.')\n\n return new NextCustomServer({\n ...options,\n dir,\n })\n }\n\n // When the caller is Next.js internals (i.e. render worker, start server, etc)\n return new NextServer(options)\n}\n\n// Support commonjs `require('next')`\nmodule.exports = createServer\n// exports = module.exports\n\n// Support `import next from 'next'`\nexport default createServer\n"],"names":["NextServer","ServerImpl","getServerImpl","undefined","Promise","resolve","require","default","SYMBOL_LOAD_CONFIG","Symbol","DEPRECATED_CUSTOM_SERVER_METHOD_GUIDANCE","setAssetPrefix","logError","logErrorWithOriginalStack","revalidate","render","renderToHTML","renderError","renderErrorToHTML","render404","warnDeprecatedCustomServerMethod","method","log","warnOnce","constructor","options","hostname","port","getRequestHandler","req","res","parsedUrl","tracer","getTracer","withPropagatedContext","headers","trace","NextServerSpan","requestHandler","getServerRequestHandler","getRequestHandlerWithMetadata","meta","server","getServer","handler","getUpgradeHandler","socket","head","handleUpgrade","apply","assetPrefix","preparedAssetPrefix","args","err","type","prepare","serverFields","Object","assign","dev","close","createServer","ServerImplementation","dir","path","config","loadConfig","PHASE_DEVELOPMENT_SERVER","PHASE_PRODUCTION_SERVER","customConfig","conf","silent","serializedConfig","join","distDir","SERVER_FILES_MANIFEST","experimental","isExperimentalCompile","_","serverPromise","then","output","process","env","__NEXT_PRIVATE_STANDALONE_CONFIG","warn","Error","reqHandler","reqHandlerPromise","wrap","bind","NextCustomServer","didWebSocketSetup","getInit","init","upgradeHandler","__NEXT_DEV_SERVER","getRequestHandlers","onDevServerCleanup","cleanupListeners","AsyncCallbackSet","add","initResult","isDev","minimalMode","quiet","setupWebSocketHandler","customServer","_req","on","httpServer","url","formatUrl","pathname","query","startsWith","console","error","routerServerGlobal","relativeProjectDir","relative","cwd","RouterServerContextSymbol","nextConfig","allSettled","runAll","isCustomServer","selectTurbopack","turbo","turbopack","IS_TURBOPACK_TEST","selectWebpack","webpack","IS_WEBPACK_TEST","selectRspack","NEXT_RSPACK","TURBOPACK","typescript","pluginMod","createTSPlugin","NODE_ENV","includes","NON_STANDARD_NODE_ENV","module","exports"],"mappings":";;;;;;;;;;;;;;;IAsLaA,UAAU;eAAVA;;IA+fb,2BAA2B;IAE3B,oCAAoC;IACpC,OAA2B;eAA3B;;;QA/qBO;QACA;6DAGc;+DACE;iEACN;2BACqB;4BAI/B;wBAEmB;4BACK;2BACL;kCAGO;qCAI1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEP,IAAIC;AAEJ,MAAMC,gBAAgB;IACpB,IAAID,eAAeE,WAAW;QAC5BF,aAAa,AACX,CA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AY,KAAK,OAAO;QAClC,MAAM5C,MAAMC,iBAAI,CAAC3D,OAAO,CAAC,yBAAyB,GAAGoB,QAAQsC,GAAG,IAAI;QAEpE,OAAO,IAAI4B,iBAAiB;YAC1B,GAAGlE,OAAO;YACVsC;QACF;IACF;IAEA,+EAA+E;IAC/E,OAAO,IAAI/D,WAAWyB;AACxB;AAEA,qCAAqC;AACrCsH,OAAOC,OAAO,GAAGnF;MAIjB,WAAeA","ignoreList":[0]} |
@@ -229,3 +229,3 @@ "use strict"; | ||
| Readable = require('node:stream').Readable; | ||
| } else if (process.env.__NEXT_BUNDLER === 'Webpack') { | ||
| } else if (process.env.__NEXT_BUNDLER === 'Webpack' || process.env.__NEXT_BUNDLER === 'Rspack') { | ||
| Readable = __non_webpack_require__('node:stream').Readable; | ||
@@ -256,3 +256,3 @@ } else { | ||
| Readable = require('node:stream').Readable; | ||
| } else if (process.env.__NEXT_BUNDLER === 'Webpack') { | ||
| } else if (process.env.__NEXT_BUNDLER === 'Webpack' || process.env.__NEXT_BUNDLER === 'Rspack') { | ||
| Readable = __non_webpack_require__('node:stream').Readable; | ||
@@ -259,0 +259,0 @@ } else { |
@@ -24,3 +24,3 @@ "use strict"; | ||
| function isStableBuild() { | ||
| return !"16.3.0-canary.51"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV; | ||
| return !"16.3.0-canary.52"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV; | ||
| } | ||
@@ -27,0 +27,0 @@ class CanaryOnlyConfigError extends Error { |
@@ -47,3 +47,3 @@ /** | ||
| if (typeof message === 'object' && message.message) { | ||
| const filteredModuleTrace = message.moduleTrace && message.moduleTrace.filter((trace)=>!/next-(middleware|client-pages|route|edge-function)-loader\.js/.test(trace.originName)); | ||
| let filteredModuleTrace = message.moduleTrace && message.moduleTrace.filter((trace)=>!/next-(middleware|client-pages|route|edge-function)-loader\.js/.test(trace.originName)); | ||
| let body = message.message; | ||
@@ -50,0 +50,0 @@ const breakingChangeIndex = body.indexOf(WEBPACK_BREAKING_CHANGE_POLYFILLS); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../src/shared/lib/format-webpack-messages.ts"],"sourcesContent":["/**\nMIT License\n\nCopyright (c) 2015-present, Facebook, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\nimport stripAnsi from 'next/dist/compiled/strip-ansi'\n// This file is based on https://github.com/facebook/create-react-app/blob/7b1a32be6ec9f99a6c9a3c66813f3ac09c4736b9/packages/react-dev-utils/formatWebpackMessages.js\n// It's been edited to remove chalk and CRA-specific logic\n\nconst friendlySyntaxErrorLabel = 'Syntax error:'\n\nconst WEBPACK_BREAKING_CHANGE_POLYFILLS =\n '\\n\\nBREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.'\n\nfunction isLikelyASyntaxError(message: string) {\n return stripAnsi(message).includes(friendlySyntaxErrorLabel)\n}\n\nlet hadMissingSassError = false\n\n// Cleans up webpack error messages.\nfunction formatMessage(\n message: any,\n verbose?: boolean,\n importTraceNote?: boolean\n) {\n // TODO: Replace this once webpack 5 is stable\n if (typeof message === 'object' && message.message) {\n const filteredModuleTrace =\n message.moduleTrace &&\n message.moduleTrace.filter(\n (trace: any) =>\n !/next-(middleware|client-pages|route|edge-function)-loader\\.js/.test(\n trace.originName\n )\n )\n\n let body = message.message\n const breakingChangeIndex = body.indexOf(WEBPACK_BREAKING_CHANGE_POLYFILLS)\n if (breakingChangeIndex >= 0) {\n body = body.slice(0, breakingChangeIndex)\n }\n\n // TODO: Rspack currently doesn't populate moduleName correctly in some cases,\n // fall back to moduleIdentifier as a workaround\n if (\n process.env.NEXT_RSPACK &&\n !message.moduleName &&\n !message.file &&\n message.moduleIdentifier\n ) {\n const parts = message.moduleIdentifier.split('!')\n message.moduleName = parts[parts.length - 1]\n }\n\n message =\n (message.moduleName ? stripAnsi(message.moduleName) + '\\n' : '') +\n (message.file ? stripAnsi(message.file) + '\\n' : '') +\n body +\n (message.details && verbose ? '\\n' + message.details : '') +\n (filteredModuleTrace && filteredModuleTrace.length\n ? (importTraceNote || '\\n\\nImport trace for requested module:') +\n filteredModuleTrace\n .map((trace: any) => `\\n${trace.moduleName}`)\n .join('')\n : '') +\n (message.stack && verbose ? '\\n' + message.stack : '')\n }\n let lines = message.split('\\n')\n\n // Extract loader paths from Webpack-added headers and move them to end.\n // Original format: \"Module build failed (from ./loaders/foo-loader.js):\"\n // The header line is removed and the path is appended at the end as:\n // \" (from ./loaders/foo-loader.js)\"\n // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n const loaderPaths: string[] = []\n lines = lines.filter((line: string) => {\n const match = /Module [A-z ]+\\(from (.+)\\):?\\s*$/.exec(line)\n if (match) {\n loaderPaths.push(match[1])\n return false\n }\n return true\n })\n\n // Transform parsing error into syntax error\n // TODO: move this to our ESLint formatter?\n lines = lines.map((line: string) => {\n const parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(\n line\n )\n if (!parsingError) {\n return line\n }\n const [, errorLine, errorColumn, errorMessage] = parsingError\n return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`\n })\n\n message = lines.join('\\n')\n // Smoosh syntax errors (commonly found in CSS)\n message = message.replace(\n /SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g,\n `${friendlySyntaxErrorLabel} $3 ($1:$2)\\n`\n )\n // Clean up export errors\n message = message.replace(\n /^.*export '(.+?)' was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$2'.`\n )\n message = message.replace(\n /^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$2' does not contain a default export (imported as '$1').`\n )\n message = message.replace(\n /^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$3' (imported as '$2').`\n )\n lines = message.split('\\n')\n\n // Remove leading newline\n if (lines.length > 2 && lines[1].trim() === '') {\n lines.splice(1, 1)\n }\n\n // Cleans up verbose \"module not found\" messages for files and packages.\n if (lines[1] && lines[1].startsWith('Module not found: ')) {\n lines = [\n lines[0],\n lines[1]\n .replace('Error: ', '')\n .replace('Module not found: Cannot find file:', 'Cannot find file:'),\n ...lines.slice(2),\n ]\n }\n\n // Add helpful message for users trying to use Sass for the first time\n if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {\n // ./file.module.scss (<<loader info>>) => ./file.module.scss\n const firstLine = lines[0].split('!')\n lines[0] = firstLine[firstLine.length - 1]\n\n lines[1] =\n \"To use Next.js' built-in Sass support, you first need to install `sass`.\\n\"\n lines[1] += 'Run `npm i sass` or `yarn add sass` inside your workspace.\\n'\n lines[1] += '\\nLearn more: https://nextjs.org/docs/messages/install-sass'\n\n // dispose of unhelpful stack trace\n lines = lines.slice(0, 2)\n hadMissingSassError = true\n } else if (\n hadMissingSassError &&\n message.match(/(sass-loader|resolve-url-loader: CSS error)/)\n ) {\n // dispose of unhelpful stack trace following missing sass module\n lines = []\n }\n\n if (!verbose) {\n message = lines.join('\\n')\n // Internal stacks are generally useless so we strip them... with the\n // exception of stacks containing `webpack:` because they're normally\n // from user code generated by Webpack. For more information see\n // https://github.com/facebook/create-react-app/pull/1050\n message = message.replace(\n /^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm,\n ''\n ) // at ... ...:x:y\n message = message.replace(/^\\s*at\\s<anonymous>(\\n|$)/gm, '') // at <anonymous>\n\n message = message.replace(\n /File was processed with these loaders:\\n(.+[\\\\/](next[\\\\/]dist[\\\\/].+|@next[\\\\/]react-refresh-utils[\\\\/]loader)\\.js\\n)*You may need an additional loader to handle the result of these loaders.\\n/g,\n ''\n )\n\n lines = message.split('\\n')\n }\n\n // Append loader paths at the end (before any remaining stack trace)\n if (loaderPaths.length > 0) {\n for (const loaderPath of loaderPaths) {\n // Don't show internal Next.js loader paths — they're noise for users\n if (!/[/\\\\]next[/\\\\]dist[/\\\\]/.test(loaderPath)) {\n lines.push(` (from ${loaderPath})`)\n }\n }\n }\n\n // Remove duplicated newlines\n lines = (lines as string[]).filter(\n (line, index, arr) =>\n index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()\n )\n\n // Reassemble the message\n message = lines.join('\\n')\n return message.trim()\n}\n\nexport default function formatWebpackMessages(json: any, verbose?: boolean) {\n const formattedErrors = json.errors.map((message: any) => {\n const isUnknownNextFontError = message.message.includes(\n 'An error occurred in `next/font`.'\n )\n return formatMessage(message, isUnknownNextFontError || verbose)\n })\n const formattedWarnings = json.warnings.map((message: any) => {\n return formatMessage(message, verbose)\n })\n\n // Reorder errors to put the most relevant ones first.\n let reactServerComponentsError = -1\n\n for (let i = 0; i < formattedErrors.length; i++) {\n const error = formattedErrors[i]\n if (error.includes('ReactServerComponentsError')) {\n reactServerComponentsError = i\n break\n }\n }\n\n // Move the reactServerComponentsError to the top if it exists\n if (reactServerComponentsError !== -1) {\n const error = formattedErrors.splice(reactServerComponentsError, 1)\n formattedErrors.unshift(error[0])\n }\n\n const result = {\n ...json,\n errors: formattedErrors,\n warnings: formattedWarnings,\n }\n if (!verbose && result.errors.some(isLikelyASyntaxError)) {\n // If there are any syntax errors, show just them.\n result.errors = result.errors.filter(isLikelyASyntaxError)\n result.warnings = []\n }\n return result\n}\n"],"names":["formatWebpackMessages","friendlySyntaxErrorLabel","WEBPACK_BREAKING_CHANGE_POLYFILLS","isLikelyASyntaxError","message","stripAnsi","includes","hadMissingSassError","formatMessage","verbose","importTraceNote","filteredModuleTrace","moduleTrace","filter","trace","test","originName","body","breakingChangeIndex","indexOf","slice","process","env","NEXT_RSPACK","moduleName","file","moduleIdentifier","parts","split","length","details","map","join","stack","lines","loaderPaths","line","match","exec","push","parsingError","errorLine","errorColumn","errorMessage","replace","trim","splice","startsWith","firstLine","loaderPath","index","arr","json","formattedErrors","errors","isUnknownNextFontError","formattedWarnings","warnings","reactServerComponentsError","i","error","unshift","result","some"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;AAsBA;;;;+BAkMA;;;eAAwBA;;;;oEAjMF;AACtB,qKAAqK;AACrK,0DAA0D;AAE1D,MAAMC,2BAA2B;AAEjC,MAAMC,oCACJ;AAEF,SAASC,qBAAqBC,OAAe;IAC3C,OAAOC,IAAAA,kBAAS,EAACD,SAASE,QAAQ,CAACL;AACrC;AAEA,IAAIM,sBAAsB;AAE1B,oCAAoC;AACpC,SAASC,cACPJ,OAAY,EACZK,OAAiB,EACjBC,eAAyB;IAEzB,8CAA8C;IAC9C,IAAI,OAAON,YAAY,YAAYA,QAAQA,OAAO,EAAE;QAClD,MAAMO,sBACJP,QAAQQ,WAAW,IACnBR,QAAQQ,WAAW,CAACC,MAAM,CACxB,CAACC,QACC,CAAC,gEAAgEC,IAAI,CACnED,MAAME,UAAU;QAIxB,IAAIC,OAAOb,QAAQA,OAAO;QAC1B,MAAMc,sBAAsBD,KAAKE,OAAO,CAACjB;Q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AKE,MAAM,CAACvB,GAAG,CAAC,CAAC3B;QACvC,MAAMmD,yBAAyBnD,QAAQA,OAAO,CAACE,QAAQ,CACrD;QAEF,OAAOE,cAAcJ,SAASmD,0BAA0B9C;IAC1D;IACA,MAAM+C,oBAAoBJ,KAAKK,QAAQ,CAAC1B,GAAG,CAAC,CAAC3B;QAC3C,OAAOI,cAAcJ,SAASK;IAChC;IAEA,sDAAsD;IACtD,IAAIiD,6BAA6B,CAAC;IAElC,IAAK,IAAIC,IAAI,GAAGA,IAAIN,gBAAgBxB,MAAM,EAAE8B,IAAK;QAC/C,MAAMC,QAAQP,eAAe,CAACM,EAAE;QAChC,IAAIC,MAAMtD,QAAQ,CAAC,+BAA+B;YAChDoD,6BAA6BC;YAC7B;QACF;IACF;IAEA,8DAA8D;IAC9D,IAAID,+BAA+B,CAAC,GAAG;QACrC,MAAME,QAAQP,gBAAgBP,MAAM,CAACY,4BAA4B;QACjEL,gBAAgBQ,OAAO,CAACD,KAAK,CAAC,EAAE;IAClC;IAEA,MAAME,SAAS;QACb,GAAGV,IAAI;QACPE,QAAQD;QACRI,UAAUD;IACZ;IACA,IAAI,CAAC/C,WAAWqD,OAAOR,MAAM,CAACS,IAAI,CAAC5D,uBAAuB;QACxD,kDAAkD;QAClD2D,OAAOR,MAAM,GAAGQ,OAAOR,MAAM,CAACzC,MAAM,CAACV;QACrC2D,OAAOL,QAAQ,GAAG,EAAE;IACtB;IACA,OAAOK;AACT","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../src/shared/lib/format-webpack-messages.ts"],"sourcesContent":["/**\nMIT License\n\nCopyright (c) 2015-present, Facebook, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\nimport stripAnsi from 'next/dist/compiled/strip-ansi'\n// This file is based on https://github.com/facebook/create-react-app/blob/7b1a32be6ec9f99a6c9a3c66813f3ac09c4736b9/packages/react-dev-utils/formatWebpackMessages.js\n// It's been edited to remove chalk and CRA-specific logic\n\nconst friendlySyntaxErrorLabel = 'Syntax error:'\n\nconst WEBPACK_BREAKING_CHANGE_POLYFILLS =\n '\\n\\nBREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.'\n\nfunction isLikelyASyntaxError(message: string) {\n return stripAnsi(message).includes(friendlySyntaxErrorLabel)\n}\n\nlet hadMissingSassError = false\n\n// Cleans up webpack error messages.\nfunction formatMessage(\n message: any,\n verbose?: boolean,\n importTraceNote?: boolean\n) {\n // TODO: Replace this once webpack 5 is stable\n if (typeof message === 'object' && message.message) {\n let filteredModuleTrace =\n message.moduleTrace &&\n message.moduleTrace.filter(\n (trace: any) =>\n !/next-(middleware|client-pages|route|edge-function)-loader\\.js/.test(\n trace.originName\n )\n )\n\n let body = message.message\n const breakingChangeIndex = body.indexOf(WEBPACK_BREAKING_CHANGE_POLYFILLS)\n if (breakingChangeIndex >= 0) {\n body = body.slice(0, breakingChangeIndex)\n }\n\n // TODO: Rspack currently doesn't populate moduleName correctly in some cases,\n // fall back to moduleIdentifier as a workaround\n if (\n process.env.NEXT_RSPACK &&\n !message.moduleName &&\n !message.file &&\n message.moduleIdentifier\n ) {\n const parts = message.moduleIdentifier.split('!')\n message.moduleName = parts[parts.length - 1]\n }\n\n message =\n (message.moduleName ? stripAnsi(message.moduleName) + '\\n' : '') +\n (message.file ? stripAnsi(message.file) + '\\n' : '') +\n body +\n (message.details && verbose ? '\\n' + message.details : '') +\n (filteredModuleTrace && filteredModuleTrace.length\n ? (importTraceNote || '\\n\\nImport trace for requested module:') +\n filteredModuleTrace\n .map((trace: any) => `\\n${trace.moduleName}`)\n .join('')\n : '') +\n (message.stack && verbose ? '\\n' + message.stack : '')\n }\n let lines = message.split('\\n')\n\n // Extract loader paths from Webpack-added headers and move them to end.\n // Original format: \"Module build failed (from ./loaders/foo-loader.js):\"\n // The header line is removed and the path is appended at the end as:\n // \" (from ./loaders/foo-loader.js)\"\n // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n const loaderPaths: string[] = []\n lines = lines.filter((line: string) => {\n const match = /Module [A-z ]+\\(from (.+)\\):?\\s*$/.exec(line)\n if (match) {\n loaderPaths.push(match[1])\n return false\n }\n return true\n })\n\n // Transform parsing error into syntax error\n // TODO: move this to our ESLint formatter?\n lines = lines.map((line: string) => {\n const parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(\n line\n )\n if (!parsingError) {\n return line\n }\n const [, errorLine, errorColumn, errorMessage] = parsingError\n return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`\n })\n\n message = lines.join('\\n')\n // Smoosh syntax errors (commonly found in CSS)\n message = message.replace(\n /SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g,\n `${friendlySyntaxErrorLabel} $3 ($1:$2)\\n`\n )\n // Clean up export errors\n message = message.replace(\n /^.*export '(.+?)' was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$2'.`\n )\n message = message.replace(\n /^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$2' does not contain a default export (imported as '$1').`\n )\n message = message.replace(\n /^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$3' (imported as '$2').`\n )\n lines = message.split('\\n')\n\n // Remove leading newline\n if (lines.length > 2 && lines[1].trim() === '') {\n lines.splice(1, 1)\n }\n\n // Cleans up verbose \"module not found\" messages for files and packages.\n if (lines[1] && lines[1].startsWith('Module not found: ')) {\n lines = [\n lines[0],\n lines[1]\n .replace('Error: ', '')\n .replace('Module not found: Cannot find file:', 'Cannot find file:'),\n ...lines.slice(2),\n ]\n }\n\n // Add helpful message for users trying to use Sass for the first time\n if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {\n // ./file.module.scss (<<loader info>>) => ./file.module.scss\n const firstLine = lines[0].split('!')\n lines[0] = firstLine[firstLine.length - 1]\n\n lines[1] =\n \"To use Next.js' built-in Sass support, you first need to install `sass`.\\n\"\n lines[1] += 'Run `npm i sass` or `yarn add sass` inside your workspace.\\n'\n lines[1] += '\\nLearn more: https://nextjs.org/docs/messages/install-sass'\n\n // dispose of unhelpful stack trace\n lines = lines.slice(0, 2)\n hadMissingSassError = true\n } else if (\n hadMissingSassError &&\n message.match(/(sass-loader|resolve-url-loader: CSS error)/)\n ) {\n // dispose of unhelpful stack trace following missing sass module\n lines = []\n }\n\n if (!verbose) {\n message = lines.join('\\n')\n // Internal stacks are generally useless so we strip them... with the\n // exception of stacks containing `webpack:` because they're normally\n // from user code generated by Webpack. For more information see\n // https://github.com/facebook/create-react-app/pull/1050\n message = message.replace(\n /^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm,\n ''\n ) // at ... ...:x:y\n message = message.replace(/^\\s*at\\s<anonymous>(\\n|$)/gm, '') // at <anonymous>\n\n message = message.replace(\n /File was processed with these loaders:\\n(.+[\\\\/](next[\\\\/]dist[\\\\/].+|@next[\\\\/]react-refresh-utils[\\\\/]loader)\\.js\\n)*You may need an additional loader to handle the result of these loaders.\\n/g,\n ''\n )\n\n lines = message.split('\\n')\n }\n\n // Append loader paths at the end (before any remaining stack trace)\n if (loaderPaths.length > 0) {\n for (const loaderPath of loaderPaths) {\n // Don't show internal Next.js loader paths — they're noise for users\n if (!/[/\\\\]next[/\\\\]dist[/\\\\]/.test(loaderPath)) {\n lines.push(` (from ${loaderPath})`)\n }\n }\n }\n\n // Remove duplicated newlines\n lines = (lines as string[]).filter(\n (line, index, arr) =>\n index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()\n )\n\n // Reassemble the message\n message = lines.join('\\n')\n return message.trim()\n}\n\nexport default function formatWebpackMessages(json: any, verbose?: boolean) {\n const formattedErrors = json.errors.map((message: any) => {\n const isUnknownNextFontError = message.message.includes(\n 'An error occurred in `next/font`.'\n )\n return formatMessage(message, isUnknownNextFontError || verbose)\n })\n const formattedWarnings = json.warnings.map((message: any) => {\n return formatMessage(message, verbose)\n })\n\n // Reorder errors to put the most relevant ones first.\n let reactServerComponentsError = -1\n\n for (let i = 0; i < formattedErrors.length; i++) {\n const error = formattedErrors[i]\n if (error.includes('ReactServerComponentsError')) {\n reactServerComponentsError = i\n break\n }\n }\n\n // Move the reactServerComponentsError to the top if it exists\n if (reactServerComponentsError !== -1) {\n const error = formattedErrors.splice(reactServerComponentsError, 1)\n formattedErrors.unshift(error[0])\n }\n\n const result = {\n ...json,\n errors: formattedErrors,\n warnings: formattedWarnings,\n }\n if (!verbose && result.errors.some(isLikelyASyntaxError)) {\n // If there are any syntax errors, show just them.\n result.errors = result.errors.filter(isLikelyASyntaxError)\n result.warnings = []\n }\n return result\n}\n"],"names":["formatWebpackMessages","friendlySyntaxErrorLabel","WEBPACK_BREAKING_CHANGE_POLYFILLS","isLikelyASyntaxError","message","stripAnsi","includes","hadMissingSassError","formatMessage","verbose","importTraceNote","filteredModuleTrace","moduleTrace","filter","trace","test","originName","body","breakingChangeIndex","indexOf","slice","process","env","NEXT_RSPACK","moduleName","file","moduleIdentifier","parts","split","length","details","map","join","stack","lines","loaderPaths","line","match","exec","push","parsingError","errorLine","errorColumn","errorMessage","replace","trim","splice","startsWith","firstLine","loaderPath","index","arr","json","formattedErrors","errors","isUnknownNextFontError","formattedWarnings","warnings","reactServerComponentsError","i","error","unshift","result","some"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;AAsBA;;;;+BAkMA;;;eAAwBA;;;;oEAjMF;AACtB,qKAAqK;AACrK,0DAA0D;AAE1D,MAAMC,2BAA2B;AAEjC,MAAMC,oCACJ;AAEF,SAASC,qBAAqBC,OAAe;IAC3C,OAAOC,IAAAA,kBAAS,EAACD,SAASE,QAAQ,CAACL;AACrC;AAEA,IAAIM,sBAAsB;AAE1B,oCAAoC;AACpC,SAASC,cACPJ,OAAY,EACZK,OAAiB,EACjBC,eAAyB;IAEzB,8CAA8C;IAC9C,IAAI,OAAON,YAAY,YAAYA,QAAQA,OAAO,EAAE;QAClD,IAAIO,sBACFP,QAAQQ,WAAW,IACnBR,QAAQQ,WAAW,CAACC,MAAM,CACxB,CAACC,QACC,CAAC,gEAAgEC,IAAI,CACnED,MAAME,UAAU;QAIxB,IAAIC,OAAOb,QAAQA,OAAO;QAC1B,MAAMc,sBAAsBD,KAAKE,OAAO,CAACjB;QACzC,IAAIgB,uBAAuB,GAAG;YAC5BD,OAAOA,KAAKG,KAAK,CAAC,GAAGF;QACvB;QAEA,8EAA8E;QAC9E,gDAAgD;QAChD,IACEG,QAAQC,GAAG,CAACC,WAAW,IACvB,CAACnB,QAAQoB,UAAU,IACnB,CAACpB,QAAQqB,IAAI,IACbrB,QAAQsB,gBAAgB,EACxB;YACA,MAAMC,QAAQvB,QAAQsB,gBAAgB,CAACE,KAAK,CAAC;YAC7CxB,QAAQoB,UAAU,GAAGG,KAAK,CAACA,MAAME,MAAM,GAAG,EAAE;QAC9C;QAEAzB,UACE,AAACA,CAAAA,QAAQoB,UAAU,GAAGnB,IAAAA,kBAAS,EAACD,QAAQoB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BAA+B;YAChDoD,6BAA6BC;YAC7B;QACF;IACF;IAEA,8DAA8D;IAC9D,IAAID,+BAA+B,CAAC,GAAG;QACrC,MAAME,QAAQP,gBAAgBP,MAAM,CAACY,4BAA4B;QACjEL,gBAAgBQ,OAAO,CAACD,KAAK,CAAC,EAAE;IAClC;IAEA,MAAME,SAAS;QACb,GAAGV,IAAI;QACPE,QAAQD;QACRI,UAAUD;IACZ;IACA,IAAI,CAAC/C,WAAWqD,OAAOR,MAAM,CAACS,IAAI,CAAC5D,uBAAuB;QACxD,kDAAkD;QAClD2D,OAAOR,MAAM,GAAGQ,OAAOR,MAAM,CAACzC,MAAM,CAACV;QACrC2D,OAAOL,QAAQ,GAAG,EAAE;IACtB;IACA,OAAOK;AACT","ignoreList":[0]} |
@@ -11,3 +11,2 @@ "use strict"; | ||
| }); | ||
| const _warnonce = require("./utils/warn-once"); | ||
| const _deploymentid = require("./deployment-id"); | ||
@@ -289,2 +288,3 @@ const _imageblursvg = require("./image-blur-svg"); | ||
| if (process.env.NODE_ENV !== 'production') { | ||
| const { warnOnce } = require('./utils/warn-once'); | ||
| if (config.output === 'export' && isDefaultLoader && !unoptimized) { | ||
@@ -425,7 +425,7 @@ throw Object.defineProperty(new Error(`Image Optimization using the default loader is not compatible with \`{ output: 'export' }\`. | ||
| if (widthInt && heightInt && widthInt * heightInt < 1600) { | ||
| (0, _warnonce.warnOnce)(`Image with src "${src}" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.`); | ||
| warnOnce(`Image with src "${src}" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.`); | ||
| } | ||
| } | ||
| if (qualityInt && config.qualities && !config.qualities.includes(qualityInt)) { | ||
| (0, _warnonce.warnOnce)(`Image with src "${src}" is using quality "${qualityInt}" which is not configured in images.qualities [${config.qualities.join(', ')}]. Please update your config to [${[ | ||
| warnOnce(`Image with src "${src}" is using quality "${qualityInt}" which is not configured in images.qualities [${config.qualities.join(', ')}]. Please update your config to [${[ | ||
| ...config.qualities, | ||
@@ -455,3 +455,3 @@ qualityInt | ||
| if ('ref' in rest) { | ||
| (0, _warnonce.warnOnce)(`Image with src "${src}" is using unsupported "ref" property. Consider using the "onLoad" property instead.`); | ||
| warnOnce(`Image with src "${src}" is using unsupported "ref" property. Consider using the "onLoad" property instead.`); | ||
| } | ||
@@ -470,7 +470,7 @@ if (!unoptimized && !isDefaultLoader) { | ||
| if (urlStr === src || url && url.pathname === src && !url.search) { | ||
| (0, _warnonce.warnOnce)(`Image with src "${src}" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.` + `\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader-width`); | ||
| warnOnce(`Image with src "${src}" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.` + `\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader-width`); | ||
| } | ||
| } | ||
| if (onLoadingComplete) { | ||
| (0, _warnonce.warnOnce)(`Image with src "${src}" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.`); | ||
| warnOnce(`Image with src "${src}" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.`); | ||
| } | ||
@@ -485,3 +485,3 @@ for (const [legacyKey, legacyValue] of Object.entries({ | ||
| if (legacyValue) { | ||
| (0, _warnonce.warnOnce)(`Image with src "${src}" has legacy prop "${legacyKey}". Did you forget to run the codemod?` + `\nRead more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`); | ||
| warnOnce(`Image with src "${src}" has legacy prop "${legacyKey}". Did you forget to run the codemod?` + `\nRead more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`); | ||
| } | ||
@@ -497,3 +497,3 @@ } | ||
| // https://web.dev/lcp/#measure-lcp-in-javascript | ||
| (0, _warnonce.warnOnce)(`Image with src "${lcpImage.src}" was detected as the Largest Contentful Paint (LCP). Please add the \`loading="eager"\` property if this image is above the fold.` + `\nRead more: https://nextjs.org/docs/app/api-reference/components/image#loading`); | ||
| warnOnce(`Image with src "${lcpImage.src}" was detected as the Largest Contentful Paint (LCP). Please add the \`loading="eager"\` property if this image is above the fold.` + `\nRead more: https://nextjs.org/docs/app/api-reference/components/image#loading`); | ||
| } | ||
@@ -500,0 +500,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../src/shared/lib/get-img-props.ts"],"sourcesContent":["import { warnOnce } from './utils/warn-once'\nimport { getAssetToken, getDeploymentId } from './deployment-id'\nimport { getImageBlurSvg } from './image-blur-svg'\nimport { imageConfigDefault } from './image-config'\nimport type {\n ImageConfigComplete,\n ImageLoaderProps,\n ImageLoaderPropsWithConfig,\n} from './image-config'\n\nimport type { CSSProperties, JSX } from 'react'\n\nexport interface StaticImageData {\n src: string\n height: number\n width: number\n blurDataURL?: string\n blurWidth?: number\n blurHeight?: number\n}\n\nexport interface StaticRequire {\n default: StaticImageData\n}\n\nexport type StaticImport = StaticRequire | StaticImageData\n\nexport type ImageProps = Omit<\n JSX.IntrinsicElements['img'],\n 'src' | 'srcSet' | 'ref' | 'alt' | 'width' | 'height' | 'loading'\n> & {\n src: string | StaticImport\n alt: string\n width?: number | `${number}`\n height?: number | `${number}`\n fill?: boolean\n loader?: ImageLoader\n quality?: number | `${number}`\n preload?: boolean\n /**\n * @deprecated Use `preload` prop instead.\n * See https://nextjs.org/docs/app/api-reference/components/image#preload\n */\n priority?: boolean\n loading?: LoadingValue\n placeholder?: PlaceholderValue\n blurDataURL?: string\n unoptimized?: boolean\n overrideSrc?: string\n /**\n * @deprecated Use `onLoad` instead.\n * @see https://nextjs.org/docs/app/api-reference/components/image#onload\n */\n onLoadingComplete?: OnLoadingComplete\n /**\n * @deprecated Use `fill` prop instead of `layout=\"fill\"` or change import to `next/legacy/image`.\n * @see https://nextjs.org/docs/api-reference/next/legacy/image\n */\n layout?: string\n /**\n * @deprecated Use `style` prop instead.\n */\n objectFit?: string\n /**\n * @deprecated Use `style` prop instead.\n */\n objectPosition?: string\n /**\n * @deprecated This prop does not do anything.\n */\n lazyBoundary?: string\n /**\n * @deprecated This prop does not do anything.\n */\n lazyRoot?: string\n}\n\nexport type ImgProps = Omit<ImageProps, 'src' | 'loader'> & {\n loading: LoadingValue\n width: number | undefined\n height: number | undefined\n style: NonNullable<JSX.IntrinsicElements['img']['style']>\n sizes: string | undefined\n srcSet: string | undefined\n src: string\n}\n\nconst VALID_LOADING_VALUES = ['lazy', 'eager', undefined] as const\n\n// Object-fit values that are not valid background-size values\nconst INVALID_BACKGROUND_SIZE_VALUES = [\n '-moz-initial',\n 'fill',\n 'none',\n 'scale-down',\n undefined,\n]\ntype LoadingValue = (typeof VALID_LOADING_VALUES)[number]\ntype ImageConfig = ImageConfigComplete & {\n allSizes: number[]\n output?: 'standalone' | 'export'\n}\n\nexport type ImageLoader = (p: ImageLoaderProps) => string\n\n// Do not export - this is an internal type only\n// because `next.config.js` is only meant for the\n// built-in loaders, not for a custom loader() prop.\ntype ImageLoaderWithConfig = (p: ImageLoaderPropsWithConfig) => string\n\nexport type PlaceholderValue = 'blur' | 'empty' | `data:image/${string}`\nexport type OnLoad = React.ReactEventHandler<HTMLImageElement> | undefined\nexport type OnLoadingComplete = (img: HTMLImageElement) => void\n\nexport type PlaceholderStyle = Partial<\n Pick<\n CSSProperties,\n | 'backgroundSize'\n | 'backgroundPosition'\n | 'backgroundRepeat'\n | 'backgroundImage'\n >\n>\n\nfunction isStaticRequire(\n src: StaticRequire | StaticImageData\n): src is StaticRequire {\n return (src as StaticRequire).default !== undefined\n}\n\nfunction isStaticImageData(\n src: StaticRequire | StaticImageData\n): src is StaticImageData {\n return (src as StaticImageData).src !== undefined\n}\n\nfunction isStaticImport(src: string | StaticImport): src is StaticImport {\n return (\n !!src &&\n typeof src === 'object' &&\n (isStaticRequire(src as StaticImport) ||\n isStaticImageData(src as StaticImport))\n )\n}\n\nconst allImgs = new Map<\n string,\n { src: string; loading: LoadingValue; placeholder: PlaceholderValue }\n>()\nlet perfObserver: PerformanceObserver | undefined\n\nfunction getInt(x: unknown): number | undefined {\n if (typeof x === 'undefined') {\n return x\n }\n if (typeof x === 'number') {\n return Number.isFinite(x) ? x : NaN\n }\n if (typeof x === 'string' && /^[0-9]+$/.test(x)) {\n return parseInt(x, 10)\n }\n return NaN\n}\n\nfunction getWidths(\n { deviceSizes, allSizes }: ImageConfig,\n width: number | undefined,\n sizes: string | undefined\n): { widths: number[]; kind: 'w' | 'x' } {\n if (sizes) {\n // Find all the \"vw\" percent sizes used in the sizes prop\n const viewportWidthRe = /(^|\\s)(1?\\d?\\d)vw/g\n const percentSizes = []\n for (let match; (match = viewportWidthRe.exec(sizes)); match) {\n percentSizes.push(parseInt(match[2]))\n }\n if (percentSizes.length) {\n const smallestRatio = Math.min(...percentSizes) * 0.01\n return {\n widths: allSizes.filter((s) => s >= deviceSizes[0] * smallestRatio),\n kind: 'w',\n }\n }\n return { widths: allSizes, kind: 'w' }\n }\n if (typeof width !== 'number') {\n return { widths: deviceSizes, kind: 'w' }\n }\n\n const widths = [\n ...new Set(\n // > This means that most OLED screens that say they are 3x resolution,\n // > are actually 3x in the green color, but only 1.5x in the red and\n // > blue colors. Showing a 3x resolution image in the app vs a 2x\n // > resolution image will be visually the same, though the 3x image\n // > takes significantly more data. Even true 3x resolution screens are\n // > wasteful as the human eye cannot see that level of detail without\n // > something like a magnifying glass.\n // https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html\n [width, width * 2 /*, width * 3*/].map(\n (w) => allSizes.find((p) => p >= w) || allSizes[allSizes.length - 1]\n )\n ),\n ]\n return { widths, kind: 'x' }\n}\n\ntype GenImgAttrsData = {\n config: ImageConfig\n src: string\n unoptimized: boolean\n loader: ImageLoaderWithConfig\n width?: number\n quality?: number\n sizes?: string\n}\n\ntype GenImgAttrsResult = {\n src: string\n srcSet: string | undefined\n sizes: string | undefined\n}\n\nfunction generateImgAttrs({\n config,\n src,\n unoptimized,\n width,\n quality,\n sizes,\n loader,\n}: GenImgAttrsData): GenImgAttrsResult {\n if (unoptimized) {\n if (src.startsWith('/') && !src.startsWith('//')) {\n let deploymentId = getDeploymentId()\n if (src.includes('/_next/static/immutable') && !getAssetToken()) {\n // immutable static asset and supported by platform, don't add `?dpl=`\n deploymentId = undefined\n } else if (deploymentId) {\n // We unfortunately can't easily use `new URL()` here, because it normalizes the URL which causes\n // double-encoding with the `encodeURIComponent(src)` below\n const qIndex = src.indexOf('?')\n if (qIndex !== -1) {\n const params = new URLSearchParams(src.slice(qIndex + 1))\n const srcDpl = params.get('dpl')\n if (!srcDpl) {\n // src is missing the dpl parameter, but we have a deploymentId, so add it to the src URL\n params.append('dpl', deploymentId)\n src = src.slice(0, qIndex) + '?' + params.toString()\n }\n } else {\n // src is missing the dpl parameter, but we have a deploymentId, so add it to the src URL\n src = src + `?dpl=${deploymentId}`\n }\n }\n }\n return { src, srcSet: undefined, sizes: undefined }\n }\n\n const { widths, kind } = getWidths(config, width, sizes)\n const last = widths.length - 1\n\n return {\n sizes: !sizes && kind === 'w' ? '100vw' : sizes,\n srcSet: widths\n .map(\n (w, i) =>\n `${loader({ config, src, quality, width: w })} ${\n kind === 'w' ? w : i + 1\n }${kind}`\n )\n .join(', '),\n\n // It's intended to keep `src` the last attribute because React updates\n // attributes in order. If we keep `src` the first one, Safari will\n // immediately start to fetch `src`, before `sizes` and `srcSet` are even\n // updated by React. That causes multiple unnecessary requests if `srcSet`\n // and `sizes` are defined.\n // This bug cannot be reproduced in Chrome or Firefox.\n src: loader({ config, src, quality, width: widths[last] }),\n }\n}\n\n/**\n * A shared function, used on both client and server, to generate the props for <img>.\n */\nexport function getImgProps(\n {\n src,\n sizes,\n unoptimized = false,\n priority = false,\n preload = false,\n loading,\n className,\n quality,\n width,\n height,\n fill = false,\n style,\n overrideSrc,\n onLoad,\n onLoadingComplete,\n placeholder = 'empty',\n blurDataURL,\n fetchPriority,\n decoding = 'async',\n layout,\n objectFit,\n objectPosition,\n lazyBoundary,\n lazyRoot,\n ...rest\n }: ImageProps,\n _state: {\n defaultLoader: ImageLoaderWithConfig\n imgConf: ImageConfigComplete\n showAltText?: boolean\n blurComplete?: boolean\n }\n): {\n props: ImgProps\n meta: {\n unoptimized: boolean\n preload: boolean\n placeholder: NonNullable<ImageProps['placeholder']>\n fill: boolean\n }\n} {\n const { imgConf, showAltText, blurComplete, defaultLoader } = _state\n let config: ImageConfig\n let c = imgConf || imageConfigDefault\n if ('allSizes' in c) {\n config = c as ImageConfig\n } else {\n const allSizes = [...c.deviceSizes, ...c.imageSizes].sort((a, b) => a - b)\n const deviceSizes = c.deviceSizes.sort((a, b) => a - b)\n const qualities = c.qualities?.sort((a, b) => a - b)\n config = { ...c, allSizes, deviceSizes, qualities }\n }\n\n if (typeof defaultLoader === 'undefined') {\n throw new Error(\n 'images.loaderFile detected but the file is missing default export.\\nRead more: https://nextjs.org/docs/messages/invalid-images-config'\n )\n }\n let loader: ImageLoaderWithConfig = rest.loader || defaultLoader\n\n // Remove property so it's not spread on <img> element\n delete rest.loader\n delete (rest as any).srcSet\n\n // This special value indicates that the user\n // didn't define a \"loader\" prop or \"loader\" config.\n const isDefaultLoader = '__next_img_default' in loader\n\n if (isDefaultLoader) {\n if (config.loader === 'custom') {\n throw new Error(\n `Image with src \"${src}\" is missing \"loader\" prop.` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader`\n )\n }\n } else {\n // The user defined a \"loader\" prop or config.\n // Since the config object is internal only, we\n // must not pass it to the user-defined \"loader\".\n const customImageLoader = loader as ImageLoader\n loader = (obj) => {\n const { config: _, ...opts } = obj\n return customImageLoader(opts)\n }\n }\n\n if (layout) {\n if (layout === 'fill') {\n fill = true\n }\n const layoutToStyle: Record<string, Record<string, string> | undefined> = {\n intrinsic: { maxWidth: '100%', height: 'auto' },\n responsive: { width: '100%', height: 'auto' },\n }\n const layoutToSizes: Record<string, string | undefined> = {\n responsive: '100vw',\n fill: '100vw',\n }\n const layoutStyle = layoutToStyle[layout]\n if (layoutStyle) {\n style = { ...style, ...layoutStyle }\n }\n const layoutSizes = layoutToSizes[layout]\n if (layoutSizes && !sizes) {\n sizes = layoutSizes\n }\n }\n\n let staticSrc = ''\n let widthInt = getInt(width)\n let heightInt = getInt(height)\n let blurWidth: number | undefined\n let blurHeight: number | undefined\n if (isStaticImport(src)) {\n const staticImageData = isStaticRequire(src) ? src.default : src\n\n if (!staticImageData.src) {\n throw new Error(\n `An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(\n staticImageData\n )}`\n )\n }\n if (!staticImageData.height || !staticImageData.width) {\n throw new Error(\n `An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(\n staticImageData\n )}`\n )\n }\n\n blurWidth = staticImageData.blurWidth\n blurHeight = staticImageData.blurHeight\n blurDataURL = blurDataURL || staticImageData.blurDataURL\n staticSrc = staticImageData.src\n\n if (!fill) {\n if (!widthInt && !heightInt) {\n widthInt = staticImageData.width\n heightInt = staticImageData.height\n } else if (widthInt && !heightInt) {\n const ratio = widthInt / staticImageData.width\n heightInt = Math.round(staticImageData.height * ratio)\n } else if (!widthInt && heightInt) {\n const ratio = heightInt / staticImageData.height\n widthInt = Math.round(staticImageData.width * ratio)\n }\n }\n }\n src = typeof src === 'string' ? src : staticSrc\n\n let isLazy =\n !priority &&\n !preload &&\n (loading === 'lazy' || typeof loading === 'undefined')\n if (!src || src.startsWith('data:') || src.startsWith('blob:')) {\n // https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n unoptimized = true\n isLazy = false\n }\n if (config.unoptimized) {\n unoptimized = true\n }\n if (\n isDefaultLoader &&\n !config.dangerouslyAllowSVG &&\n src.split('?', 1)[0].endsWith('.svg')\n ) {\n // Special case to make svg serve as-is to avoid proxying\n // through the built-in Image Optimization API.\n unoptimized = true\n }\n\n const qualityInt = getInt(quality)\n\n if (process.env.NODE_ENV !== 'production') {\n if (config.output === 'export' && isDefaultLoader && !unoptimized) {\n throw new Error(\n `Image Optimization using the default loader is not compatible with \\`{ output: 'export' }\\`.\n Possible solutions:\n - Remove \\`{ output: 'export' }\\` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure \\`{ images: { unoptimized: true } }\\` in \\`next.config.js\\` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api`\n )\n }\n if (!src) {\n // React doesn't show the stack trace and there's\n // no `src` to help identify which image, so we\n // instead console.error(ref) during mount.\n unoptimized = true\n } else {\n if (fill) {\n if (width) {\n throw new Error(\n `Image with src \"${src}\" has both \"width\" and \"fill\" properties. Only one should be used.`\n )\n }\n if (height) {\n throw new Error(\n `Image with src \"${src}\" has both \"height\" and \"fill\" properties. Only one should be used.`\n )\n }\n if (style?.position && style.position !== 'absolute') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.position\" properties. Images with \"fill\" always use position absolute - it cannot be modified.`\n )\n }\n if (style?.width && style.width !== '100%') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.width\" properties. Images with \"fill\" always use width 100% - it cannot be modified.`\n )\n }\n if (style?.height && style.height !== '100%') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.height\" properties. Images with \"fill\" always use height 100% - it cannot be modified.`\n )\n }\n } else {\n if (typeof widthInt === 'undefined') {\n throw new Error(\n `Image with src \"${src}\" is missing required \"width\" property.`\n )\n } else if (isNaN(widthInt)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"width\" property. Expected a numeric value in pixels but received \"${width}\".`\n )\n }\n if (typeof heightInt === 'undefined') {\n throw new Error(\n `Image with src \"${src}\" is missing required \"height\" property.`\n )\n } else if (isNaN(heightInt)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"height\" property. Expected a numeric value in pixels but received \"${height}\".`\n )\n }\n // eslint-disable-next-line no-control-regex\n if (/^[\\x00-\\x20]/.test(src)) {\n throw new Error(\n `Image with src \"${src}\" cannot start with a space or control character. Use src.trimStart() to remove it or encodeURIComponent(src) to keep it.`\n )\n }\n // eslint-disable-next-line no-control-regex\n if (/[\\x00-\\x20]$/.test(src)) {\n throw new Error(\n `Image with src \"${src}\" cannot end with a space or control character. Use src.trimEnd() to remove it or encodeURIComponent(src) to keep it.`\n )\n }\n }\n }\n if (!VALID_LOADING_VALUES.includes(loading)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"loading\" property. Provided \"${loading}\" should be one of ${VALID_LOADING_VALUES.map(\n String\n ).join(',')}.`\n )\n }\n if (priority && loading === 'lazy') {\n throw new Error(\n `Image with src \"${src}\" has both \"priority\" and \"loading='lazy'\" properties. Only one should be used.`\n )\n }\n if (preload && loading === 'lazy') {\n throw new Error(\n `Image with src \"${src}\" has both \"preload\" and \"loading='lazy'\" properties. Only one should be used.`\n )\n }\n if (preload && priority) {\n throw new Error(\n `Image with src \"${src}\" has both \"preload\" and \"priority\" properties. Only \"preload\" should be used.`\n )\n }\n if (\n placeholder !== 'empty' &&\n placeholder !== 'blur' &&\n !placeholder.startsWith('data:image/')\n ) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"placeholder\" property \"${placeholder}\".`\n )\n }\n if (placeholder !== 'empty') {\n if (widthInt && heightInt && widthInt * heightInt < 1600) {\n warnOnce(\n `Image with src \"${src}\" is smaller than 40x40. Consider removing the \"placeholder\" property to improve performance.`\n )\n }\n }\n if (\n qualityInt &&\n config.qualities &&\n !config.qualities.includes(qualityInt)\n ) {\n warnOnce(\n `Image with src \"${src}\" is using quality \"${qualityInt}\" which is not configured in images.qualities [${config.qualities.join(', ')}]. Please update your config to [${[...config.qualities, qualityInt].sort().join(', ')}].` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-unconfigured-qualities`\n )\n }\n if (placeholder === 'blur' && !blurDataURL) {\n const VALID_BLUR_EXT = ['jpeg', 'png', 'webp', 'avif'] // should match next-image-loader\n\n throw new Error(\n `Image with src \"${src}\" has \"placeholder='blur'\" property but is missing the \"blurDataURL\" property.\n Possible solutions:\n - Add a \"blurDataURL\" property, the contents should be a small Data URL to represent the image\n - Change the \"src\" property to a static import with one of the supported file types: ${VALID_BLUR_EXT.join(\n ','\n )} (animated images not supported)\n - Remove the \"placeholder\" property, effectively no blur effect\n Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`\n )\n }\n if ('ref' in rest) {\n warnOnce(\n `Image with src \"${src}\" is using unsupported \"ref\" property. Consider using the \"onLoad\" property instead.`\n )\n }\n\n if (!unoptimized && !isDefaultLoader) {\n const urlStr = loader({\n config,\n src,\n width: widthInt || 400,\n quality: qualityInt || 75,\n })\n let url: URL | undefined\n try {\n url = new URL(urlStr)\n } catch (err) {}\n if (urlStr === src || (url && url.pathname === src && !url.search)) {\n warnOnce(\n `Image with src \"${src}\" has a \"loader\" property that does not implement width. Please implement it or use the \"unoptimized\" property instead.` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader-width`\n )\n }\n }\n\n if (onLoadingComplete) {\n warnOnce(\n `Image with src \"${src}\" is using deprecated \"onLoadingComplete\" property. Please use the \"onLoad\" property instead.`\n )\n }\n\n for (const [legacyKey, legacyValue] of Object.entries({\n layout,\n objectFit,\n objectPosition,\n lazyBoundary,\n lazyRoot,\n })) {\n if (legacyValue) {\n warnOnce(\n `Image with src \"${src}\" has legacy prop \"${legacyKey}\". Did you forget to run the codemod?` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`\n )\n }\n }\n\n if (\n typeof window !== 'undefined' &&\n !perfObserver &&\n window.PerformanceObserver\n ) {\n perfObserver = new PerformanceObserver((entryList) => {\n for (const entry of entryList.getEntries()) {\n // @ts-ignore - missing \"LargestContentfulPaint\" class with \"element\" prop\n const imgSrc = entry?.element?.src || ''\n const lcpImage = allImgs.get(imgSrc)\n if (\n lcpImage &&\n lcpImage.loading === 'lazy' &&\n lcpImage.placeholder === 'empty' &&\n !lcpImage.src.startsWith('data:') &&\n !lcpImage.src.startsWith('blob:')\n ) {\n // https://web.dev/lcp/#measure-lcp-in-javascript\n warnOnce(\n `Image with src \"${lcpImage.src}\" was detected as the Largest Contentful Paint (LCP). Please add the \\`loading=\"eager\"\\` property if this image is above the fold.` +\n `\\nRead more: https://nextjs.org/docs/app/api-reference/components/image#loading`\n )\n }\n }\n })\n try {\n perfObserver.observe({\n type: 'largest-contentful-paint',\n buffered: true,\n })\n } catch (err) {\n // Log error but don't crash the app\n console.error(err)\n }\n }\n }\n const imgStyle = Object.assign(\n fill\n ? {\n position: 'absolute',\n height: '100%',\n width: '100%',\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n objectFit,\n objectPosition,\n }\n : {},\n showAltText ? {} : { color: 'transparent' },\n style\n )\n\n const backgroundImage =\n !blurComplete && placeholder !== 'empty'\n ? placeholder === 'blur'\n ? `url(\"data:image/svg+xml;charset=utf-8,${getImageBlurSvg({\n widthInt,\n heightInt,\n blurWidth,\n blurHeight,\n blurDataURL: blurDataURL || '', // assume not undefined\n objectFit: imgStyle.objectFit,\n })}\")`\n : `url(\"${placeholder}\")` // assume `data:image/`\n : null\n\n const backgroundSize = !INVALID_BACKGROUND_SIZE_VALUES.includes(\n imgStyle.objectFit\n )\n ? imgStyle.objectFit\n : imgStyle.objectFit === 'fill'\n ? '100% 100%' // the background-size equivalent of `fill`\n : 'cover'\n\n let placeholderStyle: PlaceholderStyle = backgroundImage\n ? {\n backgroundSize,\n backgroundPosition: imgStyle.objectPosition || '50% 50%',\n backgroundRepeat: 'no-repeat',\n backgroundImage,\n }\n : {}\n\n if (process.env.NODE_ENV === 'development') {\n if (\n placeholderStyle.backgroundImage &&\n placeholder === 'blur' &&\n blurDataURL?.startsWith('/')\n ) {\n // During `next dev`, we don't want to generate blur placeholders with webpack\n // because it can delay starting the dev server. Instead, `next-image-loader.js`\n // will inline a special url to lazily generate the blur placeholder at request time.\n placeholderStyle.backgroundImage = `url(\"${blurDataURL}\")`\n }\n }\n\n const imgAttributes = generateImgAttrs({\n config,\n src,\n unoptimized,\n width: widthInt,\n quality: qualityInt,\n sizes,\n loader,\n })\n\n const loadingFinal = isLazy ? 'lazy' : loading\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined') {\n let fullUrl: URL\n try {\n fullUrl = new URL(imgAttributes.src)\n } catch (e) {\n fullUrl = new URL(imgAttributes.src, window.location.href)\n }\n allImgs.set(fullUrl.href, { src, loading: loadingFinal, placeholder })\n }\n }\n\n const props: ImgProps = {\n ...rest,\n loading: loadingFinal,\n fetchPriority,\n width: widthInt,\n height: heightInt,\n decoding,\n className,\n style: { ...imgStyle, ...placeholderStyle },\n sizes: imgAttributes.sizes,\n srcSet: imgAttributes.srcSet,\n src: overrideSrc || imgAttributes.src,\n }\n const meta = { unoptimized, preload: preload || priority, placeholder, fill }\n return { props, meta }\n}\n"],"names":["getImgProps","VALID_LOADING_VALUES","undefined","INVALID_BACKGROUND_SIZE_VALUES","isStaticRequire","src","default","isStaticImageData","isStaticImport","allImgs","Map","perfObserver","getInt","x","Number","isFinite","NaN","test","parseInt","getWidths","deviceSizes","allSizes","width","sizes","viewportWidthRe","percentSizes","match","exec","push","length","smallestRatio","Math","min","widths","filter","s","kind","Set","map","w","find","p","generateImgAttrs","config","unoptimized","quality","loader","startsWith","deploymentId","getDeploymentId","includes","getAssetToken","qIndex","indexOf","params","URLSearchParams","slice","srcDpl","get","append","toString","srcSet","last","i","join","priority","preload","loading","className","height","fill","style","overrideSrc","onLoad","onLoadingComplete","placeholder","blurDataURL","fetchPriority","decoding","layout","objectFit","objectPosition","lazyBoundary","lazyRoot","rest","_state","imgConf","showAltText","blurComplete","defaultLoader","c","imageConfigDefault","imageSizes","sort","a","b","qualities","Error","isDefaultLoader","customImageLoader","obj","_","opts","layoutToStyle","intrinsic","maxWidth","responsive","layoutToSizes","layoutStyle","layoutSizes","staticSrc","widthInt","heightInt","blurWidth","blurHeight","staticImageData","JSON","stringify","ratio","round","isLazy","dangerouslyAllowSVG","split","endsWith","qualityInt","process","env","NODE_ENV","output","position","isNaN","String","warnOnce","VALID_BLUR_EXT","urlStr","url","URL","err","pathname","search","legacyKey","legacyValue","Object","entries","window","PerformanceObserver","entryList","entry","getEntries","imgSrc","element","lcpImage","observe","type","buffered","console","error","imgStyle","assign","left","top","right","bottom","color","backgroundImage","getImageBlurSvg","backgroundSize","placeholderStyle","backgroundPosition","backgroundRepeat","imgAttributes","loadingFinal","fullUrl","e","location","href","set","props","meta"],"mappings":";;;;+BA8RgBA;;;eAAAA;;;0BA9RS;8BACsB;8BACf;6BACG;AAoFnC,MAAMC,uBAAuB;IAAC;IAAQ;IAASC;CAAU;AAEzD,8DAA8D;AAC9D,MAAMC,iCAAiC;IACrC;IACA;IACA;IACA;IACAD;CACD;AA4BD,SAASE,gBACPC,GAAoC;IAEpC,OAAO,AAACA,IAAsBC,OAAO,KAAKJ;AAC5C;AAEA,SAASK,kBACPF,GAAoC;IAEpC,OAAO,AAACA,IAAwBA,GAAG,KAAKH;AAC1C;AAEA,SAASM,eAAeH,GAA0B;IAChD,OACE,CAAC,CAACA,OACF,OAAOA,QAAQ,YACdD,CAAAA,gBAAgBC,QACfE,kBAAkBF,IAAmB;AAE3C;AAEA,MAAMI,UAAU,IAAIC;AAIpB,IAAIC;AAEJ,SAASC,OAAOC,CAAU;IACxB,IAAI,OAAOA,MAAM,aAAa;QAC5B,OAAOA;IACT;IACA,IAAI,OAAOA,MAAM,UAAU;QACzB,OAAOC,OAAOC,QAAQ,CAACF,KAAKA,IAAIG;IAClC;IACA,IAAI,OAAOH,MAAM,YAAY,WAAWI,IAAI,CAACJ,IAAI;QAC/C,OAAOK,SAASL,GAAG;IACrB;IACA,OAAOG;AACT;AAEA,SAASG,UACP,EAAEC,WAAW,EAAEC,QAAQ,EAAe,EACtCC,KAAyB,EACzBC,KAAyB;IAEzB,IAAIA,OAAO;QACT,yDAAyD;QACzD,MAAMC,kBAAkB;QACxB,MAAMC,eAAe,EAAE;QACvB,IAAK,IAAIC,OAAQA,QAAQF,gBAAgBG,IAAI,CAACJ,QAASG,MAAO;YAC5DD,aAAaG,IAAI,CAACV,SAASQ,KAAK,CAAC,EAAE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aL;IAAK;IAC5E,OAAO;QAAE2G;QAAOC;IAAK;AACvB","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../src/shared/lib/get-img-props.ts"],"sourcesContent":["import { getAssetToken, getDeploymentId } from './deployment-id'\nimport { getImageBlurSvg } from './image-blur-svg'\nimport { imageConfigDefault } from './image-config'\nimport type {\n ImageConfigComplete,\n ImageLoaderProps,\n ImageLoaderPropsWithConfig,\n} from './image-config'\n\nimport type { CSSProperties, JSX } from 'react'\n\nexport interface StaticImageData {\n src: string\n height: number\n width: number\n blurDataURL?: string\n blurWidth?: number\n blurHeight?: number\n}\n\nexport interface StaticRequire {\n default: StaticImageData\n}\n\nexport type StaticImport = StaticRequire | StaticImageData\n\nexport type ImageProps = Omit<\n JSX.IntrinsicElements['img'],\n 'src' | 'srcSet' | 'ref' | 'alt' | 'width' | 'height' | 'loading'\n> & {\n src: string | StaticImport\n alt: string\n width?: number | `${number}`\n height?: number | `${number}`\n fill?: boolean\n loader?: ImageLoader\n quality?: number | `${number}`\n preload?: boolean\n /**\n * @deprecated Use `preload` prop instead.\n * See https://nextjs.org/docs/app/api-reference/components/image#preload\n */\n priority?: boolean\n loading?: LoadingValue\n placeholder?: PlaceholderValue\n blurDataURL?: string\n unoptimized?: boolean\n overrideSrc?: string\n /**\n * @deprecated Use `onLoad` instead.\n * @see https://nextjs.org/docs/app/api-reference/components/image#onload\n */\n onLoadingComplete?: OnLoadingComplete\n /**\n * @deprecated Use `fill` prop instead of `layout=\"fill\"` or change import to `next/legacy/image`.\n * @see https://nextjs.org/docs/api-reference/next/legacy/image\n */\n layout?: string\n /**\n * @deprecated Use `style` prop instead.\n */\n objectFit?: string\n /**\n * @deprecated Use `style` prop instead.\n */\n objectPosition?: string\n /**\n * @deprecated This prop does not do anything.\n */\n lazyBoundary?: string\n /**\n * @deprecated This prop does not do anything.\n */\n lazyRoot?: string\n}\n\nexport type ImgProps = Omit<ImageProps, 'src' | 'loader'> & {\n loading: LoadingValue\n width: number | undefined\n height: number | undefined\n style: NonNullable<JSX.IntrinsicElements['img']['style']>\n sizes: string | undefined\n srcSet: string | undefined\n src: string\n}\n\nconst VALID_LOADING_VALUES = ['lazy', 'eager', undefined] as const\n\n// Object-fit values that are not valid background-size values\nconst INVALID_BACKGROUND_SIZE_VALUES = [\n '-moz-initial',\n 'fill',\n 'none',\n 'scale-down',\n undefined,\n]\ntype LoadingValue = (typeof VALID_LOADING_VALUES)[number]\ntype ImageConfig = ImageConfigComplete & {\n allSizes: number[]\n output?: 'standalone' | 'export'\n}\n\nexport type ImageLoader = (p: ImageLoaderProps) => string\n\n// Do not export - this is an internal type only\n// because `next.config.js` is only meant for the\n// built-in loaders, not for a custom loader() prop.\ntype ImageLoaderWithConfig = (p: ImageLoaderPropsWithConfig) => string\n\nexport type PlaceholderValue = 'blur' | 'empty' | `data:image/${string}`\nexport type OnLoad = React.ReactEventHandler<HTMLImageElement> | undefined\nexport type OnLoadingComplete = (img: HTMLImageElement) => void\n\nexport type PlaceholderStyle = Partial<\n Pick<\n CSSProperties,\n | 'backgroundSize'\n | 'backgroundPosition'\n | 'backgroundRepeat'\n | 'backgroundImage'\n >\n>\n\nfunction isStaticRequire(\n src: StaticRequire | StaticImageData\n): src is StaticRequire {\n return (src as StaticRequire).default !== undefined\n}\n\nfunction isStaticImageData(\n src: StaticRequire | StaticImageData\n): src is StaticImageData {\n return (src as StaticImageData).src !== undefined\n}\n\nfunction isStaticImport(src: string | StaticImport): src is StaticImport {\n return (\n !!src &&\n typeof src === 'object' &&\n (isStaticRequire(src as StaticImport) ||\n isStaticImageData(src as StaticImport))\n )\n}\n\nconst allImgs = new Map<\n string,\n { src: string; loading: LoadingValue; placeholder: PlaceholderValue }\n>()\nlet perfObserver: PerformanceObserver | undefined\n\nfunction getInt(x: unknown): number | undefined {\n if (typeof x === 'undefined') {\n return x\n }\n if (typeof x === 'number') {\n return Number.isFinite(x) ? x : NaN\n }\n if (typeof x === 'string' && /^[0-9]+$/.test(x)) {\n return parseInt(x, 10)\n }\n return NaN\n}\n\nfunction getWidths(\n { deviceSizes, allSizes }: ImageConfig,\n width: number | undefined,\n sizes: string | undefined\n): { widths: number[]; kind: 'w' | 'x' } {\n if (sizes) {\n // Find all the \"vw\" percent sizes used in the sizes prop\n const viewportWidthRe = /(^|\\s)(1?\\d?\\d)vw/g\n const percentSizes = []\n for (let match; (match = viewportWidthRe.exec(sizes)); match) {\n percentSizes.push(parseInt(match[2]))\n }\n if (percentSizes.length) {\n const smallestRatio = Math.min(...percentSizes) * 0.01\n return {\n widths: allSizes.filter((s) => s >= deviceSizes[0] * smallestRatio),\n kind: 'w',\n }\n }\n return { widths: allSizes, kind: 'w' }\n }\n if (typeof width !== 'number') {\n return { widths: deviceSizes, kind: 'w' }\n }\n\n const widths = [\n ...new Set(\n // > This means that most OLED screens that say they are 3x resolution,\n // > are actually 3x in the green color, but only 1.5x in the red and\n // > blue colors. Showing a 3x resolution image in the app vs a 2x\n // > resolution image will be visually the same, though the 3x image\n // > takes significantly more data. Even true 3x resolution screens are\n // > wasteful as the human eye cannot see that level of detail without\n // > something like a magnifying glass.\n // https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html\n [width, width * 2 /*, width * 3*/].map(\n (w) => allSizes.find((p) => p >= w) || allSizes[allSizes.length - 1]\n )\n ),\n ]\n return { widths, kind: 'x' }\n}\n\ntype GenImgAttrsData = {\n config: ImageConfig\n src: string\n unoptimized: boolean\n loader: ImageLoaderWithConfig\n width?: number\n quality?: number\n sizes?: string\n}\n\ntype GenImgAttrsResult = {\n src: string\n srcSet: string | undefined\n sizes: string | undefined\n}\n\nfunction generateImgAttrs({\n config,\n src,\n unoptimized,\n width,\n quality,\n sizes,\n loader,\n}: GenImgAttrsData): GenImgAttrsResult {\n if (unoptimized) {\n if (src.startsWith('/') && !src.startsWith('//')) {\n let deploymentId = getDeploymentId()\n if (src.includes('/_next/static/immutable') && !getAssetToken()) {\n // immutable static asset and supported by platform, don't add `?dpl=`\n deploymentId = undefined\n } else if (deploymentId) {\n // We unfortunately can't easily use `new URL()` here, because it normalizes the URL which causes\n // double-encoding with the `encodeURIComponent(src)` below\n const qIndex = src.indexOf('?')\n if (qIndex !== -1) {\n const params = new URLSearchParams(src.slice(qIndex + 1))\n const srcDpl = params.get('dpl')\n if (!srcDpl) {\n // src is missing the dpl parameter, but we have a deploymentId, so add it to the src URL\n params.append('dpl', deploymentId)\n src = src.slice(0, qIndex) + '?' + params.toString()\n }\n } else {\n // src is missing the dpl parameter, but we have a deploymentId, so add it to the src URL\n src = src + `?dpl=${deploymentId}`\n }\n }\n }\n return { src, srcSet: undefined, sizes: undefined }\n }\n\n const { widths, kind } = getWidths(config, width, sizes)\n const last = widths.length - 1\n\n return {\n sizes: !sizes && kind === 'w' ? '100vw' : sizes,\n srcSet: widths\n .map(\n (w, i) =>\n `${loader({ config, src, quality, width: w })} ${\n kind === 'w' ? w : i + 1\n }${kind}`\n )\n .join(', '),\n\n // It's intended to keep `src` the last attribute because React updates\n // attributes in order. If we keep `src` the first one, Safari will\n // immediately start to fetch `src`, before `sizes` and `srcSet` are even\n // updated by React. That causes multiple unnecessary requests if `srcSet`\n // and `sizes` are defined.\n // This bug cannot be reproduced in Chrome or Firefox.\n src: loader({ config, src, quality, width: widths[last] }),\n }\n}\n\n/**\n * A shared function, used on both client and server, to generate the props for <img>.\n */\nexport function getImgProps(\n {\n src,\n sizes,\n unoptimized = false,\n priority = false,\n preload = false,\n loading,\n className,\n quality,\n width,\n height,\n fill = false,\n style,\n overrideSrc,\n onLoad,\n onLoadingComplete,\n placeholder = 'empty',\n blurDataURL,\n fetchPriority,\n decoding = 'async',\n layout,\n objectFit,\n objectPosition,\n lazyBoundary,\n lazyRoot,\n ...rest\n }: ImageProps,\n _state: {\n defaultLoader: ImageLoaderWithConfig\n imgConf: ImageConfigComplete\n showAltText?: boolean\n blurComplete?: boolean\n }\n): {\n props: ImgProps\n meta: {\n unoptimized: boolean\n preload: boolean\n placeholder: NonNullable<ImageProps['placeholder']>\n fill: boolean\n }\n} {\n const { imgConf, showAltText, blurComplete, defaultLoader } = _state\n let config: ImageConfig\n let c = imgConf || imageConfigDefault\n if ('allSizes' in c) {\n config = c as ImageConfig\n } else {\n const allSizes = [...c.deviceSizes, ...c.imageSizes].sort((a, b) => a - b)\n const deviceSizes = c.deviceSizes.sort((a, b) => a - b)\n const qualities = c.qualities?.sort((a, b) => a - b)\n config = { ...c, allSizes, deviceSizes, qualities }\n }\n\n if (typeof defaultLoader === 'undefined') {\n throw new Error(\n 'images.loaderFile detected but the file is missing default export.\\nRead more: https://nextjs.org/docs/messages/invalid-images-config'\n )\n }\n let loader: ImageLoaderWithConfig = rest.loader || defaultLoader\n\n // Remove property so it's not spread on <img> element\n delete rest.loader\n delete (rest as any).srcSet\n\n // This special value indicates that the user\n // didn't define a \"loader\" prop or \"loader\" config.\n const isDefaultLoader = '__next_img_default' in loader\n\n if (isDefaultLoader) {\n if (config.loader === 'custom') {\n throw new Error(\n `Image with src \"${src}\" is missing \"loader\" prop.` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader`\n )\n }\n } else {\n // The user defined a \"loader\" prop or config.\n // Since the config object is internal only, we\n // must not pass it to the user-defined \"loader\".\n const customImageLoader = loader as ImageLoader\n loader = (obj) => {\n const { config: _, ...opts } = obj\n return customImageLoader(opts)\n }\n }\n\n if (layout) {\n if (layout === 'fill') {\n fill = true\n }\n const layoutToStyle: Record<string, Record<string, string> | undefined> = {\n intrinsic: { maxWidth: '100%', height: 'auto' },\n responsive: { width: '100%', height: 'auto' },\n }\n const layoutToSizes: Record<string, string | undefined> = {\n responsive: '100vw',\n fill: '100vw',\n }\n const layoutStyle = layoutToStyle[layout]\n if (layoutStyle) {\n style = { ...style, ...layoutStyle }\n }\n const layoutSizes = layoutToSizes[layout]\n if (layoutSizes && !sizes) {\n sizes = layoutSizes\n }\n }\n\n let staticSrc = ''\n let widthInt = getInt(width)\n let heightInt = getInt(height)\n let blurWidth: number | undefined\n let blurHeight: number | undefined\n if (isStaticImport(src)) {\n const staticImageData = isStaticRequire(src) ? src.default : src\n\n if (!staticImageData.src) {\n throw new Error(\n `An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(\n staticImageData\n )}`\n )\n }\n if (!staticImageData.height || !staticImageData.width) {\n throw new Error(\n `An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(\n staticImageData\n )}`\n )\n }\n\n blurWidth = staticImageData.blurWidth\n blurHeight = staticImageData.blurHeight\n blurDataURL = blurDataURL || staticImageData.blurDataURL\n staticSrc = staticImageData.src\n\n if (!fill) {\n if (!widthInt && !heightInt) {\n widthInt = staticImageData.width\n heightInt = staticImageData.height\n } else if (widthInt && !heightInt) {\n const ratio = widthInt / staticImageData.width\n heightInt = Math.round(staticImageData.height * ratio)\n } else if (!widthInt && heightInt) {\n const ratio = heightInt / staticImageData.height\n widthInt = Math.round(staticImageData.width * ratio)\n }\n }\n }\n src = typeof src === 'string' ? src : staticSrc\n\n let isLazy =\n !priority &&\n !preload &&\n (loading === 'lazy' || typeof loading === 'undefined')\n if (!src || src.startsWith('data:') || src.startsWith('blob:')) {\n // https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n unoptimized = true\n isLazy = false\n }\n if (config.unoptimized) {\n unoptimized = true\n }\n if (\n isDefaultLoader &&\n !config.dangerouslyAllowSVG &&\n src.split('?', 1)[0].endsWith('.svg')\n ) {\n // Special case to make svg serve as-is to avoid proxying\n // through the built-in Image Optimization API.\n unoptimized = true\n }\n\n const qualityInt = getInt(quality)\n\n if (process.env.NODE_ENV !== 'production') {\n const { warnOnce } =\n require('./utils/warn-once') as typeof import('./utils/warn-once')\n if (config.output === 'export' && isDefaultLoader && !unoptimized) {\n throw new Error(\n `Image Optimization using the default loader is not compatible with \\`{ output: 'export' }\\`.\n Possible solutions:\n - Remove \\`{ output: 'export' }\\` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure \\`{ images: { unoptimized: true } }\\` in \\`next.config.js\\` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api`\n )\n }\n if (!src) {\n // React doesn't show the stack trace and there's\n // no `src` to help identify which image, so we\n // instead console.error(ref) during mount.\n unoptimized = true\n } else {\n if (fill) {\n if (width) {\n throw new Error(\n `Image with src \"${src}\" has both \"width\" and \"fill\" properties. Only one should be used.`\n )\n }\n if (height) {\n throw new Error(\n `Image with src \"${src}\" has both \"height\" and \"fill\" properties. Only one should be used.`\n )\n }\n if (style?.position && style.position !== 'absolute') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.position\" properties. Images with \"fill\" always use position absolute - it cannot be modified.`\n )\n }\n if (style?.width && style.width !== '100%') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.width\" properties. Images with \"fill\" always use width 100% - it cannot be modified.`\n )\n }\n if (style?.height && style.height !== '100%') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.height\" properties. Images with \"fill\" always use height 100% - it cannot be modified.`\n )\n }\n } else {\n if (typeof widthInt === 'undefined') {\n throw new Error(\n `Image with src \"${src}\" is missing required \"width\" property.`\n )\n } else if (isNaN(widthInt)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"width\" property. Expected a numeric value in pixels but received \"${width}\".`\n )\n }\n if (typeof heightInt === 'undefined') {\n throw new Error(\n `Image with src \"${src}\" is missing required \"height\" property.`\n )\n } else if (isNaN(heightInt)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"height\" property. Expected a numeric value in pixels but received \"${height}\".`\n )\n }\n // eslint-disable-next-line no-control-regex\n if (/^[\\x00-\\x20]/.test(src)) {\n throw new Error(\n `Image with src \"${src}\" cannot start with a space or control character. Use src.trimStart() to remove it or encodeURIComponent(src) to keep it.`\n )\n }\n // eslint-disable-next-line no-control-regex\n if (/[\\x00-\\x20]$/.test(src)) {\n throw new Error(\n `Image with src \"${src}\" cannot end with a space or control character. Use src.trimEnd() to remove it or encodeURIComponent(src) to keep it.`\n )\n }\n }\n }\n if (!VALID_LOADING_VALUES.includes(loading)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"loading\" property. Provided \"${loading}\" should be one of ${VALID_LOADING_VALUES.map(\n String\n ).join(',')}.`\n )\n }\n if (priority && loading === 'lazy') {\n throw new Error(\n `Image with src \"${src}\" has both \"priority\" and \"loading='lazy'\" properties. Only one should be used.`\n )\n }\n if (preload && loading === 'lazy') {\n throw new Error(\n `Image with src \"${src}\" has both \"preload\" and \"loading='lazy'\" properties. Only one should be used.`\n )\n }\n if (preload && priority) {\n throw new Error(\n `Image with src \"${src}\" has both \"preload\" and \"priority\" properties. Only \"preload\" should be used.`\n )\n }\n if (\n placeholder !== 'empty' &&\n placeholder !== 'blur' &&\n !placeholder.startsWith('data:image/')\n ) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"placeholder\" property \"${placeholder}\".`\n )\n }\n if (placeholder !== 'empty') {\n if (widthInt && heightInt && widthInt * heightInt < 1600) {\n warnOnce(\n `Image with src \"${src}\" is smaller than 40x40. Consider removing the \"placeholder\" property to improve performance.`\n )\n }\n }\n if (\n qualityInt &&\n config.qualities &&\n !config.qualities.includes(qualityInt)\n ) {\n warnOnce(\n `Image with src \"${src}\" is using quality \"${qualityInt}\" which is not configured in images.qualities [${config.qualities.join(', ')}]. Please update your config to [${[...config.qualities, qualityInt].sort().join(', ')}].` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-unconfigured-qualities`\n )\n }\n if (placeholder === 'blur' && !blurDataURL) {\n const VALID_BLUR_EXT = ['jpeg', 'png', 'webp', 'avif'] // should match next-image-loader\n\n throw new Error(\n `Image with src \"${src}\" has \"placeholder='blur'\" property but is missing the \"blurDataURL\" property.\n Possible solutions:\n - Add a \"blurDataURL\" property, the contents should be a small Data URL to represent the image\n - Change the \"src\" property to a static import with one of the supported file types: ${VALID_BLUR_EXT.join(\n ','\n )} (animated images not supported)\n - Remove the \"placeholder\" property, effectively no blur effect\n Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`\n )\n }\n if ('ref' in rest) {\n warnOnce(\n `Image with src \"${src}\" is using unsupported \"ref\" property. Consider using the \"onLoad\" property instead.`\n )\n }\n\n if (!unoptimized && !isDefaultLoader) {\n const urlStr = loader({\n config,\n src,\n width: widthInt || 400,\n quality: qualityInt || 75,\n })\n let url: URL | undefined\n try {\n url = new URL(urlStr)\n } catch (err) {}\n if (urlStr === src || (url && url.pathname === src && !url.search)) {\n warnOnce(\n `Image with src \"${src}\" has a \"loader\" property that does not implement width. Please implement it or use the \"unoptimized\" property instead.` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader-width`\n )\n }\n }\n\n if (onLoadingComplete) {\n warnOnce(\n `Image with src \"${src}\" is using deprecated \"onLoadingComplete\" property. Please use the \"onLoad\" property instead.`\n )\n }\n\n for (const [legacyKey, legacyValue] of Object.entries({\n layout,\n objectFit,\n objectPosition,\n lazyBoundary,\n lazyRoot,\n })) {\n if (legacyValue) {\n warnOnce(\n `Image with src \"${src}\" has legacy prop \"${legacyKey}\". Did you forget to run the codemod?` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`\n )\n }\n }\n\n if (\n typeof window !== 'undefined' &&\n !perfObserver &&\n window.PerformanceObserver\n ) {\n perfObserver = new PerformanceObserver((entryList) => {\n for (const entry of entryList.getEntries()) {\n // @ts-ignore - missing \"LargestContentfulPaint\" class with \"element\" prop\n const imgSrc = entry?.element?.src || ''\n const lcpImage = allImgs.get(imgSrc)\n if (\n lcpImage &&\n lcpImage.loading === 'lazy' &&\n lcpImage.placeholder === 'empty' &&\n !lcpImage.src.startsWith('data:') &&\n !lcpImage.src.startsWith('blob:')\n ) {\n // https://web.dev/lcp/#measure-lcp-in-javascript\n warnOnce(\n `Image with src \"${lcpImage.src}\" was detected as the Largest Contentful Paint (LCP). Please add the \\`loading=\"eager\"\\` property if this image is above the fold.` +\n `\\nRead more: https://nextjs.org/docs/app/api-reference/components/image#loading`\n )\n }\n }\n })\n try {\n perfObserver.observe({\n type: 'largest-contentful-paint',\n buffered: true,\n })\n } catch (err) {\n // Log error but don't crash the app\n console.error(err)\n }\n }\n }\n const imgStyle = Object.assign(\n fill\n ? {\n position: 'absolute',\n height: '100%',\n width: '100%',\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n objectFit,\n objectPosition,\n }\n : {},\n showAltText ? {} : { color: 'transparent' },\n style\n )\n\n const backgroundImage =\n !blurComplete && placeholder !== 'empty'\n ? placeholder === 'blur'\n ? `url(\"data:image/svg+xml;charset=utf-8,${getImageBlurSvg({\n widthInt,\n heightInt,\n blurWidth,\n blurHeight,\n blurDataURL: blurDataURL || '', // assume not undefined\n objectFit: imgStyle.objectFit,\n })}\")`\n : `url(\"${placeholder}\")` // assume `data:image/`\n : null\n\n const backgroundSize = !INVALID_BACKGROUND_SIZE_VALUES.includes(\n imgStyle.objectFit\n )\n ? imgStyle.objectFit\n : imgStyle.objectFit === 'fill'\n ? '100% 100%' // the background-size equivalent of `fill`\n : 'cover'\n\n let placeholderStyle: PlaceholderStyle = backgroundImage\n ? {\n backgroundSize,\n backgroundPosition: imgStyle.objectPosition || '50% 50%',\n backgroundRepeat: 'no-repeat',\n backgroundImage,\n }\n : {}\n\n if (process.env.NODE_ENV === 'development') {\n if (\n placeholderStyle.backgroundImage &&\n placeholder === 'blur' &&\n blurDataURL?.startsWith('/')\n ) {\n // During `next dev`, we don't want to generate blur placeholders with webpack\n // because it can delay starting the dev server. Instead, `next-image-loader.js`\n // will inline a special url to lazily generate the blur placeholder at request time.\n placeholderStyle.backgroundImage = `url(\"${blurDataURL}\")`\n }\n }\n\n const imgAttributes = generateImgAttrs({\n config,\n src,\n unoptimized,\n width: widthInt,\n quality: qualityInt,\n sizes,\n loader,\n })\n\n const loadingFinal = isLazy ? 'lazy' : loading\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined') {\n let fullUrl: URL\n try {\n fullUrl = new URL(imgAttributes.src)\n } catch (e) {\n fullUrl = new URL(imgAttributes.src, window.location.href)\n }\n allImgs.set(fullUrl.href, { src, loading: loadingFinal, placeholder })\n }\n }\n\n const props: ImgProps = {\n ...rest,\n loading: loadingFinal,\n fetchPriority,\n width: widthInt,\n height: heightInt,\n decoding,\n className,\n style: { ...imgStyle, ...placeholderStyle },\n sizes: imgAttributes.sizes,\n srcSet: imgAttributes.srcSet,\n src: overrideSrc || imgAttributes.src,\n }\n const meta = { unoptimized, preload: preload || priority, placeholder, fill }\n return { props, meta }\n}\n"],"names":["getImgProps","VALID_LOADING_VALUES","undefined","INVALID_BACKGROUND_SIZE_VALUES","isStaticRequire","src","default","isStaticImageData","isStaticImport","allImgs","Map","perfObserver","getInt","x","Number","isFinite","NaN","test","parseInt","getWidths","deviceSizes","allSizes","width","sizes","viewportWidthRe","percentSizes","match","exec","push","length","smallestRatio","Math","min","widths","filter","s","kind","Set","map","w","find","p","generateImgAttrs","config","unoptimized","quality","loader","startsWith","deploymentId","getDeploymentId","includes","getAssetToken","qIndex","indexOf","params","URLSearchParams","slice","srcDpl","get","append","toString","srcSet","last","i","join","priority","preload","loading","className","height","fill","style","overrideSrc","onLoad","onLoadingComplete","placeholder","blurDataURL","fetchPriority","decoding","layout","objectFit","objectPosition","lazyBoundary","lazyRoot","rest","_state","imgConf","showAltText","blurComplete","defaultLoader","c","imageConfigDefault","imageSizes","sort","a","b","qualities","Error","isDefaultLoader","customImageLoader","obj","_","opts","layoutToStyle","intrinsic","maxWidth","responsive","layoutToSizes","layoutStyle","layoutSizes","staticSrc","widthInt","heightInt","blurWidth","blurHeight","staticImageData","JSON","stringify","ratio","round","isLazy","dangerouslyAllowSVG","split","endsWith","qualityInt","process","env","NODE_ENV","warnOnce","require","output","position","isNaN","String","VALID_BLUR_EXT","urlStr","url","URL","err","pathname","search","legacyKey","legacyValue","Object","entries","window","PerformanceObserver","entryList","entry","getEntries","imgSrc","element","lcpImage","observe","type","buffered","console","error","imgStyle","assign","left","top","right","bottom","color","backgroundImage","getImageBlurSvg","backgroundSize","placeholderStyle","backgroundPosition","backgroundRepeat","imgAttributes","loadingFinal","fullUrl","e","location","href","set","props","meta"],"mappings":";;;;+BA6RgBA;;;eAAAA;;;8BA7R+B;8BACf;6BACG;AAoFnC,MAAMC,uBAAuB;IAAC;IAAQ;IAASC;CAAU;AAEzD,8DAA8D;AAC9D,MAAMC,iCAAiC;IACrC;IACA;IACA;IACA;IACAD;CACD;AA4BD,SAASE,gBACPC,GAAoC;IAEpC,OAAO,AAACA,IAAsBC,OAAO,KAAKJ;AAC5C;AAEA,SAASK,kBACPF,GAAoC;IAEpC,OAAO,AAACA,IAAwBA,GAAG,KAAKH;AAC1C;AAEA,SAASM,eAAeH,GAA0B;IAChD,OACE,CAAC,CAACA,OACF,OAAOA,QAAQ,YACdD,CAAAA,gBAAgBC,QACfE,kBAAkBF,IAAmB;AAE3C;AAEA,MAAMI,UAAU,IAAIC;AAIpB,IAAIC;AAEJ,SAASC,OAAOC,CAAU;IACxB,IAAI,OAAOA,MAAM,aAAa;QAC5B,OAAOA;IACT;IACA,IAAI,OAAOA,MAAM,UAAU;QACzB,OAAOC,OAAOC,QAAQ,CAACF,KAAKA,IAAIG;IAClC;IACA,IAAI,OAAOH,MAAM,YAAY,WAAWI,IAAI,CAACJ,IAAI;QAC/C,OAAOK,SAASL,GAAG;IACrB;IACA,OAAOG;AACT;AAEA,SAASG,UACP,EAAEC,WAAW,EAAEC,QAAQ,EAAe,EACtCC,KAAyB,EACzBC,KAAyB;IAEzB,IAAIA,OAAO;QACT,yDAAyD;QACzD,MAAMC,kBAAkB;QACxB,MAAMC,eAAe,EAAE;QACvB,IAAK,IAAIC,OAAQA,QAAQF,gBAAgBG,IAAI,CAACJ,QAASG,MAAO;YAC5DD,aAAaG,IAAI,CAACV,SAASQ,KAAK,CAAC,EAAE;QACrC;QACA,IAAID,aAAaI,MAAM,EAAE;YACvB,MAAMC,gBAAgBC,KAA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IAAIxC,QAAQC,GAAG,CAACC,QAAQ,KAAK,eAAe;QAC1C,IACEyC,iBAAiBH,eAAe,IAChC1F,gBAAgB,UAChBC,aAAa7B,WAAW,MACxB;YACA,8EAA8E;YAC9E,gFAAgF;YAChF,qFAAqF;YACrFyH,iBAAiBH,eAAe,GAAG,CAAC,KAAK,EAAEzF,YAAY,EAAE,CAAC;QAC5D;IACF;IAEA,MAAM+F,gBAAgBjI,iBAAiB;QACrCC;QACAtC;QACAuC;QACAtB,OAAOyF;QACPlE,SAAS+E;QACTrG;QACAuB;IACF;IAEA,MAAM8H,eAAepD,SAAS,SAASrD;IAEvC,IAAI0D,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAI,OAAOkB,WAAW,aAAa;YACjC,IAAI4B;YACJ,IAAI;gBACFA,UAAU,IAAIpC,IAAIkC,cAActK,GAAG;YACrC,EAAE,OAAOyK,GAAG;gBACVD,UAAU,IAAIpC,IAAIkC,cAActK,GAAG,EAAE4I,OAAO8B,QAAQ,CAACC,IAAI;YAC3D;YACAvK,QAAQwK,GAAG,CAACJ,QAAQG,IAAI,EAAE;gBAAE3K;gBAAK8D,SAASyG;gBAAcjG;YAAY;QACtE;IACF;IAEA,MAAMuG,QAAkB;QACtB,GAAG9F,IAAI;QACPjB,SAASyG;QACT/F;QACAvD,OAAOyF;QACP1C,QAAQ2C;QACRlC;QACAV;QACAG,OAAO;YAAE,GAAGuF,QAAQ;YAAE,GAAGU,gBAAgB;QAAC;QAC1CjJ,OAAOoJ,cAAcpJ,KAAK;QAC1BsC,QAAQ8G,cAAc9G,MAAM;QAC5BxD,KAAKmE,eAAemG,cAActK,GAAG;IACvC;IACA,MAAM8K,OAAO;QAAEvI;QAAasB,SAASA,WAAWD;QAAUU;QAAaL;IAAK;IAC5E,OAAO;QAAE4G;QAAOC;IAAK;AACvB","ignoreList":[0]} |
@@ -30,3 +30,2 @@ 'use client'; | ||
| const _headmanagercontextsharedruntime = require("./head-manager-context.shared-runtime"); | ||
| const _warnonce = require("./utils/warn-once"); | ||
| function defaultHead() { | ||
@@ -133,8 +132,9 @@ const head = [ | ||
| if (process.env.NODE_ENV === 'development') { | ||
| const { warnOnce } = require('./utils/warn-once'); | ||
| // omit JSON-LD structured data snippets from the warning | ||
| if (c.type === 'script' && c.props['type'] !== 'application/ld+json') { | ||
| const srcMessage = c.props['src'] ? `<script> tag with src="${c.props['src']}"` : `inline <script>`; | ||
| (0, _warnonce.warnOnce)(`Do not add <script> tags using next/head (see ${srcMessage}). Use next/script instead. \nSee more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`); | ||
| warnOnce(`Do not add <script> tags using next/head (see ${srcMessage}). Use next/script instead. \nSee more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`); | ||
| } else if (c.type === 'link' && c.props['rel'] === 'stylesheet') { | ||
| (0, _warnonce.warnOnce)(`Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="${c.props['href']}"). Use Document instead. \nSee more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`); | ||
| warnOnce(`Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="${c.props['href']}"). Use Document instead. \nSee more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`); | ||
| } | ||
@@ -141,0 +141,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../src/shared/lib/head.tsx"],"sourcesContent":["'use client'\n\nimport React, { useContext, type JSX } from 'react'\nimport Effect from './side-effect'\nimport { HeadManagerContext } from './head-manager-context.shared-runtime'\nimport { warnOnce } from './utils/warn-once'\n\nexport function defaultHead(): JSX.Element[] {\n const head = [\n <meta charSet=\"utf-8\" key=\"charset\" />,\n <meta name=\"viewport\" content=\"width=device-width\" key=\"viewport\" />,\n ]\n return head\n}\n\nfunction onlyReactElement(\n list: Array<React.ReactElement<any>>,\n child: React.ReactElement | number | string\n): Array<React.ReactElement<any>> {\n // React children can be \"string\" or \"number\" in this case we ignore them for backwards compat\n if (typeof child === 'string' || typeof child === 'number') {\n return list\n }\n // Adds support for React.Fragment\n if (child.type === React.Fragment) {\n return list.concat(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n React.Children.toArray(child.props.children).reduce(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n (\n fragmentList: Array<React.ReactElement<any>>,\n fragmentChild: React.ReactElement | number | string\n ): Array<React.ReactElement<any>> => {\n if (\n typeof fragmentChild === 'string' ||\n typeof fragmentChild === 'number'\n ) {\n return fragmentList\n }\n return fragmentList.concat(fragmentChild)\n },\n []\n )\n )\n }\n return list.concat(child)\n}\n\nconst METATYPES = ['name', 'httpEquiv', 'charSet', 'itemProp']\n\n/*\n returns a function for filtering head child elements\n which shouldn't be duplicated, like <title/>\n Also adds support for deduplicated `key` properties\n*/\nfunction unique() {\n const keys = new Set()\n const tags = new Set()\n const metaTypes = new Set()\n const metaCategories: { [metatype: string]: Set<string> } = {}\n\n return (h: React.ReactElement<any>) => {\n let isUnique = true\n let hasKey = false\n\n if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {\n hasKey = true\n const key = h.key.slice(h.key.indexOf('$') + 1)\n if (keys.has(key)) {\n isUnique = false\n } else {\n keys.add(key)\n }\n }\n\n switch (h.type) {\n case 'title':\n case 'base':\n if (tags.has(h.type)) {\n isUnique = false\n } else {\n tags.add(h.type)\n }\n break\n case 'meta':\n for (let i = 0, len = METATYPES.length; i < len; i++) {\n const metatype = METATYPES[i]\n if (!h.props.hasOwnProperty(metatype)) continue\n\n if (metatype === 'charSet') {\n if (metaTypes.has(metatype)) {\n isUnique = false\n } else {\n metaTypes.add(metatype)\n }\n } else {\n const category = h.props[metatype]\n const categories = metaCategories[metatype] || new Set()\n if ((metatype !== 'name' || !hasKey) && categories.has(category)) {\n isUnique = false\n } else {\n categories.add(category)\n metaCategories[metatype] = categories\n }\n }\n }\n break\n default:\n break\n }\n\n return isUnique\n }\n}\n\n/**\n *\n * @param headChildrenElements List of children of <Head>\n */\nfunction reduceComponents(\n headChildrenElements: Array<React.ReactElement<any>>\n) {\n return headChildrenElements\n .reduce(onlyReactElement, [])\n .reverse()\n .concat(defaultHead().reverse())\n .filter(unique())\n .reverse()\n .map((c: React.ReactElement<any>, i: number) => {\n const key = c.key || i\n if (process.env.NODE_ENV === 'development') {\n // omit JSON-LD structured data snippets from the warning\n if (c.type === 'script' && c.props['type'] !== 'application/ld+json') {\n const srcMessage = c.props['src']\n ? `<script> tag with src=\"${c.props['src']}\"`\n : `inline <script>`\n warnOnce(\n `Do not add <script> tags using next/head (see ${srcMessage}). Use next/script instead. \\nSee more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`\n )\n } else if (c.type === 'link' && c.props['rel'] === 'stylesheet') {\n warnOnce(\n `Do not add stylesheets using next/head (see <link rel=\"stylesheet\"> tag with href=\"${c.props['href']}\"). Use Document instead. \\nSee more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`\n )\n }\n }\n return React.cloneElement(c, { key })\n })\n}\n\n/**\n * This component injects elements to `<head>` of your page.\n * To avoid duplicated `tags` in `<head>` you can use the `key` property, which will make sure every tag is only rendered once.\n */\nfunction Head({ children }: { children: React.ReactNode }) {\n const headManager = useContext(HeadManagerContext)\n return (\n <Effect\n reduceComponentsToState={reduceComponents}\n headManager={headManager}\n >\n {children}\n </Effect>\n )\n}\n\nexport default Head\n"],"names":["defaultHead","head","meta","charSet","name","content","onlyReactElement","list","child","type","React","Fragment","concat","Children","toArray","props","children","reduce","fragmentList","fragmentChild","METATYPES","unique","keys","Set","tags","metaTypes","metaCategories","h","isUnique","hasKey","key","indexOf","slice","has","add","i","len","length","metatype","hasOwnProperty","category","categories","reduceComponents","headChildrenElements","reverse","filter","map","c","process","env","NODE_ENV","srcMessage","warnOnce","cloneElement","Head","headManager","useContext","HeadManagerContext","Effect","reduceComponentsToState"],"mappings":"AAAA;;;;;;;;;;;;;;;;IAqKA,OAAmB;eAAnB;;IA9JgBA,WAAW;eAA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YAAYsC,EAAEhC,KAAK,CAAC,OAAO,KAAK,uBAAuB;gBACpE,MAAMoC,aAAaJ,EAAEhC,KAAK,CAAC,MAAM,GAC7B,CAAC,uBAAuB,EAAEgC,EAAEhC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAC3C,CAAC,eAAe,CAAC;gBACrBqC,IAAAA,kBAAQ,EACN,CAAC,8CAA8C,EAAED,WAAW,mHAAmH,CAAC;YAEpL,OAAO,IAAIJ,EAAEtC,IAAI,KAAK,UAAUsC,EAAEhC,KAAK,CAAC,MAAM,KAAK,cAAc;gBAC/DqC,IAAAA,kBAAQ,EACN,CAAC,mFAAmF,EAAEL,EAAEhC,KAAK,CAAC,OAAO,CAAC,iHAAiH,CAAC;YAE5N;QACF;QACA,qBAAOL,cAAK,CAAC2C,YAAY,CAACN,GAAG;YAAEjB;QAAI;IACrC;AACJ;AAEA;;;CAGC,GACD,SAASwB,KAAK,EAAEtC,QAAQ,EAAiC;IACvD,MAAMuC,cAAcC,IAAAA,iBAAU,EAACC,mDAAkB;IACjD,qBACE,qBAACC,mBAAM;QACLC,yBAAyBjB;QACzBa,aAAaA;kBAEZvC;;AAGP;MAEA,WAAesC","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../src/shared/lib/head.tsx"],"sourcesContent":["'use client'\n\nimport React, { useContext, type JSX } from 'react'\nimport Effect from './side-effect'\nimport { HeadManagerContext } from './head-manager-context.shared-runtime'\n\nexport function defaultHead(): JSX.Element[] {\n const head = [\n <meta charSet=\"utf-8\" key=\"charset\" />,\n <meta name=\"viewport\" content=\"width=device-width\" key=\"viewport\" />,\n ]\n return head\n}\n\nfunction onlyReactElement(\n list: Array<React.ReactElement<any>>,\n child: React.ReactElement | number | string\n): Array<React.ReactElement<any>> {\n // React children can be \"string\" or \"number\" in this case we ignore them for backwards compat\n if (typeof child === 'string' || typeof child === 'number') {\n return list\n }\n // Adds support for React.Fragment\n if (child.type === React.Fragment) {\n return list.concat(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n React.Children.toArray(child.props.children).reduce(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n (\n fragmentList: Array<React.ReactElement<any>>,\n fragmentChild: React.ReactElement | number | string\n ): Array<React.ReactElement<any>> => {\n if (\n typeof fragmentChild === 'string' ||\n typeof fragmentChild === 'number'\n ) {\n return fragmentList\n }\n return fragmentList.concat(fragmentChild)\n },\n []\n )\n )\n }\n return list.concat(child)\n}\n\nconst METATYPES = ['name', 'httpEquiv', 'charSet', 'itemProp']\n\n/*\n returns a function for filtering head child elements\n which shouldn't be duplicated, like <title/>\n Also adds support for deduplicated `key` properties\n*/\nfunction unique() {\n const keys = new Set()\n const tags = new Set()\n const metaTypes = new Set()\n const metaCategories: { [metatype: string]: Set<string> } = {}\n\n return (h: React.ReactElement<any>) => {\n let isUnique = true\n let hasKey = false\n\n if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {\n hasKey = true\n const key = h.key.slice(h.key.indexOf('$') + 1)\n if (keys.has(key)) {\n isUnique = false\n } else {\n keys.add(key)\n }\n }\n\n switch (h.type) {\n case 'title':\n case 'base':\n if (tags.has(h.type)) {\n isUnique = false\n } else {\n tags.add(h.type)\n }\n break\n case 'meta':\n for (let i = 0, len = METATYPES.length; i < len; i++) {\n const metatype = METATYPES[i]\n if (!h.props.hasOwnProperty(metatype)) continue\n\n if (metatype === 'charSet') {\n if (metaTypes.has(metatype)) {\n isUnique = false\n } else {\n metaTypes.add(metatype)\n }\n } else {\n const category = h.props[metatype]\n const categories = metaCategories[metatype] || new Set()\n if ((metatype !== 'name' || !hasKey) && categories.has(category)) {\n isUnique = false\n } else {\n categories.add(category)\n metaCategories[metatype] = categories\n }\n }\n }\n break\n default:\n break\n }\n\n return isUnique\n }\n}\n\n/**\n *\n * @param headChildrenElements List of children of <Head>\n */\nfunction reduceComponents(\n headChildrenElements: Array<React.ReactElement<any>>\n) {\n return headChildrenElements\n .reduce(onlyReactElement, [])\n .reverse()\n .concat(defaultHead().reverse())\n .filter(unique())\n .reverse()\n .map((c: React.ReactElement<any>, i: number) => {\n const key = c.key || i\n if (process.env.NODE_ENV === 'development') {\n const { warnOnce } =\n require('./utils/warn-once') as typeof import('./utils/warn-once')\n // omit JSON-LD structured data snippets from the warning\n if (c.type === 'script' && c.props['type'] !== 'application/ld+json') {\n const srcMessage = c.props['src']\n ? `<script> tag with src=\"${c.props['src']}\"`\n : `inline <script>`\n warnOnce(\n `Do not add <script> tags using next/head (see ${srcMessage}). Use next/script instead. \\nSee more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`\n )\n } else if (c.type === 'link' && c.props['rel'] === 'stylesheet') {\n warnOnce(\n `Do not add stylesheets using next/head (see <link rel=\"stylesheet\"> tag with href=\"${c.props['href']}\"). Use Document instead. \\nSee more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`\n )\n }\n }\n return React.cloneElement(c, { key })\n })\n}\n\n/**\n * This component injects elements to `<head>` of your page.\n * To avoid duplicated `tags` in `<head>` you can use the `key` property, which will make sure every tag is only rendered once.\n */\nfunction Head({ children }: { children: React.ReactNode }) {\n const headManager = useContext(HeadManagerContext)\n return (\n <Effect\n reduceComponentsToState={reduceComponents}\n headManager={headManager}\n >\n {children}\n </Effect>\n )\n}\n\nexport default Head\n"],"names":["defaultHead","head","meta","charSet","name","content","onlyReactElement","list","child","type","React","Fragment","concat","Children","toArray","props","children","reduce","fragmentList","fragmentChild","METATYPES","unique","keys","Set","tags","metaTypes","metaCategories","h","isUnique","hasKey","key","indexOf","slice","has","add","i","len","length","metatype","hasOwnProperty","category","categories","reduceComponents","headChildrenElements","reverse","filter","map","c","process","env","NODE_ENV","warnOnce","require","srcMessage","cloneElement","Head","headManager","useContext","HeadManagerContext","Effect","reduceComponentsToState"],"mappings":"AAAA;;;;;;;;;;;;;;;;IAsKA,OAAmB;eAAnB;;IAhKgBA,WAAW;eAAXA;;;;;;iEAJ4B;qEACzB;iDACgB;AAE5B,SAASA;IAC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,EAAEhC,KAAK,CAAC,OAAO,KAAK,uBAAuB;gBACpE,MAAMsC,aAAaN,EAAEhC,KAAK,CAAC,MAAM,GAC7B,CAAC,uBAAuB,EAAEgC,EAAEhC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAC3C,CAAC,eAAe,CAAC;gBACrBoC,SACE,CAAC,8CAA8C,EAAEE,WAAW,mHAAmH,CAAC;YAEpL,OAAO,IAAIN,EAAEtC,IAAI,KAAK,UAAUsC,EAAEhC,KAAK,CAAC,MAAM,KAAK,cAAc;gBAC/DoC,SACE,CAAC,mFAAmF,EAAEJ,EAAEhC,KAAK,CAAC,OAAO,CAAC,iHAAiH,CAAC;YAE5N;QACF;QACA,qBAAOL,cAAK,CAAC4C,YAAY,CAACP,GAAG;YAAEjB;QAAI;IACrC;AACJ;AAEA;;;CAGC,GACD,SAASyB,KAAK,EAAEvC,QAAQ,EAAiC;IACvD,MAAMwC,cAAcC,IAAAA,iBAAU,EAACC,mDAAkB;IACjD,qBACE,qBAACC,mBAAM;QACLC,yBAAyBlB;QACzBc,aAAaA;kBAEZxC;;AAGP;MAEA,WAAeuC","ignoreList":[0]} |
@@ -1,2 +0,5 @@ | ||
| "use strict"; | ||
| /** | ||
| * Run function with `scroll-behavior: auto` applied to `<html/>`. | ||
| * This css change will be reverted after the function finishes. | ||
| */ "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { | ||
@@ -11,3 +14,2 @@ value: true | ||
| }); | ||
| const _warnonce = require("../../utils/warn-once"); | ||
| function disableSmoothScrollDuringRouteTransition(fn, options = {}) { | ||
@@ -25,3 +27,4 @@ // if only the hash is changed, we don't need to disable smooth scrolling | ||
| if (process.env.NODE_ENV === 'development' && getComputedStyle(htmlElement).scrollBehavior === 'smooth') { | ||
| (0, _warnonce.warnOnce)('Detected `scroll-behavior: smooth` on the `<html>` element. To disable smooth scrolling during route transitions, ' + 'add `data-scroll-behavior="smooth"` to your <html> element. ' + 'Learn more: https://nextjs.org/docs/messages/missing-data-scroll-behavior'); | ||
| const { warnOnce } = require('../../utils/warn-once'); | ||
| warnOnce('Detected `scroll-behavior: smooth` on the `<html>` element. To disable smooth scrolling during route transitions, ' + 'add `data-scroll-behavior="smooth"` to your <html> element. ' + 'Learn more: https://nextjs.org/docs/messages/missing-data-scroll-behavior'); | ||
| } | ||
@@ -28,0 +31,0 @@ // No smooth scrolling configured, run directly without style manipulation |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../../../../../src/shared/lib/router/utils/disable-smooth-scroll.ts"],"sourcesContent":["import { warnOnce } from '../../utils/warn-once'\n\n/**\n * Run function with `scroll-behavior: auto` applied to `<html/>`.\n * This css change will be reverted after the function finishes.\n */\nexport function disableSmoothScrollDuringRouteTransition(\n fn: () => void,\n options: { dontForceLayout?: boolean; onlyHashChange?: boolean } = {}\n) {\n // if only the hash is changed, we don't need to disable smooth scrolling\n // we only care to prevent smooth scrolling when navigating to a new page to avoid jarring UX\n if (options.onlyHashChange) {\n fn()\n return\n }\n\n const htmlElement = document.documentElement\n const hasDataAttribute = htmlElement.dataset.scrollBehavior === 'smooth'\n\n if (!hasDataAttribute) {\n // Warn if smooth scrolling is detected but no data attribute is present\n if (\n process.env.NODE_ENV === 'development' &&\n getComputedStyle(htmlElement).scrollBehavior === 'smooth'\n ) {\n warnOnce(\n 'Detected `scroll-behavior: smooth` on the `<html>` element. To disable smooth scrolling during route transitions, ' +\n 'add `data-scroll-behavior=\"smooth\"` to your <html> element. ' +\n 'Learn more: https://nextjs.org/docs/messages/missing-data-scroll-behavior'\n )\n }\n // No smooth scrolling configured, run directly without style manipulation\n fn()\n return\n }\n\n // Proceed with temporarily disabling smooth scrolling\n const existing = htmlElement.style.scrollBehavior\n htmlElement.style.scrollBehavior = 'auto'\n if (!options.dontForceLayout) {\n // In Chrome-based browsers we need to force reflow before calling `scrollTo`.\n // Otherwise it will not pickup the change in scrollBehavior\n // More info here: https://github.com/vercel/next.js/issues/40719#issuecomment-1336248042\n htmlElement.getClientRects()\n }\n fn()\n htmlElement.style.scrollBehavior = existing\n}\n"],"names":["disableSmoothScrollDuringRouteTransition","fn","options","onlyHashChange","htmlElement","document","documentElement","hasDataAttribute","dataset","scrollBehavior","process","env","NODE_ENV","getComputedStyle","warnOnce","existing","style","dontForceLayout","getClientRects"],"mappings":";;;;+BAMgBA;;;eAAAA;;;0BANS;AAMlB,SAASA,yCACdC,EAAc,EACdC,UAAmE,CAAC,CAAC;IAErE,yEAAyE;IACzE,6FAA6F;IAC7F,IAAIA,QAAQC,cAAc,EAAE;QAC1BF;QACA;IACF;IAEA,MAAMG,cAAcC,SAASC,eAAe;IAC5C,MAAMC,mBAAmBH,YAAYI,OAAO,CAACC,cAAc,KAAK;IAEhE,IAAI,CAACF,kBAAkB;QACrB,wEAAwE;QACxE,IACEG,QAAQC,GAAG,CAACC,QAAQ,KAAK,iBACzBC,iBAAiBT,aAAaK,cAAc,KAAK,UACjD;YACAK,IAAAA,kBAAQ,EACN,uHACE,iEACA;QAEN;QACA,0EAA0E;QAC1Eb;QACA;IACF;IAEA,sDAAsD;IACtD,MAAMc,WAAWX,YAAYY,KAAK,CAACP,cAAc;IACjDL,YAAYY,KAAK,CAACP,cAAc,GAAG;IACnC,IAAI,CAACP,QAAQe,eAAe,EAAE;QAC5B,8EAA8E;QAC9E,4DAA4D;QAC5D,yFAAyF;QACzFb,YAAYc,cAAc;IAC5B;IACAjB;IACAG,YAAYY,KAAK,CAACP,cAAc,GAAGM;AACrC","ignoreList":[0]} | ||
| {"version":3,"sources":["../../../../../src/shared/lib/router/utils/disable-smooth-scroll.ts"],"sourcesContent":["/**\n * Run function with `scroll-behavior: auto` applied to `<html/>`.\n * This css change will be reverted after the function finishes.\n */\nexport function disableSmoothScrollDuringRouteTransition(\n fn: () => void,\n options: { dontForceLayout?: boolean; onlyHashChange?: boolean } = {}\n) {\n // if only the hash is changed, we don't need to disable smooth scrolling\n // we only care to prevent smooth scrolling when navigating to a new page to avoid jarring UX\n if (options.onlyHashChange) {\n fn()\n return\n }\n\n const htmlElement = document.documentElement\n const hasDataAttribute = htmlElement.dataset.scrollBehavior === 'smooth'\n\n if (!hasDataAttribute) {\n // Warn if smooth scrolling is detected but no data attribute is present\n if (\n process.env.NODE_ENV === 'development' &&\n getComputedStyle(htmlElement).scrollBehavior === 'smooth'\n ) {\n const { warnOnce } =\n require('../../utils/warn-once') as typeof import('../../utils/warn-once')\n warnOnce(\n 'Detected `scroll-behavior: smooth` on the `<html>` element. To disable smooth scrolling during route transitions, ' +\n 'add `data-scroll-behavior=\"smooth\"` to your <html> element. ' +\n 'Learn more: https://nextjs.org/docs/messages/missing-data-scroll-behavior'\n )\n }\n // No smooth scrolling configured, run directly without style manipulation\n fn()\n return\n }\n\n // Proceed with temporarily disabling smooth scrolling\n const existing = htmlElement.style.scrollBehavior\n htmlElement.style.scrollBehavior = 'auto'\n if (!options.dontForceLayout) {\n // In Chrome-based browsers we need to force reflow before calling `scrollTo`.\n // Otherwise it will not pickup the change in scrollBehavior\n // More info here: https://github.com/vercel/next.js/issues/40719#issuecomment-1336248042\n htmlElement.getClientRects()\n }\n fn()\n htmlElement.style.scrollBehavior = existing\n}\n"],"names":["disableSmoothScrollDuringRouteTransition","fn","options","onlyHashChange","htmlElement","document","documentElement","hasDataAttribute","dataset","scrollBehavior","process","env","NODE_ENV","getComputedStyle","warnOnce","require","existing","style","dontForceLayout","getClientRects"],"mappings":"AAAA;;;CAGC;;;;+BACeA;;;eAAAA;;;AAAT,SAASA,yCACdC,EAAc,EACdC,UAAmE,CAAC,CAAC;IAErE,yEAAyE;IACzE,6FAA6F;IAC7F,IAAIA,QAAQC,cAAc,EAAE;QAC1BF;QACA;IACF;IAEA,MAAMG,cAAcC,SAASC,eAAe;IAC5C,MAAMC,mBAAmBH,YAAYI,OAAO,CAACC,cAAc,KAAK;IAEhE,IAAI,CAACF,kBAAkB;QACrB,wEAAwE;QACxE,IACEG,QAAQC,GAAG,CAACC,QAAQ,KAAK,iBACzBC,iBAAiBT,aAAaK,cAAc,KAAK,UACjD;YACA,MAAM,EAAEK,QAAQ,EAAE,GAChBC,QAAQ;YACVD,SACE,uHACE,iEACA;QAEN;QACA,0EAA0E;QAC1Eb;QACA;IACF;IAEA,sDAAsD;IACtD,MAAMe,WAAWZ,YAAYa,KAAK,CAACR,cAAc;IACjDL,YAAYa,KAAK,CAACR,cAAc,GAAG;IACnC,IAAI,CAACP,QAAQgB,eAAe,EAAE;QAC5B,8EAA8E;QAC9E,4DAA4D;QAC5D,yFAAyF;QACzFd,YAAYe,cAAc;IAC5B;IACAlB;IACAG,YAAYa,KAAK,CAACR,cAAc,GAAGO;AACrC","ignoreList":[0]} |
@@ -84,3 +84,3 @@ "use strict"; | ||
| ciName: _ciinfo.isCI && _ciinfo.name || null, | ||
| nextVersion: "16.3.0-canary.51" | ||
| nextVersion: "16.3.0-canary.52" | ||
| }; | ||
@@ -87,0 +87,0 @@ return traits; |
@@ -14,7 +14,7 @@ "use strict"; | ||
| // This should be an invariant, if it fails our build tooling is broken. | ||
| if (typeof "16.3.0-canary.51" !== 'string') { | ||
| if (typeof "16.3.0-canary.52" !== 'string') { | ||
| return []; | ||
| } | ||
| const payload = { | ||
| nextVersion: "16.3.0-canary.51", | ||
| nextVersion: "16.3.0-canary.52", | ||
| nodeVersion: process.version, | ||
@@ -21,0 +21,0 @@ cliCommand: event.cliCommand, |
@@ -41,3 +41,3 @@ "use strict"; | ||
| payload: { | ||
| nextVersion: "16.3.0-canary.51", | ||
| nextVersion: "16.3.0-canary.52", | ||
| glibcVersion, | ||
@@ -44,0 +44,0 @@ installedSwcPackages, |
@@ -15,3 +15,3 @@ "use strict"; | ||
| // This should be an invariant, if it fails our build tooling is broken. | ||
| if (typeof "16.3.0-canary.51" !== 'string') { | ||
| if (typeof "16.3.0-canary.52" !== 'string') { | ||
| return []; | ||
@@ -21,3 +21,3 @@ } | ||
| const payload = { | ||
| nextVersion: "16.3.0-canary.51", | ||
| nextVersion: "16.3.0-canary.52", | ||
| nodeVersion: process.version, | ||
@@ -24,0 +24,0 @@ cliCommand: event.cliCommand, |
+15
-15
| { | ||
| "name": "next", | ||
| "version": "16.3.0-canary.51", | ||
| "version": "16.3.0-canary.52", | ||
| "description": "The React Framework", | ||
@@ -104,3 +104,3 @@ "main": "./dist/server/next.js", | ||
| "dependencies": { | ||
| "@next/env": "16.3.0-canary.51", | ||
| "@next/env": "16.3.0-canary.52", | ||
| "@swc/helpers": "0.5.15", | ||
@@ -136,10 +136,10 @@ "baseline-browser-mapping": "^2.9.19", | ||
| "sharp": "^0.34.5", | ||
| "@next/swc-darwin-arm64": "16.3.0-canary.51", | ||
| "@next/swc-darwin-x64": "16.3.0-canary.51", | ||
| "@next/swc-linux-arm64-gnu": "16.3.0-canary.51", | ||
| "@next/swc-linux-arm64-musl": "16.3.0-canary.51", | ||
| "@next/swc-linux-x64-gnu": "16.3.0-canary.51", | ||
| "@next/swc-linux-x64-musl": "16.3.0-canary.51", | ||
| "@next/swc-win32-arm64-msvc": "16.3.0-canary.51", | ||
| "@next/swc-win32-x64-msvc": "16.3.0-canary.51" | ||
| "@next/swc-darwin-arm64": "16.3.0-canary.52", | ||
| "@next/swc-darwin-x64": "16.3.0-canary.52", | ||
| "@next/swc-linux-arm64-gnu": "16.3.0-canary.52", | ||
| "@next/swc-linux-arm64-musl": "16.3.0-canary.52", | ||
| "@next/swc-linux-x64-gnu": "16.3.0-canary.52", | ||
| "@next/swc-linux-x64-musl": "16.3.0-canary.52", | ||
| "@next/swc-win32-arm64-msvc": "16.3.0-canary.52", | ||
| "@next/swc-win32-x64-msvc": "16.3.0-canary.52" | ||
| }, | ||
@@ -178,7 +178,7 @@ "devDependencies": { | ||
| "@napi-rs/triples": "1.2.0", | ||
| "@next/font": "16.3.0-canary.51", | ||
| "@next/polyfill-module": "16.3.0-canary.51", | ||
| "@next/polyfill-nomodule": "16.3.0-canary.51", | ||
| "@next/react-refresh-utils": "16.3.0-canary.51", | ||
| "@next/swc": "16.3.0-canary.51", | ||
| "@next/font": "16.3.0-canary.52", | ||
| "@next/polyfill-module": "16.3.0-canary.52", | ||
| "@next/polyfill-nomodule": "16.3.0-canary.52", | ||
| "@next/react-refresh-utils": "16.3.0-canary.52", | ||
| "@next/swc": "16.3.0-canary.52", | ||
| "@opentelemetry/api": "1.6.0", | ||
@@ -185,0 +185,0 @@ "@playwright/test": "1.58.2", |
| self.__BUILD_MANIFEST = { | ||
| "__rewrites": { | ||
| "afterFiles": [], | ||
| "beforeFiles": [], | ||
| "fallback": [] | ||
| }, | ||
| "sortedPages": [ | ||
| "/_app", | ||
| "/_error" | ||
| ] | ||
| };self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB() |
| self.__MIDDLEWARE_MATCHERS = [];self.__MIDDLEWARE_MATCHERS_CB && self.__MIDDLEWARE_MATCHERS_CB() |
| self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 5 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Potential vulnerability
Supply chain riskInitial human review suggests the presence of a vulnerability in this package. It is pending further analysis and confirmation.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 5 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
167708376
0.02%8259
0.01%1271587
0.01%4285
0.47%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated