diff --git a/.next/dev/build-manifest.json b/.next/dev/build-manifest.json
deleted file mode 100644
index 546e56f..0000000
--- a/.next/dev/build-manifest.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "pages": {
- "/_app": [
- "static/chunks/node_modules_next_dist_compiled_0o6l_m6._.js",
- "static/chunks/node_modules_next_dist_shared_lib_0~pg0mt._.js",
- "static/chunks/node_modules_next_dist_client_0pe1dg-._.js",
- "static/chunks/node_modules_next_dist_0u_w_5s._.js",
- "static/chunks/node_modules_next_app_0jt-zj..js",
- "static/chunks/[next]_entry_page-loader_ts_0j~flwh._.js",
- "static/chunks/node_modules_react-dom_0bruynb._.js",
- "static/chunks/node_modules_0lx093h._.js",
- "static/chunks/[root-of-the-server]__0c0okpg._.js",
- "static/chunks/pages__app_07xvfw~._.js",
- "static/chunks/turbopack-pages__app_0_wu8vy._.js"
- ],
- "/_error": [
- "static/chunks/node_modules_next_dist_compiled_0o6l_m6._.js",
- "static/chunks/node_modules_next_dist_shared_lib_12bi_n7._.js",
- "static/chunks/node_modules_next_dist_client_0pe1dg-._.js",
- "static/chunks/node_modules_next_dist_0rt-2cr._.js",
- "static/chunks/[next]_entry_page-loader_ts_0rqw6yo._.js",
- "static/chunks/node_modules_react-dom_0bruynb._.js",
- "static/chunks/node_modules_0lx093h._.js",
- "static/chunks/[root-of-the-server]__01mw43t._.js",
- "static/chunks/pages__error_07xvfw~._.js",
- "static/chunks/turbopack-pages__error_016chbq._.js"
- ]
- },
- "devFiles": [],
- "polyfillFiles": [
- "static/chunks/node_modules_next_dist_build_polyfills_polyfill-nomodule.js"
- ],
- "lowPriorityFiles": [
- "static/development/_buildManifest.js",
- "static/development/_ssgManifest.js",
- "static/development/_clientMiddlewareManifest.js"
- ],
- "rootMainFiles": [
- "static/chunks/[turbopack]_browser_dev_hmr-client_hmr-client_ts_10z625~._.js",
- "static/chunks/node_modules_next_dist_compiled_next-devtools_index_0553esy.js",
- "static/chunks/node_modules_next_dist_compiled_react-dom_058-ah~._.js",
- "static/chunks/node_modules_next_dist_compiled_react-server-dom-turbopack_0p3wegg._.js",
- "static/chunks/node_modules_next_dist_compiled_0rpq4pf._.js",
- "static/chunks/node_modules_next_dist_client_0fhqo1d._.js",
- "static/chunks/node_modules_next_dist_115brz8._.js",
- "static/chunks/node_modules_@swc_helpers_cjs_0-4ujiy._.js",
- "static/chunks/_0rqeker._.js",
- "static/chunks/turbopack-_0p44nws._.js"
- ]
-}
\ No newline at end of file
diff --git a/.next/dev/build/chunks/[turbopack]_runtime.js b/.next/dev/build/chunks/[turbopack]_runtime.js
deleted file mode 100644
index 2e5cca7..0000000
--- a/.next/dev/build/chunks/[turbopack]_runtime.js
+++ /dev/null
@@ -1,1739 +0,0 @@
-const RUNTIME_PUBLIC_PATH = "chunks/[turbopack]_runtime.js";
-const RELATIVE_ROOT_PATH = "../..";
-const ASSET_PREFIX = "/";
-const WORKER_FORWARDED_GLOBALS = [];
-/**
- * This file contains runtime types and functions that are shared between all
- * TurboPack ECMAScript runtimes.
- *
- * It will be prepended to the runtime code of each runtime.
- */ /* eslint-disable @typescript-eslint/no-unused-vars */ ///
-/**
- * Describes why a module was instantiated.
- * Shared between browser and Node.js runtimes.
- */ var SourceType = /*#__PURE__*/ function(SourceType) {
- /**
- * The module was instantiated because it was included in an evaluated chunk's
- * runtime.
- * SourceData is a ChunkPath.
- */ SourceType[SourceType["Runtime"] = 0] = "Runtime";
- /**
- * The module was instantiated because a parent module imported it.
- * SourceData is a ModuleId.
- */ SourceType[SourceType["Parent"] = 1] = "Parent";
- /**
- * The module was instantiated because it was included in a chunk's hot module
- * update.
- * SourceData is an array of ModuleIds or undefined.
- */ SourceType[SourceType["Update"] = 2] = "Update";
- return SourceType;
-}(SourceType || {});
-/**
- * Flag indicating which module object type to create when a module is merged. Set to `true`
- * by each runtime that uses ModuleWithDirection (browser dev-base.ts, nodejs dev-base.ts,
- * nodejs build-base.ts). Browser production (build-base.ts) leaves it as `false` since it
- * uses plain Module objects.
- */ let createModuleWithDirectionFlag = false;
-const REEXPORTED_OBJECTS = new WeakMap();
-/**
- * Constructs the `__turbopack_context__` object for a module.
- */ function Context(module, exports) {
- this.m = module;
- // We need to store this here instead of accessing it from the module object to:
- // 1. Make it available to factories directly, since we rewrite `this` to
- // `__turbopack_context__.e` in CJS modules.
- // 2. Support async modules which rewrite `module.exports` to a promise, so we
- // can still access the original exports object from functions like
- // `esmExport`
- // Ideally we could find a new approach for async modules and drop this property altogether.
- this.e = exports;
-}
-const contextPrototype = Context.prototype;
-const hasOwnProperty = Object.prototype.hasOwnProperty;
-const toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag;
-function defineProp(obj, name, options) {
- if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options);
-}
-function getOverwrittenModule(moduleCache, id) {
- let module = moduleCache[id];
- if (!module) {
- if (createModuleWithDirectionFlag) {
- // set in development modes for hmr support
- module = createModuleWithDirection(id);
- } else {
- module = createModuleObject(id);
- }
- moduleCache[id] = module;
- }
- return module;
-}
-/**
- * Creates the module object. Only done here to ensure all module objects have the same shape.
- */ function createModuleObject(id) {
- return {
- exports: {},
- error: undefined,
- id,
- namespaceObject: undefined
- };
-}
-function createModuleWithDirection(id) {
- return {
- exports: {},
- error: undefined,
- id,
- namespaceObject: undefined,
- parents: [],
- children: []
- };
-}
-const BindingTag_Value = 0;
-/**
- * Adds the getters to the exports object.
- */ function esm(exports, bindings) {
- defineProp(exports, '__esModule', {
- value: true
- });
- if (toStringTag) defineProp(exports, toStringTag, {
- value: 'Module'
- });
- let i = 0;
- while(i < bindings.length){
- const propName = bindings[i++];
- const tagOrFunction = bindings[i++];
- if (typeof tagOrFunction === 'number') {
- if (tagOrFunction === BindingTag_Value) {
- defineProp(exports, propName, {
- value: bindings[i++],
- enumerable: true,
- writable: false
- });
- } else {
- throw new Error(`unexpected tag: ${tagOrFunction}`);
- }
- } else {
- const getterFn = tagOrFunction;
- if (typeof bindings[i] === 'function') {
- const setterFn = bindings[i++];
- defineProp(exports, propName, {
- get: getterFn,
- set: setterFn,
- enumerable: true
- });
- } else {
- defineProp(exports, propName, {
- get: getterFn,
- enumerable: true
- });
- }
- }
- }
- Object.seal(exports);
-}
-/**
- * Makes the module an ESM with exports
- */ function esmExport(bindings, id) {
- let module;
- let exports;
- if (id != null) {
- module = getOverwrittenModule(this.c, id);
- exports = module.exports;
- } else {
- module = this.m;
- exports = this.e;
- }
- module.namespaceObject = exports;
- esm(exports, bindings);
-}
-contextPrototype.s = esmExport;
-function ensureDynamicExports(module, exports) {
- let reexportedObjects = REEXPORTED_OBJECTS.get(module);
- if (!reexportedObjects) {
- REEXPORTED_OBJECTS.set(module, reexportedObjects = []);
- module.exports = module.namespaceObject = new Proxy(exports, {
- get (target, prop) {
- if (hasOwnProperty.call(target, prop) || prop === 'default' || prop === '__esModule') {
- return Reflect.get(target, prop);
- }
- for (const obj of reexportedObjects){
- const value = Reflect.get(obj, prop);
- if (value !== undefined) return value;
- }
- return undefined;
- },
- ownKeys (target) {
- const keys = Reflect.ownKeys(target);
- for (const obj of reexportedObjects){
- for (const key of Reflect.ownKeys(obj)){
- if (key !== 'default' && !keys.includes(key)) keys.push(key);
- }
- }
- return keys;
- }
- });
- }
- return reexportedObjects;
-}
-/**
- * Dynamically exports properties from an object
- */ function dynamicExport(object, id) {
- let module;
- let exports;
- if (id != null) {
- module = getOverwrittenModule(this.c, id);
- exports = module.exports;
- } else {
- module = this.m;
- exports = this.e;
- }
- const reexportedObjects = ensureDynamicExports(module, exports);
- if (typeof object === 'object' && object !== null) {
- reexportedObjects.push(object);
- }
-}
-contextPrototype.j = dynamicExport;
-function exportValue(value, id) {
- let module;
- if (id != null) {
- module = getOverwrittenModule(this.c, id);
- } else {
- module = this.m;
- }
- module.exports = value;
-}
-contextPrototype.v = exportValue;
-function exportNamespace(namespace, id) {
- let module;
- if (id != null) {
- module = getOverwrittenModule(this.c, id);
- } else {
- module = this.m;
- }
- module.exports = module.namespaceObject = namespace;
-}
-contextPrototype.n = exportNamespace;
-function createGetter(obj, key) {
- return ()=>obj[key];
-}
-/**
- * @returns prototype of the object
- */ const getProto = Object.getPrototypeOf ? (obj)=>Object.getPrototypeOf(obj) : (obj)=>obj.__proto__;
-/** Prototypes that are not expanded for exports */ const LEAF_PROTOTYPES = [
- null,
- getProto({}),
- getProto([]),
- getProto(getProto)
-];
-/**
- * @param raw
- * @param ns
- * @param allowExportDefault
- * * `false`: will have the raw module as default export
- * * `true`: will have the default property as default export
- */ function interopEsm(raw, ns, allowExportDefault) {
- const bindings = [];
- let defaultLocation = -1;
- for(let current = raw; (typeof current === 'object' || typeof current === 'function') && !LEAF_PROTOTYPES.includes(current); current = getProto(current)){
- for (const key of Object.getOwnPropertyNames(current)){
- bindings.push(key, createGetter(raw, key));
- if (defaultLocation === -1 && key === 'default') {
- defaultLocation = bindings.length - 1;
- }
- }
- }
- // this is not really correct
- // we should set the `default` getter if the imported module is a `.cjs file`
- if (!(allowExportDefault && defaultLocation >= 0)) {
- // Replace the binding with one for the namespace itself in order to preserve iteration order.
- if (defaultLocation >= 0) {
- // Replace the getter with the value
- bindings.splice(defaultLocation, 1, BindingTag_Value, raw);
- } else {
- bindings.push('default', BindingTag_Value, raw);
- }
- }
- esm(ns, bindings);
- return ns;
-}
-function createNS(raw) {
- if (typeof raw === 'function') {
- return function(...args) {
- return raw.apply(this, args);
- };
- } else {
- return Object.create(null);
- }
-}
-function esmImport(id) {
- const module = getOrInstantiateModuleFromParent(id, this.m);
- // any ES module has to have `module.namespaceObject` defined.
- if (module.namespaceObject) return module.namespaceObject;
- // only ESM can be an async module, so we don't need to worry about exports being a promise here.
- const raw = module.exports;
- return module.namespaceObject = interopEsm(raw, createNS(raw), raw && raw.__esModule);
-}
-contextPrototype.i = esmImport;
-function asyncLoader(moduleId) {
- const loader = this.r(moduleId);
- return loader(esmImport.bind(this));
-}
-contextPrototype.A = asyncLoader;
-// Add a simple runtime require so that environments without one can still pass
-// `typeof require` CommonJS checks so that exports are correctly registered.
-const runtimeRequire = // @ts-ignore
-typeof require === 'function' ? require : function require1() {
- throw new Error('Unexpected use of runtime require');
-};
-contextPrototype.t = runtimeRequire;
-function commonJsRequire(id) {
- return getOrInstantiateModuleFromParent(id, this.m).exports;
-}
-contextPrototype.r = commonJsRequire;
-/**
- * Remove fragments and query parameters since they are never part of the context map keys
- *
- * This matches how we parse patterns at resolving time. Arguably we should only do this for
- * strings passed to `import` but the resolve does it for `import` and `require` and so we do
- * here as well.
- */ function parseRequest(request) {
- // Per the URI spec fragments can contain `?` characters, so we should trim it off first
- // https://datatracker.ietf.org/doc/html/rfc3986#section-3.5
- const hashIndex = request.indexOf('#');
- if (hashIndex !== -1) {
- request = request.substring(0, hashIndex);
- }
- const queryIndex = request.indexOf('?');
- if (queryIndex !== -1) {
- request = request.substring(0, queryIndex);
- }
- return request;
-}
-/**
- * `require.context` and require/import expression runtime.
- */ function moduleContext(map) {
- function moduleContext(id) {
- id = parseRequest(id);
- if (hasOwnProperty.call(map, id)) {
- return map[id].module();
- }
- const e = new Error(`Cannot find module '${id}'`);
- e.code = 'MODULE_NOT_FOUND';
- throw e;
- }
- moduleContext.keys = ()=>{
- return Object.keys(map);
- };
- moduleContext.resolve = (id)=>{
- id = parseRequest(id);
- if (hasOwnProperty.call(map, id)) {
- return map[id].id();
- }
- const e = new Error(`Cannot find module '${id}'`);
- e.code = 'MODULE_NOT_FOUND';
- throw e;
- };
- moduleContext.import = async (id)=>{
- return await moduleContext(id);
- };
- return moduleContext;
-}
-contextPrototype.f = moduleContext;
-/**
- * Returns the path of a chunk defined by its data.
- */ function getChunkPath(chunkData) {
- return typeof chunkData === 'string' ? chunkData : chunkData.path;
-}
-function isPromise(maybePromise) {
- return maybePromise != null && typeof maybePromise === 'object' && 'then' in maybePromise && typeof maybePromise.then === 'function';
-}
-function isAsyncModuleExt(obj) {
- return turbopackQueues in obj;
-}
-function createPromise() {
- let resolve;
- let reject;
- const promise = new Promise((res, rej)=>{
- reject = rej;
- resolve = res;
- });
- return {
- promise,
- resolve: resolve,
- reject: reject
- };
-}
-// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.
-// The CompressedModuleFactories format is
-// - 1 or more module ids
-// - a module factory function
-// So walking this is a little complex but the flat structure is also fast to
-// traverse, we can use `typeof` operators to distinguish the two cases.
-function installCompressedModuleFactories(chunkModules, offset, moduleFactories, newModuleId) {
- let i = offset;
- while(i < chunkModules.length){
- let end = i + 1;
- // Find our factory function
- while(end < chunkModules.length && typeof chunkModules[end] !== 'function'){
- end++;
- }
- if (end === chunkModules.length) {
- throw new Error('malformed chunk format, expected a factory function');
- }
- // Install the factory for each module ID that doesn't already have one.
- // When some IDs in this group already have a factory, reuse that existing
- // group factory for the missing IDs to keep all IDs in the group consistent.
- // Otherwise, install the factory from this chunk.
- const moduleFactoryFn = chunkModules[end];
- let existingGroupFactory = undefined;
- for(let j = i; j < end; j++){
- const id = chunkModules[j];
- const existingFactory = moduleFactories.get(id);
- if (existingFactory) {
- existingGroupFactory = existingFactory;
- break;
- }
- }
- const factoryToInstall = existingGroupFactory ?? moduleFactoryFn;
- let didInstallFactory = false;
- for(let j = i; j < end; j++){
- const id = chunkModules[j];
- if (!moduleFactories.has(id)) {
- if (!didInstallFactory) {
- if (factoryToInstall === moduleFactoryFn) {
- applyModuleFactoryName(moduleFactoryFn);
- }
- didInstallFactory = true;
- }
- moduleFactories.set(id, factoryToInstall);
- newModuleId?.(id);
- }
- }
- i = end + 1; // end is pointing at the last factory advance to the next id or the end of the array.
- }
-}
-// everything below is adapted from webpack
-// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13
-const turbopackQueues = Symbol('turbopack queues');
-const turbopackExports = Symbol('turbopack exports');
-const turbopackError = Symbol('turbopack error');
-function resolveQueue(queue) {
- if (queue && queue.status !== 1) {
- queue.status = 1;
- queue.forEach((fn)=>fn.queueCount--);
- queue.forEach((fn)=>fn.queueCount-- ? fn.queueCount++ : fn());
- }
-}
-function wrapDeps(deps) {
- return deps.map((dep)=>{
- if (dep !== null && typeof dep === 'object') {
- if (isAsyncModuleExt(dep)) return dep;
- if (isPromise(dep)) {
- const queue = Object.assign([], {
- status: 0
- });
- const obj = {
- [turbopackExports]: {},
- [turbopackQueues]: (fn)=>fn(queue)
- };
- dep.then((res)=>{
- obj[turbopackExports] = res;
- resolveQueue(queue);
- }, (err)=>{
- obj[turbopackError] = err;
- resolveQueue(queue);
- });
- return obj;
- }
- }
- return {
- [turbopackExports]: dep,
- [turbopackQueues]: ()=>{}
- };
- });
-}
-function asyncModule(body, hasAwait) {
- const module = this.m;
- const queue = hasAwait ? Object.assign([], {
- status: -1
- }) : undefined;
- const depQueues = new Set();
- const { resolve, reject, promise: rawPromise } = createPromise();
- const promise = Object.assign(rawPromise, {
- [turbopackExports]: module.exports,
- [turbopackQueues]: (fn)=>{
- queue && fn(queue);
- depQueues.forEach(fn);
- promise['catch'](()=>{});
- }
- });
- const attributes = {
- get () {
- return promise;
- },
- set (v) {
- // Calling `esmExport` leads to this.
- if (v !== promise) {
- promise[turbopackExports] = v;
- }
- }
- };
- Object.defineProperty(module, 'exports', attributes);
- Object.defineProperty(module, 'namespaceObject', attributes);
- function handleAsyncDependencies(deps) {
- const currentDeps = wrapDeps(deps);
- const getResult = ()=>currentDeps.map((d)=>{
- if (d[turbopackError]) throw d[turbopackError];
- return d[turbopackExports];
- });
- const { promise, resolve } = createPromise();
- const fn = Object.assign(()=>resolve(getResult), {
- queueCount: 0
- });
- function fnQueue(q) {
- if (q !== queue && !depQueues.has(q)) {
- depQueues.add(q);
- if (q && q.status === 0) {
- fn.queueCount++;
- q.push(fn);
- }
- }
- }
- currentDeps.map((dep)=>dep[turbopackQueues](fnQueue));
- return fn.queueCount ? promise : getResult();
- }
- function asyncResult(err) {
- if (err) {
- reject(promise[turbopackError] = err);
- } else {
- resolve(promise[turbopackExports]);
- }
- resolveQueue(queue);
- }
- body(handleAsyncDependencies, asyncResult);
- if (queue && queue.status === -1) {
- queue.status = 0;
- }
-}
-contextPrototype.a = asyncModule;
-/**
- * A pseudo "fake" URL object to resolve to its relative path.
- *
- * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this
- * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid
- * hydration mismatch.
- *
- * This is based on webpack's existing implementation:
- * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js
- */ const relativeURL = function relativeURL(inputUrl) {
- const realUrl = new URL(inputUrl, 'x:/');
- const values = {};
- for(const key in realUrl)values[key] = realUrl[key];
- values.href = inputUrl;
- values.pathname = inputUrl.replace(/[?#].*/, '');
- values.origin = values.protocol = '';
- values.toString = values.toJSON = (..._args)=>inputUrl;
- for(const key in values)Object.defineProperty(this, key, {
- enumerable: true,
- configurable: true,
- value: values[key]
- });
-};
-relativeURL.prototype = URL.prototype;
-contextPrototype.U = relativeURL;
-/**
- * Utility function to ensure all variants of an enum are handled.
- */ function invariant(never, computeMessage) {
- throw new Error(`Invariant: ${computeMessage(never)}`);
-}
-/**
- * Constructs an error message for when a module factory is not available.
- */ function factoryNotAvailableMessage(moduleId, sourceType, sourceData) {
- let instantiationReason;
- switch(sourceType){
- case 0:
- instantiationReason = `as a runtime entry of chunk ${sourceData}`;
- break;
- case 1:
- instantiationReason = `because it was required from module ${sourceData}`;
- break;
- case 2:
- instantiationReason = 'because of an HMR update';
- break;
- default:
- invariant(sourceType, (sourceType)=>`Unknown source type: ${sourceType}`);
- }
- return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`;
-}
-/**
- * A stub function to make `require` available but non-functional in ESM.
- */ function requireStub(_moduleId) {
- throw new Error('dynamic usage of require is not supported');
-}
-contextPrototype.z = requireStub;
-// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.
-contextPrototype.g = globalThis;
-function applyModuleFactoryName(factory) {
- // Give the module factory a nice name to improve stack traces.
- Object.defineProperty(factory, 'name', {
- value: 'module evaluation'
- });
-}
-///
-/// A 'base' utilities to support runtime can have externals.
-/// Currently this is for node.js / edge runtime both.
-/// If a fn requires node.js specific behavior, it should be placed in `node-external-utils` instead.
-async function externalImport(id) {
- let raw;
- try {
- raw = await import(id);
- } catch (err) {
- // TODO(alexkirsz) This can happen when a client-side module tries to load
- // an external module we don't provide a shim for (e.g. querystring, url).
- // For now, we fail semi-silently, but in the future this should be a
- // compilation error.
- throw new Error(`Failed to load external module ${id}: ${err}`);
- }
- if (raw && raw.__esModule && raw.default && 'default' in raw.default) {
- return interopEsm(raw.default, createNS(raw), true);
- }
- return raw;
-}
-contextPrototype.y = externalImport;
-function externalRequire(id, thunk, esm = false) {
- let raw;
- try {
- raw = thunk();
- } catch (err) {
- // TODO(alexkirsz) This can happen when a client-side module tries to load
- // an external module we don't provide a shim for (e.g. querystring, url).
- // For now, we fail semi-silently, but in the future this should be a
- // compilation error.
- throw new Error(`Failed to load external module ${id}: ${err}`);
- }
- if (!esm || raw.__esModule) {
- return raw;
- }
- return interopEsm(raw, createNS(raw), true);
-}
-externalRequire.resolve = (id, options)=>{
- return require.resolve(id, options);
-};
-contextPrototype.x = externalRequire;
-/* eslint-disable @typescript-eslint/no-unused-vars */ const path = require('path');
-const relativePathToRuntimeRoot = path.relative(RUNTIME_PUBLIC_PATH, '.');
-// Compute the relative path to the `distDir`.
-const relativePathToDistRoot = path.join(relativePathToRuntimeRoot, RELATIVE_ROOT_PATH);
-const RUNTIME_ROOT = path.resolve(__filename, relativePathToRuntimeRoot);
-// Compute the absolute path to the root, by stripping distDir from the absolute path to this file.
-const ABSOLUTE_ROOT = path.resolve(__filename, relativePathToDistRoot);
-/**
- * Returns an absolute path to the given module path.
- * Module path should be relative, either path to a file or a directory.
- *
- * This fn allows to calculate an absolute path for some global static values, such as
- * `__dirname` or `import.meta.url` that Turbopack will not embeds in compile time.
- * See ImportMetaBinding::code_generation for the usage.
- */ function resolveAbsolutePath(modulePath) {
- if (modulePath) {
- return path.join(ABSOLUTE_ROOT, modulePath);
- }
- return ABSOLUTE_ROOT;
-}
-Context.prototype.P = resolveAbsolutePath;
-/* eslint-disable @typescript-eslint/no-unused-vars */ ///
-function readWebAssemblyAsResponse(path) {
- const { createReadStream } = require('fs');
- const { Readable } = require('stream');
- const stream = createReadStream(path);
- // @ts-ignore unfortunately there's a slight type mismatch with the stream.
- return new Response(Readable.toWeb(stream), {
- headers: {
- 'content-type': 'application/wasm'
- }
- });
-}
-async function compileWebAssemblyFromPath(path) {
- const response = readWebAssemblyAsResponse(path);
- return await WebAssembly.compileStreaming(response);
-}
-async function instantiateWebAssemblyFromPath(path, importsObj) {
- const response = readWebAssemblyAsResponse(path);
- const { instance } = await WebAssembly.instantiateStreaming(response, importsObj);
- return instance.exports;
-}
-/* eslint-disable @typescript-eslint/no-unused-vars */ ///
-///
-///
-///
-///
-/**
- * Base Node.js runtime shared between production and development.
- * Contains chunk loading, module caching, and other non-HMR functionality.
- */ process.env.TURBOPACK = '1';
-const url = require('url');
-const moduleFactories = new Map();
-const moduleCache = Object.create(null);
-/**
- * Returns an absolute path to the given module's id.
- */ function resolvePathFromModule(moduleId) {
- const exported = this.r(moduleId);
- const exportedPath = exported?.default ?? exported;
- if (typeof exportedPath !== 'string') {
- return exported;
- }
- const strippedAssetPrefix = exportedPath.slice(ASSET_PREFIX.length);
- const resolved = path.resolve(RUNTIME_ROOT, strippedAssetPrefix);
- return url.pathToFileURL(resolved).href;
-}
-/**
- * Exports a URL value. No suffix is added in Node.js runtime.
- */ function exportUrl(urlValue, id) {
- exportValue.call(this, urlValue, id);
-}
-function loadRuntimeChunk(sourcePath, chunkData) {
- if (typeof chunkData === 'string') {
- loadRuntimeChunkPath(sourcePath, chunkData);
- } else {
- loadRuntimeChunkPath(sourcePath, chunkData.path);
- }
-}
-const loadedChunks = new Set();
-const unsupportedLoadChunk = Promise.resolve(undefined);
-const loadedChunk = Promise.resolve(undefined);
-const chunkCache = new Map();
-function clearChunkCache() {
- chunkCache.clear();
- loadedChunks.clear();
-}
-function loadRuntimeChunkPath(sourcePath, chunkPath) {
- if (!isJs(chunkPath)) {
- // We only support loading JS chunks in Node.js.
- // This branch can be hit when trying to load a CSS chunk.
- return;
- }
- if (loadedChunks.has(chunkPath)) {
- return;
- }
- try {
- const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
- const chunkModules = require(resolved);
- installCompressedModuleFactories(chunkModules, 0, moduleFactories);
- loadedChunks.add(chunkPath);
- } catch (cause) {
- let errorMessage = `Failed to load chunk ${chunkPath}`;
- if (sourcePath) {
- errorMessage += ` from runtime for chunk ${sourcePath}`;
- }
- const error = new Error(errorMessage, {
- cause
- });
- error.name = 'ChunkLoadError';
- throw error;
- }
-}
-function loadChunkAsync(chunkData) {
- const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path;
- if (!isJs(chunkPath)) {
- // We only support loading JS chunks in Node.js.
- // This branch can be hit when trying to load a CSS chunk.
- return unsupportedLoadChunk;
- }
- let entry = chunkCache.get(chunkPath);
- if (entry === undefined) {
- try {
- // resolve to an absolute path to simplify `require` handling
- const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
- // TODO: consider switching to `import()` to enable concurrent chunk loading and async file io
- // However this is incompatible with hot reloading (since `import` doesn't use the require cache)
- const chunkModules = require(resolved);
- installCompressedModuleFactories(chunkModules, 0, moduleFactories);
- entry = loadedChunk;
- } catch (cause) {
- const errorMessage = `Failed to load chunk ${chunkPath} from module ${this.m.id}`;
- const error = new Error(errorMessage, {
- cause
- });
- error.name = 'ChunkLoadError';
- // Cache the failure promise, future requests will also get this same rejection
- entry = Promise.reject(error);
- }
- chunkCache.set(chunkPath, entry);
- }
- // TODO: Return an instrumented Promise that React can use instead of relying on referential equality.
- return entry;
-}
-contextPrototype.l = loadChunkAsync;
-function loadChunkAsyncByUrl(chunkUrl) {
- const path1 = url.fileURLToPath(new URL(chunkUrl, RUNTIME_ROOT));
- return loadChunkAsync.call(this, path1);
-}
-contextPrototype.L = loadChunkAsyncByUrl;
-function loadWebAssembly(chunkPath, _edgeModule, imports) {
- const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
- return instantiateWebAssemblyFromPath(resolved, imports);
-}
-contextPrototype.w = loadWebAssembly;
-function loadWebAssemblyModule(chunkPath, _edgeModule) {
- const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
- return compileWebAssemblyFromPath(resolved);
-}
-contextPrototype.u = loadWebAssemblyModule;
-/**
- * Creates a Node.js worker thread by instantiating the given WorkerConstructor
- * with the appropriate path and options, including forwarded globals.
- *
- * @param WorkerConstructor The Worker constructor from worker_threads
- * @param workerPath Path to the worker entry chunk
- * @param workerOptions options to pass to the Worker constructor (optional)
- */ function createWorker(WorkerConstructor, workerPath, workerOptions) {
- // Build the forwarded globals object
- const forwardedGlobals = {};
- for (const name of WORKER_FORWARDED_GLOBALS){
- forwardedGlobals[name] = globalThis[name];
- }
- // Merge workerData with forwarded globals
- const existingWorkerData = workerOptions?.workerData || {};
- const options = {
- ...workerOptions,
- workerData: {
- ...typeof existingWorkerData === 'object' ? existingWorkerData : {},
- __turbopack_globals__: forwardedGlobals
- }
- };
- return new WorkerConstructor(workerPath, options);
-}
-const regexJsUrl = /\.js(?:\?[^#]*)?(?:#.*)?$/;
-/**
- * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.
- */ function isJs(chunkUrlOrPath) {
- return regexJsUrl.test(chunkUrlOrPath);
-}
-///
-///
-///
-///
-/**
- * Shared HMR (Hot Module Replacement) implementation.
- *
- * This file contains the complete HMR implementation that's shared between
- * browser and Node.js runtimes. It manages module hot state, dependency
- * tracking, the module.hot API, and the full HMR update flow.
- */ /**
- * The development module cache shared across the runtime.
- * Browser runtime declares this directly.
- * Node.js runtime assigns globalThis.__turbopack_module_cache__ to this.
- */ let devModuleCache;
-/**
- * Module IDs that are instantiated as part of the runtime of a chunk.
- */ let runtimeModules;
-/**
- * Maps module IDs to persisted data between executions of their hot module
- * implementation (`hot.data`).
- */ const moduleHotData = new Map();
-/**
- * Maps module instances to their hot module state.
- * Uses WeakMap so it works with both HotModule and ModuleWithDirection.
- */ const moduleHotState = new WeakMap();
-/**
- * Modules that call `module.hot.invalidate()` (while being updated).
- */ const queuedInvalidatedModules = new Set();
-class UpdateApplyError extends Error {
- name = 'UpdateApplyError';
- dependencyChain;
- constructor(message, dependencyChain){
- super(message);
- this.dependencyChain = dependencyChain;
- }
-}
-/**
- * Records parent-child relationship when a module imports another.
- * Should be called during module instantiation.
- */ // eslint-disable-next-line @typescript-eslint/no-unused-vars
-function trackModuleImport(parentModule, childModuleId, childModule) {
- // Record that parent imports child
- if (parentModule.children.indexOf(childModuleId) === -1) {
- parentModule.children.push(childModuleId);
- }
- // Record that child is imported by parent
- if (childModule && childModule.parents.indexOf(parentModule.id) === -1) {
- childModule.parents.push(parentModule.id);
- }
-}
-function formatDependencyChain(dependencyChain) {
- return `Dependency chain: ${dependencyChain.join(' -> ')}`;
-}
-/**
- * Walks the dependency tree to find all modules affected by a change.
- * Returns information about whether the update can be accepted and which
- * modules need to be invalidated.
- *
- * @param moduleId - The module that changed
- * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept().
- * This is used for server-side HMR where pages auto-accept at the top level.
- */ function getAffectedModuleEffects(moduleId, autoAcceptRootModules) {
- const outdatedModules = new Set();
- const outdatedDependencies = new Map();
- const queue = [
- {
- moduleId,
- dependencyChain: []
- }
- ];
- let nextItem;
- while(nextItem = queue.shift()){
- const { moduleId, dependencyChain } = nextItem;
- if (moduleId != null) {
- if (outdatedModules.has(moduleId)) {
- continue;
- }
- outdatedModules.add(moduleId);
- }
- // We've arrived at the runtime of the chunk, which means that nothing
- // else above can accept this update.
- if (moduleId === undefined) {
- if (autoAcceptRootModules) {
- return {
- type: 'accepted',
- moduleId,
- outdatedModules,
- outdatedDependencies
- };
- }
- return {
- type: 'unaccepted',
- dependencyChain
- };
- }
- const module = devModuleCache[moduleId];
- const hotState = moduleHotState.get(module);
- if (// The module is not in the cache. Since this is a "modified" update,
- // it means that the module was never instantiated before.
- !module || hotState.selfAccepted && !hotState.selfInvalidated) {
- continue;
- }
- if (hotState.selfDeclined) {
- return {
- type: 'self-declined',
- dependencyChain,
- moduleId
- };
- }
- if (runtimeModules.has(moduleId)) {
- if (autoAcceptRootModules) {
- continue;
- }
- queue.push({
- moduleId: undefined,
- dependencyChain: [
- ...dependencyChain,
- moduleId
- ]
- });
- continue;
- }
- for (const parentId of module.parents){
- const parent = devModuleCache[parentId];
- if (!parent) {
- continue;
- }
- const parentHotState = moduleHotState.get(parent);
- // Check if parent declined this dependency
- if (parentHotState?.declinedDependencies[moduleId]) {
- return {
- type: 'declined',
- dependencyChain: [
- ...dependencyChain,
- moduleId
- ],
- moduleId,
- parentId
- };
- }
- // Skip if parent is already outdated
- if (outdatedModules.has(parentId)) {
- continue;
- }
- // Check if parent accepts this dependency
- if (parentHotState?.acceptedDependencies[moduleId]) {
- if (!outdatedDependencies.has(parentId)) {
- outdatedDependencies.set(parentId, new Set());
- }
- outdatedDependencies.get(parentId).add(moduleId);
- continue;
- }
- // Neither accepted nor declined — propagate to parent
- queue.push({
- moduleId: parentId,
- dependencyChain: [
- ...dependencyChain,
- moduleId
- ]
- });
- }
- // If no parents and we're at a root module, auto-accept if configured
- if (module.parents.length === 0 && autoAcceptRootModules) {
- continue;
- }
- }
- return {
- type: 'accepted',
- moduleId,
- outdatedModules,
- outdatedDependencies
- };
-}
-/**
- * Merges source dependency map into target dependency map.
- */ function mergeDependencies(target, source) {
- for (const [parentId, deps] of source){
- const existing = target.get(parentId);
- if (existing) {
- for (const dep of deps){
- existing.add(dep);
- }
- } else {
- target.set(parentId, new Set(deps));
- }
- }
-}
-/**
- * Computes all modules that need to be invalidated based on which modules changed.
- *
- * @param invalidated - The modules that have been invalidated
- * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept()
- */ function computedInvalidatedModules(invalidated, autoAcceptRootModules) {
- const outdatedModules = new Set();
- const outdatedDependencies = new Map();
- for (const moduleId of invalidated){
- const effect = getAffectedModuleEffects(moduleId, autoAcceptRootModules);
- switch(effect.type){
- case 'unaccepted':
- throw new UpdateApplyError(`cannot apply update: unaccepted module. ${formatDependencyChain(effect.dependencyChain)}.`, effect.dependencyChain);
- case 'self-declined':
- throw new UpdateApplyError(`cannot apply update: self-declined module. ${formatDependencyChain(effect.dependencyChain)}.`, effect.dependencyChain);
- case 'declined':
- throw new UpdateApplyError(`cannot apply update: declined dependency. ${formatDependencyChain(effect.dependencyChain)}. Declined by ${effect.parentId}.`, effect.dependencyChain);
- case 'accepted':
- for (const outdatedModuleId of effect.outdatedModules){
- outdatedModules.add(outdatedModuleId);
- }
- mergeDependencies(outdatedDependencies, effect.outdatedDependencies);
- break;
- default:
- invariant(effect, (effect)=>`Unknown effect type: ${effect?.type}`);
- }
- }
- return {
- outdatedModules,
- outdatedDependencies
- };
-}
-/**
- * Creates the module.hot API object and its internal state.
- * This provides the HMR API that user code calls (module.hot.accept(), etc.)
- */ function createModuleHot(moduleId, hotData) {
- const hotState = {
- selfAccepted: false,
- selfDeclined: false,
- selfInvalidated: false,
- disposeHandlers: [],
- acceptedDependencies: {},
- acceptedErrorHandlers: {},
- declinedDependencies: {}
- };
- const hot = {
- // TODO(alexkirsz) This is not defined in the HMR API. It was used to
- // decide whether to warn whenever an HMR-disposed module required other
- // modules. We might want to remove it.
- active: true,
- data: hotData ?? {},
- accept: (modules, callback, errorHandler)=>{
- if (modules === undefined) {
- hotState.selfAccepted = true;
- } else if (typeof modules === 'function') {
- hotState.selfAccepted = modules;
- } else if (typeof modules === 'object' && modules !== null) {
- for(let i = 0; i < modules.length; i++){
- hotState.acceptedDependencies[modules[i]] = callback || function() {};
- hotState.acceptedErrorHandlers[modules[i]] = errorHandler;
- }
- } else {
- hotState.acceptedDependencies[modules] = callback || function() {};
- hotState.acceptedErrorHandlers[modules] = errorHandler;
- }
- },
- decline: (dep)=>{
- if (dep === undefined) {
- hotState.selfDeclined = true;
- } else if (typeof dep === 'object' && dep !== null) {
- for(let i = 0; i < dep.length; i++){
- hotState.declinedDependencies[dep[i]] = true;
- }
- } else {
- hotState.declinedDependencies[dep] = true;
- }
- },
- dispose: (callback)=>{
- hotState.disposeHandlers.push(callback);
- },
- addDisposeHandler: (callback)=>{
- hotState.disposeHandlers.push(callback);
- },
- removeDisposeHandler: (callback)=>{
- const idx = hotState.disposeHandlers.indexOf(callback);
- if (idx >= 0) {
- hotState.disposeHandlers.splice(idx, 1);
- }
- },
- invalidate: ()=>{
- hotState.selfInvalidated = true;
- queuedInvalidatedModules.add(moduleId);
- },
- // NOTE(alexkirsz) This is part of the management API, which we don't
- // implement, but the Next.js React Refresh runtime uses this to decide
- // whether to schedule an update.
- status: ()=>'idle',
- // NOTE(alexkirsz) Since we always return "idle" for now, these are no-ops.
- addStatusHandler: (_handler)=>{},
- removeStatusHandler: (_handler)=>{},
- // NOTE(jridgewell) Check returns the list of updated modules, but we don't
- // want the webpack code paths to ever update (the turbopack paths handle
- // this already).
- check: ()=>Promise.resolve(null)
- };
- return {
- hot,
- hotState
- };
-}
-/**
- * Processes queued invalidated modules and adds them to the outdated modules set.
- * Modules that call module.hot.invalidate() are queued and processed here.
- *
- * @param outdatedModules - The current set of outdated modules
- * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept()
- */ function applyInvalidatedModules(outdatedModules, outdatedDependencies, autoAcceptRootModules) {
- if (queuedInvalidatedModules.size > 0) {
- const result = computedInvalidatedModules(queuedInvalidatedModules, autoAcceptRootModules);
- for (const moduleId of result.outdatedModules){
- outdatedModules.add(moduleId);
- }
- mergeDependencies(outdatedDependencies, result.outdatedDependencies);
- queuedInvalidatedModules.clear();
- }
- return {
- outdatedModules,
- outdatedDependencies
- };
-}
-/**
- * Computes which outdated modules have self-accepted and can be hot reloaded.
- */ function computeOutdatedSelfAcceptedModules(outdatedModules) {
- const outdatedSelfAcceptedModules = [];
- for (const moduleId of outdatedModules){
- const module = devModuleCache[moduleId];
- const hotState = moduleHotState.get(module);
- if (module && hotState?.selfAccepted && !hotState.selfInvalidated) {
- outdatedSelfAcceptedModules.push({
- moduleId,
- errorHandler: hotState.selfAccepted
- });
- }
- }
- return outdatedSelfAcceptedModules;
-}
-/**
- * Disposes of an instance of a module.
- * Runs hot.dispose handlers and manages persistent hot data.
- *
- * NOTE: mode = "replace" will not remove modules from devModuleCache.
- * This must be done in a separate step afterwards.
- */ function disposeModule(moduleId, mode) {
- const module = devModuleCache[moduleId];
- if (!module) {
- return;
- }
- const hotState = moduleHotState.get(module);
- if (!hotState) {
- return;
- }
- const data = {};
- // Run the `hot.dispose` handler, if any, passing in the persistent
- // `hot.data` object.
- for (const disposeHandler of hotState.disposeHandlers){
- disposeHandler(data);
- }
- // This used to warn in `getOrInstantiateModuleFromParent` when a disposed
- // module is still importing other modules.
- if (module.hot) {
- module.hot.active = false;
- }
- moduleHotState.delete(module);
- // Remove the disposed module from its children's parent list.
- // It will be added back once the module re-instantiates and imports its
- // children again.
- for (const childId of module.children){
- const child = devModuleCache[childId];
- if (!child) {
- continue;
- }
- const idx = child.parents.indexOf(module.id);
- if (idx >= 0) {
- child.parents.splice(idx, 1);
- }
- }
- switch(mode){
- case 'clear':
- delete devModuleCache[module.id];
- moduleHotData.delete(module.id);
- break;
- case 'replace':
- moduleHotData.set(module.id, data);
- break;
- default:
- invariant(mode, (mode)=>`invalid mode: ${mode}`);
- }
-}
-/**
- * Dispose phase: runs dispose handlers and cleans up outdated/disposed modules.
- * Returns the parent modules of outdated modules for use in the apply phase.
- */ function disposePhase(outdatedModules, disposedModules, outdatedDependencies) {
- for (const moduleId of outdatedModules){
- disposeModule(moduleId, 'replace');
- }
- for (const moduleId of disposedModules){
- disposeModule(moduleId, 'clear');
- }
- // Removing modules from the module cache is a separate step.
- // We also want to keep track of previous parents of the outdated modules.
- const outdatedModuleParents = new Map();
- for (const moduleId of outdatedModules){
- const oldModule = devModuleCache[moduleId];
- outdatedModuleParents.set(moduleId, oldModule?.parents);
- delete devModuleCache[moduleId];
- }
- // Remove outdated dependencies from parent module's children list.
- // When a parent accepts a child's update, the child is re-instantiated
- // but the parent stays alive. We remove the old child reference so it
- // gets re-added when the child re-imports.
- for (const [parentId, deps] of outdatedDependencies){
- const module = devModuleCache[parentId];
- if (module) {
- for (const dep of deps){
- const idx = module.children.indexOf(dep);
- if (idx >= 0) {
- module.children.splice(idx, 1);
- }
- }
- }
- }
- return {
- outdatedModuleParents
- };
-}
-/* eslint-disable @typescript-eslint/no-unused-vars */ /**
- * Shared module instantiation logic.
- * This handles the full module instantiation flow for both browser and Node.js.
- * Only React Refresh hooks differ between platforms (passed as callback).
- */ function instantiateModuleShared(moduleId, sourceType, sourceData, moduleFactories, devModuleCache, runtimeModules, createModuleObjectFn, createContextFn, runModuleExecutionHooksFn) {
- // 1. Factory validation (same in both browser and Node.js)
- const id = moduleId;
- const moduleFactory = moduleFactories.get(id);
- if (typeof moduleFactory !== 'function') {
- throw new Error(factoryNotAvailableMessage(moduleId, sourceType, sourceData) + `\nThis is often caused by a stale browser cache, misconfigured Cache-Control headers, or a service worker serving outdated responses.` + `\nTo fix this, make sure your Cache-Control headers allow revalidation of chunks and review your service worker configuration. ` + `As an immediate workaround, try hard-reloading the page, clearing the browser cache, or unregistering any service workers.`);
- }
- // 2. Hot API setup (same in both - works for browser, included for Node.js)
- const hotData = moduleHotData.get(id);
- const { hot, hotState } = createModuleHot(id, hotData);
- // 3. Parent assignment logic (same in both)
- let parents;
- switch(sourceType){
- case SourceType.Runtime:
- runtimeModules.add(id);
- parents = [];
- break;
- case SourceType.Parent:
- parents = [
- sourceData
- ];
- break;
- case SourceType.Update:
- parents = sourceData || [];
- break;
- default:
- throw new Error(`Unknown source type: ${sourceType}`);
- }
- // 4. Module creation (platform creates base module object)
- const module = createModuleObjectFn(id);
- const exports = module.exports;
- module.parents = parents;
- module.children = [];
- module.hot = hot;
- devModuleCache[id] = module;
- moduleHotState.set(module, hotState);
- // 5. Module execution (React Refresh hooks are platform-specific)
- try {
- runModuleExecutionHooksFn(module, (refresh)=>{
- const context = createContextFn(module, exports, refresh);
- moduleFactory.call(exports, context, module, exports);
- });
- } catch (error) {
- module.error = error;
- throw error;
- }
- // 6. ESM interop (same in both)
- if (module.namespaceObject && module.exports !== module.namespaceObject) {
- // in case of a circular dependency: cjs1 -> esm2 -> cjs1
- interopEsm(module.exports, module.namespaceObject);
- }
- return module;
-}
-/**
- * Analyzes update entries and chunks to determine which modules were added, modified, or deleted.
- * This is pure logic that doesn't depend on the runtime environment.
- */ function computeChangedModules(entries, updates, chunkModulesMap) {
- const chunksAdded = new Map();
- const chunksDeleted = new Map();
- const added = new Map();
- const modified = new Map();
- const deleted = new Set();
- for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates)){
- switch(mergedChunkUpdate.type){
- case 'added':
- {
- const updateAdded = new Set(mergedChunkUpdate.modules);
- for (const moduleId of updateAdded){
- added.set(moduleId, entries[moduleId]);
- }
- chunksAdded.set(chunkPath, updateAdded);
- break;
- }
- case 'deleted':
- {
- const updateDeleted = chunkModulesMap ? new Set(chunkModulesMap.get(chunkPath)) : new Set();
- for (const moduleId of updateDeleted){
- deleted.add(moduleId);
- }
- chunksDeleted.set(chunkPath, updateDeleted);
- break;
- }
- case 'partial':
- {
- const updateAdded = new Set(mergedChunkUpdate.added);
- const updateDeleted = new Set(mergedChunkUpdate.deleted);
- for (const moduleId of updateAdded){
- added.set(moduleId, entries[moduleId]);
- }
- for (const moduleId of updateDeleted){
- deleted.add(moduleId);
- }
- chunksAdded.set(chunkPath, updateAdded);
- chunksDeleted.set(chunkPath, updateDeleted);
- break;
- }
- default:
- throw new Error('Unknown merged chunk update type');
- }
- }
- // If a module was added from one chunk and deleted from another in the same update,
- // consider it to be modified, as it means the module was moved from one chunk to another
- // AND has new code in a single update.
- for (const moduleId of added.keys()){
- if (deleted.has(moduleId)) {
- added.delete(moduleId);
- deleted.delete(moduleId);
- }
- }
- for (const [moduleId, entry] of Object.entries(entries)){
- // Modules that haven't been added to any chunk but have new code are considered
- // to be modified.
- // This needs to be under the previous loop, as we need it to get rid of modules
- // that were added and deleted in the same update.
- if (!added.has(moduleId)) {
- modified.set(moduleId, entry);
- }
- }
- return {
- added,
- deleted,
- modified,
- chunksAdded,
- chunksDeleted
- };
-}
-/**
- * Compiles new module code and walks the dependency tree to find all outdated modules.
- * Uses the evalModuleEntry function to compile code (platform-specific).
- *
- * @param added - Map of added modules
- * @param modified - Map of modified modules
- * @param evalModuleEntry - Function to compile module code
- * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept()
- */ function computeOutdatedModules(added, modified, evalModuleEntry, autoAcceptRootModules) {
- const newModuleFactories = new Map();
- // Compile added modules
- for (const [moduleId, entry] of added){
- if (entry != null) {
- newModuleFactories.set(moduleId, evalModuleEntry(entry));
- }
- }
- // Walk dependency tree to find all modules affected by modifications
- const { outdatedModules, outdatedDependencies } = computedInvalidatedModules(modified.keys(), autoAcceptRootModules);
- // Compile modified modules
- for (const [moduleId, entry] of modified){
- newModuleFactories.set(moduleId, evalModuleEntry(entry));
- }
- return {
- outdatedModules,
- outdatedDependencies,
- newModuleFactories
- };
-}
-/**
- * Updates module factories and re-instantiates self-accepted modules.
- * Uses the instantiateModule function (platform-specific via callback).
- */ function applyPhase(outdatedSelfAcceptedModules, newModuleFactories, outdatedModuleParents, outdatedDependencies, moduleFactories, devModuleCache, instantiateModuleFn, applyModuleFactoryNameFn, reportError) {
- // Update module factories
- for (const [moduleId, factory] of newModuleFactories.entries()){
- applyModuleFactoryNameFn(factory);
- moduleFactories.set(moduleId, factory);
- }
- // TODO(alexkirsz) Run new runtime entries here.
- // Call accept handlers for outdated dependencies.
- // This runs BEFORE re-instantiating self-accepted modules, matching
- // webpack's behavior.
- for (const [parentId, deps] of outdatedDependencies){
- const module = devModuleCache[parentId];
- if (!module) continue;
- const hotState = moduleHotState.get(module);
- if (!hotState) continue;
- // Group deps by callback, deduplicating callbacks that handle multiple deps.
- // Each callback receives only the deps it was registered for.
- const callbackDeps = new Map();
- const callbackErrorHandlers = new Map();
- for (const dep of deps){
- const acceptCallback = hotState.acceptedDependencies[dep];
- if (acceptCallback) {
- let depList = callbackDeps.get(acceptCallback);
- if (!depList) {
- depList = [];
- callbackDeps.set(acceptCallback, depList);
- callbackErrorHandlers.set(acceptCallback, hotState.acceptedErrorHandlers[dep]);
- }
- depList.push(dep);
- }
- }
- for (const [callback, cbDeps] of callbackDeps){
- try {
- callback.call(null, cbDeps);
- } catch (err) {
- const errorHandler = callbackErrorHandlers.get(callback);
- if (typeof errorHandler === 'function') {
- try {
- errorHandler(err, {
- moduleId: parentId,
- dependencyId: cbDeps[0]
- });
- } catch (err2) {
- reportError(err2);
- reportError(err);
- }
- } else {
- reportError(err);
- }
- }
- }
- }
- // Re-instantiate all outdated self-accepted modules
- for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules){
- try {
- instantiateModuleFn(moduleId, SourceType.Update, outdatedModuleParents.get(moduleId));
- } catch (err) {
- if (typeof errorHandler === 'function') {
- try {
- errorHandler(err, {
- moduleId,
- module: devModuleCache[moduleId]
- });
- } catch (err2) {
- reportError(err2);
- reportError(err);
- }
- } else {
- reportError(err);
- }
- }
- }
-}
-/**
- * Internal implementation that orchestrates the full HMR update flow:
- * invalidation, disposal, and application of new modules.
- *
- * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept()
- */ function applyInternal(outdatedModules, outdatedDependencies, disposedModules, newModuleFactories, moduleFactories, devModuleCache, instantiateModuleFn, applyModuleFactoryNameFn, autoAcceptRootModules) {
- ;
- ({ outdatedModules, outdatedDependencies } = applyInvalidatedModules(outdatedModules, outdatedDependencies, autoAcceptRootModules));
- // Find self-accepted modules to re-instantiate
- const outdatedSelfAcceptedModules = computeOutdatedSelfAcceptedModules(outdatedModules);
- // Run dispose handlers, save hot.data, clear caches
- const { outdatedModuleParents } = disposePhase(outdatedModules, disposedModules, outdatedDependencies);
- let error;
- function reportError(err) {
- if (!error) error = err; // Keep first error
- }
- applyPhase(outdatedSelfAcceptedModules, newModuleFactories, outdatedModuleParents, outdatedDependencies, moduleFactories, devModuleCache, instantiateModuleFn, applyModuleFactoryNameFn, reportError);
- if (error) {
- throw error;
- }
- // Recursively apply any queued invalidations from new module execution
- if (queuedInvalidatedModules.size > 0) {
- applyInternal(new Set(), new Map(), [], new Map(), moduleFactories, devModuleCache, instantiateModuleFn, applyModuleFactoryNameFn, autoAcceptRootModules);
- }
-}
-/**
- * Main entry point for applying an ECMAScript merged update.
- * This is called by both browser and Node.js runtimes with platform-specific callbacks.
- *
- * @param options.autoAcceptRootModules - If true, root modules auto-accept updates without explicit
- * module.hot.accept(). Used for server-side HMR where pages
- * auto-accept at the top level.
- */ function applyEcmascriptMergedUpdateShared(options) {
- const { added, modified, disposedModules, evalModuleEntry, instantiateModule, applyModuleFactoryName, moduleFactories, devModuleCache, autoAcceptRootModules } = options;
- const { outdatedModules, outdatedDependencies, newModuleFactories } = computeOutdatedModules(added, modified, evalModuleEntry, autoAcceptRootModules);
- applyInternal(outdatedModules, outdatedDependencies, disposedModules, newModuleFactories, moduleFactories, devModuleCache, instantiateModule, applyModuleFactoryName, autoAcceptRootModules);
-}
-/* eslint-disable @typescript-eslint/no-unused-vars */ ///
-///
-///
-/**
- * Development Node.js runtime.
- * Uses HotModule and shared HMR logic for hot module replacement support.
- */ // Cast the module cache to HotModule for development mode
-// (hmr-runtime.ts declares devModuleCache as `let` variable expecting assignment)
-// This is safe because HotModule extends Module
-devModuleCache = moduleCache;
-// this is read in runtime-utils.ts so it creates a module with direction for hmr
-createModuleWithDirectionFlag = true;
-if (!globalThis.__turbopack_runtime_modules__) {
- globalThis.__turbopack_runtime_modules__ = new Set();
-}
-runtimeModules = globalThis.__turbopack_runtime_modules__;
-const nodeDevContextPrototype = Context.prototype;
-nodeDevContextPrototype.q = exportUrl;
-nodeDevContextPrototype.M = moduleFactories;
-nodeDevContextPrototype.c = devModuleCache;
-nodeDevContextPrototype.R = resolvePathFromModule;
-nodeDevContextPrototype.b = createWorker;
-nodeDevContextPrototype.C = clearChunkCache;
-/**
- * Instantiates a module in development mode using shared HMR logic.
- */ function instantiateModule(id, sourceType, sourceData) {
- // Node.js: creates base module object (hot API added by shared code)
- const createModuleObjectFn = (moduleId)=>{
- return createModuleWithDirection(moduleId);
- };
- // Node.js: creates Context (no refresh parameter)
- const createContext = (module1, exports, _refresh)=>{
- return new Context(module1, exports);
- };
- // Node.js: no hooks wrapper, just execute directly
- const runWithHooks = (module1, exec)=>{
- exec(undefined); // no refresh context
- };
- // Use shared instantiation logic (includes hot API setup)
- const newModule = instantiateModuleShared(id, sourceType, sourceData, moduleFactories, devModuleCache, runtimeModules, createModuleObjectFn, createContext, runWithHooks);
- newModule.loaded = true;
- return newModule;
-}
-/**
- * Instantiates a runtime module in development mode.
- */ function instantiateRuntimeModule(chunkPath, moduleId) {
- return instantiateModule(moduleId, SourceType.Runtime, chunkPath);
-}
-/**
- * Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.
- */ // @ts-ignore TypeScript doesn't separate this module space from the browser runtime
-function getOrInstantiateRuntimeModule(chunkPath, moduleId) {
- const module1 = devModuleCache[moduleId];
- if (module1) {
- if (module1.error) {
- throw module1.error;
- }
- return module1;
- }
- return instantiateRuntimeModule(chunkPath, moduleId);
-}
-/**
- * Retrieves a module from the cache, or instantiate it if it is not cached.
- * Also tracks parent-child relationships for HMR dependency tracking.
- */ // @ts-ignore
-function getOrInstantiateModuleFromParent(id, sourceModule) {
- // Track parent-child relationship
- trackModuleImport(sourceModule, id, devModuleCache[id]);
- const module1 = devModuleCache[id];
- if (module1) {
- if (module1.error) {
- throw module1.error;
- }
- return module1;
- }
- const newModule = instantiateModule(id, SourceType.Parent, sourceModule.id);
- // Track again after instantiation to ensure the relationship is recorded
- trackModuleImport(sourceModule, id, newModule);
- return newModule;
-}
-module.exports = (sourcePath)=>({
- m: (id)=>getOrInstantiateRuntimeModule(sourcePath, id),
- c: (chunkData)=>loadRuntimeChunk(sourcePath, chunkData)
- });
-///
-///
-/* eslint-disable @typescript-eslint/no-unused-vars */ /**
- * Appends the module code with //# sourceURL and //# sourceMappingURL so
- * that Node.js can resolve stack frames from `eval`ed server HMR modules back to
- * their original source files. Mirrors the browser's _eval in dev-backend-dom.ts.
- */ function inlineSourcemaps(entry) {
- const [chunkPath, moduleId] = entry.url.split('?', 2);
- const absolutePath = path.resolve(RUNTIME_ROOT, chunkPath);
- const fileHref = url.pathToFileURL(absolutePath).href;
- const sourceURL = moduleId ? `${fileHref}?${moduleId}` : fileHref;
- let code = entry.code + '\n\n//# sourceURL=' + sourceURL;
- if (entry.map) {
- code += '\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,' + Buffer.from(entry.map).toString('base64');
- }
- return code;
-}
-let serverHmrUpdateHandler = null;
-function initializeServerHmr(moduleFactories, devModuleCache) {
- if (serverHmrUpdateHandler != null) {
- throw new Error('[Server HMR] Server HMR client is already initialized');
- }
- // Register the update handler for the server runtime
- serverHmrUpdateHandler = (msg)=>{
- handleNodejsUpdate(msg, moduleFactories, devModuleCache);
- };
-}
-/**
- * Emits an HMR message to the registered update handler.
- * Node uses a simpler listener pattern than the browser's websocket connection.
- *
- * Note: This is only called via __turbopack_server_hmr_apply__ which ensures
- * the handler is initialized first via ensureHmrClientInitialized().
- */ function emitMessage(msg) {
- if (serverHmrUpdateHandler == null) {
- console.warn('[Server HMR] No update handler registered to receive message:', msg);
- return false;
- }
- try {
- serverHmrUpdateHandler(msg.data);
- return true;
- } catch (err) {
- console.error('[Server HMR] Listener error:', err);
- return false;
- }
-}
-/**
- * Handles server message updates and applies them to the Node.js runtime.
- * Uses shared HMR update logic from hmr-runtime.ts.
- */ function handleNodejsUpdate(msg, moduleFactories, devModuleCache) {
- if (msg.type !== 'partial') {
- return;
- }
- const instruction = msg.instruction;
- if (instruction.type !== 'EcmascriptMergedUpdate') {
- return;
- }
- try {
- const { entries = {}, chunks = {} } = instruction;
- const evalModuleEntry = (entry)=>{
- // eslint-disable-next-line no-eval
- return (0, eval)(entry.map ? inlineSourcemaps(entry) : entry.code);
- };
- const { added, modified } = computeChangedModules(entries, chunks, undefined // no chunkModulesMap for Node.js
- );
- // Use shared HMR update implementation
- applyEcmascriptMergedUpdateShared({
- added,
- modified,
- disposedModules: [],
- evalModuleEntry,
- instantiateModule,
- applyModuleFactoryName: ()=>{},
- moduleFactories,
- devModuleCache,
- autoAcceptRootModules: true
- });
- } catch (e) {
- console.error('[Server HMR] Update failed, full reload needed:', e);
- throw e;
- }
-}
-///
-///
-/**
- * Note: hmr-runtime.ts is embedded before this file, so its functions
- * (initializeServerHmr, emitMessage) are available in the same scope.
- */ // Initialize server HMR client (connects to shared HMR infrastructure)
-let hmrClientInitialized = false;
-function ensureHmrClientInitialized() {
- if (hmrClientInitialized) return;
- hmrClientInitialized = true;
- // initializeServerHmr is from hmr-client.ts (embedded before this file)
- // moduleFactories is from dev-runtime.ts
- // devModuleCache is the HotModule-typed cache from dev-runtime.ts
- initializeServerHmr(moduleFactories, devModuleCache);
-}
-function __turbopack_server_hmr_apply__(update) {
- try {
- ensureHmrClientInitialized();
- // emitMessage returns false if any listener failed to apply the update
- return emitMessage({
- type: 'turbopack-message',
- data: update
- });
- } catch (err) {
- console.error('[Server HMR] Failed to apply update:', err);
- return false;
- }
-}
-const handlers = globalThis.__turbopack_server_hmr_handlers__ ?? new Map();
-const chunkPrefix = path.relative(RUNTIME_ROOT, path.dirname(__filename));
-if (handlers.size === 0) {
- // First registration in this generation: install the routing dispatcher.
- globalThis.__turbopack_server_hmr_apply__ = (update)=>{
- const registry = globalThis.__turbopack_server_hmr_handlers__ ?? new Map();
- const updateChunkPaths = Object.keys(update.instruction?.chunks ?? {});
- const toCall = [];
- if (updateChunkPaths.length === 0) {
- for (const entry of registry.values())toCall.push(entry);
- } else {
- const seen = new Set();
- for (const chunkPath of updateChunkPaths){
- const dir = path.dirname(chunkPath);
- for (const [key, entry] of registry){
- if (dir === entry.chunkPrefix && !seen.has(key)) {
- seen.add(key);
- toCall.push(entry);
- }
- }
- }
- }
- let applied = false;
- for (const { handler } of toCall){
- try {
- if (handler(update)) applied = true;
- } catch (err) {
- console.error('[Server HMR] Handler error:', err);
- }
- }
- return applied;
- };
-}
-globalThis.__turbopack_server_hmr_handlers__ = handlers;
-handlers.set(__filename, {
- handler: __turbopack_server_hmr_apply__,
- chunkPrefix
-});
-
-
-//# sourceMappingURL=%5Bturbopack%5D_runtime.js.map
\ No newline at end of file
diff --git a/.next/dev/build/chunks/[turbopack]_runtime.js.map b/.next/dev/build/chunks/[turbopack]_runtime.js.map
deleted file mode 100644
index 40882cb..0000000
--- a/.next/dev/build/chunks/[turbopack]_runtime.js.map
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "version": 3,
- "sources": [],
- "sections": [
- {"offset": {"line": 4, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime/runtime-utils.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * TurboPack ECMAScript runtimes.\n *\n * It will be prepended to the runtime code of each runtime.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n\ntype EsmNamespaceObject = Record\n\n/**\n * Describes why a module was instantiated.\n * Shared between browser and Node.js runtimes.\n */\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\n\n// @ts-ignore Defined in `dev-base.ts`\ndeclare function getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: M\n): M\n\n// @ts-ignore Defined in `hmr-runtime.ts` (dev mode only)\ndeclare let devModuleCache: Record | undefined\n\n/**\n * Flag indicating which module object type to create when a module is merged. Set to `true`\n * by each runtime that uses ModuleWithDirection (browser dev-base.ts, nodejs dev-base.ts,\n * nodejs build-base.ts). Browser production (build-base.ts) leaves it as `false` since it\n * uses plain Module objects.\n */\nlet createModuleWithDirectionFlag = false\n\nconst REEXPORTED_OBJECTS = new WeakMap()\n\n/**\n * Constructs the `__turbopack_context__` object for a module.\n */\nfunction Context(\n this: TurbopackBaseContext,\n module: Module,\n exports: Exports\n) {\n this.m = module\n // We need to store this here instead of accessing it from the module object to:\n // 1. Make it available to factories directly, since we rewrite `this` to\n // `__turbopack_context__.e` in CJS modules.\n // 2. Support async modules which rewrite `module.exports` to a promise, so we\n // can still access the original exports object from functions like\n // `esmExport`\n // Ideally we could find a new approach for async modules and drop this property altogether.\n this.e = exports\n}\nconst contextPrototype = Context.prototype as TurbopackBaseContext\n\ntype ModuleContextMap = Record\n\ninterface ModuleContextEntry {\n id: () => ModuleId\n module: () => any\n}\n\ninterface ModuleContext {\n // require call\n (moduleId: string): Exports | EsmNamespaceObject\n\n // async import call\n import(moduleId: string): Promise\n\n keys(): ModuleId[]\n\n resolve(moduleId: string): ModuleId\n}\n\ntype GetOrInstantiateModuleFromParent = (\n moduleId: M['id'],\n parentModule: M\n) => M\n\ndeclare function getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty\nconst toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag\n\nfunction defineProp(\n obj: any,\n name: PropertyKey,\n options: PropertyDescriptor & ThisType\n) {\n if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options)\n}\n\nfunction getOverwrittenModule(\n moduleCache: ModuleCache,\n id: ModuleId\n): Module {\n let module = moduleCache[id]\n if (!module) {\n if (createModuleWithDirectionFlag) {\n // set in development modes for hmr support\n module = createModuleWithDirection(id)\n } else {\n module = createModuleObject(id)\n }\n moduleCache[id] = module\n }\n return module\n}\n\n/**\n * Creates the module object. Only done here to ensure all module objects have the same shape.\n */\nfunction createModuleObject(id: ModuleId): Module {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n }\n}\n\nfunction createModuleWithDirection(id: ModuleId): ModuleWithDirection {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n parents: [],\n children: [],\n }\n}\n\ntype BindingTag = 0\nconst BindingTag_Value = 0 as BindingTag\n\n// an arbitrary sequence of bindings as\n// - a prop name\n// - BindingTag_Value, a value to be bound directly, or\n// - 1 or 2 functions to bind as getters and sdetters\ntype EsmBindings = Array<\n string | BindingTag | (() => unknown) | ((v: unknown) => void) | unknown\n>\n\n/**\n * Adds the getters to the exports object.\n */\nfunction esm(exports: Exports, bindings: EsmBindings) {\n defineProp(exports, '__esModule', { value: true })\n if (toStringTag) defineProp(exports, toStringTag, { value: 'Module' })\n let i = 0\n while (i < bindings.length) {\n const propName = bindings[i++] as string\n const tagOrFunction = bindings[i++]\n if (typeof tagOrFunction === 'number') {\n if (tagOrFunction === BindingTag_Value) {\n defineProp(exports, propName, {\n value: bindings[i++],\n enumerable: true,\n writable: false,\n })\n } else {\n throw new Error(`unexpected tag: ${tagOrFunction}`)\n }\n } else {\n const getterFn = tagOrFunction as () => unknown\n if (typeof bindings[i] === 'function') {\n const setterFn = bindings[i++] as (v: unknown) => void\n defineProp(exports, propName, {\n get: getterFn,\n set: setterFn,\n enumerable: true,\n })\n } else {\n defineProp(exports, propName, {\n get: getterFn,\n enumerable: true,\n })\n }\n }\n }\n Object.seal(exports)\n}\n\n/**\n * Makes the module an ESM with exports\n */\nfunction esmExport(\n this: TurbopackBaseContext,\n bindings: EsmBindings,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Module['exports']\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n module.namespaceObject = exports\n esm(exports, bindings)\n}\ncontextPrototype.s = esmExport\n\ntype ReexportedObjects = Record[]\nfunction ensureDynamicExports(\n module: Module,\n exports: Exports\n): ReexportedObjects {\n let reexportedObjects: ReexportedObjects | undefined =\n REEXPORTED_OBJECTS.get(module)\n\n if (!reexportedObjects) {\n REEXPORTED_OBJECTS.set(module, (reexportedObjects = []))\n module.exports = module.namespaceObject = new Proxy(exports, {\n get(target, prop) {\n if (\n hasOwnProperty.call(target, prop) ||\n prop === 'default' ||\n prop === '__esModule'\n ) {\n return Reflect.get(target, prop)\n }\n for (const obj of reexportedObjects!) {\n const value = Reflect.get(obj, prop)\n if (value !== undefined) return value\n }\n return undefined\n },\n ownKeys(target) {\n const keys = Reflect.ownKeys(target)\n for (const obj of reexportedObjects!) {\n for (const key of Reflect.ownKeys(obj)) {\n if (key !== 'default' && !keys.includes(key)) keys.push(key)\n }\n }\n return keys\n },\n })\n }\n return reexportedObjects\n}\n\n/**\n * Dynamically exports properties from an object\n */\nfunction dynamicExport(\n this: TurbopackBaseContext,\n object: Record,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Exports\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n const reexportedObjects = ensureDynamicExports(module, exports)\n\n if (typeof object === 'object' && object !== null) {\n reexportedObjects.push(object)\n }\n}\ncontextPrototype.j = dynamicExport\n\nfunction exportValue(\n this: TurbopackBaseContext,\n value: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = value\n}\ncontextPrototype.v = exportValue\n\nfunction exportNamespace(\n this: TurbopackBaseContext,\n namespace: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = module.namespaceObject = namespace\n}\ncontextPrototype.n = exportNamespace\n\nfunction createGetter(obj: Record, key: string | symbol) {\n return () => obj[key]\n}\n\n/**\n * @returns prototype of the object\n */\nconst getProto: (obj: any) => any = Object.getPrototypeOf\n ? (obj) => Object.getPrototypeOf(obj)\n : (obj) => obj.__proto__\n\n/** Prototypes that are not expanded for exports */\nconst LEAF_PROTOTYPES = [null, getProto({}), getProto([]), getProto(getProto)]\n\n/**\n * @param raw\n * @param ns\n * @param allowExportDefault\n * * `false`: will have the raw module as default export\n * * `true`: will have the default property as default export\n */\nfunction interopEsm(\n raw: Exports,\n ns: EsmNamespaceObject,\n allowExportDefault?: boolean\n) {\n const bindings: EsmBindings = []\n let defaultLocation = -1\n for (\n let current = raw;\n (typeof current === 'object' || typeof current === 'function') &&\n !LEAF_PROTOTYPES.includes(current);\n current = getProto(current)\n ) {\n for (const key of Object.getOwnPropertyNames(current)) {\n bindings.push(key, createGetter(raw, key))\n if (defaultLocation === -1 && key === 'default') {\n defaultLocation = bindings.length - 1\n }\n }\n }\n\n // this is not really correct\n // we should set the `default` getter if the imported module is a `.cjs file`\n if (!(allowExportDefault && defaultLocation >= 0)) {\n // Replace the binding with one for the namespace itself in order to preserve iteration order.\n if (defaultLocation >= 0) {\n // Replace the getter with the value\n bindings.splice(defaultLocation, 1, BindingTag_Value, raw)\n } else {\n bindings.push('default', BindingTag_Value, raw)\n }\n }\n\n esm(ns, bindings)\n return ns\n}\n\nfunction createNS(raw: Module['exports']): EsmNamespaceObject {\n if (typeof raw === 'function') {\n return function (this: any, ...args: any[]) {\n return raw.apply(this, args)\n }\n } else {\n return Object.create(null)\n }\n}\n\nfunction esmImport(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exclude {\n const module = getOrInstantiateModuleFromParent(id, this.m)\n\n // any ES module has to have `module.namespaceObject` defined.\n if (module.namespaceObject) return module.namespaceObject\n\n // only ESM can be an async module, so we don't need to worry about exports being a promise here.\n const raw = module.exports\n return (module.namespaceObject = interopEsm(\n raw,\n createNS(raw),\n raw && (raw as any).__esModule\n ))\n}\ncontextPrototype.i = esmImport\n\nfunction asyncLoader(\n this: TurbopackBaseContext,\n moduleId: ModuleId\n): Promise {\n const loader = this.r(moduleId) as (\n importFunction: EsmImport\n ) => Promise\n return loader(esmImport.bind(this))\n}\ncontextPrototype.A = asyncLoader\n\n// Add a simple runtime require so that environments without one can still pass\n// `typeof require` CommonJS checks so that exports are correctly registered.\nconst runtimeRequire =\n // @ts-ignore\n typeof require === 'function'\n ? // @ts-ignore\n require\n : function require() {\n throw new Error('Unexpected use of runtime require')\n }\ncontextPrototype.t = runtimeRequire\n\nfunction commonJsRequire(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exports {\n return getOrInstantiateModuleFromParent(id, this.m).exports\n}\ncontextPrototype.r = commonJsRequire\n\n/**\n * Remove fragments and query parameters since they are never part of the context map keys\n *\n * This matches how we parse patterns at resolving time. Arguably we should only do this for\n * strings passed to `import` but the resolve does it for `import` and `require` and so we do\n * here as well.\n */\nfunction parseRequest(request: string): string {\n // Per the URI spec fragments can contain `?` characters, so we should trim it off first\n // https://datatracker.ietf.org/doc/html/rfc3986#section-3.5\n const hashIndex = request.indexOf('#')\n if (hashIndex !== -1) {\n request = request.substring(0, hashIndex)\n }\n\n const queryIndex = request.indexOf('?')\n if (queryIndex !== -1) {\n request = request.substring(0, queryIndex)\n }\n\n return request\n}\n/**\n * `require.context` and require/import expression runtime.\n */\nfunction moduleContext(map: ModuleContextMap): ModuleContext {\n function moduleContext(id: string): Exports {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].module()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.keys = (): string[] => {\n return Object.keys(map)\n }\n\n moduleContext.resolve = (id: string): ModuleId => {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].id()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.import = async (id: string) => {\n return await (moduleContext(id) as Promise)\n }\n\n return moduleContext\n}\ncontextPrototype.f = moduleContext\n\n/**\n * Returns the path of a chunk defined by its data.\n */\nfunction getChunkPath(chunkData: ChunkData): ChunkPath {\n return typeof chunkData === 'string' ? chunkData : chunkData.path\n}\n\nfunction isPromise(maybePromise: any): maybePromise is Promise {\n return (\n maybePromise != null &&\n typeof maybePromise === 'object' &&\n 'then' in maybePromise &&\n typeof maybePromise.then === 'function'\n )\n}\n\nfunction isAsyncModuleExt(obj: T): obj is AsyncModuleExt & T {\n return turbopackQueues in obj\n}\n\nfunction createPromise() {\n let resolve: (value: T | PromiseLike) => void\n let reject: (reason?: any) => void\n\n const promise = new Promise((res, rej) => {\n reject = rej\n resolve = res\n })\n\n return {\n promise,\n resolve: resolve!,\n reject: reject!,\n }\n}\n\n// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.\n// The CompressedModuleFactories format is\n// - 1 or more module ids\n// - a module factory function\n// So walking this is a little complex but the flat structure is also fast to\n// traverse, we can use `typeof` operators to distinguish the two cases.\nfunction installCompressedModuleFactories(\n chunkModules: CompressedModuleFactories,\n offset: number,\n moduleFactories: ModuleFactories,\n newModuleId?: (id: ModuleId) => void\n) {\n let i = offset\n while (i < chunkModules.length) {\n let end = i + 1\n // Find our factory function\n while (\n end < chunkModules.length &&\n typeof chunkModules[end] !== 'function'\n ) {\n end++\n }\n if (end === chunkModules.length) {\n throw new Error('malformed chunk format, expected a factory function')\n }\n\n // Install the factory for each module ID that doesn't already have one.\n // When some IDs in this group already have a factory, reuse that existing\n // group factory for the missing IDs to keep all IDs in the group consistent.\n // Otherwise, install the factory from this chunk.\n const moduleFactoryFn = chunkModules[end] as Function\n let existingGroupFactory: Function | undefined = undefined\n for (let j = i; j < end; j++) {\n const id = chunkModules[j] as ModuleId\n const existingFactory = moduleFactories.get(id)\n if (existingFactory) {\n existingGroupFactory = existingFactory\n break\n }\n }\n const factoryToInstall = existingGroupFactory ?? moduleFactoryFn\n\n let didInstallFactory = false\n for (let j = i; j < end; j++) {\n const id = chunkModules[j] as ModuleId\n if (!moduleFactories.has(id)) {\n if (!didInstallFactory) {\n if (factoryToInstall === moduleFactoryFn) {\n applyModuleFactoryName(moduleFactoryFn)\n }\n didInstallFactory = true\n }\n moduleFactories.set(id, factoryToInstall)\n newModuleId?.(id)\n }\n }\n i = end + 1 // end is pointing at the last factory advance to the next id or the end of the array.\n }\n}\n\n// everything below is adapted from webpack\n// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13\n\nconst turbopackQueues = Symbol('turbopack queues')\nconst turbopackExports = Symbol('turbopack exports')\nconst turbopackError = Symbol('turbopack error')\n\nconst enum QueueStatus {\n Unknown = -1,\n Unresolved = 0,\n Resolved = 1,\n}\n\ntype AsyncQueueFn = (() => void) & { queueCount: number }\ntype AsyncQueue = AsyncQueueFn[] & {\n status: QueueStatus\n}\n\nfunction resolveQueue(queue?: AsyncQueue) {\n if (queue && queue.status !== QueueStatus.Resolved) {\n queue.status = QueueStatus.Resolved\n queue.forEach((fn) => fn.queueCount--)\n queue.forEach((fn) => (fn.queueCount-- ? fn.queueCount++ : fn()))\n }\n}\n\ntype Dep = Exports | AsyncModulePromise | Promise\n\ntype AsyncModuleExt = {\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => void\n [turbopackExports]: Exports\n [turbopackError]?: any\n}\n\ntype AsyncModulePromise = Promise & AsyncModuleExt\n\nfunction wrapDeps(deps: Dep[]): AsyncModuleExt[] {\n return deps.map((dep): AsyncModuleExt => {\n if (dep !== null && typeof dep === 'object') {\n if (isAsyncModuleExt(dep)) return dep\n if (isPromise(dep)) {\n const queue: AsyncQueue = Object.assign([], {\n status: QueueStatus.Unresolved,\n })\n\n const obj: AsyncModuleExt = {\n [turbopackExports]: {},\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => fn(queue),\n }\n\n dep.then(\n (res) => {\n obj[turbopackExports] = res\n resolveQueue(queue)\n },\n (err) => {\n obj[turbopackError] = err\n resolveQueue(queue)\n }\n )\n\n return obj\n }\n }\n\n return {\n [turbopackExports]: dep,\n [turbopackQueues]: () => {},\n }\n })\n}\n\nfunction asyncModule(\n this: TurbopackBaseContext,\n body: (\n handleAsyncDependencies: (\n deps: Dep[]\n ) => Exports[] | Promise<() => Exports[]>,\n asyncResult: (err?: any) => void\n ) => void,\n hasAwait: boolean\n) {\n const module = this.m\n const queue: AsyncQueue | undefined = hasAwait\n ? Object.assign([], { status: QueueStatus.Unknown })\n : undefined\n\n const depQueues: Set = new Set()\n\n const { resolve, reject, promise: rawPromise } = createPromise()\n\n const promise: AsyncModulePromise = Object.assign(rawPromise, {\n [turbopackExports]: module.exports,\n [turbopackQueues]: (fn) => {\n queue && fn(queue)\n depQueues.forEach(fn)\n promise['catch'](() => {})\n },\n } satisfies AsyncModuleExt)\n\n const attributes: PropertyDescriptor = {\n get(): any {\n return promise\n },\n set(v: any) {\n // Calling `esmExport` leads to this.\n if (v !== promise) {\n promise[turbopackExports] = v\n }\n },\n }\n\n Object.defineProperty(module, 'exports', attributes)\n Object.defineProperty(module, 'namespaceObject', attributes)\n\n function handleAsyncDependencies(deps: Dep[]) {\n const currentDeps = wrapDeps(deps)\n\n const getResult = () =>\n currentDeps.map((d) => {\n if (d[turbopackError]) throw d[turbopackError]\n return d[turbopackExports]\n })\n\n const { promise, resolve } = createPromise<() => Exports[]>()\n\n const fn: AsyncQueueFn = Object.assign(() => resolve(getResult), {\n queueCount: 0,\n })\n\n function fnQueue(q: AsyncQueue) {\n if (q !== queue && !depQueues.has(q)) {\n depQueues.add(q)\n if (q && q.status === QueueStatus.Unresolved) {\n fn.queueCount++\n q.push(fn)\n }\n }\n }\n\n currentDeps.map((dep) => dep[turbopackQueues](fnQueue))\n\n return fn.queueCount ? promise : getResult()\n }\n\n function asyncResult(err?: any) {\n if (err) {\n reject((promise[turbopackError] = err))\n } else {\n resolve(promise[turbopackExports])\n }\n\n resolveQueue(queue)\n }\n\n body(handleAsyncDependencies, asyncResult)\n\n if (queue && queue.status === QueueStatus.Unknown) {\n queue.status = QueueStatus.Unresolved\n }\n}\ncontextPrototype.a = asyncModule\n\n/**\n * A pseudo \"fake\" URL object to resolve to its relative path.\n *\n * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this\n * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid\n * hydration mismatch.\n *\n * This is based on webpack's existing implementation:\n * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js\n */\nconst relativeURL = function relativeURL(this: any, inputUrl: string) {\n const realUrl = new URL(inputUrl, 'x:/')\n const values: Record = {}\n for (const key in realUrl) values[key] = (realUrl as any)[key]\n values.href = inputUrl\n values.pathname = inputUrl.replace(/[?#].*/, '')\n values.origin = values.protocol = ''\n values.toString = values.toJSON = (..._args: Array) => inputUrl\n for (const key in values)\n Object.defineProperty(this, key, {\n enumerable: true,\n configurable: true,\n value: values[key],\n })\n}\nrelativeURL.prototype = URL.prototype\ncontextPrototype.U = relativeURL\n\n/**\n * Utility function to ensure all variants of an enum are handled.\n */\nfunction invariant(never: never, computeMessage: (arg: any) => string): never {\n throw new Error(`Invariant: ${computeMessage(never)}`)\n}\n\n/**\n * Constructs an error message for when a module factory is not available.\n */\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\n/**\n * A stub function to make `require` available but non-functional in ESM.\n */\nfunction requireStub(_moduleId: ModuleId): never {\n throw new Error('dynamic usage of require is not supported')\n}\ncontextPrototype.z = requireStub\n\n// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.\ncontextPrototype.g = globalThis\n\ntype ContextConstructor = {\n new (module: Module, exports: Exports): TurbopackBaseContext\n}\n\nfunction applyModuleFactoryName(factory: Function) {\n // Give the module factory a nice name to improve stack traces.\n Object.defineProperty(factory, 'name', {\n value: 'module evaluation',\n })\n}\n"],"names":["SourceType","createModuleWithDirectionFlag","REEXPORTED_OBJECTS","WeakMap","Context","module","exports","m","e","contextPrototype","prototype","hasOwnProperty","Object","toStringTag","Symbol","defineProp","obj","name","options","call","defineProperty","getOverwrittenModule","moduleCache","id","createModuleWithDirection","createModuleObject","error","undefined","namespaceObject","parents","children","BindingTag_Value","esm","bindings","value","i","length","propName","tagOrFunction","enumerable","writable","Error","getterFn","setterFn","get","set","seal","esmExport","c","s","ensureDynamicExports","reexportedObjects","Proxy","target","prop","Reflect","ownKeys","keys","key","includes","push","dynamicExport","object","j","exportValue","v","exportNamespace","namespace","n","createGetter","getProto","getPrototypeOf","__proto__","LEAF_PROTOTYPES","interopEsm","raw","ns","allowExportDefault","defaultLocation","current","getOwnPropertyNames","splice","createNS","args","apply","create","esmImport","getOrInstantiateModuleFromParent","__esModule","asyncLoader","moduleId","loader","r","bind","A","runtimeRequire","require","require1","t","commonJsRequire","parseRequest","request","hashIndex","indexOf","substring","queryIndex","moduleContext","map","code","resolve","import","f","getChunkPath","chunkData","path","isPromise","maybePromise","then","isAsyncModuleExt","turbopackQueues","createPromise","reject","promise","Promise","res","rej","installCompressedModuleFactories","chunkModules","offset","moduleFactories","newModuleId","end","moduleFactoryFn","existingGroupFactory","existingFactory","factoryToInstall","didInstallFactory","has","applyModuleFactoryName","turbopackExports","turbopackError","resolveQueue","queue","status","forEach","fn","queueCount","wrapDeps","deps","dep","assign","err","asyncModule","body","hasAwait","depQueues","Set","rawPromise","attributes","handleAsyncDependencies","currentDeps","getResult","d","fnQueue","q","add","asyncResult","a","relativeURL","inputUrl","realUrl","URL","values","href","pathname","replace","origin","protocol","toString","toJSON","_args","configurable","U","invariant","never","computeMessage","factoryNotAvailableMessage","sourceType","sourceData","instantiationReason","requireStub","_moduleId","z","g","globalThis","factory"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,6CAA6C;AAI7C;;;CAGC,GACD,IAAA,AAAKA,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAAAA;AA+BL;;;;;CAKC,GACD,IAAIC,gCAAgC;AAEpC,MAAMC,qBAAqB,IAAIC;AAE/B;;CAEC,GACD,SAASC,QAEPC,MAAc,EACdC,OAAgB;IAEhB,IAAI,CAACC,CAAC,GAAGF;IACT,gFAAgF;IAChF,yEAAyE;IACzE,+CAA+C;IAC/C,8EAA8E;IAC9E,sEAAsE;IACtE,iBAAiB;IACjB,4FAA4F;IAC5F,IAAI,CAACG,CAAC,GAAGF;AACX;AACA,MAAMG,mBAAmBL,QAAQM,SAAS;AA+B1C,MAAMC,iBAAiBC,OAAOF,SAAS,CAACC,cAAc;AACtD,MAAME,cAAc,OAAOC,WAAW,eAAeA,OAAOD,WAAW;AAEvE,SAASE,WACPC,GAAQ,EACRC,IAAiB,EACjBC,OAA2C;IAE3C,IAAI,CAACP,eAAeQ,IAAI,CAACH,KAAKC,OAAOL,OAAOQ,cAAc,CAACJ,KAAKC,MAAMC;AACxE;AAEA,SAASG,qBACPC,WAAgC,EAChCC,EAAY;IAEZ,IAAIlB,SAASiB,WAAW,CAACC,GAAG;IAC5B,IAAI,CAAClB,QAAQ;QACX,IAAIJ,+BAA+B;YACjC,2CAA2C;YAC3CI,SAASmB,0BAA0BD;QACrC,OAAO;YACLlB,SAASoB,mBAAmBF;QAC9B;QACAD,WAAW,CAACC,GAAG,GAAGlB;IACpB;IACA,OAAOA;AACT;AAEA;;CAEC,GACD,SAASoB,mBAAmBF,EAAY;IACtC,OAAO;QACLjB,SAAS,CAAC;QACVoB,OAAOC;QACPJ;QACAK,iBAAiBD;IACnB;AACF;AAEA,SAASH,0BAA0BD,EAAY;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ared-node/base-externals-utils.ts"],"sourcesContent":["/// \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": 621, "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"],"names":["path","require","relativePathToRuntimeRoot","relative","RUNTIME_PUBLIC_PATH","relativePathToDistRoot","join","RELATIVE_ROOT_PATH","RUNTIME_ROOT","resolve","__filename","ABSOLUTE_ROOT","resolveAbsolutePath","modulePath","Context","prototype","P"],"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","ignoreList":[0]}},
- {"offset": {"line": 642, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/node-wasm-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n\nfunction readWebAssemblyAsResponse(path: string) {\n const { createReadStream } = require('fs') as typeof import('fs')\n const { Readable } = require('stream') as typeof import('stream')\n\n const stream = createReadStream(path)\n\n // @ts-ignore unfortunately there's a slight type mismatch with the stream.\n return new Response(Readable.toWeb(stream), {\n headers: {\n 'content-type': 'application/wasm',\n },\n })\n}\n\nasync function compileWebAssemblyFromPath(\n path: string\n): Promise {\n const response = readWebAssemblyAsResponse(path)\n\n return await WebAssembly.compileStreaming(response)\n}\n\nasync function instantiateWebAssemblyFromPath(\n path: string,\n importsObj: WebAssembly.Imports\n): Promise {\n const response = readWebAssemblyAsResponse(path)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n response,\n importsObj\n )\n\n return instance.exports\n}\n"],"names":["readWebAssemblyAsResponse","path","createReadStream","require","Readable","stream","Response","toWeb","headers","compileWebAssemblyFromPath","response","WebAssembly","compileStreaming","instantiateWebAssemblyFromPath","importsObj","instance","instantiateStreaming","exports"],"mappings":"AAAA,oDAAoD,GAEpD,2DAA2D;AAE3D,SAASA,0BAA0BC,IAAY;IAC7C,MAAM,EAAEC,gBAAgB,EAAE,GAAGC,QAAQ;IACrC,MAAM,EAAEC,QAAQ,EAAE,GAAGD,QAAQ;IAE7B,MAAME,SAASH,iBAAiBD;IAEhC,2EAA2E;IAC3E,OAAO,IAAIK,SAASF,SAASG,KAAK,CAACF,SAAS;QAC1CG,SAAS;YACP,gBAAgB;QAClB;IACF;AACF;AAEA,eAAeC,2BACbR,IAAY;IAEZ,MAAMS,WAAWV,0BAA0BC;IAE3C,OAAO,MAAMU,YAAYC,gBAAgB,CAACF;AAC5C;AAEA,eAAeG,+BACbZ,IAAY,EACZa,UAA+B;IAE/B,MAAMJ,WAAWV,0BAA0BC;IAE3C,MAAM,EAAEc,QAAQ,EAAE,GAAG,MAAMJ,YAAYK,oBAAoB,CACzDN,UACAI;IAGF,OAAOC,SAASE,OAAO;AACzB","ignoreList":[0]}},
- {"offset": {"line": 663, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime/runtime-base.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n/// \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 = Object.create(null)\n\n/**\n * Returns an absolute path to the given module's id.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\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,\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()\nconst unsupportedLoadChunk = Promise.resolve(undefined)\nconst loadedChunk: Promise = Promise.resolve(undefined)\nconst chunkCache = new Map>()\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(\n this: TurbopackBaseContext,\n chunkData: ChunkData\n): Promise {\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(\n this: TurbopackBaseContext,\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\nfunction loadWebAssembly(\n chunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n imports: WebAssembly.Imports\n) {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n\n return instantiateWebAssemblyFromPath(resolved, imports)\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n chunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n) {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n\n return compileWebAssemblyFromPath(resolved)\n}\ncontextPrototype.u = loadWebAssemblyModule\n\n/**\n * Creates a Node.js worker thread by instantiating the given WorkerConstructor\n * with the appropriate path and options, including forwarded globals.\n *\n * @param WorkerConstructor The Worker constructor from worker_threads\n * @param workerPath Path to the worker entry chunk\n * @param workerOptions options to pass to the Worker constructor (optional)\n */\nfunction createWorker(\n WorkerConstructor: { new (path: string, options?: object): unknown },\n workerPath: string,\n workerOptions?: { workerData?: unknown; [key: string]: unknown }\n): unknown {\n // Build the forwarded globals object\n const forwardedGlobals: Record = {}\n for (const name of WORKER_FORWARDED_GLOBALS) {\n forwardedGlobals[name] = (globalThis as Record)[name]\n }\n\n // Merge workerData with forwarded globals\n const existingWorkerData = workerOptions?.workerData || {}\n const options = {\n ...workerOptions,\n workerData: {\n ...(typeof existingWorkerData === 'object' ? existingWorkerData : {}),\n __turbopack_globals__: forwardedGlobals,\n },\n }\n\n return new WorkerConstructor(workerPath, options)\n}\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","Object","create","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","loadWebAssembly","_edgeModule","imports","instantiateWebAssemblyFromPath","w","loadWebAssemblyModule","compileWebAssemblyFromPath","u","createWorker","WorkerConstructor","workerPath","workerOptions","forwardedGlobals","WORKER_FORWARDED_GLOBALS","globalThis","existingWorkerData","workerData","options","__turbopack_globals__","regexJsUrl","chunkUrlOrPath","test"],"mappings":"AAAA,oDAAoD,GAEpD,8DAA8D;AAC9D,kEAAkE;AAClE,kEAAkE;AAClE,6DAA6D;AAC7D,8CAA8C;AAE9C;;;CAGC,GAEDA,QAAQC,GAAG,CAACC,SAAS,GAAG;AAExB,MAAMC,MAAMC,QAAQ;AAEpB,MAAMC,kBAAmC,IAAIC;AAC7C,MAAMC,cAAmCC,OAAOC,MAAM,CAAC;AAEvD;;CAEC,GACD,SAASC,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,OAAOb,IAAIqB,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,IAAInC;AAEvB,SAASoC;IACPD,WAAWE,KAAK;IAChBR,aAAaQ,KAAK;AACpB;AAEA,SAAST,qBACPF,UAAqB,EACrBY,SAAoB;IAEpB,IAAI,CAACC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B;IACA,sGAAsG;IACtG,OAAOA;AACT;AACAK,iBAAiBC,CAAC,GAAGP;AAErB,SAASQ,oBAEPC,QAAgB;IAEhB,MAAMC,QAAO9D,IAAI+D,aAAa,CAAC,IAAIC,IAAIH,UAAUzC;IACjD,OAAOgC,eAAezB,IAAI,CAAC,IAAI,EAAEmC;AACnC;AACAJ,iBAAiBO,CAAC,GAAGL;AAErB,SAASM,gBACPzB,SAAoB,EACpB0B,WAAqC,EACrCC,OAA4B;IAE5B,MAAMnD,WAAWC,KAAKC,OAAO,CAACC,cAAcqB;IAE5C,OAAO4B,+BAA+BpD,UAAUmD;AAClD;AACAV,iBAAiBY,CAAC,GAAGJ;AAErB,SAASK,sBACP9B,SAAoB,EACpB0B,WAAqC;IAErC,MAAMlD,WAAWC,KAAKC,OAAO,CAACC,cAAcqB;IAE5C,OAAO+B,2BAA2BvD;AACpC;AACAyC,iBAAiBe,CAAC,GAAGF;AAErB;;;;;;;CAOC,GACD,SAASG,aACPC,iBAAoE,EACpEC,UAAkB,EAClBC,aAAgE;IAEhE,qCAAqC;IACrC,MAAMC,mBAA4C,CAAC;IACnD,KAAK,MAAM3B,QAAQ4B,yBAA0B;QAC3CD,gBAAgB,CAAC3B,KAAK,GAAG,AAAC6B,UAAsC,CAAC7B,KAAK;IACxE;IAEA,0CAA0C;IAC1C,MAAM8B,qBAAqBJ,eAAeK,cAAc,CAAC;IACzD,MAAMC,UAAU;QACd,GAAGN,aAAa;QAChBK,YAAY;YACV,GAAI,OAAOD,uBAAuB,WAAWA,qBAAqB,CAAC,CAAC;YACpEG,uBAAuBN;QACzB;IACF;IAEA,OAAO,IAAIH,kBAAkBC,YAAYO;AAC3C;AAEA,MAAME,aAAa;AACnB;;CAEC,GACD,SAAS3C,KAAK4C,cAAoC;IAChD,OAAOD,WAAWE,IAAI,CAACD;AACzB","ignoreList":[0]}},
- {"offset": {"line": 810, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime/hmr-runtime.ts"],"sourcesContent":["/// \n/// \n/// \n/// \n\ntype HotModuleFactoryFunction = ModuleFactoryFunction<\n HotModule,\n TurbopackBaseContext\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: Record\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nlet runtimeModules: Set\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map = 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 = new WeakMap()\n\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set = 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\n outdatedModules: Set\n outdatedDependencies: Map>\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 = new Set()\n const outdatedDependencies: Map> = new Map()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: QueueItem[] = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let nextItem\n while ((nextItem = queue.shift())) {\n const { moduleId, dependencyChain } = nextItem\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[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[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>,\n source: Map>\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,\n autoAcceptRootModules: boolean\n): {\n outdatedModules: Set\n outdatedDependencies: Map>\n} {\n const outdatedModules = new Set()\n const outdatedDependencies = new Map>()\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,\n outdatedDependencies: Map>,\n autoAcceptRootModules: boolean\n): {\n outdatedModules: Set\n outdatedDependencies: Map>\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\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[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[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[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 delete devModuleCache[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,\n disposedModules: Iterable,\n outdatedDependencies: Map>\n): { outdatedModuleParents: Map> } {\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>()\n for (const moduleId of outdatedModules) {\n const oldModule = devModuleCache[moduleId]\n outdatedModuleParents.set(moduleId, oldModule?.parents)\n delete devModuleCache[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[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,\n runtimeModules: Set,\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[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,\n updates: Record,\n chunkModulesMap?: Map>\n): {\n added: Map\n modified: Map\n deleted: Set\n chunksAdded: Map>\n chunksDeleted: Map>\n} {\n const chunksAdded = new Map()\n const chunksDeleted = new Map()\n const added: Map = new Map()\n const modified = new Map()\n const deleted: Set = 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()\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,\n modified: Map,\n evalModuleEntry: (entry: EcmascriptModuleEntry) => HotModuleFactoryFunction,\n autoAcceptRootModules: boolean\n): {\n outdatedModules: Set\n outdatedDependencies: Map>\n newModuleFactories: Map\n} {\n const newModuleFactories = new Map()\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,\n outdatedModuleParents: Map>,\n outdatedDependencies: Map>,\n moduleFactories: ModuleFactories,\n devModuleCache: ModuleCache,\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[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 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[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,\n outdatedDependencies: Map>,\n disposedModules: Iterable,\n newModuleFactories: Map,\n moduleFactories: ModuleFactories,\n devModuleCache: ModuleCache,\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\n modified: Map\n disposedModules: Iterable\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\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","nextItem","shift","has","add","undefined","type","module","hotState","get","selfAccepted","selfInvalidated","selfDeclined","parentId","parent","parentHotState","declinedDependencies","acceptedDependencies","set","length","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,6CAA6C;AAC7C,4CAA4C;AAC5C,4CAA4C;AAO5C;;;;;;CAMC,GAED;;;;CAIC,GACD,IAAIA;AAEJ;;CAEC,GACD,IAAIC;AAEJ;;;CAGC,GACD,MAAMC,gBAAwC,IAAIC;AAElD;;;CAGC,GACD,MAAMC,iBAAyC,IAAIC;AAEnD;;CAEC,GACD,MAAMC,2BAA0C,IAAIC;AAEpD,MAAMC,yB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ACR9B,eAAe,EACfwC,eAAe,EACfkB,iBAAiB,EACjBC,sBAAsB,EACtBrD,eAAe,EACfzG,cAAc,EACd0B,qBAAqB,EACtB,GAAGkI;IAEJ,MAAM,EAAEjI,eAAe,EAAEC,oBAAoB,EAAEgH,kBAAkB,EAAE,GACjEF,uBACEV,OACAC,UACAU,iBACAjH;IAGJgI,cACE/H,iBACAC,sBACAuE,iBACAyC,oBACAnC,iBACAzG,gBACA6J,mBACAC,wBACApI;AAEJ","ignoreList":[0]}},
- {"offset": {"line": 1504, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime/dev-base.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \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\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 {\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.b = createWorker\nnodeDevContextPrototype.C = clearChunkCache\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)(\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[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 trackModuleImport(sourceModule, id, devModuleCache[id])\n\n const module = devModuleCache[id]\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","b","createWorker","C","clearChunkCache","instantiateModule","id","sourceType","sourceData","createModuleObjectFn","moduleId","createModuleWithDirection","createContext","module1","exports","_refresh","runWithHooks","exec","undefined","newModule","instantiateModuleShared","loaded","instantiateRuntimeModule","chunkPath","SourceType","Runtime","getOrInstantiateRuntimeModule","error","getOrInstantiateModuleFromParent","sourceModule","trackModuleImport","Parent","module","sourcePath","m","chunkData","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;AAC5BX,wBAAwBY,CAAC,GAAGC;AAE5B;;CAEC,GACD,SAASC,kBACPC,EAAY,EACZC,UAAsB,EACtBC,UAAsB;IAEtB,qEAAqE;IACrE,MAAMC,uBAAuB,CAACC;QAC5B,OAAOC,0BAA0BD;IACnC;IAEA,kDAAkD;IAClD,MAAME,gBAAgB,CACpBC,SACAC,SACAC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": 1588, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/dev/hmr-client.ts"],"sourcesContent":["/// \n/// \n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\ntype NodeJsHmrPayload = {\n resource: {\n path: string\n headers?: Record\n }\n issues: Issue[]\n type: 'partial'\n instruction: EcmascriptMergedUpdate\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\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 }): boolean {\n if (serverHmrUpdateHandler == null) {\n console.warn(\n '[Server HMR] No update handler registered to receive message:',\n msg\n )\n return false\n }\n\n try {\n serverHmrUpdateHandler(msg.data)\n return true\n } catch (err) {\n console.error('[Server HMR] Listener error:', err)\n return false\n }\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\n): void {\n if (msg.type !== 'partial') {\n return\n }\n\n const instruction = msg.instruction\n if (instruction.type !== 'EcmascriptMergedUpdate') {\n return\n }\n\n try {\n const { entries = {}, chunks = {} } = instruction\n\n const evalModuleEntry = (entry: EcmascriptModuleEntry) => {\n // eslint-disable-next-line no-eval\n return (0, eval)(entry.map ? inlineSourcemaps(entry) : entry.code)\n }\n\n const { added, modified } = computeChangedModules(\n entries,\n chunks,\n undefined // no chunkModulesMap for Node.js\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 } catch (e) {\n console.error('[Server HMR] Update failed, full reload needed:', e)\n throw e\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","console","warn","data","err","error","type","instruction","entries","chunks","evalModuleEntry","eval","added","modified","computeChangedModules","undefined","applyEcmascriptMergedUpdateShared","disposedModules","instantiateModule","applyModuleFactoryName","autoAcceptRootModules","e"],"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,MAAM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E;QAEA,MAAM,EAAEwB,KAAK,EAAEC,QAAQ,EAAE,GAAGC,sBAC1BN,SACAC,QACAM,UAAU,iCAAiC;;QAG7C,uCAAuC;QACvCC,kCAAkC;YAChCJ;YACAC;YACAI,iBAAiB,EAAE;YACnBP;YACAQ;YACAC,wBAAwB,KAAO;YAC/BxB;YACAC;YACAwB,uBAAuB;QACzB;IACF,EAAE,OAAOC,GAAG;QACVpB,QAAQI,KAAK,CAAC,mDAAmDgB;QACjE,MAAMA;IACR;AACF","ignoreList":[0]}},
- {"offset": {"line": 1670, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/dev/dev-nodejs.ts"],"sourcesContent":["/// \n/// \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): boolean {\n try {\n ensureHmrClientInitialized()\n\n // emitMessage returns false if any listener failed to apply the update\n return emitMessage({\n type: 'turbopack-message',\n data: update,\n })\n } catch (err) {\n console.error('[Server HMR] Failed to apply update:', err)\n return false\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) => boolean\n /** Output directory relative to RUNTIME_ROOT, e.g. \"server/chunks/ssr\". */\n chunkPrefix: string\n}\n\nconst handlers: Map =\n globalThis.__turbopack_server_hmr_handlers__ ?? new Map()\n\nconst chunkPrefix = path.relative(RUNTIME_ROOT, path.dirname(__filename))\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 ): boolean => {\n const registry: Map =\n globalThis.__turbopack_server_hmr_handlers__ ?? new Map()\n const updateChunkPaths = Object.keys(update.instruction?.chunks ?? {})\n\n const toCall: HmrHandlerEntry[] = []\n if (updateChunkPaths.length === 0) {\n for (const entry of registry.values()) toCall.push(entry)\n } else {\n const seen = new Set()\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 let applied = false\n for (const { handler } of toCall) {\n try {\n if (handler(update)) applied = true\n } catch (err) {\n console.error('[Server HMR] Handler error:', err)\n }\n }\n\n return applied\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","err","console","error","handlers","globalThis","__turbopack_server_hmr_handlers__","Map","chunkPrefix","path","relative","RUNTIME_ROOT","dirname","__filename","size","registry","updateChunkPaths","Object","keys","instruction","chunks","toCall","length","entry","values","push","seen","Set","chunkPath","dir","key","has","add","applied","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,oB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iCAAiC,GAAGF;AAE/CA,SAAS+B,GAAG,CAACtB,YAAY;IACvBqB,SAAStC;IACTY;AACF","ignoreList":[0]}}]
-}
\ No newline at end of file
diff --git a/.next/dev/build/package.json b/.next/dev/build/package.json
deleted file mode 100644
index 7156107..0000000
--- a/.next/dev/build/package.json
+++ /dev/null
@@ -1 +0,0 @@
-{"type": "commonjs"}
\ No newline at end of file
diff --git a/.next/dev/build/postcss.js b/.next/dev/build/postcss.js
deleted file mode 100644
index 16e95c9..0000000
--- a/.next/dev/build/postcss.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var R=require("./chunks/[turbopack]_runtime.js")("postcss.js")
-R.c("chunks/[turbopack-node]_transforms_postcss_ts_06e.r3r._.js")
-R.c("chunks/[root-of-the-server]__0ubbtyl._.js")
-R.m("[turbopack-node]/child_process/globals.ts [postcss] (ecmascript)")
-R.m("[turbopack-node]/child_process/evaluate.ts/evaluate.js { INNER => \"[turbopack-node]/transforms/postcss.ts { CONFIG => \\\"[project]/postcss.config.mjs [postcss] (ecmascript)\\\" } [postcss] (ecmascript)\", RUNTIME => \"[turbopack-node]/child_process/evaluate.ts [postcss] (ecmascript)\" } [postcss] (ecmascript)")
-module.exports=R.m("[turbopack-node]/child_process/evaluate.ts/evaluate.js { INNER => \"[turbopack-node]/transforms/postcss.ts { CONFIG => \\\"[project]/postcss.config.mjs [postcss] (ecmascript)\\\" } [postcss] (ecmascript)\", RUNTIME => \"[turbopack-node]/child_process/evaluate.ts [postcss] (ecmascript)\" } [postcss] (ecmascript)").exports
diff --git a/.next/dev/build/postcss.js.map b/.next/dev/build/postcss.js.map
deleted file mode 100644
index c15d7ec..0000000
--- a/.next/dev/build/postcss.js.map
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "version": 3,
- "sources": [],
- "sections": []
-}
\ No newline at end of file
diff --git a/.next/dev/cache/.rscinfo b/.next/dev/cache/.rscinfo
deleted file mode 100644
index 47df955..0000000
--- a/.next/dev/cache/.rscinfo
+++ /dev/null
@@ -1 +0,0 @@
-{"encryption.key":"HV9SQcPKgApkMU+g4yHRy0Kk4bI6p7veg84WeOiURbQ=","encryption.expire_at":1776932920754}
\ No newline at end of file
diff --git a/.next/dev/cache/next-devtools-config.json b/.next/dev/cache/next-devtools-config.json
deleted file mode 100644
index 9e26dfe..0000000
--- a/.next/dev/cache/next-devtools-config.json
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/.next/dev/fallback-build-manifest.json b/.next/dev/fallback-build-manifest.json
deleted file mode 100644
index 41883af..0000000
--- a/.next/dev/fallback-build-manifest.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "pages": {
- "/_app": [
- "static/chunks/node_modules_next_dist_compiled_0o6l_m6._.js",
- "static/chunks/node_modules_next_dist_shared_lib_0~pg0mt._.js",
- "static/chunks/node_modules_next_dist_client_0pe1dg-._.js",
- "static/chunks/node_modules_next_dist_0u_w_5s._.js",
- "static/chunks/node_modules_next_app_0jt-zj..js",
- "static/chunks/[next]_entry_page-loader_ts_0j~flwh._.js",
- "static/chunks/node_modules_react-dom_0bruynb._.js",
- "static/chunks/node_modules_0lx093h._.js",
- "static/chunks/[root-of-the-server]__0c0okpg._.js",
- "static/chunks/pages__app_07xvfw~._.js",
- "static/chunks/turbopack-pages__app_0_wu8vy._.js"
- ],
- "/_error": [
- "static/chunks/node_modules_next_dist_compiled_0o6l_m6._.js",
- "static/chunks/node_modules_next_dist_shared_lib_12bi_n7._.js",
- "static/chunks/node_modules_next_dist_client_0pe1dg-._.js",
- "static/chunks/node_modules_next_dist_0rt-2cr._.js",
- "static/chunks/[next]_entry_page-loader_ts_0rqw6yo._.js",
- "static/chunks/node_modules_react-dom_0bruynb._.js",
- "static/chunks/node_modules_0lx093h._.js",
- "static/chunks/[root-of-the-server]__01mw43t._.js",
- "static/chunks/pages__error_07xvfw~._.js",
- "static/chunks/turbopack-pages__error_016chbq._.js"
- ]
- },
- "devFiles": [],
- "polyfillFiles": [],
- "lowPriorityFiles": [
- "static/development/_buildManifest.js",
- "static/development/_ssgManifest.js",
- "static/development/_clientMiddlewareManifest.js"
- ],
- "rootMainFiles": []
-}
\ No newline at end of file
diff --git a/.next/dev/logs/next-development.log b/.next/dev/logs/next-development.log
deleted file mode 100644
index c103c36..0000000
--- a/.next/dev/logs/next-development.log
+++ /dev/null
@@ -1,78 +0,0 @@
-{"timestamp":"00:00:01.425","source":"Server","level":"LOG","message":""}
-{"timestamp":"00:00:03.004","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"00:00:03.184","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"00:06:22.835","source":"Server","level":"LOG","message":"✓ Compiled in 751ms"}
-{"timestamp":"00:06:23.155","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"00:06:28.748","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"00:06:30.699","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"01:51:12.928","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"01:51:13.389","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"01:51:15.872","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"01:56:33.431","source":"Server","level":"LOG","message":" Reload env: .env"}
-{"timestamp":"01:56:34.029","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"01:58:16.266","source":"Server","level":"LOG","message":" Reload env: .env"}
-{"timestamp":"01:58:16.904","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"01:58:46.788","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:22:34.080","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"02:24:33.238","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"02:26:25.719","source":"Server","level":"LOG","message":"✓ Compiled in 293ms"}
-{"timestamp":"02:26:26.345","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"02:32:43.980","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:46:29.696","source":"Server","level":"LOG","message":"✓ Compiled in 100ms"}
-{"timestamp":"02:46:29.883","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:46:47.041","source":"Server","level":"LOG","message":"✓ Compiled in 99ms"}
-{"timestamp":"02:46:47.262","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:47:06.184","source":"Server","level":"LOG","message":"✓ Compiled in 80ms"}
-{"timestamp":"02:47:06.391","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:47:18.104","source":"Server","level":"LOG","message":"✓ Compiled in 72ms"}
-{"timestamp":"02:47:18.317","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:47:37.387","source":"Server","level":"LOG","message":"✓ Compiled in 136ms"}
-{"timestamp":"02:47:37.647","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:47:54.919","source":"Server","level":"LOG","message":"✓ Compiled in 98ms"}
-{"timestamp":"02:47:55.137","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:48:05.331","source":"Server","level":"LOG","message":"✓ Compiled in 68ms"}
-{"timestamp":"02:48:05.557","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:48:14.643","source":"Server","level":"LOG","message":"✓ Compiled in 81ms"}
-{"timestamp":"02:48:14.833","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:48:21.232","source":"Server","level":"LOG","message":"✓ Compiled in 72ms"}
-{"timestamp":"02:48:21.474","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:48:27.425","source":"Server","level":"LOG","message":"✓ Compiled in 64ms"}
-{"timestamp":"02:48:27.612","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:48:43.941","source":"Server","level":"LOG","message":"✓ Compiled in 62ms"}
-{"timestamp":"02:48:44.154","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:48:57.664","source":"Server","level":"LOG","message":"✓ Compiled in 58ms"}
-{"timestamp":"02:48:57.857","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:49:03.427","source":"Server","level":"LOG","message":"✓ Compiled in 73ms"}
-{"timestamp":"02:49:03.612","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:49:12.578","source":"Server","level":"LOG","message":"✓ Compiled in 74ms"}
-{"timestamp":"02:49:12.897","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:49:18.089","source":"Server","level":"LOG","message":"✓ Compiled in 90ms"}
-{"timestamp":"02:49:18.112","source":"Server","level":"ERROR","message":"⨯ ./src/app/app-versions/page.tsx:575:1\nUnexpected token. Did you mean `{'}'}` or `}`?\n 573 | \n 574 | )\n> 575 | }\n | ^\n 576 |\n\nParsing ecmascript source code failed\n\nImport traces:\n Client Component Browser:\n ./src/app/app-versions/page.tsx [Client Component Browser]\n ./src/app/app-versions/page.tsx [Server Component]\n\n Client Component SSR:\n ./src/app/app-versions/page.tsx [Client Component SSR]\n ./src/app/app-versions/page.tsx [Server Component]\n\n"}
-{"timestamp":"02:49:18.431","source":"Browser","level":"ERROR","message":"./src/app/app-versions/page.tsx:575:1\nUnexpected token. Did you mean `{'}'}` or `}`?\n 573 | \n 574 | )\n> 575 | }\n | ^\n 576 |\n\nParsing ecmascript source code failed\n\nImport traces:\n Client Component Browser:\n ./src/app/app-versions/page.tsx [Client Component Browser]\n ./src/app/app-versions/page.tsx [Server Component]\n\n Client Component SSR:\n ./src/app/app-versions/page.tsx [Client Component SSR]\n ./src/app/app-versions/page.tsx [Server Component]"}
-{"timestamp":"02:49:18.432","source":"Browser","level":"ERROR","message":"./src/app/app-versions/page.tsx:575:1\nUnexpected token. Did you mean `{'}'}` or `}`?\n 573 | \n 574 | )\n> 575 | }\n | ^\n 576 |\n\nParsing ecmascript source code failed\n\nImport traces:\n Client Component Browser:\n ./src/app/app-versions/page.tsx [Client Component Browser]\n ./src/app/app-versions/page.tsx [Server Component]\n\n Client Component SSR:\n ./src/app/app-versions/page.tsx [Client Component SSR]\n ./src/app/app-versions/page.tsx [Server Component]"}
-{"timestamp":"02:49:18.435","source":"Server","level":"ERROR","message":"⨯ ./src/app/app-versions/page.tsx:575:1\nUnexpected token. Did you mean `{'}'}` or `}`?\n 573 | \n 574 | )\n> 575 | }\n | ^\n 576 |\n\nParsing ecmascript source code failed\n\nImport traces:\n Client Component Browser:\n ./src/app/app-versions/page.tsx [Client Component Browser]\n ./src/app/app-versions/page.tsx [Server Component]\n\n Client Component SSR:\n ./src/app/app-versions/page.tsx [Client Component SSR]\n ./src/app/app-versions/page.tsx [Server Component]\n\n"}
-{"timestamp":"02:49:18.459","source":"Server","level":"ERROR","message":"⨯ ./src/app/app-versions/page.tsx:575:1\nUnexpected token. Did you mean `{'}'}` or `}`?\n 573 | \n 574 | )\n> 575 | }\n | ^\n 576 |\n\nParsing ecmascript source code failed\n\nImport traces:\n Client Component Browser:\n ./src/app/app-versions/page.tsx [Client Component Browser]\n ./src/app/app-versions/page.tsx [Server Component]\n\n Client Component SSR:\n ./src/app/app-versions/page.tsx [Client Component SSR]\n ./src/app/app-versions/page.tsx [Server Component]\n\n"}
-{"timestamp":"02:49:18.475","source":"Server","level":"ERROR","message":"⨯ ./src/app/app-versions/page.tsx:575:1\nUnexpected token. Did you mean `{'}'}` or `}`?\n 573 | \n 574 | )\n> 575 | }\n | ^\n 576 |\n\nParsing ecmascript source code failed\n\nImport traces:\n Client Component Browser:\n ./src/app/app-versions/page.tsx [Client Component Browser]\n ./src/app/app-versions/page.tsx [Server Component]\n\n Client Component SSR:\n ./src/app/app-versions/page.tsx [Client Component SSR]\n ./src/app/app-versions/page.tsx [Server Component]\n\n"}
-{"timestamp":"02:49:18.598","source":"Browser","level":"ERROR","message":"uncaughtError: Error: ./src/app/app-versions/page.tsx:575:1\nUnexpected token. Did you mean `{'}'}` or `}`?\n 573 | \n 574 | )\n> 575 | }\n | ^\n 576 |\n\nParsing ecmascript source code failed\n\nImport traces:\n Client Component Browser:\n ./src/app/app-versions/page.tsx [Client Component Browser]\n ./src/app/app-versions/page.tsx [Server Component]\n\n Client Component SSR:\n ./src/app/app-versions/page.tsx [Client Component SSR]\n ./src/app/app-versions/page.tsx [Server Component]\n\n"}
-{"timestamp":"02:49:18.613","source":"Server","level":"ERROR","message":"[browser] \"\\u001b[31mUncaught Error: ./src/app/app-versions/page.tsx:575:1\\nUnexpected token. Did you mean `{'}'}` or `}`?\\n 573 | \\n 574 | )\\n> 575 | }\\n | ^\\n 576 |\\n\\nParsing ecmascript source code failed\\n\\nImport traces:\\n Client Component Browser:\\n ./src/app/app-versions/page.tsx [Client Component Browser]\\n ./src/app/app-versions/page.tsx [Server Component]\\n\\n Client Component SSR:\\n ./src/app/app-versions/page.tsx [Client Component SSR]\\n ./src/app/app-versions/page.tsx [Server Component]\\n\\n\\u001b[39m\\n\\u001b[31m at (Error: ./src/app/app-versions/page.tsx:575:1)\\n at (Error: (./src/app/app-versions/page.tsx:575:1)\\u001b[39m\""}
-{"timestamp":"02:49:18.614","source":"Browser","level":"ERROR","message":"\u001b[31mUncaught Error: ./src/app/app-versions/page.tsx:575:1\nUnexpected token. Did you mean `{'}'}` or `}`?\n 573 | \n 574 | )\n> 575 | }\n | ^\n 576 |\n\nParsing ecmascript source code failed\n\nImport traces:\n Client Component Browser:\n ./src/app/app-versions/page.tsx [Client Component Browser]\n ./src/app/app-versions/page.tsx [Server Component]\n\n Client Component SSR:\n ./src/app/app-versions/page.tsx [Client Component SSR]\n ./src/app/app-versions/page.tsx [Server Component]\n\n\u001b[39m\n\u001b[31m at (Error: ./src/app/app-versions/page.tsx:575:1)\n at (Error: (./src/app/app-versions/page.tsx:575:1)\u001b[39m"}
-{"timestamp":"02:49:19.456","source":"Browser","level":"ERROR","message":"./src/app/app-versions/page.tsx:575:1\nUnexpected token. Did you mean `{'}'}` or `}`?\n 573 | \n 574 | )\n> 575 | }\n | ^\n 576 |\n\nParsing ecmascript source code failed\n\nImport traces:\n Client Component Browser:\n ./src/app/app-versions/page.tsx [Client Component Browser]\n ./src/app/app-versions/page.tsx [Server Component]\n\n Client Component SSR:\n ./src/app/app-versions/page.tsx [Client Component SSR]\n ./src/app/app-versions/page.tsx [Server Component]"}
-{"timestamp":"02:49:19.456","source":"Browser","level":"ERROR","message":"./src/app/app-versions/page.tsx:575:1\nUnexpected token. Did you mean `{'}'}` or `}`?\n 573 | \n 574 | )\n> 575 | }\n | ^\n 576 |\n\nParsing ecmascript source code failed\n\nImport traces:\n Client Component Browser:\n ./src/app/app-versions/page.tsx [Client Component Browser]\n ./src/app/app-versions/page.tsx [Server Component]\n\n Client Component SSR:\n ./src/app/app-versions/page.tsx [Client Component SSR]\n ./src/app/app-versions/page.tsx [Server Component]"}
-{"timestamp":"02:49:27.394","source":"Server","level":"LOG","message":"✓ Compiled in 111ms"}
-{"timestamp":"02:49:27.793","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"02:49:27.942","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"02:53:27.533","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"02:58:25.018","source":"Server","level":"LOG","message":"✓ Compiled in 256ms"}
-{"timestamp":"02:58:25.550","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"02:58:25.803","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"03:01:14.680","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"03:01:16.619","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"03:01:17.958","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"03:01:22.532","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"03:01:24.918","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"03:01:26.983","source":"Browser","level":"INFO","message":"%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools font-weight:bold"}
-{"timestamp":"03:03:07.012","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"03:03:16.147","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"03:03:19.121","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"03:03:19.178","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
-{"timestamp":"03:03:19.270","source":"Server","level":"LOG","message":"Migration already applied or not needed"}
diff --git a/.next/dev/package.json b/.next/dev/package.json
deleted file mode 100644
index c9a4422..0000000
--- a/.next/dev/package.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "type": "commonjs"
-}
\ No newline at end of file
diff --git a/.next/dev/prerender-manifest.json b/.next/dev/prerender-manifest.json
deleted file mode 100644
index b83e1b4..0000000
--- a/.next/dev/prerender-manifest.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "version": 4,
- "routes": {},
- "dynamicRoutes": {},
- "notFoundRoutes": [],
- "preview": {
- "previewModeId": "fe61c2dd5a30fb2a5230e827694c71f5",
- "previewModeSigningKey": "490f7269a31770e47550ec91c2476e6a3c76f293ef213e3776f82b577afcfa86",
- "previewModeEncryptionKey": "457f8f228d581668b6d69cfa6157f75c153bff7d7f33c7e5ba96b6056d88d0a9"
- }
-}
\ No newline at end of file
diff --git a/.next/dev/routes-manifest.json b/.next/dev/routes-manifest.json
deleted file mode 100644
index 442224a..0000000
--- a/.next/dev/routes-manifest.json
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"caseSensitive":false,"basePath":"","rewrites":{"beforeFiles":[],"afterFiles":[],"fallback":[]},"redirects":[{"source":"/:path+/","destination":"/:path+","permanent":true,"internal":true,"priority":true,"regex":"^(?:\\/((?:[^\\/]+?)(?:\\/(?:[^\\/]+?))*))\\/$"}],"headers":[],"onMatchHeaders":[]}
\ No newline at end of file
diff --git a/.next/dev/server/app-paths-manifest.json b/.next/dev/server/app-paths-manifest.json
deleted file mode 100644
index 09c526a..0000000
--- a/.next/dev/server/app-paths-manifest.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "/_not-found/page": "app/_not-found/page.js",
- "/api/app-versions/route": "app/api/app-versions/route.js",
- "/api/dashboard/route": "app/api/dashboard/route.js",
- "/api/devices/route": "app/api/devices/route.js",
- "/api/material-categories/route": "app/api/material-categories/route.js",
- "/api/material-types/route": "app/api/material-types/route.js",
- "/api/material-versions/route": "app/api/material-versions/route.js",
- "/api/materials/route": "app/api/materials/route.js",
- "/api/models/checklist/route": "app/api/models/checklist/route.js",
- "/api/models/route": "app/api/models/route.js",
- "/api/repair/route": "app/api/repair/route.js",
- "/api/scrap/route": "app/api/scrap/route.js",
- "/api/update-logs/route": "app/api/update-logs/route.js",
- "/api/upload/route": "app/api/upload/route.js",
- "/app-versions/page": "app/app-versions/page.js",
- "/devices/page": "app/devices/page.js",
- "/help/page": "app/help/page.js",
- "/materials/categories/page": "app/materials/categories/page.js",
- "/materials/manage/page": "app/materials/manage/page.js",
- "/materials/page": "app/materials/page.js",
- "/models/page": "app/models/page.js",
- "/page": "app/page.js",
- "/python-devices/page": "app/python-devices/page.js",
- "/repair/page": "app/repair/page.js",
- "/scrap/page": "app/scrap/page.js"
-}
\ No newline at end of file
diff --git a/.next/dev/server/app/config-files/page.js b/.next/dev/server/app/config-files/page.js
deleted file mode 100644
index 4f3de25..0000000
--- a/.next/dev/server/app/config-files/page.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var R=require("../../chunks/ssr/[turbopack]_runtime.js")("server/app/config-files/page.js")
-R.c("server/chunks/ssr/node_modules_next_dist_esm_0i-0hxq._.js")
-R.c("server/chunks/ssr/[root-of-the-server]__10r9tc9._.js")
-R.c("server/chunks/ssr/node_modules_next_dist_esm_00xse_0._.js")
-R.c("server/chunks/ssr/node_modules_next_dist_compiled_07ho8ku._.js")
-R.c("server/chunks/ssr/node_modules_next_dist_server_route-modules_app-page_0f6k0sl._.js")
-R.c("server/chunks/ssr/[externals]__0n13xf4._.js")
-R.c("server/chunks/ssr/_04snudh._.js")
-R.c("server/chunks/ssr/node_modules_next_dist_client_components_0inhx6q._.js")
-R.c("server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0ghu-f7.js")
-R.c("server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0cjv-23.js")
-R.c("server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0lgvd_..js")
-R.c("server/chunks/ssr/_next-internal_server_app_config-files_page_actions_0of41c3.js")
-R.m("[project]/node_modules/next/dist/esm/build/templates/app-page.js?page=/config-files/page { MODULE_0 => \"[project]/src/app/layout.tsx [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_1 => \"[project]/node_modules/next/dist/client/components/builtin/not-found.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_2 => \"[project]/node_modules/next/dist/client/components/builtin/forbidden.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_3 => \"[project]/node_modules/next/dist/client/components/builtin/unauthorized.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_4 => \"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_5 => \"[project]/src/app/config-files/page.tsx [app-rsc] (ecmascript, Next.js Server Component)\" } [app-rsc] (ecmascript)")
-module.exports=R.m("[project]/node_modules/next/dist/esm/build/templates/app-page.js?page=/config-files/page { MODULE_0 => \"[project]/src/app/layout.tsx [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_1 => \"[project]/node_modules/next/dist/client/components/builtin/not-found.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_2 => \"[project]/node_modules/next/dist/client/components/builtin/forbidden.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_3 => \"[project]/node_modules/next/dist/client/components/builtin/unauthorized.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_4 => \"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-rsc] (ecmascript, Next.js Server Component)\", MODULE_5 => \"[project]/src/app/config-files/page.tsx [app-rsc] (ecmascript, Next.js Server Component)\" } [app-rsc] (ecmascript)").exports
diff --git a/.next/dev/server/app/config-files/page.js.map b/.next/dev/server/app/config-files/page.js.map
deleted file mode 100644
index c15d7ec..0000000
--- a/.next/dev/server/app/config-files/page.js.map
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "version": 3,
- "sources": [],
- "sections": []
-}
\ No newline at end of file
diff --git a/.next/dev/server/app/config-files/page/app-paths-manifest.json b/.next/dev/server/app/config-files/page/app-paths-manifest.json
deleted file mode 100644
index a9363bd..0000000
--- a/.next/dev/server/app/config-files/page/app-paths-manifest.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "/config-files/page": "app/config-files/page.js"
-}
\ No newline at end of file
diff --git a/.next/dev/server/app/config-files/page/build-manifest.json b/.next/dev/server/app/config-files/page/build-manifest.json
deleted file mode 100644
index c92f10b..0000000
--- a/.next/dev/server/app/config-files/page/build-manifest.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "devFiles": [],
- "ampDevFiles": [],
- "polyfillFiles": [
- "static/chunks/node_modules_next_dist_build_polyfills_polyfill-nomodule.js"
- ],
- "lowPriorityFiles": [],
- "rootMainFiles": [
- "static/chunks/[turbopack]_browser_dev_hmr-client_hmr-client_ts_10z625~._.js",
- "static/chunks/node_modules_next_dist_compiled_next-devtools_index_0553esy.js",
- "static/chunks/node_modules_next_dist_compiled_react-dom_058-ah~._.js",
- "static/chunks/node_modules_next_dist_compiled_react-server-dom-turbopack_0p3wegg._.js",
- "static/chunks/node_modules_next_dist_compiled_0rpq4pf._.js",
- "static/chunks/node_modules_next_dist_client_0fhqo1d._.js",
- "static/chunks/node_modules_next_dist_115brz8._.js",
- "static/chunks/node_modules_@swc_helpers_cjs_0-4ujiy._.js",
- "static/chunks/_0rqeker._.js",
- "static/chunks/turbopack-_0p44nws._.js"
- ],
- "pages": {},
- "ampFirstPages": []
-}
\ No newline at end of file
diff --git a/.next/dev/server/app/config-files/page/next-font-manifest.json b/.next/dev/server/app/config-files/page/next-font-manifest.json
deleted file mode 100644
index e0cc400..0000000
--- a/.next/dev/server/app/config-files/page/next-font-manifest.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "pages": {},
- "app": {},
- "appUsingSizeAdjust": false,
- "pagesUsingSizeAdjust": false
-}
\ No newline at end of file
diff --git a/.next/dev/server/app/config-files/page/react-loadable-manifest.json b/.next/dev/server/app/config-files/page/react-loadable-manifest.json
deleted file mode 100644
index 9e26dfe..0000000
--- a/.next/dev/server/app/config-files/page/react-loadable-manifest.json
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/.next/dev/server/app/config-files/page/server-reference-manifest.json b/.next/dev/server/app/config-files/page/server-reference-manifest.json
deleted file mode 100644
index 27a92af..0000000
--- a/.next/dev/server/app/config-files/page/server-reference-manifest.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "node": {},
- "edge": {}
-}
\ No newline at end of file
diff --git a/.next/dev/server/app/config-files/page_client-reference-manifest.js b/.next/dev/server/app/config-files/page_client-reference-manifest.js
deleted file mode 100644
index 2460d18..0000000
--- a/.next/dev/server/app/config-files/page_client-reference-manifest.js
+++ /dev/null
@@ -1,3 +0,0 @@
-globalThis.__RSC_MANIFEST = globalThis.__RSC_MANIFEST || {};
-globalThis.__RSC_MANIFEST["/config-files/page"] = {"moduleLoading":{"prefix":"","crossOrigin":null},"clientModules":{"[project]/node_modules/next/dist/esm/client/components/layout-router.js ":{"id":"[project]/node_modules/next/dist/client/components/layout-router.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/layout-router.js":{"id":"[project]/node_modules/next/dist/client/components/layout-router.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js ":{"id":"[project]/node_modules/next/dist/client/components/render-from-template-context.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":"[project]/node_modules/next/dist/client/components/render-from-template-context.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js ":{"id":"[project]/node_modules/next/dist/client/components/client-page.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js":{"id":"[project]/node_modules/next/dist/client/components/client-page.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js ":{"id":"[project]/node_modules/next/dist/client/components/client-segment.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js":{"id":"[project]/node_modules/next/dist/client/components/client-segment.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js ":{"id":"[project]/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":"[project]/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js ":{"id":"[project]/node_modules/next/dist/lib/framework/boundary-components.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":"[project]/node_modules/next/dist/lib/framework/boundary-components.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js ":{"id":"[project]/node_modules/next/dist/lib/metadata/generate/icon-mark.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":"[project]/node_modules/next/dist/lib/metadata/generate/icon-mark.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js ":{"id":"[project]/node_modules/next/dist/next-devtools/userspace/app/segment-explorer-node.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js":{"id":"[project]/node_modules/next/dist/next-devtools/userspace/app/segment-explorer-node.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/src/app/components/sidebar.tsx ":{"id":"[project]/src/app/components/sidebar.tsx [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/src/app/components/sidebar.tsx":{"id":"[project]/src/app/components/sidebar.tsx [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/src/app/components/header.tsx ":{"id":"[project]/src/app/components/header.tsx [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/src/app/components/header.tsx":{"id":"[project]/src/app/components/header.tsx [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js ":{"id":"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js","/_next/static/chunks/node_modules_next_dist_client_components_builtin_global-error_0f63mjb.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js":{"id":"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js","/_next/static/chunks/node_modules_next_dist_client_components_builtin_global-error_0f63mjb.js"],"async":false},"[project]/src/app/config-files/page.tsx ":{"id":"[project]/src/app/config-files/page.tsx [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js","/_next/static/chunks/src_0jzt67w._.js","/_next/static/chunks/node_modules_lucide-react_dist_esm_icons_0mf-lb-._.js","/_next/static/chunks/src_app_config-files_page_tsx_0f63mjb._.js"],"async":false},"[project]/src/app/config-files/page.tsx":{"id":"[project]/src/app/config-files/page.tsx [app-client] (ecmascript)","name":"*","chunks":["/_next/static/chunks/node_modules_0ulvbg7._.js","/_next/static/chunks/src_app_components_0_lrvu~._.js","/_next/static/chunks/src_app_layout_tsx_004glpo._.js","/_next/static/chunks/src_0jzt67w._.js","/_next/static/chunks/node_modules_lucide-react_dist_esm_icons_0mf-lb-._.js","/_next/static/chunks/src_app_config-files_page_tsx_0f63mjb._.js"],"async":false}},"ssrModuleMapping":{"[project]/node_modules/next/dist/client/components/layout-router.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/client/components/layout-router.js [app-ssr] (ecmascript)","name":"*","chunks":["server/chunks/ssr/node_modules_next_dist_client_0.p0.cy._.js","server/chunks/ssr/node_modules_next_dist_esm_0cqcg00._.js","server/chunks/ssr/node_modules_next_dist_11b4uhw._.js","server/chunks/ssr/node_modules_next_navigation_08-xh1..js","server/chunks/ssr/node_modules_0nciuk8._.js","server/chunks/ssr/[root-of-the-server]__0dmu~vd._.js"],"async":false}},"[project]/node_modules/next/dist/client/components/render-from-template-context.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js [app-ssr] (ecmascript)","name":"*","chunks":["server/chunks/ssr/node_modules_next_dist_client_0.p0.cy._.js","server/chunks/ssr/node_modules_next_dist_esm_0cqcg00._.js","server/chunks/ssr/node_modules_next_dist_11b4uhw._.js","server/chunks/ssr/node_modules_next_navigation_08-xh1..js","server/chunks/ssr/node_modules_0nciuk8._.js","server/chunks/ssr/[root-of-the-server]__0dmu~vd._.js"],"async":false}},"[project]/node_modules/next/dist/client/components/client-page.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/client/components/client-page.js [app-ssr] (ecmascript)","name":"*","chunks":["server/chunks/ssr/node_modules_next_dist_client_0.p0.cy._.js","server/chunks/ssr/node_modules_next_dist_esm_0cqcg00._.js","server/chunks/ssr/node_modules_next_dist_11b4uhw._.js","server/chunks/ssr/node_modules_next_navigation_08-xh1..js","server/chunks/ssr/node_modules_0nciuk8._.js","server/chunks/ssr/[root-of-the-server]__0dmu~vd._.js"],"async":false}},"[project]/node_modules/next/dist/client/components/client-segment.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/client/components/client-segment.js [app-ssr] (ecmascript)","name":"*","chunks":["server/chunks/ssr/node_modules_next_dist_client_0.p0.cy._.js","server/chunks/ssr/node_modules_next_dist_esm_0cqcg00._.js","server/chunks/ssr/node_modules_next_dist_11b4uhw._.js","server/chunks/ssr/node_modules_next_navigation_08-xh1..js","server/chunks/ssr/node_modules_0nciuk8._.js","server/chunks/ssr/[root-of-the-server]__0dmu~vd._.js"],"async":false}},"[project]/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js [app-ssr] (ecmascript)","name":"*","chunks":["server/chunks/ssr/node_modules_next_dist_client_0.p0.cy._.js","server/chunks/ssr/node_modules_next_dist_esm_0cqcg00._.js","server/chunks/ssr/node_modules_next_dist_11b4uhw._.js","server/chunks/ssr/node_modules_next_navigation_08-xh1..js","server/chunks/ssr/node_modules_0nciuk8._.js","server/chunks/ssr/[root-of-the-server]__0dmu~vd._.js"],"async":false}},"[project]/node_modules/next/dist/lib/framework/boundary-components.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js [app-ssr] (ecmascript)","name":"*","chunks":["server/chunks/ssr/node_modules_next_dist_client_0.p0.cy._.js","server/chunks/ssr/node_modules_next_dist_esm_0cqcg00._.js","server/chunks/ssr/node_modules_next_dist_11b4uhw._.js","server/chunks/ssr/node_modules_next_navigation_08-xh1..js","server/chunks/ssr/node_modules_0nciuk8._.js","server/chunks/ssr/[root-of-the-server]__0dmu~vd._.js"],"async":false}},"[project]/node_modules/next/dist/lib/metadata/generate/icon-mark.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js [app-ssr] (ecmascript)","name":"*","chunks":["server/chunks/ssr/node_modules_next_dist_client_0.p0.cy._.js","server/chunks/ssr/node_modules_next_dist_esm_0cqcg00._.js","server/chunks/ssr/node_modules_next_dist_11b4uhw._.js","server/chunks/ssr/node_modules_next_navigation_08-xh1..js","server/chunks/ssr/node_modules_0nciuk8._.js","server/chunks/ssr/[root-of-the-server]__0dmu~vd._.js"],"async":false}},"[project]/node_modules/next/dist/next-devtools/userspace/app/segment-explorer-node.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js [app-ssr] (ecmascript)","name":"*","chunks":["server/chunks/ssr/node_modules_next_dist_client_0.p0.cy._.js","server/chunks/ssr/node_modules_next_dist_esm_0cqcg00._.js","server/chunks/ssr/node_modules_next_dist_11b4uhw._.js","server/chunks/ssr/node_modules_next_navigation_08-xh1..js","server/chunks/ssr/node_modules_0nciuk8._.js","server/chunks/ssr/[root-of-the-server]__0dmu~vd._.js"],"async":false}},"[project]/src/app/components/sidebar.tsx [app-client] (ecmascript)":{"*":{"id":"[project]/src/app/components/sidebar.tsx [app-ssr] (ecmascript)","name":"*","chunks":["server/chunks/ssr/node_modules_next_dist_client_0.p0.cy._.js","server/chunks/ssr/node_modules_next_dist_esm_0cqcg00._.js","server/chunks/ssr/node_modules_next_dist_11b4uhw._.js","server/chunks/ssr/node_modules_next_navigation_08-xh1..js","server/chunks/ssr/node_modules_0nciuk8._.js","server/chunks/ssr/[root-of-the-server]__0dmu~vd._.js"],"async":false}},"[project]/src/app/components/header.tsx [app-client] (ecmascript)":{"*":{"id":"[project]/src/app/components/header.tsx [app-ssr] (ecmascript)","name":"*","chunks":["server/chunks/ssr/node_modules_next_dist_client_0.p0.cy._.js","server/chunks/ssr/node_modules_next_dist_esm_0cqcg00._.js","server/chunks/ssr/node_modules_next_dist_11b4uhw._.js","server/chunks/ssr/node_modules_next_navigation_08-xh1..js","server/chunks/ssr/node_modules_0nciuk8._.js","server/chunks/ssr/[root-of-the-server]__0dmu~vd._.js"],"async":false}},"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-ssr] (ecmascript)","name":"*","chunks":["server/chunks/ssr/node_modules_next_dist_client_0.p0.cy._.js","server/chunks/ssr/node_modules_next_dist_esm_0cqcg00._.js","server/chunks/ssr/node_modules_next_dist_11b4uhw._.js","server/chunks/ssr/node_modules_next_navigation_08-xh1..js","server/chunks/ssr/node_modules_0nciuk8._.js","server/chunks/ssr/[root-of-the-server]__0dmu~vd._.js","server/chunks/ssr/node_modules_09w7yel._.js"],"async":false}},"[project]/src/app/config-files/page.tsx [app-client] (ecmascript)":{"*":{"id":"[project]/src/app/config-files/page.tsx [app-ssr] (ecmascript)","name":"*","chunks":["server/chunks/ssr/node_modules_next_dist_client_0.p0.cy._.js","server/chunks/ssr/node_modules_next_dist_esm_0cqcg00._.js","server/chunks/ssr/node_modules_next_dist_11b4uhw._.js","server/chunks/ssr/node_modules_next_navigation_08-xh1..js","server/chunks/ssr/node_modules_0nciuk8._.js","server/chunks/ssr/[root-of-the-server]__0dmu~vd._.js","server/chunks/ssr/src_0yh~yz.._.js","server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_05vmnrh._.js"],"async":false}}},"edgeSSRModuleMapping":{},"rscModuleMapping":{"[project]/node_modules/next/dist/client/components/layout-router.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/client/components/layout-router.js [app-rsc] (client reference proxy)","name":"*","chunks":[],"async":false}},"[project]/node_modules/next/dist/client/components/render-from-template-context.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js [app-rsc] (client reference proxy)","name":"*","chunks":[],"async":false}},"[project]/node_modules/next/dist/client/components/client-page.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/client/components/client-page.js [app-rsc] (client reference proxy)","name":"*","chunks":[],"async":false}},"[project]/node_modules/next/dist/client/components/client-segment.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/client/components/client-segment.js [app-rsc] (client reference proxy)","name":"*","chunks":[],"async":false}},"[project]/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js [app-rsc] (client reference proxy)","name":"*","chunks":[],"async":false}},"[project]/node_modules/next/dist/lib/framework/boundary-components.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js [app-rsc] (client reference proxy)","name":"*","chunks":[],"async":false}},"[project]/node_modules/next/dist/lib/metadata/generate/icon-mark.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js [app-rsc] (client reference proxy)","name":"*","chunks":[],"async":false}},"[project]/node_modules/next/dist/next-devtools/userspace/app/segment-explorer-node.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js [app-rsc] (client reference proxy)","name":"*","chunks":[],"async":false}},"[project]/src/app/components/sidebar.tsx [app-client] (ecmascript)":{"*":{"id":"[project]/src/app/components/sidebar.tsx [app-rsc] (client reference proxy)","name":"*","chunks":[],"async":false}},"[project]/src/app/components/header.tsx [app-client] (ecmascript)":{"*":{"id":"[project]/src/app/components/header.tsx [app-rsc] (client reference proxy)","name":"*","chunks":[],"async":false}},"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-client] (ecmascript)":{"*":{"id":"[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-rsc] (client reference proxy)","name":"*","chunks":[],"async":false}},"[project]/src/app/config-files/page.tsx [app-client] (ecmascript)":{"*":{"id":"[project]/src/app/config-files/page.tsx [app-rsc] (client reference proxy)","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{},"entryCSSFiles":{"[project]/src/app/layout":[{"path":"static/chunks/src_styles_index_0t07~u2.css","inlined":false}],"[project]/node_modules/next/dist/client/components/builtin/global-error":[{"path":"static/chunks/src_styles_index_0t07~u2.css","inlined":false}],"[project]/src/app/config-files/page":[{"path":"static/chunks/src_styles_index_0t07~u2.css","inlined":false}]},"entryJSFiles":{"[project]/src/app/layout":["static/chunks/node_modules_0ulvbg7._.js","static/chunks/src_app_components_0_lrvu~._.js","static/chunks/src_app_layout_tsx_004glpo._.js"],"[project]/node_modules/next/dist/client/components/builtin/global-error":["static/chunks/node_modules_0ulvbg7._.js","static/chunks/src_app_components_0_lrvu~._.js","static/chunks/src_app_layout_tsx_004glpo._.js","static/chunks/node_modules_next_dist_client_components_builtin_global-error_0f63mjb.js"],"[project]/src/app/config-files/page":["static/chunks/node_modules_0ulvbg7._.js","static/chunks/src_app_components_0_lrvu~._.js","static/chunks/src_app_layout_tsx_004glpo._.js","static/chunks/src_0jzt67w._.js","static/chunks/node_modules_lucide-react_dist_esm_icons_0mf-lb-._.js","static/chunks/src_app_config-files_page_tsx_0f63mjb._.js"]}};
-
diff --git a/.next/dev/server/chunks/ssr/[turbopack]_runtime.js b/.next/dev/server/chunks/ssr/[turbopack]_runtime.js
deleted file mode 100644
index b463ed7..0000000
--- a/.next/dev/server/chunks/ssr/[turbopack]_runtime.js
+++ /dev/null
@@ -1,1752 +0,0 @@
-const RUNTIME_PUBLIC_PATH = "server/chunks/ssr/[turbopack]_runtime.js";
-const RELATIVE_ROOT_PATH = "../..";
-const ASSET_PREFIX = "/_next/";
-const WORKER_FORWARDED_GLOBALS = ["NEXT_DEPLOYMENT_ID","NEXT_CLIENT_ASSET_SUFFIX"];
-// Apply forwarded globals from workerData if running in a worker thread
-if (typeof require !== 'undefined') {
- try {
- const { workerData } = require('worker_threads');
- if (workerData?.__turbopack_globals__) {
- Object.assign(globalThis, workerData.__turbopack_globals__);
- // Remove internal data so it's not visible to user code
- delete workerData.__turbopack_globals__;
- }
- } catch (_) {
- // Not in a worker thread context, ignore
- }
-}
-/**
- * This file contains runtime types and functions that are shared between all
- * TurboPack ECMAScript runtimes.
- *
- * It will be prepended to the runtime code of each runtime.
- */ /* eslint-disable @typescript-eslint/no-unused-vars */ ///
-/**
- * Describes why a module was instantiated.
- * Shared between browser and Node.js runtimes.
- */ var SourceType = /*#__PURE__*/ function(SourceType) {
- /**
- * The module was instantiated because it was included in an evaluated chunk's
- * runtime.
- * SourceData is a ChunkPath.
- */ SourceType[SourceType["Runtime"] = 0] = "Runtime";
- /**
- * The module was instantiated because a parent module imported it.
- * SourceData is a ModuleId.
- */ SourceType[SourceType["Parent"] = 1] = "Parent";
- /**
- * The module was instantiated because it was included in a chunk's hot module
- * update.
- * SourceData is an array of ModuleIds or undefined.
- */ SourceType[SourceType["Update"] = 2] = "Update";
- return SourceType;
-}(SourceType || {});
-/**
- * Flag indicating which module object type to create when a module is merged. Set to `true`
- * by each runtime that uses ModuleWithDirection (browser dev-base.ts, nodejs dev-base.ts,
- * nodejs build-base.ts). Browser production (build-base.ts) leaves it as `false` since it
- * uses plain Module objects.
- */ let createModuleWithDirectionFlag = false;
-const REEXPORTED_OBJECTS = new WeakMap();
-/**
- * Constructs the `__turbopack_context__` object for a module.
- */ function Context(module, exports) {
- this.m = module;
- // We need to store this here instead of accessing it from the module object to:
- // 1. Make it available to factories directly, since we rewrite `this` to
- // `__turbopack_context__.e` in CJS modules.
- // 2. Support async modules which rewrite `module.exports` to a promise, so we
- // can still access the original exports object from functions like
- // `esmExport`
- // Ideally we could find a new approach for async modules and drop this property altogether.
- this.e = exports;
-}
-const contextPrototype = Context.prototype;
-const hasOwnProperty = Object.prototype.hasOwnProperty;
-const toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag;
-function defineProp(obj, name, options) {
- if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options);
-}
-function getOverwrittenModule(moduleCache, id) {
- let module = moduleCache[id];
- if (!module) {
- if (createModuleWithDirectionFlag) {
- // set in development modes for hmr support
- module = createModuleWithDirection(id);
- } else {
- module = createModuleObject(id);
- }
- moduleCache[id] = module;
- }
- return module;
-}
-/**
- * Creates the module object. Only done here to ensure all module objects have the same shape.
- */ function createModuleObject(id) {
- return {
- exports: {},
- error: undefined,
- id,
- namespaceObject: undefined
- };
-}
-function createModuleWithDirection(id) {
- return {
- exports: {},
- error: undefined,
- id,
- namespaceObject: undefined,
- parents: [],
- children: []
- };
-}
-const BindingTag_Value = 0;
-/**
- * Adds the getters to the exports object.
- */ function esm(exports, bindings) {
- defineProp(exports, '__esModule', {
- value: true
- });
- if (toStringTag) defineProp(exports, toStringTag, {
- value: 'Module'
- });
- let i = 0;
- while(i < bindings.length){
- const propName = bindings[i++];
- const tagOrFunction = bindings[i++];
- if (typeof tagOrFunction === 'number') {
- if (tagOrFunction === BindingTag_Value) {
- defineProp(exports, propName, {
- value: bindings[i++],
- enumerable: true,
- writable: false
- });
- } else {
- throw new Error(`unexpected tag: ${tagOrFunction}`);
- }
- } else {
- const getterFn = tagOrFunction;
- if (typeof bindings[i] === 'function') {
- const setterFn = bindings[i++];
- defineProp(exports, propName, {
- get: getterFn,
- set: setterFn,
- enumerable: true
- });
- } else {
- defineProp(exports, propName, {
- get: getterFn,
- enumerable: true
- });
- }
- }
- }
- Object.seal(exports);
-}
-/**
- * Makes the module an ESM with exports
- */ function esmExport(bindings, id) {
- let module;
- let exports;
- if (id != null) {
- module = getOverwrittenModule(this.c, id);
- exports = module.exports;
- } else {
- module = this.m;
- exports = this.e;
- }
- module.namespaceObject = exports;
- esm(exports, bindings);
-}
-contextPrototype.s = esmExport;
-function ensureDynamicExports(module, exports) {
- let reexportedObjects = REEXPORTED_OBJECTS.get(module);
- if (!reexportedObjects) {
- REEXPORTED_OBJECTS.set(module, reexportedObjects = []);
- module.exports = module.namespaceObject = new Proxy(exports, {
- get (target, prop) {
- if (hasOwnProperty.call(target, prop) || prop === 'default' || prop === '__esModule') {
- return Reflect.get(target, prop);
- }
- for (const obj of reexportedObjects){
- const value = Reflect.get(obj, prop);
- if (value !== undefined) return value;
- }
- return undefined;
- },
- ownKeys (target) {
- const keys = Reflect.ownKeys(target);
- for (const obj of reexportedObjects){
- for (const key of Reflect.ownKeys(obj)){
- if (key !== 'default' && !keys.includes(key)) keys.push(key);
- }
- }
- return keys;
- }
- });
- }
- return reexportedObjects;
-}
-/**
- * Dynamically exports properties from an object
- */ function dynamicExport(object, id) {
- let module;
- let exports;
- if (id != null) {
- module = getOverwrittenModule(this.c, id);
- exports = module.exports;
- } else {
- module = this.m;
- exports = this.e;
- }
- const reexportedObjects = ensureDynamicExports(module, exports);
- if (typeof object === 'object' && object !== null) {
- reexportedObjects.push(object);
- }
-}
-contextPrototype.j = dynamicExport;
-function exportValue(value, id) {
- let module;
- if (id != null) {
- module = getOverwrittenModule(this.c, id);
- } else {
- module = this.m;
- }
- module.exports = value;
-}
-contextPrototype.v = exportValue;
-function exportNamespace(namespace, id) {
- let module;
- if (id != null) {
- module = getOverwrittenModule(this.c, id);
- } else {
- module = this.m;
- }
- module.exports = module.namespaceObject = namespace;
-}
-contextPrototype.n = exportNamespace;
-function createGetter(obj, key) {
- return ()=>obj[key];
-}
-/**
- * @returns prototype of the object
- */ const getProto = Object.getPrototypeOf ? (obj)=>Object.getPrototypeOf(obj) : (obj)=>obj.__proto__;
-/** Prototypes that are not expanded for exports */ const LEAF_PROTOTYPES = [
- null,
- getProto({}),
- getProto([]),
- getProto(getProto)
-];
-/**
- * @param raw
- * @param ns
- * @param allowExportDefault
- * * `false`: will have the raw module as default export
- * * `true`: will have the default property as default export
- */ function interopEsm(raw, ns, allowExportDefault) {
- const bindings = [];
- let defaultLocation = -1;
- for(let current = raw; (typeof current === 'object' || typeof current === 'function') && !LEAF_PROTOTYPES.includes(current); current = getProto(current)){
- for (const key of Object.getOwnPropertyNames(current)){
- bindings.push(key, createGetter(raw, key));
- if (defaultLocation === -1 && key === 'default') {
- defaultLocation = bindings.length - 1;
- }
- }
- }
- // this is not really correct
- // we should set the `default` getter if the imported module is a `.cjs file`
- if (!(allowExportDefault && defaultLocation >= 0)) {
- // Replace the binding with one for the namespace itself in order to preserve iteration order.
- if (defaultLocation >= 0) {
- // Replace the getter with the value
- bindings.splice(defaultLocation, 1, BindingTag_Value, raw);
- } else {
- bindings.push('default', BindingTag_Value, raw);
- }
- }
- esm(ns, bindings);
- return ns;
-}
-function createNS(raw) {
- if (typeof raw === 'function') {
- return function(...args) {
- return raw.apply(this, args);
- };
- } else {
- return Object.create(null);
- }
-}
-function esmImport(id) {
- const module = getOrInstantiateModuleFromParent(id, this.m);
- // any ES module has to have `module.namespaceObject` defined.
- if (module.namespaceObject) return module.namespaceObject;
- // only ESM can be an async module, so we don't need to worry about exports being a promise here.
- const raw = module.exports;
- return module.namespaceObject = interopEsm(raw, createNS(raw), raw && raw.__esModule);
-}
-contextPrototype.i = esmImport;
-function asyncLoader(moduleId) {
- const loader = this.r(moduleId);
- return loader(esmImport.bind(this));
-}
-contextPrototype.A = asyncLoader;
-// Add a simple runtime require so that environments without one can still pass
-// `typeof require` CommonJS checks so that exports are correctly registered.
-const runtimeRequire = // @ts-ignore
-typeof require === 'function' ? require : function require1() {
- throw new Error('Unexpected use of runtime require');
-};
-contextPrototype.t = runtimeRequire;
-function commonJsRequire(id) {
- return getOrInstantiateModuleFromParent(id, this.m).exports;
-}
-contextPrototype.r = commonJsRequire;
-/**
- * Remove fragments and query parameters since they are never part of the context map keys
- *
- * This matches how we parse patterns at resolving time. Arguably we should only do this for
- * strings passed to `import` but the resolve does it for `import` and `require` and so we do
- * here as well.
- */ function parseRequest(request) {
- // Per the URI spec fragments can contain `?` characters, so we should trim it off first
- // https://datatracker.ietf.org/doc/html/rfc3986#section-3.5
- const hashIndex = request.indexOf('#');
- if (hashIndex !== -1) {
- request = request.substring(0, hashIndex);
- }
- const queryIndex = request.indexOf('?');
- if (queryIndex !== -1) {
- request = request.substring(0, queryIndex);
- }
- return request;
-}
-/**
- * `require.context` and require/import expression runtime.
- */ function moduleContext(map) {
- function moduleContext(id) {
- id = parseRequest(id);
- if (hasOwnProperty.call(map, id)) {
- return map[id].module();
- }
- const e = new Error(`Cannot find module '${id}'`);
- e.code = 'MODULE_NOT_FOUND';
- throw e;
- }
- moduleContext.keys = ()=>{
- return Object.keys(map);
- };
- moduleContext.resolve = (id)=>{
- id = parseRequest(id);
- if (hasOwnProperty.call(map, id)) {
- return map[id].id();
- }
- const e = new Error(`Cannot find module '${id}'`);
- e.code = 'MODULE_NOT_FOUND';
- throw e;
- };
- moduleContext.import = async (id)=>{
- return await moduleContext(id);
- };
- return moduleContext;
-}
-contextPrototype.f = moduleContext;
-/**
- * Returns the path of a chunk defined by its data.
- */ function getChunkPath(chunkData) {
- return typeof chunkData === 'string' ? chunkData : chunkData.path;
-}
-function isPromise(maybePromise) {
- return maybePromise != null && typeof maybePromise === 'object' && 'then' in maybePromise && typeof maybePromise.then === 'function';
-}
-function isAsyncModuleExt(obj) {
- return turbopackQueues in obj;
-}
-function createPromise() {
- let resolve;
- let reject;
- const promise = new Promise((res, rej)=>{
- reject = rej;
- resolve = res;
- });
- return {
- promise,
- resolve: resolve,
- reject: reject
- };
-}
-// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.
-// The CompressedModuleFactories format is
-// - 1 or more module ids
-// - a module factory function
-// So walking this is a little complex but the flat structure is also fast to
-// traverse, we can use `typeof` operators to distinguish the two cases.
-function installCompressedModuleFactories(chunkModules, offset, moduleFactories, newModuleId) {
- let i = offset;
- while(i < chunkModules.length){
- let end = i + 1;
- // Find our factory function
- while(end < chunkModules.length && typeof chunkModules[end] !== 'function'){
- end++;
- }
- if (end === chunkModules.length) {
- throw new Error('malformed chunk format, expected a factory function');
- }
- // Install the factory for each module ID that doesn't already have one.
- // When some IDs in this group already have a factory, reuse that existing
- // group factory for the missing IDs to keep all IDs in the group consistent.
- // Otherwise, install the factory from this chunk.
- const moduleFactoryFn = chunkModules[end];
- let existingGroupFactory = undefined;
- for(let j = i; j < end; j++){
- const id = chunkModules[j];
- const existingFactory = moduleFactories.get(id);
- if (existingFactory) {
- existingGroupFactory = existingFactory;
- break;
- }
- }
- const factoryToInstall = existingGroupFactory ?? moduleFactoryFn;
- let didInstallFactory = false;
- for(let j = i; j < end; j++){
- const id = chunkModules[j];
- if (!moduleFactories.has(id)) {
- if (!didInstallFactory) {
- if (factoryToInstall === moduleFactoryFn) {
- applyModuleFactoryName(moduleFactoryFn);
- }
- didInstallFactory = true;
- }
- moduleFactories.set(id, factoryToInstall);
- newModuleId?.(id);
- }
- }
- i = end + 1; // end is pointing at the last factory advance to the next id or the end of the array.
- }
-}
-// everything below is adapted from webpack
-// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13
-const turbopackQueues = Symbol('turbopack queues');
-const turbopackExports = Symbol('turbopack exports');
-const turbopackError = Symbol('turbopack error');
-function resolveQueue(queue) {
- if (queue && queue.status !== 1) {
- queue.status = 1;
- queue.forEach((fn)=>fn.queueCount--);
- queue.forEach((fn)=>fn.queueCount-- ? fn.queueCount++ : fn());
- }
-}
-function wrapDeps(deps) {
- return deps.map((dep)=>{
- if (dep !== null && typeof dep === 'object') {
- if (isAsyncModuleExt(dep)) return dep;
- if (isPromise(dep)) {
- const queue = Object.assign([], {
- status: 0
- });
- const obj = {
- [turbopackExports]: {},
- [turbopackQueues]: (fn)=>fn(queue)
- };
- dep.then((res)=>{
- obj[turbopackExports] = res;
- resolveQueue(queue);
- }, (err)=>{
- obj[turbopackError] = err;
- resolveQueue(queue);
- });
- return obj;
- }
- }
- return {
- [turbopackExports]: dep,
- [turbopackQueues]: ()=>{}
- };
- });
-}
-function asyncModule(body, hasAwait) {
- const module = this.m;
- const queue = hasAwait ? Object.assign([], {
- status: -1
- }) : undefined;
- const depQueues = new Set();
- const { resolve, reject, promise: rawPromise } = createPromise();
- const promise = Object.assign(rawPromise, {
- [turbopackExports]: module.exports,
- [turbopackQueues]: (fn)=>{
- queue && fn(queue);
- depQueues.forEach(fn);
- promise['catch'](()=>{});
- }
- });
- const attributes = {
- get () {
- return promise;
- },
- set (v) {
- // Calling `esmExport` leads to this.
- if (v !== promise) {
- promise[turbopackExports] = v;
- }
- }
- };
- Object.defineProperty(module, 'exports', attributes);
- Object.defineProperty(module, 'namespaceObject', attributes);
- function handleAsyncDependencies(deps) {
- const currentDeps = wrapDeps(deps);
- const getResult = ()=>currentDeps.map((d)=>{
- if (d[turbopackError]) throw d[turbopackError];
- return d[turbopackExports];
- });
- const { promise, resolve } = createPromise();
- const fn = Object.assign(()=>resolve(getResult), {
- queueCount: 0
- });
- function fnQueue(q) {
- if (q !== queue && !depQueues.has(q)) {
- depQueues.add(q);
- if (q && q.status === 0) {
- fn.queueCount++;
- q.push(fn);
- }
- }
- }
- currentDeps.map((dep)=>dep[turbopackQueues](fnQueue));
- return fn.queueCount ? promise : getResult();
- }
- function asyncResult(err) {
- if (err) {
- reject(promise[turbopackError] = err);
- } else {
- resolve(promise[turbopackExports]);
- }
- resolveQueue(queue);
- }
- body(handleAsyncDependencies, asyncResult);
- if (queue && queue.status === -1) {
- queue.status = 0;
- }
-}
-contextPrototype.a = asyncModule;
-/**
- * A pseudo "fake" URL object to resolve to its relative path.
- *
- * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this
- * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid
- * hydration mismatch.
- *
- * This is based on webpack's existing implementation:
- * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js
- */ const relativeURL = function relativeURL(inputUrl) {
- const realUrl = new URL(inputUrl, 'x:/');
- const values = {};
- for(const key in realUrl)values[key] = realUrl[key];
- values.href = inputUrl;
- values.pathname = inputUrl.replace(/[?#].*/, '');
- values.origin = values.protocol = '';
- values.toString = values.toJSON = (..._args)=>inputUrl;
- for(const key in values)Object.defineProperty(this, key, {
- enumerable: true,
- configurable: true,
- value: values[key]
- });
-};
-relativeURL.prototype = URL.prototype;
-contextPrototype.U = relativeURL;
-/**
- * Utility function to ensure all variants of an enum are handled.
- */ function invariant(never, computeMessage) {
- throw new Error(`Invariant: ${computeMessage(never)}`);
-}
-/**
- * Constructs an error message for when a module factory is not available.
- */ function factoryNotAvailableMessage(moduleId, sourceType, sourceData) {
- let instantiationReason;
- switch(sourceType){
- case 0:
- instantiationReason = `as a runtime entry of chunk ${sourceData}`;
- break;
- case 1:
- instantiationReason = `because it was required from module ${sourceData}`;
- break;
- case 2:
- instantiationReason = 'because of an HMR update';
- break;
- default:
- invariant(sourceType, (sourceType)=>`Unknown source type: ${sourceType}`);
- }
- return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`;
-}
-/**
- * A stub function to make `require` available but non-functional in ESM.
- */ function requireStub(_moduleId) {
- throw new Error('dynamic usage of require is not supported');
-}
-contextPrototype.z = requireStub;
-// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.
-contextPrototype.g = globalThis;
-function applyModuleFactoryName(factory) {
- // Give the module factory a nice name to improve stack traces.
- Object.defineProperty(factory, 'name', {
- value: 'module evaluation'
- });
-}
-///
-/// A 'base' utilities to support runtime can have externals.
-/// Currently this is for node.js / edge runtime both.
-/// If a fn requires node.js specific behavior, it should be placed in `node-external-utils` instead.
-async function externalImport(id) {
- let raw;
- try {
- raw = await import(id);
- } catch (err) {
- // TODO(alexkirsz) This can happen when a client-side module tries to load
- // an external module we don't provide a shim for (e.g. querystring, url).
- // For now, we fail semi-silently, but in the future this should be a
- // compilation error.
- throw new Error(`Failed to load external module ${id}: ${err}`);
- }
- if (raw && raw.__esModule && raw.default && 'default' in raw.default) {
- return interopEsm(raw.default, createNS(raw), true);
- }
- return raw;
-}
-contextPrototype.y = externalImport;
-function externalRequire(id, thunk, esm = false) {
- let raw;
- try {
- raw = thunk();
- } catch (err) {
- // TODO(alexkirsz) This can happen when a client-side module tries to load
- // an external module we don't provide a shim for (e.g. querystring, url).
- // For now, we fail semi-silently, but in the future this should be a
- // compilation error.
- throw new Error(`Failed to load external module ${id}: ${err}`);
- }
- if (!esm || raw.__esModule) {
- return raw;
- }
- return interopEsm(raw, createNS(raw), true);
-}
-externalRequire.resolve = (id, options)=>{
- return require.resolve(id, options);
-};
-contextPrototype.x = externalRequire;
-/* eslint-disable @typescript-eslint/no-unused-vars */ const path = require('path');
-const relativePathToRuntimeRoot = path.relative(RUNTIME_PUBLIC_PATH, '.');
-// Compute the relative path to the `distDir`.
-const relativePathToDistRoot = path.join(relativePathToRuntimeRoot, RELATIVE_ROOT_PATH);
-const RUNTIME_ROOT = path.resolve(__filename, relativePathToRuntimeRoot);
-// Compute the absolute path to the root, by stripping distDir from the absolute path to this file.
-const ABSOLUTE_ROOT = path.resolve(__filename, relativePathToDistRoot);
-/**
- * Returns an absolute path to the given module path.
- * Module path should be relative, either path to a file or a directory.
- *
- * This fn allows to calculate an absolute path for some global static values, such as
- * `__dirname` or `import.meta.url` that Turbopack will not embeds in compile time.
- * See ImportMetaBinding::code_generation for the usage.
- */ function resolveAbsolutePath(modulePath) {
- if (modulePath) {
- return path.join(ABSOLUTE_ROOT, modulePath);
- }
- return ABSOLUTE_ROOT;
-}
-Context.prototype.P = resolveAbsolutePath;
-/* eslint-disable @typescript-eslint/no-unused-vars */ ///
-function readWebAssemblyAsResponse(path) {
- const { createReadStream } = require('fs');
- const { Readable } = require('stream');
- const stream = createReadStream(path);
- // @ts-ignore unfortunately there's a slight type mismatch with the stream.
- return new Response(Readable.toWeb(stream), {
- headers: {
- 'content-type': 'application/wasm'
- }
- });
-}
-async function compileWebAssemblyFromPath(path) {
- const response = readWebAssemblyAsResponse(path);
- return await WebAssembly.compileStreaming(response);
-}
-async function instantiateWebAssemblyFromPath(path, importsObj) {
- const response = readWebAssemblyAsResponse(path);
- const { instance } = await WebAssembly.instantiateStreaming(response, importsObj);
- return instance.exports;
-}
-/* eslint-disable @typescript-eslint/no-unused-vars */ ///
-///
-///
-///
-///
-/**
- * Base Node.js runtime shared between production and development.
- * Contains chunk loading, module caching, and other non-HMR functionality.
- */ process.env.TURBOPACK = '1';
-const url = require('url');
-const moduleFactories = new Map();
-const moduleCache = Object.create(null);
-/**
- * Returns an absolute path to the given module's id.
- */ function resolvePathFromModule(moduleId) {
- const exported = this.r(moduleId);
- const exportedPath = exported?.default ?? exported;
- if (typeof exportedPath !== 'string') {
- return exported;
- }
- const strippedAssetPrefix = exportedPath.slice(ASSET_PREFIX.length);
- const resolved = path.resolve(RUNTIME_ROOT, strippedAssetPrefix);
- return url.pathToFileURL(resolved).href;
-}
-/**
- * Exports a URL value. No suffix is added in Node.js runtime.
- */ function exportUrl(urlValue, id) {
- exportValue.call(this, urlValue, id);
-}
-function loadRuntimeChunk(sourcePath, chunkData) {
- if (typeof chunkData === 'string') {
- loadRuntimeChunkPath(sourcePath, chunkData);
- } else {
- loadRuntimeChunkPath(sourcePath, chunkData.path);
- }
-}
-const loadedChunks = new Set();
-const unsupportedLoadChunk = Promise.resolve(undefined);
-const loadedChunk = Promise.resolve(undefined);
-const chunkCache = new Map();
-function clearChunkCache() {
- chunkCache.clear();
- loadedChunks.clear();
-}
-function loadRuntimeChunkPath(sourcePath, chunkPath) {
- if (!isJs(chunkPath)) {
- // We only support loading JS chunks in Node.js.
- // This branch can be hit when trying to load a CSS chunk.
- return;
- }
- if (loadedChunks.has(chunkPath)) {
- return;
- }
- try {
- const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
- const chunkModules = require(resolved);
- installCompressedModuleFactories(chunkModules, 0, moduleFactories);
- loadedChunks.add(chunkPath);
- } catch (cause) {
- let errorMessage = `Failed to load chunk ${chunkPath}`;
- if (sourcePath) {
- errorMessage += ` from runtime for chunk ${sourcePath}`;
- }
- const error = new Error(errorMessage, {
- cause
- });
- error.name = 'ChunkLoadError';
- throw error;
- }
-}
-function loadChunkAsync(chunkData) {
- const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path;
- if (!isJs(chunkPath)) {
- // We only support loading JS chunks in Node.js.
- // This branch can be hit when trying to load a CSS chunk.
- return unsupportedLoadChunk;
- }
- let entry = chunkCache.get(chunkPath);
- if (entry === undefined) {
- try {
- // resolve to an absolute path to simplify `require` handling
- const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
- // TODO: consider switching to `import()` to enable concurrent chunk loading and async file io
- // However this is incompatible with hot reloading (since `import` doesn't use the require cache)
- const chunkModules = require(resolved);
- installCompressedModuleFactories(chunkModules, 0, moduleFactories);
- entry = loadedChunk;
- } catch (cause) {
- const errorMessage = `Failed to load chunk ${chunkPath} from module ${this.m.id}`;
- const error = new Error(errorMessage, {
- cause
- });
- error.name = 'ChunkLoadError';
- // Cache the failure promise, future requests will also get this same rejection
- entry = Promise.reject(error);
- }
- chunkCache.set(chunkPath, entry);
- }
- // TODO: Return an instrumented Promise that React can use instead of relying on referential equality.
- return entry;
-}
-contextPrototype.l = loadChunkAsync;
-function loadChunkAsyncByUrl(chunkUrl) {
- const path1 = url.fileURLToPath(new URL(chunkUrl, RUNTIME_ROOT));
- return loadChunkAsync.call(this, path1);
-}
-contextPrototype.L = loadChunkAsyncByUrl;
-function loadWebAssembly(chunkPath, _edgeModule, imports) {
- const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
- return instantiateWebAssemblyFromPath(resolved, imports);
-}
-contextPrototype.w = loadWebAssembly;
-function loadWebAssemblyModule(chunkPath, _edgeModule) {
- const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
- return compileWebAssemblyFromPath(resolved);
-}
-contextPrototype.u = loadWebAssemblyModule;
-/**
- * Creates a Node.js worker thread by instantiating the given WorkerConstructor
- * with the appropriate path and options, including forwarded globals.
- *
- * @param WorkerConstructor The Worker constructor from worker_threads
- * @param workerPath Path to the worker entry chunk
- * @param workerOptions options to pass to the Worker constructor (optional)
- */ function createWorker(WorkerConstructor, workerPath, workerOptions) {
- // Build the forwarded globals object
- const forwardedGlobals = {};
- for (const name of WORKER_FORWARDED_GLOBALS){
- forwardedGlobals[name] = globalThis[name];
- }
- // Merge workerData with forwarded globals
- const existingWorkerData = workerOptions?.workerData || {};
- const options = {
- ...workerOptions,
- workerData: {
- ...typeof existingWorkerData === 'object' ? existingWorkerData : {},
- __turbopack_globals__: forwardedGlobals
- }
- };
- return new WorkerConstructor(workerPath, options);
-}
-const regexJsUrl = /\.js(?:\?[^#]*)?(?:#.*)?$/;
-/**
- * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.
- */ function isJs(chunkUrlOrPath) {
- return regexJsUrl.test(chunkUrlOrPath);
-}
-///
-///
-///
-///
-/**
- * Shared HMR (Hot Module Replacement) implementation.
- *
- * This file contains the complete HMR implementation that's shared between
- * browser and Node.js runtimes. It manages module hot state, dependency
- * tracking, the module.hot API, and the full HMR update flow.
- */ /**
- * The development module cache shared across the runtime.
- * Browser runtime declares this directly.
- * Node.js runtime assigns globalThis.__turbopack_module_cache__ to this.
- */ let devModuleCache;
-/**
- * Module IDs that are instantiated as part of the runtime of a chunk.
- */ let runtimeModules;
-/**
- * Maps module IDs to persisted data between executions of their hot module
- * implementation (`hot.data`).
- */ const moduleHotData = new Map();
-/**
- * Maps module instances to their hot module state.
- * Uses WeakMap so it works with both HotModule and ModuleWithDirection.
- */ const moduleHotState = new WeakMap();
-/**
- * Modules that call `module.hot.invalidate()` (while being updated).
- */ const queuedInvalidatedModules = new Set();
-class UpdateApplyError extends Error {
- name = 'UpdateApplyError';
- dependencyChain;
- constructor(message, dependencyChain){
- super(message);
- this.dependencyChain = dependencyChain;
- }
-}
-/**
- * Records parent-child relationship when a module imports another.
- * Should be called during module instantiation.
- */ // eslint-disable-next-line @typescript-eslint/no-unused-vars
-function trackModuleImport(parentModule, childModuleId, childModule) {
- // Record that parent imports child
- if (parentModule.children.indexOf(childModuleId) === -1) {
- parentModule.children.push(childModuleId);
- }
- // Record that child is imported by parent
- if (childModule && childModule.parents.indexOf(parentModule.id) === -1) {
- childModule.parents.push(parentModule.id);
- }
-}
-function formatDependencyChain(dependencyChain) {
- return `Dependency chain: ${dependencyChain.join(' -> ')}`;
-}
-/**
- * Walks the dependency tree to find all modules affected by a change.
- * Returns information about whether the update can be accepted and which
- * modules need to be invalidated.
- *
- * @param moduleId - The module that changed
- * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept().
- * This is used for server-side HMR where pages auto-accept at the top level.
- */ function getAffectedModuleEffects(moduleId, autoAcceptRootModules) {
- const outdatedModules = new Set();
- const outdatedDependencies = new Map();
- const queue = [
- {
- moduleId,
- dependencyChain: []
- }
- ];
- let nextItem;
- while(nextItem = queue.shift()){
- const { moduleId, dependencyChain } = nextItem;
- if (moduleId != null) {
- if (outdatedModules.has(moduleId)) {
- continue;
- }
- outdatedModules.add(moduleId);
- }
- // We've arrived at the runtime of the chunk, which means that nothing
- // else above can accept this update.
- if (moduleId === undefined) {
- if (autoAcceptRootModules) {
- return {
- type: 'accepted',
- moduleId,
- outdatedModules,
- outdatedDependencies
- };
- }
- return {
- type: 'unaccepted',
- dependencyChain
- };
- }
- const module = devModuleCache[moduleId];
- const hotState = moduleHotState.get(module);
- if (// The module is not in the cache. Since this is a "modified" update,
- // it means that the module was never instantiated before.
- !module || hotState.selfAccepted && !hotState.selfInvalidated) {
- continue;
- }
- if (hotState.selfDeclined) {
- return {
- type: 'self-declined',
- dependencyChain,
- moduleId
- };
- }
- if (runtimeModules.has(moduleId)) {
- if (autoAcceptRootModules) {
- continue;
- }
- queue.push({
- moduleId: undefined,
- dependencyChain: [
- ...dependencyChain,
- moduleId
- ]
- });
- continue;
- }
- for (const parentId of module.parents){
- const parent = devModuleCache[parentId];
- if (!parent) {
- continue;
- }
- const parentHotState = moduleHotState.get(parent);
- // Check if parent declined this dependency
- if (parentHotState?.declinedDependencies[moduleId]) {
- return {
- type: 'declined',
- dependencyChain: [
- ...dependencyChain,
- moduleId
- ],
- moduleId,
- parentId
- };
- }
- // Skip if parent is already outdated
- if (outdatedModules.has(parentId)) {
- continue;
- }
- // Check if parent accepts this dependency
- if (parentHotState?.acceptedDependencies[moduleId]) {
- if (!outdatedDependencies.has(parentId)) {
- outdatedDependencies.set(parentId, new Set());
- }
- outdatedDependencies.get(parentId).add(moduleId);
- continue;
- }
- // Neither accepted nor declined — propagate to parent
- queue.push({
- moduleId: parentId,
- dependencyChain: [
- ...dependencyChain,
- moduleId
- ]
- });
- }
- // If no parents and we're at a root module, auto-accept if configured
- if (module.parents.length === 0 && autoAcceptRootModules) {
- continue;
- }
- }
- return {
- type: 'accepted',
- moduleId,
- outdatedModules,
- outdatedDependencies
- };
-}
-/**
- * Merges source dependency map into target dependency map.
- */ function mergeDependencies(target, source) {
- for (const [parentId, deps] of source){
- const existing = target.get(parentId);
- if (existing) {
- for (const dep of deps){
- existing.add(dep);
- }
- } else {
- target.set(parentId, new Set(deps));
- }
- }
-}
-/**
- * Computes all modules that need to be invalidated based on which modules changed.
- *
- * @param invalidated - The modules that have been invalidated
- * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept()
- */ function computedInvalidatedModules(invalidated, autoAcceptRootModules) {
- const outdatedModules = new Set();
- const outdatedDependencies = new Map();
- for (const moduleId of invalidated){
- const effect = getAffectedModuleEffects(moduleId, autoAcceptRootModules);
- switch(effect.type){
- case 'unaccepted':
- throw new UpdateApplyError(`cannot apply update: unaccepted module. ${formatDependencyChain(effect.dependencyChain)}.`, effect.dependencyChain);
- case 'self-declined':
- throw new UpdateApplyError(`cannot apply update: self-declined module. ${formatDependencyChain(effect.dependencyChain)}.`, effect.dependencyChain);
- case 'declined':
- throw new UpdateApplyError(`cannot apply update: declined dependency. ${formatDependencyChain(effect.dependencyChain)}. Declined by ${effect.parentId}.`, effect.dependencyChain);
- case 'accepted':
- for (const outdatedModuleId of effect.outdatedModules){
- outdatedModules.add(outdatedModuleId);
- }
- mergeDependencies(outdatedDependencies, effect.outdatedDependencies);
- break;
- default:
- invariant(effect, (effect)=>`Unknown effect type: ${effect?.type}`);
- }
- }
- return {
- outdatedModules,
- outdatedDependencies
- };
-}
-/**
- * Creates the module.hot API object and its internal state.
- * This provides the HMR API that user code calls (module.hot.accept(), etc.)
- */ function createModuleHot(moduleId, hotData) {
- const hotState = {
- selfAccepted: false,
- selfDeclined: false,
- selfInvalidated: false,
- disposeHandlers: [],
- acceptedDependencies: {},
- acceptedErrorHandlers: {},
- declinedDependencies: {}
- };
- const hot = {
- // TODO(alexkirsz) This is not defined in the HMR API. It was used to
- // decide whether to warn whenever an HMR-disposed module required other
- // modules. We might want to remove it.
- active: true,
- data: hotData ?? {},
- accept: (modules, callback, errorHandler)=>{
- if (modules === undefined) {
- hotState.selfAccepted = true;
- } else if (typeof modules === 'function') {
- hotState.selfAccepted = modules;
- } else if (typeof modules === 'object' && modules !== null) {
- for(let i = 0; i < modules.length; i++){
- hotState.acceptedDependencies[modules[i]] = callback || function() {};
- hotState.acceptedErrorHandlers[modules[i]] = errorHandler;
- }
- } else {
- hotState.acceptedDependencies[modules] = callback || function() {};
- hotState.acceptedErrorHandlers[modules] = errorHandler;
- }
- },
- decline: (dep)=>{
- if (dep === undefined) {
- hotState.selfDeclined = true;
- } else if (typeof dep === 'object' && dep !== null) {
- for(let i = 0; i < dep.length; i++){
- hotState.declinedDependencies[dep[i]] = true;
- }
- } else {
- hotState.declinedDependencies[dep] = true;
- }
- },
- dispose: (callback)=>{
- hotState.disposeHandlers.push(callback);
- },
- addDisposeHandler: (callback)=>{
- hotState.disposeHandlers.push(callback);
- },
- removeDisposeHandler: (callback)=>{
- const idx = hotState.disposeHandlers.indexOf(callback);
- if (idx >= 0) {
- hotState.disposeHandlers.splice(idx, 1);
- }
- },
- invalidate: ()=>{
- hotState.selfInvalidated = true;
- queuedInvalidatedModules.add(moduleId);
- },
- // NOTE(alexkirsz) This is part of the management API, which we don't
- // implement, but the Next.js React Refresh runtime uses this to decide
- // whether to schedule an update.
- status: ()=>'idle',
- // NOTE(alexkirsz) Since we always return "idle" for now, these are no-ops.
- addStatusHandler: (_handler)=>{},
- removeStatusHandler: (_handler)=>{},
- // NOTE(jridgewell) Check returns the list of updated modules, but we don't
- // want the webpack code paths to ever update (the turbopack paths handle
- // this already).
- check: ()=>Promise.resolve(null)
- };
- return {
- hot,
- hotState
- };
-}
-/**
- * Processes queued invalidated modules and adds them to the outdated modules set.
- * Modules that call module.hot.invalidate() are queued and processed here.
- *
- * @param outdatedModules - The current set of outdated modules
- * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept()
- */ function applyInvalidatedModules(outdatedModules, outdatedDependencies, autoAcceptRootModules) {
- if (queuedInvalidatedModules.size > 0) {
- const result = computedInvalidatedModules(queuedInvalidatedModules, autoAcceptRootModules);
- for (const moduleId of result.outdatedModules){
- outdatedModules.add(moduleId);
- }
- mergeDependencies(outdatedDependencies, result.outdatedDependencies);
- queuedInvalidatedModules.clear();
- }
- return {
- outdatedModules,
- outdatedDependencies
- };
-}
-/**
- * Computes which outdated modules have self-accepted and can be hot reloaded.
- */ function computeOutdatedSelfAcceptedModules(outdatedModules) {
- const outdatedSelfAcceptedModules = [];
- for (const moduleId of outdatedModules){
- const module = devModuleCache[moduleId];
- const hotState = moduleHotState.get(module);
- if (module && hotState?.selfAccepted && !hotState.selfInvalidated) {
- outdatedSelfAcceptedModules.push({
- moduleId,
- errorHandler: hotState.selfAccepted
- });
- }
- }
- return outdatedSelfAcceptedModules;
-}
-/**
- * Disposes of an instance of a module.
- * Runs hot.dispose handlers and manages persistent hot data.
- *
- * NOTE: mode = "replace" will not remove modules from devModuleCache.
- * This must be done in a separate step afterwards.
- */ function disposeModule(moduleId, mode) {
- const module = devModuleCache[moduleId];
- if (!module) {
- return;
- }
- const hotState = moduleHotState.get(module);
- if (!hotState) {
- return;
- }
- const data = {};
- // Run the `hot.dispose` handler, if any, passing in the persistent
- // `hot.data` object.
- for (const disposeHandler of hotState.disposeHandlers){
- disposeHandler(data);
- }
- // This used to warn in `getOrInstantiateModuleFromParent` when a disposed
- // module is still importing other modules.
- if (module.hot) {
- module.hot.active = false;
- }
- moduleHotState.delete(module);
- // Remove the disposed module from its children's parent list.
- // It will be added back once the module re-instantiates and imports its
- // children again.
- for (const childId of module.children){
- const child = devModuleCache[childId];
- if (!child) {
- continue;
- }
- const idx = child.parents.indexOf(module.id);
- if (idx >= 0) {
- child.parents.splice(idx, 1);
- }
- }
- switch(mode){
- case 'clear':
- delete devModuleCache[module.id];
- moduleHotData.delete(module.id);
- break;
- case 'replace':
- moduleHotData.set(module.id, data);
- break;
- default:
- invariant(mode, (mode)=>`invalid mode: ${mode}`);
- }
-}
-/**
- * Dispose phase: runs dispose handlers and cleans up outdated/disposed modules.
- * Returns the parent modules of outdated modules for use in the apply phase.
- */ function disposePhase(outdatedModules, disposedModules, outdatedDependencies) {
- for (const moduleId of outdatedModules){
- disposeModule(moduleId, 'replace');
- }
- for (const moduleId of disposedModules){
- disposeModule(moduleId, 'clear');
- }
- // Removing modules from the module cache is a separate step.
- // We also want to keep track of previous parents of the outdated modules.
- const outdatedModuleParents = new Map();
- for (const moduleId of outdatedModules){
- const oldModule = devModuleCache[moduleId];
- outdatedModuleParents.set(moduleId, oldModule?.parents);
- delete devModuleCache[moduleId];
- }
- // Remove outdated dependencies from parent module's children list.
- // When a parent accepts a child's update, the child is re-instantiated
- // but the parent stays alive. We remove the old child reference so it
- // gets re-added when the child re-imports.
- for (const [parentId, deps] of outdatedDependencies){
- const module = devModuleCache[parentId];
- if (module) {
- for (const dep of deps){
- const idx = module.children.indexOf(dep);
- if (idx >= 0) {
- module.children.splice(idx, 1);
- }
- }
- }
- }
- return {
- outdatedModuleParents
- };
-}
-/* eslint-disable @typescript-eslint/no-unused-vars */ /**
- * Shared module instantiation logic.
- * This handles the full module instantiation flow for both browser and Node.js.
- * Only React Refresh hooks differ between platforms (passed as callback).
- */ function instantiateModuleShared(moduleId, sourceType, sourceData, moduleFactories, devModuleCache, runtimeModules, createModuleObjectFn, createContextFn, runModuleExecutionHooksFn) {
- // 1. Factory validation (same in both browser and Node.js)
- const id = moduleId;
- const moduleFactory = moduleFactories.get(id);
- if (typeof moduleFactory !== 'function') {
- throw new Error(factoryNotAvailableMessage(moduleId, sourceType, sourceData) + `\nThis is often caused by a stale browser cache, misconfigured Cache-Control headers, or a service worker serving outdated responses.` + `\nTo fix this, make sure your Cache-Control headers allow revalidation of chunks and review your service worker configuration. ` + `As an immediate workaround, try hard-reloading the page, clearing the browser cache, or unregistering any service workers.`);
- }
- // 2. Hot API setup (same in both - works for browser, included for Node.js)
- const hotData = moduleHotData.get(id);
- const { hot, hotState } = createModuleHot(id, hotData);
- // 3. Parent assignment logic (same in both)
- let parents;
- switch(sourceType){
- case SourceType.Runtime:
- runtimeModules.add(id);
- parents = [];
- break;
- case SourceType.Parent:
- parents = [
- sourceData
- ];
- break;
- case SourceType.Update:
- parents = sourceData || [];
- break;
- default:
- throw new Error(`Unknown source type: ${sourceType}`);
- }
- // 4. Module creation (platform creates base module object)
- const module = createModuleObjectFn(id);
- const exports = module.exports;
- module.parents = parents;
- module.children = [];
- module.hot = hot;
- devModuleCache[id] = module;
- moduleHotState.set(module, hotState);
- // 5. Module execution (React Refresh hooks are platform-specific)
- try {
- runModuleExecutionHooksFn(module, (refresh)=>{
- const context = createContextFn(module, exports, refresh);
- moduleFactory.call(exports, context, module, exports);
- });
- } catch (error) {
- module.error = error;
- throw error;
- }
- // 6. ESM interop (same in both)
- if (module.namespaceObject && module.exports !== module.namespaceObject) {
- // in case of a circular dependency: cjs1 -> esm2 -> cjs1
- interopEsm(module.exports, module.namespaceObject);
- }
- return module;
-}
-/**
- * Analyzes update entries and chunks to determine which modules were added, modified, or deleted.
- * This is pure logic that doesn't depend on the runtime environment.
- */ function computeChangedModules(entries, updates, chunkModulesMap) {
- const chunksAdded = new Map();
- const chunksDeleted = new Map();
- const added = new Map();
- const modified = new Map();
- const deleted = new Set();
- for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates)){
- switch(mergedChunkUpdate.type){
- case 'added':
- {
- const updateAdded = new Set(mergedChunkUpdate.modules);
- for (const moduleId of updateAdded){
- added.set(moduleId, entries[moduleId]);
- }
- chunksAdded.set(chunkPath, updateAdded);
- break;
- }
- case 'deleted':
- {
- const updateDeleted = chunkModulesMap ? new Set(chunkModulesMap.get(chunkPath)) : new Set();
- for (const moduleId of updateDeleted){
- deleted.add(moduleId);
- }
- chunksDeleted.set(chunkPath, updateDeleted);
- break;
- }
- case 'partial':
- {
- const updateAdded = new Set(mergedChunkUpdate.added);
- const updateDeleted = new Set(mergedChunkUpdate.deleted);
- for (const moduleId of updateAdded){
- added.set(moduleId, entries[moduleId]);
- }
- for (const moduleId of updateDeleted){
- deleted.add(moduleId);
- }
- chunksAdded.set(chunkPath, updateAdded);
- chunksDeleted.set(chunkPath, updateDeleted);
- break;
- }
- default:
- throw new Error('Unknown merged chunk update type');
- }
- }
- // If a module was added from one chunk and deleted from another in the same update,
- // consider it to be modified, as it means the module was moved from one chunk to another
- // AND has new code in a single update.
- for (const moduleId of added.keys()){
- if (deleted.has(moduleId)) {
- added.delete(moduleId);
- deleted.delete(moduleId);
- }
- }
- for (const [moduleId, entry] of Object.entries(entries)){
- // Modules that haven't been added to any chunk but have new code are considered
- // to be modified.
- // This needs to be under the previous loop, as we need it to get rid of modules
- // that were added and deleted in the same update.
- if (!added.has(moduleId)) {
- modified.set(moduleId, entry);
- }
- }
- return {
- added,
- deleted,
- modified,
- chunksAdded,
- chunksDeleted
- };
-}
-/**
- * Compiles new module code and walks the dependency tree to find all outdated modules.
- * Uses the evalModuleEntry function to compile code (platform-specific).
- *
- * @param added - Map of added modules
- * @param modified - Map of modified modules
- * @param evalModuleEntry - Function to compile module code
- * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept()
- */ function computeOutdatedModules(added, modified, evalModuleEntry, autoAcceptRootModules) {
- const newModuleFactories = new Map();
- // Compile added modules
- for (const [moduleId, entry] of added){
- if (entry != null) {
- newModuleFactories.set(moduleId, evalModuleEntry(entry));
- }
- }
- // Walk dependency tree to find all modules affected by modifications
- const { outdatedModules, outdatedDependencies } = computedInvalidatedModules(modified.keys(), autoAcceptRootModules);
- // Compile modified modules
- for (const [moduleId, entry] of modified){
- newModuleFactories.set(moduleId, evalModuleEntry(entry));
- }
- return {
- outdatedModules,
- outdatedDependencies,
- newModuleFactories
- };
-}
-/**
- * Updates module factories and re-instantiates self-accepted modules.
- * Uses the instantiateModule function (platform-specific via callback).
- */ function applyPhase(outdatedSelfAcceptedModules, newModuleFactories, outdatedModuleParents, outdatedDependencies, moduleFactories, devModuleCache, instantiateModuleFn, applyModuleFactoryNameFn, reportError) {
- // Update module factories
- for (const [moduleId, factory] of newModuleFactories.entries()){
- applyModuleFactoryNameFn(factory);
- moduleFactories.set(moduleId, factory);
- }
- // TODO(alexkirsz) Run new runtime entries here.
- // Call accept handlers for outdated dependencies.
- // This runs BEFORE re-instantiating self-accepted modules, matching
- // webpack's behavior.
- for (const [parentId, deps] of outdatedDependencies){
- const module = devModuleCache[parentId];
- if (!module) continue;
- const hotState = moduleHotState.get(module);
- if (!hotState) continue;
- // Group deps by callback, deduplicating callbacks that handle multiple deps.
- // Each callback receives only the deps it was registered for.
- const callbackDeps = new Map();
- const callbackErrorHandlers = new Map();
- for (const dep of deps){
- const acceptCallback = hotState.acceptedDependencies[dep];
- if (acceptCallback) {
- let depList = callbackDeps.get(acceptCallback);
- if (!depList) {
- depList = [];
- callbackDeps.set(acceptCallback, depList);
- callbackErrorHandlers.set(acceptCallback, hotState.acceptedErrorHandlers[dep]);
- }
- depList.push(dep);
- }
- }
- for (const [callback, cbDeps] of callbackDeps){
- try {
- callback.call(null, cbDeps);
- } catch (err) {
- const errorHandler = callbackErrorHandlers.get(callback);
- if (typeof errorHandler === 'function') {
- try {
- errorHandler(err, {
- moduleId: parentId,
- dependencyId: cbDeps[0]
- });
- } catch (err2) {
- reportError(err2);
- reportError(err);
- }
- } else {
- reportError(err);
- }
- }
- }
- }
- // Re-instantiate all outdated self-accepted modules
- for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules){
- try {
- instantiateModuleFn(moduleId, SourceType.Update, outdatedModuleParents.get(moduleId));
- } catch (err) {
- if (typeof errorHandler === 'function') {
- try {
- errorHandler(err, {
- moduleId,
- module: devModuleCache[moduleId]
- });
- } catch (err2) {
- reportError(err2);
- reportError(err);
- }
- } else {
- reportError(err);
- }
- }
- }
-}
-/**
- * Internal implementation that orchestrates the full HMR update flow:
- * invalidation, disposal, and application of new modules.
- *
- * @param autoAcceptRootModules - If true, root modules auto-accept updates without explicit module.hot.accept()
- */ function applyInternal(outdatedModules, outdatedDependencies, disposedModules, newModuleFactories, moduleFactories, devModuleCache, instantiateModuleFn, applyModuleFactoryNameFn, autoAcceptRootModules) {
- ;
- ({ outdatedModules, outdatedDependencies } = applyInvalidatedModules(outdatedModules, outdatedDependencies, autoAcceptRootModules));
- // Find self-accepted modules to re-instantiate
- const outdatedSelfAcceptedModules = computeOutdatedSelfAcceptedModules(outdatedModules);
- // Run dispose handlers, save hot.data, clear caches
- const { outdatedModuleParents } = disposePhase(outdatedModules, disposedModules, outdatedDependencies);
- let error;
- function reportError(err) {
- if (!error) error = err; // Keep first error
- }
- applyPhase(outdatedSelfAcceptedModules, newModuleFactories, outdatedModuleParents, outdatedDependencies, moduleFactories, devModuleCache, instantiateModuleFn, applyModuleFactoryNameFn, reportError);
- if (error) {
- throw error;
- }
- // Recursively apply any queued invalidations from new module execution
- if (queuedInvalidatedModules.size > 0) {
- applyInternal(new Set(), new Map(), [], new Map(), moduleFactories, devModuleCache, instantiateModuleFn, applyModuleFactoryNameFn, autoAcceptRootModules);
- }
-}
-/**
- * Main entry point for applying an ECMAScript merged update.
- * This is called by both browser and Node.js runtimes with platform-specific callbacks.
- *
- * @param options.autoAcceptRootModules - If true, root modules auto-accept updates without explicit
- * module.hot.accept(). Used for server-side HMR where pages
- * auto-accept at the top level.
- */ function applyEcmascriptMergedUpdateShared(options) {
- const { added, modified, disposedModules, evalModuleEntry, instantiateModule, applyModuleFactoryName, moduleFactories, devModuleCache, autoAcceptRootModules } = options;
- const { outdatedModules, outdatedDependencies, newModuleFactories } = computeOutdatedModules(added, modified, evalModuleEntry, autoAcceptRootModules);
- applyInternal(outdatedModules, outdatedDependencies, disposedModules, newModuleFactories, moduleFactories, devModuleCache, instantiateModule, applyModuleFactoryName, autoAcceptRootModules);
-}
-/* eslint-disable @typescript-eslint/no-unused-vars */ ///
-///
-///
-/**
- * Development Node.js runtime.
- * Uses HotModule and shared HMR logic for hot module replacement support.
- */ // Cast the module cache to HotModule for development mode
-// (hmr-runtime.ts declares devModuleCache as `let` variable expecting assignment)
-// This is safe because HotModule extends Module
-devModuleCache = moduleCache;
-// this is read in runtime-utils.ts so it creates a module with direction for hmr
-createModuleWithDirectionFlag = true;
-if (!globalThis.__turbopack_runtime_modules__) {
- globalThis.__turbopack_runtime_modules__ = new Set();
-}
-runtimeModules = globalThis.__turbopack_runtime_modules__;
-const nodeDevContextPrototype = Context.prototype;
-nodeDevContextPrototype.q = exportUrl;
-nodeDevContextPrototype.M = moduleFactories;
-nodeDevContextPrototype.c = devModuleCache;
-nodeDevContextPrototype.R = resolvePathFromModule;
-nodeDevContextPrototype.b = createWorker;
-nodeDevContextPrototype.C = clearChunkCache;
-/**
- * Instantiates a module in development mode using shared HMR logic.
- */ function instantiateModule(id, sourceType, sourceData) {
- // Node.js: creates base module object (hot API added by shared code)
- const createModuleObjectFn = (moduleId)=>{
- return createModuleWithDirection(moduleId);
- };
- // Node.js: creates Context (no refresh parameter)
- const createContext = (module1, exports, _refresh)=>{
- return new Context(module1, exports);
- };
- // Node.js: no hooks wrapper, just execute directly
- const runWithHooks = (module1, exec)=>{
- exec(undefined); // no refresh context
- };
- // Use shared instantiation logic (includes hot API setup)
- const newModule = instantiateModuleShared(id, sourceType, sourceData, moduleFactories, devModuleCache, runtimeModules, createModuleObjectFn, createContext, runWithHooks);
- newModule.loaded = true;
- return newModule;
-}
-/**
- * Instantiates a runtime module in development mode.
- */ function instantiateRuntimeModule(chunkPath, moduleId) {
- return instantiateModule(moduleId, SourceType.Runtime, chunkPath);
-}
-/**
- * Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.
- */ // @ts-ignore TypeScript doesn't separate this module space from the browser runtime
-function getOrInstantiateRuntimeModule(chunkPath, moduleId) {
- const module1 = devModuleCache[moduleId];
- if (module1) {
- if (module1.error) {
- throw module1.error;
- }
- return module1;
- }
- return instantiateRuntimeModule(chunkPath, moduleId);
-}
-/**
- * Retrieves a module from the cache, or instantiate it if it is not cached.
- * Also tracks parent-child relationships for HMR dependency tracking.
- */ // @ts-ignore
-function getOrInstantiateModuleFromParent(id, sourceModule) {
- // Track parent-child relationship
- trackModuleImport(sourceModule, id, devModuleCache[id]);
- const module1 = devModuleCache[id];
- if (module1) {
- if (module1.error) {
- throw module1.error;
- }
- return module1;
- }
- const newModule = instantiateModule(id, SourceType.Parent, sourceModule.id);
- // Track again after instantiation to ensure the relationship is recorded
- trackModuleImport(sourceModule, id, newModule);
- return newModule;
-}
-module.exports = (sourcePath)=>({
- m: (id)=>getOrInstantiateRuntimeModule(sourcePath, id),
- c: (chunkData)=>loadRuntimeChunk(sourcePath, chunkData)
- });
-///
-///
-/* eslint-disable @typescript-eslint/no-unused-vars */ /**
- * Appends the module code with //# sourceURL and //# sourceMappingURL so
- * that Node.js can resolve stack frames from `eval`ed server HMR modules back to
- * their original source files. Mirrors the browser's _eval in dev-backend-dom.ts.
- */ function inlineSourcemaps(entry) {
- const [chunkPath, moduleId] = entry.url.split('?', 2);
- const absolutePath = path.resolve(RUNTIME_ROOT, chunkPath);
- const fileHref = url.pathToFileURL(absolutePath).href;
- const sourceURL = moduleId ? `${fileHref}?${moduleId}` : fileHref;
- let code = entry.code + '\n\n//# sourceURL=' + sourceURL;
- if (entry.map) {
- code += '\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,' + Buffer.from(entry.map).toString('base64');
- }
- return code;
-}
-let serverHmrUpdateHandler = null;
-function initializeServerHmr(moduleFactories, devModuleCache) {
- if (serverHmrUpdateHandler != null) {
- throw new Error('[Server HMR] Server HMR client is already initialized');
- }
- // Register the update handler for the server runtime
- serverHmrUpdateHandler = (msg)=>{
- handleNodejsUpdate(msg, moduleFactories, devModuleCache);
- };
-}
-/**
- * Emits an HMR message to the registered update handler.
- * Node uses a simpler listener pattern than the browser's websocket connection.
- *
- * Note: This is only called via __turbopack_server_hmr_apply__ which ensures
- * the handler is initialized first via ensureHmrClientInitialized().
- */ function emitMessage(msg) {
- if (serverHmrUpdateHandler == null) {
- console.warn('[Server HMR] No update handler registered to receive message:', msg);
- return false;
- }
- try {
- serverHmrUpdateHandler(msg.data);
- return true;
- } catch (err) {
- console.error('[Server HMR] Listener error:', err);
- return false;
- }
-}
-/**
- * Handles server message updates and applies them to the Node.js runtime.
- * Uses shared HMR update logic from hmr-runtime.ts.
- */ function handleNodejsUpdate(msg, moduleFactories, devModuleCache) {
- if (msg.type !== 'partial') {
- return;
- }
- const instruction = msg.instruction;
- if (instruction.type !== 'EcmascriptMergedUpdate') {
- return;
- }
- try {
- const { entries = {}, chunks = {} } = instruction;
- const evalModuleEntry = (entry)=>{
- // eslint-disable-next-line no-eval
- return (0, eval)(entry.map ? inlineSourcemaps(entry) : entry.code);
- };
- const { added, modified } = computeChangedModules(entries, chunks, undefined // no chunkModulesMap for Node.js
- );
- // Use shared HMR update implementation
- applyEcmascriptMergedUpdateShared({
- added,
- modified,
- disposedModules: [],
- evalModuleEntry,
- instantiateModule,
- applyModuleFactoryName: ()=>{},
- moduleFactories,
- devModuleCache,
- autoAcceptRootModules: true
- });
- } catch (e) {
- console.error('[Server HMR] Update failed, full reload needed:', e);
- throw e;
- }
-}
-///
-///
-/**
- * Note: hmr-runtime.ts is embedded before this file, so its functions
- * (initializeServerHmr, emitMessage) are available in the same scope.
- */ // Initialize server HMR client (connects to shared HMR infrastructure)
-let hmrClientInitialized = false;
-function ensureHmrClientInitialized() {
- if (hmrClientInitialized) return;
- hmrClientInitialized = true;
- // initializeServerHmr is from hmr-client.ts (embedded before this file)
- // moduleFactories is from dev-runtime.ts
- // devModuleCache is the HotModule-typed cache from dev-runtime.ts
- initializeServerHmr(moduleFactories, devModuleCache);
-}
-function __turbopack_server_hmr_apply__(update) {
- try {
- ensureHmrClientInitialized();
- // emitMessage returns false if any listener failed to apply the update
- return emitMessage({
- type: 'turbopack-message',
- data: update
- });
- } catch (err) {
- console.error('[Server HMR] Failed to apply update:', err);
- return false;
- }
-}
-const handlers = globalThis.__turbopack_server_hmr_handlers__ ?? new Map();
-const chunkPrefix = path.relative(RUNTIME_ROOT, path.dirname(__filename));
-if (handlers.size === 0) {
- // First registration in this generation: install the routing dispatcher.
- globalThis.__turbopack_server_hmr_apply__ = (update)=>{
- const registry = globalThis.__turbopack_server_hmr_handlers__ ?? new Map();
- const updateChunkPaths = Object.keys(update.instruction?.chunks ?? {});
- const toCall = [];
- if (updateChunkPaths.length === 0) {
- for (const entry of registry.values())toCall.push(entry);
- } else {
- const seen = new Set();
- for (const chunkPath of updateChunkPaths){
- const dir = path.dirname(chunkPath);
- for (const [key, entry] of registry){
- if (dir === entry.chunkPrefix && !seen.has(key)) {
- seen.add(key);
- toCall.push(entry);
- }
- }
- }
- }
- let applied = false;
- for (const { handler } of toCall){
- try {
- if (handler(update)) applied = true;
- } catch (err) {
- console.error('[Server HMR] Handler error:', err);
- }
- }
- return applied;
- };
-}
-globalThis.__turbopack_server_hmr_handlers__ = handlers;
-handlers.set(__filename, {
- handler: __turbopack_server_hmr_apply__,
- chunkPrefix
-});
-
-
-//# sourceMappingURL=%5Bturbopack%5D_runtime.js.map
\ No newline at end of file
diff --git a/.next/dev/server/chunks/ssr/[turbopack]_runtime.js.map b/.next/dev/server/chunks/ssr/[turbopack]_runtime.js.map
deleted file mode 100644
index eaa666f..0000000
--- a/.next/dev/server/chunks/ssr/[turbopack]_runtime.js.map
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "version": 3,
- "sources": [],
- "sections": [
- {"offset": {"line": 17, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime/runtime-utils.ts"],"sourcesContent":["/**\n * This file contains runtime types and functions that are shared between all\n * TurboPack ECMAScript runtimes.\n *\n * It will be prepended to the runtime code of each runtime.\n */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n\ntype EsmNamespaceObject = Record\n\n/**\n * Describes why a module was instantiated.\n * Shared between browser and Node.js runtimes.\n */\nenum SourceType {\n /**\n * The module was instantiated because it was included in an evaluated chunk's\n * runtime.\n * SourceData is a ChunkPath.\n */\n Runtime = 0,\n /**\n * The module was instantiated because a parent module imported it.\n * SourceData is a ModuleId.\n */\n Parent = 1,\n /**\n * The module was instantiated because it was included in a chunk's hot module\n * update.\n * SourceData is an array of ModuleIds or undefined.\n */\n Update = 2,\n}\n\ntype SourceData = ChunkPath | ModuleId | ModuleId[] | undefined\n\n// @ts-ignore Defined in `dev-base.ts`\ndeclare function getOrInstantiateModuleFromParent(\n id: ModuleId,\n sourceModule: M\n): M\n\n// @ts-ignore Defined in `hmr-runtime.ts` (dev mode only)\ndeclare let devModuleCache: Record | undefined\n\n/**\n * Flag indicating which module object type to create when a module is merged. Set to `true`\n * by each runtime that uses ModuleWithDirection (browser dev-base.ts, nodejs dev-base.ts,\n * nodejs build-base.ts). Browser production (build-base.ts) leaves it as `false` since it\n * uses plain Module objects.\n */\nlet createModuleWithDirectionFlag = false\n\nconst REEXPORTED_OBJECTS = new WeakMap()\n\n/**\n * Constructs the `__turbopack_context__` object for a module.\n */\nfunction Context(\n this: TurbopackBaseContext,\n module: Module,\n exports: Exports\n) {\n this.m = module\n // We need to store this here instead of accessing it from the module object to:\n // 1. Make it available to factories directly, since we rewrite `this` to\n // `__turbopack_context__.e` in CJS modules.\n // 2. Support async modules which rewrite `module.exports` to a promise, so we\n // can still access the original exports object from functions like\n // `esmExport`\n // Ideally we could find a new approach for async modules and drop this property altogether.\n this.e = exports\n}\nconst contextPrototype = Context.prototype as TurbopackBaseContext\n\ntype ModuleContextMap = Record\n\ninterface ModuleContextEntry {\n id: () => ModuleId\n module: () => any\n}\n\ninterface ModuleContext {\n // require call\n (moduleId: string): Exports | EsmNamespaceObject\n\n // async import call\n import(moduleId: string): Promise\n\n keys(): ModuleId[]\n\n resolve(moduleId: string): ModuleId\n}\n\ntype GetOrInstantiateModuleFromParent = (\n moduleId: M['id'],\n parentModule: M\n) => M\n\ndeclare function getOrInstantiateRuntimeModule(\n chunkPath: ChunkPath,\n moduleId: ModuleId\n): Module\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty\nconst toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag\n\nfunction defineProp(\n obj: any,\n name: PropertyKey,\n options: PropertyDescriptor & ThisType\n) {\n if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options)\n}\n\nfunction getOverwrittenModule(\n moduleCache: ModuleCache,\n id: ModuleId\n): Module {\n let module = moduleCache[id]\n if (!module) {\n if (createModuleWithDirectionFlag) {\n // set in development modes for hmr support\n module = createModuleWithDirection(id)\n } else {\n module = createModuleObject(id)\n }\n moduleCache[id] = module\n }\n return module\n}\n\n/**\n * Creates the module object. Only done here to ensure all module objects have the same shape.\n */\nfunction createModuleObject(id: ModuleId): Module {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n }\n}\n\nfunction createModuleWithDirection(id: ModuleId): ModuleWithDirection {\n return {\n exports: {},\n error: undefined,\n id,\n namespaceObject: undefined,\n parents: [],\n children: [],\n }\n}\n\ntype BindingTag = 0\nconst BindingTag_Value = 0 as BindingTag\n\n// an arbitrary sequence of bindings as\n// - a prop name\n// - BindingTag_Value, a value to be bound directly, or\n// - 1 or 2 functions to bind as getters and sdetters\ntype EsmBindings = Array<\n string | BindingTag | (() => unknown) | ((v: unknown) => void) | unknown\n>\n\n/**\n * Adds the getters to the exports object.\n */\nfunction esm(exports: Exports, bindings: EsmBindings) {\n defineProp(exports, '__esModule', { value: true })\n if (toStringTag) defineProp(exports, toStringTag, { value: 'Module' })\n let i = 0\n while (i < bindings.length) {\n const propName = bindings[i++] as string\n const tagOrFunction = bindings[i++]\n if (typeof tagOrFunction === 'number') {\n if (tagOrFunction === BindingTag_Value) {\n defineProp(exports, propName, {\n value: bindings[i++],\n enumerable: true,\n writable: false,\n })\n } else {\n throw new Error(`unexpected tag: ${tagOrFunction}`)\n }\n } else {\n const getterFn = tagOrFunction as () => unknown\n if (typeof bindings[i] === 'function') {\n const setterFn = bindings[i++] as (v: unknown) => void\n defineProp(exports, propName, {\n get: getterFn,\n set: setterFn,\n enumerable: true,\n })\n } else {\n defineProp(exports, propName, {\n get: getterFn,\n enumerable: true,\n })\n }\n }\n }\n Object.seal(exports)\n}\n\n/**\n * Makes the module an ESM with exports\n */\nfunction esmExport(\n this: TurbopackBaseContext,\n bindings: EsmBindings,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Module['exports']\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n module.namespaceObject = exports\n esm(exports, bindings)\n}\ncontextPrototype.s = esmExport\n\ntype ReexportedObjects = Record[]\nfunction ensureDynamicExports(\n module: Module,\n exports: Exports\n): ReexportedObjects {\n let reexportedObjects: ReexportedObjects | undefined =\n REEXPORTED_OBJECTS.get(module)\n\n if (!reexportedObjects) {\n REEXPORTED_OBJECTS.set(module, (reexportedObjects = []))\n module.exports = module.namespaceObject = new Proxy(exports, {\n get(target, prop) {\n if (\n hasOwnProperty.call(target, prop) ||\n prop === 'default' ||\n prop === '__esModule'\n ) {\n return Reflect.get(target, prop)\n }\n for (const obj of reexportedObjects!) {\n const value = Reflect.get(obj, prop)\n if (value !== undefined) return value\n }\n return undefined\n },\n ownKeys(target) {\n const keys = Reflect.ownKeys(target)\n for (const obj of reexportedObjects!) {\n for (const key of Reflect.ownKeys(obj)) {\n if (key !== 'default' && !keys.includes(key)) keys.push(key)\n }\n }\n return keys\n },\n })\n }\n return reexportedObjects\n}\n\n/**\n * Dynamically exports properties from an object\n */\nfunction dynamicExport(\n this: TurbopackBaseContext,\n object: Record,\n id: ModuleId | undefined\n) {\n let module: Module\n let exports: Exports\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n exports = module.exports\n } else {\n module = this.m\n exports = this.e\n }\n const reexportedObjects = ensureDynamicExports(module, exports)\n\n if (typeof object === 'object' && object !== null) {\n reexportedObjects.push(object)\n }\n}\ncontextPrototype.j = dynamicExport\n\nfunction exportValue(\n this: TurbopackBaseContext,\n value: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = value\n}\ncontextPrototype.v = exportValue\n\nfunction exportNamespace(\n this: TurbopackBaseContext,\n namespace: any,\n id: ModuleId | undefined\n) {\n let module: Module\n if (id != null) {\n module = getOverwrittenModule(this.c, id)\n } else {\n module = this.m\n }\n module.exports = module.namespaceObject = namespace\n}\ncontextPrototype.n = exportNamespace\n\nfunction createGetter(obj: Record, key: string | symbol) {\n return () => obj[key]\n}\n\n/**\n * @returns prototype of the object\n */\nconst getProto: (obj: any) => any = Object.getPrototypeOf\n ? (obj) => Object.getPrototypeOf(obj)\n : (obj) => obj.__proto__\n\n/** Prototypes that are not expanded for exports */\nconst LEAF_PROTOTYPES = [null, getProto({}), getProto([]), getProto(getProto)]\n\n/**\n * @param raw\n * @param ns\n * @param allowExportDefault\n * * `false`: will have the raw module as default export\n * * `true`: will have the default property as default export\n */\nfunction interopEsm(\n raw: Exports,\n ns: EsmNamespaceObject,\n allowExportDefault?: boolean\n) {\n const bindings: EsmBindings = []\n let defaultLocation = -1\n for (\n let current = raw;\n (typeof current === 'object' || typeof current === 'function') &&\n !LEAF_PROTOTYPES.includes(current);\n current = getProto(current)\n ) {\n for (const key of Object.getOwnPropertyNames(current)) {\n bindings.push(key, createGetter(raw, key))\n if (defaultLocation === -1 && key === 'default') {\n defaultLocation = bindings.length - 1\n }\n }\n }\n\n // this is not really correct\n // we should set the `default` getter if the imported module is a `.cjs file`\n if (!(allowExportDefault && defaultLocation >= 0)) {\n // Replace the binding with one for the namespace itself in order to preserve iteration order.\n if (defaultLocation >= 0) {\n // Replace the getter with the value\n bindings.splice(defaultLocation, 1, BindingTag_Value, raw)\n } else {\n bindings.push('default', BindingTag_Value, raw)\n }\n }\n\n esm(ns, bindings)\n return ns\n}\n\nfunction createNS(raw: Module['exports']): EsmNamespaceObject {\n if (typeof raw === 'function') {\n return function (this: any, ...args: any[]) {\n return raw.apply(this, args)\n }\n } else {\n return Object.create(null)\n }\n}\n\nfunction esmImport(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exclude {\n const module = getOrInstantiateModuleFromParent(id, this.m)\n\n // any ES module has to have `module.namespaceObject` defined.\n if (module.namespaceObject) return module.namespaceObject\n\n // only ESM can be an async module, so we don't need to worry about exports being a promise here.\n const raw = module.exports\n return (module.namespaceObject = interopEsm(\n raw,\n createNS(raw),\n raw && (raw as any).__esModule\n ))\n}\ncontextPrototype.i = esmImport\n\nfunction asyncLoader(\n this: TurbopackBaseContext,\n moduleId: ModuleId\n): Promise {\n const loader = this.r(moduleId) as (\n importFunction: EsmImport\n ) => Promise\n return loader(esmImport.bind(this))\n}\ncontextPrototype.A = asyncLoader\n\n// Add a simple runtime require so that environments without one can still pass\n// `typeof require` CommonJS checks so that exports are correctly registered.\nconst runtimeRequire =\n // @ts-ignore\n typeof require === 'function'\n ? // @ts-ignore\n require\n : function require() {\n throw new Error('Unexpected use of runtime require')\n }\ncontextPrototype.t = runtimeRequire\n\nfunction commonJsRequire(\n this: TurbopackBaseContext,\n id: ModuleId\n): Exports {\n return getOrInstantiateModuleFromParent(id, this.m).exports\n}\ncontextPrototype.r = commonJsRequire\n\n/**\n * Remove fragments and query parameters since they are never part of the context map keys\n *\n * This matches how we parse patterns at resolving time. Arguably we should only do this for\n * strings passed to `import` but the resolve does it for `import` and `require` and so we do\n * here as well.\n */\nfunction parseRequest(request: string): string {\n // Per the URI spec fragments can contain `?` characters, so we should trim it off first\n // https://datatracker.ietf.org/doc/html/rfc3986#section-3.5\n const hashIndex = request.indexOf('#')\n if (hashIndex !== -1) {\n request = request.substring(0, hashIndex)\n }\n\n const queryIndex = request.indexOf('?')\n if (queryIndex !== -1) {\n request = request.substring(0, queryIndex)\n }\n\n return request\n}\n/**\n * `require.context` and require/import expression runtime.\n */\nfunction moduleContext(map: ModuleContextMap): ModuleContext {\n function moduleContext(id: string): Exports {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].module()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.keys = (): string[] => {\n return Object.keys(map)\n }\n\n moduleContext.resolve = (id: string): ModuleId => {\n id = parseRequest(id)\n if (hasOwnProperty.call(map, id)) {\n return map[id].id()\n }\n\n const e = new Error(`Cannot find module '${id}'`)\n ;(e as any).code = 'MODULE_NOT_FOUND'\n throw e\n }\n\n moduleContext.import = async (id: string) => {\n return await (moduleContext(id) as Promise)\n }\n\n return moduleContext\n}\ncontextPrototype.f = moduleContext\n\n/**\n * Returns the path of a chunk defined by its data.\n */\nfunction getChunkPath(chunkData: ChunkData): ChunkPath {\n return typeof chunkData === 'string' ? chunkData : chunkData.path\n}\n\nfunction isPromise(maybePromise: any): maybePromise is Promise {\n return (\n maybePromise != null &&\n typeof maybePromise === 'object' &&\n 'then' in maybePromise &&\n typeof maybePromise.then === 'function'\n )\n}\n\nfunction isAsyncModuleExt(obj: T): obj is AsyncModuleExt & T {\n return turbopackQueues in obj\n}\n\nfunction createPromise() {\n let resolve: (value: T | PromiseLike) => void\n let reject: (reason?: any) => void\n\n const promise = new Promise((res, rej) => {\n reject = rej\n resolve = res\n })\n\n return {\n promise,\n resolve: resolve!,\n reject: reject!,\n }\n}\n\n// Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.\n// The CompressedModuleFactories format is\n// - 1 or more module ids\n// - a module factory function\n// So walking this is a little complex but the flat structure is also fast to\n// traverse, we can use `typeof` operators to distinguish the two cases.\nfunction installCompressedModuleFactories(\n chunkModules: CompressedModuleFactories,\n offset: number,\n moduleFactories: ModuleFactories,\n newModuleId?: (id: ModuleId) => void\n) {\n let i = offset\n while (i < chunkModules.length) {\n let end = i + 1\n // Find our factory function\n while (\n end < chunkModules.length &&\n typeof chunkModules[end] !== 'function'\n ) {\n end++\n }\n if (end === chunkModules.length) {\n throw new Error('malformed chunk format, expected a factory function')\n }\n\n // Install the factory for each module ID that doesn't already have one.\n // When some IDs in this group already have a factory, reuse that existing\n // group factory for the missing IDs to keep all IDs in the group consistent.\n // Otherwise, install the factory from this chunk.\n const moduleFactoryFn = chunkModules[end] as Function\n let existingGroupFactory: Function | undefined = undefined\n for (let j = i; j < end; j++) {\n const id = chunkModules[j] as ModuleId\n const existingFactory = moduleFactories.get(id)\n if (existingFactory) {\n existingGroupFactory = existingFactory\n break\n }\n }\n const factoryToInstall = existingGroupFactory ?? moduleFactoryFn\n\n let didInstallFactory = false\n for (let j = i; j < end; j++) {\n const id = chunkModules[j] as ModuleId\n if (!moduleFactories.has(id)) {\n if (!didInstallFactory) {\n if (factoryToInstall === moduleFactoryFn) {\n applyModuleFactoryName(moduleFactoryFn)\n }\n didInstallFactory = true\n }\n moduleFactories.set(id, factoryToInstall)\n newModuleId?.(id)\n }\n }\n i = end + 1 // end is pointing at the last factory advance to the next id or the end of the array.\n }\n}\n\n// everything below is adapted from webpack\n// https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13\n\nconst turbopackQueues = Symbol('turbopack queues')\nconst turbopackExports = Symbol('turbopack exports')\nconst turbopackError = Symbol('turbopack error')\n\nconst enum QueueStatus {\n Unknown = -1,\n Unresolved = 0,\n Resolved = 1,\n}\n\ntype AsyncQueueFn = (() => void) & { queueCount: number }\ntype AsyncQueue = AsyncQueueFn[] & {\n status: QueueStatus\n}\n\nfunction resolveQueue(queue?: AsyncQueue) {\n if (queue && queue.status !== QueueStatus.Resolved) {\n queue.status = QueueStatus.Resolved\n queue.forEach((fn) => fn.queueCount--)\n queue.forEach((fn) => (fn.queueCount-- ? fn.queueCount++ : fn()))\n }\n}\n\ntype Dep = Exports | AsyncModulePromise | Promise\n\ntype AsyncModuleExt = {\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => void\n [turbopackExports]: Exports\n [turbopackError]?: any\n}\n\ntype AsyncModulePromise = Promise & AsyncModuleExt\n\nfunction wrapDeps(deps: Dep[]): AsyncModuleExt[] {\n return deps.map((dep): AsyncModuleExt => {\n if (dep !== null && typeof dep === 'object') {\n if (isAsyncModuleExt(dep)) return dep\n if (isPromise(dep)) {\n const queue: AsyncQueue = Object.assign([], {\n status: QueueStatus.Unresolved,\n })\n\n const obj: AsyncModuleExt = {\n [turbopackExports]: {},\n [turbopackQueues]: (fn: (queue: AsyncQueue) => void) => fn(queue),\n }\n\n dep.then(\n (res) => {\n obj[turbopackExports] = res\n resolveQueue(queue)\n },\n (err) => {\n obj[turbopackError] = err\n resolveQueue(queue)\n }\n )\n\n return obj\n }\n }\n\n return {\n [turbopackExports]: dep,\n [turbopackQueues]: () => {},\n }\n })\n}\n\nfunction asyncModule(\n this: TurbopackBaseContext,\n body: (\n handleAsyncDependencies: (\n deps: Dep[]\n ) => Exports[] | Promise<() => Exports[]>,\n asyncResult: (err?: any) => void\n ) => void,\n hasAwait: boolean\n) {\n const module = this.m\n const queue: AsyncQueue | undefined = hasAwait\n ? Object.assign([], { status: QueueStatus.Unknown })\n : undefined\n\n const depQueues: Set = new Set()\n\n const { resolve, reject, promise: rawPromise } = createPromise()\n\n const promise: AsyncModulePromise = Object.assign(rawPromise, {\n [turbopackExports]: module.exports,\n [turbopackQueues]: (fn) => {\n queue && fn(queue)\n depQueues.forEach(fn)\n promise['catch'](() => {})\n },\n } satisfies AsyncModuleExt)\n\n const attributes: PropertyDescriptor = {\n get(): any {\n return promise\n },\n set(v: any) {\n // Calling `esmExport` leads to this.\n if (v !== promise) {\n promise[turbopackExports] = v\n }\n },\n }\n\n Object.defineProperty(module, 'exports', attributes)\n Object.defineProperty(module, 'namespaceObject', attributes)\n\n function handleAsyncDependencies(deps: Dep[]) {\n const currentDeps = wrapDeps(deps)\n\n const getResult = () =>\n currentDeps.map((d) => {\n if (d[turbopackError]) throw d[turbopackError]\n return d[turbopackExports]\n })\n\n const { promise, resolve } = createPromise<() => Exports[]>()\n\n const fn: AsyncQueueFn = Object.assign(() => resolve(getResult), {\n queueCount: 0,\n })\n\n function fnQueue(q: AsyncQueue) {\n if (q !== queue && !depQueues.has(q)) {\n depQueues.add(q)\n if (q && q.status === QueueStatus.Unresolved) {\n fn.queueCount++\n q.push(fn)\n }\n }\n }\n\n currentDeps.map((dep) => dep[turbopackQueues](fnQueue))\n\n return fn.queueCount ? promise : getResult()\n }\n\n function asyncResult(err?: any) {\n if (err) {\n reject((promise[turbopackError] = err))\n } else {\n resolve(promise[turbopackExports])\n }\n\n resolveQueue(queue)\n }\n\n body(handleAsyncDependencies, asyncResult)\n\n if (queue && queue.status === QueueStatus.Unknown) {\n queue.status = QueueStatus.Unresolved\n }\n}\ncontextPrototype.a = asyncModule\n\n/**\n * A pseudo \"fake\" URL object to resolve to its relative path.\n *\n * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this\n * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid\n * hydration mismatch.\n *\n * This is based on webpack's existing implementation:\n * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js\n */\nconst relativeURL = function relativeURL(this: any, inputUrl: string) {\n const realUrl = new URL(inputUrl, 'x:/')\n const values: Record = {}\n for (const key in realUrl) values[key] = (realUrl as any)[key]\n values.href = inputUrl\n values.pathname = inputUrl.replace(/[?#].*/, '')\n values.origin = values.protocol = ''\n values.toString = values.toJSON = (..._args: Array) => inputUrl\n for (const key in values)\n Object.defineProperty(this, key, {\n enumerable: true,\n configurable: true,\n value: values[key],\n })\n}\nrelativeURL.prototype = URL.prototype\ncontextPrototype.U = relativeURL\n\n/**\n * Utility function to ensure all variants of an enum are handled.\n */\nfunction invariant(never: never, computeMessage: (arg: any) => string): never {\n throw new Error(`Invariant: ${computeMessage(never)}`)\n}\n\n/**\n * Constructs an error message for when a module factory is not available.\n */\nfunction factoryNotAvailableMessage(\n moduleId: ModuleId,\n sourceType: SourceType,\n sourceData: SourceData\n): string {\n let instantiationReason: string\n switch (sourceType) {\n case SourceType.Runtime:\n instantiationReason = `as a runtime entry of chunk ${sourceData}`\n break\n case SourceType.Parent:\n instantiationReason = `because it was required from module ${sourceData}`\n break\n case SourceType.Update:\n instantiationReason = 'because of an HMR update'\n break\n default:\n invariant(\n sourceType,\n (sourceType) => `Unknown source type: ${sourceType}`\n )\n }\n return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`\n}\n\n/**\n * A stub function to make `require` available but non-functional in ESM.\n */\nfunction requireStub(_moduleId: ModuleId): never {\n throw new Error('dynamic usage of require is not supported')\n}\ncontextPrototype.z = requireStub\n\n// Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.\ncontextPrototype.g = globalThis\n\ntype ContextConstructor = {\n new (module: Module, exports: Exports): TurbopackBaseContext\n}\n\nfunction applyModuleFactoryName(factory: Function) {\n // Give the module factory a nice name to improve stack traces.\n Object.defineProperty(factory, 'name', {\n value: 'module evaluation',\n })\n}\n"],"names":["SourceType","createModuleWithDirectionFlag","REEXPORTED_OBJECTS","WeakMap","Context","module","exports","m","e","contextPrototype","prototype","hasOwnProperty","Object","toStringTag","Symbol","defineProp","obj","name","options","call","defineProperty","getOverwrittenModule","moduleCache","id","createModuleWithDirection","createModuleObject","error","undefined","namespaceObject","parents","children","BindingTag_Value","esm","bindings","value","i","length","propName","tagOrFunction","enumerable","writable","Error","getterFn","setterFn","get","set","seal","esmExport","c","s","ensureDynamicExports","reexportedObjects","Proxy","target","prop","Reflect","ownKeys","keys","key","includes","push","dynamicExport","object","j","exportValue","v","exportNamespace","namespace","n","createGetter","getProto","getPrototypeOf","__proto__","LEAF_PROTOTYPES","interopEsm","raw","ns","allowExportDefault","defaultLocation","current","getOwnPropertyNames","splice","createNS","args","apply","create","esmImport","getOrInstantiateModuleFromParent","__esModule","asyncLoader","moduleId","loader","r","bind","A","runtimeRequire","require","require1","t","commonJsRequire","parseRequest","request","hashIndex","indexOf","substring","queryIndex","moduleContext","map","code","resolve","import","f","getChunkPath","chunkData","path","isPromise","maybePromise","then","isAsyncModuleExt","turbopackQueues","createPromise","reject","promise","Promise","res","rej","installCompressedModuleFactories","chunkModules","offset","moduleFactories","newModuleId","end","moduleFactoryFn","existingGroupFactory","existingFactory","factoryToInstall","didInstallFactory","has","applyModuleFactoryName","turbopackExports","turbopackError","resolveQueue","queue","status","forEach","fn","queueCount","wrapDeps","deps","dep","assign","err","asyncModule","body","hasAwait","depQueues","Set","rawPromise","attributes","handleAsyncDependencies","currentDeps","getResult","d","fnQueue","q","add","asyncResult","a","relativeURL","inputUrl","realUrl","URL","values","href","pathname","replace","origin","protocol","toString","toJSON","_args","configurable","U","invariant","never","computeMessage","factoryNotAvailableMessage","sourceType","sourceData","instantiationReason","requireStub","_moduleId","z","g","globalThis","factory"],"mappings":"AAAA;;;;;CAKC,GAED,oDAAoD,GAEpD,6CAA6C;AAI7C;;;CAGC,GACD,IAAA,AAAKA,oCAAAA;IACH;;;;GAIC;IAED;;;GAGC;IAED;;;;GAIC;WAhBEA;EAAAA;AA+BL;;;;;CAKC,GACD,IAAIC,gCAAgC;AAEpC,MAAMC,qBAAqB,IAAIC;AAE/B;;CAEC,GACD,SAASC,QAEPC,MAAc,EACdC,OAAgB;IAEhB,IAAI,CAACC,CAAC,GAAGF;IACT,gFAAgF;IAChF,yEAAyE;IACzE,+CAA+C;IAC/C,8EAA8E;IAC9E,sEAAsE;IACtE,iBAAiB;IACjB,4FAA4F;IAC5F,IAAI,CAACG,CAAC,GAAGF;AACX;AACA,MAAMG,mBAAmBL,QAAQM,SAAS;AA+B1C,MAAMC,iBAAiBC,OAAOF,SAAS,CAACC,cAAc;AACtD,MAAME,cAAc,OAAOC,WAAW,eAAeA,OAAOD,WAAW;AAEvE,SAASE,WACPC,GAAQ,EACRC,IAAiB,EACjBC,OAA2C;IAE3C,IAAI,CAACP,eAAeQ,IAAI,CAACH,KAAKC,OAAOL,OAAOQ,cAAc,CAACJ,KAAKC,MAAMC;AACxE;AAEA,SAASG,qBACPC,WAAgC,EAChCC,EAAY;IAEZ,IAAIlB,SAASiB,WAAW,CAACC,GAAG;IAC5B,IAAI,CAAClB,QAAQ;QACX,IAAIJ,+BAA+B;YACjC,2CAA2C;YAC3CI,SAASmB,0BAA0BD;QACrC,OAAO;YACLlB,SAASoB,mBAAmBF;QAC9B;QACAD,WAAW,CAACC,GAAG,GAAGlB;IACpB;IACA,OAAOA;AACT;AAEA;;CAEC,GACD,SAASoB,mBAAmBF,EAAY;IACtC,OAAO;QACLjB,SAAS,CAAC;QACVoB,OAAOC;QACPJ;QACAK,iBAAiBD;IACnB;AACF;AAEA,SAASH,0BAA0BD,EAAY;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ared-node/base-externals-utils.ts"],"sourcesContent":["/// \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": 634, "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"],"names":["path","require","relativePathToRuntimeRoot","relative","RUNTIME_PUBLIC_PATH","relativePathToDistRoot","join","RELATIVE_ROOT_PATH","RUNTIME_ROOT","resolve","__filename","ABSOLUTE_ROOT","resolveAbsolutePath","modulePath","Context","prototype","P"],"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","ignoreList":[0]}},
- {"offset": {"line": 655, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared-node/node-wasm-utils.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n\nfunction readWebAssemblyAsResponse(path: string) {\n const { createReadStream } = require('fs') as typeof import('fs')\n const { Readable } = require('stream') as typeof import('stream')\n\n const stream = createReadStream(path)\n\n // @ts-ignore unfortunately there's a slight type mismatch with the stream.\n return new Response(Readable.toWeb(stream), {\n headers: {\n 'content-type': 'application/wasm',\n },\n })\n}\n\nasync function compileWebAssemblyFromPath(\n path: string\n): Promise {\n const response = readWebAssemblyAsResponse(path)\n\n return await WebAssembly.compileStreaming(response)\n}\n\nasync function instantiateWebAssemblyFromPath(\n path: string,\n importsObj: WebAssembly.Imports\n): Promise {\n const response = readWebAssemblyAsResponse(path)\n\n const { instance } = await WebAssembly.instantiateStreaming(\n response,\n importsObj\n )\n\n return instance.exports\n}\n"],"names":["readWebAssemblyAsResponse","path","createReadStream","require","Readable","stream","Response","toWeb","headers","compileWebAssemblyFromPath","response","WebAssembly","compileStreaming","instantiateWebAssemblyFromPath","importsObj","instance","instantiateStreaming","exports"],"mappings":"AAAA,oDAAoD,GAEpD,2DAA2D;AAE3D,SAASA,0BAA0BC,IAAY;IAC7C,MAAM,EAAEC,gBAAgB,EAAE,GAAGC,QAAQ;IACrC,MAAM,EAAEC,QAAQ,EAAE,GAAGD,QAAQ;IAE7B,MAAME,SAASH,iBAAiBD;IAEhC,2EAA2E;IAC3E,OAAO,IAAIK,SAASF,SAASG,KAAK,CAACF,SAAS;QAC1CG,SAAS;YACP,gBAAgB;QAClB;IACF;AACF;AAEA,eAAeC,2BACbR,IAAY;IAEZ,MAAMS,WAAWV,0BAA0BC;IAE3C,OAAO,MAAMU,YAAYC,gBAAgB,CAACF;AAC5C;AAEA,eAAeG,+BACbZ,IAAY,EACZa,UAA+B;IAE/B,MAAMJ,WAAWV,0BAA0BC;IAE3C,MAAM,EAAEc,QAAQ,EAAE,GAAG,MAAMJ,YAAYK,oBAAoB,CACzDN,UACAI;IAGF,OAAOC,SAASE,OAAO;AACzB","ignoreList":[0]}},
- {"offset": {"line": 676, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/nodejs/runtime/runtime-base.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/// \n/// \n/// \n/// \n/// \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 = Object.create(null)\n\n/**\n * Returns an absolute path to the given module's id.\n */\nfunction resolvePathFromModule(\n this: TurbopackBaseContext,\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,\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()\nconst unsupportedLoadChunk = Promise.resolve(undefined)\nconst loadedChunk: Promise = Promise.resolve(undefined)\nconst chunkCache = new Map>()\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(\n this: TurbopackBaseContext,\n chunkData: ChunkData\n): Promise {\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(\n this: TurbopackBaseContext,\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\nfunction loadWebAssembly(\n chunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module,\n imports: WebAssembly.Imports\n) {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n\n return instantiateWebAssemblyFromPath(resolved, imports)\n}\ncontextPrototype.w = loadWebAssembly\n\nfunction loadWebAssemblyModule(\n chunkPath: ChunkPath,\n _edgeModule: () => WebAssembly.Module\n) {\n const resolved = path.resolve(RUNTIME_ROOT, chunkPath)\n\n return compileWebAssemblyFromPath(resolved)\n}\ncontextPrototype.u = loadWebAssemblyModule\n\n/**\n * Creates a Node.js worker thread by instantiating the given WorkerConstructor\n * with the appropriate path and options, including forwarded globals.\n *\n * @param WorkerConstructor The Worker constructor from worker_threads\n * @param workerPath Path to the worker entry chunk\n * @param workerOptions options to pass to the Worker constructor (optional)\n */\nfunction createWorker(\n WorkerConstructor: { new (path: string, options?: object): unknown },\n workerPath: string,\n workerOptions?: { workerData?: unknown; [key: string]: unknown }\n): unknown {\n // Build the forwarded globals object\n const forwardedGlobals: Record = {}\n for (const name of WORKER_FORWARDED_GLOBALS) {\n forwardedGlobals[name] = (globalThis as Record)[name]\n }\n\n // Merge workerData with forwarded globals\n const existingWorkerData = workerOptions?.workerData || {}\n const options = {\n ...workerOptions,\n workerData: {\n ...(typeof existingWorkerData === 'object' ? existingWorkerData : {}),\n __turbopack_globals__: forwardedGlobals,\n },\n }\n\n return new WorkerConstructor(workerPath, options)\n}\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","Object","create","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","loadWebAssembly","_edgeModule","imports","instantiateWebAssemblyFromPath","w","loadWebAssemblyModule","compileWebAssemblyFromPath","u","createWorker","WorkerConstructor","workerPath","workerOptions","forwardedGlobals","WORKER_FORWARDED_GLOBALS","globalThis","existingWorkerData","workerData","options","__turbopack_globals__","regexJsUrl","chunkUrlOrPath","test"],"mappings":"AAAA,oDAAoD,GAEpD,8DAA8D;AAC9D,kEAAkE;AAClE,kEAAkE;AAClE,6DAA6D;AAC7D,8CAA8C;AAE9C;;;CAGC,GAEDA,QAAQC,GAAG,CAACC,SAAS,GAAG;AAExB,MAAMC,MAAMC,QAAQ;AAEpB,MAAMC,kBAAmC,IAAIC;AAC7C,MAAMC,cAAmCC,OAAOC,MAAM,CAAC;AAEvD;;CAEC,GACD,SAASC,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,OAAOb,IAAIqB,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,IAAInC;AAEvB,SAASoC;IACPD,WAAWE,KAAK;IAChBR,aAAaQ,KAAK;AACpB;AAEA,SAAST,qBACPF,UAAqB,EACrBY,SAAoB;IAEpB,IAAI,CAACC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B;IACA,sGAAsG;IACtG,OAAOA;AACT;AACAK,iBAAiBC,CAAC,GAAGP;AAErB,SAASQ,oBAEPC,QAAgB;IAEhB,MAAMC,QAAO9D,IAAI+D,aAAa,CAAC,IAAIC,IAAIH,UAAUzC;IACjD,OAAOgC,eAAezB,IAAI,CAAC,IAAI,EAAEmC;AACnC;AACAJ,iBAAiBO,CAAC,GAAGL;AAErB,SAASM,gBACPzB,SAAoB,EACpB0B,WAAqC,EACrCC,OAA4B;IAE5B,MAAMnD,WAAWC,KAAKC,OAAO,CAACC,cAAcqB;IAE5C,OAAO4B,+BAA+BpD,UAAUmD;AAClD;AACAV,iBAAiBY,CAAC,GAAGJ;AAErB,SAASK,sBACP9B,SAAoB,EACpB0B,WAAqC;IAErC,MAAMlD,WAAWC,KAAKC,OAAO,CAACC,cAAcqB;IAE5C,OAAO+B,2BAA2BvD;AACpC;AACAyC,iBAAiBe,CAAC,GAAGF;AAErB;;;;;;;CAOC,GACD,SAASG,aACPC,iBAAoE,EACpEC,UAAkB,EAClBC,aAAgE;IAEhE,qCAAqC;IACrC,MAAMC,mBAA4C,CAAC;IACnD,KAAK,MAAM3B,QAAQ4B,yBAA0B;QAC3CD,gBAAgB,CAAC3B,KAAK,GAAG,AAAC6B,UAAsC,CAAC7B,KAAK;IACxE;IAEA,0CAA0C;IAC1C,MAAM8B,qBAAqBJ,eAAeK,cAAc,CAAC;IACzD,MAAMC,UAAU;QACd,GAAGN,aAAa;QAChBK,YAAY;YACV,GAAI,OAAOD,uBAAuB,WAAWA,qBAAqB,CAAC,CAAC;YACpEG,uBAAuBN;QACzB;IACF;IAEA,OAAO,IAAIH,kBAAkBC,YAAYO;AAC3C;AAEA,MAAME,aAAa;AACnB;;CAEC,GACD,SAAS3C,KAAK4C,cAAoC;IAChD,OAAOD,WAAWE,IAAI,CAACD;AACzB","ignoreList":[0]}},
- {"offset": {"line": 823, "column": 0}, "map": {"version":3,"sources":["turbopack:///[turbopack]/shared/runtime/hmr-runtime.ts"],"sourcesContent":["/// \n/// \n/// \n/// \n\ntype HotModuleFactoryFunction = ModuleFactoryFunction<\n HotModule,\n TurbopackBaseContext\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: Record\n\n/**\n * Module IDs that are instantiated as part of the runtime of a chunk.\n */\nlet runtimeModules: Set\n\n/**\n * Maps module IDs to persisted data between executions of their hot module\n * implementation (`hot.data`).\n */\nconst moduleHotData: Map = 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 = new WeakMap()\n\n/**\n * Modules that call `module.hot.invalidate()` (while being updated).\n */\nconst queuedInvalidatedModules: Set = 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\n outdatedModules: Set\n outdatedDependencies: Map>\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 = new Set()\n const outdatedDependencies: Map> = new Map()\n\n type QueueItem = { moduleId?: ModuleId; dependencyChain: ModuleId[] }\n\n const queue: QueueItem[] = [\n {\n moduleId,\n dependencyChain: [],\n },\n ]\n\n let nextItem\n while ((nextItem = queue.shift())) {\n const { moduleId, dependencyChain } = nextItem\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[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[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>,\n source: Map>\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,\n autoAcceptRootModules: boolean\n): {\n outdatedModules: Set\n outdatedDependencies: Map>\n} {\n const outdatedModules = new Set()\n const outdatedDependencies = new Map>()\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,\n outdatedDependencies: Map>,\n autoAcceptRootModules: boolean\n): {\n outdatedModules: Set\n outdatedDependencies: Map>\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\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[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[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[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 delete devModuleCache[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,\n disposedModules: Iterable,\n outdatedDependencies: Map>\n): { outdatedModuleParents: Map> } {\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>()\n for (const moduleId of outdatedModules) {\n const oldModule = devModuleCache[moduleId]\n outdatedModuleParents.set(moduleId, oldModule?.parents)\n delete devModuleCache[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[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,\n runtimeModules: Set,\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[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,\n updates: Record,\n chunkModulesMap?: Map>\n): {\n added: Map\n modified: Map\n deleted: Set\n chunksAdded: Map>\n chunksDeleted: Map>\n} {\n const chunksAdded = new Map()\n const chunksDeleted = new Map()\n const added: Map = new Map()\n const modified = new Map()\n const deleted: Set = 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()\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,\n modified: Map,\n evalModuleEntry: (entry: EcmascriptModuleEntry) => HotModuleFactoryFunction,\n autoAcceptRootModules: boolean\n): {\n outdatedModules: Set\n outdatedDependencies: Map>\n newModuleFactories: Map\n} {\n const newModuleFactories = new Map()\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,\n outdatedModuleParents: Map>,\n outdatedDependencies: Map>,\n moduleFactories: ModuleFactories,\n devModuleCache: ModuleCache,\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[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 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[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,\n outdatedDependencies: Map>,\n disposedModules: Iterable,\n newModuleFactories: Map,\n moduleFactories: ModuleFactories,\n devModuleCache: ModuleCache,\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\n modified: Map