Unverified Commit 6fa344b8 authored by Luke Sandberg's avatar Luke Sandberg Committed by GitHub

turbopack-ecmascript-runtime: type-check every runtime file (#99670)

## Summary

Most of the Turbopack runtime in `turbopack-ecmascript-runtime/js/src`
was never type-checked, and editors showed hundreds of bogus "Cannot
find name" errors in it.

- `src/nodejs/tsconfig.json` had `"include": ["*.ts"]`, which only
matched `nodejs/hmr-types.d.ts`. So `nodejs/runtime/*` and
`nodejs/dev/*` were in no project, and `pnpm check` never covered them.
- `browser/runtime/base/tsconfig.json` included only `runtime-base.ts`
and `dummy.ts`. `build-base.ts`, `dev-base.ts` and `dev-dummy.ts` were
left out. `dev-base.ts` was checked indirectly through the `dom`
project.
- tsserver then fell back to `turbopack/tsconfig.json`, which uses
`"module": "NodeNext"`. That implies `moduleDetection: force`, so these
global-script files were treated as modules and their shared `///
<reference>` declarations disappeared.

`build-base.ts` and `dev-base.ts` are alternative entry points that both
define `instantiateModule`, so they can't share a project. In both
`nodejs/` and `browser/runtime/base/`, `tsconfig.json` is now a
solution-style config that references a `tsconfig.build.json` and a
`tsconfig.dev.json`. tsserver follows these references, so every file
opens in the right project. Files that are only pulled in through `///
<reference>` are listed in `include` explicitly, because tsserver
doesn't otherwise count them as part of a project. The `check:` scripts
are split the same way.

`tsconfig.base.json` now sets `moduleDetection: "auto"` explicitly.
That's already the default for `module: CommonJS`, but it documents that
these files have to stay scripts.

This also fixes the errors in files that were never checked before:

- `nodejs-globals.d.ts` referenced `shared/runtime-types.d.ts`, which
doesn't exist. The file is `shared/runtime/runtime-types.d.ts`.
- In `nodejs/runtime/build-base.ts`, `moduleCache.get(...)` returned
`Module` where `ModuleWithDirection` was expected. This matches the
existing cast on `nodeContextPrototype.c`.
- `nodejs/dev/dev-nodejs.ts` read `.merged` on an instruction union
where only `ChunkListUpdate` has that field.
- `nodejs/runtime/dev-base.ts` had an unused parameter.

## Verification

- `pnpm check` in `turbopack/crates/turbopack-ecmascript-runtime/js`
passes.
- Opened all 31 `.ts` files in a real tsserver. Each resolves to one of
this package's tsconfigs, with 0 errors.
- Not run: Turbopack snapshot tests. The `dev-nodejs.ts` change affects
emitted runtime code, so snapshots may need regenerating.

<!-- NEXT_JS_LLM -->
parent bc335b88
......@@ -7,9 +7,11 @@
"scripts": {
"typescript": "pnpm check",
"check": "run-p check:*",
"check:nodejs": "tsc -p src/nodejs",
"check:nodejs-build": "tsc -p src/nodejs/tsconfig.build.json",
"check:nodejs-dev": "tsc -p src/nodejs/tsconfig.dev.json",
"check:browser-dev-client": "tsc -p src/browser/dev/hmr-client",
"check:browser-runtime-base": "tsc -p src/browser/runtime/base",
"check:browser-runtime-base-build": "tsc -p src/browser/runtime/base/tsconfig.build.json",
"check:browser-runtime-base-dev": "tsc -p src/browser/runtime/base/tsconfig.dev.json",
"check:browser-runtime-dom": "tsc -p src/browser/runtime/dom",
"check:browser-runtime-self-contained": "tsc -p src/browser/runtime/self-contained"
},
......
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
// environment, we need WebWorker for WebAssembly types
"lib": ["ESNext", "WebWorker"]
},
"include": ["globals.d.ts", "runtime-base.ts", "dummy.ts", "build-base.ts"]
}
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
// environment, we need WebWorker for WebAssembly types
"lib": ["ESNext", "WebWorker"]
},
"include": [
"globals.d.ts",
"runtime-base.ts",
"dummy.ts",
"dev-dummy.ts",
"dev-base.ts"
]
}
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
// environment, we need WebWorker for WebAssembly types
"lib": ["ESNext", "WebWorker"]
},
"include": ["runtime-base.ts", "dummy.ts"]
"files": [],
"references": [
{ "path": "./tsconfig.build.json" },
{ "path": "./tsconfig.dev.json" }
]
}
......@@ -62,11 +62,13 @@ if (handlers.size === 0) {
// updates) or nested inside `merged` entries (chunks covered by a
// merger). Collect both so routing isn't skipped just because a mergeable
// chunk's update only reports its paths inside `merged`.
const instruction = update.instruction
const updateChunkPaths = new Set<string>([
...Object.keys(update.instruction?.chunks ?? {}),
...(update.instruction?.merged ?? []).flatMap((merged) =>
Object.keys(merged.chunks ?? {})
),
...Object.keys(instruction?.chunks ?? {}),
...(
(instruction?.type === 'ChunkListUpdate' && instruction.merged) ||
[]
).flatMap((merged) => Object.keys(merged.chunks ?? {})),
])
const toCall: HmrHandlerEntry[] = []
......
......@@ -76,7 +76,7 @@ function getOrInstantiateModuleFromParent(
id: ModuleId,
sourceModule: ModuleWithDirection
): ModuleWithDirection {
const module = moduleCache.get(id)
const module = moduleCache.get(id) as ModuleWithDirection | undefined
if (module) {
if (module.error) {
......@@ -107,7 +107,7 @@ function getOrInstantiateRuntimeModule(
chunkPath: ChunkPath,
moduleId: ModuleId
): ModuleWithDirection {
const module = moduleCache.get(moduleId)
const module = moduleCache.get(moduleId) as ModuleWithDirection | undefined
if (module) {
if (module.error) {
......
......@@ -89,7 +89,7 @@ function instantiateModule(
}
// Node.js: no hooks wrapper, just execute directly
const runWithHooks = (module: HotModule, exec: (refresh: any) => void) => {
const runWithHooks = (_module: HotModule, exec: (refresh: any) => void) => {
exec(undefined) // no refresh context
}
......
/// <reference path="../../shared/runtime-types.d.ts" />
/// <reference path="../../shared/runtime/runtime-types.d.ts" />
/**
* Global type definitions for Node.js Turbopack runtime.
......
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
// environment, we need WebWorker for WebAssembly types (not part of @types/node yet)
"lib": ["ESNext", "WebWorker"],
"types": ["node"]
},
"include": [
"runtime/nodejs-globals.d.ts",
"runtime/runtime-base.ts",
"runtime/build-base.ts"
]
}
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
// environment, we need WebWorker for WebAssembly types (not part of @types/node yet)
"lib": ["ESNext", "WebWorker"],
"types": ["node"]
},
"include": [
"hmr-types.d.ts",
"runtime/nodejs-globals.d.ts",
"runtime/runtime-base.ts",
"runtime/dev-base.ts",
"dev/*.ts"
]
}
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
// environment, we need WebWorker for WebAssembly types (not part of @types/node yet)
"lib": ["ESNext", "WebWorker"],
"types": ["node"]
},
"include": ["*.ts"]
"files": [],
"references": [
{ "path": "./tsconfig.build.json" },
{ "path": "./tsconfig.dev.json" }
]
}
......@@ -13,6 +13,9 @@
// modules
"module": "CommonJS",
// The runtime is written as global scripts that share declarations through
// `/// <reference>`, so files must not be implicitly treated as modules.
"moduleDetection": "auto",
"types": [], // disable implicit types.
// emit
......
......@@ -1586,7 +1586,7 @@ if (globalThis.__turbopack_ensure_chunk__ !== undefined) {
return new Context(module1, exports);
};
// Node.js: no hooks wrapper, just execute directly
const runWithHooks = (module1, exec)=>{
const runWithHooks = (_module, exec)=>{
exec(undefined); // no refresh context
};
// Use shared instantiation logic (includes hot API setup)
......@@ -1775,9 +1775,10 @@ if (handlers.size === 0) {
// updates) or nested inside `merged` entries (chunks covered by a
// merger). Collect both so routing isn't skipped just because a mergeable
// chunk's update only reports its paths inside `merged`.
const instruction = update.instruction;
const updateChunkPaths = new Set([
...Object.keys(update.instruction?.chunks ?? {}),
...(update.instruction?.merged ?? []).flatMap((merged)=>Object.keys(merged.chunks ?? {}))
...Object.keys(instruction?.chunks ?? {}),
...(instruction?.type === 'ChunkListUpdate' && instruction.merged || []).flatMap((merged)=>Object.keys(merged.chunks ?? {}))
]);
const toCall = [];
if (updateChunkPaths.size === 0) {
......
......@@ -7,7 +7,7 @@
{"offset": {"line": 691, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/node-externals-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\ndeclare var RUNTIME_PUBLIC_PATH: string\ndeclare var RELATIVE_ROOT_PATH: string\ndeclare var ASSET_PREFIX: string\n\nconst path = require('path')\n\nconst relativePathToRuntimeRoot = path.relative(RUNTIME_PUBLIC_PATH, '.')\n// Compute the relative path to the `distDir`.\nconst relativePathToDistRoot = path.join(\n relativePathToRuntimeRoot,\n RELATIVE_ROOT_PATH\n)\nconst RUNTIME_ROOT = path.resolve(__filename, relativePathToRuntimeRoot)\n// Compute the absolute path to the root, by stripping distDir from the absolute path to this file.\nconst ABSOLUTE_ROOT = path.resolve(__filename, relativePathToDistRoot)\n\n/**\n * Returns an absolute path to the given module path.\n * Module path should be relative, either path to a file or a directory.\n *\n * This fn allows to calculate an absolute path for some global static values, such as\n * `__dirname` or `import.meta.url` that Turbopack will not embeds in compile time.\n * See ImportMetaBinding::code_generation for the usage.\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n if (modulePath) {\n return path.join(ABSOLUTE_ROOT, modulePath)\n }\n return ABSOLUTE_ROOT\n}\nContext.prototype.P = resolveAbsolutePath\n\n/**\n * Returns an absolute `file://` URL for the given module path, which is\n * relative to the project root or the named `root`.\n *\n * Uses `url.pathToFileURL` so that the resulting URL is a valid file URI on\n * all platforms (forward slashes on Windows, drive letters handled\n * correctly, path segments URL-encoded).\n *\n * The location of a named `root` isn't known at runtime (the output may have\n * been moved away from the sources), so this returns a placeholder URL for it.\n */\nfunction resolveFileUrl(modulePath: string, root?: string): string {\n if (root !== undefined) {\n return placeholderFileUrl(modulePath, root)\n }\n return require('url').pathToFileURL(resolveAbsolutePath(modulePath)).href\n}\nContext.prototype.F = resolveFileUrl\n"],"names":["path","require","relativePathToRuntimeRoot","relative","RUNTIME_PUBLIC_PATH","relativePathToDistRoot","join","RELATIVE_ROOT_PATH","RUNTIME_ROOT","resolve","__filename","ABSOLUTE_ROOT","resolveAbsolutePath","modulePath","Context","prototype","P","resolveFileUrl","root","undefined","placeholderFileUrl","pathToFileURL","href","F"],"mappings":"AAAA,oDAAoD,GAMpD,MAAMA,OAAOC,QAAQ;AAErB,MAAMC,4BAA4BF,KAAKG,QAAQ,CAACC,qBAAqB;AACrE,8CAA8C;AAC9C,MAAMC,yBAAyBL,KAAKM,IAAI,CACtCJ,2BACAK;AAEF,MAAMC,eAAeR,KAAKS,OAAO,CAACC,YAAYR;AAC9C,mGAAmG;AACnG,MAAMS,gBAAgBX,KAAKS,OAAO,CAACC,YAAYL;AAE/C;;;;;;;CAOC,GACD,SAASO,oBAAoBC,UAAmB;IAC9C,IAAIA,YAAY;QACd,OAAOb,KAAKM,IAAI,CAACK,eAAeE;IAClC;IACA,OAAOF;AACT;AACAG,QAAQC,SAAS,CAACC,CAAC,GAAGJ;AAEtB;;;;;;;;;;CAUC,GACD,SAASK,eAAeJ,UAAkB,EAAEK,IAAa;IACvD,IAAIA,SAASC,WAAW;QACtB,OAAOC,mBAAmBP,YAAYK;IACxC;IACA,OAAOjB,QAAQ,OAAOoB,aAAa,CAACT,oBAAoBC,aAAaS,IAAI;AAC3E;AACAR,QAAQC,SAAS,CAACQ,CAAC,GAAGN","ignoreList":[0]}},
{"offset": {"line": 729, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime/runtime-base.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// <reference path=\"../../shared/runtime/runtime-utils.ts\" />\n/// <reference path=\"../../shared-node/base-externals-utils.ts\" />\n/// <reference path=\"../../shared-node/node-externals-utils.ts\" />\n/// <reference path=\"./nodejs-globals.d.ts\" />\n\n/**\n * Base Node.js runtime shared between production and development.\n * Contains chunk loading, module caching, and other non-HMR functionality.\n */\n\nprocess.env.TURBOPACK = '1'\n\nconst url = require('url') as typeof import('url')\n\nconst moduleFactories: ModuleFactories = new Map()\nconst moduleCache: ModuleCache<Module> = new Map()\n\n/**\n * Returns an absolute path to the given module's id.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext<Module>,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n const exportedPath = exported?.default ?? exported\n if (typeof exportedPath !== 'string') {\n return exported as any\n }\n\n const strippedAssetPrefix = exportedPath.slice(ASSET_PREFIX.length)\n const resolved = path.resolve(RUNTIME_ROOT, strippedAssetPrefix)\n\n return url.pathToFileURL(resolved).href\n}\n\n/**\n * Exports a URL value. No suffix is added in Node.js runtime.\n */\nfunction exportUrl(\n this: TurbopackBaseContext<Module>,\n urlValue: string,\n id: ModuleId | undefined\n) {\n exportValue.call(this, urlValue, id)\n}\n\nfunction loadRuntimeChunk(sourcePath: ChunkPath, chunkData: ChunkData): void {\n if (typeof chunkData === 'string') {\n loadRuntimeChunkPath(sourcePath, chunkData)\n } else {\n loadRuntimeChunkPath(sourcePath, chunkData.path)\n }\n}\n\nconst loadedChunks = new Set<ChunkPath>()\nconst unsupportedLoadChunk = Promise.resolve(undefined)\nconst loadedChunk: Promise<void> = Promise.resolve(undefined)\nconst chunkCache = new Map<ChunkPath, Promise<void>>()\n\nfunction clearChunkCache() {\n chunkCache.clear()\n loadedChunks.clear()\n}\n\nfunction loadRuntimeChunkPath(\n sourcePath: ChunkPath,\n chunkPath: ChunkPath\n): void {\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return\n }\n\n if (loadedChunks.has(chunkPath)) {\n return\n }\n\n try {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n loadedChunks.add(chunkPath)\n } catch (cause) {\n let errorMessage = `Failed to load chunk ${chunkPath}`\n\n if (sourcePath) {\n errorMessage += ` from runtime for chunk ${sourcePath}`\n }\n\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n throw error\n }\n}\n\nfunction loadChunkAsync<TModule extends Module>(\n this: TurbopackBaseContext<TModule>,\n chunkData: ChunkData\n): Promise<void> {\n const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return unsupportedLoadChunk\n }\n\n let entry = chunkCache.get(chunkPath)\n if (entry === undefined) {\n try {\n // resolve to an absolute path to simplify `require` handling\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n // TODO: consider switching to `import()` to enable concurrent chunk loading and async file io\n // However this is incompatible with hot reloading (since `import` doesn't use the require cache)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n entry = loadedChunk\n } catch (cause) {\n const errorMessage = `Failed to load chunk ${chunkPath} from module ${this.m.id}`\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n\n // Cache the failure promise, future requests will also get this same rejection\n entry = Promise.reject(error)\n }\n chunkCache.set(chunkPath, entry)\n }\n // TODO: Return an instrumented Promise that React can use instead of relying on referential equality.\n return entry\n}\ncontextPrototype.l = loadChunkAsync\n\nfunction loadChunkAsyncByUrl<TModule extends Module>(\n this: TurbopackBaseContext<TModule>,\n chunkUrl: string\n) {\n const path = url.fileURLToPath(new URL(chunkUrl, RUNTIME_ROOT)) as ChunkPath\n return loadChunkAsync.call(this, path)\n}\ncontextPrototype.L = loadChunkAsyncByUrl\n\n// Shared runtime primitive: the root that on-disk chunk paths are resolved\n// against. Used by the bundled wasm helper (exposed as `__turbopack_runtime_root__`).\ncontextPrototype.w = RUNTIME_ROOT\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n"],"names":["process","env","TURBOPACK","url","require","moduleFactories","Map","moduleCache","resolvePathFromModule","moduleId","exported","r","exportedPath","default","strippedAssetPrefix","slice","ASSET_PREFIX","length","resolved","path","resolve","RUNTIME_ROOT","pathToFileURL","href","exportUrl","urlValue","id","exportValue","call","loadRuntimeChunk","sourcePath","chunkData","loadRuntimeChunkPath","loadedChunks","Set","unsupportedLoadChunk","Promise","undefined","loadedChunk","chunkCache","clearChunkCache","clear","chunkPath","isJs","has","chunkModules","installCompressedModuleFactories","add","cause","errorMessage","error","Error","name","loadChunkAsync","entry","get","m","reject","set","contextPrototype","l","loadChunkAsyncByUrl","chunkUrl","path1","fileURLToPath","URL","L","w","regexJ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,IAAIC,IAAIH,UAAUzC;IACjD,OAAOgC,eAAezB,IAAI,CAAC,IAAI,EAAEmC;AACnC;AACAJ,iBAAiBO,CAAC,GAAGL;AAErB,2EAA2E;AAC3E,sFAAsF;AACtFF,iBAAiBQ,CAAC,GAAG9C;AAErB,MAAM+C,aAAa;AACnB;;CAEC,GACD,SAASzB,KAAK0B,cAAoC;IAChD,OAAOD,WAAWE,IAAI,CAACD;AACzB","ignoreList":[0]}},
{"offset": {"line": 844, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime/hmr-runtime.ts"],"sourcesContent":["/// <reference path=\"./runtime-utils.ts\" />\n/// <reference path=\"./runtime-types.d.ts\" />\n/// <reference path=\"./dev-extensions.ts\" />\n/// <reference path=\"./dev-protocol.d.ts\" />\n\ntype HotModuleFactoryFunction = ModuleFactoryFunction<\n HotModule,\n TurbopackBaseContext<HotModule>\n>\n\n/**\n * Shared HMR (Hot Module Replacement) implementation.\n *\n * This file contains the complete HMR implementation that's shared between\n * browser and Node.js runtimes. It manages module hot state, dependency\n * tracking, the module.hot API, and the full HMR update flow.\n */\n\n/**\n * The development module cache shared across the runtime.\n * Browser runtime declares this directly.\n * Node.js runtime assigns globalThis.__turbopack_module_cache__ to this.\n */\nlet devModuleCache: ModuleCache<any>\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nlet runtimeModules: Set<ModuleId>\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map<ModuleId, HotData> = new Map()\n\n/**\n * Maps module instances to their hot module state.\n * Uses WeakMap so it works with both HotModule and ModuleWithDirection.\n */\nconst moduleHotState: WeakMap<any, HotState> = new WeakMap()\n\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set<ModuleId> = new Set()\n\nclass UpdateApplyError extends Error {\n name = 'UpdateApplyError'\n\n dependencyChain: ModuleId[]\n\n constructor(message: string, dependencyChain: ModuleId[]) {\n super(message)\n this.dependencyChain = dependencyChain\n }\n}\n\ntype ModuleEffect =\n | {\n type: 'unaccepted'\n dependencyChain: ModuleId[]\n }\n | {\n type: 'self-declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n }\n | {\n type: 'declined'\n dependencyChain: ModuleId[]\n moduleId: ModuleId\n parentId: ModuleId\n }\n | {\n type: 'accepted'\n moduleId: ModuleId | undefined\n outdatedModules: Set<ModuleId>\n outdatedDependencies: Map<ModuleId, Set<ModuleId>>\n }\n\n/**\n * Records parent-child relationship when a module imports another.\n * Should be called during module instantiation.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction trackModuleImport(\n parentModule: ModuleWithDirection,\n childModuleId: ModuleId,\n childModule: ModuleWithDirection | undefined\n): void {\n // Record that parent imports child\n if (parentModule.children.indexOf(childModuleId) === -1) {\n parentModule.children.push(childModuleId)\n }\n\n // Record that child is imported by parent\n if (childModule && childModule.parents.indexOf(parentModule.id) === -1) {\n childModule.parents.push(parentModule.id)\n }\n}\n\nfunction formatDependencyChain(dependencyChain: ModuleId[]): string {\n return `Dependency chain: ${dependencyChain.join(' -> ')}`\n}\n\n/**\n * Walks the dependency tree to find all modules affected by a change.\n * Returns information about whether the update can be accepted and which\n * modules need to be invalidated.\n *\n * @param moduleId - The module that changed\n * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept().\n * This is used for server-side HMR where pages auto-accept at the top level.\n */\nfunction getAffectedModuleEffects(\n moduleId: ModuleId,\n autoAcceptRootModules: boolean\n): ModuleEffect {\n const outdatedModules: Set<ModuleId> = new Set()\n const outdatedDependencies: Map<ModuleId, Set<ModuleId>> = new Map()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: Array<QueueItem | undefined> = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let queueIndex = 0\n while (queueIndex < queue.length) {\n const { moduleId, dependencyChain } = queue[queueIndex]!\n // Release copied dependency chains as soon as their queue item is consumed.\n queue[queueIndex++] = undefined\n\n if (moduleId != null) {\n if (outdatedModules.has(moduleId)) {\n // Avoid infinite loops caused by cycles between modules in the dependency chain.\n continue\n }\n\n outdatedModules.add(moduleId)\n }\n\n // We've arrived at the runtime of the chunk, which means that nothing\n // else above can accept this update.\n if (moduleId === undefined) {\n if (autoAcceptRootModules) {\n return {\n type: 'accepted',\n moduleId,\n outdatedModules,\n outdatedDependencies,\n }\n }\n return {\n type: 'unaccepted',\n dependencyChain,\n }\n }\n\n const module = devModuleCache.get(moduleId)\n const hotState = moduleHotState.get(module)!\n\n if (\n // The module is not in the cache. Since this is a \"modified\" update,\n // it means that the module was never instantiated before.\n !module || // The module accepted itself without invalidating globalThis.\n // TODO is that right?\n (hotState.selfAccepted && !hotState.selfInvalidated)\n ) {\n continue\n }\n\n if (hotState.selfDeclined) {\n return {\n type: 'self-declined',\n dependencyChain,\n moduleId,\n }\n }\n\n if (runtimeModules.has(moduleId)) {\n if (autoAcceptRootModules) {\n continue\n }\n queue.push({\n moduleId: undefined,\n dependencyChain: [...dependencyChain, moduleId],\n })\n continue\n }\n\n for (const parentId of module.parents) {\n const parent = devModuleCache.get(parentId)\n\n if (!parent) {\n continue\n }\n\n const parentHotState = moduleHotState.get(parent)\n\n // Check if parent declined this dependency\n if (parentHotState?.declinedDependencies[moduleId]) {\n return {\n type: 'declined',\n dependencyChain: [...dependencyChain, moduleId],\n moduleId,\n parentId,\n }\n }\n\n // Skip if parent is already outdated\n if (outdatedModules.has(parentId)) {\n continue\n }\n\n // Check if parent accepts this dependency\n if (parentHotState?.acceptedDependencies[moduleId]) {\n if (!outdatedDependencies.has(parentId)) {\n outdatedDependencies.set(parentId, new Set())\n }\n outdatedDependencies.get(parentId)!.add(moduleId)\n continue\n }\n\n // Neither accepted nor declined — propagate to parent\n queue.push({\n moduleId: parentId,\n dependencyChain: [...dependencyChain, moduleId],\n })\n }\n\n // If no parents and we're at a root module, auto-accept if configured\n if (module.parents.length === 0 && autoAcceptRootModules) {\n continue\n }\n }\n\n return {\n type: 'accepted',\n moduleId,\n outdatedModules,\n outdatedDependencies,\n }\n}\n\n/**\n * Merges source dependency map into target dependency map.\n */\nfunction mergeDependencies(\n target: Map<ModuleId, Set<ModuleId>>,\n source: Map<ModuleId, Set<ModuleId>>\n): void {\n for (const [parentId, deps] of source) {\n const existing = target.get(parentId)\n if (existing) {\n for (const dep of deps) {\n existing.add(dep)\n }\n } else {\n target.set(parentId, new Set(deps))\n }\n }\n}\n\n/**\n * Computes all modules that need to be invalidated based on which modules changed.\n *\n * @param invalidated - The modules that have been invalidated\n * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept()\n */\nfunction computedInvalidatedModules(\n invalidated: Iterable<ModuleId>,\n autoAcceptRootModules: boolean\n): {\n outdatedModules: Set<ModuleId>\n outdatedDependencies: Map<ModuleId, Set<ModuleId>>\n} {\n const outdatedModules = new Set<ModuleId>()\n const outdatedDependencies = new Map<ModuleId, Set<ModuleId>>()\n\n for (const moduleId of invalidated) {\n const effect = getAffectedModuleEffects(moduleId, autoAcceptRootModules)\n\n switch (effect.type) {\n case 'unaccepted':\n throw new UpdateApplyError(\n `cannot apply update: unaccepted module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'self-declined':\n throw new UpdateApplyError(\n `cannot apply update: self-declined module. ${formatDependencyChain(\n effect.dependencyChain\n )}.`,\n effect.dependencyChain\n )\n case 'declined':\n throw new UpdateApplyError(\n `cannot apply update: declined dependency. ${formatDependencyChain(\n effect.dependencyChain\n )}. Declined by ${effect.parentId}.`,\n effect.dependencyChain\n )\n case 'accepted':\n for (const outdatedModuleId of effect.outdatedModules) {\n outdatedModules.add(outdatedModuleId)\n }\n mergeDependencies(outdatedDependencies, effect.outdatedDependencies)\n break\n default:\n invariant(effect, (effect) => `Unknown effect type: ${effect?.type}`)\n }\n }\n\n return { outdatedModules, outdatedDependencies }\n}\n\n/**\n * Creates the module.hot API object and its internal state.\n * This provides the HMR API that user code calls (module.hot.accept(), etc.)\n */\n\nfunction createModuleHot(\n moduleId: ModuleId,\n hotData: HotData\n): { hot: Hot; hotState: HotState } {\n const hotState: HotState = {\n selfAccepted: false,\n selfDeclined: false,\n selfInvalidated: false,\n disposeHandlers: [],\n acceptedDependencies: {},\n acceptedErrorHandlers: {},\n declinedDependencies: {},\n }\n\n const hot: Hot = {\n // TODO(alexkirsz) This is not defined in the HMR API. It was used to\n // decide whether to warn whenever an HMR-disposed module required other\n // modules. We might want to remove it.\n active: true,\n\n data: hotData ?? {},\n\n accept: (\n modules?: string | string[] | AcceptErrorHandler,\n callback?: AcceptCallback,\n errorHandler?: AcceptErrorHandler\n ) => {\n if (modules === undefined) {\n hotState.selfAccepted = true\n } else if (typeof modules === 'function') {\n hotState.selfAccepted = modules\n } else if (typeof modules === 'object' && modules !== null) {\n for (let i = 0; i < modules.length; i++) {\n hotState.acceptedDependencies[modules[i]] = callback || function () {}\n hotState.acceptedErrorHandlers[modules[i]] = errorHandler\n }\n } else {\n hotState.acceptedDependencies[modules] = callback || function () {}\n hotState.acceptedErrorHandlers[modules] = errorHandler\n }\n },\n\n decline: (dep?: string | string[]) => {\n if (dep === undefined) {\n hotState.selfDeclined = true\n } else if (typeof dep === 'object' && dep !== null) {\n for (let i = 0; i < dep.length; i++) {\n hotState.declinedDependencies[dep[i]] = true\n }\n } else {\n hotState.declinedDependencies[dep] = true\n }\n },\n\n dispose: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n addDisposeHandler: (callback) => {\n hotState.disposeHandlers.push(callback)\n },\n\n removeDisposeHandler: (callback) => {\n const idx = hotState.disposeHandlers.indexOf(callback)\n if (idx >= 0) {\n hotState.disposeHandlers.splice(idx, 1)\n }\n },\n\n invalidate: () => {\n hotState.selfInvalidated = true\n queuedInvalidatedModules.add(moduleId)\n },\n\n // NOTE(alexkirsz) This is part of the management API, which we don't\n // implement, but the Next.js React Refresh runtime uses this to decide\n // whether to schedule an update.\n status: () => 'idle',\n\n // NOTE(alexkirsz) Since we always return \"idle\" for now, these are no-ops.\n addStatusHandler: (_handler) => {},\n removeStatusHandler: (_handler) => {},\n\n // NOTE(jridgewell) Check returns the list of updated modules, but we don't\n // want the webpack code paths to ever update (the turbopack paths handle\n // this already).\n check: () => Promise.resolve(null),\n }\n\n return { hot, hotState }\n}\n\n/**\n * Processes queued invalidated modules and adds them to the outdated modules set.\n * Modules that call module.hot.invalidate() are queued and processed here.\n *\n * @param outdatedModules - The current set of outdated modules\n * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept()\n */\nfunction applyInvalidatedModules(\n outdatedModules: Set<ModuleId>,\n outdatedDependencies: Map<ModuleId, Set<ModuleId>>,\n autoAcceptRootModules: boolean\n): {\n outdatedModules: Set<ModuleId>\n outdatedDependencies: Map<ModuleId, Set<ModuleId>>\n} {\n if (queuedInvalidatedModules.size > 0) {\n const result = computedInvalidatedModules(\n queuedInvalidatedModules,\n autoAcceptRootModules\n )\n for (const moduleId of result.outdatedModules) {\n outdatedModules.add(moduleId)\n }\n mergeDependencies(outdatedDependencies, result.outdatedDependencies)\n\n queuedInvalidatedModules.clear()\n }\n\n return { outdatedModules, outdatedDependencies }\n}\n\n/**\n * Computes which outdated modules have self-accepted and can be hot reloaded.\n */\n\nfunction computeOutdatedSelfAcceptedModules(\n outdatedModules: Iterable<ModuleId>\n): { moduleId: ModuleId; errorHandler: true | Function }[] {\n const outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[] = []\n for (const moduleId of outdatedModules) {\n const module = devModuleCache.get(moduleId)\n const hotState = moduleHotState.get(module)\n if (module && hotState?.selfAccepted && !hotState.selfInvalidated) {\n outdatedSelfAcceptedModules.push({\n moduleId,\n errorHandler: hotState.selfAccepted,\n })\n }\n }\n return outdatedSelfAcceptedModules\n}\n\n/**\n * Disposes of an instance of a module.\n * Runs hot.dispose handlers and manages persistent hot data.\n *\n * NOTE: mode = \"replace\" will not remove modules from devModuleCache.\n * This must be done in a separate step afterwards.\n */\nfunction disposeModule(moduleId: ModuleId, mode: 'clear' | 'replace') {\n const module = devModuleCache.get(moduleId)\n if (!module) {\n return\n }\n\n const hotState = moduleHotState.get(module)\n if (!hotState) {\n return\n }\n\n const data: HotData = {}\n\n // Run the `hot.dispose` handler, if any, passing in the persistent\n // `hot.data` object.\n for (const disposeHandler of hotState.disposeHandlers) {\n disposeHandler(data)\n }\n\n // This used to warn in `getOrInstantiateModuleFromParent` when a disposed\n // module is still importing other modules.\n if (module.hot) {\n module.hot.active = false\n }\n\n moduleHotState.delete(module)\n\n // Remove the disposed module from its children's parent list.\n // It will be added back once the module re-instantiates and imports its\n // children again.\n for (const childId of module.children) {\n const child = devModuleCache.get(childId)\n if (!child) {\n continue\n }\n\n const idx = child.parents.indexOf(module.id)\n if (idx >= 0) {\n child.parents.splice(idx, 1)\n }\n }\n\n switch (mode) {\n case 'clear':\n devModuleCache.delete(module.id)\n moduleHotData.delete(module.id)\n break\n case 'replace':\n moduleHotData.set(module.id, data)\n break\n default:\n invariant(mode, (mode) => `invalid mode: ${mode}`)\n }\n}\n\n/**\n * Dispose phase: runs dispose handlers and cleans up outdated/disposed modules.\n * Returns the parent modules of outdated modules for use in the apply phase.\n */\n\nfunction disposePhase(\n outdatedModules: Iterable<ModuleId>,\n disposedModules: Iterable<ModuleId>,\n outdatedDependencies: Map<ModuleId, Set<ModuleId>>\n): { outdatedModuleParents: Map<ModuleId, Array<ModuleId>> } {\n for (const moduleId of outdatedModules) {\n disposeModule(moduleId, 'replace')\n }\n\n for (const moduleId of disposedModules) {\n disposeModule(moduleId, 'clear')\n }\n\n // Removing modules from the module cache is a separate step.\n // We also want to keep track of previous parents of the outdated modules.\n const outdatedModuleParents = new Map<ModuleId, Array<ModuleId>>()\n for (const moduleId of outdatedModules) {\n const oldModule = devModuleCache.get(moduleId)\n outdatedModuleParents.set(moduleId, oldModule?.parents)\n devModuleCache.delete(moduleId)\n }\n\n // Remove outdated dependencies from parent module's children list.\n // When a parent accepts a child's update, the child is re-instantiated\n // but the parent stays alive. We remove the old child reference so it\n // gets re-added when the child re-imports.\n for (const [parentId, deps] of outdatedDependencies) {\n const module = devModuleCache.get(parentId)\n if (module) {\n for (const dep of deps) {\n const idx = module.children.indexOf(dep)\n if (idx >= 0) {\n module.children.splice(idx, 1)\n }\n }\n }\n }\n\n return { outdatedModuleParents }\n}\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/**\n * Shared module instantiation logic.\n * This handles the full module instantiation flow for both browser and Node.js.\n * Only React Refresh hooks differ between platforms (passed as callback).\n */\nfunction instantiateModuleShared(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData,\n moduleFactories: ModuleFactories,\n devModuleCache: ModuleCache<HotModule>,\n runtimeModules: Set<ModuleId>,\n createModuleObjectFn: (id: ModuleId) => HotModule,\n createContextFn: (module: HotModule, exports: Exports, refresh?: any) => any,\n runModuleExecutionHooksFn: (\n module: HotModule,\n exec: (refresh: any) => void\n ) => void\n): HotModule {\n // 1. Factory validation (same in both browser and Node.js)\n const id = moduleId\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n throw new Error(\n factoryNotAvailableMessage(moduleId, sourceType, sourceData) +\n `\\nThis is often caused by a stale browser cache, misconfigured Cache-Control headers, or a service worker serving outdated responses.` +\n `\\nTo fix this, make sure your Cache-Control headers allow revalidation of chunks and review your service worker configuration. ` +\n `As an immediate workaround, try hard-reloading the page, clearing the browser cache, or unregistering any service workers.`\n )\n }\n\n // 2. Hot API setup (same in both - works for browser, included for Node.js)\n const hotData = moduleHotData.get(id)!\n const { hot, hotState } = createModuleHot(id, hotData)\n\n // 3. Parent assignment logic (same in both)\n let parents: ModuleId[]\n switch (sourceType) {\n case SourceType.Runtime:\n runtimeModules.add(id)\n parents = []\n break\n case SourceType.Parent:\n parents = [sourceData as ModuleId]\n break\n case SourceType.Update:\n parents = (sourceData as ModuleId[]) || []\n break\n default:\n throw new Error(`Unknown source type: ${sourceType}`)\n }\n\n // 4. Module creation (platform creates base module object)\n const module = createModuleObjectFn(id)\n const exports = module.exports\n module.parents = parents\n module.children = []\n module.hot = hot\n\n devModuleCache.set(id, module)\n moduleHotState.set(module, hotState)\n\n // 5. Module execution (React Refresh hooks are platform-specific)\n try {\n runModuleExecutionHooksFn(module, (refresh) => {\n const context = createContextFn(module, exports, refresh)\n moduleFactory.call(exports, context, module, exports)\n })\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n // 6. ESM interop (same in both)\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\n/**\n * Analyzes update entries and chunks to determine which modules were added, modified, or deleted.\n * This is pure logic that doesn't depend on the runtime environment.\n */\nfunction computeChangedModules(\n entries: Record<ModuleId, EcmascriptModuleEntry>,\n updates: Record<ChunkPath, EcmascriptMergedChunkUpdate>,\n chunkModulesMap?: Map<ChunkPath, Set<ModuleId>>\n): {\n added: Map<ModuleId, EcmascriptModuleEntry | undefined>\n modified: Map<ModuleId, EcmascriptModuleEntry>\n deleted: Set<ModuleId>\n chunksAdded: Map<ChunkPath, Set<ModuleId>>\n chunksDeleted: Map<ChunkPath, Set<ModuleId>>\n} {\n const chunksAdded = new Map()\n const chunksDeleted = new Map()\n const added: Map<ModuleId, EcmascriptModuleEntry> = new Map()\n const modified = new Map()\n const deleted: Set<ModuleId> = new Set()\n\n for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates) as Array<\n [ChunkPath, EcmascriptMergedChunkUpdate]\n >) {\n switch (mergedChunkUpdate.type) {\n case 'added': {\n const updateAdded = new Set(mergedChunkUpdate.modules)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n chunksAdded.set(chunkPath, updateAdded)\n break\n }\n case 'deleted': {\n const updateDeleted = chunkModulesMap\n ? new Set(chunkModulesMap.get(chunkPath))\n : new Set<ModuleId>()\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n case 'partial': {\n const updateAdded = new Set(mergedChunkUpdate.added)\n const updateDeleted = new Set(mergedChunkUpdate.deleted)\n for (const moduleId of updateAdded) {\n added.set(moduleId, entries[moduleId])\n }\n for (const moduleId of updateDeleted) {\n deleted.add(moduleId)\n }\n chunksAdded.set(chunkPath, updateAdded)\n chunksDeleted.set(chunkPath, updateDeleted)\n break\n }\n default:\n throw new Error('Unknown merged chunk update type')\n }\n }\n\n // If a module was added from one chunk and deleted from another in the same update,\n // consider it to be modified, as it means the module was moved from one chunk to another\n // AND has new code in a single update.\n for (const moduleId of added.keys()) {\n if (deleted.has(moduleId)) {\n added.delete(moduleId)\n deleted.delete(moduleId)\n }\n }\n\n for (const [moduleId, entry] of Object.entries(entries)) {\n // Modules that haven't been added to any chunk but have new code are considered\n // to be modified.\n // This needs to be under the previous loop, as we need it to get rid of modules\n // that were added and deleted in the same update.\n if (!added.has(moduleId)) {\n modified.set(moduleId, entry)\n }\n }\n\n return { added, deleted, modified, chunksAdded, chunksDeleted }\n}\n\n/**\n * Compiles new module code and walks the dependency tree to find all outdated modules.\n * Uses the evalModuleEntry function to compile code (platform-specific).\n *\n * @param added - Map of added modules\n * @param modified - Map of modified modules\n * @param evalModuleEntry - Function to compile module code\n * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept()\n */\nfunction computeOutdatedModules(\n added: Map<ModuleId, EcmascriptModuleEntry | undefined>,\n modified: Map<ModuleId, EcmascriptModuleEntry>,\n evalModuleEntry: (entry: EcmascriptModuleEntry) => HotModuleFactoryFunction,\n autoAcceptRootModules: boolean\n): {\n outdatedModules: Set<ModuleId>\n outdatedDependencies: Map<ModuleId, Set<ModuleId>>\n newModuleFactories: Map<ModuleId, HotModuleFactoryFunction>\n} {\n const newModuleFactories = new Map<ModuleId, HotModuleFactoryFunction>()\n\n // Compile added modules\n for (const [moduleId, entry] of added) {\n if (entry != null) {\n newModuleFactories.set(moduleId, evalModuleEntry(entry))\n }\n }\n\n // Walk dependency tree to find all modules affected by modifications\n const { outdatedModules, outdatedDependencies } = computedInvalidatedModules(\n modified.keys(),\n autoAcceptRootModules\n )\n\n // Compile modified modules\n for (const [moduleId, entry] of modified) {\n newModuleFactories.set(moduleId, evalModuleEntry(entry))\n }\n\n return { outdatedModules, outdatedDependencies, newModuleFactories }\n}\n\n/**\n * Updates module factories and re-instantiates self-accepted modules.\n * Uses the instantiateModule function (platform-specific via callback).\n */\nfunction applyPhase(\n outdatedSelfAcceptedModules: {\n moduleId: ModuleId\n errorHandler: true | Function\n }[],\n newModuleFactories: Map<ModuleId, HotModuleFactoryFunction>,\n outdatedModuleParents: Map<ModuleId, Array<ModuleId>>,\n outdatedDependencies: Map<ModuleId, Set<ModuleId>>,\n moduleFactories: ModuleFactories,\n devModuleCache: ModuleCache<HotModule>,\n instantiateModuleFn: (\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n ) => HotModule,\n applyModuleFactoryNameFn: (factory: HotModuleFactoryFunction) => void,\n reportError: (err: any) => void\n) {\n // Update module factories\n for (const [moduleId, factory] of newModuleFactories.entries()) {\n applyModuleFactoryNameFn(factory)\n moduleFactories.set(moduleId, factory)\n }\n\n // TODO(alexkirsz) Run new runtime entries here.\n\n // Call accept handlers for outdated dependencies.\n // This runs BEFORE re-instantiating self-accepted modules, matching\n // webpack's behavior.\n for (const [parentId, deps] of outdatedDependencies) {\n const module = devModuleCache.get(parentId)\n if (!module) continue\n\n const hotState = moduleHotState.get(module)\n if (!hotState) continue\n\n // Group deps by callback, deduplicating callbacks that handle multiple deps.\n // Each callback receives only the deps it was registered for.\n const callbackDeps = new Map<AcceptCallback | (() => void), ModuleId[]>()\n const callbackErrorHandlers = new Map<\n AcceptCallback | (() => void),\n AcceptErrorHandler | undefined\n >()\n\n for (const dep of deps) {\n const acceptCallback = hotState.acceptedDependencies[dep]\n if (acceptCallback) {\n let depList = callbackDeps.get(acceptCallback)\n if (!depList) {\n depList = []\n callbackDeps.set(acceptCallback, depList)\n callbackErrorHandlers.set(\n acceptCallback,\n hotState.acceptedErrorHandlers[dep]\n )\n }\n depList.push(dep)\n }\n }\n\n for (const [callback, cbDeps] of callbackDeps) {\n try {\n callback.call(null, cbDeps)\n } catch (err: any) {\n const errorHandler = callbackErrorHandlers.get(callback)\n if (typeof errorHandler === 'function') {\n try {\n errorHandler(err, {\n moduleId: parentId,\n dependencyId: cbDeps[0],\n })\n } catch (err2) {\n reportError(err2)\n reportError(err)\n }\n } else {\n reportError(err)\n }\n }\n }\n }\n\n // Re-instantiate all outdated self-accepted modules\n for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules) {\n try {\n instantiateModuleFn(\n moduleId,\n SourceType.Update,\n outdatedModuleParents.get(moduleId)\n )\n } catch (err) {\n if (typeof errorHandler === 'function') {\n try {\n errorHandler(err, { moduleId, module: devModuleCache.get(moduleId) })\n } catch (err2) {\n reportError(err2)\n reportError(err)\n }\n } else {\n reportError(err)\n }\n }\n }\n}\n\n/**\n * Internal implementation that orchestrates the full HMR update flow:\n * invalidation, disposal, and application of new modules.\n *\n * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept()\n */\nfunction applyInternal(\n outdatedModules: Set<ModuleId>,\n outdatedDependencies: Map<ModuleId, Set<ModuleId>>,\n disposedModules: Iterable<ModuleId>,\n newModuleFactories: Map<ModuleId, HotModuleFactoryFunction>,\n moduleFactories: ModuleFactories,\n devModuleCache: ModuleCache<HotModule>,\n instantiateModuleFn: (\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n ) => HotModule,\n applyModuleFactoryNameFn: (factory: HotModuleFactoryFunction) => void,\n autoAcceptRootModules: boolean\n) {\n ;({ outdatedModules, outdatedDependencies } = applyInvalidatedModules(\n outdatedModules,\n outdatedDependencies,\n autoAcceptRootModules\n ))\n\n // Find self-accepted modules to re-instantiate\n const outdatedSelfAcceptedModules =\n computeOutdatedSelfAcceptedModules(outdatedModules)\n\n // Run dispose handlers, save hot.data, clear caches\n const { outdatedModuleParents } = disposePhase(\n outdatedModules,\n disposedModules,\n outdatedDependencies\n )\n\n let error: any\n\n function reportError(err: any) {\n if (!error) error = err // Keep first error\n }\n\n applyPhase(\n outdatedSelfAcceptedModules,\n newModuleFactories,\n outdatedModuleParents,\n outdatedDependencies,\n moduleFactories,\n devModuleCache,\n instantiateModuleFn,\n applyModuleFactoryNameFn,\n reportError\n )\n\n if (error) {\n throw error\n }\n\n // Recursively apply any queued invalidations from new module execution\n if (queuedInvalidatedModules.size > 0) {\n applyInternal(\n new Set(),\n new Map(),\n [],\n new Map(),\n moduleFactories,\n devModuleCache,\n instantiateModuleFn,\n applyModuleFactoryNameFn,\n autoAcceptRootModules\n )\n }\n}\n\n/**\n * Main entry point for applying an ECMAScript merged update.\n * This is called by both browser and Node.js runtimes with platform-specific callbacks.\n *\n * @param options.autoAcceptRootModules - If true, root modules auto-accept updates without explicit\n * module.hot.accept(). Used for server-side HMR where pages\n * auto-accept at the top level.\n */\nfunction applyEcmascriptMergedUpdateShared(options: {\n added: Map<ModuleId, EcmascriptModuleEntry | undefined>\n modified: Map<ModuleId, EcmascriptModuleEntry>\n disposedModules: Iterable<ModuleId>\n evalModuleEntry: (entry: EcmascriptModuleEntry) => HotModuleFactoryFunction\n instantiateModule: (\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n ) => HotModule\n applyModuleFactoryName: (factory: HotModuleFactoryFunction) => void\n moduleFactories: ModuleFactories\n devModuleCache: ModuleCache<HotModule>\n autoAcceptRootModules: boolean\n}) {\n const {\n added,\n modified,\n disposedModules,\n evalModuleEntry,\n instantiateModule,\n applyModuleFactoryName,\n moduleFactories,\n devModuleCache,\n autoAcceptRootModules,\n } = options\n\n const { outdatedModules, outdatedDependencies, newModuleFactories } =\n computeOutdatedModules(\n added,\n modified,\n evalModuleEntry,\n autoAcceptRootModules\n )\n\n applyInternal(\n outdatedModules,\n outdatedDependencies,\n disposedModules,\n newModuleFactories,\n moduleFactories,\n devModuleCache,\n instantiateModule,\n applyModuleFactoryName,\n autoAcceptRootModules\n )\n}\n"],"names":["devModuleCache","runtimeModules","moduleHotData","Map","moduleHotState","WeakMap","queuedInvalidatedModules","Set","UpdateApplyError","Error","name","dependencyChain","message","trackModuleImport","parentModule","childModuleId","childModule","children","indexOf","push","parents","id","formatDependencyChain","join","getAffectedModuleEffects","moduleId","autoAcceptRootModules","outdatedModules","outdatedDependencies","queue","queueIndex","length","undefined","has","add","type","module","get","hotState","selfAccepted","selfInvalidated","selfDeclined","parentId","parent","parentHotState","declinedDependencies","acceptedDependencies","set","mergeDependencies","target","source","deps","existing","dep","computedInvalidatedModules","invalidated","effect","outdatedModuleId","invariant","createModuleHot","hotData","disposeHandlers","acceptedErrorHandlers","hot","active","data","accept","modules","callback","errorHandler","i","decline","dispose","addDisposeHandler","removeDisposeHandler","idx","splice","invalidate","status","addStatusHandler","_handler","removeStatusHandler","check","Promise","resolve","applyInvalidatedModules","size","result","clear","computeOutdatedSelfAcceptedModules","outdatedSelfAcceptedModules","disposeModule","mode","disposeHandler","delete","childId","child","disposePhase","disposedModules","outdatedModuleParents","oldModule","instantiateModuleShared","sourceType","sourceData","moduleFactories","createModuleObjectFn","createContextFn","runModuleExecutionHooksFn","moduleFactory","factoryNotAvailableMessage","SourceType","Runtime","Parent","Update","exports","refresh","context","call","error","namespaceObject","interopEsm","computeChangedModules","entries","updates","chunkModulesMap","chunksAdded","chunksDeleted","added","modified","deleted","chunkPath","mergedChunkUpdate","Object","updateAdded","updateDeleted","keys","entry","computeOutdatedModules","evalModuleEntry","newModuleFactories","applyPhase","instantiateModuleFn","applyModuleFactoryNameFn","reportError","factory","callbackDeps","callbackErrorHandlers","acceptCallback","depList","cbDeps","err","dependencyId","err2","applyInternal","applyEcmascriptMergedUpdateShared","options","instantiateModule","applyModuleFactoryName"],"mappings":"AAAA,2CAA2C;AAC3C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C,uBACAvE,sBACA4E,iBACAxG,gBACA6I,qBACAC,0BACAC;IAGF,IAAIzB,OAAO;QACT,MAAMA;IACR;IAEA,uEAAuE;IACvE,IAAIhH,yBAAyBgF,IAAI,GAAG,GAAG;QACrCmE,cACE,IAAIlJ,OACJ,IAAIJ,OACJ,EAAE,EACF,IAAIA,OACJqG,iBACAxG,gBACA6I,qBACAC,0BACApH;IAEJ;AACF;AAEA;;;;;;;CAOC,GACD,SAASgI,kCAAkCC,OAc1C;IACC,MAAM,EACJ5B,KAAK,EACLC,QAAQ,EACR9B,eAAe,EACfwC,eAAe,EACfkB,iBAAiB,EACjBC,sBAAsB,EACtBrD,eAAe,EACfxG,cAAc,EACd0B,qBAAqB,EACtB,GAAGiI;IAEJ,MAAM,EAAEhI,eAAe,EAAEC,oBAAoB,EAAE+G,kBAAkB,EAAE,GACjEF,uBACEV,OACAC,UACAU,iBACAhH;IAGJ+H,cACE9H,iBACAC,sBACAsE,iBACAyC,oBACAnC,iBACAxG,gBACA4J,mBACAC,wBACAnI;AAEJ","ignoreList":[0]}},
{"offset": {"line": 1540, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime/dev-base.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// <reference path=\"./runtime-base.ts\" />\n/// <reference path=\"../../shared/runtime/dev-extensions.ts\" />\n/// <reference path=\"../../shared/runtime/hmr-runtime.ts\" />\n\n/**\n * Development Node.js runtime.\n * Uses HotModule and shared HMR logic for hot module replacement support.\n */\n\n// Cast the module cache to HotModule for development mode\n// (hmr-runtime.ts declares devModuleCache as `let` variable expecting assignment)\n// This is safe because HotModule extends Module\ndevModuleCache = moduleCache as ModuleCache<HotModule>\n\n// this is read in runtime-utils.ts so it creates a module with direction for hmr\ncreateModuleWithDirectionFlag = true\n\nif (!globalThis.__turbopack_runtime_modules__) {\n globalThis.__turbopack_runtime_modules__ = new Set()\n}\nruntimeModules = globalThis.__turbopack_runtime_modules__\n\ninterface TurbopackNodeDevBuildContext extends TurbopackBaseContext<HotModule> {\n R: ResolvePathFromModule\n x: ExternalRequire\n y: ExternalImport\n C: typeof clearChunkCache\n}\n\nconst nodeDevContextPrototype =\n Context.prototype as TurbopackNodeDevBuildContext\n\nnodeDevContextPrototype.q = exportUrl\nnodeDevContextPrototype.M = moduleFactories\nnodeDevContextPrototype.c = devModuleCache\nnodeDevContextPrototype.R = resolvePathFromModule\nnodeDevContextPrototype.C = clearChunkCache\n\nif (globalThis.__turbopack_ensure_chunk__ !== undefined) {\n const chunksBeingEnsured = new Map<ChunkPath, Promise<void>>()\n\n function loadChunkAsyncOnDemand<TModule extends Module>(\n this: TurbopackBaseContext<TModule>,\n chunkData: ChunkData\n ): Promise<void> {\n const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path\n const ensureChunk = globalThis.__turbopack_ensure_chunk__\n if (ensureChunk === undefined || chunkCache.has(chunkPath)) {\n return loadChunkAsync.call(this, chunkData)\n }\n\n const ensured =\n chunksBeingEnsured.get(chunkPath) ??\n Promise.resolve()\n .then(() => ensureChunk(chunkPath))\n .finally(() => chunksBeingEnsured.delete(chunkPath))\n chunksBeingEnsured.set(chunkPath, ensured)\n\n return ensured.then(() => loadChunkAsync.call(this, chunkData))\n }\n nodeDevContextPrototype.l = loadChunkAsyncOnDemand\n}\n\n/**\n * Instantiates a module in development mode using shared HMR logic.\n */\nfunction instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): HotModule {\n // Node.js: creates base module object (hot API added by shared code)\n const createModuleObjectFn = (moduleId: ModuleId) => {\n return createModuleWithDirection(moduleId) as HotModule\n }\n\n // Node.js: creates Context (no refresh parameter)\n const createContext = (\n module: HotModule,\n exports: Exports,\n _refresh?: any\n ) => {\n return new (Context as any as ContextConstructor<HotModule>)(\n module,\n exports\n )\n }\n\n // Node.js: no hooks wrapper, just execute directly\n const runWithHooks = (module: HotModule, exec: (refresh: any) => void) => {\n exec(undefined) // no refresh context\n }\n\n // Use shared instantiation logic (includes hot API setup)\n const newModule = instantiateModuleShared(\n id,\n sourceType,\n sourceData,\n moduleFactories,\n devModuleCache,\n runtimeModules,\n createModuleObjectFn,\n createContext,\n runWithHooks\n )\n\n // Node.js-specific: mark module as loaded\n ;(newModule as any).loaded = true\n\n return newModule\n}\n\n/**\n * Instantiates a runtime module in development mode.\n */\nfunction instantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): HotModule {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.\n */\n// @ts-ignore TypeScript doesn't separate this module space from the browser runtime\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): HotModule {\n const module = devModuleCache.get(moduleId)\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n return instantiateRuntimeModule(chunkPath, moduleId)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n * Also tracks parent-child relationships for HMR dependency tracking.\n */\n// @ts-ignore\nfunction getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: HotModule\n): HotModule {\n // Track parent-child relationship\n const module = devModuleCache.get(id)\n trackModuleImport(sourceModule, id, module)\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n return module\n }\n\n const newModule = instantiateModule(id, SourceType.Parent, sourceModule.id)\n\n // Track again after instantiation to ensure the relationship is recorded\n trackModuleImport(sourceModule, id, newModule)\n\n return newModule\n}\n\nmodule.exports = (sourcePath: ChunkPath) => ({\n m: (id: ModuleId) => getOrInstantiateRuntimeModule(sourcePath, id),\n c: (chunkData: ChunkData) => loadRuntimeChunk(sourcePath, chunkData),\n})\n"],"names":["devModuleCache","moduleCache","createModuleWithDirectionFlag","globalThis","__turbopack_runtime_modules__","Set","runtimeModules","nodeDevContextPrototype","Context","prototype","q","exportUrl","M","moduleFactories","c","R","resolvePathFromModule","C","clearChunkCache","__turbopack_ensure_chunk__","undefined","chunksBeingEnsured","Map","loadChunkAsyncOnDemand","chunkData","chunkPath","path","ensureChunk","chunkCache","has","loadChunkAsync","call","ensured","get","Promise","resolve","then","finally","delete","set","l","instantiateModule","id","sourceType","sourceData","createModuleObjectFn","moduleId","createModuleWithDirection","createContext","module1","exports","_refresh","runWithHooks","exec","newModule","instantiateModuleShared","loaded","instantiateRuntimeModule","SourceType","Runtime","getOrInstantiateRuntimeModule","error","getOrInstantiateModuleFromParent","sourceModule","trackModuleImport","Parent","module","sourcePath","m","loadRuntimeChunk"],"mappings":"AAAA,oDAAoD,GAEpD,0CAA0C;AAC1C,+DAA+D;AAC/D,4DAA4D;AAE5D;;;CAGC,GAED,0DAA0D;AAC1D,kFAAkF;AAClF,gDAAgD;AAChDA,iBAAiBC;AAEjB,iFAAiF;AACjFC,gCAAgC;AAEhC,IAAI,CAACC,WAAWC,6BAA6B,EAAE;IAC7CD,WAAWC,6BAA6B,GAAG,IAAIC;AACjD;AACAC,iBAAiBH,WAAWC,6BAA6B;AASzD,MAAMG,0BACJC,QAAQC,SAAS;AAEnBF,wBAAwBG,CAAC,GAAGC;AAC5BJ,wBAAwBK,CAAC,GAAGC;AAC5BN,wBAAwBO,CAAC,GAAGd;AAC5BO,wBAAwBQ,CAAC,GAAGC;AAC5BT,wBAAwBU,CAAC,GAAGC;AAE5B,IAAIf,WAAWgB,0BAA0B,KAAKC,WAAW;IACvD,MAAMC,qBAAqB,IAAIC;IAE/B,SAASC,uBAEPC,SAAoB;QAEpB,MAAMC,YAAY,OAAOD,cAAc,WAAWA,YAAYA,UAAUE,IAAI;QAC5E,MAAMC,cAAcxB,WAAWgB,0BAA0B;QACzD,IAAIQ,gBAAgBP,aAAaQ,WAAWC,GAAG,CAACJ,YAAY;YAC1D,OAAOK,eAAeC,IAAI,CAAC,IAAI,EAAEP;QACnC;QAEA,MAAMQ,UACJX,mBAAmBY,GAAG,CAACR,cACvBS,QAAQC,OAAO,GACZC,IAAI,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,SAAQ;QACV,IAAIA,QAAOY,KAAK,EAAE;YAChB,MAAMZ,QAAOY,KAAK;QACpB;QAEA,OAAOZ;IACT;IAEA,MAAMK,YAAYb,kBAAkBC,IAAIgB,WAAWO,MAAM,EAAEF,aAAarB,EAAE;IAE1E,yEAAyE;IACzEsB,kBAAkBD,cAAcrB,IAAIY;IAEpC,OAAOA;AACT;AAEAY,OAAOhB,OAAO,GAAG,CAACiB,aAA0B,CAAC;QAC3CC,GAAG,CAAC1B,KAAiBkB,8BAA8BO,YAAYzB;QAC/D5B,GAAG,CAACU,YAAyB6C,iBAAiBF,YAAY3C;IAC5D,CAAC","ignoreList":[0]}},
{"offset": {"line": 1540, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime/dev-base.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// <reference path=\"./runtime-base.ts\" />\n/// <reference path=\"../../shared/runtime/dev-extensions.ts\" />\n/// <reference path=\"../../shared/runtime/hmr-runtime.ts\" />\n\n/**\n * Development Node.js runtime.\n * Uses HotModule and shared HMR logic for hot module replacement support.\n */\n\n// Cast the module cache to HotModule for development mode\n// (hmr-runtime.ts declares devModuleCache as `let` variable expecting assignment)\n// This is safe because HotModule extends Module\ndevModuleCache = moduleCache as ModuleCache<HotModule>\n\n// this is read in runtime-utils.ts so it creates a module with direction for hmr\ncreateModuleWithDirectionFlag = true\n\nif (!globalThis.__turbopack_runtime_modules__) {\n globalThis.__turbopack_runtime_modules__ = new Set()\n}\nruntimeModules = globalThis.__turbopack_runtime_modules__\n\ninterface TurbopackNodeDevBuildContext extends TurbopackBaseContext<HotModule> {\n R: ResolvePathFromModule\n x: ExternalRequire\n y: ExternalImport\n C: typeof clearChunkCache\n}\n\nconst nodeDevContextPrototype =\n Context.prototype as TurbopackNodeDevBuildContext\n\nnodeDevContextPrototype.q = exportUrl\nnodeDevContextPrototype.M = moduleFactories\nnodeDevContextPrototype.c = devModuleCache\nnodeDevContextPrototype.R = resolvePathFromModule\nnodeDevContextPrototype.C = clearChunkCache\n\nif (globalThis.__turbopack_ensure_chunk__ !== undefined) {\n const chunksBeingEnsured = new Map<ChunkPath, Promise<void>>()\n\n function loadChunkAsyncOnDemand<TModule extends Module>(\n this: TurbopackBaseContext<TModule>,\n chunkData: ChunkData\n ): Promise<void> {\n const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path\n const ensureChunk = globalThis.__turbopack_ensure_chunk__\n if (ensureChunk === undefined || chunkCache.has(chunkPath)) {\n return loadChunkAsync.call(this, chunkData)\n }\n\n const ensured =\n chunksBeingEnsured.get(chunkPath) ??\n Promise.resolve()\n .then(() => ensureChunk(chunkPath))\n .finally(() => chunksBeingEnsured.delete(chunkPath))\n chunksBeingEnsured.set(chunkPath, ensured)\n\n return ensured.then(() => loadChunkAsync.call(this, chunkData))\n }\n nodeDevContextPrototype.l = loadChunkAsyncOnDemand\n}\n\n/**\n * Instantiates a module in development mode using shared HMR logic.\n */\nfunction instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): HotModule {\n // Node.js: creates base module object (hot API added by shared code)\n const createModuleObjectFn = (moduleId: ModuleId) => {\n return createModuleWithDirection(moduleId) as HotModule\n }\n\n // Node.js: creates Context (no refresh parameter)\n const createContext = (\n module: HotModule,\n exports: Exports,\n _refresh?: any\n ) => {\n return new (Context as any as ContextConstructor<HotModule>)(\n module,\n exports\n )\n }\n\n // Node.js: no hooks wrapper, just execute directly\n const runWithHooks = (_module: HotModule, exec: (refresh: any) => void) => {\n exec(undefined) // no refresh context\n }\n\n // Use shared instantiation logic (includes hot API setup)\n const newModule = instantiateModuleShared(\n id,\n sourceType,\n sourceData,\n moduleFactories,\n devModuleCache,\n runtimeModules,\n createModuleObjectFn,\n createContext,\n runWithHooks\n )\n\n // Node.js-specific: mark module as loaded\n ;(newModule as any).loaded = true\n\n return newModule\n}\n\n/**\n * Instantiates a runtime module in development mode.\n */\nfunction instantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): HotModule {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.\n */\n// @ts-ignore TypeScript doesn't separate this module space from the browser runtime\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): HotModule {\n const module = devModuleCache.get(moduleId)\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n return instantiateRuntimeModule(chunkPath, moduleId)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n * Also tracks parent-child relationships for HMR dependency tracking.\n */\n// @ts-ignore\nfunction getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: HotModule\n): HotModule {\n // Track parent-child relationship\n const module = devModuleCache.get(id)\n trackModuleImport(sourceModule, id, module)\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n return module\n }\n\n const newModule = instantiateModule(id, SourceType.Parent, sourceModule.id)\n\n // Track again after instantiation to ensure the relationship is recorded\n trackModuleImport(sourceModule, id, newModule)\n\n return newModule\n}\n\nmodule.exports = (sourcePath: ChunkPath) => ({\n m: (id: ModuleId) => getOrInstantiateRuntimeModule(sourcePath, id),\n c: (chunkData: ChunkData) => loadRuntimeChunk(sourcePath, chunkData),\n})\n"],"names":["devModuleCache","moduleCache","createModuleWithDirectionFlag","globalThis","__turbopack_runtime_modules__","Set","runtimeModules","nodeDevContextPrototype","Context","prototype","q","exportUrl","M","moduleFactories","c","R","resolvePathFromModule","C","clearChunkCache","__turbopack_ensure_chunk__","undefined","chunksBeingEnsured","Map","loadChunkAsyncOnDemand","chunkData","chunkPath","path","ensureChunk","chunkCache","has","loadChunkAsync","call","ensured","get","Promise","resolve","then","finally","delete","set","l","instantiateModule","id","sourceType","sourceData","createModuleObjectFn","moduleId","createModuleWithDirection","createContext","module1","exports","_refresh","runWithHooks","_module","exec","newModule","instantiateModuleShared","loaded","instantiateRuntimeModule","SourceType","Runtime","getOrInstantiateRuntimeModule","error","getOrInstantiateModuleFromParent","sourceModule","trackModuleImport","Parent","module","sourcePath","m","loadRuntimeChunk"],"mappings":"AAAA,oDAAoD,GAEpD,0CAA0C;AAC1C,+DAA+D;AAC/D,4DAA4D;AAE5D;;;CAGC,GAED,0DAA0D;AAC1D,kFAAkF;AAClF,gDAAgD;AAChDA,iBAAiBC;AAEjB,iFAAiF;AACjFC,gCAAgC;AAEhC,IAAI,CAACC,WAAWC,6BAA6B,EAAE;IAC7CD,WAAWC,6BAA6B,GAAG,IAAIC;AACjD;AACAC,iBAAiBH,WAAWC,6BAA6B;AASzD,MAAMG,0BACJC,QAAQC,SAAS;AAEnBF,wBAAwBG,CAAC,GAAGC;AAC5BJ,wBAAwBK,CAAC,GAAGC;AAC5BN,wBAAwBO,CAAC,GAAGd;AAC5BO,wBAAwBQ,CAAC,GAAGC;AAC5BT,wBAAwBU,CAAC,GAAGC;AAE5B,IAAIf,WAAWgB,0BAA0B,KAAKC,WAAW;IACvD,MAAMC,qBAAqB,IAAIC;IAE/B,SAASC,uBAEPC,SAAoB;QAEpB,MAAMC,YAAY,OAAOD,cAAc,WAAWA,YAAYA,UAAUE,IAAI;QAC5E,MAAMC,cAAcxB,WAAWgB,0BAA0B;QACzD,IAAIQ,gBAAgBP,aAAaQ,WAAWC,GAAG,CAACJ,YAAY;YAC1D,OAAOK,eAAeC,IAAI,CAAC,IAAI,EAAEP;QACnC;QAEA,MAAMQ,UACJX,mBAAmBY,GAAG,CAACR,cACvBS,QAAQC,OAAO,GACZC,IAAI,CAAC,IAAMT,YAAYF,YACvBY,OAAO,CAAC,IAAMhB,mBAAmBiB,MAAM,CAACb;QAC7CJ,mBAAmBkB,GAAG,CAACd,WAAWO;QAElC,OAAOA,QAAQI,IAAI,CAAC,IAAMN,eAAeC,IAAI,CAAC,IAAI,EAAEP;IACtD;IACAjB,wBAAwBiC,CAAC,GAAGjB;AAC9B;AAEA;;CAEC,GACD,SAAS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,CAACkB,aAA0B,CAAC;QAC3CC,GAAG,CAAC3B,KAAiBmB,8BAA8BO,YAAY1B;QAC/D5B,GAAG,CAACU,YAAyB8C,iBAAiBF,YAAY5C;IAC5D,CAAC","ignoreList":[0]}},
{"offset": {"line": 1637, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/dev/hmr-client.ts"],"sourcesContent":["/// <reference path=\"../../shared/runtime/dev-protocol.d.ts\" />\n/// <reference path=\"../../shared/runtime/hmr-runtime.ts\" />\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\ntype NodeJsHmrPayload = {\n resource: {\n path: string\n headers?: Record<string, string>\n }\n issues: Issue[]\n type: 'partial'\n instruction: NodeJsEcmascriptMergedUpdate | NodeJsChunkListUpdate\n}\n\n/**\n * Appends the module code with //# sourceURL and //# sourceMappingURL so\n * that Node.js can resolve stack frames from `eval`ed server HMR modules back to\n * their original source files. Mirrors the browser's _eval in dev-backend-dom.ts.\n */\nfunction inlineSourcemaps(entry: EcmascriptModuleEntry): string {\n const [chunkPath, moduleId] = entry.url.split('?', 2)\n const absolutePath = path.resolve(RUNTIME_ROOT, chunkPath)\n const fileHref = url.pathToFileURL(absolutePath).href\n const sourceURL = moduleId ? `${fileHref}?${moduleId}` : fileHref\n let code = entry.code + '\\n\\n//# sourceURL=' + sourceURL\n if (entry.map) {\n code +=\n '\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,' +\n Buffer.from(entry.map).toString('base64')\n }\n return code\n}\n\nlet serverHmrUpdateHandler: ((msg: NodeJsHmrPayload) => void) | null = null\n\nfunction initializeServerHmr(\n moduleFactories: ModuleFactories,\n devModuleCache: ModuleCache<HotModule>\n): void {\n if (serverHmrUpdateHandler != null) {\n throw new Error('[Server HMR] Server HMR client is already initialized')\n }\n\n // Register the update handler for the server runtime\n serverHmrUpdateHandler = (msg: NodeJsHmrPayload) => {\n handleNodejsUpdate(msg, moduleFactories, devModuleCache)\n }\n}\n\n/**\n * Emits an HMR message to the registered update handler.\n * Node uses a simpler listener pattern than the browser's websocket connection.\n *\n * Note: This is only called via __turbopack_server_hmr_apply__ which ensures\n * the handler is initialized first via ensureHmrClientInitialized().\n */\nfunction emitMessage(msg: { type: string; data: any }): void {\n if (serverHmrUpdateHandler == null) {\n throw new Error(\n '[Server HMR] No update handler registered to receive message'\n )\n }\n\n serverHmrUpdateHandler(msg.data)\n}\n\n/**\n * Handles server message updates and applies them to the Node.js runtime.\n * Uses shared HMR update logic from hmr-runtime.ts.\n */\nfunction handleNodejsUpdate(\n msg: NodeJsHmrPayload,\n moduleFactories: ModuleFactories,\n devModuleCache: ModuleCache<HotModule>\n): void {\n if (msg.type !== 'partial') {\n return\n }\n\n const instruction = msg.instruction\n\n try {\n if (instruction.type === 'ChunkListUpdate') {\n // All node ecmascript chunks are mergeable, so a `total`/`partial` here\n // means a non-mergeable asset changed in an unsupported way. Escalate\n // to a full clear() rather than leave stale factories in memory.\n for (const [chunkPath, chunkUpdate] of Object.entries(\n instruction.chunks ?? {}\n )) {\n if (chunkUpdate.type === 'total' || chunkUpdate.type === 'partial') {\n throw new Error(\n `unsupported '${chunkUpdate.type}' update for chunk ${chunkPath}`\n )\n }\n }\n\n if (instruction.merged) {\n for (const merged of instruction.merged) {\n applyEcmascriptMergedUpdate(merged, moduleFactories, devModuleCache)\n }\n }\n return\n }\n\n if (instruction.type === 'EcmascriptMergedUpdate') {\n applyEcmascriptMergedUpdate(instruction, moduleFactories, devModuleCache)\n return\n }\n } catch (e) {\n console.error('[Server HMR] Update failed, full reload needed:', e)\n throw e\n }\n}\n\nfunction applyEcmascriptMergedUpdate(\n instruction: NodeJsEcmascriptMergedUpdate,\n moduleFactories: ModuleFactories,\n devModuleCache: ModuleCache<HotModule>\n): void {\n const { entries = {}, chunks = {} } = instruction\n\n const evalModuleEntry = (entry: EcmascriptModuleEntry) => {\n const code = entry.map ? inlineSourcemaps(entry) : entry.code\n // eslint-disable-next-line no-eval\n return (0, eval)(`(require) => ${code}`)(require)\n }\n\n const { added, modified } = computeChangedModules(\n entries,\n chunks,\n undefined // no chunkModulesMap for Node.js\n )\n\n // Modules that appear in an \"added\" chunk but already exist in the cache\n // were moved to a renamed chunk. Treat them as modified so the dependency\n // walk runs and they get re-instantiated with the new factory.\n for (const [moduleId, entry] of added) {\n if (entry != null && devModuleCache.has(moduleId)) {\n added.delete(moduleId)\n modified.set(moduleId, entry)\n }\n }\n\n // Use shared HMR update implementation\n applyEcmascriptMergedUpdateShared({\n added,\n modified,\n disposedModules: [], // no disposedModules for Node.js (no chunk management)\n evalModuleEntry,\n instantiateModule,\n applyModuleFactoryName: () => {}, // Node doesn't use this\n moduleFactories,\n devModuleCache,\n autoAcceptRootModules: true,\n })\n}\n"],"names":["inlineSourcemaps","entry","chunkPath","moduleId","url","split","absolutePath","path","resolve","RUNTIME_ROOT","fileHref","pathToFileURL","href","sourceURL","code","map","Buffer","from","toString","serverHmrUpdateHandler","initializeServerHmr","moduleFactories","devModuleCache","Error","msg","handleNodejsUpdate","emitMessage","data","type","instruction","chunkUpdate","Object","entries","chunks","merged","applyEcmascriptMergedUpdate","e","console","error","evalModuleEntry","eval","require","added","modified","computeChangedModules","undefined","has","delete","set","applyEcmascriptMergedUpdateShared","disposedModules","instantiateModule","applyModuleFactoryName","autoAcceptRootModules"],"mappings":"AAAA,+DAA+D;AAC/D,4DAA4D;AAE5D,oDAAoD,GAYpD;;;;CAIC,GACD,SAASA,iBAAiBC,KAA4B;IACpD,MAAM,CAACC,WAAWC,SAAS,GAAGF,MAAMG,GAAG,CAACC,KAAK,CAAC,KAAK;IACnD,MAAMC,eAAeC,KAAKC,OAAO,CAACC,cAAcP;IAChD,MAAMQ,WAAWN,IAAIO,aAAa,CAACL,cAAcM,IAAI;IACrD,MAAMC,YAAYV,WAAW,GAAGO,SAAS,CAAC,EAAEP,UAAU,GAAGO;IACzD,IAAII,OAAOb,MAAMa,IAAI,GAAG,uBAAuBD;IAC/C,IAAIZ,MAAMc,GAAG,EAAE;QACbD,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ACjE,MAAMA;IACR;AACF;AAEA,SAASD,4BACPN,WAAyC,EACzCR,eAAgC,EAChCC,cAAsC;IAEtC,MAAM,EAAEU,UAAU,CAAC,CAAC,EAAEC,SAAS,CAAC,CAAC,EAAE,GAAGJ;IAEtC,MAAMU,kBAAkB,CAACtC;QACvB,MAAMa,OAAOb,MAAMc,GAAG,GAAGf,iBAAiBC,SAASA,MAAMa,IAAI;QAC7D,mCAAmC;QACnC,OAAO,CAAC,GAAG0B,IAAI,EAAE,CAAC,aAAa,EAAE1B,MAAM,EAAE2B;IAC3C;IAEA,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAE,GAAGC,sBAC1BZ,SACAC,QACAY,UAAU,iCAAiC;;IAG7C,yEAAyE;IACzE,0EAA0E;IAC1E,+DAA+D;IAC/D,KAAK,MAAM,CAAC1C,UAAUF,MAAM,IAAIyC,MAAO;QACrC,IAAIzC,SAAS,QAAQqB,eAAewB,GAAG,CAAC3C,WAAW;YACjDuC,MAAMK,MAAM,CAAC5C;YACbwC,SAASK,GAAG,CAAC7C,UAAUF;QACzB;IACF;IAEA,uCAAuC;IACvCgD,kCAAkC;QAChCP;QACAC;QACAO,iBAAiB,EAAE;QACnBX;QACAY;QACAC,wBAAwB,KAAO;QAC/B/B;QACAC;QACA+B,uBAAuB;IACzB;AACF","ignoreList":[0]}},
{"offset": {"line": 1741, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/dev/dev-nodejs.ts"],"sourcesContent":["/// <reference path=\"../../shared/runtime/dev-protocol.d.ts\" />\n/// <reference path=\"./hmr-client.ts\" />\n\n/**\n * Note: hmr-runtime.ts is embedded before this file, so its functions\n * (initializeServerHmr, emitMessage) are available in the same scope.\n */\n\n// Initialize server HMR client (connects to shared HMR infrastructure)\nlet hmrClientInitialized = false\nfunction ensureHmrClientInitialized() {\n if (hmrClientInitialized) return\n hmrClientInitialized = true\n\n // initializeServerHmr is from hmr-client.ts (embedded before this file)\n // moduleFactories is from dev-runtime.ts\n // devModuleCache is the HotModule-typed cache from dev-runtime.ts\n initializeServerHmr(moduleFactories, devModuleCache)\n}\n\nfunction __turbopack_server_hmr_apply__(update: NodeJsHmrPayload): void {\n ensureHmrClientInitialized()\n // Throws if the update can't be applied in-process; the consumer catches it\n // and falls back to evicting require.cache.\n emitMessage({\n type: 'turbopack-message',\n data: update,\n })\n}\n\n// Turbopack produces one server runtime per chunking context (e.g.\n// server/chunks/ssr/ for pages, server/chunks/ for route handlers), each with\n// its own moduleFactories. We keep a globalThis Map from __filename to handler\n// so updates are routed only to runtimes whose chunkPrefix matches the update's\n// chunk paths, skipping unnecessary eval() calls. Map.set() naturally replaces\n// stale entries when a runtime file is re-evaluated after require.cache eviction.\n\ntype HmrHandlerEntry = {\n handler: (update: NodeJsHmrPayload) => void\n /** Output directory relative to RUNTIME_ROOT, e.g. \"server/chunks/ssr\". */\n chunkPrefix: string\n}\n\nconst handlers: Map<string, HmrHandlerEntry> =\n globalThis.__turbopack_server_hmr_handlers__ ?? new Map()\n\n// Normalize to forward slashes so it matches the virtual chunk paths in\n// `update.instruction.chunks`, which always use `/` regardless of OS.\nconst chunkPrefix = path\n .relative(RUNTIME_ROOT, path.dirname(__filename))\n .replaceAll(path.sep, '/')\n\nif (handlers.size === 0) {\n // First registration in this generation: install the routing dispatcher.\n globalThis.__turbopack_server_hmr_apply__ = (\n update: NodeJsHmrPayload\n ): void => {\n const registry: Map<string, HmrHandlerEntry> =\n globalThis.__turbopack_server_hmr_handlers__ ?? new Map()\n\n // Chunk paths can appear either directly on the instruction (single-chunk\n // updates) or nested inside `merged` entries (chunks covered by a\n // merger). Collect both so routing isn't skipped just because a mergeable\n // chunk's update only reports its paths inside `merged`.\n const updateChunkPaths = new Set<string>([\n ...Object.keys(update.instruction?.chunks ?? {}),\n ...(update.instruction?.merged ?? []).flatMap((merged) =>\n Object.keys(merged.chunks ?? {})\n ),\n ])\n\n const toCall: HmrHandlerEntry[] = []\n if (updateChunkPaths.size === 0) {\n for (const entry of registry.values()) toCall.push(entry)\n } else {\n const seen = new Set<string>()\n for (const chunkPath of updateChunkPaths) {\n const dir = path.dirname(chunkPath)\n for (const [key, entry] of registry) {\n if (dir === entry.chunkPrefix && !seen.has(key)) {\n seen.add(key)\n toCall.push(entry)\n }\n }\n }\n }\n\n // No matching runtime loaded (e.g. editing a route not required yet this\n // session): nothing live to patch, so this is a no-op. A handler that\n // throws propagates to the consumer, which evicts require.cache.\n for (const { handler } of toCall) {\n handler(update)\n }\n }\n}\n\nglobalThis.__turbopack_server_hmr_handlers__ = handlers\n\nhandlers.set(__filename, {\n handler: __turbopack_server_hmr_apply__,\n chunkPrefix,\n})\n"],"names":["hmrClientInitialized","ensureHmrClientInitialized","initializeServerHmr","moduleFactories","devModuleCache","__turbopack_server_hmr_apply__","update","emitMessage","type","data","handlers","globalThis","__turbopack_server_hmr_handlers__","Map","chunkPrefix","path","relative","RUNTIME_ROOT","dirname","__filename","replaceAll","sep","size","registry","updateChunkPaths","Set","Object","keys","instruction","chunks","merged","flatMap","toCall","entry","values","push","seen","chunkPath","dir","key","has","add","handler","set"],"mappings":"AAAA,+DAA+D;AAC/D,wCAAwC;AAExC;;;CAGC,GAED,uEAAuE;AACvE,IAAIA,uBAAuB;AAC3B,SAASC;IACP,IAAID,sBAAsB;IAC1BA,uBAAuB;IAEvB,wEAAwE;IACxE,yCAAyC;IACzC,kEAAkE;IAClEE,oBAAoBC,iBAAiBC;AACvC;AAEA,SAASC,+BAA+BC,MAAwB;IAC9DL;IACA,4EAA4E;IAC5E,4CAA4C;IAC5CM,YAAY;QACVC,MAAM;QACNC,MAAMH;IACR;AACF;AAeA,MAAMI,WACJC,WAAWC,iCAAiC,IAAI,IAAIC;AAEtD,wEAAwE;AACxE,sEAAsE;AACtE,MAAMC,cAAcC,KACjBC,QAAQ,CAACC,cAAcF,KAAKG,OAAO,CAACC,aACpCC,UAAU,CAACL,KAAKM,GAAG,EAAE;AAExB,IAAIX,SAASY,IAAI,KAAK,GAAG;IACvB,yEAAyE;IACzEX,WAAWN,8BAA8B,GAAG,CAC1CC;QAEA,MAAMiB,WACJZ,WAAWC,iCAAiC,IAAI,IAAIC;QAEtD,0EAA0E;QAC1E,kEAAkE;QAClE,0EAA0E;QAC1E,yDAAyD;QACzD,MAAMW,mBAAmB,IAAIC,IAAY;eACpCC,OAAOC,IAAI,CAACrB,OAAOsB,WAAW,EAAEC,UAAU,CAAC;eAC3C,CAACvB,OAAOsB,WAAW,EAAEE,UAAU,EAAE,EAAEC,OAAO,CAAC,CAACD,SAC7CJ,OAAOC,IAAI,CAACG,OAAOD,MAAM,IAAI,CAAC;SAEjC;QAED,MAAMG,SAA4B,EAAE;QACpC,IAAIR,iBAAiBF,IAAI,KAAK,GAAG;YAC/B,KAAK,MAAMW,SAASV,SAASW,MAAM,GAAIF,OAAOG,IAAI,CAACF;QACrD,OAAO;YACL,MAAMG,OAAO,IAAIX;YACjB,KAAK,MAAMY,aAAab,iBAAkB;gBACxC,MAAMc,MAAMvB,KAAKG,OAAO,CAACmB;gBACzB,KAAK,MAAM,CAACE,KAAKN,MAAM,IAAIV,SAAU;oBACnC,IAAIe,QAAQL,MAAMnB,WAAW,IAAI,CAACsB,KAAKI,GAAG,CAACD,MAAM;wBAC/CH,KAAKK,GAAG,CAACF;wBACTP,OAAOG,IAAI,CAACF;oBACd;gBACF;YACF;QACF;QAEA,yEAAyE;QACzE,sEAAsE;QACtE,iEAAiE;QACjE,KAAK,MAAM,EAAES,OAAO,EAAE,IAAIV,OAAQ;YAChCU,QAAQpC;QACV;IACF;AACF;AAEAK,WAAWC,iCAAiC,GAAGF;AAE/CA,SAASiC,GAAG,CAACxB,YAAY;IACvBuB,SAASrC;IACTS;AACF","ignoreList":[0]}}]
{"offset": {"line": 1741, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/dev/dev-nodejs.ts"],"sourcesContent":["/// <reference path=\"../../shared/runtime/dev-protocol.d.ts\" />\n/// <reference path=\"./hmr-client.ts\" />\n\n/**\n * Note: hmr-runtime.ts is embedded before this file, so its functions\n * (initializeServerHmr, emitMessage) are available in the same scope.\n */\n\n// Initialize server HMR client (connects to shared HMR infrastructure)\nlet hmrClientInitialized = false\nfunction ensureHmrClientInitialized() {\n if (hmrClientInitialized) return\n hmrClientInitialized = true\n\n // initializeServerHmr is from hmr-client.ts (embedded before this file)\n // moduleFactories is from dev-runtime.ts\n // devModuleCache is the HotModule-typed cache from dev-runtime.ts\n initializeServerHmr(moduleFactories, devModuleCache)\n}\n\nfunction __turbopack_server_hmr_apply__(update: NodeJsHmrPayload): void {\n ensureHmrClientInitialized()\n // Throws if the update can't be applied in-process; the consumer catches it\n // and falls back to evicting require.cache.\n emitMessage({\n type: 'turbopack-message',\n data: update,\n })\n}\n\n// Turbopack produces one server runtime per chunking context (e.g.\n// server/chunks/ssr/ for pages, server/chunks/ for route handlers), each with\n// its own moduleFactories. We keep a globalThis Map from __filename to handler\n// so updates are routed only to runtimes whose chunkPrefix matches the update's\n// chunk paths, skipping unnecessary eval() calls. Map.set() naturally replaces\n// stale entries when a runtime file is re-evaluated after require.cache eviction.\n\ntype HmrHandlerEntry = {\n handler: (update: NodeJsHmrPayload) => void\n /** Output directory relative to RUNTIME_ROOT, e.g. \"server/chunks/ssr\". */\n chunkPrefix: string\n}\n\nconst handlers: Map<string, HmrHandlerEntry> =\n globalThis.__turbopack_server_hmr_handlers__ ?? new Map()\n\n// Normalize to forward slashes so it matches the virtual chunk paths in\n// `update.instruction.chunks`, which always use `/` regardless of OS.\nconst chunkPrefix = path\n .relative(RUNTIME_ROOT, path.dirname(__filename))\n .replaceAll(path.sep, '/')\n\nif (handlers.size === 0) {\n // First registration in this generation: install the routing dispatcher.\n globalThis.__turbopack_server_hmr_apply__ = (\n update: NodeJsHmrPayload\n ): void => {\n const registry: Map<string, HmrHandlerEntry> =\n globalThis.__turbopack_server_hmr_handlers__ ?? new Map()\n\n // Chunk paths can appear either directly on the instruction (single-chunk\n // updates) or nested inside `merged` entries (chunks covered by a\n // merger). Collect both so routing isn't skipped just because a mergeable\n // chunk's update only reports its paths inside `merged`.\n const instruction = update.instruction\n const updateChunkPaths = new Set<string>([\n ...Object.keys(instruction?.chunks ?? {}),\n ...(\n (instruction?.type === 'ChunkListUpdate' && instruction.merged) ||\n []\n ).flatMap((merged) => Object.keys(merged.chunks ?? {})),\n ])\n\n const toCall: HmrHandlerEntry[] = []\n if (updateChunkPaths.size === 0) {\n for (const entry of registry.values()) toCall.push(entry)\n } else {\n const seen = new Set<string>()\n for (const chunkPath of updateChunkPaths) {\n const dir = path.dirname(chunkPath)\n for (const [key, entry] of registry) {\n if (dir === entry.chunkPrefix && !seen.has(key)) {\n seen.add(key)\n toCall.push(entry)\n }\n }\n }\n }\n\n // No matching runtime loaded (e.g. editing a route not required yet this\n // session): nothing live to patch, so this is a no-op. A handler that\n // throws propagates to the consumer, which evicts require.cache.\n for (const { handler } of toCall) {\n handler(update)\n }\n }\n}\n\nglobalThis.__turbopack_server_hmr_handlers__ = handlers\n\nhandlers.set(__filename, {\n handler: __turbopack_server_hmr_apply__,\n chunkPrefix,\n})\n"],"names":["hmrClientInitialized","ensureHmrClientInitialized","initializeServerHmr","moduleFactories","devModuleCache","__turbopack_server_hmr_apply__","update","emitMessage","type","data","handlers","globalThis","__turbopack_server_hmr_handlers__","Map","chunkPrefix","path","relative","RUNTIME_ROOT","dirname","__filename","replaceAll","sep","size","registry","instruction","updateChunkPaths","Set","Object","keys","chunks","merged","flatMap","toCall","entry","values","push","seen","chunkPath","dir","key","has","add","handler","set"],"mappings":"AAAA,+DAA+D;AAC/D,wCAAwC;AAExC;;;CAGC,GAED,uEAAuE;AACvE,IAAIA,uBAAuB;AAC3B,SAASC;IACP,IAAID,sBAAsB;IAC1BA,uBAAuB;IAEvB,wEAAwE;IACxE,yCAAyC;IACzC,kEAAkE;IAClEE,oBAAoBC,iBAAiBC;AACvC;AAEA,SAASC,+BAA+BC,MAAwB;IAC9DL;IACA,4EAA4E;IAC5E,4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,OAAO,EAAE,IAAIV,OAAQ;YAChCU,QAAQpC;QACV;IACF;AACF;AAEAK,WAAWC,iCAAiC,GAAGF;AAE/CA,SAASiC,GAAG,CAACxB,YAAY;IACvBuB,SAASrC;IACTS;AACF","ignoreList":[0]}}]
}
\ No newline at end of file
......@@ -6,5 +6,5 @@
{"offset": {"line": 650, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/base-externals-utils.ts"],"sourcesContent":["/// <reference path=\"../shared/runtime/runtime-utils.ts\" />\n\n/// A 'base' utilities to support runtime can have externals.\n/// Currently this is for node.js / edge runtime both.\n/// If a fn requires node.js specific behavior, it should be placed in `node-external-utils` instead.\n\nasync function externalImport(id: DependencySpecifier) {\n let raw\n try {\n raw = await import(id)\n } catch (err) {\n // TODO(alexkirsz) This can happen when a client-side module tries to load\n // an external module we don't provide a shim for (e.g. querystring, url).\n // For now, we fail semi-silently, but in the future this should be a\n // compilation error.\n throw new Error(`Failed to load external module ${id}: ${err}`)\n }\n\n if (raw && raw.__esModule && raw.default && 'default' in raw.default) {\n return interopEsm(raw.default, createNS(raw), true)\n }\n\n return raw\n}\ncontextPrototype.y = externalImport\n\nfunction externalRequire(\n id: ModuleId,\n thunk: () => any,\n esm: boolean = false\n): Exports | EsmNamespaceObject {\n let raw\n try {\n raw = thunk()\n } catch (err) {\n // TODO(alexkirsz) This can happen when a client-side module tries to load\n // an external module we don't provide a shim for (e.g. querystring, url).\n // For now, we fail semi-silently, but in the future this should be a\n // compilation error.\n throw new Error(`Failed to load external module ${id}: ${err}`)\n }\n\n if (!esm || raw.__esModule) {\n return raw\n }\n\n return interopEsm(raw, createNS(raw), true)\n}\n\nexternalRequire.resolve = (\n id: string,\n options?: {\n paths?: string[]\n }\n) => {\n return require.resolve(id, options)\n}\ncontextPrototype.x = externalRequire\n"],"names":["externalImport","id","raw","err","Error","__esModule","default","interopEsm","createNS","contextPrototype","y","externalRequire","thunk","esm","resolve","options","require","x"],"mappings":"AAAA,2DAA2D;AAE3D,6DAA6D;AAC7D,sDAAsD;AACtD,qGAAqG;AAErG,eAAeA,eAAeC,EAAuB;IACnD,IAAIC;IACJ,IAAI;QACFA,MAAM,MAAM,MAAM,CAACD;IACrB,EAAE,OAAOE,KAAK;QACZ,0EAA0E;QAC1E,0EAA0E;QAC1E,qEAAqE;QACrE,qBAAqB;QACrB,MAAM,IAAIC,MAAM,CAAC,+BAA+B,EAAEH,GAAG,EAAE,EAAEE,KAAK;IAChE;IAEA,IAAID,OAAOA,IAAIG,UAAU,IAAIH,IAAII,OAAO,IAAI,aAAaJ,IAAII,OAAO,EAAE;QACpE,OAAOC,WAAWL,IAAII,OAAO,EAAEE,SAASN,MAAM;IAChD;IAEA,OAAOA;AACT;AACAO,iBAAiBC,CAAC,GAAGV;AAErB,SAASW,gBACPV,EAAY,EACZW,KAAgB,EAChBC,MAAe,KAAK;IAEpB,IAAIX;IACJ,IAAI;QACFA,MAAMU;IACR,EAAE,OAAOT,KAAK;QACZ,0EAA0E;QAC1E,0EAA0E;QAC1E,qEAAqE;QACrE,qBAAqB;QACrB,MAAM,IAAIC,MAAM,CAAC,+BAA+B,EAAEH,GAAG,EAAE,EAAEE,KAAK;IAChE;IAEA,IAAI,CAACU,OAAOX,IAAIG,UAAU,EAAE;QAC1B,OAAOH;IACT;IAEA,OAAOK,WAAWL,KAAKM,SAASN,MAAM;AACxC;AAEAS,gBAAgBG,OAAO,GAAG,CACxBb,IACAc;IAIA,OAAOC,QAAQF,OAAO,CAACb,IAAIc;AAC7B;AACAN,iBAAiBQ,CAAC,GAAGN","ignoreList":[0]}},
{"offset": {"line": 691, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/node-externals-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\ndeclare var RUNTIME_PUBLIC_PATH: string\ndeclare var RELATIVE_ROOT_PATH: string\ndeclare var ASSET_PREFIX: string\n\nconst path = require('path')\n\nconst relativePathToRuntimeRoot = path.relative(RUNTIME_PUBLIC_PATH, '.')\n// Compute the relative path to the `distDir`.\nconst relativePathToDistRoot = path.join(\n relativePathToRuntimeRoot,\n RELATIVE_ROOT_PATH\n)\nconst RUNTIME_ROOT = path.resolve(__filename, relativePathToRuntimeRoot)\n// Compute the absolute path to the root, by stripping distDir from the absolute path to this file.\nconst ABSOLUTE_ROOT = path.resolve(__filename, relativePathToDistRoot)\n\n/**\n * Returns an absolute path to the given module path.\n * Module path should be relative, either path to a file or a directory.\n *\n * This fn allows to calculate an absolute path for some global static values, such as\n * `__dirname` or `import.meta.url` that Turbopack will not embeds in compile time.\n * See ImportMetaBinding::code_generation for the usage.\n */\nfunction resolveAbsolutePath(modulePath?: string): string {\n if (modulePath) {\n return path.join(ABSOLUTE_ROOT, modulePath)\n }\n return ABSOLUTE_ROOT\n}\nContext.prototype.P = resolveAbsolutePath\n\n/**\n * Returns an absolute `file://` URL for the given module path, which is\n * relative to the project root or the named `root`.\n *\n * Uses `url.pathToFileURL` so that the resulting URL is a valid file URI on\n * all platforms (forward slashes on Windows, drive letters handled\n * correctly, path segments URL-encoded).\n *\n * The location of a named `root` isn't known at runtime (the output may have\n * been moved away from the sources), so this returns a placeholder URL for it.\n */\nfunction resolveFileUrl(modulePath: string, root?: string): string {\n if (root !== undefined) {\n return placeholderFileUrl(modulePath, root)\n }\n return require('url').pathToFileURL(resolveAbsolutePath(modulePath)).href\n}\nContext.prototype.F = resolveFileUrl\n"],"names":["path","require","relativePathToRuntimeRoot","relative","RUNTIME_PUBLIC_PATH","relativePathToDistRoot","join","RELATIVE_ROOT_PATH","RUNTIME_ROOT","resolve","__filename","ABSOLUTE_ROOT","resolveAbsolutePath","modulePath","Context","prototype","P","resolveFileUrl","root","undefined","placeholderFileUrl","pathToFileURL","href","F"],"mappings":"AAAA,oDAAoD,GAMpD,MAAMA,OAAOC,QAAQ;AAErB,MAAMC,4BAA4BF,KAAKG,QAAQ,CAACC,qBAAqB;AACrE,8CAA8C;AAC9C,MAAMC,yBAAyBL,KAAKM,IAAI,CACtCJ,2BACAK;AAEF,MAAMC,eAAeR,KAAKS,OAAO,CAACC,YAAYR;AAC9C,mGAAmG;AACnG,MAAMS,gBAAgBX,KAAKS,OAAO,CAACC,YAAYL;AAE/C;;;;;;;CAOC,GACD,SAASO,oBAAoBC,UAAmB;IAC9C,IAAIA,YAAY;QACd,OAAOb,KAAKM,IAAI,CAACK,eAAeE;IAClC;IACA,OAAOF;AACT;AACAG,QAAQC,SAAS,CAACC,CAAC,GAAGJ;AAEtB;;;;;;;;;;CAUC,GACD,SAASK,eAAeJ,UAAkB,EAAEK,IAAa;IACvD,IAAIA,SAASC,WAAW;QACtB,OAAOC,mBAAmBP,YAAYK;IACxC;IACA,OAAOjB,QAAQ,OAAOoB,aAAa,CAACT,oBAAoBC,aAAaS,IAAI;AAC3E;AACAR,QAAQC,SAAS,CAACQ,CAAC,GAAGN","ignoreList":[0]}},
{"offset": {"line": 729, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime/runtime-base.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// <reference path=\"../../shared/runtime/runtime-utils.ts\" />\n/// <reference path=\"../../shared-node/base-externals-utils.ts\" />\n/// <reference path=\"../../shared-node/node-externals-utils.ts\" />\n/// <reference path=\"./nodejs-globals.d.ts\" />\n\n/**\n * Base Node.js runtime shared between production and development.\n * Contains chunk loading, module caching, and other non-HMR functionality.\n */\n\nprocess.env.TURBOPACK = '1'\n\nconst url = require('url') as typeof import('url')\n\nconst moduleFactories: ModuleFactories = new Map()\nconst moduleCache: ModuleCache<Module> = new Map()\n\n/**\n * Returns an absolute path to the given module's id.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext<Module>,\n moduleId: string\n): string {\n const exported = this.r(moduleId)\n const exportedPath = exported?.default ?? exported\n if (typeof exportedPath !== 'string') {\n return exported as any\n }\n\n const strippedAssetPrefix = exportedPath.slice(ASSET_PREFIX.length)\n const resolved = path.resolve(RUNTIME_ROOT, strippedAssetPrefix)\n\n return url.pathToFileURL(resolved).href\n}\n\n/**\n * Exports a URL value. No suffix is added in Node.js runtime.\n */\nfunction exportUrl(\n this: TurbopackBaseContext<Module>,\n urlValue: string,\n id: ModuleId | undefined\n) {\n exportValue.call(this, urlValue, id)\n}\n\nfunction loadRuntimeChunk(sourcePath: ChunkPath, chunkData: ChunkData): void {\n if (typeof chunkData === 'string') {\n loadRuntimeChunkPath(sourcePath, chunkData)\n } else {\n loadRuntimeChunkPath(sourcePath, chunkData.path)\n }\n}\n\nconst loadedChunks = new Set<ChunkPath>()\nconst unsupportedLoadChunk = Promise.resolve(undefined)\nconst loadedChunk: Promise<void> = Promise.resolve(undefined)\nconst chunkCache = new Map<ChunkPath, Promise<void>>()\n\nfunction clearChunkCache() {\n chunkCache.clear()\n loadedChunks.clear()\n}\n\nfunction loadRuntimeChunkPath(\n sourcePath: ChunkPath,\n chunkPath: ChunkPath\n): void {\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return\n }\n\n if (loadedChunks.has(chunkPath)) {\n return\n }\n\n try {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n loadedChunks.add(chunkPath)\n } catch (cause) {\n let errorMessage = `Failed to load chunk ${chunkPath}`\n\n if (sourcePath) {\n errorMessage += ` from runtime for chunk ${sourcePath}`\n }\n\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n throw error\n }\n}\n\nfunction loadChunkAsync<TModule extends Module>(\n this: TurbopackBaseContext<TModule>,\n chunkData: ChunkData\n): Promise<void> {\n const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path\n if (!isJs(chunkPath)) {\n // We only support loading JS chunks in Node.js.\n // This branch can be hit when trying to load a CSS chunk.\n return unsupportedLoadChunk\n }\n\n let entry = chunkCache.get(chunkPath)\n if (entry === undefined) {\n try {\n // resolve to an absolute path to simplify `require` handling\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n // TODO: consider switching to `import()` to enable concurrent chunk loading and async file io\n // However this is incompatible with hot reloading (since `import` doesn't use the require cache)\n const chunkModules: CompressedModuleFactories = require(resolved)\n installCompressedModuleFactories(chunkModules, 0, moduleFactories)\n entry = loadedChunk\n } catch (cause) {\n const errorMessage = `Failed to load chunk ${chunkPath} from module ${this.m.id}`\n const error = new Error(errorMessage, { cause })\n error.name = 'ChunkLoadError'\n\n // Cache the failure promise, future requests will also get this same rejection\n entry = Promise.reject(error)\n }\n chunkCache.set(chunkPath, entry)\n }\n // TODO: Return an instrumented Promise that React can use instead of relying on referential equality.\n return entry\n}\ncontextPrototype.l = loadChunkAsync\n\nfunction loadChunkAsyncByUrl<TModule extends Module>(\n this: TurbopackBaseContext<TModule>,\n chunkUrl: string\n) {\n const path = url.fileURLToPath(new URL(chunkUrl, RUNTIME_ROOT)) as ChunkPath\n return loadChunkAsync.call(this, path)\n}\ncontextPrototype.L = loadChunkAsyncByUrl\n\n// Shared runtime primitive: the root that on-disk chunk paths are resolved\n// against. Used by the bundled wasm helper (exposed as `__turbopack_runtime_root__`).\ncontextPrototype.w = RUNTIME_ROOT\n\nconst regexJsUrl = /\\.js(?:\\?[^#]*)?(?:#.*)?$/\n/**\n * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.\n */\nfunction isJs(chunkUrlOrPath: ChunkUrl | ChunkPath): boolean {\n return regexJsUrl.test(chunkUrlOrPath)\n}\n"],"names":["process","env","TURBOPACK","url","require","moduleFactories","Map","moduleCache","resolvePathFromModule","moduleId","exported","r","exportedPath","default","strippedAssetPrefix","slice","ASSET_PREFIX","length","resolved","path","resolve","RUNTIME_ROOT","pathToFileURL","href","exportUrl","urlValue","id","exportValue","call","loadRuntimeChunk","sourcePath","chunkData","loadRuntimeChunkPath","loadedChunks","Set","unsupportedLoadChunk","Promise","undefined","loadedChunk","chunkCache","clearChunkCache","clear","chunkPath","isJs","has","chunkModules","installCompressedModuleFactories","add","cause","errorMessage","error","Error","name","loadChunkAsync","entry","get","m","reject","set","contextPrototype","l","loadChunkAsyncByUrl","chunkUrl","path1","fileURLToPath","URL","L","w","regexJsUrl","chunkUrlOrPath","test"],"mappings":"AAAA,oDAAoD,GAEpD,8DAA8D;AAC9D,kEAAkE;AAClE,kEAAkE;AAClE,8CAA8C;AAE9C;;;CAGC,GAEDA,QAAQC,GAAG,CAACC,SAAS,GAAG;AAExB,MAAMC,MAAMC,QAAQ;AAEpB,MAAMC,kBAAmC,IAAIC;AAC7C,MAAMC,cAAmC,IAAID;AAE7C;;CAEC,GACD,SAASE,sBAEPC,QAAgB;IAEhB,MAAMC,WAAW,IAAI,CAACC,CAAC,CAACF;IACxB,MAAMG,eAAeF,UAAUG,WAAWH;IAC1C,IAAI,OAAOE,iBAAiB,UAAU;QACpC,OAAOF;IACT;IAEA,MAAMI,sBAAsBF,aAAaG,KAAK,CAACC,aAAaC,MAAM;IAClE,MAAMC,WAAWC,KAAKC,OAAO,CAACC,cAAcP;IAE5C,OAAOX,IAAImB,aAAa,CAACJ,UAAUK,IAAI;AACzC;AAEA;;CAEC,GACD,SAASC,UAEPC,QAAgB,EAChBC,EAAwB;IAExBC,YAAYC,IAAI,CAAC,IAAI,EAAEH,UAAUC;AACnC;AAEA,SAASG,iBAAiBC,UAAqB,EAAEC,SAAoB;IACnE,IAAI,OAAOA,cAAc,UAAU;QACjCC,qBAAqBF,YAAYC;IACnC,OAAO;QACLC,qBAAqBF,YAAYC,UAAUZ,IAAI;IACjD;AACF;AAEA,MAAMc,eAAe,IAAIC;AACzB,MAAMC,uBAAuBC,QAAQhB,OAAO,CAACiB;AAC7C,MAAMC,cAA6BF,QAAQhB,OAAO,CAACiB;AACnD,MAAME,aAAa,IAAIjC;AAEvB,SAASkC;IACPD,WAAWE,KAAK;IAChBR,aAAaQ,KAAK;AACpB;AAEA,SAAST,qBACPF,UAAqB,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WmB,GAAG,CAAChB,WAAWY;IAC5B;IACA,sGAAsG;IACtG,OAAOA;AACT;AACAK,iBAAiBC,CAAC,GAAGP;AAErB,SAASQ,oBAEPC,QAAgB;IAEhB,MAAMC,QAAO5D,IAAI6D,aAAa,CAAC,IAAIC,IAAIH,UAAUzC;IACjD,OAAOgC,eAAezB,IAAI,CAAC,IAAI,EAAEmC;AACnC;AACAJ,iBAAiBO,CAAC,GAAGL;AAErB,2EAA2E;AAC3E,sFAAsF;AACtFF,iBAAiBQ,CAAC,GAAG9C;AAErB,MAAM+C,aAAa;AACnB;;CAEC,GACD,SAASzB,KAAK0B,cAAoC;IAChD,OAAOD,WAAWE,IAAI,CAACD;AACzB","ignoreList":[0]}},
{"offset": {"line": 844, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime/build-base.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// <reference path=\"./runtime-base.ts\" />\n\n/**\n * Production Node.js runtime.\n * Uses ModuleWithDirection and simple module instantiation without HMR support.\n */\n\n// moduleCache and moduleFactories are declared in runtime-base.ts\n\n// this is read in runtime-utils.ts so it creates a module with direction for hmr\ncreateModuleWithDirectionFlag = true\n\ninterface TurbopackNodeBuildContext\n extends TurbopackBaseContext<ModuleWithDirection> {\n R: ResolvePathFromModule\n x: ExternalRequire\n y: ExternalImport\n C: typeof clearChunkCache\n}\n\nconst nodeContextPrototype = Context.prototype as TurbopackNodeBuildContext\n\nnodeContextPrototype.q = exportUrl\nnodeContextPrototype.M = moduleFactories\n// Cast moduleCache to ModuleWithDirection for production mode\nnodeContextPrototype.c = moduleCache as ModuleCache<ModuleWithDirection>\nnodeContextPrototype.R = resolvePathFromModule\nnodeContextPrototype.C = clearChunkCache\n\nfunction instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): ModuleWithDirection {\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(factoryNotAvailableMessage(id, sourceType, sourceData))\n }\n\n const module: ModuleWithDirection = createModuleWithDirection(id)\n const exports = module.exports\n moduleCache.set(id, module)\n\n const context =\n new (Context as any as ContextConstructor<ModuleWithDirection>)(\n module,\n exports\n )\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n moduleFactory(context, module, exports)\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n ;(module as any).loaded = true\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore\nfunction getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: ModuleWithDirection\n): ModuleWithDirection {\n const module = moduleCache.get(id)\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): ModuleWithDirection {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.\n */\n// @ts-ignore TypeScript doesn't separate this module space from the browser runtime\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): ModuleWithDirection {\n const module = moduleCache.get(moduleId)\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n return instantiateRuntimeModule(chunkPath, moduleId)\n}\n\nmodule.exports = (sourcePath: ChunkPath) => ({\n m: (id: ModuleId) => getOrInstantiateRuntimeModule(sourcePath, id),\n c: (chunkData: ChunkData) => loadRuntimeChunk(sourcePath, chunkData),\n})\n"],"names":["createModuleWithDirectionFlag","nodeContextPrototype","Context","prototype","q","exportUrl","M","moduleFactories","c","moduleCache","R","resolvePathFromModule","C","clearChunkCache","instantiateModule","id","sourceType","sourceData","moduleFactory","get","Error","factoryNotAvailableMessage","module1","createModuleWithDirection","exports","set","context","error","loaded","namespaceObject","interopEsm","getOrInstantiateModuleFromParent","sourceModule","SourceType","Parent","instantiateRuntimeModule","chunkPath","moduleId","Runtime","getOrInstantiateRuntimeModule","module","sourcePath","m","chunkData","loadRuntimeChunk"],"mappings":"AAAA,oDAAoD,GAEpD,0CAA0C;AAE1C;;;CAGC,GAED,kEAAkE;AAElE,iFAAiF;AACjFA,gCAAgC;AAUhC,MAAMC,uBAAuBC,QAAQC,SAAS;AAE9CF,qBAAqBG,CAAC,GAAGC;AACzBJ,qBAAqBK,CAAC,GAAGC;AACzB,8DAA8D;AAC9DN,qBAAqBO,CAAC,GAAGC;AACzBR,qBAAqBS,CAAC,GAAGC;AACzBV,qBAAqBW,CAAC,GAAGC;AAEzB,SAASC,kBACPC,EAAY,EACZC,UAAsB,EACtBC,UAAsB;IAEtB,MAAMC,gBAAgBX,gBAAgBY,GAAG,CAACJ;IAC1C,IAAI,OAAOG,kBAAkB,YAAY;QACvC,sEAAsE;QACtE,0EAA0E;QAC1E,mDAAmD;QACnD,MAAM,IAAIE,MAAMC,2BAA2BN,IAAIC,YAAYC;IAC7D;IAEA,MAAMK,UAA8BC,0BAA0BR;IAC9D,MAAMS,UAAUF,QAAOE,OAAO;IAC9Bf,YAAYgB,GAAG,CAACV,IAAIO;IAEpB,MAAMI,UACJ,IAAKxB,QACHoB,SACAE;IAEJ,4EAA4E;IAC5E,IAAI;QACFN,cAAcQ,SAASJ,SAAQE;IACjC,EAAE,OAAOG,OAAO;QACdL,QAAOK,KAAK,GAAGA;QACf,MAAMA;IACR;;IAEEL,QAAeM,MAAM,GAAG;IAC1B,IAAIN,QAAOO,eAAe,IAAIP,QAAOE,OAAO,KAAKF,QAAOO,eAAe,EAAE;QACvE,yDAAyD;QACzDC,WAAWR,QAAOE,OAAO,EAAEF,QAAOO,eAAe;IACnD;IAEA,OAAOP;AACT;AAEA;;CAEC,GACD,aAAa;AACb,SAASS,iCACPhB,EAAY,EACZiB,YAAiC;IAEjC,MAAMV,UAASb,YAAYU,GAAG,CAACJ;IAE/B,IAAIO,SAAQ;QACV,IAAIA,QAAOK,KAAK,EAAE;YAChB,MAAML,QAAOK,KAAK;QACpB;QAEA,OAAOL;IACT;IAEA,OAAOR,kBAAkBC,IAAIkB,WAAWC,MAAM,EAAEF,aAAajB,EAAE;AACjE;AAEA;;CAEC,GACD,SAASoB,yBACPC,SAAoB,EACpBC,QAAkB;IAElB,OAAOvB,kBAAkBuB,UAAUJ,WAAWK,OAAO,EAAEF;AACzD;AAEA;;CAEC,GACD,oFAAoF;AACpF,SAASG,8BACPH,SAAoB,EACpBC,QAAkB;IAElB,MAAMf,UAASb,YAAYU,GAAG,CAACkB;IAE/B,IAAIf,SAAQ;QACV,IAAIA,QAAOK,KAAK,EAAE;YAChB,MAAML,QAAOK,KAAK;QACpB;QACA,OAAOL;IACT;IAEA,OAAOa,yBAAyBC,WAAWC;AAC7C;AAEAG,OAAOhB,OAAO,GAAG,CAACiB,aAA0B,CAAC;QAC3CC,GAAG,CAAC3B,KAAiBwB,8BAA8BE,YAAY1B;QAC/DP,GAAG,CAACmC,YAAyBC,iBAAiBH,YAAYE;IAC5D,CAAC","ignoreList":[0]}}]
{"offset": {"line": 844, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime/build-base.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// <reference path=\"./runtime-base.ts\" />\n\n/**\n * Production Node.js runtime.\n * Uses ModuleWithDirection and simple module instantiation without HMR support.\n */\n\n// moduleCache and moduleFactories are declared in runtime-base.ts\n\n// this is read in runtime-utils.ts so it creates a module with direction for hmr\ncreateModuleWithDirectionFlag = true\n\ninterface TurbopackNodeBuildContext\n extends TurbopackBaseContext<ModuleWithDirection> {\n R: ResolvePathFromModule\n x: ExternalRequire\n y: ExternalImport\n C: typeof clearChunkCache\n}\n\nconst nodeContextPrototype = Context.prototype as TurbopackNodeBuildContext\n\nnodeContextPrototype.q = exportUrl\nnodeContextPrototype.M = moduleFactories\n// Cast moduleCache to ModuleWithDirection for production mode\nnodeContextPrototype.c = moduleCache as ModuleCache<ModuleWithDirection>\nnodeContextPrototype.R = resolvePathFromModule\nnodeContextPrototype.C = clearChunkCache\n\nfunction instantiateModule(\n id: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): ModuleWithDirection {\n const moduleFactory = moduleFactories.get(id)\n if (typeof moduleFactory !== 'function') {\n // This can happen if modules incorrectly handle HMR disposes/updates,\n // e.g. when they keep a `setTimeout` around which still executes old code\n // and contains e.g. a `require(\"something\")` call.\n throw new Error(factoryNotAvailableMessage(id, sourceType, sourceData))\n }\n\n const module: ModuleWithDirection = createModuleWithDirection(id)\n const exports = module.exports\n moduleCache.set(id, module)\n\n const context =\n new (Context as any as ContextConstructor<ModuleWithDirection>)(\n module,\n exports\n )\n // NOTE(alexkirsz) This can fail when the module encounters a runtime error.\n try {\n moduleFactory(context, module, exports)\n } catch (error) {\n module.error = error as any\n throw error\n }\n\n ;(module as any).loaded = true\n if (module.namespaceObject && module.exports !== module.namespaceObject) {\n // in case of a circular dependency: cjs1 -> esm2 -> cjs1\n interopEsm(module.exports, module.namespaceObject)\n }\n\n return module\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it if it is not cached.\n */\n// @ts-ignore\nfunction getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: ModuleWithDirection\n): ModuleWithDirection {\n const module = moduleCache.get(id) as ModuleWithDirection | undefined\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n\n return module\n }\n\n return instantiateModule(id, SourceType.Parent, sourceModule.id)\n}\n\n/**\n * Instantiates a runtime module.\n */\nfunction instantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): ModuleWithDirection {\n return instantiateModule(moduleId, SourceType.Runtime, chunkPath)\n}\n\n/**\n * Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.\n */\n// @ts-ignore TypeScript doesn't separate this module space from the browser runtime\nfunction getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): ModuleWithDirection {\n const module = moduleCache.get(moduleId) as ModuleWithDirection | undefined\n\n if (module) {\n if (module.error) {\n throw module.error\n }\n return module\n }\n\n return instantiateRuntimeModule(chunkPath, moduleId)\n}\n\nmodule.exports = (sourcePath: ChunkPath) => ({\n m: (id: ModuleId) => getOrInstantiateRuntimeModule(sourcePath, id),\n c: (chunkData: ChunkData) => loadRuntimeChunk(sourcePath, chunkData),\n})\n"],"names":["createModuleWithDirectionFlag","nodeContextPrototype","Context","prototype","q","exportUrl","M","moduleFactories","c","moduleCache","R","resolvePathFromModule","C","clearChunkCache","instantiateModule","id","sourceType","sourceData","moduleFactory","get","Error","factoryNotAvailableMessage","module1","createModuleWithDirection","exports","set","context","error","loaded","namespaceObject","interopEsm","getOrInstantiateModuleFromParent","sourceModule","SourceType","Parent","instantiateRuntimeModule","chunkPath","moduleId","Runtime","getOrInstantiateRuntimeModule","module","sourcePath","m","chunkData","loadRuntimeChunk"],"mappings":"AAAA,oDAAoD,GAEpD,0CAA0C;AAE1C;;;CAGC,GAED,kEAAkE;AAElE,iFAAiF;AACjFA,gCAAgC;AAUhC,MAAMC,uBAAuBC,QAAQC,SAAS;AAE9CF,qBAAqBG,CAAC,GAAGC;AACzBJ,qBAAqBK,CAAC,GAAGC;AACzB,8DAA8D;AAC9DN,qBAAqBO,CAAC,GAAGC;AACzBR,qBAAqBS,CAAC,GAAGC;AACzBV,qBAAqBW,CAAC,GAAGC;AAEzB,SAASC,kBACPC,EAAY,EACZC,UAAsB,EACtBC,UAAsB;IAEtB,MAAMC,gBAAgBX,gBAAgBY,GAAG,CAACJ;IAC1C,IAAI,OAAOG,kBAAkB,YAA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AACiB,aAA0B,CAAC;QAC3CC,GAAG,CAAC3B,KAAiBwB,8BAA8BE,YAAY1B;QAC/DP,GAAG,CAACmC,YAAyBC,iBAAiBH,YAAYE;IAC5D,CAAC","ignoreList":[0]}}]
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment